Skip to content Search Apps Documentation Source Content 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.

contest state

Back to all declarations

pkgPath

untyped string

Value

"gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/remixlab/contest"

appTitle

untyped string

Value

"Demo contest"

recipeID

untyped string

Value

"demo-contest"

recipeVersion

untyped string

Value

"1.0.0"

pageSize

untyped bigint

Value

(25 <untyped> bigint)

maxEntries

untyped bigint

Value

(10 <untyped> bigint)

maxElectorate

untyped bigint

Value

(100 <untyped> bigint)

titleIndex

untyped bigint

titleIndex is the form field shown as each entry's title.

Value

(0 <untyped> bigint)

opInvite

untyped string

Operation names checked against the policy.

Value

"members.invite"

opRemove

untyped string

Operation names checked against the policy.

Value

"members.remove"

opSetRole

untyped string

Operation names checked against the policy.

Value

"members.set_role"

opSubmit

untyped string

Operation names checked against the policy.

Value

"entry.submit"

opReview

untyped string

Operation names checked against the policy.

Value

"entry.review"

opOpen

untyped string

Operation names checked against the policy.

Value

"contest.open"

opPolicy

untyped string

Operation names checked against the policy.

Value

"policy.set"

ballotID

uint64

Value

0

ballotEntries

[]uint64

Value

<zero>

Submit

func(title string, link string, team string) uint64

Submit stores a contest entry for review and returns its ID. Every answer is public. Leave optional fields empty. - title: required text, at most 80 bytes - link: required text, at most 200 bytes - team: optional text, at most 120 bytes

Open
OID
0f5f43…fe6f:12
Submit details

Inspect func

Accept

func(id uint64)

Accept admits a submitted entry to the ballot. Decisions are final.

Open
OID
0f5f43…fe6f:13
Accept details

Inspect func

Reject

func(id uint64)

Reject declines a submitted entry. Decisions are final.

Open
OID
0f5f43…fe6f:14
Reject details

Inspect func

OpenVoting

func(durationSeconds int64)

OpenVoting closes submissions and review, turns the admitted entries into the ballot's options, captures the current members as the electorate and opens voting for durationSeconds.

Open
OID
0f5f43…fe6f:15
OpenVoting details

Inspect func

Vote

func(entryID uint64)

Vote casts the caller's vote for an admitted entry.

Open
OID
0f5f43…fe6f:16
Vote details

Inspect func

Finalize

func()

Finalize commits the result once the deadline has passed. Anyone may call it; the result depends only on rules frozen when voting opened.

Open
OID
0f5f43…fe6f:17
Finalize details

Inspect func

Invite

func(addr .uverse.address, role string)

Invite lets addr join with role. Inviting a reviewer or owner also requires the members.set\_role permission.

Open
OID
0f5f43…fe6f:18
Invite details

Inspect func

RevokeInvite

func(addr .uverse.address)

RevokeInvite cancels a pending invitation. Revoking an invitation for a reviewer or owner also requires the members.set\_role permission.

Open
OID
0f5f43…fe6f:19
RevokeInvite details

Inspect func

Join

func()

Join accepts the caller's pending invitation.

Open
OID
0f5f43…fe6f:20
Join details

Inspect func

Leave

func()

Leave removes the caller from the membership. An open vote keeps its frozen electorate.

Open
OID
0f5f43…fe6f:21
Leave details

Inspect func

RemoveMember

func(addr .uverse.address)

RemoveMember removes addr.

Open
OID
0f5f43…fe6f:22
RemoveMember details

Inspect func

SetRole

func(addr .uverse.address, role string)

SetRole changes addr's role.

Open
OID
0f5f43…fe6f:23
SetRole details

Inspect func

SetRule

func(op string, rule string)

SetRule changes the rule for an operation, within that operation's floor.

Open
OID
0f5f43…fe6f:24
SetRule details

Inspect func

Entry

func(id uint64) (v1.SubmissionView, bool)

Entry returns an inert copy of entry id in any status.

Open
OID
0f5f43…fe6f:25
Entry details

Inspect func

Entries

func() []v1.SubmissionView

Entries lists the admitted entries in submission order.

Open
OID
0f5f43…fe6f:26
Entries details

Inspect func

Queue

func(offset int, limit int) []v1.SubmissionView

Queue pages through entries awaiting review in submission order.

Open
OID
0f5f43…fe6f:27
Queue details

Inspect func

Fields

func() []v1.Field

Fields returns a copy of the form schema.

Open
OID
0f5f43…fe6f:28
Fields details

Inspect func

Ballot

func() (v1.BallotView, bool)

Ballot returns the contest ballot once voting has opened.

Open
OID
0f5f43…fe6f:29
Ballot details

Inspect func

BallotEntries

func() []uint64

BallotEntries returns the entry ID of each ballot option, in option order.

Open
OID
0f5f43…fe6f:30
BallotEntries details

Inspect func

Winner

func() (uint64, bool)

Winner returns the winning entry once the result is final and has a single winner.

Open
OID
0f5f43…fe6f:31
Winner details

Inspect func

HasVoted

func(addr .uverse.address) bool

HasVoted reports whether addr has voted.

Open
OID
0f5f43…fe6f:32
HasVoted details

Inspect func

Members

func(offset int, limit int) []v1.MemberView

Members pages through members ordered by address.

Open
OID
0f5f43…fe6f:33
Members details

Inspect func

Invites

func(offset int, limit int) []v1.MemberView

Invites returns up to limit pending invitations (at most 25) starting at offset, with the role each one grants.

Open
OID
0f5f43…fe6f:34
Invites details

Inspect func

RoleOf

func(addr .uverse.address) string

RoleOf returns addr's role name.

Open
OID
0f5f43…fe6f:35
RoleOf details

Inspect func

Rules

func() []v1.RuleView

Rules lists every operation's current rule.

Open
OID
0f5f43…fe6f:36
Rules details

Inspect func

authorize

func(op string) .uverse.address
Open
OID
0f5f43…fe6f:37
authorize details

Inspect func

mustBeOpenForEntries

func()
Open
OID
0f5f43…fe6f:38
mustBeOpenForEntries details

Inspect func

clampLimit

func(limit int) int
Open
OID
0f5f43…fe6f:40
clampLimit details

Inspect func

configDigest

untyped string

configDigest is the canonical digest of the project configuration that produced this realm.

Value

"sha256:3331f81eb7b7680d3f2131ae50dfbbcd0080a281fbc35f2c6523a810d0c08bd5"

Descriptor

func() v1.AppDescriptor

Descriptor identifies this app's recipe and components.

Open
OID
0f5f43…fe6f:42
Descriptor details

Inspect func

Render

func(path string) string

Render serves the native pages: overview (entries, ballot and result), a single entry, the review queue, members and rules.

Open
OID
0f5f43…fe6f:44
Render details

Inspect func

renderQueue

func(page int) string
Open
OID
0f5f43…fe6f:47
renderQueue details

Inspect func

renderEntry

func(id uint64) string
Open
OID
0f5f43…fe6f:48
renderEntry details

Inspect func

renderMembers

func(page int) string
Open
OID
0f5f43…fe6f:50
renderMembers details

Inspect func

resultLabel

func(v v1.BallotView) string
Open
OID
0f5f43…fe6f:52
resultLabel details

Inspect func
pkgPath : untyped string ="gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/remixlab/contest"
appTitle : untyped string ="Demo contest"
recipeID : untyped string ="demo-contest"
recipeVersion : untyped string ="1.0.0"
pageSize : untyped bigint =(25 <untyped> bigint)
maxEntries : untyped bigint =(10 <untyped> bigint)
maxElectorate : untyped bigint =(100 <untyped> bigint)
titleIndex : untyped bigint =(0 <untyped> bigint)
opInvite : untyped string ="members.invite"
opRemove : untyped string ="members.remove"
opSetRole : untyped string ="members.set_role"
opSubmit : untyped string ="entry.submit"
opReview : untyped string ="entry.review"
opOpen : untyped string ="contest.open"
opPolicy : untyped string ="policy.set"
members : *v1.Set Inspect
policy : *v1.Policy Inspect
entries : *v1.Form Inspect
ballot : *v1.Box Inspect
ballotID : uint64 =0
ballotEntries : []uint64 =<zero>
init.21 : func() Inspect
setup : func(owner .uverse.address) Inspect
Submit : func(title string, link string, team string) uint64 Inspect
Accept : func(id uint64) Inspect
Reject : func(id uint64) Inspect
OpenVoting : func(durationSeconds int64) Inspect
Vote : func(entryID uint64) Inspect
Finalize : func() Inspect
Invite : func(addr .uverse.address, role string) Inspect
RevokeInvite : func(addr .uverse.address) Inspect
Join : func() Inspect
Leave : func() Inspect
RemoveMember : func(addr .uverse.address) Inspect
SetRole : func(addr .uverse.address, role string) Inspect
SetRule : func(op string, rule string) Inspect
Entry : func(id uint64) (v1.SubmissionView, bool) Inspect
Entries : func() []v1.SubmissionView Inspect
Queue : func(offset int, limit int) []v1.SubmissionView Inspect
Fields : func() []v1.Field Inspect
Ballot : func() (v1.BallotView, bool) Inspect
BallotEntries : func() []uint64 Inspect
Winner : func() (uint64, bool) Inspect
HasVoted : func(addr .uverse.address) bool Inspect
Members : func(offset int, limit int) []v1.MemberView Inspect
Invites : func(offset int, limit int) []v1.MemberView Inspect
RoleOf : func(addr .uverse.address) string Inspect
Rules : func() []v1.RuleView Inspect
authorize : func(op string) .uverse.address Inspect
mustBeOpenForEntries : func() Inspect
ready : func() Inspect
clampLimit : func(limit int) int Inspect
must : func(err .uverse.error) Inspect
configDigest : untyped string ="sha256:3331f81eb7b7680d3f2131ae50dfbbcd0080a281fbc35f2c6523a810d0c08bd5"
Descriptor : func() v1.AppDescriptor Inspect
Render : func(path string) string Inspect
renderHome : func() string Inspect
renderQueue : func(page int) string Inspect
renderEntry : func(id uint64) string Inspect
renderMembers : func(page int) string Inspect
renderRules : func() string Inspect
resultLabel : func(v v1.BallotView) string Inspect
notFound : func() string Inspect