Multicall2

Michael Elliot <mike@makerdao.com>Joshua Levine <joshua@makerdao.com>Nick Johnson <arachnid@notdot.net>

Multicall2 - Aggregate results from multiple read-only function calls

Methods

aggregate

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

Parameters

Returns

blockAndAggregate

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

Parameters

Returns

getBlockHash

function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash)

Parameters

Returns

getBlockNumber

function getBlockNumber() external view returns (uint256 blockNumber)

Returns

getCurrentBlockCoinbase

function getCurrentBlockCoinbase() external view returns (address coinbase)

Returns

getCurrentBlockDifficulty

function getCurrentBlockDifficulty() external view returns (uint256 difficulty)

Returns

getCurrentBlockGasLimit

function getCurrentBlockGasLimit() external view returns (uint256 gaslimit)

Returns

getCurrentBlockTimestamp

function getCurrentBlockTimestamp() external view returns (uint256 timestamp)

Returns

getEthBalance

function getEthBalance(address addr) external view returns (uint256 balance)

Parameters

Returns

getLastBlockHash

function getLastBlockHash() external view returns (bytes32 blockHash)

Returns

tryAggregate

function tryAggregate(bool requireSuccess, Multicall2.Call[] calls) external nonpayable returns (struct Multicall2.Result[] returnData)

Parameters

Returns

tryBlockAndAggregate

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

Parameters

Returns

Last updated