This commit is contained in:
PedroCailleret
2023-05-15 00:16:36 -03:00
parent d8147bd58e
commit 545887baec
16 changed files with 55 additions and 209 deletions

View File

@@ -4,6 +4,8 @@ pragma solidity >=0.8.4;
/// @notice Simple single owner authorization mixin.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/auth/Owned.sol)
abstract contract Owned {
error Unauthorized();
/*//////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
@@ -20,7 +22,7 @@ abstract contract Owned {
address public owner;
modifier onlyOwner() virtual {
require(msg.sender == owner, "UNAUTHORIZED");
if (msg.sender != owner) revert Unauthorized();
_;
}