Skip to content

Owned ​

Git Source

Author: Solmate (https://github.com/transmissions11/solmate/blob/effa6fb87f0059ddab2d2f2dcd1d61b559f74dca/src/auth/Owned.sol)

Simple single owner authorization mixin.

Vendored MIT copy, reverting with a custom error instead of a string. Solmate is not a project dependency.

State Variables ​

owner ​

solidity
address public owner

Functions ​

onlyOwner ​

solidity
modifier onlyOwner() virtual;

constructor ​

solidity
constructor(address _owner) ;

transferOwnership ​

solidity
function transferOwnership(address newOwner) public virtual onlyOwner;

Events ​

OwnershipTransferred ​

solidity
event OwnershipTransferred(address indexed user, address indexed newOwner);

Errors ​

Access__Unauthorized ​

solidity
error Access__Unauthorized();