Gno.land
| 1 | package bubble |
| 2 | |
| 3 | // The settings, and who may change them. |
| 4 | // |
| 5 | // admin is whoever deployed the realm (Jae's hotkey signs the addpkg) and is handed to the box's keeper key in the |
| 6 | // same minute ("a token that you control, but admin can be transferred and even destroyed"). An empty admin is |
| 7 | // nobody, permanently: RenounceAdmin is the "destroyed" Jae asked for. After it, every one of these settings moves |
| 8 | // only by a holders' vote (kinds.gno), and the mint goes on under the minter until the holders stop it. |
| 9 | var ( |
| 10 | // admin is Jae's cold key (jarvis room 201, 2026-09-25: "(b) g1ecsu … make sure that even if the hotkey is |
| 11 | // hacked the g1ecsu can restore"), named here rather than read from OriginCaller at init: the deployer is the |
| 12 | // hotkey, which holds no power once the realm is up, and a test package or a filetest loads with no deployer |
| 13 | // at all. The box holds the minter, whose damage the day cap bounds; if the box or the hotkey is ever taken, |
| 14 | // this key pauses, names another minter, and goes on. |
| 15 | admin = address("g1ecsuj0q572jr0dhu29q9njtnmw03hyu7tyyvv6") |
| 16 | // minter is the box's keeper key, the only address that mints referrals; "" is nobody. |
| 17 | minter = address("g18dd5mstjqlcg9ngqpg26azeya6wqg7upd9t8xa") |
| 18 | paused bool // the admin's brake: stops Mint and MintMany, nothing else |
| 19 | dayCap = 250_000 * one |
| 20 | ) |
| 21 | |
| 22 | func init() { |
| 23 | ledger.SetID(tokenID) |
| 24 | ledger.Mint(premineTo, premine) |
| 25 | premined = premine |
| 26 | } |
| 27 | |
| 28 | func Admin() address { return admin } |
| 29 | func Minter() address { return minter } |
| 30 | func Paused() bool { return paused } |
| 31 | func DayCap() int64 { return dayCap } |
| 32 | |
| 33 | func mustBeAdmin(cur realm) { |
| 34 | who := caller(cur) |
| 35 | if admin == "" { |
| 36 | panic("bubble: the admin was given up; the holders decide now") |
| 37 | } |
| 38 | if who != admin { |
| 39 | panic("bubble: only the admin") |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | // SetAdmin hands the settings to another address. |
| 44 | func SetAdmin(cur realm, to address) { |
| 45 | mustBeAdmin(cur) |
| 46 | if !to.IsValid() { |
| 47 | panic("bubble: not an address") |
| 48 | } |
| 49 | admin = to |
| 50 | } |
| 51 | |
| 52 | // RenounceAdmin gives the settings up for good: from here they move only by vote. |
| 53 | func RenounceAdmin(cur realm) { |
| 54 | mustBeAdmin(cur) |
| 55 | admin = "" |
| 56 | } |
| 57 | |
| 58 | // SetMinter names who mints; "" is nobody (the referral mint stops until a vote names one). |
| 59 | func SetMinter(cur realm, to address) { |
| 60 | mustBeAdmin(cur) |
| 61 | if to != "" && !to.IsValid() { |
| 62 | panic("bubble: not an address") |
| 63 | } |
| 64 | minter = to |
| 65 | } |
| 66 | |
| 67 | // SetPaused stops the mint, or lets it go on. |
| 68 | func SetPaused(cur realm, on bool) { |
| 69 | mustBeAdmin(cur) |
| 70 | paused = on |
| 71 | } |
| 72 | |
| 73 | // SetDayCap lowers the daily ceiling. Raising it is the holders' (govern:daycap): the cap is what bounds a stolen |
| 74 | // key, so the key it bounds may not raise it. |
| 75 | func SetDayCap(cur realm, n int64) { |
| 76 | mustBeAdmin(cur) |
| 77 | if n < 0 || n > dayCap { |
| 78 | panic("bubble: the admin can only lower the day cap; raising it is a vote") |
| 79 | } |
| 80 | dayCap = n |
| 81 | } |
| Function | Parameters |
|---|---|
| Admin | () |
| Minter | () |
| Paused | () |
| DayCap | () |
| SetAdmin | (to string) |
| RenounceAdmin | () |
| SetMinter | (to string) |
| SetPaused | (on bool) |
| SetDayCap | (n int64) |
| NewRules | (quorumBps int64, thresholdBps int64, votingBlocks int64, delayBlocks int64, graceBlocks int64, proposeBps int64) |
| TextOnly | (s string) |
| Offer | (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}) |
Bubble (BUBBLE)
governance
1 of 64 slots in use.
Nothing to vote on.
decided, waiting to be run
govern:reserve · succeeded| Function | Caller | Age |
|---|---|---|
| Approve | g120t6nt…gz75u0 | 9h ago |
| MintMany | g18dd5ms…d9t8xa | 13h ago |
| MintMany | g18dd5ms…d9t8xa | 15h ago |
| Approve | g1dd7s79…u0a6v6 | 1d ago |
| Approve | g120t6nt…gz75u0 | 1d ago |
| Approve | g1nnkmk0…673qee | 1d ago |
| MintMany | g18dd5ms…d9t8xa | 1d ago |
| MintMany | g18dd5ms…d9t8xa | 1d ago |
| Approve | g1nnkmk0…673qee | 2d ago |
| Approve | g120t6nt…gz75u0 | 2d ago |
| MintMany | g18dd5ms…d9t8xa | 2d ago |
| Approve | g120t6nt…gz75u0 | 3d ago |