hackquest logo

simple_lottery

A Simple Lottery is a basic and straightforward form of a lottery system where participants enter for a chance to win a prize by purchasing a ticket or meeting a participation requirement.

ビデオ

説明

// Reset the players array for the next round

delete players;

}

// Function to get the winner's address

function getWinner() public view returns (address) {

return winner;

}

// Function to get the players count

function getPlayersCount() public view returns (uint) {

return players.length;

}

// Function to withdraw the funds by the winner

function withdraw() public {

// Ensure only the winner can withdraw

require(msg.sender == winner, "Only the winner can withdraw the prize.");

// Transfer the balance of the contract to the winner

payable(winner).transfer(address(this).balance);

}

}

License

This project is licensed under the MIT License.

ハッカソンの進行状況

70

テックスタック

Solidity
Ethers

資金調達の状況

0

チームリーダーHhq_1740126916
オープンソース
業界
DeFiSocialFi

他のビルダーも見ました