Skip to content
On this page

S1C1: The Greeting

1. Problem

Players need to register in the CTF system before participating in subsequent challenges. The contract Season1Challenge1 provides a registerMe(string) function that records the player's name and mints an S1C1 NFT as a registration credential.

2. Root Cause

All Season 1 challenge contracts share a single Season1NFTFlags contract. Subsequent challenges (such as S1C10, S2 series) check whether the caller has completed S1C1 registration (hasMinted[address][1] == true) and will reject the call if not registered.

3. Solution

Simply call registerMe("your_name"):

bash
cast send <S1C1_ADDRESS> "registerMe(string)" "player_name" --private-key $PK --rpc-url $RPC

4. Pitfalls Encountered

No significant pitfalls. This is an introductory challenge.

5. Why the Pitfall Exists

N/A

6. How to Resolve

N/A

7. Key Takeaways

PointExplanation
CTF registration mechanismPlayer completion status is recorded via NFT mint; the hasMinted mapping is used for cross-challenge verification
No access controlregisterMe has no access control — anyone can register any number of times (though NFTFlags will reject duplicate mints)
Solidity fundamentalsmapping(address => string), emit events

Built with AiAda