Skip to main content

Owner Two Step Data Facet

Read-only pending-owner data for ERC-173 two-step transfers in diamonds

Key Features
  • Exposes the pending owner via external pendingOwner() (read-only).
  • Shares PendingOwnerStorage at erc8042:erc173.owner.pending with OwnerTwoStepTransferFacet and other two-step owner contracts.

Storage

State Variables

PropertyTypeDescription
STORAGE_POSITIONbytes32Pending-owner storage position within the diamond (Value: keccak256("erc173.owner.pending"))

PendingOwnerStorage

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

Functions

pendingOwner

Returns the address stored in PendingOwnerStorage.pendingOwner.

function pendingOwner() external view returns (address);

Returns:

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

Best Practices

  • Avoid defining another facet that reads or writes a different slot for pending owner; keep pending-owner state at erc173.owner.pending.
  • The current owner in the Two-Step Ownership is stored in the same OwnerStorage as the single-step ownership. Reuse the storage struct to ensure composability.
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.