Skip to main content

DiamondCutManagerWrapper

Asset Tokenization Studio Team

Diamond Cut Manager Wrapper

Provides internal helpers for registering and querying diamond configurations.

Manages versioned facet configurations used by resolver proxies. The wrapper resolves facet implementations through the business-logic resolver and records selector and interface lookup tables for efficient runtime dispatch.

Methods​

acceptOwnership​

function acceptOwnership(bytes32 _configId) external nonpayable

Finalises an ownership handover initiated by the current owner.

Gated by {onlyUnpaused} and {onlyConfigurationPendingOwner}: only the nominated pending owner can finalise the handover, and only while the diamond is unpaused. Snapshots the outgoing owner via {_getOwner} before overwriting it, promotes the caller to owner via {_setOwner}, and clears the pending slot via {_removePendingOwner}. Emits {OwnershipAccepted} with the captured previous owner and the caller as the new owner.

Parameters​

NameTypeDescription
_configIdbytes32Configuration whose pending handover is being accepted.

addSelectorsToBlacklist​

function addSelectorsToBlacklist(bytes32 _configurationId, bytes4[] _selectors) external nonpayable

Adds a list of selectors to the blacklist

Blacklisted selectors are rejected when future configurations register facet selectors for the same configuration.

Parameters​

NameTypeDescription
_configurationIdbytes32the configuration key to be checked.
_selectorsbytes4[]list of selectors to be added to the blacklist

cancelBatchConfiguration​

function cancelBatchConfiguration(bytes32 _configurationId) external nonpayable

Discards an in-progress batch configuration, dropping every facet appended so far for the pending version.

Emits {DiamondBatchConfigurationCancelled}. Has no effect once the version has been finalised via a _isLastBatch = true call.

Parameters​

NameTypeDescription
_configurationIdbytes32Configuration key whose pending batch should be cancelled.

checkResolverProxyConfigurationRegistered​

function checkResolverProxyConfigurationRegistered(bytes32 _configurationId, uint256 _version) external nonpayable

Reverts if the (configurationId, version) pair is not a registered, finalised configuration.

Intended to gate resolver-proxy operations; reverts with {ResolverProxyConfigurationNoRegistered} when the lookup fails.

Parameters​

NameTypeDescription
_configurationIdbytes32Configuration key to verify.
_versionuint256Version to verify; must be > 0. Read {getLatestVersionByConfiguration} first when the latest is required.

createBatchConfiguration​

function createBatchConfiguration(bytes32 _configurationId, IDiamondCutManager.FacetConfiguration[] _facetConfigurations, bool _isLastBatch, bytes _data) external nonpayable

Parameters​

NameTypeDescription
_configurationIdbytes32undefined
_facetConfigurationsIDiamondCutManager.FacetConfiguration[]undefined
_isLastBatchboolundefined
_databytesundefined

createConfiguration​

function createConfiguration(bytes32 _configurationId, IDiamondCutManager.FacetConfiguration[] _facetConfigurations, bytes _data) external nonpayable

Parameters​

NameTypeDescription
_configurationIdbytes32undefined
_facetConfigurationsIDiamondCutManager.FacetConfiguration[]undefined
_databytesundefined

getBusinessLogicCount​

function getBusinessLogicCount() external view returns (uint256 businessLogicCount_)

Returns the total number of business logic keys currently registered in the resolver.

Returns​

NameTypeDescription
businessLogicCount_uint256The count of registered business logic keys.

getBusinessLogicKeys​

function getBusinessLogicKeys(uint256 _pageIndex, uint256 _pageLength) external view returns (bytes32[] businessLogicKeys_)

Returns a list of business logic keys

Parameters​

NameTypeDescription
_pageIndexuint256members to skip : _pageIndex * _pageLength
_pageLengthuint256number of members to return

Returns​

NameTypeDescription
businessLogicKeys_bytes32[]list of business logic keys

getConfigurations​

function getConfigurations(uint256 _pageIndex, uint256 _pageLength) external view returns (bytes32[] configurationIds_)

Returns a paginated slice of registered configuration ids.

Pagination is used to keep gas bounded on large registries; out-of-range pages return an empty array rather than reverting.

Parameters​

NameTypeDescription
_pageIndexuint256Page index; entries skipped equal _pageIndex * _pageLength.
_pageLengthuint256Maximum number of entries to return.

Returns​

NameTypeDescription
configurationIds_bytes32[]Slice of configuration ids for the requested page.

getConfigurationsLength​

function getConfigurationsLength() external view returns (uint256 configurationsLength_)

Returns the number of distinct configuration keys registered in the manager.

Returns​

NameTypeDescription
configurationsLength_uint256Total count of registered configuration ids.

getFacetAddressByConfigurationIdVersionAndFacetId​

function getFacetAddressByConfigurationIdVersionAndFacetId(bytes32 _configurationId, uint256 _version, bytes32 _facetId) external view returns (address facetAddress_)

Returns the address of a facet inside a configuration version.

Returns address(0) when the facet is not part of the configuration version.

Parameters​

NameTypeDescription
_configurationIdbytes32Configuration key to query.
_versionuint256Version to query; must be > 0. Read {getLatestVersionByConfiguration} first when the latest is required.
_facetIdbytes32Facet key to look up.

Returns​

NameTypeDescription
facetAddress_addressAddress of the facet, or address(0) if unregistered.

getFacetAddressesByConfigurationIdAndVersion​

function getFacetAddressesByConfigurationIdAndVersion(bytes32 _configurationId, uint256 _version, uint256 _pageIndex, uint256 _pageLength) external view returns (address[] facetAddresses_)

Returns a paginated slice of facet addresses registered for a configuration version.

Parameters​

NameTypeDescription
_configurationIdbytes32Configuration key to query.
_versionuint256Version to query; must be > 0. Read {getLatestVersionByConfiguration} first when the latest is required.
_pageIndexuint256Page index; entries skipped equal _pageIndex * _pageLength.
_pageLengthuint256Maximum number of entries to return.

Returns​

NameTypeDescription
facetAddresses_address[]Slice of facet addresses for the requested page.

getFacetByConfigurationIdVersionAndFacetId​

function getFacetByConfigurationIdVersionAndFacetId(bytes32 _configurationId, uint256 _version, bytes32 _facetId) external view returns (struct IDiamondLoupe.Facet facet_)

Returns the full facet record (id, address, selectors, interface ids) for a facet inside a configuration version.

Returns a zero-valued {IDiamondLoupe.Facet} when the facet is not part of the configuration version.

Parameters​

NameTypeDescription
_configurationIdbytes32Configuration key to query.
_versionuint256Version to query; must be > 0. Read {getLatestVersionByConfiguration} first when the latest is required.
_facetIdbytes32Facet key to look up.

Returns​

NameTypeDescription
facet_IDiamondLoupe.FacetFacet record for _facetId.

getFacetConfigurationsByConfigurationIdAndVersion​

function getFacetConfigurationsByConfigurationIdAndVersion(bytes32 _configurationId, uint256 _version, uint256 _start, uint256 _end) external view returns (struct IDiamondCutManager.FacetConfiguration[] facetConfigurations_)

Returns the (facet id, facet version) tuples registered for a configuration version over a half-open index range.

Slice semantics differ from the page-based helpers: _start is inclusive and _end is exclusive, allowing callers to express arbitrary windows.

Parameters​

NameTypeDescription
_configurationIdbytes32Configuration key to query.
_versionuint256Version to query; must be > 0. Read {getLatestVersionByConfiguration} first when the latest is required.
_startuint256Inclusive start index of the slice.
_enduint256Exclusive end index of the slice.

Returns​

NameTypeDescription
facetConfigurations_IDiamondCutManager.FacetConfiguration[]Slice of {FacetConfiguration} entries for the window.

getFacetIdByConfigurationIdVersionAndSelector​

function getFacetIdByConfigurationIdVersionAndSelector(bytes32 _configurationId, uint256 _version, bytes4 _selector) external view returns (bytes32 facetId_)

Returns the facet id that owns a selector inside a configuration version.

Returns bytes32(0) when the selector is not registered.

Parameters​

NameTypeDescription
_configurationIdbytes32Configuration key to query.
_versionuint256Version to query; must be > 0. Read {getLatestVersionByConfiguration} first when the latest is required.
_selectorbytes4Selector to look up.

Returns​

NameTypeDescription
facetId_bytes32Facet id owning _selector, or bytes32(0) if none.

getFacetIdsByConfigurationIdAndVersion​

function getFacetIdsByConfigurationIdAndVersion(bytes32 _configurationId, uint256 _version, uint256 _pageIndex, uint256 _pageLength) external view returns (bytes32[] facetIds_)

Returns a paginated slice of facet ids registered for a configuration version.

Parameters​

NameTypeDescription
_configurationIdbytes32Configuration key to query.
_versionuint256Version to query; must be > 0. Read {getLatestVersionByConfiguration} first when the latest is required.
_pageIndexuint256Page index; entries skipped equal _pageIndex * _pageLength.
_pageLengthuint256Maximum number of entries to return.

Returns​

NameTypeDescription
facetIds_bytes32[]Slice of facet ids for the requested page.

getFacetSelectorsByConfigurationIdVersionAndFacetId​

function getFacetSelectorsByConfigurationIdVersionAndFacetId(bytes32 _configurationId, uint256 _version, bytes32 _facetId, uint256 _pageIndex, uint256 _pageLength) external view returns (bytes4[] facetSelectors_)

Returns a paginated slice of selectors registered for a facet inside a configuration version.

Parameters​

NameTypeDescription
_configurationIdbytes32Configuration key to query.
_versionuint256Version to query; must be > 0. Read {getLatestVersionByConfiguration} first when the latest is required.
_facetIdbytes32Facet key whose selectors are returned.
_pageIndexuint256Page index; entries skipped equal _pageIndex * _pageLength.
_pageLengthuint256Maximum number of entries to return.

Returns​

NameTypeDescription
facetSelectors_bytes4[]Slice of selectors for the requested page.

getFacetSelectorsLengthByConfigurationIdVersionAndFacetId​

function getFacetSelectorsLengthByConfigurationIdVersionAndFacetId(bytes32 _configurationId, uint256 _version, bytes32 _facetId) external view returns (uint256 facetSelectorsLength_)

Returns the number of selectors registered for a facet inside a configuration version.

Parameters​

NameTypeDescription
_configurationIdbytes32Configuration key to query.
_versionuint256Version to query; must be > 0. Read {getLatestVersionByConfiguration} first when the latest is required.
_facetIdbytes32Facet key whose selectors are counted.

Returns​

NameTypeDescription
facetSelectorsLength_uint256Count of selectors owned by the facet in the version.

getFacetVersionByConfigurationIdVersionAndFacetId​

function getFacetVersionByConfigurationIdVersionAndFacetId(bytes32 _configurationId, uint256 _version, bytes32 _facetId) external view returns (uint256 facetVersion_)

Returns the pinned facet version stored inside a configuration version.

Reverts with {FacetIdNotRegistered} when the facet is not part of the configuration version, and with {VersionZero} when _version is 0.

Parameters​

NameTypeDescription
_configurationIdbytes32Configuration key to query.
_versionuint256Version to query; must be > 0. Read {getLatestVersionByConfiguration} first when the latest is required.
_facetIdbytes32Facet key to look up.

Returns​

NameTypeDescription
facetVersion_uint256Pinned facet version inside the configuration version.

getFacetsByConfigurationIdAndVersion​

function getFacetsByConfigurationIdAndVersion(bytes32 _configurationId, uint256 _version, uint256 _pageIndex, uint256 _pageLength) external view returns (struct IDiamondLoupe.Facet[] facets_)

Returns a paginated slice of facets for a configuration version, including each facet's address, selectors, and advertised interface ids.

Parameters​

NameTypeDescription
_configurationIdbytes32Configuration key to query.
_versionuint256Version to query; must be > 0. Read {getLatestVersionByConfiguration} first when the latest is required.
_pageIndexuint256Page index; entries skipped equal _pageIndex * _pageLength.
_pageLengthuint256Maximum number of entries to return.

Returns​

NameTypeDescription
facets_IDiamondLoupe.Facet[]Slice of {IDiamondLoupe.Facet} entries for the requested page.

getFacetsLengthByConfigurationIdAndVersion​

function getFacetsLengthByConfigurationIdAndVersion(bytes32 _configurationId, uint256 _version) external view returns (uint256 facetsLength_)

Returns the number of facets registered under a configuration version.

Parameters​

NameTypeDescription
_configurationIdbytes32Configuration key to query.
_versionuint256Version to query; must be > 0. Read {getLatestVersionByConfiguration} first when the latest is required.

Returns​

NameTypeDescription
facetsLength_uint256Count of facets in the configuration version.

getLatestVersion​

function getLatestVersion(bytes32 _businessLogicKey) external view returns (uint256 latestVersion_)

Returns the latest registered version for the given business logic key.

Parameters​

NameTypeDescription
_businessLogicKeybytes32The bytes32 key identifying the business logic to query.

Returns​

NameTypeDescription
latestVersion_uint256The latest registered version for that key; 0 if never registered.

getLatestVersionByConfiguration​

function getLatestVersionByConfiguration(bytes32 _configurationId) external view returns (uint256 latestVersion_)

Returns the latest registered version of a configuration.

Parameters​

NameTypeDescription
_configurationIdbytes32Configuration key to query.

Returns​

NameTypeDescription
latestVersion_uint256Latest finalised version, or 0 when no version is registered.

getLatestVersions​

function getLatestVersions(bytes32[] _businessLogicKeys) external view returns (uint256[] latestVersions_)

Batched variant of getLatestVersion that resolves many keys in a single call.

Issued so off-chain consumers can avoid one eth_call per key — JSON-RPC relays such as Hedera's enforce per-IP rate limits on eth_call and reject bursts. Returns 0 for keys that have never been registered (same semantics as the scalar variant).

Parameters​

NameTypeDescription
_businessLogicKeysbytes32[]keys of the business logics to query.

Returns​

NameTypeDescription
latestVersions_uint256[]latest version per key, in the same order as _businessLogicKeys.

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.

getReplacementAddress​

function getReplacementAddress(address _oldAddress) external view returns (address replacementAddress_)

Returns the replacement address for a given address, or address(0) if none exists

Parameters​

NameTypeDescription
_oldAddressaddressthe address whose replacement is queried

Returns​

NameTypeDescription
replacementAddress_addressthe replacement address, or address(0) if none exists

getSelectorsBlacklist​

function getSelectorsBlacklist(bytes32 _configurationId, uint256 _pageIndex, uint256 _pageLength) external view returns (bytes4[] selectors_)

Returns the list of selectors in the blacklist

Parameters​

NameTypeDescription
_configurationIdbytes32the configuration key to be checked.
_pageIndexuint256members to skip : _pageIndex * _pageLength
_pageLengthuint256number of members to return

Returns​

NameTypeDescription
selectors_bytes4[]List of the selectors in the blacklist

getVersionStatus​

function getVersionStatus(bytes32 _businessLogicKey, uint256 _version) external view returns (enum IBusinessLogicResolver.VersionStatus status_)

Returns the current status of a given version for a business logic key.

Parameters​

NameTypeDescription
_businessLogicKeybytes32The bytes32 key identifying the business logic to query.
_versionuint256The version number to inspect.

Returns​

NameTypeDescription
status_enum IBusinessLogicResolver.VersionStatusThe VersionStatus (NONE, ACTIVATED, or DEACTIVATED) for that version.

initializeBusinessLogicResolver​

function initializeBusinessLogicResolver() external nonpayable returns (bool success_)

Initialises the Business Logic Resolver storage. Must be called once before any registration operations; subsequent calls revert.

Returns​

NameTypeDescription
success_boolTrue when initialisation succeeds without reverting.

initializePause​

function initializePause() external nonpayable

Initialises the pause capability on the token.

Callable once; subsequent calls revert with FacetAlreadyRegistered. Requires DEFAULT_ADMIN_ROLE. Called by the factory during deployment.

isBusinessLogicResolver​

function isBusinessLogicResolver() external pure returns (bool isBusinessLogicResolver_)

Identity marker used to confirm a candidate address is a genuine IBusinessLogicResolver, checked via low-level call() rather than a direct interface call (see DiamondCut::onlyValidBusinessLogicResolver).

Returns​

NameTypeDescription
isBusinessLogicResolver_boolAlways true for a real BusinessLogicResolver.

isResolverProxyConfigurationRegistered​

function isResolverProxyConfigurationRegistered(bytes32 _configurationId, uint256 _version) external view returns (bool)

Non-reverting variant of {checkResolverProxyConfigurationRegistered}.

Parameters​

NameTypeDescription
_configurationIdbytes32Configuration key to check.
_versionuint256Version to check; must be > 0. Read {getLatestVersionByConfiguration} first when the latest is required.

Returns​

NameTypeDescription
_0boolTrue when the configuration version is registered and finalised.

pause​

function pause() external nonpayable returns (bool success_)

Sets the token's internal pause flag, blocking all guarded operations.

Requires ROLE_PAUSER and the token to be currently unpaused. Reverts with IsPaused if the token is already paused. Emits Paused.

Returns​

NameTypeDescription
success_boolTrue if the token was successfully paused.

paused​

function paused() external view returns (bool)

Checks whether the token is currently paused.

Returns true if the token's own pause flag is set, or if any registered external pause contract returns true from its isPaused() call (OR semantics). created to be compatible with ERC3643

Returns​

NameTypeDescription
_0boolTrue if the token is paused by any source, false otherwise.

registerBusinessLogics​

function registerBusinessLogics(IBusinessLogicResolver.BusinessLogicRegistryData[] _businessLogics) external nonpayable

Parameters​

NameTypeDescription
_businessLogicsIBusinessLogicResolver.BusinessLogicRegistryData[]undefined

removeReplacementAddress​

function removeReplacementAddress(address _oldAddress) external nonpayable

Removes the replacement address for a given address

Parameters​

NameTypeDescription
_oldAddressaddressthe address for which to remove the replacement

removeSelectorsFromBlacklist​

function removeSelectorsFromBlacklist(bytes32 _configurationId, bytes4[] _selectors) external nonpayable

Removes a list of selectors from the blacklist

Removing a selector only affects subsequent validation and does not mutate already activated configurations.

Parameters​

NameTypeDescription
_configurationIdbytes32the configuration key to be checked.
_selectorsbytes4[]list of selectors to be removed from the blacklist

resolveBusinessLogicByVersion​

function resolveBusinessLogicByVersion(bytes32 _businessLogicKey, uint256 _version) external view returns (address businessLogicAddress_)

Returns the implementation address for a specific version of a business logic.

Parameters​

NameTypeDescription
_businessLogicKeybytes32Key of the business logic. Business Logic must be active.
_versionuint256The version number to resolve.

Returns​

NameTypeDescription
businessLogicAddress_addressThe implementation address registered at that version.

resolveLatestBusinessLogic​

function resolveLatestBusinessLogic(bytes32 _businessLogicKey) external view returns (address businessLogicAddress_)

Returns the business logic address for the latest version.

Parameters​

NameTypeDescription
_businessLogicKeybytes32Key of the business logic. Business Logic must be active.

Returns​

NameTypeDescription
businessLogicAddress_addressThe implementation address registered at the latest version.

resolveResolverProxyCall​

function resolveResolverProxyCall(bytes _resolverProxyConfiguration, bytes4 _selector) external view returns (address facetAddress_)

Resolves the facet address that implements a selector for a given configuration and version.

Used by resolver proxies during dispatch. Returns address(0) when no facet claims the selector.

Parameters​

NameTypeDescription
_resolverProxyConfigurationbytesResolver proxy full configuration.
_selectorbytes4Function selector being dispatched.

Returns​

NameTypeDescription
facetAddress_addressAddress of the facet that owns _selector, or address(0) if the selector is not registered for the given configuration/version.

resolveResolverProxyCall​

function resolveResolverProxyCall(bytes32 _configurationId, uint256 _version, bytes4 _selector) external view returns (address facetAddress_)

Resolves the facet address that implements a selector for a given configuration and version.

Used by resolver proxies during dispatch. Returns address(0) when no facet claims the selector.

Parameters​

NameTypeDescription
_configurationIdbytes32Configuration key bound to the resolver proxy.
_versionuint256Version bound to the resolver proxy; must be > 0. Read {getLatestVersionByConfiguration} first when the latest is required.
_selectorbytes4Function selector being dispatched.

Returns​

NameTypeDescription
facetAddress_addressAddress of the facet that owns _selector, or address(0) if the selector is not registered for the given configuration/version.

resolveSupportsInterface​

function resolveSupportsInterface(bytes32 _configurationId, uint256 _version, bytes4 _interfaceId) external view returns (bool exists_)

Reports whether an interface id is advertised by any facet inside the given configuration and version.

Powers ERC-165 lookups on resolver proxies.

Parameters​

NameTypeDescription
_configurationIdbytes32Configuration key bound to the resolver proxy.
_versionuint256Version bound to the resolver proxy; must be > 0. Read {getLatestVersionByConfiguration} first when the latest is required.
_interfaceIdbytes4Interface identifier to test.

Returns​

NameTypeDescription
exists_boolTrue if _interfaceId is supported by the configuration version.

setVersionStatus​

function setVersionStatus(bytes32 _businessLogicKey, uint256 _version, enum IBusinessLogicResolver.VersionStatus _status) external nonpayable

Sets the status of a registered business logic version.

Restricted to DEFAULT_ADMIN_ROLE. Reverts with InvalidVersionStatus when _status is VersionStatus.NONE, and with BusinessLogicVersionDoesNotExist when _version is zero or has never been registered for _businessLogicKey. Marking a version DEACTIVATED prevents it from being selected into any new resolver-proxy configuration, but does not affect configurations that already reference it.

Parameters​

NameTypeDescription
_businessLogicKeybytes32The bytes32 key identifying the business logic to update.
_versionuint256The version number to update.
_statusenum IBusinessLogicResolver.VersionStatusThe new status (ACTIVATED or DEACTIVATED) to assign to the version.

transferOwnership​

function transferOwnership(bytes32 _configId, address _newOwner) external nonpayable

Nominates _newOwner as the pending owner of _configId.

Gated by {onlyUnpaused} and {onlyConfigurationOwner}: only the existing owner can nominate a successor, and only while the diamond is unpaused. Stores _newOwner as the pending owner without touching the current owner; finalisation happens in {acceptOwnership}. Emits {OwnershipTransfered} with the caller as the outgoing owner.

Parameters​

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

unpause​

function unpause() external nonpayable returns (bool success_)

Clears the token's internal pause flag, restoring guarded operations.

Requires ROLE_PAUSER and the token's internal flag to be set. Reverts with IsUnpaused if the internal flag is already cleared. Emits Unpaused. Note: if any external pause contract remains paused, isPaused will still return true after this call.

Returns​

NameTypeDescription
success_boolTrue if the internal pause flag was successfully cleared.

updateReplacementAddress​

function updateReplacementAddress(address _oldAddress, address _newAddress) external nonpayable

Updates the replacement address for a given address

Parameters​

NameTypeDescription
_oldAddressaddressthe address to be replaced
_newAddressaddressthe new address to replace it with

Events​

BusinessLogicResolverInitialized​

event BusinessLogicResolverInitialized()

Emitted once when the BLR itself is initialised.

Fires exclusively from initializeBusinessLogicResolver after the storage write succeeds.

BusinessLogicsRegistered​

event BusinessLogicsRegistered(IBusinessLogicResolver.BusinessLogicRegistryData[] businessLogics, uint256[] newLatestVersions)

Event emitted when Business Logic(s) are registered (updated or added).

Parameters​

NameTypeDescription
businessLogicsIBusinessLogicResolver.BusinessLogicRegistryData[]list of registered Business Logics.
newLatestVersionsuint256[]new latest version per registered key, in the same order as businessLogics.

DiamondBatchConfigurationCancelled​

event DiamondBatchConfigurationCancelled(bytes32 indexed configurationId, uint256 indexed version)

Emitted when an in-progress batch configuration is discarded.

Parameters​

NameTypeDescription
configurationId indexedbytes32Configuration key whose pending batch was cancelled.
version indexeduint256Version number that was being assembled and is now dropped.

DiamondBatchConfigurationCreated​

event DiamondBatchConfigurationCreated(bytes32 configurationId, IDiamondCutManager.FacetConfiguration[] facetConfigurations, bool isLastBatch, uint256 version, bytes data)

Emitted on every {createBatchConfiguration} call, including the final batch.

Parameters​

NameTypeDescription
configurationIdbytes32Configuration key being assembled.
facetConfigurationsIDiamondCutManager.FacetConfiguration[]Facets appended in this batch.
isLastBatchboolTrue when this call finalises the configuration version.
versionuint256Version number being assembled for this configuration.
databytesAdditional data passed to the configuration.

DiamondConfigurationCreated​

event DiamondConfigurationCreated(bytes32 configurationId, IDiamondCutManager.FacetConfiguration[] facetConfigurations, uint256 version, bytes data)

Emitted when a configuration is created atomically via {createConfiguration}.

Parameters​

NameTypeDescription
configurationIdbytes32Configuration key that was registered.
facetConfigurationsIDiamondCutManager.FacetConfiguration[]Facets (id, version) that compose the new configuration.
versionuint256Version number assigned to the newly created configuration.
databytesAdditional data passed to the configuration.

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.

PauseInitialized​

event PauseInitialized()

Emitted once when the pause capability is initialised on a token.

Fires exclusively from initializePause.

Paused​

event Paused(address indexed operator)

Emitted when the token's internal pause flag is set to true.

Parameters​

NameTypeDescription
operator indexedaddressAddress of the caller who triggered the pause.

ReplacementAddressRemoved​

event ReplacementAddressRemoved(address indexed replacedAddress, address indexed replacementAddressRemoved)

Event emitted when a replacement address is removed

Parameters​

NameTypeDescription
replacedAddress indexedaddressaddress for which the replacement is being removed.
replacementAddressRemoved indexedaddressremoved replacement address.

ReplacementAddressUpdated​

event ReplacementAddressUpdated(address indexed replacedAddress, address indexed replacementAddress)

Event emitted when an old address is replaced with a new one

Parameters​

NameTypeDescription
replacedAddress indexedaddressold address been replaced.
replacementAddress indexedaddressnew address replacing the old one.

Unpaused​

event Unpaused(address indexed operator)

Emitted when the token's internal pause flag is cleared to false.

Parameters​

NameTypeDescription
operator indexedaddressAddress of the caller who triggered the unpause.

VersionStatusUpdated​

event VersionStatusUpdated(bytes32 indexed businessLogicKey, uint256 version, enum IBusinessLogicResolver.VersionStatus status)

Event emitted when a business logic version's status is updated.

Parameters​

NameTypeDescription
businessLogicKey indexedbytes32Business logic key whose version status changed.
versionuint256Version number whose status changed.
statusenum IBusinessLogicResolver.VersionStatusNew status assigned to the version.

Errors​

AccountHasNoRole​

error AccountHasNoRole(address account, bytes32 role)

Thrown when an account does not hold a required role.

Parameters​

NameTypeDescription
accountaddressThe account that lacks the role.
rolebytes32The role that is not held.

BusinessLogicKeyDuplicated​

error BusinessLogicKeyDuplicated(bytes32 businessLogicKey)

Thrown when two entries in a registration batch share the same business logic key.

Parameters​

NameTypeDescription
businessLogicKeybytes32The duplicated key found in the batch.

BusinessLogicKeyMismatch​

error BusinessLogicKeyMismatch(address implementation, bytes32 actualKey, bytes32 expectedKey)

Thrown when the key reported by the implementation contract differs from the expected key.

Parameters​

NameTypeDescription
implementationaddressAddress of the implementation whose key was checked.
actualKeybytes32The resolver key returned by the implementation.
expectedKeybytes32The resolver key that was expected at registration time.

BusinessLogicVersionDoesNotExist​

error BusinessLogicVersionDoesNotExist(uint256 version)

Thrown when the requested version has never been registered for any business logic key.

Parameters​

NameTypeDescription
versionuint256The version number that does not exist in the registry.

DeactivatedVersionNotAllowed​

error DeactivatedVersionNotAllowed(bytes32 facetId, uint256 version)

Thrown when a configuration selects a facet version whose status has been set to DEACTIVATED. Configurations that already reference the version are unaffected; this only blocks the version from being selected into a new configuration.

Parameters​

NameTypeDescription
facetIdbytes32Facet id whose selected version is deactivated.
versionuint256Deactivated version that was selected.

DefaultValueForConfigurationIdNotPermitted​

error DefaultValueForConfigurationIdNotPermitted()

Thrown when bytes32(0) is supplied as a configuration id, which is reserved.

DuplicatedFacetInConfiguration​

error DuplicatedFacetInConfiguration(bytes32 facetId)

Thrown when the same facet id appears more than once within a configuration.

Parameters​

NameTypeDescription
facetIdbytes32Duplicated facet id.

EmptyFacetConfigurationNotPermitted​

error EmptyFacetConfigurationNotPermitted(bytes32 configurationId)

Thrown when attempting to activate a configuration that contains no facets, which would brick any ResolverProxy following the latest version.

Parameters​

NameTypeDescription
configurationIdbytes32Configuration key that was supplied with an empty facet list.

FacetAlreadyRegistered​

error FacetAlreadyRegistered(bytes32 facetId, uint256 lastVersion)

Raised when an initialiser tries to register a facet that already has a non-zero last registered version (i.e. the facet is being re-initialised on a fresh install).

Parameters​

NameTypeDescription
facetIdbytes32Identifier of the offending facet.
lastVersionuint256Last version recorded for that facet at the time of the check.

FacetIdNotRegistered​

error FacetIdNotRegistered(bytes32 configurationId, bytes32 facetId)

Thrown when a configuration references a facet id that is not registered in the business-logic resolver.

Parameters​

NameTypeDescription
configurationIdbytes32Configuration being created or modified.
facetIdbytes32Unknown facet id that triggered the revert.

InvalidReplacedAddress​

error InvalidReplacedAddress(address replacedAddress)

Thrown when a replaced address is already been used as replacement of other addresses.

Parameters​

NameTypeDescription
replacedAddressaddressReplaced address.

InvalidReplacementAddress​

error InvalidReplacementAddress(address replacementAddress)

Thrown when a replacement address is already been replaced.

Parameters​

NameTypeDescription
replacementAddressaddressReplacement address that is already been replaced and thus cannot replaced another one.

InvalidResolverProxyConfiguration​

error InvalidResolverProxyConfiguration(bytes _resolverProxyConfiguration)

Thrown when the provided encoded proxy configuration does not respect the standard.

Parameters​

NameTypeDescription
_resolverProxyConfigurationbyteswrong encoded proxy configuration.

InvalidVersionStatus​

error InvalidVersionStatus()

Thrown when setVersionStatus is called with VersionStatus.NONE, which represents an unregistered version rather than a settable lifecycle state.

IsPaused​

error IsPaused()

Thrown when an operation that requires the token to be unpaused is attempted while the token is paused (own flag or any external pause contract).

IsUnpaused​

error IsUnpaused()

Thrown when unpause is called while the token's internal pause flag is already cleared.

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.

OngoingBatchConfigurationNotPermitted​

error OngoingBatchConfigurationNotPermitted(bytes32 configurationId)

Thrown when {createConfiguration} is called for a configuration id that already has an in-progress batch, which would prematurely finalise the incomplete batch and absorb any facets that were intended for subsequent batch additions.

Parameters​

NameTypeDescription
configurationIdbytes32Configuration key whose batch is currently open.

ResolverProxyConfigurationNoRegistered​

error ResolverProxyConfigurationNoRegistered(bytes32 resolverProxyConfigurationId, uint256 version)

Thrown when a (configurationId, version) pair is referenced but has not been registered (or is still mid-batch and therefore not yet finalised).

Parameters​

NameTypeDescription
resolverProxyConfigurationIdbytes32Configuration key that was looked up.
versionuint256Version that was looked up.

SelectorAlreadyRegistered​

error SelectorAlreadyRegistered(bytes32 configurationId, uint256 version, bytes32 facetId, bytes4 selector)

Thrown when a selector is already registered under another facet for the same (configurationId, version), which would create an ambiguous dispatch.

Parameters​

NameTypeDescription
configurationIdbytes32Configuration where the clash was detected.
versionuint256Version where the clash was detected.
facetIdbytes32Facet attempting to register the selector.
selectorbytes4Selector that is already mapped to a different facet.

SelectorBlacklisted​

error SelectorBlacklisted(bytes4 selector)

Thrown when attempting to register a selector that is globally blacklisted.

Parameters​

NameTypeDescription
selectorbytes4Function selector that is forbidden.

UnrecognizedResolverProxyVersion​

error UnrecognizedResolverProxyVersion(bytes8 _resolverProxyVersion)

Thrown when the provided proxy version does not match any BLR compatible standard.

Parameters​

NameTypeDescription
_resolverProxyVersionbytes8proxy version that is not compatible with the BLR.

VersionZero​

error VersionZero(bytes32 configurationId)

Thrown when a configuration version of 0 is supplied to an entry point that requires an explicit version pin.

Callers that want the most recent registered version must read it first via {getLatestVersionByConfiguration} and pass that value.

Parameters​

NameTypeDescription
configurationIdbytes32Configuration key that was looked up.

WalletRecovered​

error WalletRecovered()

Thrown when attempting to recover a wallet that has already been recovered.

ZeroKeyNotValidForBusinessLogic​

error ZeroKeyNotValidForBusinessLogic()

Thrown when a registration attempt uses the zero bytes32 value as the business logic key.