TokenCreate
Create a new token. After the token is created, the Token ID for it is in the receipt.
The specified Treasury Account is receiving the initial supply of tokens as-well as the tokens from the Token Mint operation once executed. The balance of the treasury account is decreased when the Token Burn operation is executed.
The initialSupply
is the initial supply of the smallest parts of tokens (like a tinybar, not an hbar).The supply that is going to be put in circulation is going to be the initial supply provided.
The supply can change over time. If the total supply at some moment is S
parts of tokens, and the token is using D
decimals, then S
must be less than or equal to 2^63-1
, which is 9,223,372,036,854,775,807
. The number of whole tokens (not parts) will S / 10^D
.
If decimals
is 8 or 11, then the number of whole tokens can be at most a few billions or millions, respectively. For example, it could match Bitcoin (21 million whole tokens with 8 decimals) or hbars (50 billion whole tokens with 8 decimals). It could even match Bitcoin with milli-satoshis (21 million whole tokens with 11 decimals). (ed
Example:
Token A has an initial supply set to 10_000 and decimals set to 2. The tokens that will be put into circulation are going be 100.
Token B has an initial supply set to 10_012_345_678 and decimals set to 8. The number of tokens that will be put into circulation are going to be 100.12345678
Creating immutable token: Token can be created as immutable if the adminKey is omitted. In this case, the name, symbol, treasury, management keys, expiry and renew properties cannot be updated. If a token is created as immutable, anyone is able to extend the expiry time by paying the fee.
TokenCreateTransactionBody
name
string
The publicly visible name of the token. The token name is specified as a Unicode string. Its UTF-8 encoding cannot exceed 100 bytes, and cannot contain the 0 byte (NUL).
N/A
symbol
string
The publicly visible token symbol. The token symbol is specified as a Unicode string. Its UTF-8 encoding cannot exceed 100 bytes, and cannot contain the 0 byte (NUL).
N/A
decimals
uint32
For tokens of type FUNGIBLE_COMMON
- the number of decimal places a token is divisible by. For tokens of type NON_FUNGIBLE_UNIQUE
- value must be 0.
N/A
initialSupply
uint64
Specifies the initial supply of tokens to be put in circulation. The initial supply is sent to the Treasury Account. The supply is in the lowest denomination possible. Maximum supply of tokens:9,223,372,036,854,775,807
. In the case for NON_FUNGIBLE_UNIQUE
Type the value must be 0
N/A
treasury
The account which will act as a treasury for the token. This account will receive the specified initial supply or the newly minted NFTs in the case for NON_FUNGIBLE_UNIQUE
Type.
Required
adminKey
The key which can perform update/delete operations on the token. If empty, the token can be perceived as immutable (not being able to be updated/deleted)
If set, required
kycKey
The key which can grant or revoke KYC of an account for the token's transactions. If empty, KYC is not required, and KYC grant or revoke operations are not possible.
If set, required
freezeKey
The key which can sign to freeze or unfreeze an account for token transactions. If empty, freezing is not possible
If set, required
wipeKey
The key which can wipe the token balance of an account. If empty, wipe is not possible
If set, required
supplyKey
The key which can change the supply of a token. The key is used to sign Token Mint/Burn operations
If set, required
freezeDefault
bool
The default Freeze status (frozen or unfrozen) of Hedera accounts relative to this token. If true, an account must be unfrozen before it can receive the token
N/A
expiry
uint64
The epoch second at which the token should expire; if an auto-renew account and period are specified, this is coerced to the current epoch second plus the autoRenewPeriod
N/A
autoRenewAccount
An account which will be automatically charged to renew the token's expiration, at autoRenewPeriod interval
N/A
autoRenewPeriod
uint64
The interval at which the auto-renew account will be charged to extend the token's expiry
N/A
memo
string
The memo associated with the token (UTF-8 encoding max 100 bytes)N/A
N/A
tokenType
IWA compatibility. Specifies the token type. Defaults to FUNGIBLE_COMMON
N/A
supplyType
IWA compatibility. Specified the token supply type. Defaults to INFINITE
N/A
maxSupply
int64
IWA Compatibility. Depends on TokenSupplyType. For tokens of type FUNGIBLE_COMMON
- the maximum number of tokens that can be in circulation. For tokens of type NON_FUNGIBLE_UNIQUE
- the maximum number of NFTs (serial numbers) that can be minted. This field can never be changed
N/A
feeScheduleKey
Key
The key which can change the token's custom fee schedule; must sign a TokenFeeScheduleUpdate transaction
N/A
customFees
repeated CustomFee
The custom fees to be assessed during a CryptoTransfer that transfers units of this token
N/A
pause_key
Key
The Key which can pause and unpause the Token. If Empty the token pause status defaults to PauseNotApplicable, otherwise Unpaused
N/A
Last updated