Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

gauntlet state

Back to all declarations

StatsJSON

func() string

StatsJSON returns board totals.

Open
OID
08c392…3524:3
StatsJSON details

Inspect func

ListJSON

func(offset int, limit int) string

ListJSON returns up to limit challenges, newest first, skipping offset.

Open
OID
08c392…3524:5
ListJSON details

Inspect func

summaryJSON

func(c *gauntlet.Challenge) string
Open
OID
08c392…3524:6
summaryJSON details

Inspect func

ChallengeJSON

func(id uint64) string

ChallengeJSON returns one challenge in full, or "null".

Open
OID
08c392…3524:7
ChallengeJSON details

Inspect func

ProfileJSON

func(addr .uverse.address) string

ProfileJSON returns an address's stats, or "null".

Open
OID
08c392…3524:8
ProfileJSON details

Inspect func

profileJSON

func(p *gauntlet.Profile) string
Open
OID
08c392…3524:9
profileJSON details

Inspect func

LeaderboardJSON

func() string

LeaderboardJSON returns the top solvers by earnings.

Open
OID
08c392…3524:10
LeaderboardJSON details

Inspect func

JudgesJSON

func() string

JudgesJSON lists registered judges.

Open
OID
08c392…3524:11
JudgesJSON details

Inspect func

denom

untyped string

Value

"ugnot"

profiles

v0.Tree

// address -> \*Profile

Open
OID
08c392…3524:16
profiles details

Inspect ref

judges

v0.Tree

// judge realm path -> \*JudgeInfo

Open
OID
08c392…3524:18
judges details

Inspect ref

pkgPath

string

Value

"gno.land/r/g188c5k6v0tmfyevfzj962jkajjqt4ddtml8zw0x/gauntlet"

totalPaid

int64

// ugnot paid to winners

Value

0

paidOut

[]*gauntlet.PaidRecord

Value

<zero>

Profile

type

Profile tracks what an address has done on the board.

Value

gauntlet.Profile

JudgeInfo

type

JudgeInfo is a registered judge: reusable, immutable test logic.

Value

gauntlet.JudgeInfo

PaidRecord

type

PaidRecord is one winner payout, for the activity feed.

Value

gauntlet.PaidRecord

Post

func(title string, spec string, cases string, hours int, bond int64, windowMinutes int) uint64

Post creates a challenge with fixed test cases. Send the reward in ugnot with the call. cases has one test per line: \`input => expected output\`.

Open
OID
08c392…3524:22
Post details

Inspect func

PostJudged

func(title string, spec string, judgePath string, cases string, hours int, bond int64, windowMinutes int) uint64

PostJudged creates a challenge graded by a registered judge (see RegisterJudge), plus optional fixed cases. Send the reward with the call.

Open
OID
08c392…3524:24
PostJudged details

Inspect func

post

func(poster .uverse.address, p gauntlet.PostParams) uint64
Open
OID
08c392…3524:25
post details

Inspect func

RegisterJudge

func(name string, about string, inputs func(...), check func(...))

RegisterJudge is called by a judge realm, usually from its init. The judge is stored under the caller's package path and can never change, so every bounty that uses it is graded by exactly the code anyone can read.

Open
OID
08c392…3524:26
RegisterJudge details

Inspect func

Commit

func(id uint64, hash string)

Commit reserves your place in line with sha256(solutionPath + ":" + salt). Send the challenge's bond with the call. Use HashFor to compute the hash.

Open
OID
08c392…3524:27
Commit details

Inspect func

Reveal

func(id uint64, salt string, solve func(...))

Reveal is called by your solution realm, never by a wallet directly: func Submit(cur realm, id uint64, salt string) { gauntlet.Reveal(cross(cur), id, salt, Solve) } The realm path of the caller is read from the runtime, so nobody can reveal on behalf of a commit they do not own. The tests run here, on-chain.

Open
OID
08c392…3524:28
Reveal details

Inspect func

Settle

func(id uint64)

Settle expires late commits and pays out when the result is final. Anyone can call it.

Open
OID
08c392…3524:29
Settle details

Inspect func

Boost

func(id uint64)

Boost adds the ugnot sent with the call to an open challenge's reward.

Open
OID
08c392…3524:30
Boost details

Inspect func

HashFor

func(pkgPath string, salt string) string

HashFor computes the commit hash for a solution realm path and a salt. Keep the salt secret until you reveal.

Open
OID
08c392…3524:31
HashFor details

Inspect func

pay

func(id uint64, payouts []gauntlet.Payout)
Open
OID
08c392…3524:32
pay details

Inspect func

sentUgnot

func() int64

sentUgnot returns the ugnot sent with a direct wallet call. Other denoms are rejected so nothing gets stuck.

Open
OID
08c392…3524:34
sentUgnot details

Inspect func

profile

func(a .uverse.address) *gauntlet.Profile
Open
OID
08c392…3524:35
profile details

Inspect func

Render

func(path string) string

Render serves the board in gnoweb. "" open bounties and recent winners "c/<id>" one challenge: spec, tests, queue, result "u/<address>" a solver's or poster's profile "leaderboard" top earners "judges" registered judges "solve" how to submit a solution

Open
OID
08c392…3524:37
Render details

Inspect func

tx

func(fn string) *v0.TxBuilder

tx builds a transaction link to this realm, whatever path it is deployed at.

Open
OID
08c392…3524:41
tx details

Inspect func

renderHome

func(now time.Time) string
Open
OID
08c392…3524:43
renderHome details

Inspect func

gradedBy

func(c *gauntlet.Challenge) string
Open
OID
08c392…3524:44
gradedBy details

Inspect func

renderChallenge

func(id uint64, now time.Time) string
Open
OID
08c392…3524:45
renderChallenge details

Inspect func

solverTemplate

func(id uint64) string
Open
OID
08c392…3524:46
solverTemplate details

Inspect func

renderProfile

func(a .uverse.address) string
Open
OID
08c392…3524:47
renderProfile details

Inspect func

renderLeaderboard

func() string
Open
OID
08c392…3524:48
renderLeaderboard details

Inspect func

topSolvers

func(n int) []*gauntlet.Profile

topSolvers returns profiles with at least one win, by earnings.

Open
OID
08c392…3524:49
topSolvers details

Inspect func

better

func(a *gauntlet.Profile, b *gauntlet.Profile) bool
Open
OID
08c392…3524:50
better details

Inspect func

renderSolveGuide

func() string
Open
OID
08c392…3524:52
renderSolveGuide details

Inspect func

gnot

func(u int64) string

gnot formats ugnot as GNOT with up to 6 decimals.

Open
OID
08c392…3524:56
gnot details

Inspect func

left

func(now time.Time, t time.Time) string

left describes time remaining until t, from now.

Open
OID
08c392…3524:58
left details

Inspect func

short

func(a .uverse.address) string
Open
OID
08c392…3524:59
short details

Inspect func

webPath

func(pkgPath string) string

webPath turns gno.land/r/x into /r/x for gnoweb links.

Open
OID
08c392…3524:60
webPath details

Inspect func
StatsJSON : func() string Inspect
ListJSON : func(offset int, limit int) string Inspect
summaryJSON : func(c *gauntlet.Challenge) string Inspect
ChallengeJSON : func(id uint64) string Inspect
ProfileJSON : func(addr .uverse.address) string Inspect
profileJSON : func(p *gauntlet.Profile) string Inspect
LeaderboardJSON : func() string Inspect
JudgesJSON : func() string Inspect
denom : untyped string ="ugnot"
board : gauntlet.Board Inspect
profiles : v0.Tree Inspect
judges : v0.Tree Inspect
pkgPath : string ="gno.land/r/g188c5k6v0tmfyevfzj962jkajjqt4ddtml8zw0x/gauntlet"
totalPaid : int64 =0
paidOut : []*gauntlet.PaidRecord =<zero>
Profile : type =gauntlet.Profile
JudgeInfo : type =gauntlet.JudgeInfo
PaidRecord : type =gauntlet.PaidRecord
Post : func(title string, spec string, cases string, hours int, bond int64, windowMinutes int) uint64 Inspect
PostJudged : func(title string, spec string, judgePath string, cases string, hours int, bond int64, windowMinutes int) uint64 Inspect
post : func(poster .uverse.address, p gauntlet.PostParams) uint64 Inspect
RegisterJudge : func(name string, about string, inputs func(...), check func(...)) Inspect
Commit : func(id uint64, hash string) Inspect
Reveal : func(id uint64, salt string, solve func(...)) Inspect
Settle : func(id uint64) Inspect
Boost : func(id uint64) Inspect
HashFor : func(pkgPath string, salt string) string Inspect
pay : func(id uint64, payouts []gauntlet.Payout) Inspect
mustUser : func() .uverse.address Inspect
sentUgnot : func() int64 Inspect
profile : func(a .uverse.address) *gauntlet.Profile Inspect
selfPkgPath : func() string Inspect
Render : func(path string) string Inspect
self : func() string Inspect
home : func() string Inspect
tx : func(fn string) *v0.TxBuilder Inspect
nav : func() string Inspect
renderHome : func(now time.Time) string Inspect
gradedBy : func(c *gauntlet.Challenge) string Inspect
renderChallenge : func(id uint64, now time.Time) string Inspect
solverTemplate : func(id uint64) string Inspect
renderProfile : func(a .uverse.address) string Inspect
renderLeaderboard : func() string Inspect
topSolvers : func(n int) []*gauntlet.Profile Inspect
better : func(a *gauntlet.Profile, b *gauntlet.Profile) bool Inspect
renderJudges : func() string Inspect
renderSolveGuide : func() string Inspect
itoa : func(n uint64) string Inspect
i64toa : func(n int64) string Inspect
gnot : func(u int64) string Inspect
when : func(t time.Time) string Inspect
left : func(now time.Time, t time.Time) string Inspect
short : func(a .uverse.address) string Inspect
webPath : func(pkgPath string) string Inspect
jstr : func(s string) string Inspect