Skip to main content

IClearingByPartition

Asset Tokenization Studio Team

IClearingByPartition

Interface for partition-scoped clearing operations: approve, cancel, reclaim, clearing redeems and transfers, and read queries scoped to a single partition.

Extends IClearingTypes. Implementations must enforce single-partition mode, protected-partition access control, and standard clearing lifecycle guards.

Methods​

approveClearingOperationByPartition​

function approveClearingOperationByPartition(IClearingTypes.ClearingOperationIdentifier _clearingOperationIdentifier) external nonpayable returns (bool success_, bytes32 partition_)

Parameters​

NameTypeDescription
_clearingOperationIdentifierIClearingTypes.ClearingOperationIdentifierundefined

Returns​

NameTypeDescription
success_boolundefined
partition_bytes32undefined

cancelClearingOperationByPartition​

function cancelClearingOperationByPartition(IClearingTypes.ClearingOperationIdentifier _clearingOperationIdentifier) external nonpayable returns (bool success_)

Parameters​

NameTypeDescription
_clearingOperationIdentifierIClearingTypes.ClearingOperationIdentifierundefined

Returns​

NameTypeDescription
success_boolundefined

clearingRedeemByPartition​

function clearingRedeemByPartition(IClearingTypes.ClearingOperation _clearingOperation, uint256 _amount) external nonpayable returns (bool success_, uint256 clearingId_)

Parameters​

NameTypeDescription
_clearingOperationIClearingTypes.ClearingOperationundefined
_amountuint256undefined

Returns​

NameTypeDescription
success_boolundefined
clearingId_uint256undefined

clearingRedeemFromByPartition​

function clearingRedeemFromByPartition(IClearingTypes.ClearingOperationFrom _clearingOperationFrom, uint256 _amount) external nonpayable returns (bool success_, uint256 clearingId_)

Parameters​

NameTypeDescription
_clearingOperationFromIClearingTypes.ClearingOperationFromundefined
_amountuint256undefined

Returns​

NameTypeDescription
success_boolundefined
clearingId_uint256undefined

clearingTransferByPartition​

function clearingTransferByPartition(IClearingTypes.ClearingOperation _clearingOperation, uint256 _amount, address _to) external nonpayable returns (bool success_, uint256 clearingId_)

Parameters​

NameTypeDescription
_clearingOperationIClearingTypes.ClearingOperationundefined
_amountuint256undefined
_toaddressundefined

Returns​

NameTypeDescription
success_boolundefined
clearingId_uint256undefined

clearingTransferFromByPartition​

function clearingTransferFromByPartition(IClearingTypes.ClearingOperationFrom _clearingOperationFrom, uint256 _amount, address _to) external nonpayable returns (bool success_, uint256 clearingId_)

Parameters​

NameTypeDescription
_clearingOperationFromIClearingTypes.ClearingOperationFromundefined
_amountuint256undefined
_toaddressundefined

Returns​

NameTypeDescription
success_boolundefined
clearingId_uint256undefined

getClearedAmountForByPartition​

function getClearedAmountForByPartition(bytes32 _partition, address _tokenHolder) external view returns (uint256 amount_)

Gets the total cleared amount for a token holder by partition

Parameters​

NameTypeDescription
_partitionbytes32The partition of the token
_tokenHolderaddressThe address of the token holder

Returns​

NameTypeDescription
amount_uint256Total amount of tokens currently locked in clearing for the holder

getClearingCountForByPartition​

function getClearingCountForByPartition(bytes32 _partition, address _tokenHolder, enum IClearingTypes.ClearingOperationType _clearingOperationType) external view returns (uint256 clearingCount_)

Gets the total clearing count for a token holder by partition and clearing operation type

Parameters​

NameTypeDescription
_partitionbytes32The partition of the token
_tokenHolderaddressThe address of the token holder
_clearingOperationTypeenum IClearingTypes.ClearingOperationTypeType of clearing operation (Transfer, Redeem, or HoldCreation)

Returns​

NameTypeDescription
clearingCount_uint256Number of active clearing operations of the given type

getClearingRedeemForByPartition​

function getClearingRedeemForByPartition(bytes32 _partition, address _tokenHolder, uint256 _clearingId) external view returns (struct IClearingTypes.ClearingRedeemData clearingRedeemData_)

Gets the clearing redeem data for a given partition, token holder and clearing ID

Parameters​

NameTypeDescription
_partitionbytes32The partition of the token
_tokenHolderaddressThe address of the token holder
_clearingIduint256The ID of the clearing operation

Returns​

NameTypeDescription
clearingRedeemData_IClearingTypes.ClearingRedeemDataThe clearing redeem data

getClearingTransferForByPartition​

function getClearingTransferForByPartition(bytes32 _partition, address _tokenHolder, uint256 _clearingId) external view returns (struct IClearingTypes.ClearingTransferData clearingTransferData_)

Gets the clearing transfer data for a given partition, token holder and clearing ID

Parameters​

NameTypeDescription
_partitionbytes32The partition of the token
_tokenHolderaddressThe address of the token holder
_clearingIduint256The ID of the clearing operation

Returns​

NameTypeDescription
clearingTransferData_IClearingTypes.ClearingTransferDataThe clearing transfer data

getClearingsIdForByPartition​

function getClearingsIdForByPartition(bytes32 _partition, address _tokenHolder, enum IClearingTypes.ClearingOperationType _clearingOperationType, uint256 _pageIndex, uint256 _pageLength) external view returns (uint256[] clearingsId_)

Gets the ids of the clearings for a token holder by partition and clearing operation type

Parameters​

NameTypeDescription
_partitionbytes32The partition of the token
_tokenHolderaddressThe address of the token holder
_clearingOperationTypeenum IClearingTypes.ClearingOperationTypeType of clearing operation (Transfer, Redeem, or HoldCreation)
_pageIndexuint256Zero-based page index for pagination
_pageLengthuint256Maximum number of IDs to return per page

Returns​

NameTypeDescription
clearingsId_uint256[]Array of clearing operation IDs for the given page

initializeClearingByPartition​

function initializeClearingByPartition() external nonpayable

Initialises the clearing-by-partition capability on the token.

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

reclaimClearingOperationByPartition​

function reclaimClearingOperationByPartition(IClearingTypes.ClearingOperationIdentifier _clearingOperationIdentifier) external nonpayable returns (bool success_)

Parameters​

NameTypeDescription
_clearingOperationIdentifierIClearingTypes.ClearingOperationIdentifierundefined

Returns​

NameTypeDescription
success_boolundefined

Events​

ClearedHoldByPartition​

event ClearedHoldByPartition(address indexed operator, address indexed tokenHolder, bytes32 partition, uint256 clearingId, IHoldTypes.Hold hold, uint256 expirationDate, bytes data, bytes operatorData)

Emitted when a token holder registers a clearing-guarded hold creation on a partition.

Parameters​

NameTypeDescription
operator indexedaddressAddress that submitted the clearing operation.
tokenHolder indexedaddressAddress of the holder whose tokens are to be placed under hold.
partitionbytes32ERC-1400 partition the tokens belong to.
clearingIduint256Sequential identifier for the registered operation.
holdIHoldTypes.HoldHold parameters that will be used on approval.
expirationDateuint256Unix timestamp after which the clearing operation may be reclaimed.
databytesCaller-supplied data attached to the operation.
operatorDatabytesData provided by the operator.

ClearedHoldFromByPartition​

event ClearedHoldFromByPartition(address indexed operator, address indexed tokenHolder, bytes32 partition, uint256 clearingId, IHoldTypes.Hold hold, uint256 expirationDate, bytes data, bytes operatorData)

Emitted when a clearing-guarded hold creation is registered on behalf of a token holder via holdFromByPartition.

Parameters​

NameTypeDescription
operator indexedaddressAddress that submitted the clearing operation on behalf of the holder.
tokenHolder indexedaddressAddress of the holder whose tokens are to be placed under hold.
partitionbytes32ERC-1400 partition the tokens belong to.
clearingIduint256Sequential identifier for the registered operation.
holdIHoldTypes.HoldHold parameters that will be used on approval.
expirationDateuint256Unix timestamp after which the clearing operation may be reclaimed.
databytesCaller-supplied data attached to the operation.
operatorDatabytesData provided by the operator.

ClearedOperatorRedeemByPartition​

event ClearedOperatorRedeemByPartition(address indexed operator, address indexed tokenHolder, bytes32 partition, uint256 clearingId, uint256 amount, uint256 expirationDate, bytes data, bytes operatorData)

Emitted when an operator registers a clearing-guarded redemption using operator-level permissions.

Parameters​

NameTypeDescription
operator indexedaddressAuthorised operator that submitted the clearing operation.
tokenHolder indexedaddressAddress of the holder whose tokens are pending redemption.
partitionbytes32ERC-1400 partition the tokens belong to.
clearingIduint256Sequential identifier for the registered operation.
amountuint256Token quantity pending redemption.
expirationDateuint256Unix timestamp after which the operation may be reclaimed.
databytesCaller-supplied data attached to the operation.
operatorDatabytesData provided by the operator.

ClearedOperatorTransferByPartition​

event ClearedOperatorTransferByPartition(address indexed operator, address indexed tokenHolder, address indexed to, bytes32 partition, uint256 clearingId, uint256 amount, uint256 expirationDate, bytes data, bytes operatorData)

Emitted when an operator registers a clearing-guarded transfer using operator-level permissions.

Parameters​

NameTypeDescription
operator indexedaddressAuthorised operator that submitted the clearing operation.
tokenHolder indexedaddressAddress of the holder whose tokens are pending transfer.
to indexedaddressIntended recipient of the tokens upon approval.
partitionbytes32ERC-1400 partition the tokens belong to.
clearingIduint256Sequential identifier for the registered operation.
amountuint256Token quantity pending transfer.
expirationDateuint256Unix timestamp after which the operation may be reclaimed.
databytesCaller-supplied data attached to the operation.
operatorDatabytesData provided by the operator.

ClearedRedeemByPartition​

event ClearedRedeemByPartition(address indexed operator, address indexed tokenHolder, bytes32 partition, uint256 clearingId, uint256 amount, uint256 expirationDate, bytes data, bytes operatorData)

Emitted when a token holder registers a clearing-guarded redemption on a partition.

Parameters​

NameTypeDescription
operator indexedaddressAddress that submitted the clearing operation.
tokenHolder indexedaddressAddress of the holder whose tokens are pending redemption.
partitionbytes32ERC-1400 partition the tokens belong to.
clearingIduint256Sequential identifier for the registered operation.
amountuint256Token quantity pending redemption.
expirationDateuint256Unix timestamp after which the operation may be reclaimed.
databytesCaller-supplied data attached to the operation.
operatorDatabytesData provided by the operator.

ClearedRedeemFromByPartition​

event ClearedRedeemFromByPartition(address indexed operator, address indexed tokenHolder, bytes32 partition, uint256 clearingId, uint256 amount, uint256 expirationDate, bytes data, bytes operatorData)

Emitted when a clearing-guarded redemption is registered on behalf of a token holder via redeemFromByPartition.

Parameters​

NameTypeDescription
operator indexedaddressAddress that submitted the clearing operation on behalf of the holder.
tokenHolder indexedaddressAddress of the holder whose tokens are pending redemption.
partitionbytes32ERC-1400 partition the tokens belong to.
clearingIduint256Sequential identifier for the registered operation.
amountuint256Token quantity pending redemption.
expirationDateuint256Unix timestamp after which the operation may be reclaimed.
databytesCaller-supplied data attached to the operation.
operatorDatabytesData provided by the operator.

ClearedTransferByPartition​

event ClearedTransferByPartition(address indexed operator, address indexed tokenHolder, address indexed to, bytes32 partition, uint256 clearingId, uint256 amount, uint256 expirationDate, bytes data, bytes operatorData)

Emitted when a token holder registers a clearing-guarded transfer on a partition.

Parameters​

NameTypeDescription
operator indexedaddressAddress that submitted the clearing operation.
tokenHolder indexedaddressAddress of the holder whose tokens are pending transfer.
to indexedaddressIntended recipient of the tokens upon approval.
partitionbytes32ERC-1400 partition the tokens belong to.
clearingIduint256Sequential identifier for the registered operation.
amountuint256Token quantity pending transfer.
expirationDateuint256Unix timestamp after which the operation may be reclaimed.
databytesCaller-supplied data attached to the operation.
operatorDatabytesData provided by the operator.

ClearedTransferFromByPartition​

event ClearedTransferFromByPartition(address indexed operator, address indexed tokenHolder, address indexed to, bytes32 partition, uint256 clearingId, uint256 amount, uint256 expirationDate, bytes data, bytes operatorData)

Emitted when a clearing-guarded transfer is registered on behalf of a token holder via transferFromByPartition.

Parameters​

NameTypeDescription
operator indexedaddressAddress that submitted the clearing operation on behalf of the holder.
tokenHolder indexedaddressAddress of the holder whose tokens are pending transfer.
to indexedaddressIntended recipient of the tokens upon approval.
partitionbytes32ERC-1400 partition the tokens belong to.
clearingIduint256Sequential identifier for the registered operation.
amountuint256Token quantity pending transfer.
expirationDateuint256Unix timestamp after which the operation may be reclaimed.
databytesCaller-supplied data attached to the operation.
operatorDatabytesData provided by the operator.

ClearingActivated​

event ClearingActivated(address indexed operator)

Emitted when the clearing feature is enabled for the token.

Parameters​

NameTypeDescription
operator indexedaddressAddress of the administrator that activated clearing.

ClearingByPartitionInitialized​

event ClearingByPartitionInitialized()

Emitted once when the clearing-by-partition capability is initialised on a token.

Fires exclusively from initializeClearingByPartition.

ClearingDeactivated​

event ClearingDeactivated(address indexed operator)

Emitted when the clearing feature is disabled for the token.

Parameters​

NameTypeDescription
operator indexedaddressAddress of the administrator that deactivated clearing.

ClearingOperationApproved​

event ClearingOperationApproved(address indexed operator, address indexed tokenHolder, bytes32 indexed partition, uint256 clearingId, enum IClearingTypes.ClearingOperationType clearingOperationType, bytes operationData)

Emitted when a pending clearing operation is approved and the underlying token operation is executed.

Parameters​

NameTypeDescription
operator indexedaddressAddress that approved the operation.
tokenHolder indexedaddressAddress of the holder whose tokens were pending.
partition indexedbytes32ERC-1400 partition the tokens belong to.
clearingIduint256Sequential identifier of the approved operation.
clearingOperationTypeenum IClearingTypes.ClearingOperationTypeDiscriminant indicating the kind of operation approved.
operationDatabytesEncoded data forwarded to the underlying token call.

ClearingOperationCanceled​

event ClearingOperationCanceled(address indexed operator, address indexed tokenHolder, bytes32 indexed partition, uint256 clearingId, enum IClearingTypes.ClearingOperationType clearingOperationType)

Emitted when a pending clearing operation is cancelled before it expires.

Parameters​

NameTypeDescription
operator indexedaddressAddress that cancelled the operation.
tokenHolder indexedaddressAddress of the holder whose tokens were pending.
partition indexedbytes32ERC-1400 partition the tokens belong to.
clearingIduint256Sequential identifier of the cancelled operation.
clearingOperationTypeenum IClearingTypes.ClearingOperationTypeDiscriminant indicating the kind of operation cancelled.

ClearingOperationReclaimed​

event ClearingOperationReclaimed(address indexed operator, address indexed tokenHolder, bytes32 indexed partition, uint256 clearingId, enum IClearingTypes.ClearingOperationType clearingOperationType)

Emitted when an expired clearing operation is reclaimed, releasing the locked tokens back to the holder.

Parameters​

NameTypeDescription
operator indexedaddressAddress that reclaimed the operation.
tokenHolder indexedaddressAddress of the holder whose tokens were pending.
partition indexedbytes32ERC-1400 partition the tokens belong to.
clearingIduint256Sequential identifier of the reclaimed operation.
clearingOperationTypeenum IClearingTypes.ClearingOperationTypeDiscriminant indicating the kind of operation reclaimed.

Errors​

ClearingIsActivated​

error ClearingIsActivated()

Thrown when an administration action requires clearing to be inactive but it is currently enabled.

ClearingIsDisabled​

error ClearingIsDisabled()

Thrown when a clearing-dependent operation is attempted while the clearing feature is disabled on the token.

ExpirationDateNotReached​

error ExpirationDateNotReached()

Thrown when an action requires the clearing operation to have expired (e.g., a reclaim attempt) but the expiration timestamp has not yet passed.

ExpirationDateReached​

error ExpirationDateReached()

Thrown when an action requires the clearing operation to still be within its validity window but its expiration timestamp has already passed.

InvalidClearingAmount​

error InvalidClearingAmount()

Thrown when the token amount supplied for a clearing operation is invalid (e.g., zero or exceeding the holder's available balance).

WrongClearingId​

error WrongClearingId()

Thrown when the supplied clearingId does not correspond to an existing or active clearing operation for the given holder and partition.