# Asset
Structure of a token. The structure is returned by the assetInfo built-in function.
# Constructor
Asset(id: ByteVector, quantity: Int, decimals: Int, issuer: Address, issuerPublicKey: ByteVector, reissuable: Boolean, scripted: Boolean, minSponsoredFee: Int|Unit, name: String, description: String)
# Fields
# | Name | Data type | Description |
---|---|---|---|
1 | id | ByteVector | Token ID |
2 | quantity | Int | Amount of issued token, multiplied by 10decimals. Up to 9 223 372 036 854 775 806 |
3 | decimals | Int | Number of decimal places, 0 to 8 |
4 | issuer | Address | Address of the account that issued a token |
5 | issuerPublicKey | ByteVector | Public key of the account that issued a token |
6 | reissuable | Boolean | true — token can be reissued, false — cannot be reissued |
7 | scripted | Boolean | true — smart asset, false — regular token |
8 | minSponsoredFee | Int|Unit | Amount of asset that is equivalent to 0.001 WAVES (100,000 WAVELET), specified in the minimum fraction (“cents”) of asset. See the Sponsored fee articleunit : sponsorship is disabled. |
9 | name | String | Token name, up to 16 characters |
10 | description | String | Token description, up to 1000 characters |
# Example
Get the account balance in a given asset:
let address=base58'3Mw48B85LvkBUhhDDmUvLhF9koAzfsPekDb'
let assetId=base58'GpxmxorKXLz1V7xootrvGyFgqP2tTTBib5HEm8QGZTHX'
assetBalance(Address(address), assetId)