ProtectedHoldByPartitionFacet
Asset Tokenization Studio Team
ProtectedHoldByPartitionFacet
Diamond facet that registers the protectedCreateHoldByPartition selector under RESOLVER_KEY_PROTECTED_HOLD_BY_PARTITION on the Diamond proxy.
Composed via ProtectedHoldByPartition for behaviour and IStaticFunctionSelectors for selector advertisement. Exposes a single external selector.
Methods
getStaticFunctionSelectors
function getStaticFunctionSelectors() external pure returns (bytes4[])
Gets all function selectors of a facet
Returns
| Name | Type | Description |
|---|---|---|
| _0 | bytes4[] | Face functions selectors |
getStaticInterfaceIds
function getStaticInterfaceIds() external pure returns (bytes4[])
Gets all interfaces ids of a facet.
Returns
| Name | Type | Description |
|---|---|---|
| _0 | bytes4[] | Face interface ids |
getStaticResolverKey
function getStaticResolverKey() external pure returns (bytes32 staticResolverKey_)
Gets the static resolver key
Returns
| Name | Type | Description |
|---|---|---|
| staticResolverKey_ | bytes32 | Static resolver key |
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
| Name | Type | Description |
|---|---|---|
| _partition | bytes32 | undefined |
| _from | address | undefined |
| _protectedHold | IHoldTypes.ProtectedHold | undefined |
| _signature | bytes | undefined |
Returns
| Name | Type | Description |
|---|---|---|
| success_ | bool | undefined |
| holdId_ | uint256 | undefined |
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
| Name | Type | Description |
|---|---|---|
operator indexed | address | The controller initiating the hold. |
tokenHolder indexed | address | The holder whose balance is being held. |
| partition | bytes32 | Partition over which the hold is placed. |
| holdId | uint256 | Sequence id assigned to the hold. |
| hold | IHoldTypes.Hold | The hold definition. |
| operatorData | bytes | Operator-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
| Name | Type | Description |
|---|---|---|
operator indexed | address | The address that initiated the hold (the holder itself). |
tokenHolder indexed | address | The holder whose balance is being held. |
| partition | bytes32 | Partition over which the hold is placed. |
| holdId | uint256 | Sequence id assigned to the hold. |
| hold | IHoldTypes.Hold | The hold definition (escrow, recipient, expiration, amount, data). |
| operatorData | bytes | Operator-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
| Name | Type | Description |
|---|---|---|
operator indexed | address | The third-party caller initiating the hold. |
tokenHolder indexed | address | The holder whose balance is being held. |
| partition | bytes32 | Partition over which the hold is placed. |
| holdId | uint256 | Sequence id assigned to the hold. |
| hold | IHoldTypes.Hold | The hold definition (escrow, recipient, expiration, amount, data). |
| operatorData | bytes | Operator-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
| Name | Type | Description |
|---|---|---|
tokenHolder indexed | address | The holder whose hold was executed. |
partition indexed | bytes32 | Partition over which the hold lived. |
| holdId | uint256 | Sequence id of the executed hold. |
| amount | uint256 | Amount released to the recipient. |
| to | address | Recipient 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
| Name | Type | Description |
|---|---|---|
operator indexed | address | The address that triggered the reclaim. |
tokenHolder indexed | address | The holder receiving the reclaimed balance. |
partition indexed | bytes32 | Partition over which the hold lived. |
| holdId | uint256 | Sequence id of the reclaimed hold. |
| amount | uint256 | Amount 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
| Name | Type | Description |
|---|---|---|
tokenHolder indexed | address | The holder receiving the released balance. |
partition indexed | bytes32 | Partition over which the hold lived. |
| holdId | uint256 | Sequence id of the released hold. |
| amount | uint256 | Amount 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
| Name | Type | Description |
|---|---|---|
operator indexed | address | The authorised operator initiating the hold. |
tokenHolder indexed | address | The holder whose balance is being held. |
| partition | bytes32 | Partition over which the hold is placed. |
| holdId | uint256 | Sequence id assigned to the hold. |
| hold | IHoldTypes.Hold | The hold definition. |
| operatorData | bytes | Operator-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
| Name | Type | Description |
|---|---|---|
operator indexed | address | The address submitting the protected hold (signature relayer). |
tokenHolder indexed | address | The holder whose balance is being held; must match the signer. |
| partition | bytes32 | Partition over which the hold is placed. |
| holdId | uint256 | Sequence id assigned to the hold. |
| hold | IHoldTypes.Hold | The hold definition. |
| operatorData | bytes | Operator-supplied metadata. |
ProtectedHoldByPartitionInitialized
event ProtectedHoldByPartitionInitialized()
Emitted once when the protected-hold-by-partition capability is initialised on a token.
Fires exclusively from initializeProtectedHoldByPartition.
Errors
AccountHasNoRole
error AccountHasNoRole(address account, bytes32 role)
Thrown when an account does not hold a required role.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The account that lacks the role. |
| role | bytes32 | The role that is not held. |
AssetNotOperational
error AssetNotOperational(bytes32 configId, uint256 versionId)
Raised by InitializerStorageWrapper.checkOperational (and the related isConfigVersionOperational helper) when an operation is attempted on a configuration version that has not yet been marked operational.
Parameters
| Name | Type | Description |
|---|---|---|
| configId | bytes32 | Resolver-proxy configuration whose operational status was checked. |
| versionId | uint256 | Configuration version whose operational status was checked. |
ClearingIsActivated
error ClearingIsActivated()
Thrown when an administration action requires clearing to be inactive but it is currently enabled.
Deactivated
error Deactivated()
Thrown when an operation guarded by onlyActivated is attempted on a token whose deactivation flag has already been set.
FacetAlreadyRegistered
error FacetAlreadyRegistered(bytes32 facetId, uint256 lastVersion)
Raised when an initialiser tries to register a facet that already has a non-zero last registered version (i.e. the facet is being re-initialised on a fresh install).
Parameters
| Name | Type | Description |
|---|---|---|
| facetId | bytes32 | Identifier of the offending facet. |
| lastVersion | uint256 | Last version recorded for that facet at the time of the check. |
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
| Name | Type | Description |
|---|---|---|
| holdAmount | uint256 | The amount still held. |
| amount | uint256 | The amount requested. |
InvalidDestinationAddress
error InvalidDestinationAddress(address holdDestination, address to)
Reverts when the recipient supplied to {executeHoldByPartition} mismatches the hold.
Parameters
| Name | Type | Description |
|---|---|---|
| holdDestination | address | The recipient stored on the hold. |
| to | address | The 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.
IsPaused
error IsPaused()
Thrown when an operation that requires the token to be unpaused is attempted while the token is paused (own flag or any external pause contract).
PartitionsAreUnProtected
error PartitionsAreUnProtected()
Reverts when a protected-mode operation is attempted but partitions are not currently protected.
UnrecognizedResolverProxyVersion
error UnrecognizedResolverProxyVersion(bytes8 _resolverProxyVersion)
Thrown when the provided proxy version does not match any BLR compatible standard.
Parameters
| Name | Type | Description |
|---|---|---|
| _resolverProxyVersion | bytes8 | proxy version that is not compatible with the BLR. |
WalletRecovered
error WalletRecovered()
Thrown when attempting to recover a wallet that has already been recovered.
WrongExpirationTimestamp
error WrongExpirationTimestamp()
Reverts when an expiration timestamp is invalid.
Used for expired, past, or otherwise unacceptable expiration values.
WrongHoldId
error WrongHoldId()
Reverts when the supplied hold id does not exist for the (partition, holder) pair.
ZeroAddressNotAllowed
error ZeroAddressNotAllowed()
Reverts when the zero address is supplied where it is not permitted.
Prevents invalid account, contract, or recipient references.