Multicall3
Sonic0xca11bde05977b3631167028862be2a173976ca11
Solidity v0.8.12+commit.f00d7308
概覽
讀取函式
Can revert if the BASEFEE opcode is not implemented by the given chain
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| basefee | uint256 |
Returns the block hash for the given block number
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| blockNumber | uint256 | The block number |
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| blockHash | bytes32 |
Returns the block number
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| blockNumber | uint256 |
Returns the chain id
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| chainid | uint256 |
Returns the block coinbase
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| coinbase | address |
Returns the block difficulty
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| difficulty | uint256 |
Returns the block gas limit
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| gaslimit | uint256 |
Returns the block timestamp
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| timestamp | uint256 |
Returns the (ETH) balance of a given address
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| addr | address |
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| balance | uint256 |
Returns the block hash of the last block
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| blockHash | bytes32 |
寫入函式
Backwards-compatible call aggregation with Multicall
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| calls | tuple[] | An array of Call structs |
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| blockNumber | uint256 | blockNumber The block number where the calls were executed |
| returnData | bytes[] | returnData An array of bytes containing the responses |
Aggregate calls, ensuring each returns success if required
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| calls | tuple[] | An array of Call3 structs |
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| returnData | tuple[] | returnData An array of Result structs |
Reverts if msg.value is less than the sum of the call values
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| calls | tuple[] | An array of Call3Value structs |
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| returnData | tuple[] | returnData An array of Result structs |
Aggregate calls and allow failures using tryAggregate
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| calls | tuple[] | An array of Call structs |
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| blockNumber | uint256 | blockNumber The block number where the calls were executed |
| blockHash | bytes32 | blockHash The hash of the block where the calls were executed |
| returnData | tuple[] | returnData An array of Result structs |
Aggregate calls without requiring success
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| requireSuccess | bool | If true, require all calls to succeed |
| calls | tuple[] | An array of Call structs |
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| returnData | tuple[] | returnData An array of Result structs |
Aggregate calls and allow failures using tryAggregate
參數
| 名稱 | 類型 | 描述 |
|---|---|---|
| requireSuccess | bool | |
| calls | tuple[] | An array of Call structs |
回傳值
| 名稱 | 類型 | 描述 |
|---|---|---|
| blockNumber | uint256 | blockNumber The block number where the calls were executed |
| blockHash | bytes32 | blockHash The hash of the block where the calls were executed |
| returnData | tuple[] | returnData An array of Result structs |