Skip to main content

NoncesFacet

Asset Tokenization Studio Team

NoncesFacet

Diamond facet that exposes per-account nonce reads as a selectable proxy function.

Inherits Nonces for the business logic and implements IStaticFunctionSelectors for the Diamond resolver pattern. The resolver key RESOLVER_KEY_NONCES identifies this facet within the diamond proxy.

Methods​

getStaticFunctionSelectors​

function getStaticFunctionSelectors() external pure returns (bytes4[])

Gets all function selectors of a facet

Returns​

NameTypeDescription
_0bytes4[]Face functions selectors

getStaticInterfaceIds​

function getStaticInterfaceIds() external pure returns (bytes4[])

Gets all interfaces ids of a facet.

Returns​

NameTypeDescription
_0bytes4[]Face interface ids

getStaticResolverKey​

function getStaticResolverKey() external pure returns (bytes32 staticResolverKey_)

Gets the static resolver key

Returns​

NameTypeDescription
staticResolverKey_bytes32Static resolver key

initializeNonces​

function initializeNonces() external nonpayable

Initialises the nonces capability on the token.

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

nonces​

function nonces(address _owner) external view returns (uint256)

Returns the current nonce for owner.

Parameters​

NameTypeDescription
_owneraddressAddress whose nonce is queried.

Returns​

NameTypeDescription
_0uint256Current nonce value for owner.

protectedClearingCreateHoldByPartitionNonce​

function protectedClearingCreateHoldByPartitionNonce(address _owner) external view returns (uint256)

Returns the current nonce for _owner used in protected clearing partition hold creations.

Incremented internally upon consumption of a valid signed protectedClearingCreateHoldByPartition operation.

Parameters​

NameTypeDescription
_owneraddressAddress whose clearing partition hold creation nonce is queried.

Returns​

NameTypeDescription
_0uint256Current nonce value for _owner.

protectedClearingRedeemByPartitionNonce​

function protectedClearingRedeemByPartitionNonce(address _owner) external view returns (uint256)

Returns the current nonce for _owner used in protected clearing partition redemptions.

Incremented internally upon consumption of a valid signed protectedClearingRedeemByPartition operation.

Parameters​

NameTypeDescription
_owneraddressAddress whose clearing partition redemption nonce is queried.

Returns​

NameTypeDescription
_0uint256Current nonce value for _owner.

protectedClearingTransferByPartitionNonce​

function protectedClearingTransferByPartitionNonce(address _owner) external view returns (uint256)

Returns the current nonce for _owner used in protected clearing partition transfers.

Incremented internally upon consumption of a valid signed protectedClearingTransferByPartition operation.

Parameters​

NameTypeDescription
_owneraddressAddress whose clearing partition transfer nonce is queried.

Returns​

NameTypeDescription
_0uint256Current nonce value for _owner.

protectedCreateHoldByPartitionNonce​

function protectedCreateHoldByPartitionNonce(address _owner) external view returns (uint256)

Returns the current nonce for _owner used in protected partition hold creations.

Incremented internally upon consumption of a valid signed protectedCreateHoldByPartition operation.

Parameters​

NameTypeDescription
_owneraddressAddress whose partition hold creation nonce is queried.

Returns​

NameTypeDescription
_0uint256Current nonce value for _owner.

protectedRedeemFromByPartitionNonce​

function protectedRedeemFromByPartitionNonce(address _owner) external view returns (uint256)

Returns the current nonce for _owner used in protected partition redemptions.

Incremented internally upon consumption of a valid signed protectedRedeemFromByPartition operation.

Parameters​

NameTypeDescription
_owneraddressAddress whose partition redemption nonce is queried.

Returns​

NameTypeDescription
_0uint256Current nonce value for _owner.

protectedTransferFromByPartitionNonce​

function protectedTransferFromByPartitionNonce(address _owner) external view returns (uint256)

Returns the current nonce for _owner used in protected partition transfers.

Incremented internally upon consumption of a valid signed protectedTransferFromByPartition operation.

Parameters​

NameTypeDescription
_owneraddressAddress whose partition transfer nonce is queried.

Returns​

NameTypeDescription
_0uint256Current nonce value for _owner.

Events​

NoncesInitialized​

event NoncesInitialized()

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

Fires exclusively from initializeNonces.

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.

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.

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.

WalletRecovered​

error WalletRecovered()

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