@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.
- package/dist/cjs/abi/Multicall3.json +452 -0
- package/dist/cjs/contracts/Multicall3.d.ts +292 -0
- package/dist/cjs/contracts/Multicall3.js +3 -0
- package/dist/cjs/contracts/Multicall3.js.map +1 -0
- package/dist/cjs/contracts/factories/Multicall3__factory.d.ts +351 -0
- package/dist/cjs/contracts/factories/Multicall3__factory.js +481 -0
- package/dist/cjs/contracts/factories/Multicall3__factory.js.map +1 -0
- package/dist/cjs/contracts/factories/index.d.ts +1 -0
- package/dist/cjs/contracts/factories/index.js +3 -1
- package/dist/cjs/contracts/factories/index.js.map +1 -1
- package/dist/cjs/contracts/index.d.ts +2 -0
- package/dist/cjs/contracts/index.js +3 -1
- package/dist/cjs/contracts/index.js.map +1 -1
- package/dist/cjs/marketData.d.ts +24 -1
- package/dist/cjs/marketData.js +129 -6
- package/dist/cjs/marketData.js.map +1 -1
- package/dist/cjs/nodeSDKTypes.d.ts +1 -0
- package/dist/cjs/nodeSDKTypes.js +2 -1
- package/dist/cjs/nodeSDKTypes.js.map +1 -1
- package/dist/cjs/perpetualDataHandler.d.ts +25 -1
- package/dist/cjs/perpetualDataHandler.js +63 -1
- package/dist/cjs/perpetualDataHandler.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/abi/Multicall3.json +452 -0
- package/dist/esm/contracts/Multicall3.d.ts +292 -0
- package/dist/esm/contracts/Multicall3.js +2 -0
- package/dist/esm/contracts/Multicall3.js.map +1 -0
- package/dist/esm/contracts/factories/Multicall3__factory.d.ts +351 -0
- package/dist/esm/contracts/factories/Multicall3__factory.js +477 -0
- package/dist/esm/contracts/factories/Multicall3__factory.js.map +1 -0
- package/dist/esm/contracts/factories/index.d.ts +1 -0
- package/dist/esm/contracts/factories/index.js +1 -0
- package/dist/esm/contracts/factories/index.js.map +1 -1
- package/dist/esm/contracts/index.d.ts +2 -0
- package/dist/esm/contracts/index.js +1 -0
- package/dist/esm/contracts/index.js.map +1 -1
- package/dist/esm/marketData.d.ts +24 -1
- package/dist/esm/marketData.js +130 -7
- package/dist/esm/marketData.js.map +1 -1
- package/dist/esm/nodeSDKTypes.d.ts +1 -0
- package/dist/esm/nodeSDKTypes.js +1 -0
- package/dist/esm/nodeSDKTypes.js.map +1 -1
- package/dist/esm/perpetualDataHandler.d.ts +25 -1
- package/dist/esm/perpetualDataHandler.js +65 -3
- package/dist/esm/perpetualDataHandler.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +1 -1
- package/src/abi/Multicall3.json +452 -0
- package/src/contracts/Multicall3.ts +582 -0
- package/src/contracts/factories/Multicall3__factory.ts +497 -0
- package/src/contracts/factories/index.ts +1 -0
- package/src/contracts/index.ts +2 -0
- package/src/marketData.ts +162 -8
- package/src/nodeSDKTypes.ts +1 -1
- package/src/perpetualDataHandler.ts +85 -2
- package/src/version.ts +1 -1
|
@@ -0,0 +1,497 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers";
|
|
5
|
+
import type { Provider, TransactionRequest } from "@ethersproject/providers";
|
|
6
|
+
import type { Multicall3, Multicall3Interface } from "../Multicall3";
|
|
7
|
+
|
|
8
|
+
const _abi = [
|
|
9
|
+
{
|
|
10
|
+
inputs: [
|
|
11
|
+
{
|
|
12
|
+
components: [
|
|
13
|
+
{
|
|
14
|
+
internalType: "address",
|
|
15
|
+
name: "target",
|
|
16
|
+
type: "address",
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
internalType: "bytes",
|
|
20
|
+
name: "callData",
|
|
21
|
+
type: "bytes",
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
internalType: "struct Multicall3.Call[]",
|
|
25
|
+
name: "calls",
|
|
26
|
+
type: "tuple[]",
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
name: "aggregate",
|
|
30
|
+
outputs: [
|
|
31
|
+
{
|
|
32
|
+
internalType: "uint256",
|
|
33
|
+
name: "blockNumber",
|
|
34
|
+
type: "uint256",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
internalType: "bytes[]",
|
|
38
|
+
name: "returnData",
|
|
39
|
+
type: "bytes[]",
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
stateMutability: "payable",
|
|
43
|
+
type: "function",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
inputs: [
|
|
47
|
+
{
|
|
48
|
+
components: [
|
|
49
|
+
{
|
|
50
|
+
internalType: "address",
|
|
51
|
+
name: "target",
|
|
52
|
+
type: "address",
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
internalType: "bool",
|
|
56
|
+
name: "allowFailure",
|
|
57
|
+
type: "bool",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
internalType: "bytes",
|
|
61
|
+
name: "callData",
|
|
62
|
+
type: "bytes",
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
internalType: "struct Multicall3.Call3[]",
|
|
66
|
+
name: "calls",
|
|
67
|
+
type: "tuple[]",
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
name: "aggregate3",
|
|
71
|
+
outputs: [
|
|
72
|
+
{
|
|
73
|
+
components: [
|
|
74
|
+
{
|
|
75
|
+
internalType: "bool",
|
|
76
|
+
name: "success",
|
|
77
|
+
type: "bool",
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
internalType: "bytes",
|
|
81
|
+
name: "returnData",
|
|
82
|
+
type: "bytes",
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
internalType: "struct Multicall3.Result[]",
|
|
86
|
+
name: "returnData",
|
|
87
|
+
type: "tuple[]",
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
stateMutability: "payable",
|
|
91
|
+
type: "function",
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
inputs: [
|
|
95
|
+
{
|
|
96
|
+
components: [
|
|
97
|
+
{
|
|
98
|
+
internalType: "address",
|
|
99
|
+
name: "target",
|
|
100
|
+
type: "address",
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
internalType: "bool",
|
|
104
|
+
name: "allowFailure",
|
|
105
|
+
type: "bool",
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
internalType: "uint256",
|
|
109
|
+
name: "value",
|
|
110
|
+
type: "uint256",
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
internalType: "bytes",
|
|
114
|
+
name: "callData",
|
|
115
|
+
type: "bytes",
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
internalType: "struct Multicall3.Call3Value[]",
|
|
119
|
+
name: "calls",
|
|
120
|
+
type: "tuple[]",
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
name: "aggregate3Value",
|
|
124
|
+
outputs: [
|
|
125
|
+
{
|
|
126
|
+
components: [
|
|
127
|
+
{
|
|
128
|
+
internalType: "bool",
|
|
129
|
+
name: "success",
|
|
130
|
+
type: "bool",
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
internalType: "bytes",
|
|
134
|
+
name: "returnData",
|
|
135
|
+
type: "bytes",
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
internalType: "struct Multicall3.Result[]",
|
|
139
|
+
name: "returnData",
|
|
140
|
+
type: "tuple[]",
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
stateMutability: "payable",
|
|
144
|
+
type: "function",
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
inputs: [
|
|
148
|
+
{
|
|
149
|
+
components: [
|
|
150
|
+
{
|
|
151
|
+
internalType: "address",
|
|
152
|
+
name: "target",
|
|
153
|
+
type: "address",
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
internalType: "bytes",
|
|
157
|
+
name: "callData",
|
|
158
|
+
type: "bytes",
|
|
159
|
+
},
|
|
160
|
+
],
|
|
161
|
+
internalType: "struct Multicall3.Call[]",
|
|
162
|
+
name: "calls",
|
|
163
|
+
type: "tuple[]",
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
name: "blockAndAggregate",
|
|
167
|
+
outputs: [
|
|
168
|
+
{
|
|
169
|
+
internalType: "uint256",
|
|
170
|
+
name: "blockNumber",
|
|
171
|
+
type: "uint256",
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
internalType: "bytes32",
|
|
175
|
+
name: "blockHash",
|
|
176
|
+
type: "bytes32",
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
components: [
|
|
180
|
+
{
|
|
181
|
+
internalType: "bool",
|
|
182
|
+
name: "success",
|
|
183
|
+
type: "bool",
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
internalType: "bytes",
|
|
187
|
+
name: "returnData",
|
|
188
|
+
type: "bytes",
|
|
189
|
+
},
|
|
190
|
+
],
|
|
191
|
+
internalType: "struct Multicall3.Result[]",
|
|
192
|
+
name: "returnData",
|
|
193
|
+
type: "tuple[]",
|
|
194
|
+
},
|
|
195
|
+
],
|
|
196
|
+
stateMutability: "payable",
|
|
197
|
+
type: "function",
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
inputs: [],
|
|
201
|
+
name: "getBasefee",
|
|
202
|
+
outputs: [
|
|
203
|
+
{
|
|
204
|
+
internalType: "uint256",
|
|
205
|
+
name: "basefee",
|
|
206
|
+
type: "uint256",
|
|
207
|
+
},
|
|
208
|
+
],
|
|
209
|
+
stateMutability: "view",
|
|
210
|
+
type: "function",
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
inputs: [
|
|
214
|
+
{
|
|
215
|
+
internalType: "uint256",
|
|
216
|
+
name: "blockNumber",
|
|
217
|
+
type: "uint256",
|
|
218
|
+
},
|
|
219
|
+
],
|
|
220
|
+
name: "getBlockHash",
|
|
221
|
+
outputs: [
|
|
222
|
+
{
|
|
223
|
+
internalType: "bytes32",
|
|
224
|
+
name: "blockHash",
|
|
225
|
+
type: "bytes32",
|
|
226
|
+
},
|
|
227
|
+
],
|
|
228
|
+
stateMutability: "view",
|
|
229
|
+
type: "function",
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
inputs: [],
|
|
233
|
+
name: "getBlockNumber",
|
|
234
|
+
outputs: [
|
|
235
|
+
{
|
|
236
|
+
internalType: "uint256",
|
|
237
|
+
name: "blockNumber",
|
|
238
|
+
type: "uint256",
|
|
239
|
+
},
|
|
240
|
+
],
|
|
241
|
+
stateMutability: "view",
|
|
242
|
+
type: "function",
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
inputs: [],
|
|
246
|
+
name: "getChainId",
|
|
247
|
+
outputs: [
|
|
248
|
+
{
|
|
249
|
+
internalType: "uint256",
|
|
250
|
+
name: "chainid",
|
|
251
|
+
type: "uint256",
|
|
252
|
+
},
|
|
253
|
+
],
|
|
254
|
+
stateMutability: "view",
|
|
255
|
+
type: "function",
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
inputs: [],
|
|
259
|
+
name: "getCurrentBlockCoinbase",
|
|
260
|
+
outputs: [
|
|
261
|
+
{
|
|
262
|
+
internalType: "address",
|
|
263
|
+
name: "coinbase",
|
|
264
|
+
type: "address",
|
|
265
|
+
},
|
|
266
|
+
],
|
|
267
|
+
stateMutability: "view",
|
|
268
|
+
type: "function",
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
inputs: [],
|
|
272
|
+
name: "getCurrentBlockDifficulty",
|
|
273
|
+
outputs: [
|
|
274
|
+
{
|
|
275
|
+
internalType: "uint256",
|
|
276
|
+
name: "difficulty",
|
|
277
|
+
type: "uint256",
|
|
278
|
+
},
|
|
279
|
+
],
|
|
280
|
+
stateMutability: "view",
|
|
281
|
+
type: "function",
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
inputs: [],
|
|
285
|
+
name: "getCurrentBlockGasLimit",
|
|
286
|
+
outputs: [
|
|
287
|
+
{
|
|
288
|
+
internalType: "uint256",
|
|
289
|
+
name: "gaslimit",
|
|
290
|
+
type: "uint256",
|
|
291
|
+
},
|
|
292
|
+
],
|
|
293
|
+
stateMutability: "view",
|
|
294
|
+
type: "function",
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
inputs: [],
|
|
298
|
+
name: "getCurrentBlockTimestamp",
|
|
299
|
+
outputs: [
|
|
300
|
+
{
|
|
301
|
+
internalType: "uint256",
|
|
302
|
+
name: "timestamp",
|
|
303
|
+
type: "uint256",
|
|
304
|
+
},
|
|
305
|
+
],
|
|
306
|
+
stateMutability: "view",
|
|
307
|
+
type: "function",
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
inputs: [
|
|
311
|
+
{
|
|
312
|
+
internalType: "address",
|
|
313
|
+
name: "addr",
|
|
314
|
+
type: "address",
|
|
315
|
+
},
|
|
316
|
+
],
|
|
317
|
+
name: "getEthBalance",
|
|
318
|
+
outputs: [
|
|
319
|
+
{
|
|
320
|
+
internalType: "uint256",
|
|
321
|
+
name: "balance",
|
|
322
|
+
type: "uint256",
|
|
323
|
+
},
|
|
324
|
+
],
|
|
325
|
+
stateMutability: "view",
|
|
326
|
+
type: "function",
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
inputs: [],
|
|
330
|
+
name: "getLastBlockHash",
|
|
331
|
+
outputs: [
|
|
332
|
+
{
|
|
333
|
+
internalType: "bytes32",
|
|
334
|
+
name: "blockHash",
|
|
335
|
+
type: "bytes32",
|
|
336
|
+
},
|
|
337
|
+
],
|
|
338
|
+
stateMutability: "view",
|
|
339
|
+
type: "function",
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
inputs: [
|
|
343
|
+
{
|
|
344
|
+
internalType: "bool",
|
|
345
|
+
name: "requireSuccess",
|
|
346
|
+
type: "bool",
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
components: [
|
|
350
|
+
{
|
|
351
|
+
internalType: "address",
|
|
352
|
+
name: "target",
|
|
353
|
+
type: "address",
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
internalType: "bytes",
|
|
357
|
+
name: "callData",
|
|
358
|
+
type: "bytes",
|
|
359
|
+
},
|
|
360
|
+
],
|
|
361
|
+
internalType: "struct Multicall3.Call[]",
|
|
362
|
+
name: "calls",
|
|
363
|
+
type: "tuple[]",
|
|
364
|
+
},
|
|
365
|
+
],
|
|
366
|
+
name: "tryAggregate",
|
|
367
|
+
outputs: [
|
|
368
|
+
{
|
|
369
|
+
components: [
|
|
370
|
+
{
|
|
371
|
+
internalType: "bool",
|
|
372
|
+
name: "success",
|
|
373
|
+
type: "bool",
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
internalType: "bytes",
|
|
377
|
+
name: "returnData",
|
|
378
|
+
type: "bytes",
|
|
379
|
+
},
|
|
380
|
+
],
|
|
381
|
+
internalType: "struct Multicall3.Result[]",
|
|
382
|
+
name: "returnData",
|
|
383
|
+
type: "tuple[]",
|
|
384
|
+
},
|
|
385
|
+
],
|
|
386
|
+
stateMutability: "payable",
|
|
387
|
+
type: "function",
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
inputs: [
|
|
391
|
+
{
|
|
392
|
+
internalType: "bool",
|
|
393
|
+
name: "requireSuccess",
|
|
394
|
+
type: "bool",
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
components: [
|
|
398
|
+
{
|
|
399
|
+
internalType: "address",
|
|
400
|
+
name: "target",
|
|
401
|
+
type: "address",
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
internalType: "bytes",
|
|
405
|
+
name: "callData",
|
|
406
|
+
type: "bytes",
|
|
407
|
+
},
|
|
408
|
+
],
|
|
409
|
+
internalType: "struct Multicall3.Call[]",
|
|
410
|
+
name: "calls",
|
|
411
|
+
type: "tuple[]",
|
|
412
|
+
},
|
|
413
|
+
],
|
|
414
|
+
name: "tryBlockAndAggregate",
|
|
415
|
+
outputs: [
|
|
416
|
+
{
|
|
417
|
+
internalType: "uint256",
|
|
418
|
+
name: "blockNumber",
|
|
419
|
+
type: "uint256",
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
internalType: "bytes32",
|
|
423
|
+
name: "blockHash",
|
|
424
|
+
type: "bytes32",
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
components: [
|
|
428
|
+
{
|
|
429
|
+
internalType: "bool",
|
|
430
|
+
name: "success",
|
|
431
|
+
type: "bool",
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
internalType: "bytes",
|
|
435
|
+
name: "returnData",
|
|
436
|
+
type: "bytes",
|
|
437
|
+
},
|
|
438
|
+
],
|
|
439
|
+
internalType: "struct Multicall3.Result[]",
|
|
440
|
+
name: "returnData",
|
|
441
|
+
type: "tuple[]",
|
|
442
|
+
},
|
|
443
|
+
],
|
|
444
|
+
stateMutability: "payable",
|
|
445
|
+
type: "function",
|
|
446
|
+
},
|
|
447
|
+
] as const;
|
|
448
|
+
|
|
449
|
+
const _bytecode =
|
|
450
|
+
"0x608060405234801561001057600080fd5b50610ee0806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e1461025a578063bce38bd714610275578063c3077fa914610288578063ee82ac5e1461029b57600080fd5b80634d2301cc146101ec57806372425d9d1461022157806382ad56cb1461023457806386d516e81461024757600080fd5b80633408e470116100c65780633408e47014610191578063399542e9146101a45780633e64a696146101c657806342cbb15c146101d957600080fd5b80630f28c97d146100f8578063174dea711461011a578063252dba421461013a57806327e86d6e1461015b575b600080fd5b34801561010457600080fd5b50425b6040519081526020015b60405180910390f35b61012d610128366004610a85565b6102ba565b6040516101119190610bbe565b61014d610148366004610a85565b6104ef565b604051610111929190610bd8565b34801561016757600080fd5b50437fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0140610107565b34801561019d57600080fd5b5046610107565b6101b76101b2366004610c60565b610690565b60405161011193929190610cba565b3480156101d257600080fd5b5048610107565b3480156101e557600080fd5b5043610107565b3480156101f857600080fd5b50610107610207366004610ce2565b73ffffffffffffffffffffffffffffffffffffffff163190565b34801561022d57600080fd5b5044610107565b61012d610242366004610a85565b6106ab565b34801561025357600080fd5b5045610107565b34801561026657600080fd5b50604051418152602001610111565b61012d610283366004610c60565b61085a565b6101b7610296366004610a85565b610a1a565b3480156102a757600080fd5b506101076102b6366004610d18565b4090565b60606000828067ffffffffffffffff8111156102d8576102d8610d31565b60405190808252806020026020018201604052801561031e57816020015b6040805180820190915260008152606060208201528152602001906001900390816102f65790505b5092503660005b8281101561047757600085828151811061034157610341610d60565b6020026020010151905087878381811061035d5761035d610d60565b905060200281019061036f9190610d8f565b6040810135958601959093506103886020850185610ce2565b73ffffffffffffffffffffffffffffffffffffffff16816103ac6060870187610dcd565b6040516103ba929190610e32565b60006040518083038185875af1925050503d80600081146103f7576040519150601f19603f3d011682016040523d82523d6000602084013e6103fc565b606091505b50602080850191909152901515808452908501351761046d577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b5050600101610325565b508234146104e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4d756c746963616c6c333a2076616c7565206d69736d6174636800000000000060448201526064015b60405180910390fd5b50505092915050565b436060828067ffffffffffffffff81111561050c5761050c610d31565b60405190808252806020026020018201604052801561053f57816020015b606081526020019060019003908161052a5790505b5091503660005b8281101561068657600087878381811061056257610562610d60565b90506020028101906105749190610e42565b92506105836020840184610ce2565b73ffffffffffffffffffffffffffffffffffffffff166105a66020850185610dcd565b6040516105b4929190610e32565b6000604051808303816000865af19150503d80600081146105f1576040519150601f19603f3d011682016040523d82523d6000602084013e6105f6565b606091505b5086848151811061060957610609610d60565b602090810291909101015290508061067d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060448201526064016104dd565b50600101610546565b5050509250929050565b43804060606106a086868661085a565b905093509350939050565b6060818067ffffffffffffffff8111156106c7576106c7610d31565b60405190808252806020026020018201604052801561070d57816020015b6040805180820190915260008152606060208201528152602001906001900390816106e55790505b5091503660005b828110156104e657600084828151811061073057610730610d60565b6020026020010151905086868381811061074c5761074c610d60565b905060200281019061075e9190610e76565b925061076d6020840184610ce2565b73ffffffffffffffffffffffffffffffffffffffff166107906040850185610dcd565b60405161079e929190610e32565b6000604051808303816000865af19150503d80600081146107db576040519150601f19603f3d011682016040523d82523d6000602084013e6107e0565b606091505b506020808401919091529015158083529084013517610851577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b50600101610714565b6060818067ffffffffffffffff81111561087657610876610d31565b6040519080825280602002602001820160405280156108bc57816020015b6040805180820190915260008152606060208201528152602001906001900390816108945790505b5091503660005b82811015610a105760008482815181106108df576108df610d60565b602002602001015190508686838181106108fb576108fb610d60565b905060200281019061090d9190610e42565b925061091c6020840184610ce2565b73ffffffffffffffffffffffffffffffffffffffff1661093f6020850185610dcd565b60405161094d929190610e32565b6000604051808303816000865af19150503d806000811461098a576040519150601f19603f3d011682016040523d82523d6000602084013e61098f565b606091505b506020830152151581528715610a07578051610a07576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060448201526064016104dd565b506001016108c3565b5050509392505050565b6000806060610a2b60018686610690565b919790965090945092505050565b60008083601f840112610a4b57600080fd5b50813567ffffffffffffffff811115610a6357600080fd5b6020830191508360208260051b8501011115610a7e57600080fd5b9250929050565b60008060208385031215610a9857600080fd5b823567ffffffffffffffff811115610aaf57600080fd5b610abb85828601610a39565b90969095509350505050565b6000815180845260005b81811015610aed57602081850181015186830182015201610ad1565b81811115610aff576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600082825180855260208086019550808260051b84010181860160005b84811015610bb1578583037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001895281518051151584528401516040858501819052610b9d81860183610ac7565b9a86019a9450505090830190600101610b4f565b5090979650505050505050565b602081526000610bd16020830184610b32565b9392505050565b600060408201848352602060408185015281855180845260608601915060608160051b870101935082870160005b82811015610c52577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0888703018452610c40868351610ac7565b95509284019290840190600101610c06565b509398975050505050505050565b600080600060408486031215610c7557600080fd5b83358015158114610c8557600080fd5b9250602084013567ffffffffffffffff811115610ca157600080fd5b610cad86828701610a39565b9497909650939450505050565b838152826020820152606060408201526000610cd96060830184610b32565b95945050505050565b600060208284031215610cf457600080fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114610bd157600080fd5b600060208284031215610d2a57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81833603018112610dc357600080fd5b9190910192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112610e0257600080fd5b83018035915067ffffffffffffffff821115610e1d57600080fd5b602001915036819003821315610a7e57600080fd5b8183823760009101908152919050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc1833603018112610dc357600080fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112610dc357600080fdfea264697066735822122032840c46a1df3756b0617d292f07888692735eef24ff69bf4fe353d639a3b9fa64736f6c634300080c0033";
|
|
451
|
+
|
|
452
|
+
type Multicall3ConstructorParams =
|
|
453
|
+
| [signer?: Signer]
|
|
454
|
+
| ConstructorParameters<typeof ContractFactory>;
|
|
455
|
+
|
|
456
|
+
const isSuperArgs = (
|
|
457
|
+
xs: Multicall3ConstructorParams
|
|
458
|
+
): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;
|
|
459
|
+
|
|
460
|
+
export class Multicall3__factory extends ContractFactory {
|
|
461
|
+
constructor(...args: Multicall3ConstructorParams) {
|
|
462
|
+
if (isSuperArgs(args)) {
|
|
463
|
+
super(...args);
|
|
464
|
+
} else {
|
|
465
|
+
super(_abi, _bytecode, args[0]);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
override deploy(
|
|
470
|
+
overrides?: Overrides & { from?: string }
|
|
471
|
+
): Promise<Multicall3> {
|
|
472
|
+
return super.deploy(overrides || {}) as Promise<Multicall3>;
|
|
473
|
+
}
|
|
474
|
+
override getDeployTransaction(
|
|
475
|
+
overrides?: Overrides & { from?: string }
|
|
476
|
+
): TransactionRequest {
|
|
477
|
+
return super.getDeployTransaction(overrides || {});
|
|
478
|
+
}
|
|
479
|
+
override attach(address: string): Multicall3 {
|
|
480
|
+
return super.attach(address) as Multicall3;
|
|
481
|
+
}
|
|
482
|
+
override connect(signer: Signer): Multicall3__factory {
|
|
483
|
+
return super.connect(signer) as Multicall3__factory;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
static readonly bytecode = _bytecode;
|
|
487
|
+
static readonly abi = _abi;
|
|
488
|
+
static createInterface(): Multicall3Interface {
|
|
489
|
+
return new utils.Interface(_abi) as Multicall3Interface;
|
|
490
|
+
}
|
|
491
|
+
static connect(
|
|
492
|
+
address: string,
|
|
493
|
+
signerOrProvider: Signer | Provider
|
|
494
|
+
): Multicall3 {
|
|
495
|
+
return new Contract(address, _abi, signerOrProvider) as Multicall3;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
@@ -7,5 +7,6 @@ export { IPyth__factory } from "./IPyth__factory";
|
|
|
7
7
|
export { LimitOrderBook__factory } from "./LimitOrderBook__factory";
|
|
8
8
|
export { LimitOrderBookFactory__factory } from "./LimitOrderBookFactory__factory";
|
|
9
9
|
export { MockTokenSwap__factory } from "./MockTokenSwap__factory";
|
|
10
|
+
export { Multicall3__factory } from "./Multicall3__factory";
|
|
10
11
|
export { OracleFactory__factory } from "./OracleFactory__factory";
|
|
11
12
|
export { ShareToken__factory } from "./ShareToken__factory";
|
package/src/contracts/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ export type { IPyth } from "./IPyth";
|
|
|
7
7
|
export type { LimitOrderBook } from "./LimitOrderBook";
|
|
8
8
|
export type { LimitOrderBookFactory } from "./LimitOrderBookFactory";
|
|
9
9
|
export type { MockTokenSwap } from "./MockTokenSwap";
|
|
10
|
+
export type { Multicall3 } from "./Multicall3";
|
|
10
11
|
export type { OracleFactory } from "./OracleFactory";
|
|
11
12
|
export type { ShareToken } from "./ShareToken";
|
|
12
13
|
export * as factories from "./factories";
|
|
@@ -16,5 +17,6 @@ export { IPyth__factory } from "./factories/IPyth__factory";
|
|
|
16
17
|
export { LimitOrderBook__factory } from "./factories/LimitOrderBook__factory";
|
|
17
18
|
export { LimitOrderBookFactory__factory } from "./factories/LimitOrderBookFactory__factory";
|
|
18
19
|
export { MockTokenSwap__factory } from "./factories/MockTokenSwap__factory";
|
|
20
|
+
export { Multicall3__factory } from "./factories/Multicall3__factory";
|
|
19
21
|
export { OracleFactory__factory } from "./factories/OracleFactory__factory";
|
|
20
22
|
export { ShareToken__factory } from "./factories/ShareToken__factory";
|