# Mintage
# Contract Specification
Built-in token issuance contract. Contract address is vite_000000000000000000000000000000000000000595292d996d
ABI:
Querying token information function will return execution results in callback.
# mintage_getMintData
Generate request data for issuing new token. Equivalent to Mint
method in ABI.
- Parameters:
Object
tokenName
:string
Token name in 1-40 characters, including uppercase/lowercase letters, spaces and underscores. Cannot contain consecutive spaces or begin/end by spacetokenSymbol
:string
Token symbol in 1-10 characters, including uppercase/lowercase letters, spaces and underscores.totalSupply
:big.int
Total supply. Cannot exceeddecimals
:uint8
Decimal digits. HavingisReIssuable
:bool
Whether the token can be re-issued.true
means the token is in dynamic total supply and additional tokens can be minted.maxSupply
:uint256
Maximum supply. Mandatory for re-issuable token. Cannot exceed . HavingownerBurnOnly
:bool
Whether the token can be burned by the owner only. Mandatory for re-issuable token. All token holders can burn if this flag isfalse
Returns:
[]byte
Data
Example:
# mintage_getIssueData
Generate request data for re-issuing the specified amount of tokens. Equivalent to Issue
method in ABI.
- Parameters:
Object
tokenId
:TokenId
Token IDamount
:uint64
Re-issuance amountbeneficial
:Hash
The account address to receive newly minted tokens
Returns:
[]byte
Data
Example:
# mintage_getBurnData
Generate request data for burning token. Equivalent to Burn
method in ABI.
Parameters:
Returns:
[]byte
Data
Example:
# mintage_getTransferOwnerData
Generate request data for transferring token ownership. Equivalent to TransferOwner
method in ABI.
- Parameters:
Object
TokenId
: Token IDAddress
: The account address of new owner
Returns:
[]byte
Data
Example:
# mintage_getChangeTokenTypeData
Generate request data for changing token type. This method can only change re-issuable token to non-reissuable. Equivalent to ChangeTokenType
method in ABI.
Parameters:
TokenId
: Token ID
Returns:
[]byte
Data
Example:
# mintage_getTokenInfoList
Return a list of all tokens issued
Parameters:
int
: Page index,starting from 0int
: Page size
Returns:
Array<TokenInfo>
tokenName
:string
Token nametokenSymbol
:string
Token symboltotalSupply
:big.Int
Total supplydecimals
:uint8
Decimal digitsowner
:Address
Token ownerisReIssuable
:bool
Whether the token can be re-issuedmaxSupply
:big.Int
Maximum supplyownBurnOnly
:bool
Whether the token can be burned by the owner onlytokenId
:TokenId
Token IDindex
:uint16
Token index between 0-999. For token having the same symbol, sequential indexes will be allocated according to when the token is issued.
- Example:
# mintage_getTokenInfoById
Return token info by ID
Parameters:
TokenId
: Token ID
Returns:
TokenInfo
tokenName
:string
Token nametokenSymbol
:string
Token symboltotalSupply
:big.Int
Total supplydecimals
:uint8
Decimal digitsowner
:Address
Token ownerisReIssuable
:bool
Whether the token can be re-issuedmaxSupply
:big.Int
Maximum supplyownBurnOnly
:bool
Whether the token can be burned by the owner onlytokenId
:TokenId
Token IDindex
:uint16
Token index between 0-999. For token having the same symbol, sequential indexes will be allocated according to when the token is issued.
- Example:
# mintage_getTokenInfoListByOwner
Return a list of tokens issued by the specified owner
Parameters:
Address
: The account address of token owner
Returns:
Array<TokenInfo>
tokenName
:string
Token nametokenSymbol
:string
Token symboltotalSupply
:big.Int
Total supplydecimals
:uint8
Decimal digitsowner
:Address
Token ownerisReIssuable
:bool
Whether the token can be re-issuedmaxSupply
:big.Int
Maximum supplyownBurnOnly
:bool
Whether the token can be burned by the owner onlytokenId
:TokenId
Token IDindex
:uint16
Token index between 0-999. For token having the same symbol, sequential indexes will be allocated according to when the token is issued.
- Example: