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
Parameters
Name | Type | Description |
---|---|---|
calls | Multicall2.Call[] | undefined |
Returns
Name | Type | Description |
---|---|---|
blockNumber | uint256 | undefined |
returnData | bytes[] | undefined |
blockAndAggregate
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