Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

treasury/v0 package

Functions

Address

func Address(bankerID string) string
Ask AI Claude ChatGPT

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

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/gov/dao/treasury/v0.Address()"

Result

Balances

func Balances(bankerID string) []t.Balance
Ask AI Claude ChatGPT

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

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/gov/dao/treasury/v0.Balances()"

Result

HasBanker

func HasBanker(bankerID string) bool
Ask AI Claude ChatGPT

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

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/gov/dao/treasury/v0.HasBanker()"

Result

History

func History(bankerID string, pageNumber int, pageSize int) []t.Payment
Ask AI Claude ChatGPT

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.gno.land" -data "gno.land/r/gov/dao/treasury/v0.History(,,)"

Result

ListBankerIDs

func ListBankerIDs() []string
Ask AI Claude ChatGPT

ListBankerIDs returns a list of all registered banker IDs.

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/gov/dao/treasury/v0.ListBankerIDs()"

Result

Render

func Render(path string) string
Ask AI Claude ChatGPT

Param

Command

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

Result

Send

func Send(cur realm, payment t.Payment)
Ask AI Claude ChatGPT

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/treasury/v0" -func "Send" -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/gov/dao/treasury/v0" -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 "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx
  

SetTokenKeys

func SetTokenKeys(cur realm, keys []string)
Ask AI Claude ChatGPT

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/treasury/v0" -func "SetTokenKeys" -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/gov/dao/treasury/v0" -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 "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx