Token
*v0.TokenToken is the registered token, exported as wugnot exports its own: a \*grc20.Token carries no spend authority (its tellers act only for the realm that builds them, and only with an allowance), and the registry hands the same pointer to anyone. ledger is the mint and burn, and it never leaves this package.
- OID
- 0c415c…e13a:24
Token details
ledger
*v0.PrivateLedgerToken is the registered token, exported as wugnot exports its own: a \*grc20.Token carries no spend authority (its tellers act only for the realm that builds them, and only with an allowance), and the registry hands the same pointer to anyone. ledger is the mint and burn, and it never leaves this package.
- OID
- 0c415c…e13a:26
ledger details
tokenName
untyped stringValue
"Bubble Rumble BUBBLE (wrapped)"
tokenSymbol
untyped stringValue
"BUBBLE"
tokenDecimals
untyped bigintValue
(6 <untyped> bigint)
pkgPath
untyped string// must match gnomod.toml
Value
"gno.land/r/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/wbubble"
RegistryKey
untyped stringValue
"gno.land/r/g1leu8d2vsplhehcfkjg50mwgdpxdkt8tztu95wr/wbubble.BUBBLE"
one
int64// one BUBBLE in base units
Value
1000000
init.8
func()- OID
- 0c415c…e13a:5
init.8 details
Address
func() .uverse.address- OID
- 0c415c…e13a:7
Address details
Reserve
func() int64Reserve is the BUBBLE this realm holds. It covers TotalSupply after every call (checkReserve).
- OID
- 0c415c…e13a:8
Reserve details
Wrap
func(amount int64)Wrap takes amount BUBBLE from the caller and mints as much wrapped BUBBLE to them. First, on the bubble realm, the caller approves THIS realm for the amount (bubble.Approve with spender Address()): bubble reads its own caller as the spender, and its caller here is this realm, not the user. A failure inside bubble panics across the realm boundary and aborts the whole transaction, so nothing is minted for BUBBLE that did not arrive.
- OID
- 0c415c…e13a:9
Wrap details
Unwrap
func(amount int64)Unwrap burns amount of the caller's wrapped BUBBLE and sends them as much BUBBLE. The burn goes first: a caller without the wrapped tokens is refused before anything moves.
- OID
- 0c415c…e13a:10
Unwrap details
checkReserve
func(self .uverse.address, want int64)checkReserve is the invariant after every move: the reserve moved by exactly the amount, and it covers the supply. Not \`reserve == supply\`: anyone can send BUBBLE straight to this realm's address, and a wrapper that demanded equality would then refuse every Wrap and Unwrap for good. Such a gift only puts the reserve over the supply; it belongs to nobody and stays.
- OID
- 0c415c…e13a:11
checkReserve details
TotalSupply
func() int64- OID
- 0c415c…e13a:12
TotalSupply details
BalanceOf
func(owner .uverse.address) int64- OID
- 0c415c…e13a:13
BalanceOf details
Allowance
func(owner .uverse.address, spender .uverse.address) int64- OID
- 0c415c…e13a:14
Allowance details
Transfer
func(to .uverse.address, amount int64)- OID
- 0c415c…e13a:15
Transfer details
Approve
func(spender .uverse.address, amount int64)- OID
- 0c415c…e13a:16
Approve details
TransferFrom
func(from .uverse.address, to .uverse.address, amount int64)- OID
- 0c415c…e13a:17
TransferFrom details
Render
func(path string) stringRender: "" the token's page; "balance/\<addr>" one wrapped balance as a number (wugnot's path); "json" the figures for the box.
- OID
- 0c415c…e13a:18
Render details
home
func() string- OID
- 0c415c…e13a:19
home details
json
func() string- OID
- 0c415c…e13a:20
json details
amount
func(n int64) stringamount prints base units as BUBBLE with up to six decimals, trailing zeros dropped.
- OID
- 0c415c…e13a:21
amount details
require
func(condition bool, msg string)- OID
- 0c415c…e13a:22
require details
checkErr
func(err .uverse.error)- OID
- 0c415c…e13a:23