Render
func(path string) string- OID
- 097d01…a3e4:3
Render details
renderIndex
func() string- OID
- 097d01…a3e4:5
renderIndex details
renderOne
func(symbol string) string- OID
- 097d01…a3e4:6
renderOne details
entry
typeentry is one issued token: either a wrapper over a single underlying, or a fusion over several. Exactly one of vault/basket is set.
Value
v0.entry
ids
v0.IDValue
<zero>
byName
*v0.Tree// symbol -> \*entry
- OID
- 097d01…a3e4:9
byName details
created
[]string// symbols, in creation order, for a stable Render
Value
<zero>
home
.uverse.address// this realm's address: the escrow account
Value
<gnolang.StringValue>
init.8
func()- OID
- 097d01…a3e4:13
init.8 details
Home
func() .uverse.address- OID
- 097d01…a3e4:15
Home details
NewWrapper
func(tokenKey string, mode string, symbol string) stringNewWrapper issues a token wrapping \`tokenKey\`, a key in grc20reg, under the given mode, and registers it. It returns the new token's own registry key. \`symbol\` is yours to choose, must be unique in this realm, and follows the GRC20 rules: 1 to 11 characters of \[A-Za-z0-9\_-].
- OID
- 097d01…a3e4:16
NewWrapper details
NewFusion
func(keyA string, perA int64, keyB string, perB int64, symbol string) stringNewFusion issues a meta-token backed by two registered tokens at a fixed proportion: one smallest unit of the meta-token is always worth \`perA\` smallest units of A plus \`perB\` of B. It returns the new token's registry key. The proportion never changes, and the meta-token is minted and burned only against the real thing, so it cannot drift from its backing or be arbitraged. What it can do is make the pair one transferable object.
- OID
- 097d01…a3e4:17
NewFusion details
Deposit
func(symbol string, amount int64) int64Deposit escrows \`amount\` of the underlying and mints \`symbol\` to the caller. It returns how much was minted, which is not \`amount\` unless the mode is plain. Approve Home() on the underlying first.
- OID
- 097d01…a3e4:18
Deposit details
Withdraw
func(symbol string, amount int64) int64Withdraw burns \`amount\` of \`symbol\` and returns the underlying to the caller. It returns how much came back.
- OID
- 097d01…a3e4:19
Withdraw details
Donate
func(symbol string, amount int64)Donate escrows \`amount\` of the underlying for \`symbol\` and mints nothing. Under a pool or sticky mode this is a gift to every current holder at once, and it is irreversible: there is no share to redeem it with. Under any other mode it is a gift to nobody, since the rate ignores the escrow.
- OID
- 097d01…a3e4:20
Donate details
Fuse
func(symbol string, units int64)Fuse escrows every leg of \`symbol\` and mints \`units\` of it to the caller. Approve Home() on BOTH legs first.
- OID
- 097d01…a3e4:21
Fuse details
Defuse
func(symbol string, units int64)Defuse burns \`units\` of \`symbol\` and returns every leg to the caller.
- OID
- 097d01…a3e4:22
Defuse details
Transfer
func(symbol string, to .uverse.address, amount int64)Transfer moves the caller's own units of \`symbol\`. A soulbound wrapper refuses here, and nowhere else.
- OID
- 097d01…a3e4:23
Transfer details
Approve
func(symbol string, spender .uverse.address, amount int64)Approve lets \`spender\` draw \`amount\` of \`symbol\` from the caller's balance.
- OID
- 097d01…a3e4:24
Approve details
TransferFrom
func(symbol string, from .uverse.address, to .uverse.address, amount int64)TransferFrom spends an allowance the caller was granted on \`symbol\`.
- OID
- 097d01…a3e4:25
TransferFrom details
Key
func(symbol string) stringKey returns the grc20reg key of the token this realm issued as \`symbol\`.
- OID
- 097d01…a3e4:26
Key details
TotalSupply
func(symbol string) int64TotalSupply returns how much of \`symbol\` is outstanding.
- OID
- 097d01…a3e4:27
TotalSupply details
BalanceOf
func(symbol string, owner .uverse.address) int64BalanceOf returns \`owner\`'s balance of \`symbol\`.
- OID
- 097d01…a3e4:28
BalanceOf details
Allowance
func(symbol string, owner .uverse.address, spender .uverse.address) int64Allowance returns what \`owner\` let \`spender\` draw of \`symbol\`.
- OID
- 097d01…a3e4:29
Allowance details
Escrow
func(symbol string) int64Escrow returns the underlying escrowed behind a wrapper.
- OID
- 097d01…a3e4:30
Escrow details
Legs
func(symbol string) intLegs returns how many components a fusion has.
- OID
- 097d01…a3e4:31
Legs details
Leg
func(symbol string, i int) (string, int64, int64)Leg describes the i-th component of a fusion: its symbol, the units escrowed per meta unit, and the units escrowed so far.
- OID
- 097d01…a3e4:32
Leg details
Count
func() intCount is how many tokens this realm has issued.
- OID
- 097d01…a3e4:33
Count details
modePolicy
func(mode string) (v0.Policy, int)modePolicy maps a mode name to its policy and to the extra decimals the wrapped token needs to represent the same value.
- OID
- 097d01…a3e4:34
modePolicy details
record
func(e *v0.entry)- OID
- 097d01…a3e4:35
record details
requireFree
func(symbol string)- OID
- 097d01…a3e4:36
requireFree details
must
func(symbol string) *v0.entry- OID
- 097d01…a3e4:37
must details
mustVault
func(symbol string) *v0.Vault- OID
- 097d01…a3e4:38
mustVault details
mustBasket
func(symbol string) *v0.Basket- OID
- 097d01…a3e4:39
mustBasket details
caller
func() .uverse.address- OID
- 097d01…a3e4:40
caller details
checkErr
func(err .uverse.error)- OID
- 097d01…a3e4:41