This project is to enter a raffle to win a cute dog NFT. The protocol should do the following:
- Call the
enterRaffle
function with the following parameters:address[] participants
: A list of addresses that enter. You can use this to enter yourself multiple times, or yourself and a group of your friends.
- Duplicate addresses are not allowed
- Users are allowed to get a refund of their ticket &
value
if they call therefund
function - Every X seconds, the raffle will be able to draw a winner and be minted a random puppy
- The owner of the protocol will set a feeAddress to take a cut of the
value
, and the rest of the funds will be sent to the winner of the puppy.
- git
- You'll know you did it right if you can run
git --version
and you see a response likegit version x.x.x
- You'll know you did it right if you can run
- foundry
- You'll know you did it right if you can run
forge --version
and you see a response likeforge 0.2.0 (816e00b 2023-03-16T00:05:26.396218Z)
- You'll know you did it right if you can run
git clone https://github.com/Cyfrin/4-puppy-raffle-audit
cd 4-puppy-raffle-audit
make
If you can't or don't want to run and install locally, you can work with this repo in Gitpod. If you do this, you can skip the clone this repo
part.
forge test
forge coverage
and for coverage based testing:
forge coverage --report debug
- Commit Hash: 22bbbb2c47f3f2b78c1b134590baf41383fd354f
- In Scope:
./src/
└── PuppyRaffle.sol
- Solc Version: 0.7.6
- Chain(s) to deploy contract to: Ethereum