renderAPI
func(res *v0.ResponseWriter, req *v0.Request)renderAPI answers api/\<what> with JSON for the Cellar web client: challenges, board, board-\<season>, feed, seasons, player-\<address>.
- OID
- 054008…0cd1:3
renderAPI details
challengesJSON
func() string- OID
- 054008…0cd1:5
challengesJSON details
boardJSON
func(season int) string- OID
- 054008…0cd1:6
boardJSON details
feedJSON
func() string- OID
- 054008…0cd1:7
feedJSON details
solveJSON
func(s hall.Solve) string- OID
- 054008…0cd1:8
solveJSON details
seasonsJSON
func() string- OID
- 054008…0cd1:9
seasonsJSON details
playerJSON
func(who string) string- OID
- 054008…0cd1:10
playerJSON details
object
func(kv []string) stringobject renders alternating keys and raw JSON values as a JSON object.
- OID
- 054008…0cd1:11
object details
array
func(items []string) string- OID
- 054008…0cd1:12
array details
quote
func(s string) stringquote encodes s as a JSON string.
- OID
- 054008…0cd1:13
quote details
badgeArt
untyped stringbadgeArt is where the badge artwork lives. The artwork of a badge is derived from its token id, so nothing extra is stored per token.
Value
"https://akinbola247.github.io/cellar-ctf/badges/"
badges
*v0.Token- OID
- 054008…0cd1:140
badges details
badgeMint
*v0.PrivateLedger- OID
- 054008…0cd1:142
badgeMint details
initBadges
func()- OID
- 054008…0cd1:16
initBadges details
Badges
func() v0.TellerBadges returns a read-only view of the badge collection (GRC721). Badges cannot be transferred: the hall exposes no transfer. Token ids: solve:<slug>:<address> broke a challenge blood:<slug> broke it first (replaces the solve badge) season:<n>:<rank> finished a season on the podium
- OID
- 054008…0cd1:18
Badges details
BadgeURI
func(tid string) stringBadgeURI returns the artwork URI of badge tid, or "" if it was never minted.
- OID
- 054008…0cd1:19
BadgeURI details
awardSolve
func(p *hall.profile, s hall.Solve)awardSolve mints the badge for a solve: first blood, or a plain solve.
- OID
- 054008…0cd1:20
awardSolve details
awardSeason
func(addr .uverse.address, season int, rank int)awardSeason mints a season podium badge.
- OID
- 054008…0cd1:21
awardSeason details
mint
func(p *hall.profile, tid string)- OID
- 054008…0cd1:22
mint details
Solve
typeSolve is one claimed capture.
Value
hall.Solve
Claim
func(slug string) intClaim records that the caller broke the challenge slug and returns the points it is now worth. The challenge realm is asked whether the player captured it; the hall never takes the player's word for it. Call it from your wallet, or from your solution realm right after the exploit: a realm at gno.land/r/\<your-address>/... is credited to you.
- OID
- 054008…0cd1:23
Claim details
pushFeed
func(s hall.Solve)- OID
- 054008…0cd1:25
pushFeed details
solvePoints
func(s hall.Solve) intsolvePoints is what one solve is worth today, first blood included.
- OID
- 054008…0cd1:26
solvePoints details
Status
typeStatus is where a challenge stands in the hall.
Value
hall.Status
Pending
hall.Status// enlisted by a community realm, awaiting review
Value
<zero>
Listed
hall.Status// open for claims
Value
<zero>
Retired
hall.Status// closed for claims; past solves still score
Value
<zero>
entry
typeentry is a challenge as the hall knows it.
Value
hall.entry
Enlist
func(ch flag.Challenge)Enlist registers the challenge ch for the realm that calls it. Call it from your challenge realm's init: func init(cur realm) { hall.Enlist(cross(cur), challenge{}) } Official challenges are listed at once; community ones wait for review.
- OID
- 054008…0cd1:27
Enlist details
Approve
func(slug string)Approve opens a pending community challenge for claims.
- OID
- 054008…0cd1:29
Approve details
Retire
func(slug string)Retire closes a challenge for new claims. Existing solves keep scoring.
- OID
- 054008…0cd1:30
Retire details
getEntry
func(slug string) (*hall.entry, bool)- OID
- 054008…0cd1:31
getEntry details
mustEntry
func(slug string) *hall.entry- OID
- 054008…0cd1:32
mustEntry details
eachEntry
func(fn func(...))eachEntry calls fn for every challenge in enlistment order.
- OID
- 054008…0cd1:33
eachEntry details
ErrNotCurator
*errors.errorStringErrors returned (as panics) by the hall's public functions.
- OID
- 054008…0cd1:35
ErrNotCurator details
ErrBadAddress
*errors.errorStringErrors returned (as panics) by the hall's public functions.
- OID
- 054008…0cd1:38
ErrBadAddress details
ErrNotRealm
*errors.errorStringErrors returned (as panics) by the hall's public functions.
- OID
- 054008…0cd1:41
ErrNotRealm details
ErrNilChallenge
*errors.errorStringErrors returned (as panics) by the hall's public functions.
- OID
- 054008…0cd1:44
ErrNilChallenge details
ErrAlreadyEnlisted
*errors.errorStringErrors returned (as panics) by the hall's public functions.
- OID
- 054008…0cd1:47
ErrAlreadyEnlisted details
ErrSlugTaken
*errors.errorStringErrors returned (as panics) by the hall's public functions.
- OID
- 054008…0cd1:50
ErrSlugTaken details
ErrUnknownChallenge
*errors.errorStringErrors returned (as panics) by the hall's public functions.
- OID
- 054008…0cd1:53
ErrUnknownChallenge details
ErrNotListed
*errors.errorStringErrors returned (as panics) by the hall's public functions.
- OID
- 054008…0cd1:56
ErrNotListed details
ErrNotPending
*errors.errorStringErrors returned (as panics) by the hall's public functions.
- OID
- 054008…0cd1:59
ErrNotPending details
ErrAlreadyClaimed
*errors.errorStringErrors returned (as panics) by the hall's public functions.
- OID
- 054008…0cd1:62
ErrAlreadyClaimed details
ErrNotCaptured
*errors.errorStringErrors returned (as panics) by the hall's public functions.
- OID
- 054008…0cd1:65
ErrNotCaptured details
ErrNotUser
*errors.errorStringErrors returned (as panics) by the hall's public functions.
- OID
- 054008…0cd1:68
ErrNotUser details
ErrBadHandle
*errors.errorStringErrors returned (as panics) by the hall's public functions.
- OID
- 054008…0cd1:71
ErrBadHandle details
ErrHandleTaken
*errors.errorStringErrors returned (as panics) by the hall's public functions.
- OID
- 054008…0cd1:74
ErrHandleTaken details
ErrBadSeasonName
*errors.errorStringErrors returned (as panics) by the hall's public functions.
- OID
- 054008…0cd1:77
ErrBadSeasonName details
officialPrefix
untyped stringofficialPrefix marks the realms of the Cellar team. Challenges enlisted from below it are listed at once; everyone else waits for the curator.
Value
"gno.land/r/g15c02s5hhdny9uvr9za3xsyn9sw8p0klptrh6kf/cellar/"
feedSize
untyped bigintfeedSize is how many recent solves the hall remembers for its feed.
Value
(50 <untyped> bigint)
curator
.uverse.addressValue
<gnolang.StringValue>
selfPath
string// web path of this realm, e.g. /r/\<ns>/cellar/hall
Value
"/r/g15c02s5hhdny9uvr9za3xsyn9sw8p0klptrh6kf/cellar/hall"
entries
*v0.Tree// slug -> \*entry
- OID
- 054008…0cd1:82
entries details
paths
*v0.Tree// challenge realm path -> slug
- OID
- 054008…0cd1:85
paths details
order
[]string// slugs in enlistment order
- OID
- 054008…0cd1:819
order details
players
*v0.Tree// address -> \*profile
- OID
- 054008…0cd1:89
players details
handles
*v0.Tree// handle -> address
- OID
- 054008…0cd1:92
handles details
seasons
[]*hall.season// the last one is open
- OID
- 054008…0cd1:148
seasons details
feed
[]hall.Solve// newest last, at most feedSize
- OID
- 054008…0cd1:879
feed details
init.60
func()- OID
- 054008…0cd1:96
init.60 details
Curator
func() .uverse.address- OID
- 054008…0cd1:98
Curator details
TransferCuration
func(to .uverse.address)TransferCuration hands the curator role to another address.
- OID
- 054008…0cd1:99
TransferCuration details
assertCurator
func()- OID
- 054008…0cd1:100
assertCurator details
profile
typeprofile is a player as the hall knows them.
Value
hall.profile
profileOf
func(addr .uverse.address) *hall.profileprofileOf returns the profile of addr, creating it on first use.
- OID
- 054008…0cd1:101
profileOf details
findProfile
func(addr .uverse.address) (*hall.profile, bool)- OID
- 054008…0cd1:103
findProfile details
SetHandle
func(handle string)SetHandle sets the caller's display name in the hall. Handles are unique; setting a new one releases the old one.
- OID
- 054008…0cd1:104
SetHandle details
validHandle
func(h string) bool- OID
- 054008…0cd1:105
validHandle details
DisplayName
func(addr .uverse.address) stringDisplayName returns the hall handle of addr, else its gno.land username, else a shortened address.
- OID
- 054008…0cd1:106
DisplayName details
resolvePlayer
func(who string) (.uverse.address, bool)- OID
- 054008…0cd1:107
resolvePlayer details
Standing
typeStanding is a row of a leaderboard.
Value
hall.Standing
standings
func(season int) []hall.Standingstandings ranks every player with points; season 0 means all time. Ties go to whoever got there first.
- OID
- 054008…0cd1:108
standings details
byRank
typeValue
hall.byRank
boardSize
untyped bigintboardSize is how many rows the lobby leaderboard shows.
Value
(10 <untyped> bigint)
router
*v0.Router- OID
- 054008…0cd1:110
router details
newRouter
func() *v0.Router- OID
- 054008…0cd1:128
newRouter details
Render
func(path string) stringRender serves the hall's pages to gnoweb, and JSON under api/ for the Cellar web client.
- OID
- 054008…0cd1:129
Render details
renderLobby
func(res *v0.ResponseWriter, *v0.Request)- OID
- 054008…0cd1:114
renderLobby details
renderChallenge
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 054008…0cd1:117
renderChallenge details
renderPlayer
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 054008…0cd1:119
renderPlayer details
renderBoard
func(res *v0.ResponseWriter, *v0.Request)- OID
- 054008…0cd1:121
renderBoard details
renderSeasons
func(res *v0.ResponseWriter, *v0.Request)- OID
- 054008…0cd1:123
renderSeasons details
renderCommunity
func(res *v0.ResponseWriter, *v0.Request)- OID
- 054008…0cd1:125
renderCommunity details
challengeTable
func(keep func(...)) string- OID
- 054008…0cd1:130
challengeTable details
boardTable
func(rows []hall.Standing, limit int) string- OID
- 054008…0cd1:131
boardTable details
feedLine
func(s hall.Solve) string- OID
- 054008…0cd1:132
feedLine details
playerLink
func(addr .uverse.address) string- OID
- 054008…0cd1:133
playerLink details
link
func(text string, page string) stringlink points at a page of this realm.
- OID
- 054008…0cd1:134
link details
podiumSize
untyped bigintpodiumSize is how many players a closing season decorates.
Value
(3 <untyped> bigint)
season
typeseason is a stretch of play with its own standings. New challenges usually open with a new season.
Value
hall.season
newSeason
func(n int, name string) *hall.season- OID
- 054008…0cd1:135
newSeason details
currentSeason
func() *hall.season- OID
- 054008…0cd1:137
currentSeason details
OpenSeason
func(name string)OpenSeason closes the current season, decorates its podium with season badges, and opens the next one under name.
- OID
- 054008…0cd1:138