[][src]Function transaction_builder::encode_burn_txn_fees_script

pub fn encode_burn_txn_fees_script(coin_type: TypeTag) -> Script


Burns the transaction fees collected in the CoinType currency so that the Libra 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.


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


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_ARGUMENTLibra::ECOINThe collected fees in CoinType are zero.

Related Scripts