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

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).

Function

Offer

func Offer(cur realm)

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