Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

v1 state

Back to all declarations

ModeDirectFixed

untyped string

Value

"direct_fixed"

ModeDirectCap

untyped string

Value

"direct_capped"

ModeFairSale

untyped string

Value

"fairsale"

maxPublicID

untyped bigint

// T plus ten decimal digits: GRC20 MaxSymbolLen is 11.

Value

(9999999999 <untyped> bigint)

Metadata

type

Metadata is editable only by the original creator until frozen.

Value

v1.Metadata

createSpec

type

createSpec is assembled within this realm: a foreign Gno realm cannot allocate a struct declared here, so the crossing interface uses scalars.

Value

v1.createSpec

Info

type

Info excludes the private ledger capability and can be returned safely.

Value

v1.Info

entry

type

Value

v1.entry

nextID

v0.ID

Tokens live in an AVL tree: creating one touches its own entry and the path to it, whatever the number of tokens. A Go map, or a slice of their ids, would be rewritten whole on every creation. Ids are T1, T2, ... in creation order and no token is ever removed, so a page of the list is a range of ids.

Value

<zero>

requireIssuer

func() .uverse.address
Open
OID
0d3ee9…1dbf:7
requireIssuer details

Inspect func

requireAddress

func(a .uverse.address)

The ledger keys balances and allowances by the address text, so an address in any spelling but the one the chain gives a caller would hold something no caller can reach.

Open
OID
0d3ee9…1dbf:11
requireAddress details

Inspect func

validateMetadata

func(m v1.Metadata)
Open
OID
0d3ee9…1dbf:12
validateMetadata details

Inspect func

protectedTicker

func(ticker string) bool

The founding names remain unavailable even if governance globally clears a config reservation. A creator-specific grant needs its own reviewed proof.

Open
OID
0d3ee9…1dbf:13
protectedTicker details

Inspect func

validateSpec

func(s v1.createSpec)
Open
OID
0d3ee9…1dbf:14
validateSpec details

Inspect func

laneForMode

func(mode string) string
Open
OID
0d3ee9…1dbf:15
laneForMode details

Inspect func

nextPublicID

func() (string, v0.ID)
Open
OID
0d3ee9…1dbf:16
nextPublicID details

Inspect func

Create

func(creator .uverse.address, mode string, name string, ticker string, decimals int, initialSupply int64, maxSupply int64, currencyKey string, expectedVersion int64, description string, image string, website string, xHandle string, telegram string) string

Create registers exactly one new GRC20 for a listed issuer, which must authenticate the creator, reserve the launch terms and collect payment before this crossing call. The currency key names the config action currency: creation-fee currency for a direct token, quote currency for a fair sale; the issuer binds it to the corresponding payment route. The public symbol T\<n> is distinct from the nonunique creator-selected ticker. The whole initial mint lands in the issuer's custody for atomic allocation and escrow setup, and the token stays bound to that issuer.

Open
OID
0d3ee9…1dbf:17
Create details

Inspect func

mustEntry

func(id string) *v1.entry
Open
OID
0d3ee9…1dbf:18
mustEntry details

Inspect func

Count

func() int64

Count is the number of tokens created: ids are T1 to T\<Count>, none removed.

Open
OID
0d3ee9…1dbf:20
Count details

Inspect func

RegistryKeyOf

func(id string) string
Open
OID
0d3ee9…1dbf:21
RegistryKeyOf details

Inspect func

BalanceOf

func(id string, owner .uverse.address) int64
Open
OID
0d3ee9…1dbf:22
BalanceOf details

Inspect func

TotalSupply

func(id string) int64
Open
OID
0d3ee9…1dbf:23
TotalSupply details

Inspect func

MintCapped

func(id string, authority .uverse.address, amount int64)

MintCapped can only be reached through the issuer that created the token. That issuer authenticates the live caller as the current mint authority and must partition the newly minted balance into recorded allocations in this same transaction. The ledger independently rechecks the authority and the immutable cap, and takes no mint while the direct lane is closed: the pauser stops every issuer here, whatever each one checks by itself.

Open
OID
0d3ee9…1dbf:24
MintCapped details

Inspect func

Allowance

func(id string, owner .uverse.address, spender .uverse.address) int64
Open
OID
0d3ee9…1dbf:25
Allowance details

Inspect func

Transfer

func(id string, to .uverse.address, amount int64)

Standard wrappers operate only on the immediate caller's balance or allowance, accept no coins, and take an address only as the chain writes one. A realm can also move its own balance, or an allowance it holds, through the token in the registry, where the GRC20 library alone checks the receiver. A script an account runs is such a realm with the account's address, so these wrappers are an account's only way in only while the chain does not let that account submit scripts.

Open
OID
0d3ee9…1dbf:26
Transfer details

Inspect func

Approve

func(id string, spender .uverse.address, amount int64)
Open
OID
0d3ee9…1dbf:27
Approve details

Inspect func

TransferFrom

func(id string, from .uverse.address, to .uverse.address, amount int64)
Open
OID
0d3ee9…1dbf:28
TransferFrom details

Inspect func

SetMetadata

func(id string, description string, image string, website string, xHandle string, telegram string)
Open
OID
0d3ee9…1dbf:30
SetMetadata details

Inspect func

FreezeMetadata

func(id string)
Open
OID
0d3ee9…1dbf:31
FreezeMetadata details

Inspect func

ProposeMintAuthority

func(id string, next .uverse.address)

A capped token's authority moves only through its own two-step handoff. The issuer checks this live authority before each later mint.

Open
OID
0d3ee9…1dbf:32
ProposeMintAuthority details

Inspect func

CancelMintAuthority

func(id string)
Open
OID
0d3ee9…1dbf:33
CancelMintAuthority details

Inspect func

AcceptMintAuthority

func(id string)
Open
OID
0d3ee9…1dbf:34
AcceptMintAuthority details

Inspect func

RenounceMintAuthority

func(id string)
Open
OID
0d3ee9…1dbf:35
RenounceMintAuthority details

Inspect func

infoJSON

func(e *v1.entry) string

int64 amounts and versions are decimal strings so JSON clients cannot round a valid value above JavaScript's exact integer range.

Open
OID
0d3ee9…1dbf:37
infoJSON details

Inspect func

TokenJSON

func(id string) string
Open
OID
0d3ee9…1dbf:39
TokenJSON details

Inspect func

ListTokensJSON

func(page int64, size int64) string

ListTokensJSON returns a zero-based page; page size is strictly 1..100.

Open
OID
0d3ee9…1dbf:40
ListTokensJSON details

Inspect func
ModeDirectFixed : untyped string ="direct_fixed"
ModeDirectCap : untyped string ="direct_capped"
ModeFairSale : untyped string ="fairsale"
maxPublicID : untyped bigint =(9999999999 <untyped> bigint)
Metadata : type =v1.Metadata
createSpec : type =v1.createSpec
Info : type =v1.Info
entry : type =v1.entry
nextID : v0.ID =<zero>
entries : *v0.Tree Inspect
requireIssuer : func() .uverse.address Inspect
check : func(err .uverse.error) Inspect
caller : func() .uverse.address Inspect
requireAddress : func(a .uverse.address) Inspect
validateMetadata : func(m v1.Metadata) Inspect
protectedTicker : func(ticker string) bool Inspect
validateSpec : func(s v1.createSpec) Inspect
laneForMode : func(mode string) string Inspect
nextPublicID : func() (string, v0.ID) Inspect
Create : func(creator .uverse.address, mode string, name string, ticker string, decimals int, initialSupply int64, maxSupply int64, currencyKey string, expectedVersion int64, description string, image string, website string, xHandle string, telegram string) string Inspect
mustEntry : func(id string) *v1.entry Inspect
GetInfo : func(id string) v1.Info Inspect
Count : func() int64 Inspect
RegistryKeyOf : func(id string) string Inspect
BalanceOf : func(id string, owner .uverse.address) int64 Inspect
TotalSupply : func(id string) int64 Inspect
MintCapped : func(id string, authority .uverse.address, amount int64) Inspect
Allowance : func(id string, owner .uverse.address, spender .uverse.address) int64 Inspect
Transfer : func(id string, to .uverse.address, amount int64) Inspect
Approve : func(id string, spender .uverse.address, amount int64) Inspect
TransferFrom : func(id string, from .uverse.address, to .uverse.address, amount int64) Inspect
Burn : func(id string, amount int64) Inspect
SetMetadata : func(id string, description string, image string, website string, xHandle string, telegram string) Inspect
FreezeMetadata : func(id string) Inspect
ProposeMintAuthority : func(id string, next .uverse.address) Inspect
CancelMintAuthority : func(id string) Inspect
AcceptMintAuthority : func(id string) Inspect
RenounceMintAuthority : func(id string) Inspect
Render : func(path string) string Inspect
infoJSON : func(e *v1.entry) string Inspect
TokenJSON : func(id string) string Inspect
ListTokensJSON : func(page int64, size int64) string Inspect