Owner Renounce Module
@perfect-abstractions/compose/access/Owner/Renounce/OwnerRenounceMod.solHelper functions for renouncing ownership and storage access.
Key Features
renounceOwnershipguards by requiringmsg.senderis the current owner.- Emits
OwnershipTransferredwithnewOwner == address(0).
Module Usage
Import this module into facets or shared setup code. See Facets & Modules for more information.
Storage
State Variables
| Property | Type | Description |
|---|---|---|
STORAGE_POSITION | bytes32 | Owner storage position within the diamond (Value: keccak256("erc173.owner")) |
OwnerStorage
Functions
getStorage
Returns a pointer to the OwnerStorage struct.
Returns:
| Property | Type | Description |
|---|---|---|
s | OwnerStorage storage | The struct in storage. |
renounceOwnership
Internal renounce path: requires msg.sender to be the current owner before setting the owner to address(0)
Events
Errors
Best Practices
- Call
renounceOwnershiponly from a trustedexternalwrapper after you intend to give up owner control permanently. - Keep the same
STORAGE_POSITIONandOwnerStoragelayout as other owner modules; do not fork a second owner slot.
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: