Skip to main content

ITransferAndLockByPartition

Asset Tokenization Studio Team

ITransferAndLockByPartition

Interface for the partition-aware combined transfer-and-lock operation.

Exposes transferAndLockByPartition, which atomically transfers tokens from the caller's balance on a specified partition to a recipient and records a timed lock on the recipient's resulting balance. Inherits PartitionTransferredAndLocked from ITransferAndLockTypes.

Methods​

initializeTransferAndLockByPartition​

function initializeTransferAndLockByPartition() external nonpayable

Initialises the transfer-and-lock-by-partition capability on the token.

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

transferAndLockByPartition​

function transferAndLockByPartition(bytes32 _partition, address _to, uint256 _amount, bytes _data, uint256 _expirationTimestamp) external nonpayable returns (uint256 lockId_)

Transfers _amount tokens from the caller's _partition balance to _to and locks them until _expirationTimestamp.

Callers must hold ROLE_LOCKER. The token must be unpaused and _expirationTimestamp must be in the future. In single-partition mode only the default partition is permitted; protected partitions require the wildcard role. Emits PartitionTransferredAndLocked, TransferByPartition (via ERC1410StorageWrapper), and Transfer (via ERC1410StorageWrapper).

Parameters​

NameTypeDescription
_partitionbytes32The partition from which tokens are transferred and locked.
_toaddressThe recipient of the transferred and locked tokens.
_amountuint256The amount of tokens to transfer and lock.
_databytesAdditional data forwarded to the recipient.
_expirationTimestampuint256Unix timestamp until which the transferred tokens are locked.

Returns​

NameTypeDescription
lockId_uint256Identifier assigned to the resulting lock for (_partition, _to).

Events​

PartitionTransferredAndLocked​

event PartitionTransferredAndLocked(bytes32 indexed partition, address indexed from, address to, uint256 value, bytes data, uint256 expirationTimestamp, uint256 lockId)

Emitted when tokens are transferred to a recipient on a partition and locked until a future timestamp.

Parameters​

NameTypeDescription
partition indexedbytes32The partition on which the transfer and lock occurred.
from indexedaddressThe address from which tokens were transferred.
toaddressThe address to which tokens were transferred and locked.
valueuint256The amount of tokens transferred and locked.
databytesAdditional data provided by the caller.
expirationTimestampuint256Unix timestamp at which the lock expires.
lockIduint256Identifier assigned to the resulting lock.

TransferAndLockByPartitionInitialized​

event TransferAndLockByPartitionInitialized()

Emitted once when the transfer-and-lock-by-partition capability is initialised on a token.

Fires exclusively from initializeTransferAndLockByPartition.