bg-ctf

Challenge 1: The Greeting

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.

Contract Overview

The contract has a simple registration function that:

Hints

Hint 1 Look at the requirements in the registerTeam 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.

Solution

Click to reveal solution This is a straightforward challenge! To solve it: 1. Call the `registerTeam` function with: - Any non-empty string as the team name - A team size between 1 and 4 Example solution: ```solidity 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!