Skip to main content

Batch

Git Source

Inherits: IBatch

See the documentation in {IBatch}.

Functions

batch

Allows batched calls to self, i.e., this contract.

Since msg.value can be reused across calls, be VERY CAREFUL when using it. Refer to https://paradigm.xyz/2021/08/two-rights-might-make-a-wrong for more information.

function batch(bytes[] calldata calls) external payable virtual override returns (bytes[] memory results);

Parameters

NameTypeDescription
callsbytes[]An array of inputs for each call.

Returns

NameTypeDescription
resultsbytes[]An array of results from each call. Empty when the calls do not return anything.