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
calls
Multicall2.Call[]
undefined
Returns
blockNumber
uint256
undefined
returnData
bytes[]
undefined
blockAndAggregate
function blockAndAggregate(Multicall2.Call[] calls) external nonpayable returns (uint256 blockNumber, bytes32 blockHash, struct Multicall2.Result[] returnData)
Parameters
calls
Multicall2.Call[]
undefined
Returns
blockNumber
uint256
undefined
blockHash
bytes32
undefined
returnData
Multicall2.Result[]
undefined
getBlockHash
function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash)
Parameters
blockNumber
uint256
undefined
Returns
blockHash
bytes32
undefined
getBlockNumber
function getBlockNumber() external view returns (uint256 blockNumber)
Returns
blockNumber
uint256
undefined
getCurrentBlockCoinbase
function getCurrentBlockCoinbase() external view returns (address coinbase)
Returns
coinbase
address
undefined
getCurrentBlockDifficulty
function getCurrentBlockDifficulty() external view returns (uint256 difficulty)
Returns
difficulty
uint256
undefined
getCurrentBlockGasLimit
function getCurrentBlockGasLimit() external view returns (uint256 gaslimit)
Returns
gaslimit
uint256
undefined
getCurrentBlockTimestamp
function getCurrentBlockTimestamp() external view returns (uint256 timestamp)
Returns
timestamp
uint256
undefined
getEthBalance
function getEthBalance(address addr) external view returns (uint256 balance)
Parameters
addr
address
undefined
Returns
balance
uint256
undefined
getLastBlockHash
function getLastBlockHash() external view returns (bytes32 blockHash)
Returns
blockHash
bytes32
undefined
tryAggregate
function tryAggregate(bool requireSuccess, Multicall2.Call[] calls) external nonpayable returns (struct Multicall2.Result[] returnData)
Parameters
requireSuccess
bool
undefined
calls
Multicall2.Call[]
undefined
Returns
returnData
Multicall2.Result[]
undefined
tryBlockAndAggregate
function tryBlockAndAggregate(bool requireSuccess, Multicall2.Call[] calls) external nonpayable returns (uint256 blockNumber, bytes32 blockHash, struct Multicall2.Result[] returnData)
Parameters
requireSuccess
bool
undefined
calls
Multicall2.Call[]
undefined
Returns
blockNumber
uint256
undefined
blockHash
bytes32
undefined
returnData
Multicall2.Result[]
undefined
Last updated
Was this helpful?