Skip to main content

Owner Renounce Facet

Renounce ERC-173 ownership for diamonds

Key Features
  • External renounceOwnership() sets OwnerStorage.owner to address(0) (same slot as owner() on OwnerDataFacet).
  • Reverts OwnerUnauthorizedAccount for non-owners; emits OwnershipTransferred(previousOwner, address(0)) on success.

Storage

State Variables

PropertyTypeDescription
STORAGE_POSITIONbytes32Owner storage position within the diamond (Value: keccak256("erc173.owner"))

OwnerStorage

Definition
/** storage-location erc8042:erc173.owner */
struct OwnerStorage {
address owner;
}

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.

function renounceOwnership() external;

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:

Newsletter

Get notified about releases, feature announcements, and technical deep-dives on building smart contracts with Compose.

No spam. Unsubscribe anytime.