Skip to content

Commit

Permalink
Include Leemon's edits from Services issue #974 (#10)
Browse files Browse the repository at this point in the history
Signed-off-by: tinker-michaelj <[email protected]>
  • Loading branch information
Michael Tinker authored Feb 23, 2021
1 parent e45651c commit b0f8d06
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions services/TokenCreate.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ import "Timestamp.proto";
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 supply that is going to be put in circulation is going to be the initial supply provided. The maximum supply a token can have is 2^63-1.
Example:
Token A has 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 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
The <tt>initialSupply</tt> is the initial supply of the smallest parts of a token (like a tinybar, not an hbar). These are the smallest units of the token which may be transferred.
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.
The supply can change over time. If the total supply at some moment is <i>S</i> parts of tokens, and the token is using <i>D</i> decimals, then <i>S</i> must be less than or equal to 2<sup>63</sup>-1, which is 9,223,372,036,854,775,807. The number of whole tokens (not parts) will be <i>S / 10<sup>D</sup></i>.
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).
Note that a created token is <i>immutable</i> if the <tt>adminKey</tt> is omitted. No property of an immutable token can ever change, with the sole exception of its expiry. Anyone can pay to extend the expiry time of an immutable token.
*/
message TokenCreateTransactionBody {
string name = 1; // The publicly visible name of the token, limited to a UTF-8 encoding of length <tt>tokens.maxSymbolUtf8Bytes</tt>.
Expand Down

0 comments on commit b0f8d06

Please sign in to comment.