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

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

bubbletreasury package

Overview

The BUBBLE treasury: where the pools' royalty lands, and the one power that moves it.

Bubble Rumble's pools (v5 on) send 5 % of every boop to an address that belongs to the BUBBLE token realm and to nobody else: the token's SUB-realm for the kind published here, `treasury:spend`. A sub-realm is a distinct package path (`…/bubble#treasury-spend`) with its own address; it can hold and send coins and can never issue tokens. The token's governor hands exactly that sub-realm to this kind's Do when the holders have decided a spend, and to nothing else — so the only way a coin leaves the treasury is a proposal under `treasury:spend`, adopted by the holders (govern:adopt) and passed on the token's own money terms: a fifth of the supply turning out, two thirds yes, a week to vote, two days' delay.

This realm holds no coins and no power of its own. It publishes the kind (Offer, at its deploy), says where the treasury is (Address), how much it holds (Balance) and renders the terms. The kind's Do runs inside the token realm and crosses back here with the sub-realm's own token to note each spend (noteSpend: the pace lives here); nothing else writes here, and what was spent is also on the chain (the TreasurySpend event).

Functions

Balance

func Balance() int64
Ask AI Claude ChatGPT

Balance is what the treasury holds right now, in ugnot.

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/bubbletreasury.Balance()"

Result

MaxNow

func MaxNow() int64
Ask AI Claude ChatGPT

MaxNow is the most one proposal may move right now, in whole GNOT: the cap for a balance.

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/bubbletreasury.MaxNow()"

Result

Offer

func Offer(cur realm)
Ask AI Claude ChatGPT

Offer is the same publication for a realm loaded without its init having run it (a test harness): it does nothing once the token's governor knows the name. The holders still have to adopt the kind by vote before a spend can be proposed.

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/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/bubbletreasury" -func "Offer" -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/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/bubbletreasury" -func "Offer" -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
  

Offered

func Offered() bool
Ask AI Claude ChatGPT

Offered is whether the kind has been published to the token's governor.

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/bubbletreasury.Offered()"

Result

Preview

func Preview(payload string) string
Ask AI Claude ChatGPT

Preview is what a proposal with this payload would say, and whether it could open now.

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/bubbletreasury.Preview()"

Result

Render

func Render(path string) string
Ask AI Claude ChatGPT

Render: the treasury for a reader — where, how much, and how it moves.

Param

Command

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

Result

Spends

func Spends() int64
Ask AI Claude ChatGPT

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/bubbletreasury.Spends()"

Result

Spent

func Spent() int64
Ask AI Claude ChatGPT

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/bubbletreasury.Spent()"

Result

SpentAt

func SpentAt() int64
Ask AI Claude ChatGPT

SpentAt is the height of the last spend; Spends and Spent, the count and the sum — the realm's own log.

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/bubbletreasury.SpentAt()"

Result

WindowLeft

func WindowLeft() int64
Ask AI Claude ChatGPT

WindowLeft is what may still move before the window closes, in ugnot — the whole cap for a window not open.

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/bubbletreasury.WindowLeft()"

Result