Type Alias hedera::TokenMintTransaction

source ·
pub type TokenMintTransaction = Transaction<TokenMintTransactionData>;
Expand description

Mints tokens to the Token’s treasury Account.

The operation increases the Total Supply of the Token. The maximum total supply a token can have is 2^63-1.

The amount provided must be in the lowest denomination possible. Example: Token A has 2 decimals. In order to mint 100 tokens, one must provide amount of 10000. In order to mint 100.55 tokens, one must provide amount of 10055.

  • If no Supply Key is defined, the transaction will resolve to TokenHasNoSupplyKey.
  • If both amount and metadata list get filled, a InvalidTransactionBody response code will be returned.
  • If the metadata list contains metadata which is too large, a MetadataTooLong response code will be returned.
  • If neither the amount nor the metadata list get filled, a InvalidTokenMintAmount response code will be returned.
  • If the metadata list count is greater than the batch size limit global dynamic property, a BatchSizeLimitExceeded response code will be returned.

Aliased Type§

struct TokenMintTransaction { /* private fields */ }

Implementations§

source§

impl TokenMintTransaction

source

pub fn get_token_id(&self) -> Option<TokenId>

Returns the token for which to mint tokens.

source

pub fn token_id(&mut self, token_id: impl Into<TokenId>) -> &mut Self

Sets the token for which to mint tokens.

source

pub fn get_amount(&self) -> u64

Returns the amount of a fungible token to mint to the treasury account.

source

pub fn amount(&mut self, amount: u64) -> &mut Self

Sets the amount of a fungible token to mint to the treasury account.

source

pub fn get_metadata(&self) -> &[Vec<u8>]

Returns the list of metadata for a non-fungible token to mint to the treasury account.

source

pub fn metadata<Bytes>( &mut self, metadata: impl IntoIterator<Item = Bytes> ) -> &mut Self
where Bytes: AsRef<[u8]>,

Sets the list of metadata for a non-fungible token to mint to the treasury account.