algokit_transact

Struct AssetConfigTransactionFields

Source
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

Source

pub fn validate_for_creation( &self, ) -> Result<(), Vec<TransactionValidationError>>

Source

pub fn validate_for_reconfigure( &self, ) -> Result<(), Vec<TransactionValidationError>>

Trait Implementations§

Source§

impl Clone for AssetConfigTransactionFields

Source§

fn clone(&self) -> AssetConfigTransactionFields

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AssetConfigTransactionFields

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for AssetConfigTransactionFields

Source§

fn eq(&self, other: &AssetConfigTransactionFields) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Validate for AssetConfigTransactionFields

Source§

impl StructuralPartialEq for AssetConfigTransactionFields

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.