Skip to main content

IOwnership

Asset Tokenization Studio Team

IOwnership

Two-step ownership management interface scoped per diamond configuration.

Each diamond configId carries its own owner and pending-owner slot. Ownership transfer follows the OpenZeppelin Ownable2Step pattern: the current owner nominates a successor via {transferOwnership}, and the nominee must call {acceptOwnership} to finalise the handover. This guards against transfers to addresses that cannot operate the configuration. Implementations are expected to gate the entrypoints behind the configuration owner / pending owner checks and the global pause switch.

Methods​

acceptOwnership​

function acceptOwnership(bytes32 _configId) external nonpayable

Finalises an ownership handover initiated by the current owner.

Step two of the two-step transfer. Promotes the pending owner to owner and clears the pending slot. Emits {OwnershipAccepted}.

Parameters​

NameTypeDescription
_configIdbytes32Configuration whose pending handover is being accepted.

getOwner​

function getOwner(bytes32 _configId) external view returns (address owner_)

Returns the current owner of a configuration.

Parameters​

NameTypeDescription
_configIdbytes32Configuration to query.

Returns​

NameTypeDescription
owner_addressAddress that currently owns configId, or the zero address when no owner has been recorded.

getPendingOwner​

function getPendingOwner(bytes32 _configId) external view returns (address pendingOwner_)

Returns the pending owner of a configuration, if any.

Parameters​

NameTypeDescription
_configIdbytes32Configuration to query.

Returns​

NameTypeDescription
pendingOwner_addressAddress currently nominated to accept ownership, or the zero address when no transfer is in flight.

transferOwnership​

function transferOwnership(bytes32 _configId, address _newOwner) external nonpayable

Nominates _newOwner as the pending owner of _configId.

Step one of the two-step transfer. The current owner remains in control until _newOwner accepts the handover via {acceptOwnership}. Calling this again before acceptance overwrites the prior nomination. Emits {OwnershipTransfered}.

Parameters​

NameTypeDescription
_configIdbytes32Configuration whose ownership is being handed over.
_newOwneraddressAddress to record as pending owner.

Events​

OwnershipAccepted​

event OwnershipAccepted(bytes32 indexed configId, address previousOwner, address newOwner)

Emitted when the pending owner finalises the ownership handover.

Fired by {acceptOwnership} after the configuration owner has been updated and the pending owner slot cleared.

Parameters​

NameTypeDescription
configId indexedbytes32Configuration whose ownership has changed.
previousOwneraddressAddress that previously owned the configuration.
newOwneraddressCaller that accepted ownership and now holds the configuration.

OwnershipTransfered​

event OwnershipTransfered(bytes32 indexed configId, address owner, address pendingOwner)

Emitted when the current owner nominates a new owner for a configuration.

Fired by {transferOwnership} before the handover is accepted; the existing owner remains in control until {acceptOwnership} is invoked by newOwner.

Parameters​

NameTypeDescription
configId indexedbytes32Configuration whose ownership is being transferred.
owneraddressCurrent owner that initiated the transfer.
pendingOwneraddressAddress nominated as the pending owner.

Errors​

NotOwner​

error NotOwner(bytes32 configId, address sender, address owner)

Raised when the caller is not the current owner of the configuration.

Parameters​

NameTypeDescription
configIdbytes32Configuration that was accessed.
senderaddressCaller that attempted the owner-only action.
owneraddressAddress currently holding ownership of configId.

NotPendingOwner​

error NotPendingOwner(bytes32 configId, address sender, address pendingOwner)

Raised when the caller is not the pending owner of the configuration.

Parameters​

NameTypeDescription
configIdbytes32Configuration whose pending handover was targeted.
senderaddressCaller that attempted to accept ownership.
pendingOwneraddressAddress currently nominated as pending owner of configId.