Open
Description
I noticed that the Pausable
contract can be optimized for gas usage by adopting a similar mechanism used in the ReentrancyGuard
contract.
💻 Environment
OpenZeppelin Contracts 4.9.3
📝 Details
The ReentrancyGuard
contract uses uint256
constants to avoid the extra gas costs associated with boolean operations. This mechanism can be applied to the Pausable
contract to make it more gas-efficient.
🔢 Code to reproduce bug