pub type TokenFreezeTransaction = Transaction<TokenFreezeTransactionData>;
Expand description

Freezes transfers of the specified token for the account. Must be signed by the Token’s freezeKey.

Once executed the Account is marked as Frozen and will not be able to receive or send tokens unless unfrozen. The operation is idempotent.

  • If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID.
  • If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED.
  • If the provided token is not found, the transaction will resolve to INVALID_TOKEN_ID.
  • If the provided token has been deleted, the transaction will resolve to TOKEN_WAS_DELETED.
  • If an Association between the provided token and account is not found, the transaction will resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT.
  • If no Freeze Key is defined, the transaction will resolve to TOKEN_HAS_NO_FREEZE_KEY.

Aliased Type§

struct TokenFreezeTransaction { /* private fields */ }

Implementations§

source§

impl TokenFreezeTransaction

source

pub fn get_account_id(&self) -> Option<AccountId>

Returns the account to be frozen.

source

pub fn account_id(&mut self, account_id: AccountId) -> &mut Self

Sets the account to be frozen.

source

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

Returns the toke nfor which the account will be frozen.

source

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

Sets the token for which the account will be frozen.