Owner Renounce Facet
Renounce ERC-173 ownership for diamonds
Key Features
- External
renounceOwnership()setsOwnerStorage.ownertoaddress(0)(same slot asowner()onOwnerDataFacet). - Reverts
OwnerUnauthorizedAccountfor non-owners; emitsOwnershipTransferred(previousOwner, address(0))on success.
Storage
State Variables
| Property | Type | Description |
|---|---|---|
STORAGE_POSITION | bytes32 | Owner storage position within the diamond (Value: keccak256("erc173.owner")) |
OwnerStorage
Functions
renounceOwnership
Sets OwnerStorage.owner to address(0) if msg.sender is the current owner; otherwise reverts OwnerUnauthorizedAccount. Emits OwnershipTransferred(previousOwner, address(0)). After this call succeeds, owner-only operations that rely on the stored owner should no longer authorize anyone.
Events
Errors
Security Considerations
Renouncement is irreversible at the storage layer: once owner is zeroed, there is no way to rollback this action.
If you need extra security, you can use the TwoSteps Ownership module, which requires the owner to set a pending owner address before renouncing.
Was this helpful?
Last updated: