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

memba_gov package

Overview

Package memba_gov is the Memba DAO governance core. It holds the roster, proposals and votes, and grants nothing by itself: a governed realm asks for an approval by crossing-calling Consume before a privileged step, and the core checks that the caller is exactly the realm the proposal names, with exactly the arguments members voted on. The core never calls another realm.

Rules (design note GOV-1, approved 2026-10-06):

  • members propose, vote and execute by direct calls from their own account, and an invited key joins by its own direct call; only a governed realm's crossing call reaches Consume;
  • a key counts toward the roster only after it signed Join itself;
  • one action per proposal, stored by value; approvals are used once;
  • every executed roster action and every Join invalidates every open proposal, so votes always count against an unchanged roster;
  • Consume invalidates the other open proposals of its (target, scope).

Functions

ConstantsJSON

func ConstantsJSON() string

ConstantsJSON returns the fixed policy: durations in seconds, roster bounds.

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/samcrew/memba_gov.ConstantsJSON()"

Result

Consume

func Consume(cur realm, pid uint64, action, args, scope string, minClass int, executor address)

Consume is crossing-called by a governed realm right before the step a proposal approved. It panics unless the caller is exactly the proposal's target, the action, arguments and scope are the voted ones byte for byte, the class is at least minClass, the proposal is ready, and executor, the account that called the target directly, is a seated member. It marks the proposal used and invalidates the other open proposals of (target, scope).

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/samcrew/memba_gov" -func "Consume" -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "https://rpc.gno.land" ADDRESSgnokey query -remote "https://rpc.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/samcrew/memba_gov" -func "Consume" -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx
  

Execute

func Execute(cur realm, pid uint64)

Execute runs a ready roster action of this realm. The roster it was checked against at Propose is unchanged: any change would have invalidated it.

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/samcrew/memba_gov" -func "Execute" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "https://rpc.gno.land" ADDRESSgnokey query -remote "https://rpc.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/samcrew/memba_gov" -func "Execute" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx
  

IsMember

func IsMember(addr address) bool

IsMember reports whether addr is a seated member's current key.

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/samcrew/memba_gov.IsMember()"

Result

Join

func Join(cur realm)

Join seats the caller's invitation: a new person, or a recovered key.

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/samcrew/memba_gov" -func "Join" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "https://rpc.gno.land" ADDRESSgnokey query -remote "https://rpc.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/samcrew/memba_gov" -func "Join" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx
  

PersonOf

func PersonOf(addr address) string

PersonOf returns the id of the seated member whose current key is addr, or "". The id survives a key recovery.

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/samcrew/memba_gov.PersonOf()"

Result

ProposalJSON

func ProposalJSON(pid uint64) string

ProposalJSON returns one proposal with its ballots and current status, or null for an unknown id.

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/samcrew/memba_gov.ProposalJSON()"

Result

ProposalsJSON

func ProposalsJSON(before uint64, limit int) string

ProposalsJSON lists up to limit proposals (at most MaxListed) with ids below before, newest first; before = 0 starts from the newest.

Params

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/samcrew/memba_gov.ProposalsJSON(,)"

Result

Propose

func Propose(cur realm, target, action, args, scope string, class int, note string) uint64

Propose files one action. target is the realm that will consume it, or this realm for a roster action; scope is the invalidation key that realm computes for the action; class is at least the class it requires.

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/samcrew/memba_gov" -func "Propose" -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "https://rpc.gno.land" ADDRESSgnokey query -remote "https://rpc.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/samcrew/memba_gov" -func "Propose" -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx
  

Render

func Render(_ string) string

Render shows the roster and the latest proposals. Each proposal's line holds only fields the realm sets (id, status, class, proposer id); every value a proposer wrote follows as its own labelled, escaped item, so none can forge a field.

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/samcrew/memba_gov.Render()"

Result

RosterJSON

func RosterJSON() string

RosterJSON lists seated members and open invitations.

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/samcrew/memba_gov.RosterJSON()"

Result

Vote

func Vote(cur realm, pid uint64, choice string)

Vote records yes, no or abstain until the voting deadline. After it, a YES can still be withdrawn while the proposal is not executed or expired, so members can stop an approval they no longer back.

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/samcrew/memba_gov" -func "Vote" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "https://rpc.gno.land" ADDRESSgnokey query -remote "https://rpc.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/samcrew/memba_gov" -func "Vote" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx