v1 source realm
Package tokens creates registered Launchpad GRC20 ledgers for the issuer realms listed in config. A token belongs to ...
Package tokens creates registered Launchpad GRC20 ledgers for the issuer realms listed in config. A token belongs to the issuer that created it: no other realm, and no admin, can mint into it.
1
21
func AcceptMintAuthority
crossing Actionfunc Allowance
Actionfunc Approve
crossing Actionfunc BalanceOf
Actionfunc Burn
crossing Actionfunc CancelMintAuthority
crossing Actionfunc Count
ActionCount is the number of tokens created: ids are T1 to T<Count>, none removed.
func Create
crossing ActionCreate 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.
func FreezeMetadata
crossing Actionfunc ListTokensJSON
ActionListTokensJSON returns a zero-based page; page size is strictly 1..100.
func MintCapped
crossing ActionMintCapped 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.
func ProposeMintAuthority
crossing ActionA capped token's authority moves only through its own two-step handoff. The issuer checks this live authority before each later mint.
func RegistryKeyOf
Actionfunc Render
func RenounceMintAuthority
crossing Actionfunc SetMetadata
crossing Actionfunc TokenJSON
Actionfunc TotalSupply
Actionfunc Transfer
crossing ActionStandard 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.
func TransferFrom
crossing Actionfunc GetInfo
Action2
type Info
struct 1type Info struct {
2 ID string
3 RegistryKey string
4 GRC20ID string
5 Issuer address
6 Creator address
7 Mode string
8 Name string
9 Ticker string
10 Decimals int
11 InitialSupply int64
12 MaxSupply int64
13 ConfigVersion int64
14 CurrencyKey string
15 Metadata Metadata
16 MetadataFrozen bool
17 MintAuthority address
18 PendingMintAuth address
19 MintRenounced bool
20}Info excludes the private ledger capability and can be returned safely.
type Metadata
structMetadata is editable only by the original creator until frozen.
11
- chain stdlib
- gno.land/p/nt/avl/v0 package
- gno.land/p/nt/grc20/v0 package
- gno.land/p/nt/seqid/v0 package
- gno.land/p/samcrew/launchpad/currency/v1 package
- gno.land/p/samcrew/launchpad/meta/v1 package
- gno.land/p/samcrew/launchpad/safemath/v1 package
- gno.land/r/nt/grc20reg/v0 realm
- gno.land/r/samcrew/launchpad/config/v1 realm
- strconv stdlib
- strings stdlib