registry
*v0.Tree// rlmPath.symbol -> \*Token
- OID
- 01d127…ed0b:4
registry details
Register
func(token *v0.Token, slug string) stringRegister records token under its rlmPath.symbol key and returns that key. Token.ID() carries a trailing sequence id (rlmPath.symbol.\<id>) that keeps token identities/events unique, but the registry deliberately keys by rlmPath.symbol so lookups don't need to know the id, and so a realm cannot register two tokens under the same symbol (overwrite/alias guard).
- OID
- 01d127…ed0b:6
Register details
Get
func(key string) *v0.Token- OID
- 01d127…ed0b:8
Get details
MustGet
func(key string) *v0.Token- OID
- 01d127…ed0b:9
MustGet details
Transfer
func(int, rlm .uverse.realm, tokenKey string, to .uverse.address, amount int64)Transfer moves \`amount\` out of the CALLING REALM's own balance. Call it non-crossing, forwarding your own \`cur\`: grc20reg.Transfer(0, cur, "gno.land/r/demo/defi/foo20.FOO", to, 100)
- OID
- 01d127…ed0b:10
Transfer details
Approve
func(int, rlm .uverse.realm, tokenKey string, spender .uverse.address, amount int64)Approve sets an allowance owned by the CALLING REALM, letting \`spender\` draw on the calling realm's balance. It does not touch the signing user's allowances.
- OID
- 01d127…ed0b:11
Approve details
TransferFrom
func(int, rlm .uverse.realm, tokenKey string, from .uverse.address, to .uverse.address, amount int64)TransferFrom spends an allowance with the CALLING REALM as the spender. Note the allowance direction this implies: \`from\` must have approved the calling realm, not the signing user. That is the supported way for a realm to move a user's funds — the user grants the realm an allowance, and the realm draws on it as itself, so every debit is one the owner authorized against that specific realm.
- OID
- 01d127…ed0b:12
TransferFrom details
checkErr
func(err .uverse.error)- OID
- 01d127…ed0b:13
checkErr details
Render
func(path string) string- OID
- 01d127…ed0b:14
Render details
registerEvent
untyped stringValue
"register"
maxSlugLen
untyped bigintValue
(128 <untyped> bigint)
GetRegistry
func() *v0.ReadOnlyTree- OID
- 01d127…ed0b:15
GetRegistry details
validateSlug
func(slug string)validateSlug panics if the slug is too long or contains non-alphanumeric characters. Only letters, digits, dashes, and underscores are allowed.
- OID
- 01d127…ed0b:16
validateSlug details
isAlphanumeric
func(c int32) bool- OID
- 01d127…ed0b:17