Skip to main content

BatchFreezeFacet

Asset Tokenization Studio Team

BatchFreezeFacet

Diamond facet that exposes batch freeze and unfreeze operations through the IBatchFreeze interface, registered under RESOLVER_KEY_BATCH_FREEZE.

Inherits batch logic from BatchFreeze and satisfies the IStaticFunctionSelectors contract required by the Diamond proxy for selector registration. Exposes three selectors: batchSetAddressFrozen, batchFreezePartialTokens, and batchUnfreezePartialTokens.

Methods​

batchFreezePartialTokens​

function batchFreezePartialTokens(address[] _userAddresses, uint256[] _amounts) external nonpayable

Batch freezes partial tokens for multiple addresses.

Emits IFreeze.TokensFrozen for each address. Token must be unpaused.

Parameters​

NameTypeDescription
_userAddressesaddress[]Array of addresses to freeze tokens for.
_amountsuint256[]Corresponding token amounts to freeze. Must be the same length as _userAddresses. Only works in single-partition mode.

batchSetAddressFrozen​

function batchSetAddressFrozen(address[] _userAddresses, bool[] _freeze) external nonpayable

Batch freezes or unfreezes multiple addresses.

Emits IFreeze.AddressFrozen for each address. Only callable by ROLE_FREEZE_MANAGER or ROLE_AGENT. Token must be unpaused.

Parameters​

NameTypeDescription
_userAddressesaddress[]Array of addresses to freeze/unfreeze.
_freezebool[]Array of freeze statuses (true = freeze, false = unfreeze). Must be the same length as _userAddresses.

batchUnfreezePartialTokens​

function batchUnfreezePartialTokens(address[] _userAddresses, uint256[] _amounts) external nonpayable

Batch unfreezes partial tokens for multiple addresses.

Emits IFreeze.TokensUnfrozen for each address. Token must be unpaused.

Parameters​

NameTypeDescription
_userAddressesaddress[]Array of addresses to unfreeze tokens for.
_amountsuint256[]Corresponding token amounts to unfreeze. Must be the same length as _userAddresses. Only works in single-partition mode.

getStaticFunctionSelectors​

function getStaticFunctionSelectors() external pure returns (bytes4[])

Gets all function selectors of a facet

Returns​

NameTypeDescription
_0bytes4[]Face functions selectors

getStaticInterfaceIds​

function getStaticInterfaceIds() external pure returns (bytes4[])

Gets all interfaces ids of a facet.

Returns​

NameTypeDescription
_0bytes4[]Face interface ids

getStaticResolverKey​

function getStaticResolverKey() external pure returns (bytes32 staticResolverKey_)

Gets the static resolver key

Returns​

NameTypeDescription
staticResolverKey_bytes32Static resolver key

initializeBatchFreeze​

function initializeBatchFreeze() external nonpayable

Initialises the batch freeze capability on the token.

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

Events​

AddressFrozen​

event AddressFrozen(address indexed userAddress, bool indexed isFrozen, address indexed owner)

Emitted when a wallet's address-level frozen status changes.

Parameters​

NameTypeDescription
userAddress indexedaddressThe wallet address whose freeze status was updated.
isFrozen indexedboolThe new freeze status; true means frozen, false means unfrozen.
owner indexedaddressAddress of the agent who triggered the status change.

BatchFreezeInitialized​

event BatchFreezeInitialized()

Emitted once when the batch freeze capability is initialised on a token.

Fires exclusively from initializeBatchFreeze after the storage write succeeds.

DelegateVotesChanged​

event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance)

Emitted when delegate votes change due to balance changes

Parameters​

NameTypeDescription
delegate indexedaddressThe delegate whose votes changed
previousBalanceuint256The previous vote balance
newBalanceuint256The new vote balance

TokensFrozen​

event TokensFrozen(address indexed account, uint256 amount, bytes32 partition)

Emitted when a specific amount of tokens is frozen for a wallet.

Parameters​

NameTypeDescription
account indexedaddressThe wallet address whose tokens were frozen.
amountuint256The amount of tokens frozen.
partitionbytes32The partition from which tokens were frozen.

TokensUnfrozen​

event TokensUnfrozen(address indexed account, uint256 amount, bytes32 partition)

Emitted when a specific amount of previously frozen tokens is unfrozen for a wallet.

Parameters​

NameTypeDescription
account indexedaddressThe wallet address whose tokens were unfrozen.
amountuint256The amount of tokens unfrozen.
partitionbytes32The partition to which tokens were restored.

Transfer​

event Transfer(address indexed from, address indexed to, uint256 value)

Emitted whenever tokens move between accounts, are minted, or are burned.

Parameters​

NameTypeDescription
from indexedaddressSource account (zero address on mint).
to indexedaddressDestination account (zero address on burn).
valueuint256Amount of tokens transferred.

TransferByPartition​

event TransferByPartition(bytes32 indexed fromPartition, address operator, address indexed from, address indexed to, uint256 value, bytes data, bytes operatorData)

Emitted when tokens are transferred from one partition to another or within the same partition.

Parameters​

NameTypeDescription
fromPartition indexedbytes32Source partition.
operatoraddressAddress that initiated the transfer.
from indexedaddressToken holder whose balance decreased.
to indexedaddressRecipient whose balance increased.
valueuint256Token quantity transferred.
databytesCaller-supplied data.
operatorDatabytesOperator-supplied data.

Errors​

AbafChangeForBlockForbidden​

error AbafChangeForBlockForbidden(uint256 blockNumber)

Raised when attempting to change ABAF for a block that is forbidden

Parameters​

NameTypeDescription
blockNumberuint256The block number that is forbidden

AccountHasNoRole​

error AccountHasNoRole(address account, bytes32 role)

Thrown when an account does not hold a required role.

Parameters​

NameTypeDescription
accountaddressThe account that lacks the role.
rolebytes32The role that is not held.

AccountHasNoRoles​

error AccountHasNoRoles(address account, bytes32[] roles)

Thrown when an account does not hold any of the specified roles.

Parameters​

NameTypeDescription
accountaddressThe account that lacks the roles.
rolesbytes32[]The roles that are 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​

NameTypeDescription
configIdbytes32Resolver-proxy configuration whose operational status was checked.
versionIduint256Configuration version whose operational status was checked.

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​

NameTypeDescription
facetIdbytes32Identifier of the offending facet.
lastVersionuint256Last version recorded for that facet at the time of the check.

InputAmountsArrayLengthMismatch​

error InputAmountsArrayLengthMismatch()

Thrown when the lengths of two input amount arrays do not match.

InputBoolArrayLengthMismatch​

error InputBoolArrayLengthMismatch()

Thrown when the lengths of two input boolean arrays do not match.

InsufficientBalance​

error InsufficientBalance(address account, uint256 balance, uint256 value, bytes32 partition)

Thrown when a transfer or redemption is attempted with insufficient partition balance.

Parameters​

NameTypeDescription
accountaddressThe account whose balance was checked.
balanceuint256The actual balance available.
valueuint256The amount that was requested.
partitionbytes32The partition that was checked.

InsufficientFrozenBalance​

error InsufficientFrozenBalance(address user, uint256 requestedUnfreeze, uint256 availableFrozen, bytes32 partition)

Thrown when an unfreeze request exceeds the address's available frozen balance.

Parameters​

NameTypeDescription
useraddressAddress whose frozen balance was checked.
requestedUnfreezeuint256Amount the caller attempted to unfreeze.
availableFrozenuint256Actual frozen balance available for unfreezing.
partitionbytes32Partition on which the frozen balance was checked.

InvalidFreezeAmount​

error InvalidFreezeAmount()

Reverts when a partial token freeze is attempted with a zero amount.

Checked at the start of ERC3643StorageWrapper.freezeTokens, the entry point for partial token freezes. Freezing zero tokens is semantically invalid and rejected early.

InvalidPartition​

error InvalidPartition(address account, bytes32 partition)

Thrown when an account does not hold or is not associated with the specified partition.

Parameters​

NameTypeDescription
accountaddressAddress that was checked.
partitionbytes32Partition that was not found for the account.

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).

NotAllowedInMultiPartitionMode​

error NotAllowedInMultiPartitionMode()

Thrown when a single-partition operation is attempted on a multi-partition token.

SnapshotIdDoesNotExists​

error SnapshotIdDoesNotExists(uint256 snapshotId)

Thrown when the requested snapshot identifier has never been taken on this token.

Parameters​

NameTypeDescription
snapshotIduint256The unrecognised snapshot identifier that was supplied.

SnapshotIdNull​

error SnapshotIdNull()

Thrown when a snapshot identifier of zero is supplied; zero is reserved and never assigned to a valid snapshot.

UnexpectedError​

error UnexpectedError(bytes4 _errorId)

Reverts when an unreachable validation state is detected.

Replaces assertions for defensive handling of logically impossible states.

Parameters​

NameTypeDescription
_errorIdbytes4Identifier of the unexpected validation condition.

UnrecognizedResolverProxyVersion​

error UnrecognizedResolverProxyVersion(bytes8 _resolverProxyVersion)

Thrown when the provided proxy version does not match any BLR compatible standard.

Parameters​

NameTypeDescription
_resolverProxyVersionbytes8proxy version that is not compatible with the BLR.

WalletRecovered​

error WalletRecovered()

Thrown when attempting to recover a wallet that has already been recovered.

ZeroAddressNotAllowed​

error ZeroAddressNotAllowed()

Reverts when the zero address is supplied where it is not permitted.

Prevents invalid account, contract, or recipient references.