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
govern.gnogno
1package bubble23import (4	governor "gno.land/p/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/governor/v0"5)67// The governor: kourt's engine on this ledger, with this realm's own powers installed under the reserved prefix.8

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 ↗
// Everything about proposals — kinds, tally, rules, sweep, pages — is the engine's; what is here is what only a
9// realm can do: hold a live cur, check it, read who is calling, dispatch a decided kind with a sub-realm.
10//
11// "Usable for governance flexibly as we build it out": a new power is a Kind any realm can Offer (published,
12// immutable code plus the bar it would pass at) and the holders adopt by govern:adopt. The token is never
13// redeployed to gain a power.
14
15type (
16 Kind = governor.Kind
17 Rules = governor.Rules
18)
19
20func NewRules(quorumBps, thresholdBps, votingBlocks, delayBlocks, graceBlocks, proposeBps int64) Rules {
21 return governor.NewRules(quorumBps, thresholdBps, votingBlocks, delayBlocks, graceBlocks, proposeBps)
22}
23
24func TextOnly(s string) error { return governor.TextOnly(s) }
25
26// engine is this realm's governor. Unexported: whoever holds it can adopt a kind without a vote.
27var engine = governor.New(ledger, ledger)
28
29func init() {
30 installKinds()
31}
32
33// dispatch runs a decided kind with a SUB-realm, never this realm's own capability (the engine's note on
34// dispatch: a kind holding the live cur could cross into anything that trusts this realm).
35func dispatch(cur realm) governor.Dispatch {
36 return func(k Kind, subpath, payload string) error {
37 return k.Do(0, cur.Sub(subpath), payload)
38 }
39}
40
41// Offer publishes a kind. It grants nothing: the holders adopt it by vote.
42func Offer(cur realm, k Kind, r Rules) { engine.Offer(caller(cur), k, r) }
43
44// Propose asks a question under an adopted kind. A money kind carries its absolute turnout floor (kinds.gno).
45func Propose(cur realm, kind, payload, title string) int64 {
46 who := caller(cur)
47 var id int64
48 if floor := quorumFloor(kind); floor > 0 {
49 id = engine.ProposeWithQuorum(who, kind, payload, title, floor)
50 } else {
51 id = engine.Propose(who, kind, payload, title)
52 }
53 if len(askedKinds) > 512 { // a guard, not a record: only decided-but-unnoted money votes need it, and those are few
54 askedKinds = map[int64]string{}
55 }
56 askedKinds[id] = kind
57 return id
58}
59
60// Vote casts the caller's weight as of the proposal's sealed epoch: "yes", "no" or "abstain".
61func Vote(cur realm, id int64, choice string) { engine.Vote(caller(cur), id, choice) }
62
63func VoteWithReason(cur realm, id int64, choice, reason string) {
64 engine.VoteWithReason(caller(cur), id, choice, reason)
65}
66
67// Cancel withdraws the proposer's own open proposal.
68func Cancel(cur realm, id int64) { engine.Cancel(caller(cur), id) }
69
70// Settle writes down a conclusion the rules already reached. Permissionless. A decided money vote's turnout goes
71// into the bar's memory (kinds.gno).
72func Settle(cur realm, id int64) {
73 engine.Settle(caller(cur), id)
74 if isMoneyKind(kindOf(id)) {
75 noteTurnout(id)
76 }
77}
78
79// Execute runs a decided proposal after its delay. Permissionless.
80func Execute(cur realm, id int64) {
81 engine.Execute(caller(cur), id, dispatch(cur))
82 if isMoneyKind(kindOf(id)) {
83 noteTurnout(id)
84 }
85}
86
87// kindOf is the kind a proposal was asked under, as this realm noted it at Propose (the engine describes a
88// proposal by its payload alone); an id it never saw is "".
89func kindOf(id int64) string { return askedKinds[id] }
90
91// askedKinds is id -> kind for the proposals asked here, the last few hundred.
92var askedKinds = map[int64]string{}
93
94func ReleaseRoll(cur realm, id int64) { engine.ReleaseRoll(caller(cur), id) }
95
96func Sweep(cur realm) {
97 caller(cur)
98 engine.Sweep()
99}
100
101// ------------------------------------------------------------------ reads --
102
103func State(id int64) string { return engine.State(id) }
104func Describe(id int64) string { return engine.Describe(id) }
105func Preview(kind, payload string) string { return engine.Preview(kind, payload) }
106func HasVoted(id int64, who address) bool { return engine.HasVoted(id, who) }
107func Tally(id int64) (yes, no, abstain, total int64) { return engine.Tally(id) }
108func KindRules(name string) (Rules, bool) { return engine.KindRules(name) }
109
110func Timings(id int64) (opened, closes, ready, expires int64) { return engine.Timings(id) }
111
112func VoteOf(id int64, who address) (choice string, weight int64, ok bool) {
113 return engine.VoteOf(id, who)
114}
115

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.