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

commondao/v0 package

Overview

v0 - Unaudited: This is an initial version that has not yet been formally audited. A fully audited version will be published as a subsequent release. Use in production at your own risk.

Package commondao provides a reference realm implementation of the gno.land/p/nt/commondao/v0 package for managing Decentralized Autonomous Organizations per the Common DAO Spec: DAO and sub-DAO trees with councils and charters, a governable registry of proposal kinds (ten defaults plus an opt-in arbitrary-execution kind), per-DAO treasuries on derived sub-identity addresses with ancestor clawback/freeze powers, and bylaws documents amended by verifiable diff patches. See README.md and the ADRs under gno.land/adr/ for the design record.

Functions

AmendBylawsPayload

func AmendBylawsPayload(daoID uint64, path, proposed string) string

AmendBylawsPayload builds the CreateAmendBylawsProposal payload that changes a DAO's document at path to the proposed text: a new path adds a document, empty proposed text removes one. It diffs against the document's current text and pins its hash, so build the payload fresh (e.g. through a vm/qeval query) and propose promptly — a payload built against superseded text is rejected. Read-only.

Params

Command

gnokey query vm/qeval -remote "https://api.gno.berty.io:443" -data "gno.land/r/nt/commondao/v0.AmendBylawsPayload(,,)"

Result

CreateAmendBylawsProposal

func CreateAmendBylawsProposal(cur realm, daoID uint64, payload string) uint64

CreateAmendBylawsProposal creates a proposal to add, amend or remove one of the DAO's bylaws documents with a verifiable diff patch (see gno.land/p/nt/bylaws/v0). The mandates/ folder is reserved: the Constitution grants a council self-power over its Bylaws only, so mandates change from above (creation or an ancestor's amendment — not implemented yet), never through this proposal. The payload is an encoded patch — build it with AmendBylawsPayload (e.g. through a vm/qeval query) or with bylaws.Diff(...).Encode() from a realm. The patch pins the sha256 of the document text it was diffed against, so an amendment racing a concurrent change to the same document fails cleanly instead of clobbering it; a patch already stale at creation is rejected here. Amendments are decided by supermajority — the default council rule; the Constitution names no special threshold for a council amending its own documents.

Parameters: - daoID: ID of the DAO (required) - payload: encoded bylaws patch (required)

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/nt/commondao/v0" -func "CreateAmendBylawsProposal" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "dev" -remote "https://api.gno.berty.io:443" ADDRESSgnokey query -remote "https://api.gno.berty.io:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nt/commondao/v0" -func "CreateAmendBylawsProposal" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://api.gno.berty.io:443" call.tx
  

CreateAncestorCouncilUpdateProposal

func CreateAncestorCouncilUpdateProposal(cur realm, daoID, targetID uint64, newMembers, removeMembers string) uint64

CreateAncestorCouncilUpdateProposal creates a proposal for an ancestor DAO to add and/or remove members of a descendant's council (docs/CONSTITUTION.md :1531-1532) — the rescue path for a stuck or empty descendant council. It is hosted and voted in the ancestor (daoID) and decided by supermajority; the proposing DAO must be a proper ancestor of the target, verified at proposal validation.

Parameters: - daoID: ID of the proposing ancestor DAO (required) - targetID: ID of the descendant DAO whose council changes (required) - newMembers: Newline separated list of addresses to add to the council - removeMembers: Newline separated list of council addresses to remove

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/nt/commondao/v0" -func "CreateAncestorCouncilUpdateProposal" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "dev" -remote "https://api.gno.berty.io:443" ADDRESSgnokey query -remote "https://api.gno.berty.io:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nt/commondao/v0" -func "CreateAncestorCouncilUpdateProposal" -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 "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://api.gno.berty.io:443" call.tx
  

CreateCouncilUpdateProposal

func CreateCouncilUpdateProposal(cur realm, daoID uint64, newMembers, removeMembers string) uint64

CreateCouncilUpdateProposal creates a new proposal to add and/or remove council members.

Parameters: - daoID: ID of the DAO (required) - newMembers: Newline separated list of addresses to add to the council - removeMembers: Newline separated list of council addresses to remove

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/nt/commondao/v0" -func "CreateCouncilUpdateProposal" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "dev" -remote "https://api.gno.berty.io:443" ADDRESSgnokey query -remote "https://api.gno.berty.io:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nt/commondao/v0" -func "CreateCouncilUpdateProposal" -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 "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://api.gno.berty.io:443" call.tx
  

CreateDeregisterKindProposal

func CreateDeregisterKindProposal(cur realm, daoID uint64, kindName string) uint64

CreateDeregisterKindProposal creates a proposal to deregister a proposal kind from a DAO by name, through the permanent manage-kinds kind.

The proposal is hosted and voted in the DAO itself and decided by supermajority; on approval the kind is deregistered, which blocks new proposals of that kind while in-flight ones still vote and execute. The manage-kinds kind itself cannot be deregistered, so a DAO always keeps the ability to manage its kind set (and to re-register a catalog kind by name).

Parameters: - daoID: ID of the DAO (required) - kindName: name of the proposal kind to deregister (required)

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/nt/commondao/v0" -func "CreateDeregisterKindProposal" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "dev" -remote "https://api.gno.berty.io:443" ADDRESSgnokey query -remote "https://api.gno.berty.io:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nt/commondao/v0" -func "CreateDeregisterKindProposal" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://api.gno.berty.io:443" call.tx
  

CreateDissolutionProposal

func CreateDissolutionProposal(cur realm, daoID uint64, destination address) uint64

CreateDissolutionProposal creates a new proposal to dissolve a DAO or SubDAO.

SubDAOs can only be dissolved by the parent DAO, which owns and controls its sub-DAOs (docs/CONSTITUTION.md :1507). When the parent is itself already dissolved, the proposal is hosted in the nearest non-dissolved ancestor, so orphans below a dissolved middle DAO remain dissolvable.

Dissolution sweeps any remaining treasury balance. A sub-DAO's sweep goes to its parent and destination must be empty; a root DAO has no parent, so a valid destination address is required.

Parameters: - daoID: ID of the DAO to dissolve (required) - destination: sweep destination, root DAOs only

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/nt/commondao/v0" -func "CreateDissolutionProposal" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "dev" -remote "https://api.gno.berty.io:443" ADDRESSgnokey query -remote "https://api.gno.berty.io:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nt/commondao/v0" -func "CreateDissolutionProposal" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://api.gno.berty.io:443" call.tx
  

CreateExecutionProposal

func CreateExecutionProposal(cur realm, daoID uint64, title, body string, fn commondao.ExecFunc) uint64

CreateExecutionProposal creates a proposal that runs an arbitrary ExecFunc as the DAO's own sub on approval, through the realm's execution kind.

The execution kind is opt-in: it is not seeded on new DAOs and must be registered first through a supermajority CreateRegisterKindProposal.

Freeze policy: an execution proposal moves value under the DAO's own authority, so it is subject to the treasury freeze exactly like a spend. This wrapper fails fast when the treasury is already frozen, and the definition re-checks at Execute (so a freeze landing after the proposal passed fails it cleanly, StatusFailed, no funds leaving). An ancestor's clawback/dissolution is a separate power and is not blocked by freeze.

Sharp edges (known limitations):

  • The fn closure cannot be encoded in a CLI transaction, so this wrapper is reachable only from a PERSISTENT realm that imports this one and is a council member of the DAO (a realm-in-council). The closure must be authored in that realm so it survives Propose→Execute; a `maketx run` script's closure does not persist and cannot execute later.
  • A closure that panics or runs out of gas aborts the whole Execute tx, so the proposal is stuck Active (every retry re-aborts) and can never finalize. The only recovery is dissolving the DAO (Dissolve dismisses in-flight proposals). Author closures that return an error instead of panicking so a bad execution fails cleanly (StatusFailed) and releases.

Parameters: - daoID: ID of the DAO (required) - title: proposal title (raw text, escaped when rendered) - body: proposal body (raw text, escaped when rendered) - fn: the closure executed on approval (required, non-nil)

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/nt/commondao/v0" -func "CreateExecutionProposal" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "dev" -remote "https://api.gno.berty.io:443" ADDRESSgnokey query -remote "https://api.gno.berty.io:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nt/commondao/v0" -func "CreateExecutionProposal" -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 "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://api.gno.berty.io:443" call.tx
  

CreateRegisterKindProposal

func CreateRegisterKindProposal(cur realm, daoID uint64, kindName string) uint64

CreateRegisterKindProposal creates a proposal to register one of the realm's catalog proposal kinds on a DAO by name, through the permanent manage-kinds kind (e.g. register "execution").

The proposal is hosted and voted in the DAO itself and decided by supermajority; on approval the named catalog kind is registered, so new proposals of that kind can be created. The manage-kinds kind is seeded on every DAO, so this path is always available.

Parameters: - daoID: ID of the DAO (required) - kindName: name of the catalog proposal kind to register (required)

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/nt/commondao/v0" -func "CreateRegisterKindProposal" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "dev" -remote "https://api.gno.berty.io:443" ADDRESSgnokey query -remote "https://api.gno.berty.io:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nt/commondao/v0" -func "CreateRegisterKindProposal" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://api.gno.berty.io:443" call.tx
  

CreateSubDAOProposal

func CreateSubDAOProposal(cur realm, daoID uint64, name, purpose, description, members string) uint64

CreateSubDAOProposal creates a new proposal to create a new SubDAO.

Parameters: - daoID: ID of the parent DAO (required) - name: A name for the SubDAO (required) - purpose: A purpose for the SubDAO (required) - description: A description for the SubDAO - members: Newline separated list of initial SubDAO council addresses (required)

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/nt/commondao/v0" -func "CreateSubDAOProposal" -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "dev" -remote "https://api.gno.berty.io:443" ADDRESSgnokey query -remote "https://api.gno.berty.io:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nt/commondao/v0" -func "CreateSubDAOProposal" -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 "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://api.gno.berty.io:443" call.tx
  

CreateTextProposal

func CreateTextProposal(cur realm, daoID uint64, title, body string, votingDays uint8) uint64

CreateTextProposal creates a new general text proposal.

Parameters: - daoID: ID of the DAO (required) - title: Title of the proposal (required) - body: Body of the proposal (required) - votingDays: The number of days where proposal accepts votes.

The default voting period is 7 days.

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/nt/commondao/v0" -func "CreateTextProposal" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "dev" -remote "https://api.gno.berty.io:443" ADDRESSgnokey query -remote "https://api.gno.berty.io:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nt/commondao/v0" -func "CreateTextProposal" -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 "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://api.gno.berty.io:443" call.tx
  

CreateTreasuryClawbackProposal

func CreateTreasuryClawbackProposal(cur realm, daoID, targetID uint64) uint64

CreateTreasuryClawbackProposal creates a new proposal for an ancestor DAO to sweep a descendant DAO's full treasury balance to the target's parent (docs/CONSTITUTION.md :1507). The proposing DAO must be a proper ancestor of the target; a target's own options can never block an ancestor's clawback.

Parameters: - daoID: ID of the proposing ancestor DAO (required) - targetID: ID of the descendant DAO to claw back (required)

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/nt/commondao/v0" -func "CreateTreasuryClawbackProposal" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "dev" -remote "https://api.gno.berty.io:443" ADDRESSgnokey query -remote "https://api.gno.berty.io:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nt/commondao/v0" -func "CreateTreasuryClawbackProposal" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://api.gno.berty.io:443" call.tx
  

CreateTreasuryFreezeProposal

func CreateTreasuryFreezeProposal(cur realm, daoID, targetID uint64, frozen bool) uint64

CreateTreasuryFreezeProposal creates a new proposal for an ancestor DAO to freeze or unfreeze a descendant DAO's treasury. While frozen, no treasury spend can execute. Only a proper ancestor can unfreeze — the frozen DAO's own council cannot.

Parameters: - daoID: ID of the proposing ancestor DAO (required) - targetID: ID of the descendant DAO to freeze or unfreeze (required) - frozen: true to freeze the target's treasury, false to unfreeze

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/nt/commondao/v0" -func "CreateTreasuryFreezeProposal" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "dev" -remote "https://api.gno.berty.io:443" ADDRESSgnokey query -remote "https://api.gno.berty.io:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nt/commondao/v0" -func "CreateTreasuryFreezeProposal" -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 "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://api.gno.berty.io:443" call.tx
  

CreateTreasurySpendProposal

func CreateTreasurySpendProposal(cur realm, daoID uint64, to address, denom string, amount int64) uint64

CreateTreasurySpendProposal creates a new proposal to send coins from the DAO's own treasury (docs/CONSTITUTION.md :1542-1543).

Parameters: - daoID: ID of the DAO whose treasury is spent (required) - to: recipient address (required) - denom: coin denomination, e.g. "ugnot" (required) - amount: coin amount, must be positive (required)

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/nt/commondao/v0" -func "CreateTreasurySpendProposal" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "dev" -remote "https://api.gno.berty.io:443" ADDRESSgnokey query -remote "https://api.gno.berty.io:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nt/commondao/v0" -func "CreateTreasurySpendProposal" -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 "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://api.gno.berty.io:443" call.tx
  

Execute

func Execute(cur realm, daoID, proposalID uint64)

Execute executes a DAO proposal.

Executing a proposal that passed early (decided by the default Council rules before its voting deadline) requires the caller to be a council member. Once the voting deadline has passed execution is permissionless: the tally is deterministic, so anyone can finalize the proposal.

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/nt/commondao/v0" -func "Execute" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "dev" -remote "https://api.gno.berty.io:443" ADDRESSgnokey query -remote "https://api.gno.berty.io:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nt/commondao/v0" -func "Execute" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://api.gno.berty.io:443" call.tx
  

GetBylawsDoc

func GetBylawsDoc(daoID uint64, path string) string

GetBylawsDoc returns the text of a DAO's bylaws/mandates document, or an empty string when the document does not exist (a stored document is never empty).

Params

Command

gnokey query vm/qeval -remote "https://api.gno.berty.io:443" -data "gno.land/r/nt/commondao/v0.GetBylawsDoc(,)"

Result

GetView

func GetView(daoID uint64) commondao.ReadonlyCommonDAO

GetView returns a read only view of a common DAO searched by ID.

Param

Command

gnokey query vm/qeval -remote "https://api.gno.berty.io:443" -data "gno.land/r/nt/commondao/v0.GetView()"

Result

HasProposalKind

func HasProposalKind(daoID uint64, name string) bool

HasProposalKind reports whether a proposal kind is registered on a DAO.

Params

Command

gnokey query vm/qeval -remote "https://api.gno.berty.io:443" -data "gno.land/r/nt/commondao/v0.HasProposalKind(,)"

Result

Invite

func Invite(cur realm, invitee address)

Invite invites a user to the realm. A user invitation is required to start creating new DAOs.

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/nt/commondao/v0" -func "Invite" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "dev" -remote "https://api.gno.berty.io:443" ADDRESSgnokey query -remote "https://api.gno.berty.io:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nt/commondao/v0" -func "Invite" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://api.gno.berty.io:443" call.tx
  

IsInvited

func IsInvited(addr address) bool

IsInvited checks if an address has an invitation to the realm.

Param

Command

gnokey query vm/qeval -remote "https://api.gno.berty.io:443" -data "gno.land/r/nt/commondao/v0.IsInvited()"

Result

IsListed

func IsListed(daoID uint64) bool

IsListed reports whether a DAO appears in the realm's public home index.

Param

Command

gnokey query vm/qeval -remote "https://api.gno.berty.io:443" -data "gno.land/r/nt/commondao/v0.IsListed()"

Result

ListBylawsDocs

func ListBylawsDocs(daoID uint64, prefix string) []string

ListBylawsDocs returns the sorted paths of a DAO's bylaws/mandates documents under a prefix (empty prefix lists all).

Params

Command

gnokey query vm/qeval -remote "https://api.gno.berty.io:443" -data "gno.land/r/nt/commondao/v0.ListBylawsDocs(,)"

Result

New

func New(cur realm, name, purpose, description, members string) uint64

New creates a new CommonDAO and returns its ID. The caller must be a user, not a realm (see assertCallerIsUser), and must hold an invite. The invite is consumed when that caller creates a DAO for the first time, after which the caller may create further DAOs freely. The caller becomes a council member along with any additional member addresses listed on separate lines; those may be realm addresses, so a DAO can be handed to a realm by seating it here and resigning. DAOs with a parent are created through proposals (see CreateSubDAOProposal).

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/nt/commondao/v0" -func "New" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "dev" -remote "https://api.gno.berty.io:443" ADDRESSgnokey query -remote "https://api.gno.berty.io:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nt/commondao/v0" -func "New" -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 "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://api.gno.berty.io:443" call.tx
  

Render

func Render(path string) string

Param

Command

gnokey query vm/qeval -remote "https://api.gno.berty.io:443" -data "gno.land/r/nt/commondao/v0.Render()"

Result

Resign

func Resign(cur realm, daoID uint64)

Resign removes the caller from a DAO council. The last remaining council member cannot resign.

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/nt/commondao/v0" -func "Resign" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "dev" -remote "https://api.gno.berty.io:443" ADDRESSgnokey query -remote "https://api.gno.berty.io:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nt/commondao/v0" -func "Resign" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://api.gno.berty.io:443" call.tx
  

SetListed

func SetListed(cur realm, daoID uint64, listed bool)

SetListed adds or removes a DAO from the realm's public home index. Listing is cosmetic — it affects only how this realm presents the DAO in its own UI — so any single council member of the DAO may toggle it, like Resign. It defaults to off.

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/nt/commondao/v0" -func "SetListed" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "dev" -remote "https://api.gno.berty.io:443" ADDRESSgnokey query -remote "https://api.gno.berty.io:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nt/commondao/v0" -func "SetListed" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://api.gno.berty.io:443" call.tx
  

Vote

func Vote(cur realm, daoID, proposalID uint64, vote commondao.VoteChoice, reason string)

Vote submits a vote for a DAO proposal. Voting is allowed to the members of the proposal's electorate: the council snapshot taken when the proposal was created.

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/nt/commondao/v0" -func "Vote" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "dev" -remote "https://api.gno.berty.io:443" ADDRESSgnokey query -remote "https://api.gno.berty.io:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nt/commondao/v0" -func "Vote" -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 "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://api.gno.berty.io:443" call.tx
  

Withdraw

func Withdraw(cur realm, daoID, proposalID uint64)

Withdraw withdraws an active DAO proposal that has no votes. Only the proposal creator can withdraw it.

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/nt/commondao/v0" -func "Withdraw" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "dev" -remote "https://api.gno.berty.io:443" ADDRESSgnokey query -remote "https://api.gno.berty.io:443" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nt/commondao/v0" -func "Withdraw" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://api.gno.berty.io:443" call.tx