ERC20Burnable
Functionality available for contracts that inherit the
ERC20
and
ERC20Burnable
extensions.
Allows you to burn tokens (take them out of circulation).
burn
Burn tokens held by the connected wallet.
# The amount of this token you want to burn
amount = 1.2
tx_result = contract.erc20.burn(amount)
Configuration
amount
The amount of this token you want to burn.
Must be a float
.
tx_result = contract.erc20.burn(
1.2 # The amount of tokens to burn (e.g. 1.2)
)
burn_from
Burn tokens held by a specified wallet (requires allowance
).
# Address of the wallet sending the tokens
holder_address = "{{wallet_address}}"
# The amount of this token you want to burn
amount = 1.2
tx_result = contract.erc20.burn_from(holder_address, amount);
Configuration
holder
The address of the wallet holding to burn tokens from.
Must be a string
.
tx_result = contract.erc20.burn_from(
"{{wallet_address}}", # The address of the wallet holding the tokens to burn
1.2 # The amount of tokens to burn (e.g. 1.2)
)
amount
The amount of this token you want to burn.
Must be a float
.
tx_result = contract.erc20.burn_from(
"{{wallet_address}}", # The address of the wallet holding the tokens to burn
1.2 # The amount of tokens to burn (e.g. 1.2)
)