This code is to create a proveably random smart contract lottery.
- Users can enter by paying for a ticket
- The ticket fees are going to go to the winner during the draw
- After X period of time , the lottery will automatically draw a winner
- And this will be done programatically
- Using Chainlink VRF & Chainlink Automation
- Chainlink VRF --> Randomness
- Chainlink Automation --? Time based trigger
-
write some deploy scripts
-
Write our tests
setup environment variables
source .env
test on a local chain
forge test
test on a forked Testnet
forge test --fork-url $SEPOLIA_RPC_URL
- Forked mainnet