Skip to main content

Owner Renounce Module

@perfect-abstractions/compose/access/Owner/Renounce/OwnerRenounceMod.sol

Helper functions for renouncing ownership and storage access.

Storage​

State Variables​

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

OwnerStorage​

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

Functions​

getStorage​

Returns a pointer to the OwnerStorage struct.

function getStorage() pure returns (OwnerStorage storage s);

Returns:

PropertyTypeDescriptionsOwnerStorage storageThe struct in storage.

renounceOwnership​

Internal renounce path: requires msg.sender to be the current owner before setting the owner to address(0)

function renounceOwnership();

Events​

Errors​

Best Practices​

Integration Notes​

OwnerStorage lives at keccak256("erc173.owner") inside the diamond. The same slot as OwnerDataMod, OwnerDataFacet, and OwnerRenounceFacet. Renouncing here updates what owner() reads elsewhere.

Last updated:

Newsletter

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

No spam. Unsubscribe anytime.