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

/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://rpc.topaz.testnets.gno.land" -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://rpc.topaz.testnets.gno.land" -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://rpc.topaz.testnets.gno.land" -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://rpc.topaz.testnets.gno.land" -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://rpc.topaz.testnets.gno.land" -data "gno.land/r/gov/dao/v3/treasury.ListBankerIDs()"

Result

Render

func Render(path string) string

Param

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/gov/dao/v3/treasury.Render()"

Result

Send

func Send(cur 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 "topaz-1" -remote "https://rpc.topaz.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.topaz.testnets.gno.land" 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 "topaz-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.topaz.testnets.gno.land" call.tx
  

SetTokenKeys

func SetTokenKeys(cur 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 "topaz-1" -remote "https://rpc.topaz.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.topaz.testnets.gno.land" 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 "topaz-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.topaz.testnets.gno.land" call.tx