How to solve a bounty
Board · Leaderboard · Judges · How to solve
Gauntlet uses commit, deploy, reveal so nobody can copy your answer.
- Commit. Choose your solution's realm path and a secret salt. Compute
HashFor(path, salt)and callCommit(id, hash)with the bond. Your place in line is now fixed. - Deploy. Publish your realm with
SolveandSubmit(template below). Anyone can now read it, but anyone who copies it commits after you. - Reveal. Call your realm's
Submit(id, salt)before your reveal window ends. This realm reads your package path from the runtime, checks the hash, runs the tests and records the result. Your bond comes back either way.
The earliest commit that passes wins the whole pot. If you skip the reveal, your bond is added to the reward.
1package solve1
2
3import "gno.land/r/g188c5k6v0tmfyevfzj962jkajjqt4ddtml8zw0x/gauntlet"
4
5func Solve(in string) string {
6 // your code
7 return in
8}
9
10func Submit(cur realm, id uint64, salt string) {
11 gauntlet.Reveal(cross(cur), id, salt, Solve)
12}
Rules the code enforces
- Solutions must live in a deployed
/r/realm, so the winning code stays public on-chain. - One pending commit per address per bounty. Failed? Commit again with a new realm.
- Your
Solvecannot touch this realm's funds or state: Gno runs it under your realm's authority, and it never receives this realm'scur. - The poster cannot cancel or change the tests. The reward is locked until someone wins or the deadline passes.