Skip to main content

IBatch

Git Source

This contract implements logic to batch call any function.

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