This code is to build a provably random smart contract lottery.
Test coverage is at 54.92%. More functionality testing to be done with time.
Install foundry with:
curl -L https://foundry.paradigm.xyz | bash
foundryup
Check forge version:
forge --version
Check cast version:
cast --version
Check anvil version:
anvil --version
Clone into the repo:
git clone https://github.com/mxnwafor/foundry-smart-contract-lottery-f23
cd foundry-smart-contract-lottery-f23
forge build
- Users can enter by paying for a ticket
- The ticket fees are going to go to the winner after the draw
- After X period of time, the lottery automatically draws a winner
- And this will be done programmatically
- Using Chainlink VRF and Chainlink Automation
- Chainlink VRF -> Randomness
- Chainlink Automation -> Time based trigger
- Write some deploy scripts
- Write our tests
- Work on a local chain
- Forked Testnet
- Forked Mainnet