Hi
I created a testnet token using the templated Openzeppelin erc20 code and the full set of imports
import "@openzeppelin/contracts@4.8.0/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts@4.8.0/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts@4.8.0/token/ERC20/extensions/ERC20Snapshot.sol";
import "@openzeppelin/contracts@4.8.0/access/Ownable.sol";
import "@openzeppelin/contracts@4.8.0/security/Pausable.sol";
import "@openzeppelin/contracts@4.8.0/token/ERC20/extensions/draft-ERC20Permit.sol";
import "@openzeppelin/contracts@4.8.0/token/ERC20/extensions/ERC20Votes.sol";
import "@openzeppelin/contracts@4.8.0/token/ERC20/extensions/ERC20FlashMint.sol";
I compiled the file several times (testnet token wasn't showing in metamask quickly enough:) so minted way more than intended.
Now I want to burn the excess
On reading how to do this, it seemed quite simple; in the burn function code section, I believed i simply needed to add account address and amount to burn, connect to metamask and recompile, as below (account address changed)
function _burn(address account, uint256 amount)
internal
override(ERC20, ERC20Votes)
{
super._burn(0xb680s76w543sf8912b4eb3a9002fefacc692a2a9, 3000000000000);
also tried
function _burn(address 0xb680s76w543sf8912b4eb3a9002fefacc692a2a9, uint256 3000000000000)
internal
override(ERC20, ERC20Votes)
{
super._burn(account, amount);
}
however, this gave me the following errors
ParserError: Expected ',' but got 'Number'
Are both of these locations NOT where I need to insert the account and the amount to achieve the burn?
And if not, where am I to specify (and in what format) the account address and burn amount?