In this challenge, you need to register a team and get your first flag NFT! The contract allows teams to register with a name and team size.
The contract has a simple registration function that:
- Takes a team name and size as input
- Stores team information in a mapping
- Mints an NFT flag to the registered team
Hint 1
Look at the requirements in theregisterTeam
function. What are the valid inputs?
Hint 2
The team size must be between 1 and 4 members.Hint 3
The team name just needs to be non-empty.Click to reveal solution
This is a straightforward challenge! To solve it:
- Call the
registerTeam
function with:- Any non-empty string as the team name
- A team size between 1 and 4
Example solution:
challenge.registerTeam("My Team", 2);
That's it! The contract will store your team information and mint the flag NFT to your address.
Why this works:
- The name is non-empty, satisfying the first require check
- The team size (2) is between 1 and 4, satisfying the second require check
- The function will automatically mint the flag NFT to your address
Congratulations on getting your first flag! 🎉
Remember: Sometimes the simplest solution is the correct one. Don't overthink it!