Multicall2

Michael Elliot <[email protected]>Joshua Levine <[email protected]>Nick Johnson <[email protected]>

Multicall2 - Aggregate results from multiple read-only function calls

Methods

aggregate

function aggregate(Multicall2.Call[] calls) external nonpayable returns (uint256 blockNumber, bytes[] returnData)

Parameters

Name
Type
Description

calls

Multicall2.Call[]

undefined

Returns

Name
Type
Description

blockNumber

uint256

undefined

returnData

bytes[]

undefined

blockAndAggregate

function blockAndAggregate(Multicall2.Call[] calls) external nonpayable returns (uint256 blockNumber, bytes32 blockHash, struct Multicall2.Result[] returnData)

Parameters

Name
Type
Description

calls

Multicall2.Call[]

undefined

Returns

Name
Type
Description

blockNumber

uint256

undefined

blockHash

bytes32

undefined

returnData

Multicall2.Result[]

undefined

getBlockHash

Parameters

Name
Type
Description

blockNumber

uint256

undefined

Returns

Name
Type
Description

blockHash

bytes32

undefined

getBlockNumber

Returns

Name
Type
Description

blockNumber

uint256

undefined

getCurrentBlockCoinbase

Returns

Name
Type
Description

coinbase

address

undefined

getCurrentBlockDifficulty

Returns

Name
Type
Description

difficulty

uint256

undefined

getCurrentBlockGasLimit

Returns

Name
Type
Description

gaslimit

uint256

undefined

getCurrentBlockTimestamp

Returns

Name
Type
Description

timestamp

uint256

undefined

getEthBalance

Parameters

Name
Type
Description

addr

address

undefined

Returns

Name
Type
Description

balance

uint256

undefined

getLastBlockHash

Returns

Name
Type
Description

blockHash

bytes32

undefined

tryAggregate

Parameters

Name
Type
Description

requireSuccess

bool

undefined

calls

Multicall2.Call[]

undefined

Returns

Name
Type
Description

returnData

Multicall2.Result[]

undefined

tryBlockAndAggregate

Parameters

Name
Type
Description

requireSuccess

bool

undefined

calls

Multicall2.Call[]

undefined

Returns

Name
Type
Description

blockNumber

uint256

undefined

blockHash

bytes32

undefined

returnData

Multicall2.Result[]

undefined

Last updated

Was this helpful?