Issues with web3 and _burn functions

Have deployed and verified a few contracts (with inheritance from OpenZeppelin’s ERC20.sol and ERC20Burnable.sol) but can’t interact via Web3 with any functions regarding _burn, burn (both with ERC20 and ERC20Burnable) . have tried remix, etherscan, and mew. I’m assuming I can just write the code for _burn in the abi section of mew.? will have to test further.

The code looks right but my interacting with contracts is limited so I could be missing something obvious. Perhaps I need to create a tx first to another address?
Perhaps not all functions with Web3 show up and have to be manually entered?

have checked a few of the older topics which seem to warn of deflationary tokens? but would just like to test the burn functions.

Thanks again!

:computer: Environment
OpenZeppelin 4.1 inheritances. 0.8.0 Compiler. Deployed and Verified contracts.
Have tried on both Chrome and Brave browsers.

:1234: Code to reproduce

ERC20 code from verified contract

function _burn(address account, uint256 amount) internal virtual {
    require(account != address(0), "ERC20: burn from the zero address");

    _beforeTokenTransfer(account, address(0), amount);

    uint256 accountBalance = _balances[account];
    require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
    _balances[account] = accountBalance - amount;
    _totalSupply -= amount;

    emit Transfer(account, address(0), amount);

ERC20Burnable code from verified contract

function burn(uint256 amount) public virtual {
    _burn(_msgSender(), amount);

 * @dev Destroys `amount` tokens from `account`, deducting from the caller's
 * allowance.
 * See {ERC20-_burn} and {ERC20-allowance}.
 * Requirements:
 * - the caller must have allowance for ``accounts``'s tokens of at least
 * `amount`.
function burnFrom(address account, uint256 amount) public virtual {
    uint256 currentAllowance = allowance(account, _msgSender());
    require(currentAllowance >= amount, "ERC20: burn amount exceeds allowance");
    _approve(account, _msgSender(), currentAllowance - amount);
    _burn(account, amount);


Going over the Open Zeppelin documents. To put it simpler how would one input any of these functions? read only? Is it through abi only? a secondary contract calling on these functions?

_burn(address account, uint256 amount) internal

Destroys amount tokens from account , reducing the total supply.

Emits a transfer event with to set to the zero address.


  • account cannot be the zero address.
  • account must have at least amount tokens.

_approve(address owner, address spender, uint256 amount) internal

Sets amount as the allowance of spender over the owners tokens.

This is internal function is equivalent to approve , and can be used to e.g. set automatic allowances for certain subsystems, etc.

Emits an Approval event.


  • owner cannot be the zero address.
  • spender cannot be the zero address.

_burnFrom(address account, uint256 amount) internal

Destroys amount tokens from account . amount is then deducted from the caller’s allowance.

See _burn and _approve .

So this was sorta solved via msg. I guess when flattening you have to make sure calls to the _burn function are set to public. seems to work for me now. thanks