Function diem_transaction_builder::stdlib::encode_burn_txn_fees_script[][src]

pub fn encode_burn_txn_fees_script(coin_type: TypeTag) -> Script
Expand description

Summary

Burns the transaction fees collected in the CoinType currency so that the Diem association may reclaim the backing coins off-chain. May only be sent by the Treasury Compliance account.

Technical Description

Burns the transaction fees collected in CoinType so that the association may reclaim the backing coins. Once this transaction has executed successfully all transaction fees that will have been collected in CoinType since the last time this script was called with that specific currency. Both balance and preburn fields in the TransactionFee::TransactionFee<CoinType> resource published under the 0xB1E55ED account address will have a value of 0 after the successful execution of this script.

Events

The successful execution of this transaction will emit a Diem::BurnEvent on the event handle held in the Diem::CurrencyInfo<CoinType> resource’s burn_events published under 0xA550C18.

Parameters

NameTypeDescription
CoinTypeTypeThe Move type for the CoinType being added to the sending account of the transaction. CoinType must be an already-registered currency on-chain.
tc_account&signerThe signer reference of the sending account of this transaction. Must be the Treasury Compliance account.

Common Abort Conditions

Error CategoryError ReasonDescription
Errors::REQUIRES_ADDRESSCoreAddresses::ETREASURY_COMPLIANCEThe sending account is not the Treasury Compliance account.
Errors::NOT_PUBLISHEDTransactionFee::ETRANSACTION_FEECoinType is not an accepted transaction fee currency.
Errors::INVALID_ARGUMENTDiem::ECOINThe collected fees in CoinType are zero.

Related Scripts

  • Script::burn
  • Script::cancel_burn