pub struct AssetParams {
    pub asset_name: Option<String>,
    pub decimals: Option<u32>,
    pub default_frozen: Option<bool>,
    pub total: Option<u64>,
    pub unit_name: Option<String>,
    pub meta_data_hash: Option<Vec<u8>>,
    pub url: Option<String>,
    pub clawback: Option<Address>,
    pub freeze: Option<Address>,
    pub manager: Option<Address>,
    pub reserve: Option<Address>,
}
Expand description

This is used to create or configure an asset.

Fields

asset_name: Option<String>

The name of the asset. Supplied on creation. Example: Tether

decimals: Option<u32>

The number of digits to use after the decimal point when displaying the asset. 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.

default_frozen: Option<bool>

True to freeze holdings for this asset by default.

total: Option<u64>

The total number of base units of the asset to create. This number cannot be changed.

unit_name: Option<String>

The name of a unit of this asset. Supplied on creation. Example: USDT

meta_data_hash: Option<Vec<u8>>

This field is intended to be a 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 creation. An example might be the hash of some certificate that acknowledges the digitized asset as the official representation of a particular real-world asset.

url: Option<String>

Specifies a URL where more information about the asset can be retrieved. Max size is 32 bytes.

clawback: Option<Address>

The address of the account that can clawback holdings of this asset. If empty, clawback is not permitted.

freeze: Option<Address>

The address of the account used to freeze holdings of this asset. If empty, freezing is not permitted.

manager: Option<Address>

The address of the account that can manage the configuration of the asset and destroy it.

reserve: Option<Address>

The address of the account that holds the reserve (non-minted) units of the asset. This address has no specific authority in the protocol itself. It is used in the case where you want to signal to holders of your asset that the non-minted units of the asset reside in an account that is different from the default creator account (the sender).

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.