Function diem_transaction_builder::stdlib::encode_unfreeze_account_script_function[][src]

pub fn encode_unfreeze_account_script_function(
    sliding_nonce: u64,
    to_unfreeze_account: AccountAddress
) -> TransactionPayload
Expand description

Summary

Unfreezes the account at address. The sending account of this transaction must be the Treasury Compliance account. After the successful execution of this transaction transactions may be sent from the previously frozen account, and coins may be sent and received.

Technical Description

Sets the AccountFreezing::FreezingBit to false and emits a AccountFreezing::UnFreezeAccountEvent. The transaction sender must be the Treasury Compliance account. Note that this is a per-account property so unfreezing a Parent VASP will not effect the status any of its child accounts and vice versa.

Events

Successful execution of this script will emit a AccountFreezing::UnFreezeAccountEvent with the unfrozen_address set the to_unfreeze_account’s address.

Parameters

NameTypeDescription
tc_accountsignerThe signer of the sending account of this transaction. Must be the Treasury Compliance account.
sliding_nonceu64The sliding_nonce (see: SlidingNonce) to be used for this transaction.
to_unfreeze_accountaddressThe account address to be frozen.

Common Abort Conditions

Error CategoryError ReasonDescription
Errors::NOT_PUBLISHEDSlidingNonce::ESLIDING_NONCEA SlidingNonce resource is not published under account.
Errors::INVALID_ARGUMENTSlidingNonce::ENONCE_TOO_OLDThe sliding_nonce is too old and it’s impossible to determine if it’s duplicated or not.
Errors::INVALID_ARGUMENTSlidingNonce::ENONCE_TOO_NEWThe sliding_nonce is too far in the future.
Errors::INVALID_ARGUMENTSlidingNonce::ENONCE_ALREADY_RECORDEDThe sliding_nonce has been previously recorded.
Errors::REQUIRES_ADDRESSCoreAddresses::ETREASURY_COMPLIANCEThe sending account is not the Treasury Compliance account.

Related Scripts

  • TreasuryComplianceScripts::freeze_account