[][src]Function transaction_builder::encode_update_minting_ability_script

pub fn encode_update_minting_ability_script(
    currency: TypeTag,
    allow_minting: bool
) -> Script


Script to allow or disallow minting of new coins in a specified currency. This transaction can only be sent by the Treasury Compliance account. Turning minting off for a currency will have no effect on coins already in circulation, and coins may still be removed from the system.

Technical Description

This transaction sets the can_mint field of the Libra::CurrencyInfo<Currency> resource published under 0xA550C18 to the value of allow_minting. Minting of coins if allowed if this field is set to true and minting of new coins in Currency is disallowed otherwise. This transaction needs to be sent by the Treasury Compliance account.


CurrencyTypeThe Move type for the Currency whose minting ability is being updated. Currency must be an already-registered currency on-chain.
account&signerSigner reference of the sending account. Must be the Libra Root account.
allow_mintingboolWhether to allow minting of new coins in Currency.

Common Abort Conditions

Error CategoryError ReasonDescription
Errors::REQUIRES_ADDRESSCoreAddresses::ETREASURY_COMPLIANCEtc_account is not the Treasury Compliance account.
Errors::NOT_PUBLISHEDLibra::ECURRENCY_INFOCurrency is not a registered currency on-chain.

Related Scripts