pub struct AssetConfigTransactionFields {Show 13 fields
pub header: TransactionHeader,
pub asset_id: u64,
pub total: Option<u64>,
pub decimals: Option<u32>,
pub default_frozen: Option<bool>,
pub asset_name: Option<String>,
pub unit_name: Option<String>,
pub url: Option<String>,
pub metadata_hash: Option<[u8; 32]>,
pub manager: Option<Address>,
pub reserve: Option<Address>,
pub freeze: Option<Address>,
pub clawback: Option<Address>,
}
Expand description
Represents an asset configuration transaction that creates, reconfigures, or destroys assets.
Fields§
§header: TransactionHeader
Common transaction header fields.
asset_id: u64
ID of the asset to operate on.
For asset creation, this must be 0. For asset reconfiguration this is the ID of the existing asset to be reconfigured, For asset destroy this is the ID of the existing asset to be destroyed.
total: Option<u64>
The total amount of the smallest divisible (decimal) unit to create.
Required when creating a new asset. For example, if creating a asset with 2 decimals and wanting a total supply of 100 units, this value should be 10000.
This field can only be specified upon asset creation.
decimals: Option<u32>
The amount of decimal places the asset should have.
If unspecified then the asset will be in whole units (i.e. 0
).
- If 0, the asset is not divisible;
- If 1, the base unit of the asset is in tenths;
- If 2, the base unit of the asset is in hundredths;
- If 3, the base unit of the asset is in thousandths;
and so on up to 19 decimal places.
This field can only be specified upon asset creation.
default_frozen: Option<bool>
Whether the asset is frozen by default for all accounts.
Defaults to false
.
If true
then for anyone apart from the creator to hold the
asset it needs to be unfrozen per account using an asset freeze
transaction from the freeze
account, which must be set on creation.
This field can only be specified upon asset creation.
asset_name: Option<String>
The optional name of the asset.
Max size is 32 bytes.
This field can only be specified upon asset creation.
unit_name: Option<String>
The optional name of the unit of this asset (e.g. ticker name).
Max size is 8 bytes.
This field can only be specified upon asset creation.
url: Option<String>
Specifies an optional URL where more information about the asset can be retrieved (e.g. metadata).
Max size is 96 bytes.
This field can only be specified upon asset creation.
metadata_hash: Option<[u8; 32]>
32-byte hash of some metadata that is relevant to your asset and/or asset holders.
The format of this metadata is up to the application.
This field can only be specified upon asset creation.
manager: Option<Address>
The address of the optional account that can manage the configuration of the asset and destroy it.
The configuration fields it can change are manager
, reserve
, clawback
, and freeze
.
If not set or set to the Zero address the asset becomes permanently immutable.
reserve: Option<Address>
The address of the optional account that holds the reserve (uncirculated supply) units of the asset.
This address has no specific authority in the protocol itself and is informational only.
Some standards like ARC-19 rely on this field to hold meaningful data.
It can be used in the case where you want to signal to holders of your asset that the uncirculated units of the asset reside in an account that is different from the default creator account.
If not set or set to the Zero address the field is permanently empty.
freeze: Option<Address>
The address of the optional account that can be used to freeze or unfreeze holdings of this asset for any account.
If empty, freezing is not permitted.
If not set or set to the Zero address the field is permanently empty.
clawback: Option<Address>
The address of the optional account that can clawback holdings of this asset from any account.
This field should be used with caution as the clawback account has the ability to unconditionally take assets from any account.
If empty, clawback is not permitted.
If not set or set to the Zero address the field is permanently empty.
Implementations§
Source§impl AssetConfigTransactionFields
impl AssetConfigTransactionFields
pub fn validate_for_creation( &self, ) -> Result<(), Vec<TransactionValidationError>>
pub fn validate_for_reconfigure( &self, ) -> Result<(), Vec<TransactionValidationError>>
Trait Implementations§
Source§impl Clone for AssetConfigTransactionFields
impl Clone for AssetConfigTransactionFields
Source§fn clone(&self) -> AssetConfigTransactionFields
fn clone(&self) -> AssetConfigTransactionFields
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AssetConfigTransactionFields
impl Debug for AssetConfigTransactionFields
Source§impl PartialEq for AssetConfigTransactionFields
impl PartialEq for AssetConfigTransactionFields
Source§fn eq(&self, other: &AssetConfigTransactionFields) -> bool
fn eq(&self, other: &AssetConfigTransactionFields) -> bool
self
and other
values to be equal, and is used by ==
.