# [Ride v4] Issue
⚠️ This is the documentation for the Standard library version 4 and 3. We recommend to use version 6. Go to version 6
⚠️ The structure is added in Standard library version 4.
Issue
is a structure that sets the parameters of the token issue. The token issue is performed only if the structure is included in the callable function result.
The minimum fee for an invoke script transaction is increased by 1 WAVES for each issued asset that is not NFT.
You can get the ID of the issued token using the calculateAssetId function.
# Constructor
Issue(name: String, description: String, quantity: Int, decimals: Int, isReissuable: Boolean, compiledScript: Script|Unit, nonce: Int)
or
Issue(name: String, description: String, quantity: Int, decimals: Int, isReissuable: Boolean)
In the second case, compiledScript = unit
and nonce = 0
values are inserted automatically.
# Fields
# | Name | Data type | Description |
---|---|---|---|
1 | name | String | Token name |
2 | description | String | Token description |
3 | quantity | Int | Amount of the token. Set to 1 for NFT |
4 | decimals | Int | Number of digits in decimal part. Set to 0 for NFT |
5 | isReissuable | Boolean | Reissue ability flag. Set to false for NFT |
6 | compiledScript | Script|Unit | Set it to unit . Smart asset issue is currently unavailable |
7 | nonce | Int | Nonce that is used for token ID generation. If the callable function issues several tokens with the same parameters, you should use different nonce, see the example |
# Examples
# Regular Token Issue
Issue("RegularToken", "This is an ordinary token", 10000, 2, true)
The structure sets the following parameters of token:
- Name: RegularToken
- Description: This is an ordinary token
- Amount of tokens to issue: 100 (value of 10 000 is specified in the minimum fraction — “cents”)
- Amount of decimals: 2
- Reissue ability: yes
# Multiple Tokens Issue
[
Issue("RegularToken", "This is an ordinary token", 10000, 2, true, unit, 0),
Issue("RegularToken", "This is an ordinary token", 10000, 2, true, unit, 1)
]
# NFT Issue
Issue("UberToken", "The ultimate token. One and only.", 1, 0, false)
The structure sets the following parameters of token:
- Name: UberToken
- Description: The ultimate token. One and only
- Amount of tokens to issue: 1
- Amount of decimals: 0
- Reissue ability: no