@d8x/perpetuals-sdk 0.8.0 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/cjs/abi/Multicall3.json +452 -0
  2. package/dist/cjs/contracts/Multicall3.d.ts +292 -0
  3. package/dist/cjs/contracts/Multicall3.js +3 -0
  4. package/dist/cjs/contracts/Multicall3.js.map +1 -0
  5. package/dist/cjs/contracts/factories/Multicall3__factory.d.ts +351 -0
  6. package/dist/cjs/contracts/factories/Multicall3__factory.js +481 -0
  7. package/dist/cjs/contracts/factories/Multicall3__factory.js.map +1 -0
  8. package/dist/cjs/contracts/factories/index.d.ts +1 -0
  9. package/dist/cjs/contracts/factories/index.js +3 -1
  10. package/dist/cjs/contracts/factories/index.js.map +1 -1
  11. package/dist/cjs/contracts/index.d.ts +2 -0
  12. package/dist/cjs/contracts/index.js +3 -1
  13. package/dist/cjs/contracts/index.js.map +1 -1
  14. package/dist/cjs/marketData.d.ts +24 -1
  15. package/dist/cjs/marketData.js +129 -6
  16. package/dist/cjs/marketData.js.map +1 -1
  17. package/dist/cjs/nodeSDKTypes.d.ts +1 -0
  18. package/dist/cjs/nodeSDKTypes.js +2 -1
  19. package/dist/cjs/nodeSDKTypes.js.map +1 -1
  20. package/dist/cjs/perpetualDataHandler.d.ts +25 -1
  21. package/dist/cjs/perpetualDataHandler.js +63 -1
  22. package/dist/cjs/perpetualDataHandler.js.map +1 -1
  23. package/dist/cjs/version.d.ts +1 -1
  24. package/dist/cjs/version.js +1 -1
  25. package/dist/esm/abi/Multicall3.json +452 -0
  26. package/dist/esm/contracts/Multicall3.d.ts +292 -0
  27. package/dist/esm/contracts/Multicall3.js +2 -0
  28. package/dist/esm/contracts/Multicall3.js.map +1 -0
  29. package/dist/esm/contracts/factories/Multicall3__factory.d.ts +351 -0
  30. package/dist/esm/contracts/factories/Multicall3__factory.js +477 -0
  31. package/dist/esm/contracts/factories/Multicall3__factory.js.map +1 -0
  32. package/dist/esm/contracts/factories/index.d.ts +1 -0
  33. package/dist/esm/contracts/factories/index.js +1 -0
  34. package/dist/esm/contracts/factories/index.js.map +1 -1
  35. package/dist/esm/contracts/index.d.ts +2 -0
  36. package/dist/esm/contracts/index.js +1 -0
  37. package/dist/esm/contracts/index.js.map +1 -1
  38. package/dist/esm/marketData.d.ts +24 -1
  39. package/dist/esm/marketData.js +130 -7
  40. package/dist/esm/marketData.js.map +1 -1
  41. package/dist/esm/nodeSDKTypes.d.ts +1 -0
  42. package/dist/esm/nodeSDKTypes.js +1 -0
  43. package/dist/esm/nodeSDKTypes.js.map +1 -1
  44. package/dist/esm/perpetualDataHandler.d.ts +25 -1
  45. package/dist/esm/perpetualDataHandler.js +65 -3
  46. package/dist/esm/perpetualDataHandler.js.map +1 -1
  47. package/dist/esm/version.d.ts +1 -1
  48. package/dist/esm/version.js +1 -1
  49. package/package.json +1 -1
  50. package/src/abi/Multicall3.json +452 -0
  51. package/src/contracts/Multicall3.ts +582 -0
  52. package/src/contracts/factories/Multicall3__factory.ts +497 -0
  53. package/src/contracts/factories/index.ts +1 -0
  54. package/src/contracts/index.ts +2 -0
  55. package/src/marketData.ts +162 -8
  56. package/src/nodeSDKTypes.ts +1 -1
  57. package/src/perpetualDataHandler.ts +85 -2
  58. package/src/version.ts +1 -1
@@ -0,0 +1,292 @@
1
+ import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, PayableOverrides, PopulatedTransaction, Signer, utils } from "ethers";
2
+ import type { FunctionFragment, Result } from "@ethersproject/abi";
3
+ import type { Listener, Provider } from "@ethersproject/providers";
4
+ import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common";
5
+ export declare namespace Multicall3 {
6
+ type CallStruct = {
7
+ target: string;
8
+ callData: BytesLike;
9
+ };
10
+ type CallStructOutput = [string, string] & {
11
+ target: string;
12
+ callData: string;
13
+ };
14
+ type Call3Struct = {
15
+ target: string;
16
+ allowFailure: boolean;
17
+ callData: BytesLike;
18
+ };
19
+ type Call3StructOutput = [string, boolean, string] & {
20
+ target: string;
21
+ allowFailure: boolean;
22
+ callData: string;
23
+ };
24
+ type ResultStruct = {
25
+ success: boolean;
26
+ returnData: BytesLike;
27
+ };
28
+ type ResultStructOutput = [boolean, string] & {
29
+ success: boolean;
30
+ returnData: string;
31
+ };
32
+ type Call3ValueStruct = {
33
+ target: string;
34
+ allowFailure: boolean;
35
+ value: BigNumberish;
36
+ callData: BytesLike;
37
+ };
38
+ type Call3ValueStructOutput = [string, boolean, BigNumber, string] & {
39
+ target: string;
40
+ allowFailure: boolean;
41
+ value: BigNumber;
42
+ callData: string;
43
+ };
44
+ }
45
+ export interface Multicall3Interface extends utils.Interface {
46
+ functions: {
47
+ "aggregate((address,bytes)[])": FunctionFragment;
48
+ "aggregate3((address,bool,bytes)[])": FunctionFragment;
49
+ "aggregate3Value((address,bool,uint256,bytes)[])": FunctionFragment;
50
+ "blockAndAggregate((address,bytes)[])": FunctionFragment;
51
+ "getBasefee()": FunctionFragment;
52
+ "getBlockHash(uint256)": FunctionFragment;
53
+ "getBlockNumber()": FunctionFragment;
54
+ "getChainId()": FunctionFragment;
55
+ "getCurrentBlockCoinbase()": FunctionFragment;
56
+ "getCurrentBlockDifficulty()": FunctionFragment;
57
+ "getCurrentBlockGasLimit()": FunctionFragment;
58
+ "getCurrentBlockTimestamp()": FunctionFragment;
59
+ "getEthBalance(address)": FunctionFragment;
60
+ "getLastBlockHash()": FunctionFragment;
61
+ "tryAggregate(bool,(address,bytes)[])": FunctionFragment;
62
+ "tryBlockAndAggregate(bool,(address,bytes)[])": FunctionFragment;
63
+ };
64
+ getFunction(nameOrSignatureOrTopic: "aggregate" | "aggregate3" | "aggregate3Value" | "blockAndAggregate" | "getBasefee" | "getBlockHash" | "getBlockNumber" | "getChainId" | "getCurrentBlockCoinbase" | "getCurrentBlockDifficulty" | "getCurrentBlockGasLimit" | "getCurrentBlockTimestamp" | "getEthBalance" | "getLastBlockHash" | "tryAggregate" | "tryBlockAndAggregate"): FunctionFragment;
65
+ encodeFunctionData(functionFragment: "aggregate", values: [Multicall3.CallStruct[]]): string;
66
+ encodeFunctionData(functionFragment: "aggregate3", values: [Multicall3.Call3Struct[]]): string;
67
+ encodeFunctionData(functionFragment: "aggregate3Value", values: [Multicall3.Call3ValueStruct[]]): string;
68
+ encodeFunctionData(functionFragment: "blockAndAggregate", values: [Multicall3.CallStruct[]]): string;
69
+ encodeFunctionData(functionFragment: "getBasefee", values?: undefined): string;
70
+ encodeFunctionData(functionFragment: "getBlockHash", values: [BigNumberish]): string;
71
+ encodeFunctionData(functionFragment: "getBlockNumber", values?: undefined): string;
72
+ encodeFunctionData(functionFragment: "getChainId", values?: undefined): string;
73
+ encodeFunctionData(functionFragment: "getCurrentBlockCoinbase", values?: undefined): string;
74
+ encodeFunctionData(functionFragment: "getCurrentBlockDifficulty", values?: undefined): string;
75
+ encodeFunctionData(functionFragment: "getCurrentBlockGasLimit", values?: undefined): string;
76
+ encodeFunctionData(functionFragment: "getCurrentBlockTimestamp", values?: undefined): string;
77
+ encodeFunctionData(functionFragment: "getEthBalance", values: [string]): string;
78
+ encodeFunctionData(functionFragment: "getLastBlockHash", values?: undefined): string;
79
+ encodeFunctionData(functionFragment: "tryAggregate", values: [boolean, Multicall3.CallStruct[]]): string;
80
+ encodeFunctionData(functionFragment: "tryBlockAndAggregate", values: [boolean, Multicall3.CallStruct[]]): string;
81
+ decodeFunctionResult(functionFragment: "aggregate", data: BytesLike): Result;
82
+ decodeFunctionResult(functionFragment: "aggregate3", data: BytesLike): Result;
83
+ decodeFunctionResult(functionFragment: "aggregate3Value", data: BytesLike): Result;
84
+ decodeFunctionResult(functionFragment: "blockAndAggregate", data: BytesLike): Result;
85
+ decodeFunctionResult(functionFragment: "getBasefee", data: BytesLike): Result;
86
+ decodeFunctionResult(functionFragment: "getBlockHash", data: BytesLike): Result;
87
+ decodeFunctionResult(functionFragment: "getBlockNumber", data: BytesLike): Result;
88
+ decodeFunctionResult(functionFragment: "getChainId", data: BytesLike): Result;
89
+ decodeFunctionResult(functionFragment: "getCurrentBlockCoinbase", data: BytesLike): Result;
90
+ decodeFunctionResult(functionFragment: "getCurrentBlockDifficulty", data: BytesLike): Result;
91
+ decodeFunctionResult(functionFragment: "getCurrentBlockGasLimit", data: BytesLike): Result;
92
+ decodeFunctionResult(functionFragment: "getCurrentBlockTimestamp", data: BytesLike): Result;
93
+ decodeFunctionResult(functionFragment: "getEthBalance", data: BytesLike): Result;
94
+ decodeFunctionResult(functionFragment: "getLastBlockHash", data: BytesLike): Result;
95
+ decodeFunctionResult(functionFragment: "tryAggregate", data: BytesLike): Result;
96
+ decodeFunctionResult(functionFragment: "tryBlockAndAggregate", data: BytesLike): Result;
97
+ events: {};
98
+ }
99
+ export interface Multicall3 extends BaseContract {
100
+ connect(signerOrProvider: Signer | Provider | string): this;
101
+ attach(addressOrName: string): this;
102
+ deployed(): Promise<this>;
103
+ interface: Multicall3Interface;
104
+ queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
105
+ listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
106
+ listeners(eventName?: string): Array<Listener>;
107
+ removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
108
+ removeAllListeners(eventName?: string): this;
109
+ off: OnEvent<this>;
110
+ on: OnEvent<this>;
111
+ once: OnEvent<this>;
112
+ removeListener: OnEvent<this>;
113
+ functions: {
114
+ aggregate(calls: Multicall3.CallStruct[], overrides?: PayableOverrides & {
115
+ from?: string;
116
+ }): Promise<ContractTransaction>;
117
+ aggregate3(calls: Multicall3.Call3Struct[], overrides?: PayableOverrides & {
118
+ from?: string;
119
+ }): Promise<ContractTransaction>;
120
+ aggregate3Value(calls: Multicall3.Call3ValueStruct[], overrides?: PayableOverrides & {
121
+ from?: string;
122
+ }): Promise<ContractTransaction>;
123
+ blockAndAggregate(calls: Multicall3.CallStruct[], overrides?: PayableOverrides & {
124
+ from?: string;
125
+ }): Promise<ContractTransaction>;
126
+ getBasefee(overrides?: CallOverrides): Promise<[BigNumber] & {
127
+ basefee: BigNumber;
128
+ }>;
129
+ getBlockHash(blockNumber: BigNumberish, overrides?: CallOverrides): Promise<[string] & {
130
+ blockHash: string;
131
+ }>;
132
+ getBlockNumber(overrides?: CallOverrides): Promise<[BigNumber] & {
133
+ blockNumber: BigNumber;
134
+ }>;
135
+ getChainId(overrides?: CallOverrides): Promise<[BigNumber] & {
136
+ chainid: BigNumber;
137
+ }>;
138
+ getCurrentBlockCoinbase(overrides?: CallOverrides): Promise<[string] & {
139
+ coinbase: string;
140
+ }>;
141
+ getCurrentBlockDifficulty(overrides?: CallOverrides): Promise<[BigNumber] & {
142
+ difficulty: BigNumber;
143
+ }>;
144
+ getCurrentBlockGasLimit(overrides?: CallOverrides): Promise<[BigNumber] & {
145
+ gaslimit: BigNumber;
146
+ }>;
147
+ getCurrentBlockTimestamp(overrides?: CallOverrides): Promise<[BigNumber] & {
148
+ timestamp: BigNumber;
149
+ }>;
150
+ getEthBalance(addr: string, overrides?: CallOverrides): Promise<[BigNumber] & {
151
+ balance: BigNumber;
152
+ }>;
153
+ getLastBlockHash(overrides?: CallOverrides): Promise<[string] & {
154
+ blockHash: string;
155
+ }>;
156
+ tryAggregate(requireSuccess: boolean, calls: Multicall3.CallStruct[], overrides?: PayableOverrides & {
157
+ from?: string;
158
+ }): Promise<ContractTransaction>;
159
+ tryBlockAndAggregate(requireSuccess: boolean, calls: Multicall3.CallStruct[], overrides?: PayableOverrides & {
160
+ from?: string;
161
+ }): Promise<ContractTransaction>;
162
+ };
163
+ aggregate(calls: Multicall3.CallStruct[], overrides?: PayableOverrides & {
164
+ from?: string;
165
+ }): Promise<ContractTransaction>;
166
+ aggregate3(calls: Multicall3.Call3Struct[], overrides?: PayableOverrides & {
167
+ from?: string;
168
+ }): Promise<ContractTransaction>;
169
+ aggregate3Value(calls: Multicall3.Call3ValueStruct[], overrides?: PayableOverrides & {
170
+ from?: string;
171
+ }): Promise<ContractTransaction>;
172
+ blockAndAggregate(calls: Multicall3.CallStruct[], overrides?: PayableOverrides & {
173
+ from?: string;
174
+ }): Promise<ContractTransaction>;
175
+ getBasefee(overrides?: CallOverrides): Promise<BigNumber>;
176
+ getBlockHash(blockNumber: BigNumberish, overrides?: CallOverrides): Promise<string>;
177
+ getBlockNumber(overrides?: CallOverrides): Promise<BigNumber>;
178
+ getChainId(overrides?: CallOverrides): Promise<BigNumber>;
179
+ getCurrentBlockCoinbase(overrides?: CallOverrides): Promise<string>;
180
+ getCurrentBlockDifficulty(overrides?: CallOverrides): Promise<BigNumber>;
181
+ getCurrentBlockGasLimit(overrides?: CallOverrides): Promise<BigNumber>;
182
+ getCurrentBlockTimestamp(overrides?: CallOverrides): Promise<BigNumber>;
183
+ getEthBalance(addr: string, overrides?: CallOverrides): Promise<BigNumber>;
184
+ getLastBlockHash(overrides?: CallOverrides): Promise<string>;
185
+ tryAggregate(requireSuccess: boolean, calls: Multicall3.CallStruct[], overrides?: PayableOverrides & {
186
+ from?: string;
187
+ }): Promise<ContractTransaction>;
188
+ tryBlockAndAggregate(requireSuccess: boolean, calls: Multicall3.CallStruct[], overrides?: PayableOverrides & {
189
+ from?: string;
190
+ }): Promise<ContractTransaction>;
191
+ callStatic: {
192
+ aggregate(calls: Multicall3.CallStruct[], overrides?: CallOverrides): Promise<[
193
+ BigNumber,
194
+ string[]
195
+ ] & {
196
+ blockNumber: BigNumber;
197
+ returnData: string[];
198
+ }>;
199
+ aggregate3(calls: Multicall3.Call3Struct[], overrides?: CallOverrides): Promise<Multicall3.ResultStructOutput[]>;
200
+ aggregate3Value(calls: Multicall3.Call3ValueStruct[], overrides?: CallOverrides): Promise<Multicall3.ResultStructOutput[]>;
201
+ blockAndAggregate(calls: Multicall3.CallStruct[], overrides?: CallOverrides): Promise<[
202
+ BigNumber,
203
+ string,
204
+ Multicall3.ResultStructOutput[]
205
+ ] & {
206
+ blockNumber: BigNumber;
207
+ blockHash: string;
208
+ returnData: Multicall3.ResultStructOutput[];
209
+ }>;
210
+ getBasefee(overrides?: CallOverrides): Promise<BigNumber>;
211
+ getBlockHash(blockNumber: BigNumberish, overrides?: CallOverrides): Promise<string>;
212
+ getBlockNumber(overrides?: CallOverrides): Promise<BigNumber>;
213
+ getChainId(overrides?: CallOverrides): Promise<BigNumber>;
214
+ getCurrentBlockCoinbase(overrides?: CallOverrides): Promise<string>;
215
+ getCurrentBlockDifficulty(overrides?: CallOverrides): Promise<BigNumber>;
216
+ getCurrentBlockGasLimit(overrides?: CallOverrides): Promise<BigNumber>;
217
+ getCurrentBlockTimestamp(overrides?: CallOverrides): Promise<BigNumber>;
218
+ getEthBalance(addr: string, overrides?: CallOverrides): Promise<BigNumber>;
219
+ getLastBlockHash(overrides?: CallOverrides): Promise<string>;
220
+ tryAggregate(requireSuccess: boolean, calls: Multicall3.CallStruct[], overrides?: CallOverrides): Promise<Multicall3.ResultStructOutput[]>;
221
+ tryBlockAndAggregate(requireSuccess: boolean, calls: Multicall3.CallStruct[], overrides?: CallOverrides): Promise<[
222
+ BigNumber,
223
+ string,
224
+ Multicall3.ResultStructOutput[]
225
+ ] & {
226
+ blockNumber: BigNumber;
227
+ blockHash: string;
228
+ returnData: Multicall3.ResultStructOutput[];
229
+ }>;
230
+ };
231
+ filters: {};
232
+ estimateGas: {
233
+ aggregate(calls: Multicall3.CallStruct[], overrides?: PayableOverrides & {
234
+ from?: string;
235
+ }): Promise<BigNumber>;
236
+ aggregate3(calls: Multicall3.Call3Struct[], overrides?: PayableOverrides & {
237
+ from?: string;
238
+ }): Promise<BigNumber>;
239
+ aggregate3Value(calls: Multicall3.Call3ValueStruct[], overrides?: PayableOverrides & {
240
+ from?: string;
241
+ }): Promise<BigNumber>;
242
+ blockAndAggregate(calls: Multicall3.CallStruct[], overrides?: PayableOverrides & {
243
+ from?: string;
244
+ }): Promise<BigNumber>;
245
+ getBasefee(overrides?: CallOverrides): Promise<BigNumber>;
246
+ getBlockHash(blockNumber: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
247
+ getBlockNumber(overrides?: CallOverrides): Promise<BigNumber>;
248
+ getChainId(overrides?: CallOverrides): Promise<BigNumber>;
249
+ getCurrentBlockCoinbase(overrides?: CallOverrides): Promise<BigNumber>;
250
+ getCurrentBlockDifficulty(overrides?: CallOverrides): Promise<BigNumber>;
251
+ getCurrentBlockGasLimit(overrides?: CallOverrides): Promise<BigNumber>;
252
+ getCurrentBlockTimestamp(overrides?: CallOverrides): Promise<BigNumber>;
253
+ getEthBalance(addr: string, overrides?: CallOverrides): Promise<BigNumber>;
254
+ getLastBlockHash(overrides?: CallOverrides): Promise<BigNumber>;
255
+ tryAggregate(requireSuccess: boolean, calls: Multicall3.CallStruct[], overrides?: PayableOverrides & {
256
+ from?: string;
257
+ }): Promise<BigNumber>;
258
+ tryBlockAndAggregate(requireSuccess: boolean, calls: Multicall3.CallStruct[], overrides?: PayableOverrides & {
259
+ from?: string;
260
+ }): Promise<BigNumber>;
261
+ };
262
+ populateTransaction: {
263
+ aggregate(calls: Multicall3.CallStruct[], overrides?: PayableOverrides & {
264
+ from?: string;
265
+ }): Promise<PopulatedTransaction>;
266
+ aggregate3(calls: Multicall3.Call3Struct[], overrides?: PayableOverrides & {
267
+ from?: string;
268
+ }): Promise<PopulatedTransaction>;
269
+ aggregate3Value(calls: Multicall3.Call3ValueStruct[], overrides?: PayableOverrides & {
270
+ from?: string;
271
+ }): Promise<PopulatedTransaction>;
272
+ blockAndAggregate(calls: Multicall3.CallStruct[], overrides?: PayableOverrides & {
273
+ from?: string;
274
+ }): Promise<PopulatedTransaction>;
275
+ getBasefee(overrides?: CallOverrides): Promise<PopulatedTransaction>;
276
+ getBlockHash(blockNumber: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
277
+ getBlockNumber(overrides?: CallOverrides): Promise<PopulatedTransaction>;
278
+ getChainId(overrides?: CallOverrides): Promise<PopulatedTransaction>;
279
+ getCurrentBlockCoinbase(overrides?: CallOverrides): Promise<PopulatedTransaction>;
280
+ getCurrentBlockDifficulty(overrides?: CallOverrides): Promise<PopulatedTransaction>;
281
+ getCurrentBlockGasLimit(overrides?: CallOverrides): Promise<PopulatedTransaction>;
282
+ getCurrentBlockTimestamp(overrides?: CallOverrides): Promise<PopulatedTransaction>;
283
+ getEthBalance(addr: string, overrides?: CallOverrides): Promise<PopulatedTransaction>;
284
+ getLastBlockHash(overrides?: CallOverrides): Promise<PopulatedTransaction>;
285
+ tryAggregate(requireSuccess: boolean, calls: Multicall3.CallStruct[], overrides?: PayableOverrides & {
286
+ from?: string;
287
+ }): Promise<PopulatedTransaction>;
288
+ tryBlockAndAggregate(requireSuccess: boolean, calls: Multicall3.CallStruct[], overrides?: PayableOverrides & {
289
+ from?: string;
290
+ }): Promise<PopulatedTransaction>;
291
+ };
292
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Multicall3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Multicall3.js","sourceRoot":"","sources":["../../../src/contracts/Multicall3.ts"],"names":[],"mappings":""}
@@ -0,0 +1,351 @@
1
+ import { Signer, ContractFactory, Overrides } from "ethers";
2
+ import type { Provider, TransactionRequest } from "@ethersproject/providers";
3
+ import type { Multicall3, Multicall3Interface } from "../Multicall3";
4
+ type Multicall3ConstructorParams = [signer?: Signer] | ConstructorParameters<typeof ContractFactory>;
5
+ export declare class Multicall3__factory extends ContractFactory {
6
+ constructor(...args: Multicall3ConstructorParams);
7
+ deploy(overrides?: Overrides & {
8
+ from?: string;
9
+ }): Promise<Multicall3>;
10
+ getDeployTransaction(overrides?: Overrides & {
11
+ from?: string;
12
+ }): TransactionRequest;
13
+ attach(address: string): Multicall3;
14
+ connect(signer: Signer): Multicall3__factory;
15
+ static readonly bytecode = "0x608060405234801561001057600080fd5b50610ee0806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e1461025a578063bce38bd714610275578063c3077fa914610288578063ee82ac5e1461029b57600080fd5b80634d2301cc146101ec57806372425d9d1461022157806382ad56cb1461023457806386d516e81461024757600080fd5b80633408e470116100c65780633408e47014610191578063399542e9146101a45780633e64a696146101c657806342cbb15c146101d957600080fd5b80630f28c97d146100f8578063174dea711461011a578063252dba421461013a57806327e86d6e1461015b575b600080fd5b34801561010457600080fd5b50425b6040519081526020015b60405180910390f35b61012d610128366004610a85565b6102ba565b6040516101119190610bbe565b61014d610148366004610a85565b6104ef565b604051610111929190610bd8565b34801561016757600080fd5b50437fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0140610107565b34801561019d57600080fd5b5046610107565b6101b76101b2366004610c60565b610690565b60405161011193929190610cba565b3480156101d257600080fd5b5048610107565b3480156101e557600080fd5b5043610107565b3480156101f857600080fd5b50610107610207366004610ce2565b73ffffffffffffffffffffffffffffffffffffffff163190565b34801561022d57600080fd5b5044610107565b61012d610242366004610a85565b6106ab565b34801561025357600080fd5b5045610107565b34801561026657600080fd5b50604051418152602001610111565b61012d610283366004610c60565b61085a565b6101b7610296366004610a85565b610a1a565b3480156102a757600080fd5b506101076102b6366004610d18565b4090565b60606000828067ffffffffffffffff8111156102d8576102d8610d31565b60405190808252806020026020018201604052801561031e57816020015b6040805180820190915260008152606060208201528152602001906001900390816102f65790505b5092503660005b8281101561047757600085828151811061034157610341610d60565b6020026020010151905087878381811061035d5761035d610d60565b905060200281019061036f9190610d8f565b6040810135958601959093506103886020850185610ce2565b73ffffffffffffffffffffffffffffffffffffffff16816103ac6060870187610dcd565b6040516103ba929190610e32565b60006040518083038185875af1925050503d80600081146103f7576040519150601f19603f3d011682016040523d82523d6000602084013e6103fc565b606091505b50602080850191909152901515808452908501351761046d577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b5050600101610325565b508234146104e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4d756c746963616c6c333a2076616c7565206d69736d6174636800000000000060448201526064015b60405180910390fd5b50505092915050565b436060828067ffffffffffffffff81111561050c5761050c610d31565b60405190808252806020026020018201604052801561053f57816020015b606081526020019060019003908161052a5790505b5091503660005b8281101561068657600087878381811061056257610562610d60565b90506020028101906105749190610e42565b92506105836020840184610ce2565b73ffffffffffffffffffffffffffffffffffffffff166105a66020850185610dcd565b6040516105b4929190610e32565b6000604051808303816000865af19150503d80600081146105f1576040519150601f19603f3d011682016040523d82523d6000602084013e6105f6565b606091505b5086848151811061060957610609610d60565b602090810291909101015290508061067d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060448201526064016104dd565b50600101610546565b5050509250929050565b43804060606106a086868661085a565b905093509350939050565b6060818067ffffffffffffffff8111156106c7576106c7610d31565b60405190808252806020026020018201604052801561070d57816020015b6040805180820190915260008152606060208201528152602001906001900390816106e55790505b5091503660005b828110156104e657600084828151811061073057610730610d60565b6020026020010151905086868381811061074c5761074c610d60565b905060200281019061075e9190610e76565b925061076d6020840184610ce2565b73ffffffffffffffffffffffffffffffffffffffff166107906040850185610dcd565b60405161079e929190610e32565b6000604051808303816000865af19150503d80600081146107db576040519150601f19603f3d011682016040523d82523d6000602084013e6107e0565b606091505b506020808401919091529015158083529084013517610851577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b50600101610714565b6060818067ffffffffffffffff81111561087657610876610d31565b6040519080825280602002602001820160405280156108bc57816020015b6040805180820190915260008152606060208201528152602001906001900390816108945790505b5091503660005b82811015610a105760008482815181106108df576108df610d60565b602002602001015190508686838181106108fb576108fb610d60565b905060200281019061090d9190610e42565b925061091c6020840184610ce2565b73ffffffffffffffffffffffffffffffffffffffff1661093f6020850185610dcd565b60405161094d929190610e32565b6000604051808303816000865af19150503d806000811461098a576040519150601f19603f3d011682016040523d82523d6000602084013e61098f565b606091505b506020830152151581528715610a07578051610a07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060448201526064016104dd565b506001016108c3565b5050509392505050565b6000806060610a2b60018686610690565b919790965090945092505050565b60008083601f840112610a4b57600080fd5b50813567ffffffffffffffff811115610a6357600080fd5b6020830191508360208260051b8501011115610a7e57600080fd5b9250929050565b60008060208385031215610a9857600080fd5b823567ffffffffffffffff811115610aaf57600080fd5b610abb85828601610a39565b90969095509350505050565b6000815180845260005b81811015610aed57602081850181015186830182015201610ad1565b81811115610aff576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600082825180855260208086019550808260051b84010181860160005b84811015610bb1578583037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001895281518051151584528401516040858501819052610b9d81860183610ac7565b9a86019a9450505090830190600101610b4f565b5090979650505050505050565b602081526000610bd16020830184610b32565b9392505050565b600060408201848352602060408185015281855180845260608601915060608160051b870101935082870160005b82811015610c52577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0888703018452610c40868351610ac7565b95509284019290840190600101610c06565b509398975050505050505050565b600080600060408486031215610c7557600080fd5b83358015158114610c8557600080fd5b9250602084013567ffffffffffffffff811115610ca157600080fd5b610cad86828701610a39565b9497909650939450505050565b838152826020820152606060408201526000610cd96060830184610b32565b95945050505050565b600060208284031215610cf457600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610bd157600080fd5b600060208284031215610d2a57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81833603018112610dc357600080fd5b9190910192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112610e0257600080fd5b83018035915067ffffffffffffffff821115610e1d57600080fd5b602001915036819003821315610a7e57600080fd5b8183823760009101908152919050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc1833603018112610dc357600080fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112610dc357600080fdfea264697066735822122032840c46a1df3756b0617d292f07888692735eef24ff69bf4fe353d639a3b9fa64736f6c634300080c0033";
16
+ static readonly abi: readonly [{
17
+ readonly inputs: readonly [{
18
+ readonly components: readonly [{
19
+ readonly internalType: "address";
20
+ readonly name: "target";
21
+ readonly type: "address";
22
+ }, {
23
+ readonly internalType: "bytes";
24
+ readonly name: "callData";
25
+ readonly type: "bytes";
26
+ }];
27
+ readonly internalType: "struct Multicall3.Call[]";
28
+ readonly name: "calls";
29
+ readonly type: "tuple[]";
30
+ }];
31
+ readonly name: "aggregate";
32
+ readonly outputs: readonly [{
33
+ readonly internalType: "uint256";
34
+ readonly name: "blockNumber";
35
+ readonly type: "uint256";
36
+ }, {
37
+ readonly internalType: "bytes[]";
38
+ readonly name: "returnData";
39
+ readonly type: "bytes[]";
40
+ }];
41
+ readonly stateMutability: "payable";
42
+ readonly type: "function";
43
+ }, {
44
+ readonly inputs: readonly [{
45
+ readonly components: readonly [{
46
+ readonly internalType: "address";
47
+ readonly name: "target";
48
+ readonly type: "address";
49
+ }, {
50
+ readonly internalType: "bool";
51
+ readonly name: "allowFailure";
52
+ readonly type: "bool";
53
+ }, {
54
+ readonly internalType: "bytes";
55
+ readonly name: "callData";
56
+ readonly type: "bytes";
57
+ }];
58
+ readonly internalType: "struct Multicall3.Call3[]";
59
+ readonly name: "calls";
60
+ readonly type: "tuple[]";
61
+ }];
62
+ readonly name: "aggregate3";
63
+ readonly outputs: readonly [{
64
+ readonly components: readonly [{
65
+ readonly internalType: "bool";
66
+ readonly name: "success";
67
+ readonly type: "bool";
68
+ }, {
69
+ readonly internalType: "bytes";
70
+ readonly name: "returnData";
71
+ readonly type: "bytes";
72
+ }];
73
+ readonly internalType: "struct Multicall3.Result[]";
74
+ readonly name: "returnData";
75
+ readonly type: "tuple[]";
76
+ }];
77
+ readonly stateMutability: "payable";
78
+ readonly type: "function";
79
+ }, {
80
+ readonly inputs: readonly [{
81
+ readonly components: readonly [{
82
+ readonly internalType: "address";
83
+ readonly name: "target";
84
+ readonly type: "address";
85
+ }, {
86
+ readonly internalType: "bool";
87
+ readonly name: "allowFailure";
88
+ readonly type: "bool";
89
+ }, {
90
+ readonly internalType: "uint256";
91
+ readonly name: "value";
92
+ readonly type: "uint256";
93
+ }, {
94
+ readonly internalType: "bytes";
95
+ readonly name: "callData";
96
+ readonly type: "bytes";
97
+ }];
98
+ readonly internalType: "struct Multicall3.Call3Value[]";
99
+ readonly name: "calls";
100
+ readonly type: "tuple[]";
101
+ }];
102
+ readonly name: "aggregate3Value";
103
+ readonly outputs: readonly [{
104
+ readonly components: readonly [{
105
+ readonly internalType: "bool";
106
+ readonly name: "success";
107
+ readonly type: "bool";
108
+ }, {
109
+ readonly internalType: "bytes";
110
+ readonly name: "returnData";
111
+ readonly type: "bytes";
112
+ }];
113
+ readonly internalType: "struct Multicall3.Result[]";
114
+ readonly name: "returnData";
115
+ readonly type: "tuple[]";
116
+ }];
117
+ readonly stateMutability: "payable";
118
+ readonly type: "function";
119
+ }, {
120
+ readonly inputs: readonly [{
121
+ readonly components: readonly [{
122
+ readonly internalType: "address";
123
+ readonly name: "target";
124
+ readonly type: "address";
125
+ }, {
126
+ readonly internalType: "bytes";
127
+ readonly name: "callData";
128
+ readonly type: "bytes";
129
+ }];
130
+ readonly internalType: "struct Multicall3.Call[]";
131
+ readonly name: "calls";
132
+ readonly type: "tuple[]";
133
+ }];
134
+ readonly name: "blockAndAggregate";
135
+ readonly outputs: readonly [{
136
+ readonly internalType: "uint256";
137
+ readonly name: "blockNumber";
138
+ readonly type: "uint256";
139
+ }, {
140
+ readonly internalType: "bytes32";
141
+ readonly name: "blockHash";
142
+ readonly type: "bytes32";
143
+ }, {
144
+ readonly components: readonly [{
145
+ readonly internalType: "bool";
146
+ readonly name: "success";
147
+ readonly type: "bool";
148
+ }, {
149
+ readonly internalType: "bytes";
150
+ readonly name: "returnData";
151
+ readonly type: "bytes";
152
+ }];
153
+ readonly internalType: "struct Multicall3.Result[]";
154
+ readonly name: "returnData";
155
+ readonly type: "tuple[]";
156
+ }];
157
+ readonly stateMutability: "payable";
158
+ readonly type: "function";
159
+ }, {
160
+ readonly inputs: readonly [];
161
+ readonly name: "getBasefee";
162
+ readonly outputs: readonly [{
163
+ readonly internalType: "uint256";
164
+ readonly name: "basefee";
165
+ readonly type: "uint256";
166
+ }];
167
+ readonly stateMutability: "view";
168
+ readonly type: "function";
169
+ }, {
170
+ readonly inputs: readonly [{
171
+ readonly internalType: "uint256";
172
+ readonly name: "blockNumber";
173
+ readonly type: "uint256";
174
+ }];
175
+ readonly name: "getBlockHash";
176
+ readonly outputs: readonly [{
177
+ readonly internalType: "bytes32";
178
+ readonly name: "blockHash";
179
+ readonly type: "bytes32";
180
+ }];
181
+ readonly stateMutability: "view";
182
+ readonly type: "function";
183
+ }, {
184
+ readonly inputs: readonly [];
185
+ readonly name: "getBlockNumber";
186
+ readonly outputs: readonly [{
187
+ readonly internalType: "uint256";
188
+ readonly name: "blockNumber";
189
+ readonly type: "uint256";
190
+ }];
191
+ readonly stateMutability: "view";
192
+ readonly type: "function";
193
+ }, {
194
+ readonly inputs: readonly [];
195
+ readonly name: "getChainId";
196
+ readonly outputs: readonly [{
197
+ readonly internalType: "uint256";
198
+ readonly name: "chainid";
199
+ readonly type: "uint256";
200
+ }];
201
+ readonly stateMutability: "view";
202
+ readonly type: "function";
203
+ }, {
204
+ readonly inputs: readonly [];
205
+ readonly name: "getCurrentBlockCoinbase";
206
+ readonly outputs: readonly [{
207
+ readonly internalType: "address";
208
+ readonly name: "coinbase";
209
+ readonly type: "address";
210
+ }];
211
+ readonly stateMutability: "view";
212
+ readonly type: "function";
213
+ }, {
214
+ readonly inputs: readonly [];
215
+ readonly name: "getCurrentBlockDifficulty";
216
+ readonly outputs: readonly [{
217
+ readonly internalType: "uint256";
218
+ readonly name: "difficulty";
219
+ readonly type: "uint256";
220
+ }];
221
+ readonly stateMutability: "view";
222
+ readonly type: "function";
223
+ }, {
224
+ readonly inputs: readonly [];
225
+ readonly name: "getCurrentBlockGasLimit";
226
+ readonly outputs: readonly [{
227
+ readonly internalType: "uint256";
228
+ readonly name: "gaslimit";
229
+ readonly type: "uint256";
230
+ }];
231
+ readonly stateMutability: "view";
232
+ readonly type: "function";
233
+ }, {
234
+ readonly inputs: readonly [];
235
+ readonly name: "getCurrentBlockTimestamp";
236
+ readonly outputs: readonly [{
237
+ readonly internalType: "uint256";
238
+ readonly name: "timestamp";
239
+ readonly type: "uint256";
240
+ }];
241
+ readonly stateMutability: "view";
242
+ readonly type: "function";
243
+ }, {
244
+ readonly inputs: readonly [{
245
+ readonly internalType: "address";
246
+ readonly name: "addr";
247
+ readonly type: "address";
248
+ }];
249
+ readonly name: "getEthBalance";
250
+ readonly outputs: readonly [{
251
+ readonly internalType: "uint256";
252
+ readonly name: "balance";
253
+ readonly type: "uint256";
254
+ }];
255
+ readonly stateMutability: "view";
256
+ readonly type: "function";
257
+ }, {
258
+ readonly inputs: readonly [];
259
+ readonly name: "getLastBlockHash";
260
+ readonly outputs: readonly [{
261
+ readonly internalType: "bytes32";
262
+ readonly name: "blockHash";
263
+ readonly type: "bytes32";
264
+ }];
265
+ readonly stateMutability: "view";
266
+ readonly type: "function";
267
+ }, {
268
+ readonly inputs: readonly [{
269
+ readonly internalType: "bool";
270
+ readonly name: "requireSuccess";
271
+ readonly type: "bool";
272
+ }, {
273
+ readonly components: readonly [{
274
+ readonly internalType: "address";
275
+ readonly name: "target";
276
+ readonly type: "address";
277
+ }, {
278
+ readonly internalType: "bytes";
279
+ readonly name: "callData";
280
+ readonly type: "bytes";
281
+ }];
282
+ readonly internalType: "struct Multicall3.Call[]";
283
+ readonly name: "calls";
284
+ readonly type: "tuple[]";
285
+ }];
286
+ readonly name: "tryAggregate";
287
+ readonly outputs: readonly [{
288
+ readonly components: readonly [{
289
+ readonly internalType: "bool";
290
+ readonly name: "success";
291
+ readonly type: "bool";
292
+ }, {
293
+ readonly internalType: "bytes";
294
+ readonly name: "returnData";
295
+ readonly type: "bytes";
296
+ }];
297
+ readonly internalType: "struct Multicall3.Result[]";
298
+ readonly name: "returnData";
299
+ readonly type: "tuple[]";
300
+ }];
301
+ readonly stateMutability: "payable";
302
+ readonly type: "function";
303
+ }, {
304
+ readonly inputs: readonly [{
305
+ readonly internalType: "bool";
306
+ readonly name: "requireSuccess";
307
+ readonly type: "bool";
308
+ }, {
309
+ readonly components: readonly [{
310
+ readonly internalType: "address";
311
+ readonly name: "target";
312
+ readonly type: "address";
313
+ }, {
314
+ readonly internalType: "bytes";
315
+ readonly name: "callData";
316
+ readonly type: "bytes";
317
+ }];
318
+ readonly internalType: "struct Multicall3.Call[]";
319
+ readonly name: "calls";
320
+ readonly type: "tuple[]";
321
+ }];
322
+ readonly name: "tryBlockAndAggregate";
323
+ readonly outputs: readonly [{
324
+ readonly internalType: "uint256";
325
+ readonly name: "blockNumber";
326
+ readonly type: "uint256";
327
+ }, {
328
+ readonly internalType: "bytes32";
329
+ readonly name: "blockHash";
330
+ readonly type: "bytes32";
331
+ }, {
332
+ readonly components: readonly [{
333
+ readonly internalType: "bool";
334
+ readonly name: "success";
335
+ readonly type: "bool";
336
+ }, {
337
+ readonly internalType: "bytes";
338
+ readonly name: "returnData";
339
+ readonly type: "bytes";
340
+ }];
341
+ readonly internalType: "struct Multicall3.Result[]";
342
+ readonly name: "returnData";
343
+ readonly type: "tuple[]";
344
+ }];
345
+ readonly stateMutability: "payable";
346
+ readonly type: "function";
347
+ }];
348
+ static createInterface(): Multicall3Interface;
349
+ static connect(address: string, signerOrProvider: Signer | Provider): Multicall3;
350
+ }
351
+ export {};