Skip to main content

IProtectedHoldByPartition

Asset Tokenization Studio Team

IProtectedHoldByPartition

Interface for the protected variant of partition-scoped hold creation, gated by a per-partition role and an off-chain signature provided by the token holder.

Inherits the shared IHoldTypes module so the ProtectedHold struct and the ProtectedHeldByPartition event are referenced from a single source of truth and never redeclared. This interface is aggregated into the IAsset umbrella; the facet itself never inherits the umbrella.

Methods​

initializeProtectedHoldByPartition​

function initializeProtectedHoldByPartition() external nonpayable

Initialises the protected-hold-by-partition capability on the token.

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

protectedCreateHoldByPartition​

function protectedCreateHoldByPartition(bytes32 _partition, address _from, IHoldTypes.ProtectedHold _protectedHold, bytes _signature) external nonpayable returns (bool success_, uint256 holdId_)

Parameters​

NameTypeDescription
_partitionbytes32undefined
_fromaddressundefined
_protectedHoldIHoldTypes.ProtectedHoldundefined
_signaturebytesundefined

Returns​

NameTypeDescription
success_boolundefined
holdId_uint256undefined

Events​

ControllerHeldByPartition​

event ControllerHeldByPartition(address indexed operator, address indexed tokenHolder, bytes32 partition, uint256 holdId, IHoldTypes.Hold hold, bytes operatorData)

Emitted when a controller creates a hold on a holder's behalf.

Parameters​

NameTypeDescription
operator indexedaddressThe controller initiating the hold.
tokenHolder indexedaddressThe holder whose balance is being held.
partitionbytes32Partition over which the hold is placed.
holdIduint256Sequence id assigned to the hold.
holdIHoldTypes.HoldThe hold definition.
operatorDatabytesOperator-supplied metadata.

HeldByPartition​

event HeldByPartition(address indexed operator, address indexed tokenHolder, bytes32 partition, uint256 holdId, IHoldTypes.Hold hold, bytes operatorData)

Emitted when a holder creates a hold over its own partitioned balance.

Parameters​

NameTypeDescription
operator indexedaddressThe address that initiated the hold (the holder itself).
tokenHolder indexedaddressThe holder whose balance is being held.
partitionbytes32Partition over which the hold is placed.
holdIduint256Sequence id assigned to the hold.
holdIHoldTypes.HoldThe hold definition (escrow, recipient, expiration, amount, data).
operatorDatabytesOperator-supplied metadata.

HeldFromByPartition​

event HeldFromByPartition(address indexed operator, address indexed tokenHolder, bytes32 partition, uint256 holdId, IHoldTypes.Hold hold, bytes operatorData)

Emitted when an authorised third party creates a hold on a holder's behalf.

Parameters​

NameTypeDescription
operator indexedaddressThe third-party caller initiating the hold.
tokenHolder indexedaddressThe holder whose balance is being held.
partitionbytes32Partition over which the hold is placed.
holdIduint256Sequence id assigned to the hold.
holdIHoldTypes.HoldThe hold definition (escrow, recipient, expiration, amount, data).
operatorDatabytesOperator-supplied metadata.

HoldByPartitionExecuted​

event HoldByPartitionExecuted(address indexed tokenHolder, bytes32 indexed partition, uint256 holdId, uint256 amount, address to)

Emitted when an existing hold is executed and balance transferred to a recipient.

Parameters​

NameTypeDescription
tokenHolder indexedaddressThe holder whose hold was executed.
partition indexedbytes32Partition over which the hold lived.
holdIduint256Sequence id of the executed hold.
amountuint256Amount released to the recipient.
toaddressRecipient of the executed balance.

HoldByPartitionReclaimed​

event HoldByPartitionReclaimed(address indexed operator, address indexed tokenHolder, bytes32 indexed partition, uint256 holdId, uint256 amount)

Emitted when an expired hold is reclaimed by the holder.

Parameters​

NameTypeDescription
operator indexedaddressThe address that triggered the reclaim.
tokenHolder indexedaddressThe holder receiving the reclaimed balance.
partition indexedbytes32Partition over which the hold lived.
holdIduint256Sequence id of the reclaimed hold.
amountuint256Amount returned to the holder's available balance.

HoldByPartitionReleased​

event HoldByPartitionReleased(address indexed tokenHolder, bytes32 indexed partition, uint256 holdId, uint256 amount)

Emitted when a hold is partially or fully released back to the holder.

Parameters​

NameTypeDescription
tokenHolder indexedaddressThe holder receiving the released balance.
partition indexedbytes32Partition over which the hold lived.
holdIduint256Sequence id of the released hold.
amountuint256Amount returned to the holder's available balance.

OperatorHeldByPartition​

event OperatorHeldByPartition(address indexed operator, address indexed tokenHolder, bytes32 partition, uint256 holdId, IHoldTypes.Hold hold, bytes operatorData)

Emitted when an ERC-1410 operator creates a hold on a holder's behalf.

Parameters​

NameTypeDescription
operator indexedaddressThe authorised operator initiating the hold.
tokenHolder indexedaddressThe holder whose balance is being held.
partitionbytes32Partition over which the hold is placed.
holdIduint256Sequence id assigned to the hold.
holdIHoldTypes.HoldThe hold definition.
operatorDatabytesOperator-supplied metadata.

ProtectedHeldByPartition​

event ProtectedHeldByPartition(address indexed operator, address indexed tokenHolder, bytes32 partition, uint256 holdId, IHoldTypes.Hold hold, bytes operatorData)

Emitted when a protected hold authorised by an EIP-712 signature is created.

Parameters​

NameTypeDescription
operator indexedaddressThe address submitting the protected hold (signature relayer).
tokenHolder indexedaddressThe holder whose balance is being held; must match the signer.
partitionbytes32Partition over which the hold is placed.
holdIduint256Sequence id assigned to the hold.
holdIHoldTypes.HoldThe hold definition.
operatorDatabytesOperator-supplied metadata.

ProtectedHoldByPartitionInitialized​

event ProtectedHoldByPartitionInitialized()

Emitted once when the protected-hold-by-partition capability is initialised on a token.

Fires exclusively from initializeProtectedHoldByPartition.

Errors​

HoldExpirationNotReached​

error HoldExpirationNotReached()

Reverts when a reclaim is attempted before the hold's expiration timestamp.

HoldExpirationReached​

error HoldExpirationReached()

Reverts when an operation requires an unexpired hold but the hold has expired.

InsufficientHoldBalance​

error InsufficientHoldBalance(uint256 holdAmount, uint256 amount)

Reverts when the requested release amount exceeds the hold's remaining balance.

Parameters​

NameTypeDescription
holdAmountuint256The amount still held.
amountuint256The amount requested.

InvalidDestinationAddress​

error InvalidDestinationAddress(address holdDestination, address to)

Reverts when the recipient supplied to {executeHoldByPartition} mismatches the hold.

Parameters​

NameTypeDescription
holdDestinationaddressThe recipient stored on the hold.
toaddressThe recipient supplied to the execute call.

InvalidHoldAmount​

error InvalidHoldAmount()

Reverts when a hold is created with a zero or otherwise invalid amount.

IsNotEscrow​

error IsNotEscrow()

Reverts when a caller that is not the recorded escrow attempts to execute the hold.

WrongHoldId​

error WrongHoldId()

Reverts when the supplied hold id does not exist for the (partition, holder) pair.