# [Ride v5] Issue
⚠️ This is the documentation for the Standard library version 5. We recommend to use version 6. Go to version 6
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. From 4 to 16 bytes (1 character can take up to 4 bytes) |
2 | description | String | Token description. From 0 to 1000 bytes |
3 | quantity | Int | Amount of the token. Set to 1 for NFT |
4 | decimals | Int | Number of digits in decimal part, from 0 to 8. 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)
],
unit
)
# 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