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.

hall state

Back to all declarations

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>.

Open
OID
054008…0cd1:3
renderAPI details

Inspect func

challengesJSON

func() string
Open
OID
054008…0cd1:5
challengesJSON details

Inspect func

boardJSON

func(season int) string
Open
OID
054008…0cd1:6
boardJSON details

Inspect func

solveJSON

func(s hall.Solve) string
Open
OID
054008…0cd1:8
solveJSON details

Inspect func

playerJSON

func(who string) string
Open
OID
054008…0cd1:10
playerJSON details

Inspect func

object

func(kv []string) string

object renders alternating keys and raw JSON values as a JSON object.

Open
OID
054008…0cd1:11
object details

Inspect func

quote

func(s string) string

quote encodes s as a JSON string.

Open
OID
054008…0cd1:13
quote details

Inspect func

badgeArt

untyped string

badgeArt 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

func() v0.Teller

Badges 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

Open
OID
054008…0cd1:18
Badges details

Inspect func

BadgeURI

func(tid string) string

BadgeURI returns the artwork URI of badge tid, or "" if it was never minted.

Open
OID
054008…0cd1:19
BadgeURI details

Inspect func

awardSolve

func(p *hall.profile, s hall.Solve)

awardSolve mints the badge for a solve: first blood, or a plain solve.

Open
OID
054008…0cd1:20
awardSolve details

Inspect func

awardSeason

func(addr .uverse.address, season int, rank int)

awardSeason mints a season podium badge.

Open
OID
054008…0cd1:21
awardSeason details

Inspect func

mint

func(p *hall.profile, tid string)
Open
OID
054008…0cd1:22
mint details

Inspect func

Solve

type

Solve is one claimed capture.

Value

hall.Solve

Claim

func(slug string) int

Claim 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.

Open
OID
054008…0cd1:23
Claim details

Inspect func

solvePoints

func(s hall.Solve) int

solvePoints is what one solve is worth today, first blood included.

Open
OID
054008…0cd1:26
solvePoints details

Inspect func

Status

type

Status 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

type

entry 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.

Open
OID
054008…0cd1:27
Enlist details

Inspect func

Approve

func(slug string)

Approve opens a pending community challenge for claims.

Open
OID
054008…0cd1:29
Approve details

Inspect func

Retire

func(slug string)

Retire closes a challenge for new claims. Existing solves keep scoring.

Open
OID
054008…0cd1:30
Retire details

Inspect func

getEntry

func(slug string) (*hall.entry, bool)
Open
OID
054008…0cd1:31
getEntry details

Inspect func

mustEntry

func(slug string) *hall.entry
Open
OID
054008…0cd1:32
mustEntry details

Inspect func

eachEntry

func(fn func(...))

eachEntry calls fn for every challenge in enlistment order.

Open
OID
054008…0cd1:33
eachEntry details

Inspect func

ErrNotCurator

*errors.errorString

Errors returned (as panics) by the hall's public functions.

Open
OID
054008…0cd1:35
ErrNotCurator details

Inspect pointer

ErrBadAddress

*errors.errorString

Errors returned (as panics) by the hall's public functions.

Open
OID
054008…0cd1:38
ErrBadAddress details

Inspect pointer

ErrNotRealm

*errors.errorString

Errors returned (as panics) by the hall's public functions.

Open
OID
054008…0cd1:41
ErrNotRealm details

Inspect pointer

ErrNilChallenge

*errors.errorString

Errors returned (as panics) by the hall's public functions.

Open
OID
054008…0cd1:44
ErrNilChallenge details

Inspect pointer

ErrAlreadyEnlisted

*errors.errorString

Errors returned (as panics) by the hall's public functions.

Open
OID
054008…0cd1:47
ErrAlreadyEnlisted details

Inspect pointer

ErrSlugTaken

*errors.errorString

Errors returned (as panics) by the hall's public functions.

Open
OID
054008…0cd1:50
ErrSlugTaken details

Inspect pointer

ErrUnknownChallenge

*errors.errorString

Errors returned (as panics) by the hall's public functions.

Open
OID
054008…0cd1:53
ErrUnknownChallenge details

Inspect pointer

ErrNotListed

*errors.errorString

Errors returned (as panics) by the hall's public functions.

Open
OID
054008…0cd1:56
ErrNotListed details

Inspect pointer

ErrNotPending

*errors.errorString

Errors returned (as panics) by the hall's public functions.

Open
OID
054008…0cd1:59
ErrNotPending details

Inspect pointer

ErrAlreadyClaimed

*errors.errorString

Errors returned (as panics) by the hall's public functions.

Open
OID
054008…0cd1:62
ErrAlreadyClaimed details

Inspect pointer

ErrNotCaptured

*errors.errorString

Errors returned (as panics) by the hall's public functions.

Open
OID
054008…0cd1:65
ErrNotCaptured details

Inspect pointer

ErrNotUser

*errors.errorString

Errors returned (as panics) by the hall's public functions.

Open
OID
054008…0cd1:68
ErrNotUser details

Inspect pointer

ErrBadHandle

*errors.errorString

Errors returned (as panics) by the hall's public functions.

Open
OID
054008…0cd1:71
ErrBadHandle details

Inspect pointer

ErrHandleTaken

*errors.errorString

Errors returned (as panics) by the hall's public functions.

Open
OID
054008…0cd1:74
ErrHandleTaken details

Inspect pointer

ErrBadSeasonName

*errors.errorString

Errors returned (as panics) by the hall's public functions.

Open
OID
054008…0cd1:77
ErrBadSeasonName details

Inspect pointer

officialPrefix

untyped string

officialPrefix 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 bigint

feedSize is how many recent solves the hall remembers for its feed.

Value

(50 <untyped> bigint)

curator

.uverse.address

Value

<gnolang.StringValue>

selfPath

string

// web path of this realm, e.g. /r/\<ns>/cellar/hall

Value

"/r/g15c02s5hhdny9uvr9za3xsyn9sw8p0klptrh6kf/cellar/hall"

TransferCuration

func(to .uverse.address)

TransferCuration hands the curator role to another address.

Open
OID
054008…0cd1:99
TransferCuration details

Inspect func

profile

type

profile is a player as the hall knows them.

Value

hall.profile

profileOf

func(addr .uverse.address) *hall.profile

profileOf returns the profile of addr, creating it on first use.

Open
OID
054008…0cd1:101
profileOf details

Inspect func

findProfile

func(addr .uverse.address) (*hall.profile, bool)
Open
OID
054008…0cd1:103
findProfile details

Inspect func

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.

Open
OID
054008…0cd1:104
SetHandle details

Inspect func

validHandle

func(h string) bool
Open
OID
054008…0cd1:105
validHandle details

Inspect func

DisplayName

func(addr .uverse.address) string

DisplayName returns the hall handle of addr, else its gno.land username, else a shortened address.

Open
OID
054008…0cd1:106
DisplayName details

Inspect func

resolvePlayer

func(who string) (.uverse.address, bool)
Open
OID
054008…0cd1:107
resolvePlayer details

Inspect func

Standing

type

Standing is a row of a leaderboard.

Value

hall.Standing

standings

func(season int) []hall.Standing

standings ranks every player with points; season 0 means all time. Ties go to whoever got there first.

Open
OID
054008…0cd1:108
standings details

Inspect func

byRank

type

Value

hall.byRank

boardSize

untyped bigint

boardSize is how many rows the lobby leaderboard shows.

Value

(10 <untyped> bigint)

Render

func(path string) string

Render serves the hall's pages to gnoweb, and JSON under api/ for the Cellar web client.

Open
OID
054008…0cd1:129
Render details

Inspect func

renderLobby

func(res *v0.ResponseWriter, *v0.Request)
Open
OID
054008…0cd1:114
renderLobby details

Inspect func

renderChallenge

func(res *v0.ResponseWriter, req *v0.Request)
Open
OID
054008…0cd1:117
renderChallenge details

Inspect func

renderPlayer

func(res *v0.ResponseWriter, req *v0.Request)
Open
OID
054008…0cd1:119
renderPlayer details

Inspect func

renderBoard

func(res *v0.ResponseWriter, *v0.Request)
Open
OID
054008…0cd1:121
renderBoard details

Inspect func

renderSeasons

func(res *v0.ResponseWriter, *v0.Request)
Open
OID
054008…0cd1:123
renderSeasons details

Inspect func

renderCommunity

func(res *v0.ResponseWriter, *v0.Request)
Open
OID
054008…0cd1:125
renderCommunity details

Inspect func

challengeTable

func(keep func(...)) string
Open
OID
054008…0cd1:130
challengeTable details

Inspect func

boardTable

func(rows []hall.Standing, limit int) string
Open
OID
054008…0cd1:131
boardTable details

Inspect func

feedLine

func(s hall.Solve) string
Open
OID
054008…0cd1:132
feedLine details

Inspect func

podiumSize

untyped bigint

podiumSize is how many players a closing season decorates.

Value

(3 <untyped> bigint)

season

type

season 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
Open
OID
054008…0cd1:135
newSeason details

Inspect func

currentSeason

func() *hall.season
Open
OID
054008…0cd1:137
currentSeason details

Inspect func

OpenSeason

func(name string)

OpenSeason closes the current season, decorates its podium with season badges, and opens the next one under name.

Open
OID
054008…0cd1:138
OpenSeason details

Inspect func
renderAPI : func(res *v0.ResponseWriter, req *v0.Request) Inspect
challengesJSON : func() string Inspect
boardJSON : func(season int) string Inspect
feedJSON : func() string Inspect
solveJSON : func(s hall.Solve) string Inspect
seasonsJSON : func() string Inspect
playerJSON : func(who string) string Inspect
object : func(kv []string) string Inspect
array : func(items []string) string Inspect
quote : func(s string) string Inspect
badgeArt : untyped string ="https://akinbola247.github.io/cellar-ctf/badges/"
badges : *v0.Token Inspect
badgeMint : *v0.PrivateLedger Inspect
initBadges : func() Inspect
Badges : func() v0.Teller Inspect
BadgeURI : func(tid string) string Inspect
awardSolve : func(p *hall.profile, s hall.Solve) Inspect
awardSeason : func(addr .uverse.address, season int, rank int) Inspect
mint : func(p *hall.profile, tid string) Inspect
Solve : type =hall.Solve
Claim : func(slug string) int Inspect
pushFeed : func(s hall.Solve) Inspect
solvePoints : func(s hall.Solve) int Inspect
Status : type =hall.Status
Pending : hall.Status =<zero>
Listed : hall.Status =<zero>
Retired : hall.Status =<zero>
entry : type =hall.entry
Enlist : func(ch flag.Challenge) Inspect
Approve : func(slug string) Inspect
Retire : func(slug string) Inspect
getEntry : func(slug string) (*hall.entry, bool) Inspect
mustEntry : func(slug string) *hall.entry Inspect
eachEntry : func(fn func(...)) Inspect
ErrNotCurator : *errors.errorString Inspect
ErrBadAddress : *errors.errorString Inspect
ErrNotRealm : *errors.errorString Inspect
ErrNilChallenge : *errors.errorString Inspect
ErrAlreadyEnlisted : *errors.errorString Inspect
ErrSlugTaken : *errors.errorString Inspect
ErrUnknownChallenge : *errors.errorString Inspect
ErrNotListed : *errors.errorString Inspect
ErrNotPending : *errors.errorString Inspect
ErrAlreadyClaimed : *errors.errorString Inspect
ErrNotCaptured : *errors.errorString Inspect
ErrNotUser : *errors.errorString Inspect
ErrBadHandle : *errors.errorString Inspect
ErrHandleTaken : *errors.errorString Inspect
ErrBadSeasonName : *errors.errorString Inspect
officialPrefix : untyped string ="gno.land/r/g15c02s5hhdny9uvr9za3xsyn9sw8p0klptrh6kf/cellar/"
feedSize : untyped bigint =(50 <untyped> bigint)
curator : .uverse.address =<gnolang.StringValue>
selfPath : string ="/r/g15c02s5hhdny9uvr9za3xsyn9sw8p0klptrh6kf/cellar/hall"
entries : *v0.Tree Inspect
paths : *v0.Tree Inspect
order : []string (len=9) Inspect
players : *v0.Tree Inspect
handles : *v0.Tree Inspect
seasons : []*hall.season (len=1) Inspect
feed : []hall.Solve (len=18) Inspect
init.60 : func() Inspect
Curator : func() .uverse.address Inspect
TransferCuration : func(to .uverse.address) Inspect
assertCurator : func() Inspect
profile : type =hall.profile
profileOf : func(addr .uverse.address) *hall.profile Inspect
findProfile : func(addr .uverse.address) (*hall.profile, bool) Inspect
SetHandle : func(handle string) Inspect
validHandle : func(h string) bool Inspect
DisplayName : func(addr .uverse.address) string Inspect
resolvePlayer : func(who string) (.uverse.address, bool) Inspect
Standing : type =hall.Standing
standings : func(season int) []hall.Standing Inspect
byRank : type =hall.byRank
boardSize : untyped bigint =(10 <untyped> bigint)
router : *v0.Router Inspect
newRouter : func() *v0.Router Inspect
Render : func(path string) string Inspect
renderLobby : func(res *v0.ResponseWriter, *v0.Request) Inspect
renderChallenge : func(res *v0.ResponseWriter, req *v0.Request) Inspect
renderPlayer : func(res *v0.ResponseWriter, req *v0.Request) Inspect
renderBoard : func(res *v0.ResponseWriter, *v0.Request) Inspect
renderSeasons : func(res *v0.ResponseWriter, *v0.Request) Inspect
renderCommunity : func(res *v0.ResponseWriter, *v0.Request) Inspect
challengeTable : func(keep func(...)) string Inspect
boardTable : func(rows []hall.Standing, limit int) string Inspect
feedLine : func(s hall.Solve) string Inspect
podiumSize : untyped bigint =(3 <untyped> bigint)
season : type =hall.season
newSeason : func(n int, name string) *hall.season Inspect
currentSeason : func() *hall.season Inspect
OpenSeason : func(name string) Inspect