PathrockNetwork Gno Explorer
HomeBlocksTransactionsTokensRealmsPackagesValidatorsAnalytics

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/r/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/bubble

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
bubble
Namespace
g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr
Files
7 (gnomod.toml)
Exported functions
54
Module
gno.land/r/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/bubble
gno
0.9

Files (7)

  • gnomod.tomltoml
  • admin.gnogno
  • govern.gnogno
  • kinds.gnogno
  • mint.gnogno
  • render.gnogno
  • token.gnogno
token.gnogno
1// Package bubble is BUBBLE, the Bubble Rumble token: a GRC20 that remembers voting power (kourt's grc20votes),2// minted by the box for referrals under hard caps, and governed by kourt's governor on the same ledger.3//4// What is fixed here and what is not. The identity, the decimals, the max supply, the premine and the split5// between the referral pool and the reserve are constants: a realm cannot be redeployed at its path, so a number6// that must never move is a constant, not a setting. Who administers, who mints, whether minting is paused and7

Functions

  • Admin() string

  • Allowance(owner string, spender string) int64

  • Approve(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, spender string, amount int64)

  • BalanceOf(owner string) int64

  • Batches() int64

  • Burn(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, amount int64)

  • Cancel(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, id int64)

  • DayCap() int64

  • Delegate(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, to string)

  • DelegateOf(who string) string

  • Describe(id int64) string

  • Epoch() uint32

  • Execute(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, id int64)

  • GetDecimals() int

  • GetName() string

  • GetSymbol() string

  • HasVoted(id int64, who string) bool

  • KindRules(name string) (struct{QuorumBps int64; ThresholdBps int64; ProposeBps int64; VotingBlocks int64; DelayBlocks int64; GraceBlocks int64}, bool)

  • LastBatch() string

  • MeanTurnout() int64

  • Mint(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, to string, amount int64)

  • MintedToday() (minted int64, ceiling int64)

  • Minter() string

  • MintMany(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, batchID string, list string)

  • NewRules(quorumBps int64, thresholdBps int64, votingBlocks int64, delayBlocks int64, graceBlocks int64, proposeBps int64) struct{QuorumBps int64; ThresholdBps int64; ProposeBps int64; VotingBlocks int64; DelayBlocks int64; GraceBlocks int64}

  • Offer(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, k interface {Check func(string) .uverse.error; Describe func(string) string; Do func(int, .uverse.realm, string) .uverse.error; Name func() string}, r struct{QuorumBps int64; ThresholdBps int64; ProposeBps int64; VotingBlocks int64; DelayBlocks int64; GraceBlocks int64})

  • PastTotalVotes(at uint32) int64

  • PastVotes(who string, at uint32) int64

  • Paused() bool

  • Premined() int64

  • Preview(kind string, payload string) string

  • Propose(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, kind string, payload string, title string) int64

  • ReferralMinted() int64

  • ReleaseRoll(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, id int64)

  • Render(path string) string

  • RenounceAdmin(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string})

  • ReserveMinted() int64

  • SetAdmin(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, to string)

  • SetDayCap(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, n int64)

  • SetMinter(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, to string)

  • SetPaused(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, on bool)

  • Settle(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, id int64)

  • State(id int64) string

  • Sweep(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string})

  • Tally(id int64) (yes int64, no int64, abstain int64, total int64)

  • TextOnly(s string) interface {Error func() string}

  • Timings(id int64) (opened int64, closes int64, ready int64, expires int64)

  • TotalSupply() int64

  • Transfer(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, to string, amount int64)

  • TransferFrom(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, from string, to string, amount int64)

  • Vote(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, id int64, choice string)

  • VoteOf(id int64, who string) (choice string, weight int64, ok bool)

  • VotesOf(who string) int64

  • VoteWithReason(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, id int64, choice string, reason string)

Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.

Rendered

RenderedRawgnoweb ↗
// how much may be minted a day are settings — the admin's until the holders vote them away (kinds.gno).
8//
9// The box (presence/bubble.go) decides which referral earns what; this realm only enforces the walls: the
10// supply, the pools, the daily ceiling, the batch shape. See growth/BUBBLE.md.
11package bubble
12
13import (
14 grc20votes "gno.land/p/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/grc20votes/v0"
15)
16
17const (
18 tokenName = "Bubble"
19 tokenSymbol = "BUBBLE"
20 tokenDecimals = 6
21 pkgPath = "gno.land/r/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/bubble" // must match gnomod.toml
22 tokenID = pkgPath + "." + tokenSymbol
23
24 // One BUBBLE in base units.
25 one = int64(1_000_000)
26
27 // epochBlocks quantises the voting snapshots: about 55 minutes at gnoland-1's 3.3 s blocks (kourt uses 720 at
28 // the 5 s it was measured at). A vote is weighed at the last sealed epoch, so weight bought after a question is
29 // asked does not count.
30 epochBlocks = int64(1000)
31)
32
33// ledger is the token. Unexported and never handed out: whoever holds a *Ledger can mint.
34var ledger = grc20votes.NewLedger(tokenName, tokenSymbol, tokenDecimals, epochBlocks)
35
36// ---------------------------------------------------------------- reading --
37
38func GetName() string { return ledger.Name() }
39func GetSymbol() string { return ledger.Symbol() }
40func GetDecimals() int { return ledger.Decimals() }
41func TotalSupply() int64 { return ledger.TotalSupply() }
42
43func BalanceOf(owner address) int64 { return ledger.BalanceOf(owner) }
44func Allowance(owner, spender address) int64 { return ledger.Allowance(owner, spender) }
45func VotesOf(who address) int64 { return ledger.VotesOf(who) }
46func DelegateOf(who address) address { return ledger.DelegateOf(who) }
47func PastVotes(who address, at uint32) int64 { return ledger.PastVotes(who, at) }
48func PastTotalVotes(at uint32) int64 { return ledger.PastTotal(at) }
49func Epoch() uint32 { return ledger.Epoch() }
50
51// ---------------------------------------------------------------- writing --
52//
53// Refuse a stale realm value, read who is calling, hand the ledger an address: kourt's three lines, because the
54// ledger (a /p/ package) has no caller to read.
55
56const errStaleRealm = "bubble: that realm value is not live; pass your own cur"
57
58func caller(cur realm) address {
59 if !cur.IsCurrent() {
60 panic(errStaleRealm)
61 }
62 return cur.Previous().Address()
63}
64
65// Transfer moves the caller's own tokens.
66func Transfer(cur realm, to address, amount int64) { ledger.Transfer(caller(cur), to, amount) }
67
68// Approve lets a spender move some of the caller's balance.
69func Approve(cur realm, spender address, amount int64) { ledger.Approve(caller(cur), spender, amount) }
70
71// TransferFrom spends an allowance.
72func TransferFrom(cur realm, from, to address, amount int64) {
73 ledger.TransferFrom(caller(cur), from, to, amount)
74}
75
76// Burn destroys the caller's own tokens. What is burned is gone from the supply and never re-minted: the pools
77// count what was minted, not what exists.
78func Burn(cur realm, amount int64) { ledger.Burn(caller(cur), amount) }
79
80// Delegate points the caller's voting power at someone else (one hop; self is the default).
81func Delegate(cur realm, to address) { ledger.Delegate(caller(cur), to) }
82

vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.