Skip to main content

Owner Two Step Renounce Facet

@perfect-abstractions/compose/access/Owner/TwoSteps/Renounce/OwnerTwoStepRenounceFacet.sol

Renounce the two step ownership of your diamonds

Key Features
  • renounceOwnership() clears owner and pending owner in one call.
  • Owner-only function; otherwise reverts OwnerUnauthorizedAccount.

Storage

State Variables

PropertyTypeDescription
OWNER_STORAGE_POSITIONbytes32Owner storage position within the diamond (Value: keccak256("erc173.owner"))
PENDING_OWNER_STORAGE_POSITIONbytes32Pending owner storage position within the diamond (Value: keccak256("erc173.owner.pending"))

OwnerStorage

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

PendingOwnerStorage

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

Functions

renounceOwnership

Renounce the diamond ownership while clearing any pending owner. Requires msg.sender to equal the current owner; otherwise reverts OwnerUnauthorizedAccount.

function renounceOwnership() external;

Events

Errors

Best Practices

  • Only the current owner can renounce; there is no pending step for renounce itself, but clearing pendingOwner avoids leaving a nominated successor after you renounce

Security Considerations

Renouncing is an immediate and irreversible on-chain action: you will lose access to all owner gated functionality inside your diamond.

Last updated:

Newsletter

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

No spam. Unsubscribe anytime.