I'm a newbie solidity
I have a question about the security smart contract.
I want to use the modifier whenNotPaused
of Pausable. If the smart contract is paused, then the functions transfer
, approve
, and burn
will not be active.
And my code is
function _transfer(address sender,address recipient,uint256 amount)
internal
virtual
override
whenNotPaused
{
super._transfer(sender, recipient, amount);
}
function _approve(address owner,address spender,uint256 amount)
internal
virtual
override
whenNotPaused
{
super._approve(owner, spender, amount);
}
function _burn(address account, uint256 amount)
internal
virtual
override
whenNotPaused
{
super._burn(account, amount);
}
I don't know if I should override the public function or internal function.
Is that ok? Can anyone help me? I use solidity version 0.8.7
ERC20Burnable
andPausable
. it's all part of openzeppelin