Type Alias hedera::TokenWipeTransaction
source · pub type TokenWipeTransaction = Transaction<TokenWipeTransactionData>;
Expand description
Wipes the provided amount of tokens from the specified Account. Must be signed by the Token’s Wipe key.
On success, tokens are removed from the account and the total supply of the token is decreased by the wiped amount.
The amount provided is in the lowest denomination possible. Example: Token A has 2 decimals. In order to wipe 100 tokens from account, one must provide amount of 10000. In order to wipe 100.55 tokens, one must provide amount of 10055.
- 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 Wipe Key is not present in the Token, transaction results in
TOKEN_HAS_NO_WIPE_KEY
. - If the provided account is the Token’s Treasury Account, transaction results in
CANNOT_WIPE_TOKEN_TREASURY_ACCOUNT
- If both amount and serialNumbers get filled, a
INVALID_TRANSACTION_BODY
response code will be returned. - If neither the amount nor the serialNumbers get filled, a
INVALID_WIPING_AMOUNT
response code will be returned. - If the serialNumbers list contains a non-positive integer as a serial number, a
INVALID_NFT_ID
response code will be returned. - If the serialNumbers’ list count is greater than the batch size limit global dynamic property, a
BATCH_SIZE_LIMIT_EXCEEDED
response code will be returned.
Aliased Type§
struct TokenWipeTransaction { /* private fields */ }
Implementations§
source§impl TokenWipeTransaction
impl TokenWipeTransaction
sourcepub fn get_account_id(&self) -> Option<AccountId>
pub fn get_account_id(&self) -> Option<AccountId>
Returns the account to be wiped.
sourcepub fn account_id(&mut self, account_id: AccountId) -> &mut Self
pub fn account_id(&mut self, account_id: AccountId) -> &mut Self
Sets the account to be wiped.
sourcepub fn get_token_id(&self) -> Option<TokenId>
pub fn get_token_id(&self) -> Option<TokenId>
Returns the token for which the account will be wiped.
sourcepub fn token_id(&mut self, token_id: impl Into<TokenId>) -> &mut Self
pub fn token_id(&mut self, token_id: impl Into<TokenId>) -> &mut Self
Sets the token for which the account will be wiped.
sourcepub fn get_amount(&self) -> Option<u64>
pub fn get_amount(&self) -> Option<u64>
Returns the amount of a fungible token to wipe from the specified account.
sourcepub fn amount(&mut self, amount: impl Into<u64>) -> &mut Self
pub fn amount(&mut self, amount: impl Into<u64>) -> &mut Self
Sets the amount of a fungible token to wipe from the specified account.
sourcepub fn get_serials(&self) -> &[u64]
pub fn get_serials(&self) -> &[u64]
Returns the serial numbers of a non-fungible token to wipe from the specified account.
sourcepub fn serials(&mut self, serials: impl IntoIterator<Item = u64>) -> &mut Self
pub fn serials(&mut self, serials: impl IntoIterator<Item = u64>) -> &mut Self
Sets the serial numbers of a non-fungible token to wipe from the specified account.