Search Apps Documentation Source Content File Folder Download Copy Actions Download

treasury package

Functions

Address

func Address(bankerID string) string

Address returns the address of the banker with the given ID.

Param

Command

gnokey query vm/qeval -remote "https://api.gno.berty.io:443" -data "gno.land/r/gov/dao/v3/treasury.Address()"

Result

Balances

func Balances(bankerID string) []t.Balance

Balances returns the balances of the banker with the given ID.

Param

Command

gnokey query vm/qeval -remote "https://api.gno.berty.io:443" -data "gno.land/r/gov/dao/v3/treasury.Balances()"

Result

HasBanker

func HasBanker(bankerID string) bool

HasBanker checks if a banker with the given ID is registered.

Param

Command

gnokey query vm/qeval -remote "https://api.gno.berty.io:443" -data "gno.land/r/gov/dao/v3/treasury.HasBanker()"

Result

History

func History(bankerID string, pageNumber int, pageSize int) []t.Payment

History returns the payment history sent by the banker with the given ID. Payments are paginated, with the most recent payments first.

Params

Command

gnokey query vm/qeval -remote "https://api.gno.berty.io:443" -data "gno.land/r/gov/dao/v3/treasury.History(,,)"

Result

ListBankerIDs

func ListBankerIDs() []string

ListBankerIDs returns a list of all registered banker IDs.

Command

gnokey query vm/qeval -remote "https://api.gno.berty.io:443" -data "gno.land/r/gov/dao/v3/treasury.ListBankerIDs()"

Result

Render

func Render(path string) string

Param

Command

gnokey query vm/qeval -remote "https://api.gno.berty.io:443" -data "gno.land/r/gov/dao/v3/treasury.Render()"

Result

Send

func Send(_ realm, payment t.Payment)

Send sends a payment using the treasury instance.

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/gov/dao/v3/treasury" -func "Send" -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/gov/dao/v3/treasury" -func "Send" -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
  

SetTokenKeys

func SetTokenKeys(_ realm, keys []string)

SetTokenKeys sets the GRC20 token registry keys that the treasury will use.

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/gov/dao/v3/treasury" -func "SetTokenKeys" -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/gov/dao/v3/treasury" -func "SetTokenKeys" -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