Recently I am facing an issue while working on a smart contract that has staking functionality. Through the IERC20 interface, I manage to interact with Erc20 token from another contract but there is still one confusion left. I am working on a smart contract in which users can stake my token(token is already deployed in network) in smart contract and when the staking duration ends stakeholder can get their staking amount along with the rewarded token. For rewarded tokens I want to mint new tokens to give rewards to the stakeholder in my smart contract. How can I use the mint function in another smart contract? I want to use the Erc20 mint function in my staking smart contract. Waiting for your positive response.
IERC20 private _token;
constructor(IERC20 token) {
_mytoken = token;
}
transfer and approve is working perfectly but there is no option of mint in IERC20
_mytoken.approve(address(this),quantity);
_mytoken.safeTransferFrom(msg.sender,address(this),quantity);