Skip to content

Multicall

Berps' main Entrypoint contract extends the PayableMulticallable contract. Its primary purpose is to aggregate results from multiple function calls in a single transaction, which can help reduce gas costs and improve efficiency when batching multiple Berps trading actions, particularly in the context of a trading bot.

The PayableMulticallable contract is derived from the Multicallable contract from vectorized.eth and is part of the solady library, which provides a suite of gas optimized Solidity tools.

Functions

solidity
function multicall(
    bool requireSuccess,
    bytes[] calldata data
) external payable returns (bytes[] memory)

Parameters

NameTypeDescription
requireSuccessboolWhether to revert the transaction if any of the calls are unsuccessful
databytes[]an array of calldata

Returns

TypeDescription
bytesAn array of bytes containing the responses