Skip to main content

IHoldAtSnapshot

Asset Tokenization Studio Team

IHoldAtSnapshot

Interface for querying a token holder's held (escrowed) balance at the time of a previously taken snapshot.

Reads are delegated to SnapshotsStorageWrapper and depend on the snapshot index recorded by takeSnapshot. The held amount is computed against the adjustment factor active at the snapshot timestamp via HoldStorageWrapper.getHeldAmountForAdjustedAt. Reverts with SnapshotIdNull when _snapshotID == 0 and with SnapshotIdDoesNotExists for unknown identifiers.

Methods​

heldBalanceOfAtSnapshot​

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

Returns the held balance of a token holder at the time of a given snapshot.

Sums all hold escrow amounts active at _snapshotID, adjusted for any balance-adjustment factor recorded at that snapshot timestamp.

Parameters​

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

Returns​

NameTypeDescription
balance_uint256The held balance of _tokenHolder recorded at _snapshotID.

initializeHoldAtSnapshot​

function initializeHoldAtSnapshot() external nonpayable

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

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

Events​

HoldAtSnapshotInitialized​

event HoldAtSnapshotInitialized()

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

Fires exclusively from initializeHoldAtSnapshot.