Skip to main content

Owner Two Step Data Module

@perfect-abstractions/compose/access/Owner/TwoSteps/Data/OwnerTwoStepDataMod.sol

Heper functions for two step ownership access

Key Features
  • Single slot erc8042:erc173.owner.pending (keccak256("erc173.owner.pending")), shared with Owner Two Step Transfer Module, renounce/two-step flows, and Owner Two Step Data Facet.
  • File-level getStorage() returns a PendingOwnerStorage pointer; pendingOwner() reads pendingOwner (or address(0) when unset).
  • Read-only from this module `.
Module Usage

Import this module into facets or shared setup code. Its helpers are file-level (effectively internal to your compilation unit). Use them from your facet’s external entrypoints or other modules.

Storage follows the diamond slot in this file; any code using the same STORAGE_POSITION shares state.

See Facets & Modules for more information.

Storage

State Variables

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

PendingOwnerStorage

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

Functions

getStorage

Returns a storage pointer to PendingOwnerStorage at STORAGE_POSITION using inline assembly.

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

Returns:

PropertyTypeDescriptionsPendingOwnerStorage storageThe pending-owner struct in diamond storage.

pendingOwner

Returns getStorage().pendingOwner.

function pendingOwner() view returns (address);

Returns:

PropertyTypeDescription-addressThe pending owner, or address(0) when no transfer is pending.

Best Practices

Integration Notes

PendingOwnerStorage lives at keccak256("erc173.owner.pending"). Any code using that slot—including modules that define their own accessor with the same hash—shares the same pendingOwner field.

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.