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
| Name | Type | Description |
|---|---|---|
| _0 | bytes4[] | Face functions selectors |
getStaticInterfaceIds
function getStaticInterfaceIds() external pure returns (bytes4[])
Gets all interfaces ids of a facet.
Returns
| Name | Type | Description |
|---|---|---|
| _0 | bytes4[] | Face interface ids |
getStaticResolverKey
function getStaticResolverKey() external pure returns (bytes32 staticResolverKey_)
Gets the static resolver key
Returns
| Name | Type | Description |
|---|---|---|
| staticResolverKey_ | bytes32 | Static 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
| Name | Type | Description |
|---|---|---|
| _owner | address | Address whose nonce is queried. |
Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | Current 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
| Name | Type | Description |
|---|---|---|
| _owner | address | Address whose clearing partition hold creation nonce is queried. |
Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | Current 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
| Name | Type | Description |
|---|---|---|
| _owner | address | Address whose clearing partition redemption nonce is queried. |
Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | Current 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
| Name | Type | Description |
|---|---|---|
| _owner | address | Address whose clearing partition transfer nonce is queried. |
Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | Current 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
| Name | Type | Description |
|---|---|---|
| _owner | address | Address whose partition hold creation nonce is queried. |
Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | Current 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
| Name | Type | Description |
|---|---|---|
| _owner | address | Address whose partition redemption nonce is queried. |
Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | Current 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
| Name | Type | Description |
|---|---|---|
| _owner | address | Address whose partition transfer nonce is queried. |
Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | Current 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
| Name | Type | Description |
|---|---|---|
| account | address | The account that lacks the role. |
| role | bytes32 | The 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
| Name | Type | Description |
|---|---|---|
| facetId | bytes32 | Identifier of the offending facet. |
| lastVersion | uint256 | Last 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
| Name | Type | Description |
|---|---|---|
| _resolverProxyVersion | bytes8 | proxy version that is not compatible with the BLR. |
WalletRecovered
error WalletRecovered()
Thrown when attempting to recover a wallet that has already been recovered.