Optimize Ownable and Pausable modifiers' size impact (#3347)
This commit is contained in:
@ -29,6 +29,14 @@ abstract contract Ownable is Context {
|
||||
_transferOwnership(_msgSender());
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Throws if called by any account other than the owner.
|
||||
*/
|
||||
modifier onlyOwner() {
|
||||
_checkOwner();
|
||||
_;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Returns the address of the current owner.
|
||||
*/
|
||||
@ -37,11 +45,10 @@ abstract contract Ownable is Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Throws if called by any account other than the owner.
|
||||
* @dev Throws if the sender is not the owner.
|
||||
*/
|
||||
modifier onlyOwner() {
|
||||
function _checkOwner() internal view virtual {
|
||||
require(owner() == _msgSender(), "Ownable: caller is not the owner");
|
||||
_;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user