Skip to content

Bundler3

0xF920140A65D0f412f2AB3e76C4fEAB5Eef0657ae | Git Source

Inherits: IBundler3

Enables batching multiple calls in a single one.

Transiently stores the initiator of the multicall.

Can be reentered by the last unreturned callee with known data.

Anybody can do arbitrary calls with this contract, so it should not be approved/authorized anywhere.

State Variables

initiator

The initiator of the multicall transaction.

solidity
address public transient initiator

reenterHash

Hash of the concatenation of the sender and the hash of the calldata of the next call to reenter.

solidity
bytes32 public transient reenterHash

Functions

multicall

Executes a sequence of calls.

Locks the initiator so that the sender can be identified by other contracts.

solidity
function multicall(Call[] calldata bundle) external payable;

Parameters

NameTypeDescription
bundleCall[]The ordered array of calldata to execute.

reenter

Executes a sequence of calls.

Useful during callbacks.

Can only be called by the last unreturned callee with known data.

solidity
function reenter(Call[] calldata bundle) external;

Parameters

NameTypeDescription
bundleCall[]The ordered array of calldata to execute.

_multicall

Executes a sequence of calls.

solidity
function _multicall(Call[] calldata bundle) internal;