-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathIMulticall3.sol
More file actions
68 lines (48 loc) · 2.08 KB
/
IMulticall3.sol
File metadata and controls
68 lines (48 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.8.13 <0.9.0;
interface IMulticall3 {
struct Call {
address target;
bytes callData;
}
struct Call3 {
address target;
bool allowFailure;
bytes callData;
}
struct Call3Value {
address target;
bool allowFailure;
uint256 value;
bytes callData;
}
struct Result {
bool success;
bytes returnData;
}
function aggregate(Call[] memory calls) external payable returns (uint256 blockNumber, bytes[] memory returnData);
function aggregate3(Call3[] memory calls) external payable returns (Result[] memory returnData);
function aggregate3Value(Call3Value[] memory calls) external payable returns (Result[] memory returnData);
function blockAndAggregate(Call[] memory calls)
external
payable
returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);
function getBasefee() external view returns (uint256 basefee);
function getBlockHash(uint256 blockNumber) external view returns (bytes32 blockHash);
function getBlockNumber() external view returns (uint256 blockNumber);
function getChainId() external view returns (uint256 chainid);
function getCurrentBlockCoinbase() external view returns (address coinbase);
function getCurrentBlockDifficulty() external view returns (uint256 difficulty);
function getCurrentBlockGasLimit() external view returns (uint256 gaslimit);
function getCurrentBlockTimestamp() external view returns (uint256 timestamp);
function getEthBalance(address addr) external view returns (uint256 balance);
function getLastBlockHash() external view returns (bytes32 blockHash);
function tryAggregate(bool requireSuccess, Call[] memory calls)
external
payable
returns (Result[] memory returnData);
function tryBlockAndAggregate(bool requireSuccess, Call[] memory calls)
external
payable
returns (uint256 blockNumber, bytes32 blockHash, Result[] memory returnData);
}