polls package

Functions

DetailPollPageHandler

func DetailPollPageHandler(res *mux.ResponseWriter, req *mux.Request)

Params

Command

gnokey query -remote "tcp://0.0.0.0:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/zenao/polls" -func "DetailPollPageHandler"  -args "" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "zenao-dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "tcp://0.0.0.0:26657" call.tx

GetInfo

func GetInfo(pollID uint64, user string) *pollsv1.Poll

Params

Command

gnokey query -remote "tcp://0.0.0.0:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/zenao/polls" -func "GetInfo"  -args "" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "zenao-dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "tcp://0.0.0.0:26657" call.tx

PollsPageHandler

func PollsPageHandler(res *mux.ResponseWriter, req *mux.Request)

Params

Command

gnokey query -remote "tcp://0.0.0.0:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/zenao/polls" -func "PollsPageHandler"  -args "" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "zenao-dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "tcp://0.0.0.0:26657" call.tx

Render

func Render(path string) string

Param

Command

gnokey query -remote "tcp://0.0.0.0:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/zenao/polls" -func "Render"  -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "zenao-dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "tcp://0.0.0.0:26657" call.tx

Vote

func Vote(cur realm, pollID uint64, option string)

Params

Command

gnokey query -remote "tcp://0.0.0.0:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/zenao/polls" -func "Vote"  -args "" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "zenao-dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "tcp://0.0.0.0:26657" call.tx

NewPoll

func NewPoll(_ realm, question string, kind pollsv1.PollKind, duration int64, options []string, authFunc AuthFn) *Poll

Params

Command

gnokey query -remote "tcp://0.0.0.0:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/zenao/polls" -func "NewPoll"  -args "" -args "" -args "" -args "" -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "zenao-dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "tcp://0.0.0.0:26657" call.tx