This next First Flight audit will have you applying your skills to an NFT Raffle Protocol. Let's make those Pups secure!
High - 100xp
Medium - 20xp
Low - 2xp
Starts: Noon UTC Wednesday, Oct 25 2023
Ends: Noon UTC Wednesday, Nov 01 2023
This project is to enter a raffle to win a cute dog NFT. The protocol should do the following:
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.value
if they call the refund
functionvalue
, and the rest of the funds will be sent to the winner of the puppy.git --version
and you see a response like git version x.x.x
forge --version
and you see a response like forge 0.2.0 (816e00b 2023-03-16T00:05:26.396218Z)
git clone https://github.com/Cyfrin/2023-10-Puppy-Raffle
cd 2023-10-Puppy-Raffle
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
./src/
└── PuppyRaffle.sol
Owner - Deployer of the protocol, has the power to change the wallet address to which fees are sent through the changeFeeAddress
function.
Player - Participant of the raffle, has the power to enter the raffle with the enterRaffle
function and refund value through refund
function.
None