Skip to main content

BatchTransferFacet

Asset Tokenization Studio Team

BatchTransferFacet

Diamond facet that exposes the batch transfer capability through the IBatchTransfer interface, registered under RESOLVER_KEY_BATCH_TRANSFER.

Inherits transfer logic from BatchTransfer and satisfies the IStaticFunctionSelectors contract required by the Diamond proxy for selector registration. Exposes one selector: batchTransfer.

Methods​

batchTransfer​

function batchTransfer(address[] _toList, uint256[] _amounts) external nonpayable

Transfers tokens from the caller to multiple addresses in a single transaction.

Token must be unpaused, not in multi-partition mode, clearing disabled, and the caller plus every recipient must satisfy identity and compliance checks. Delegates each transfer to TokenCoreOps.transfer.

Parameters​

NameTypeDescription
_toListaddress[]Recipient addresses.
_amountsuint256[]Corresponding token amounts to transfer. Must be the same length as _toList.

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

initializeBatchTransfer​

function initializeBatchTransfer() external nonpayable

Initialises the batch transfer capability on the token.

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

Events​

BatchTransferInitialized​

event BatchTransferInitialized()

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

Fires exclusively from initializeBatchTransfer.

Errors​

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.

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.

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.

PartitionsAreProtectedAndNoRole​

error PartitionsAreProtectedAndNoRole(address account, bytes32 role)

Reverts when a transfer is attempted while partitions are protected and the caller does not hold the required partition role.

Parameters​

NameTypeDescription
accountaddressThe caller lacking the required role.
rolebytes32The role that would have been needed to proceed.

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.

ZeroValue​

error ZeroValue()

Thrown when a zero token amount is supplied to an operation that requires a positive value.