Owner Two Step Renounce Facet
Renounce ownership and clear pending owner for two-step ERC-173 diamonds
Key Features
renounceOwnership()clears owner and pending owner in one call.- Owner-only function; otherwise reverts
OwnerUnauthorizedAccount. - Emits
OwnershipTransferredtoaddress(0).
Storage
State Variables
| Property | Type | Description |
|---|---|---|
OWNER_STORAGE_POSITION | bytes32 | Owner storage position within the diamond (Value: keccak256("erc173.owner")) |
PENDING_OWNER_STORAGE_POSITION | bytes32 | Pending owner storage position within the diamond (Value: keccak256("erc173.owner.pending")) |
OwnerStorage
PendingOwnerStorage
Functions
renounceOwnership
Requires msg.sender to equal the stored owner; otherwise reverts OwnerUnauthorizedAccount. Sets owner to address(0), sets pendingOwner to address(0), and emits OwnershipTransferred(previousOwner, address(0)). After success, owner-only checks that read this storage should no longer authorize any account.
Events
Errors
Best Practices
- Only the current owner can renounce; there is no pending step for renounce itself, but clearing
pendingOwneravoids leaving a nominated successor after you renounce
Security Considerations
Renouncing is immediate and irreversible on-chain: the owner becomes address(0) in the same transaction.
Was this helpful?
Last updated: