Skip to main content

IClearingAtSnapshot

Asset Tokenization Studio Team

IClearingAtSnapshot

Interface for querying the snapshotted aggregate cleared balance of a token holder across all partitions.

Reads are delegated to SnapshotsStorageWrapper and operate on the snapshot index recorded by takeSnapshot. Reverts with SnapshotIdNull for _snapshotID == 0 and with SnapshotIdDoesNotExists for unknown identifiers.

Methods​

clearedBalanceOfAtSnapshot​

function clearedBalanceOfAtSnapshot(uint256 _snapshotID, address _tokenHolder) external view returns (uint256 balance_)

Returns the aggregate cleared balance of a token holder at the time of a given snapshot, summed across every partition.

Parameters​

NameTypeDescription
_snapshotIDuint256The snapshot identifier returned by a prior takeSnapshot call.
_tokenHolderaddressThe address of the token holder.

Returns​

NameTypeDescription
balance_uint256The total cleared balance of _tokenHolder recorded at _snapshotID.

initializeClearingAtSnapshot​

function initializeClearingAtSnapshot() external nonpayable

Initialises the clearing-at-snapshot capability on the token.

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

Events​

ClearingAtSnapshotInitialized​

event ClearingAtSnapshotInitialized()

Emitted once when the clearing-at-snapshot capability is initialised on a token.

Fires exclusively from initializeClearingAtSnapshot.