Skip to main content

ILockAtSnapshotByPartition

Asset Tokenization Studio Team

ILockAtSnapshotByPartition

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

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

Methods​

initializeLockAtSnapshotByPartition​

function initializeLockAtSnapshotByPartition() external nonpayable

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

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

lockedBalanceOfAtSnapshotByPartition​

function lockedBalanceOfAtSnapshotByPartition(bytes32 _partition, uint256 _snapshotID, address _tokenHolder) external view returns (uint256 balance_)

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

Parameters​

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

Returns​

NameTypeDescription
balance_uint256The locked balance of _tokenHolder in _partition recorded at _snapshotID.

Events​

LockAtSnapshotByPartitionInitialized​

event LockAtSnapshotByPartitionInitialized()

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

Fires exclusively from initializeLockAtSnapshotByPartition.