Realm

gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/ballot

Rendered output

Ballot

Not initialized yet. The first caller to run Init becomes the chairperson and seeds the proposal list, e.g.:

Init("Alice,Bob,Carol")

Query (read-only)

non-crossing functions · no tx, no wallet needed
WinnerName() → string
WinningProposal() → int

Call functions (state-changing)

signs a tx via Adena
Delegate(toAddr string)
GiveRightToVote(voterAddr string)
Init(proposalNamesCSV string)
Vote(proposalIndex int)

All exported functions (7)

show raw signatures
NameParamsReturns
Init [{"Name": "cur", "Type": "interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}", "Value": ""}, {"Name": "proposalNamesCSV", "Type": "string", "Value": ""}]
GiveRightToVote [{"Name": "cur", "Type": "interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}", "Value": ""}, {"Name": "voterAddr", "Type": "string", "Value": ""}]
Delegate [{"Name": "cur", "Type": "interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}", "Value": ""}, {"Name": "toAddr", "Type": "string", "Value": ""}]
Vote [{"Name": "cur", "Type": "interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}", "Value": ""}, {"Name": "proposalIndex", "Type": "int", "Value": ""}]
WinningProposal [{"Name": ".res.0", "Type": "int", "Value": ""}]
WinnerName [{"Name": ".res.0", "Type": "string", "Value": ""}]
Render [{"Name": "path", "Type": "string", "Value": ""}] [{"Name": ".res.0", "Type": "string", "Value": ""}]

Files

Storage

{
  "raw": "storage: 25434, deposit: 2543400"
}