Owner Two Step Data Module
Diamond storage and read helpers for ERC-173 pending owner (two-step)
- 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 aPendingOwnerStoragepointer;pendingOwner()readspendingOwner(oraddress(0)when unset). - Read-only from this module’s perspective—facets or modules that perform two-step transfer/renounce write
pendingOwner.
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
| Property | Type | Description |
|---|---|---|
STORAGE_POSITION | bytes32 | Pending owner storage position within the diamond (Value: keccak256("erc173.owner.pending")) |
PendingOwnerStorage
Functions
getStorage
Returns a storage pointer to PendingOwnerStorage at STORAGE_POSITION using inline assembly.
Returns:
| Property | Type | Description |
|---|---|---|
s | PendingOwnerStorage storage | The pending-owner struct in diamond storage. |
pendingOwner
Returns getStorage().pendingOwner.
Returns:
| Property | Type | Description |
|---|---|---|
- | address | The pending owner, or address(0) when no transfer is pending. |
Best Practices
- Import this module (or match the same slot and struct) when adding facets so pending-owner reads stay aligned with Owner Two Step Data Facet and two-step transfer/renounce code.
- Coordinate writes with two-step transfer or renounce modules (or facets built on them); this module does not assign
pendingOwneritself. - For read-only access through the diamond proxy, register Owner Two Step Data Facet and expose
pendingOwner()externally.
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.