How to use burn function via IERC20

Hi;

My token contract erc20Burnable and second contract for staking and all function perfectly fine but burn function. As you know, IERC20 Interface doesnt have burn function, how to add a burn function to my staking smart contract? how to use burn function (like token.transfer()) in IERC20 Interface?

thanks.

1 Like

Hi @unigot,

Welcome to the community :wave:

IERC20 is an interface of the ERC20 standard as defined in the EIP. See:
https://docs.openzeppelin.com/contracts/3.x/api/token/erc20#IERC20

You could import your token to interact with it, or you could create a new interface containing the functions you want to call (including burn) and interact via the interface.

1 Like

Im gonna try, thanks.

1 Like