Based on your claim that you have seen internal _burn
function. I will assume the function in question is something like this
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal {
require(account != address(0), "ERC20: burn from the zero address");
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _totalSupply.sub(amount);
emit Transfer(account, address(0), amount);
}
The function above is usually found in ERC20.sol contract that is used in conjunction with ERC20Burnable.sol
ERC20Burnable.sol contains a function burn()
that will call the _burn()
from ERC20.sol
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public {
_burn(_msgSender(), amount);
}
I assume this is the case with the contracts you are looking at the moment. Therefore, there is probably no need to upgrade the contract. But I would need more info to help you here if that is not the case.