Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

polls source realm

Package polls implements a single fixed-choice poll where each address may cast one vote.

Overview

Package polls implements a single fixed-choice poll where each address may cast one vote.

Functions 2

func Render

1func Render(path string) string
source

Render shows the poll question, options, and current vote tally.

func Vote

crossing Action
1func Vote(cur realm, i int)
source

Vote casts a vote for the option at index i. Each address may vote once. EOA-only — MsgRun callers are rejected.

Imports 2

Source Files 2