Skip to main content

ERC20Burnable

Functionality available for contracts that implement the IERC20 and IBurnableERC20 interfaces.

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
const amount = 1.2;

const txResult = await contract.erc20.burn(amount);
Configuration

amount​

The amount of this token you want to burn.

Must be a string or a number.

const txResult = await contract.erc20.burn(
1.2, // The amount of tokens to burn (e.g. 1.2)
);

burnFrom​

Burn tokens held by a specified wallet (requires allowance).

// Address of the wallet sending the tokens
const holderAddress = "{{wallet_address}}";

// The amount of this token you want to burn
const amount = 1.2;

const txResult = await contract.erc20.burnFrom(holderAddress, amount);
Configuration

holder​

The address of the wallet holding to burn tokens from.

Must be a string.

const txResult = await contract.erc20.burnFrom(
"{{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 string or a number.

const txResult = await contract.erc20.burnFrom(
"{{wallet_address}}", // The address of the wallet holding the tokens to burn
1.2, // The amount of tokens to burn (e.g. 1.2)
);