Any player can start the lottery, buy tickets and even end the lottery. The basic game depends on randomness from drand. The quicknet chain chain of drand creates random 32 bytes every 3 seconds. This randomness is verifiable in the sense that anyone can check if a given 32 bytes bytes are indeed the i-th output of drand.
To deploy and use the smart contract, follow these steps:
-
Move Compiler Installation: Ensure you have the Move compiler installed. You can find the Move compiler and instructions on how to install it at Sui Docs.
-
Compile the Smart Contract: For this contract to compile successfully, please ensure you switch the dependencies to whichever you installed.
framework/devnet
for Devnet,framework/testnet
for Testnet
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/devnet" }
then build the contract by running
sui move build
- Deployment: Deploy the compiled smart contract to your blockchain platform of choice.
sui client publish --gas-budget 100000000 --json