The Contract
View Contract Code
View Contract Code
How It Works
Self-burn authenticates the burner
burnFrom enforces an allowance
transferFrom but the destination is the burn (no to
parameter). The spender must have a non-zero _allowances[account][spender]
entry of at least amount.
Invariants
currentBalance >= amount— caller can’t burn more than they hold._totalSupply >= amount— defensive check; should always hold given the previous invariant, but cheap to assert.- Both writes happen in sequence so
sum(balances) == _totalSupplystays true.
Privacy Note
What’s Next
Minting Tokens
Learn how to create new tokens
ERC20 Token
Complete token with burning