This repository contains the source code for a proveably random lottery contract.
- User can buy tickets for a raffle
- The ticket fees are going to the winner during the draw
- After X periode of time, the lottery will automatically draw a winner
- And this will be done automatically
- Using Chainlink VRF and Chanlink Automation
- Chainlink VRF will be used to generate a random number
- Chainlink Automation will be used to trigger the draw based on the time
when writting the code always use CEI (Check-Effect-Interaction) pattern Interaction is with external contracts
- Write some deploy scripts
- Write our tests
- run on local blockchain
- run on forked Testnet
- run on forked Mainnet
forge script script/Interaction.s.sol:FundSubscription --rpc-url $SEPOLIA_RPC_URL --private-key $PRIVATE_KEY --broadcast
make deploy ARGS="--network sepolia"