Function: burn(address burnToken, uint256 burnAmount)
This function allows burning the provided burnAmount of tokens. The amount to be burned per message is limited by the burnLimitsPerMessage, which is controlled by the _tokenController address.
Inputs
burnTokenControl: Full control.
Constraints: The
burnLimitsPerMessagefor theburnTokenmust not be zero. TheburnTokencontract must support theburnByBurnerOnlyfunctionality.Impact: The
burnByBurnerOnlyfunction of theburnTokencontract is executed to burn the provided amount of tokens.
burnAmountControl: Full control.
Constraints: The amount to be burned must not exceed the
burnLimitsPerMessagefor the burnToken.Impact: The amount of tokens to be burned.
Branches and code coverage
Intended branches
Tokens were burned successfully.
Negative behavior
The caller is not
localTokenMessengerThe
burnTokenis not supportedThe
burnAmountexceeds theburnLimitsPerMessage
Function call analysis
_token.burnByBurnerOnly(burnAmount)
What is controllable?
burnAmountIf the return value is controllable, how is it used and how can it go wrong? n/a
What happens if it reverts, reenters or does other unusual control flow? This function burns the specified amount of tokens and will revert if the contract does not own enough tokens to burn.