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

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.