Skip to main content

ILockAtSnapshot

Asset Tokenization Studio Team

ILockAtSnapshot

Interface for querying a token holder's locked balance at the time of a previously taken snapshot.

Reads are delegated to SnapshotsStorageWrapper, which in turn consults LockStorageWrapper.getLockedAmountForAdjustedAt to account for any balance-adjustment factor active at the snapshot timestamp. Reverts with SnapshotIdNull when _snapshotID == 0 and with SnapshotIdDoesNotExists for unknown identifiers.

Methods​

initializeLockAtSnapshot​

function initializeLockAtSnapshot() external nonpayable

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

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

lockedBalanceOfAtSnapshot​

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

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

Queries the adjusted locked-balance snapshot recorded by LockStorageWrapper at _snapshotID. The value reflects the lock escrow amount as it stood at the snapshot block, adjusted for any scheduled balance-adjustment factor.

Parameters​

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

Returns​

NameTypeDescription
balance_uint256The locked balance of _tokenHolder recorded at _snapshotID.

Events​

LockAtSnapshotInitialized​

event LockAtSnapshotInitialized()

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

Fires exclusively from initializeLockAtSnapshot.