@xccy/ts-sdk 0.1.0
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/package.json +25 -0
- package/src/addresses.ts +14 -0
- package/src/index.ts +6 -0
- package/src/typechain/CollateralEngine.ts +1753 -0
- package/src/typechain/VAMMManager.ts +796 -0
- package/src/typechain/common.ts +131 -0
- package/src/typechain/factories/CollateralEngine__factory.ts +2590 -0
- package/src/typechain/factories/VAMMManager__factory.ts +1080 -0
- package/src/typechain/factories/index.ts +5 -0
- package/src/typechain/index.ts +8 -0
|
@@ -0,0 +1,1080 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import {
|
|
5
|
+
Contract,
|
|
6
|
+
ContractFactory,
|
|
7
|
+
ContractTransactionResponse,
|
|
8
|
+
Interface,
|
|
9
|
+
} from "ethers";
|
|
10
|
+
import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers";
|
|
11
|
+
import type { NonPayableOverrides } from "../common";
|
|
12
|
+
import type { VAMMManager, VAMMManagerInterface } from "../VAMMManager";
|
|
13
|
+
|
|
14
|
+
const _abi = [
|
|
15
|
+
{
|
|
16
|
+
type: "constructor",
|
|
17
|
+
inputs: [],
|
|
18
|
+
stateMutability: "nonpayable",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
type: "function",
|
|
22
|
+
name: "acceptOwnership",
|
|
23
|
+
inputs: [],
|
|
24
|
+
outputs: [],
|
|
25
|
+
stateMutability: "nonpayable",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: "function",
|
|
29
|
+
name: "burn",
|
|
30
|
+
inputs: [
|
|
31
|
+
{
|
|
32
|
+
name: "key",
|
|
33
|
+
type: "tuple",
|
|
34
|
+
internalType: "struct PoolKey.Key",
|
|
35
|
+
components: [
|
|
36
|
+
{
|
|
37
|
+
name: "underlyingAsset",
|
|
38
|
+
type: "address",
|
|
39
|
+
internalType: "address",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "compoundToken",
|
|
43
|
+
type: "address",
|
|
44
|
+
internalType: "address",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "termStartTimestampWad",
|
|
48
|
+
type: "uint256",
|
|
49
|
+
internalType: "uint256",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "termEndTimestampWad",
|
|
53
|
+
type: "uint256",
|
|
54
|
+
internalType: "uint256",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "feeWad",
|
|
58
|
+
type: "uint256",
|
|
59
|
+
internalType: "uint256",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "tickSpacing",
|
|
63
|
+
type: "int24",
|
|
64
|
+
internalType: "int24",
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "account",
|
|
70
|
+
type: "tuple",
|
|
71
|
+
internalType: "struct Account.AccountId",
|
|
72
|
+
components: [
|
|
73
|
+
{
|
|
74
|
+
name: "owner",
|
|
75
|
+
type: "address",
|
|
76
|
+
internalType: "address",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "id",
|
|
80
|
+
type: "uint96",
|
|
81
|
+
internalType: "uint96",
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "isolatedMarginToken",
|
|
85
|
+
type: "address",
|
|
86
|
+
internalType: "address",
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: "tickLower",
|
|
92
|
+
type: "int24",
|
|
93
|
+
internalType: "int24",
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "tickUpper",
|
|
97
|
+
type: "int24",
|
|
98
|
+
internalType: "int24",
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: "amount",
|
|
102
|
+
type: "uint128",
|
|
103
|
+
internalType: "uint128",
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
outputs: [
|
|
107
|
+
{
|
|
108
|
+
name: "positionMarginRequirement",
|
|
109
|
+
type: "uint256",
|
|
110
|
+
internalType: "uint256",
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
stateMutability: "nonpayable",
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
type: "function",
|
|
117
|
+
name: "computeGrowthInside",
|
|
118
|
+
inputs: [
|
|
119
|
+
{
|
|
120
|
+
name: "poolId",
|
|
121
|
+
type: "bytes32",
|
|
122
|
+
internalType: "bytes32",
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: "tickLower",
|
|
126
|
+
type: "int24",
|
|
127
|
+
internalType: "int24",
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: "tickUpper",
|
|
131
|
+
type: "int24",
|
|
132
|
+
internalType: "int24",
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
outputs: [
|
|
136
|
+
{
|
|
137
|
+
name: "fixedTokenGrowthInsideX128",
|
|
138
|
+
type: "int256",
|
|
139
|
+
internalType: "int256",
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: "variableTokenGrowthInsideX128",
|
|
143
|
+
type: "int256",
|
|
144
|
+
internalType: "int256",
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
stateMutability: "view",
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
type: "function",
|
|
151
|
+
name: "createPool",
|
|
152
|
+
inputs: [
|
|
153
|
+
{
|
|
154
|
+
name: "key",
|
|
155
|
+
type: "tuple",
|
|
156
|
+
internalType: "struct PoolKey.Key",
|
|
157
|
+
components: [
|
|
158
|
+
{
|
|
159
|
+
name: "underlyingAsset",
|
|
160
|
+
type: "address",
|
|
161
|
+
internalType: "address",
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: "compoundToken",
|
|
165
|
+
type: "address",
|
|
166
|
+
internalType: "address",
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name: "termStartTimestampWad",
|
|
170
|
+
type: "uint256",
|
|
171
|
+
internalType: "uint256",
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
name: "termEndTimestampWad",
|
|
175
|
+
type: "uint256",
|
|
176
|
+
internalType: "uint256",
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
name: "feeWad",
|
|
180
|
+
type: "uint256",
|
|
181
|
+
internalType: "uint256",
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: "tickSpacing",
|
|
185
|
+
type: "int24",
|
|
186
|
+
internalType: "int24",
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
name: "aprOracle",
|
|
192
|
+
type: "address",
|
|
193
|
+
internalType: "contract IAprOracle",
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
name: "sqrtPriceX96",
|
|
197
|
+
type: "uint160",
|
|
198
|
+
internalType: "uint160",
|
|
199
|
+
},
|
|
200
|
+
],
|
|
201
|
+
outputs: [
|
|
202
|
+
{
|
|
203
|
+
name: "tick",
|
|
204
|
+
type: "int24",
|
|
205
|
+
internalType: "int24",
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
name: "poolId",
|
|
209
|
+
type: "bytes32",
|
|
210
|
+
internalType: "bytes32",
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
stateMutability: "nonpayable",
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
type: "function",
|
|
217
|
+
name: "getVAMMState",
|
|
218
|
+
inputs: [
|
|
219
|
+
{
|
|
220
|
+
name: "poolId",
|
|
221
|
+
type: "bytes32",
|
|
222
|
+
internalType: "bytes32",
|
|
223
|
+
},
|
|
224
|
+
],
|
|
225
|
+
outputs: [
|
|
226
|
+
{
|
|
227
|
+
name: "tick",
|
|
228
|
+
type: "int24",
|
|
229
|
+
internalType: "int24",
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: "sqrtPriceX96",
|
|
233
|
+
type: "uint160",
|
|
234
|
+
internalType: "uint160",
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
name: "compoundToken",
|
|
238
|
+
type: "address",
|
|
239
|
+
internalType: "address",
|
|
240
|
+
},
|
|
241
|
+
],
|
|
242
|
+
stateMutability: "view",
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
type: "function",
|
|
246
|
+
name: "initialize",
|
|
247
|
+
inputs: [
|
|
248
|
+
{
|
|
249
|
+
name: "_initialOwner",
|
|
250
|
+
type: "address",
|
|
251
|
+
internalType: "address",
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
name: "_collateralEngine",
|
|
255
|
+
type: "address",
|
|
256
|
+
internalType: "contract ICollateralEngine",
|
|
257
|
+
},
|
|
258
|
+
],
|
|
259
|
+
outputs: [],
|
|
260
|
+
stateMutability: "nonpayable",
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
type: "function",
|
|
264
|
+
name: "mint",
|
|
265
|
+
inputs: [
|
|
266
|
+
{
|
|
267
|
+
name: "key",
|
|
268
|
+
type: "tuple",
|
|
269
|
+
internalType: "struct PoolKey.Key",
|
|
270
|
+
components: [
|
|
271
|
+
{
|
|
272
|
+
name: "underlyingAsset",
|
|
273
|
+
type: "address",
|
|
274
|
+
internalType: "address",
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
name: "compoundToken",
|
|
278
|
+
type: "address",
|
|
279
|
+
internalType: "address",
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
name: "termStartTimestampWad",
|
|
283
|
+
type: "uint256",
|
|
284
|
+
internalType: "uint256",
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
name: "termEndTimestampWad",
|
|
288
|
+
type: "uint256",
|
|
289
|
+
internalType: "uint256",
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
name: "feeWad",
|
|
293
|
+
type: "uint256",
|
|
294
|
+
internalType: "uint256",
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
name: "tickSpacing",
|
|
298
|
+
type: "int24",
|
|
299
|
+
internalType: "int24",
|
|
300
|
+
},
|
|
301
|
+
],
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
name: "account",
|
|
305
|
+
type: "tuple",
|
|
306
|
+
internalType: "struct Account.AccountId",
|
|
307
|
+
components: [
|
|
308
|
+
{
|
|
309
|
+
name: "owner",
|
|
310
|
+
type: "address",
|
|
311
|
+
internalType: "address",
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
name: "id",
|
|
315
|
+
type: "uint96",
|
|
316
|
+
internalType: "uint96",
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
name: "isolatedMarginToken",
|
|
320
|
+
type: "address",
|
|
321
|
+
internalType: "address",
|
|
322
|
+
},
|
|
323
|
+
],
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
name: "tickLower",
|
|
327
|
+
type: "int24",
|
|
328
|
+
internalType: "int24",
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
name: "tickUpper",
|
|
332
|
+
type: "int24",
|
|
333
|
+
internalType: "int24",
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
name: "amount",
|
|
337
|
+
type: "uint128",
|
|
338
|
+
internalType: "uint128",
|
|
339
|
+
},
|
|
340
|
+
],
|
|
341
|
+
outputs: [
|
|
342
|
+
{
|
|
343
|
+
name: "positionMarginRequirement",
|
|
344
|
+
type: "uint256",
|
|
345
|
+
internalType: "uint256",
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
name: "feeIncurred",
|
|
349
|
+
type: "int256",
|
|
350
|
+
internalType: "int256",
|
|
351
|
+
},
|
|
352
|
+
],
|
|
353
|
+
stateMutability: "nonpayable",
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
type: "function",
|
|
357
|
+
name: "owner",
|
|
358
|
+
inputs: [],
|
|
359
|
+
outputs: [
|
|
360
|
+
{
|
|
361
|
+
name: "",
|
|
362
|
+
type: "address",
|
|
363
|
+
internalType: "address",
|
|
364
|
+
},
|
|
365
|
+
],
|
|
366
|
+
stateMutability: "view",
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
type: "function",
|
|
370
|
+
name: "pendingOwner",
|
|
371
|
+
inputs: [],
|
|
372
|
+
outputs: [
|
|
373
|
+
{
|
|
374
|
+
name: "",
|
|
375
|
+
type: "address",
|
|
376
|
+
internalType: "address",
|
|
377
|
+
},
|
|
378
|
+
],
|
|
379
|
+
stateMutability: "view",
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
type: "function",
|
|
383
|
+
name: "poolExists",
|
|
384
|
+
inputs: [
|
|
385
|
+
{
|
|
386
|
+
name: "key",
|
|
387
|
+
type: "tuple",
|
|
388
|
+
internalType: "struct PoolKey.Key",
|
|
389
|
+
components: [
|
|
390
|
+
{
|
|
391
|
+
name: "underlyingAsset",
|
|
392
|
+
type: "address",
|
|
393
|
+
internalType: "address",
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
name: "compoundToken",
|
|
397
|
+
type: "address",
|
|
398
|
+
internalType: "address",
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
name: "termStartTimestampWad",
|
|
402
|
+
type: "uint256",
|
|
403
|
+
internalType: "uint256",
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
name: "termEndTimestampWad",
|
|
407
|
+
type: "uint256",
|
|
408
|
+
internalType: "uint256",
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
name: "feeWad",
|
|
412
|
+
type: "uint256",
|
|
413
|
+
internalType: "uint256",
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
name: "tickSpacing",
|
|
417
|
+
type: "int24",
|
|
418
|
+
internalType: "int24",
|
|
419
|
+
},
|
|
420
|
+
],
|
|
421
|
+
},
|
|
422
|
+
],
|
|
423
|
+
outputs: [
|
|
424
|
+
{
|
|
425
|
+
name: "exists",
|
|
426
|
+
type: "bool",
|
|
427
|
+
internalType: "bool",
|
|
428
|
+
},
|
|
429
|
+
],
|
|
430
|
+
stateMutability: "view",
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
type: "function",
|
|
434
|
+
name: "renounceOwnership",
|
|
435
|
+
inputs: [],
|
|
436
|
+
outputs: [],
|
|
437
|
+
stateMutability: "nonpayable",
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
type: "function",
|
|
441
|
+
name: "swap",
|
|
442
|
+
inputs: [
|
|
443
|
+
{
|
|
444
|
+
name: "key",
|
|
445
|
+
type: "tuple",
|
|
446
|
+
internalType: "struct PoolKey.Key",
|
|
447
|
+
components: [
|
|
448
|
+
{
|
|
449
|
+
name: "underlyingAsset",
|
|
450
|
+
type: "address",
|
|
451
|
+
internalType: "address",
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
name: "compoundToken",
|
|
455
|
+
type: "address",
|
|
456
|
+
internalType: "address",
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
name: "termStartTimestampWad",
|
|
460
|
+
type: "uint256",
|
|
461
|
+
internalType: "uint256",
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
name: "termEndTimestampWad",
|
|
465
|
+
type: "uint256",
|
|
466
|
+
internalType: "uint256",
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
name: "feeWad",
|
|
470
|
+
type: "uint256",
|
|
471
|
+
internalType: "uint256",
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
name: "tickSpacing",
|
|
475
|
+
type: "int24",
|
|
476
|
+
internalType: "int24",
|
|
477
|
+
},
|
|
478
|
+
],
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
name: "params",
|
|
482
|
+
type: "tuple",
|
|
483
|
+
internalType: "struct VAMMTypes.SwapParams",
|
|
484
|
+
components: [
|
|
485
|
+
{
|
|
486
|
+
name: "account",
|
|
487
|
+
type: "tuple",
|
|
488
|
+
internalType: "struct Account.AccountId",
|
|
489
|
+
components: [
|
|
490
|
+
{
|
|
491
|
+
name: "owner",
|
|
492
|
+
type: "address",
|
|
493
|
+
internalType: "address",
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
name: "id",
|
|
497
|
+
type: "uint96",
|
|
498
|
+
internalType: "uint96",
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
name: "isolatedMarginToken",
|
|
502
|
+
type: "address",
|
|
503
|
+
internalType: "address",
|
|
504
|
+
},
|
|
505
|
+
],
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
name: "amountSpecified",
|
|
509
|
+
type: "int256",
|
|
510
|
+
internalType: "int256",
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
name: "sqrtPriceLimitX96",
|
|
514
|
+
type: "uint160",
|
|
515
|
+
internalType: "uint160",
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
name: "tickLower",
|
|
519
|
+
type: "int24",
|
|
520
|
+
internalType: "int24",
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
name: "tickUpper",
|
|
524
|
+
type: "int24",
|
|
525
|
+
internalType: "int24",
|
|
526
|
+
},
|
|
527
|
+
],
|
|
528
|
+
},
|
|
529
|
+
],
|
|
530
|
+
outputs: [
|
|
531
|
+
{
|
|
532
|
+
name: "fixedTokenDelta",
|
|
533
|
+
type: "int256",
|
|
534
|
+
internalType: "int256",
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
name: "variableTokenDelta",
|
|
538
|
+
type: "int256",
|
|
539
|
+
internalType: "int256",
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
name: "feeIncurred",
|
|
543
|
+
type: "int256",
|
|
544
|
+
internalType: "int256",
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
name: "fixedTokenDeltaUnbalanced",
|
|
548
|
+
type: "int256",
|
|
549
|
+
internalType: "int256",
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
name: "positionMarginRequirement",
|
|
553
|
+
type: "uint256",
|
|
554
|
+
internalType: "uint256",
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
name: "priceAfterSwap",
|
|
558
|
+
type: "uint256",
|
|
559
|
+
internalType: "uint256",
|
|
560
|
+
},
|
|
561
|
+
],
|
|
562
|
+
stateMutability: "nonpayable",
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
type: "function",
|
|
566
|
+
name: "transferOwnership",
|
|
567
|
+
inputs: [
|
|
568
|
+
{
|
|
569
|
+
name: "newOwner",
|
|
570
|
+
type: "address",
|
|
571
|
+
internalType: "address",
|
|
572
|
+
},
|
|
573
|
+
],
|
|
574
|
+
outputs: [],
|
|
575
|
+
stateMutability: "nonpayable",
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
type: "event",
|
|
579
|
+
name: "Burn",
|
|
580
|
+
inputs: [
|
|
581
|
+
{
|
|
582
|
+
name: "poolId",
|
|
583
|
+
type: "bytes32",
|
|
584
|
+
indexed: true,
|
|
585
|
+
internalType: "bytes32",
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
name: "owner",
|
|
589
|
+
type: "address",
|
|
590
|
+
indexed: true,
|
|
591
|
+
internalType: "address",
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
name: "accountId",
|
|
595
|
+
type: "uint96",
|
|
596
|
+
indexed: true,
|
|
597
|
+
internalType: "uint96",
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
name: "isolatedMarginToken",
|
|
601
|
+
type: "address",
|
|
602
|
+
indexed: false,
|
|
603
|
+
internalType: "address",
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
name: "tickLower",
|
|
607
|
+
type: "int24",
|
|
608
|
+
indexed: false,
|
|
609
|
+
internalType: "int24",
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
name: "tickUpper",
|
|
613
|
+
type: "int24",
|
|
614
|
+
indexed: false,
|
|
615
|
+
internalType: "int24",
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
name: "amount",
|
|
619
|
+
type: "uint128",
|
|
620
|
+
indexed: false,
|
|
621
|
+
internalType: "uint128",
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
name: "feeIncurred",
|
|
625
|
+
type: "int256",
|
|
626
|
+
indexed: false,
|
|
627
|
+
internalType: "int256",
|
|
628
|
+
},
|
|
629
|
+
],
|
|
630
|
+
anonymous: false,
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
type: "event",
|
|
634
|
+
name: "Initialized",
|
|
635
|
+
inputs: [
|
|
636
|
+
{
|
|
637
|
+
name: "version",
|
|
638
|
+
type: "uint64",
|
|
639
|
+
indexed: false,
|
|
640
|
+
internalType: "uint64",
|
|
641
|
+
},
|
|
642
|
+
],
|
|
643
|
+
anonymous: false,
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
type: "event",
|
|
647
|
+
name: "Mint",
|
|
648
|
+
inputs: [
|
|
649
|
+
{
|
|
650
|
+
name: "poolId",
|
|
651
|
+
type: "bytes32",
|
|
652
|
+
indexed: true,
|
|
653
|
+
internalType: "bytes32",
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
name: "owner",
|
|
657
|
+
type: "address",
|
|
658
|
+
indexed: true,
|
|
659
|
+
internalType: "address",
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
name: "accountId",
|
|
663
|
+
type: "uint96",
|
|
664
|
+
indexed: true,
|
|
665
|
+
internalType: "uint96",
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
name: "isolatedMarginToken",
|
|
669
|
+
type: "address",
|
|
670
|
+
indexed: false,
|
|
671
|
+
internalType: "address",
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
name: "tickLower",
|
|
675
|
+
type: "int24",
|
|
676
|
+
indexed: false,
|
|
677
|
+
internalType: "int24",
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
name: "tickUpper",
|
|
681
|
+
type: "int24",
|
|
682
|
+
indexed: false,
|
|
683
|
+
internalType: "int24",
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
name: "amount",
|
|
687
|
+
type: "uint128",
|
|
688
|
+
indexed: false,
|
|
689
|
+
internalType: "uint128",
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
name: "feeIncurred",
|
|
693
|
+
type: "int256",
|
|
694
|
+
indexed: false,
|
|
695
|
+
internalType: "int256",
|
|
696
|
+
},
|
|
697
|
+
],
|
|
698
|
+
anonymous: false,
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
type: "event",
|
|
702
|
+
name: "OwnershipTransferStarted",
|
|
703
|
+
inputs: [
|
|
704
|
+
{
|
|
705
|
+
name: "previousOwner",
|
|
706
|
+
type: "address",
|
|
707
|
+
indexed: true,
|
|
708
|
+
internalType: "address",
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
name: "newOwner",
|
|
712
|
+
type: "address",
|
|
713
|
+
indexed: true,
|
|
714
|
+
internalType: "address",
|
|
715
|
+
},
|
|
716
|
+
],
|
|
717
|
+
anonymous: false,
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
type: "event",
|
|
721
|
+
name: "OwnershipTransferred",
|
|
722
|
+
inputs: [
|
|
723
|
+
{
|
|
724
|
+
name: "previousOwner",
|
|
725
|
+
type: "address",
|
|
726
|
+
indexed: true,
|
|
727
|
+
internalType: "address",
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
name: "newOwner",
|
|
731
|
+
type: "address",
|
|
732
|
+
indexed: true,
|
|
733
|
+
internalType: "address",
|
|
734
|
+
},
|
|
735
|
+
],
|
|
736
|
+
anonymous: false,
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
type: "event",
|
|
740
|
+
name: "PoolInitialized",
|
|
741
|
+
inputs: [
|
|
742
|
+
{
|
|
743
|
+
name: "poolId",
|
|
744
|
+
type: "bytes32",
|
|
745
|
+
indexed: true,
|
|
746
|
+
internalType: "bytes32",
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
name: "underlyingAsset",
|
|
750
|
+
type: "address",
|
|
751
|
+
indexed: true,
|
|
752
|
+
internalType: "address",
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
name: "compoundToken",
|
|
756
|
+
type: "address",
|
|
757
|
+
indexed: true,
|
|
758
|
+
internalType: "address",
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
name: "termStartTimestampWad",
|
|
762
|
+
type: "uint256",
|
|
763
|
+
indexed: false,
|
|
764
|
+
internalType: "uint256",
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
name: "termEndTimestampWad",
|
|
768
|
+
type: "uint256",
|
|
769
|
+
indexed: false,
|
|
770
|
+
internalType: "uint256",
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
name: "feeWad",
|
|
774
|
+
type: "uint256",
|
|
775
|
+
indexed: false,
|
|
776
|
+
internalType: "uint256",
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
name: "tickSpacing",
|
|
780
|
+
type: "int24",
|
|
781
|
+
indexed: false,
|
|
782
|
+
internalType: "int24",
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
name: "currentTick",
|
|
786
|
+
type: "int24",
|
|
787
|
+
indexed: false,
|
|
788
|
+
internalType: "int24",
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
name: "sqrtPriceX96",
|
|
792
|
+
type: "uint160",
|
|
793
|
+
indexed: false,
|
|
794
|
+
internalType: "uint160",
|
|
795
|
+
},
|
|
796
|
+
],
|
|
797
|
+
anonymous: false,
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
type: "event",
|
|
801
|
+
name: "Swap",
|
|
802
|
+
inputs: [
|
|
803
|
+
{
|
|
804
|
+
name: "poolId",
|
|
805
|
+
type: "bytes32",
|
|
806
|
+
indexed: true,
|
|
807
|
+
internalType: "bytes32",
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
name: "owner",
|
|
811
|
+
type: "address",
|
|
812
|
+
indexed: true,
|
|
813
|
+
internalType: "address",
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
name: "accountId",
|
|
817
|
+
type: "uint96",
|
|
818
|
+
indexed: true,
|
|
819
|
+
internalType: "uint96",
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
name: "isolatedMarginToken",
|
|
823
|
+
type: "address",
|
|
824
|
+
indexed: false,
|
|
825
|
+
internalType: "address",
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
name: "tickLower",
|
|
829
|
+
type: "int24",
|
|
830
|
+
indexed: false,
|
|
831
|
+
internalType: "int24",
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
name: "tickUpper",
|
|
835
|
+
type: "int24",
|
|
836
|
+
indexed: false,
|
|
837
|
+
internalType: "int24",
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
name: "feeIncurred",
|
|
841
|
+
type: "int256",
|
|
842
|
+
indexed: false,
|
|
843
|
+
internalType: "int256",
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
name: "fixedTokenDelta",
|
|
847
|
+
type: "int256",
|
|
848
|
+
indexed: false,
|
|
849
|
+
internalType: "int256",
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
name: "variableTokenDelta",
|
|
853
|
+
type: "int256",
|
|
854
|
+
indexed: false,
|
|
855
|
+
internalType: "int256",
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
name: "currentTick",
|
|
859
|
+
type: "int24",
|
|
860
|
+
indexed: false,
|
|
861
|
+
internalType: "int24",
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
name: "sqrtPriceX96",
|
|
865
|
+
type: "uint160",
|
|
866
|
+
indexed: false,
|
|
867
|
+
internalType: "uint160",
|
|
868
|
+
},
|
|
869
|
+
],
|
|
870
|
+
anonymous: false,
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
type: "error",
|
|
874
|
+
name: "AprOracleZero",
|
|
875
|
+
inputs: [],
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
type: "error",
|
|
879
|
+
name: "CollateralEngineZero",
|
|
880
|
+
inputs: [],
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
type: "error",
|
|
884
|
+
name: "CompoundTokenZero",
|
|
885
|
+
inputs: [],
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
type: "error",
|
|
889
|
+
name: "ExpectedSqrtPriceZeroBeforeInit",
|
|
890
|
+
inputs: [
|
|
891
|
+
{
|
|
892
|
+
name: "sqrtPriceX96",
|
|
893
|
+
type: "uint160",
|
|
894
|
+
internalType: "uint160",
|
|
895
|
+
},
|
|
896
|
+
],
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
type: "error",
|
|
900
|
+
name: "FeeRangeInvalid",
|
|
901
|
+
inputs: [
|
|
902
|
+
{
|
|
903
|
+
name: "feeWad",
|
|
904
|
+
type: "uint256",
|
|
905
|
+
internalType: "uint256",
|
|
906
|
+
},
|
|
907
|
+
],
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
type: "error",
|
|
911
|
+
name: "InvalidInitialization",
|
|
912
|
+
inputs: [],
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
type: "error",
|
|
916
|
+
name: "IsolatedMarginModeViolation",
|
|
917
|
+
inputs: [
|
|
918
|
+
{
|
|
919
|
+
name: "accountIsolatedToken",
|
|
920
|
+
type: "address",
|
|
921
|
+
internalType: "address",
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
name: "poolUnderlyingAsset",
|
|
925
|
+
type: "address",
|
|
926
|
+
internalType: "address",
|
|
927
|
+
},
|
|
928
|
+
],
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
type: "error",
|
|
932
|
+
name: "NotInitializing",
|
|
933
|
+
inputs: [],
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
type: "error",
|
|
937
|
+
name: "OwnableInvalidOwner",
|
|
938
|
+
inputs: [
|
|
939
|
+
{
|
|
940
|
+
name: "owner",
|
|
941
|
+
type: "address",
|
|
942
|
+
internalType: "address",
|
|
943
|
+
},
|
|
944
|
+
],
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
type: "error",
|
|
948
|
+
name: "OwnableUnauthorizedAccount",
|
|
949
|
+
inputs: [
|
|
950
|
+
{
|
|
951
|
+
name: "account",
|
|
952
|
+
type: "address",
|
|
953
|
+
internalType: "address",
|
|
954
|
+
},
|
|
955
|
+
],
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
type: "error",
|
|
959
|
+
name: "PoolExpired",
|
|
960
|
+
inputs: [],
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
type: "error",
|
|
964
|
+
name: "PoolNotInitialized",
|
|
965
|
+
inputs: [],
|
|
966
|
+
},
|
|
967
|
+
{
|
|
968
|
+
type: "error",
|
|
969
|
+
name: "ReentrancyGuardReentrantCall",
|
|
970
|
+
inputs: [],
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
type: "error",
|
|
974
|
+
name: "SqrtPriceRatioOutOfBounds",
|
|
975
|
+
inputs: [
|
|
976
|
+
{
|
|
977
|
+
name: "sqrtPriceX96",
|
|
978
|
+
type: "uint160",
|
|
979
|
+
internalType: "uint160",
|
|
980
|
+
},
|
|
981
|
+
],
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
type: "error",
|
|
985
|
+
name: "TickSpacingOutOfBounds",
|
|
986
|
+
inputs: [
|
|
987
|
+
{
|
|
988
|
+
name: "tickSpacing",
|
|
989
|
+
type: "int24",
|
|
990
|
+
internalType: "int24",
|
|
991
|
+
},
|
|
992
|
+
],
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
type: "error",
|
|
996
|
+
name: "UnderlyingAssetZero",
|
|
997
|
+
inputs: [],
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
type: "error",
|
|
1001
|
+
name: "ZeroInputPrice",
|
|
1002
|
+
inputs: [],
|
|
1003
|
+
},
|
|
1004
|
+
] as const;
|
|
1005
|
+
|
|
1006
|
+
const _bytecode =
|
|
1007
|
+
"0x6080806040523460aa575f516020612a935f395f51905f525460ff8160401c16609b576002600160401b03196001600160401b038216016049575b6040516129e490816100af8239f35b6001600160401b0319166001600160401b039081175f516020612a935f395f51905f525581527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a15f80603a565b63f92ee8a960e01b5f5260045ffd5b5f80fdfe60806040526004361015610011575f80fd5b5f3560e01c80631249a6bd146120fb5780631f9f66ea14611b7057806320e7a44614611b0d578063485cc955146118be578063715018a61461184157806379ba5097146117f35780637a1f7c601461150e5780637d7dd88d146111c45780638da5cb5b146111905780639589619514611120578063ab31dafd14610164578063e30c3978146101305763f2fde38b146100a8575f80fd5b3461012c57602036600319011261012c576100c16121bb565b6100c9612801565b5f51602061298f5f395f51905f5280546001600160a01b0319166001600160a01b039283169081179091555f51602061292f5f395f51905f52549091167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227005f80a3005b5f80fd5b3461012c575f36600319011261012c575f51602061298f5f395f51905f52546040516001600160a01b039091168152602090f35b3461012c5761010036600319011261012c5761017f366121e5565b60c435906001600160a01b038216820361012c5760e4356001600160a01b038116810361012c576101ae612801565b6101b66125c1565b81516001600160a01b0316156110db5760208201516001600160a01b031615611096576040820151156110515760608201516040830151101561100c57608082015115610fd3575f60a083015160020b1315610f8e576001600160a01b03831615610f495760208201516001600160a01b031615610f045781516001600160a01b031615610eb55761024782612512565b90600161025261257d565b01825f5280602052600b60405f20015460020b610e7157825f5260205260405f209360018060a01b0361028361257d565b54602086015186516040880151606089015160a08a01519096919590946001600160a01b0393841694909316921615610e62578115610e53578215610e45575f8460020b13801590610e36575b610e20576001600160a01b03871615610e11576c1fa71f3f5f68a90479ee3f8fec6001600160a01b03881610801590610df3575b610dd557600e8a01546001600160a01b031680610dc3575089546001600160a01b03199081166001600160a01b03928316178b5560018b0180548216938316939093179092556002808b01805490931693909116929092179055600b8801805462ffffff841662ffffff199190911617905581900b15610966578060020b62010deb190760020b62010deb1903627fffff8113627fffff1982121761093b5760020b627fffff19811461093b57805f0360020b03627fffff8113627fffff1982121761093b5760020b905f198160020b14627fffff1983141661093b5760019162ffffff9160020b9005160162ffffff811161093b5762ffffff168015610966576001600160801b0360058801918104166001600160801b0319825416179055600386015560048501556b0816769404766de590afe04e60018060a01b038216101580610da4575b15610d7b57640100000000600160c01b038160201b16806001600160801b03811160071b90811c67ffffffffffffffff811160061b90811c63ffffffff811160051b90811c61ffff811160041b90811c9060ff821160031b91821c92600f841160021b93841c94600160038711811b96871c1196171717171717179060808210155f14610d6957607e19820182811161093b571c5b607f19820191821360011661093b57800280607f1c8160ff1c1c800280607f1c8160ff1c1c800280607f1c8160ff1c1c800280607f1c8160ff1c1c800280607f1c8160ff1c1c800280607f1c8160ff1c1c80029081607f1c8260ff1c1c80029283607f1c8460ff1c1c80029485607f1c8660ff1c1c80029687607f1c8860ff1c1c80029889607f1c8a60ff1c1c80029a8b607f1c8c60ff1c1c80029c8d80607f1c9060ff1c1c800260cd1c6604000000000000169d60cc1c6608000000000000169c60cb1c6610000000000000169b60ca1c6620000000000000169a60c91c6640000000000000169960c81c6680000000000000169860c71c670100000000000000169760c61c670200000000000000169660c51c670400000000000000169560c41c670800000000000000169460c31c671000000000000000169360c21c672000000000000000169260c11c674000000000000000169160c01c678000000000000000169060401b1717171717171717171717171717693627a301d71055774c85810290808205693627a301d71055774c85149015171561093b576f028f6481ab7f045a5af012a19d003aa919810160018282131661093b5760801d60020b906fdb2df09e81959a81455e260799a0632f8101905f6fdb2df09e81959a81455e260799a0632f8312911290801582169115161761093b5760801d60020b81810361081457505b5f604080516106f681612145565b6001600160a01b038516808252600285900b6020830152910191909152600e860180546001600160c01b03191690911760a09290921b62ffffff60a01b1691909117905560808301519366470de4df82000085116108015761076181604096600660209401556127b0565b015160020b92827f03264fe9e0ccc86cd856e835ba4acbdd5ea44c7438f0eff82db2ce2494e3584b60c060018060a01b038451169360018060a01b0360208201511695898201519160608101519060a0608082015191015160020b918c5194855260208501528b840152606083015288608083015260018060a01b031660a0820152a460015f51602061294f5f395f51905f525582519182526020820152f35b8463eae1313160e01b5f5260045260245ffd5b905f821215610d6357600160ff1b821461093b57815f035b62010dec8111610d3a576001811615610d28576001600160881b036ffffcb933bd6fad37aa2d162d1a5940015b169060028116610ced575b60048116610cb2575b60088116610c77575b60108116610c3c575b60208116610c01575b60408116610bc6575b60808116610b8b575b6101008116610b50575b6102008116610b15575b6104008116610ada575b6108008116610a9f575b6110008116610a64575b6120008116610a29575b61400081166109ee575b61800081166109b3575b620100001661097a575b5f8313610958575b63ffffffff8160201c9116155f1461094f5760ff5f5b16810180911161093b576001600160a01b0384811691161161093457506106e8565b90506106e8565b634e487b7160e01b5f52601160045260245ffd5b60ff6001610912565b8015610966575f19046108fc565b634e487b7160e01b5f52601260045260245ffd5b6f09aa508b5b7a84e1c677de54f3e99bc98102908082046f09aa508b5b7a84e1c677de54f3e99bc9149015171561093b5760801c6108f4565b906f31be135f97d08fd981231505542fcfa68102908082046f31be135f97d08fd981231505542fcfa6149015171561093b5760801c906108ea565b906f70d869a156d2a1b890bb3df62baf32f78102908082046f70d869a156d2a1b890bb3df62baf32f7149015171561093b5760801c906108e0565b906fa9f746462d870fdf8a65dc1f90e061e58102908082046fa9f746462d870fdf8a65dc1f90e061e5149015171561093b5760801c906108d6565b906fd097f3bdfd2022b8845ad8f792aa58258102908082046fd097f3bdfd2022b8845ad8f792aa5825149015171561093b5760801c906108cc565b906fe7159475a2c29b7443b29c7fa6e889d98102908082046fe7159475a2c29b7443b29c7fa6e889d9149015171561093b5760801c906108c2565b906ff3392b0822b70005940c7a398e4b70f38102908082046ff3392b0822b70005940c7a398e4b70f3149015171561093b5760801c906108b8565b906ff987a7253ac413176f2b074cf7815e548102908082046ff987a7253ac413176f2b074cf7815e54149015171561093b5760801c906108ae565b906ffcbe86c7900a88aedcffc83b479aa3a48102908082046ffcbe86c7900a88aedcffc83b479aa3a4149015171561093b5760801c906108a4565b906ffe5dee046a99a2a811c461f1969c30538102908082046ffe5dee046a99a2a811c461f1969c3053149015171561093b5760801c9061089a565b906fff2ea16466c96a3843ec78b326b528618102908082046fff2ea16466c96a3843ec78b326b52861149015171561093b5760801c90610891565b906fff973b41fa98c081472e6896dfb254c08102908082046fff973b41fa98c081472e6896dfb254c0149015171561093b5760801c90610888565b906fffcb9843d60f6159c9db58835c9266448102908082046fffcb9843d60f6159c9db58835c926644149015171561093b5760801c9061087f565b906fffe5caca7e10e4e61c3624eaa0941cd08102908082046fffe5caca7e10e4e61c3624eaa0941cd0149015171561093b5760801c90610876565b906ffff2e50f5f656932ef12357cf3c7fdcc8102908082046ffff2e50f5f656932ef12357cf3c7fdcc149015171561093b5760801c9061086d565b906ffff97272373d413259a46990580e213a8102908082046ffff97272373d413259a46990580e213a149015171561093b5760801c90610864565b6001600160881b03600160801b610859565b60405162461bcd60e51b81526020600482015260016024820152601560fa1b6044820152606490fd5b8161082c565b81607f03607f811161093b571b6104e1565b60405162461bcd60e51b81526020600482015260016024820152602960f91b6044820152606490fd5b506c1fa71f3f5f68a90479ee3f8fec6001600160a01b0382161061044c565b6328be1c0f60e21b5f5260045260245ffd5b6348e0ee4560e01b5f9081526001600160a01b038816600452602490fd5b506b0816769404766de590afe04e6001600160a01b03881610610304565b634df82e9760e01b5f5260045ffd5b83630fe3925160e01b5f5260020b60045260245ffd5b506140008460020b12156102d0565b625b066560e31b5f5260045ffd5b6364f2414360e11b5f5260045ffd5b632107b4cf60e01b5f5260045ffd5b606460405162461bcd60e51b815260206004820152602060248201527f56414d4d4d616e616765723a20706f6f6c20616c7265616479206578697374736044820152fd5b60405162461bcd60e51b815260206004820152602160248201527f56414d4d4d616e616765723a207a65726f20756e6465726c79696e67417373656044820152601d60fa1b6064820152608490fd5b60405162461bcd60e51b815260206004820152601f60248201527f56414d4d4d616e616765723a207a65726f20636f6d706f756e64546f6b656e006044820152606490fd5b60405162461bcd60e51b815260206004820152601b60248201527f56414d4d4d616e616765723a207a65726f206170724f7261636c6500000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601960248201527f506f6f6c4b65793a207a65726f207469636b53706163696e67000000000000006044820152606490fd5b60405162461bcd60e51b8152602060048201526011602482015270506f6f6c4b65793a207a65726f2066656560781b6044820152606490fd5b60405162461bcd60e51b815260206004820152601860248201527f506f6f6c4b65793a20696e76616c6964207465726d456e6400000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601760248201527f506f6f6c4b65793a207a65726f207465726d53746172740000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601b60248201527f506f6f6c4b65793a207a65726f20636f6d706f756e64546f6b656e00000000006044820152606490fd5b60405162461bcd60e51b815260206004820152601d60248201527f506f6f6c4b65793a207a65726f20756e6465726c79696e6741737365740000006044820152606490fd5b3461012c57602036600319011261012c57600161113b61257d565b016004355f52602052606060405f20611153816125f9565b61115c816127b0565b90602082015160020b9160018060a01b03905116906001808060a01b03910154169060405192835260208301526040820152f35b3461012c575f36600319011261012c575f51602061292f5f395f51905f52546040516001600160a01b039091168152602090f35b3461012c576111d236612258565b916111de9391936125c1565b670de0b6b3a76400006060860151044210156114ff576111fd85612512565b600161120761257d565b01815f5260205260405f209361121c856125f9565b6001600160a01b0361122c61257d565b5416956001600160a01b036112408661233f565b1633148015611474575b6112539061236b565b60408501976001600160a01b036112698a61233f565b16151580611454575b611425576112c5906040519763605eed6b60e11b8952600489015261129a6024890188612404565b8560020b60848901528260020b60a48901526001600160801b03841660c489015260e4880190612479565b6020866101a48173__$08e89e547a556336527d5f207ab2ad924b$__5af49586156113e3575f966113ee575b5060205f976064604051809a819363258e9ddd60e01b8352611316600484018c612404565b5af19687156113e3575f976113ae575b5060409761138e877f663a3d27e76541ea4894ed33c4cbd806cc683211448d099292514dfd50b42386946001600160601b0394611377611371602061136a8d61233f565b9c016124c1565b9561233f565b988d51968796169a60018060a01b031699866124d5565b0390a460015f51602061294f5f395f51905f525582519182526020820152f35b9096506020813d6020116113db575b816113ca60209383612199565b8101031261012c5751956040611326565b3d91506113bd565b6040513d5f823e3d90fd5b9695506020873d60201161141d575b8161140a60209383612199565b8101031261012c579551949560206112f1565b3d91506113fd565b61142e8961233f565b9051639f08900f60e01b5f9081526001600160a01b039283166004529116602452604490fd5b5080516001600160a01b039081169061146c8b61233f565b161415611272565b506114b260206114838761233f565b60405163dbb37abf60e01b81526001600160a01b03909116600482015233602482015291829081906044820190565b03818b5afa80156113e357611253915f916114d0575b50905061124a565b6114f2915060203d6020116114f8575b6114ea8183612199565b810190612353565b8a6114c8565b503d6114e0565b63398b36db60e01b5f5260045ffd5b3461012c5761151c36612258565b611528939291936125c1565b5f93670de0b6b3a76400006060870151044210156114ff5761154986612512565b91600161155461257d565b01835f5260205260405f2091611569836125f9565b6001600160a01b0361157961257d565b54163381146001600160a01b0361158f8961233f565b16331480156117ec575b80156117a0575b6115a99061236b565b60408801996001600160a01b036115bf8c61233f565b16151580611780575b6117775761161b90604051966310fc77a160e31b885260048801526115f0602488018b612404565b8860020b60848801528460020b60a48801526001600160801b03861660c488015260e4870190612479565b806101a48601526020856101c48173__$08e89e547a556336527d5f207ab2ad924b$__5af49485156113e3575f95611743575b50156116cc575b50966116b07f775942cf77aefbd56c261423fc6ad0d256ab776d40bcf1538b2373f8065cd44b936001600160601b039360209a6116986113718d61136a8d61233f565b98604051968796169a60018060a01b031699866124d5565b0390a460015f51602061294f5f395f51905f5255604051908152f35b5f91975060209060646040518094819363258e9ddd60e01b83526116f3600484018d612404565b5af19081156113e3575f9161170d575b50956116b0611655565b9790506020883d60201161173b575b8161172960209383612199565b8101031261012c5796516116b0611703565b3d915061171c565b9094506020813d60201161176f575b8161175f60209383612199565b8101031261012c5751938a61164e565b3d9150611752565b61142e8b61233f565b5080516001600160a01b03908116906117988d61233f565b1614156115c8565b506117af60206114838a61233f565b0381865afa80156113e3576115a9915f916117cd575b5090506115a0565b6117e6915060203d6020116114f8576114ea8183612199565b8c6117c5565b5080611599565b3461012c575f36600319011261012c575f51602061298f5f395f51905f5254336001600160a01b039091160361182e5761182c33612821565b005b63118cdaa760e01b5f523360045260245ffd5b3461012c575f36600319011261012c57611859612801565b5f51602061298f5f395f51905f5280546001600160a01b03199081169091555f51602061292f5f395f51905f52805491821690555f906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461012c57604036600319011261012c576118d76121bb565b6024356001600160a01b0381169081900361012c575f51602061296f5f395f51905f52549160ff8360401c16159267ffffffffffffffff811680159081611b05575b6001149081611afb575b159081611af2575b50611ae35767ffffffffffffffff1981166001175f51602061296f5f395f51905f525583611ab7575b506001600160a01b03811615611a72578115611a22576119839061197661288c565b61197e61288c565b612821565b61198b61288c565b61199361288c565b61199b61288c565b60015f51602061294f5f395f51905f52556119b461257d565b80546001600160a01b03191690911790556119cb57005b68ff0000000000000000195f51602061296f5f395f51905f5254165f51602061296f5f395f51905f52557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b60405162461bcd60e51b815260206004820152602260248201527f56414d4d4d616e616765723a207a65726f20636f6c6c61746572616c456e67696044820152616e6560f01b6064820152608490fd5b60405162461bcd60e51b815260206004820152601760248201527f56414d4d4d616e616765723a207a65726f206f776e65720000000000000000006044820152606490fd5b68ffffffffffffffffff191668010000000000000001175f51602061296f5f395f51905f525583611954565b63f92ee8a960e01b5f5260045ffd5b9050158561192b565b303b159150611923565b859150611919565b3461012c57606036600319011261012c576024358060020b810361012c57604435908160020b820361012c57604091611b64916001611b4a61257d565b016004355f52602052835f20611b5f816125f9565b61261c565b82519182526020820152f35b3461012c576101a036600319011261012c57611b8b366121e5565b3660c3190160e0811261012c57611ba06125c1565b5f90670de0b6b3a76400006060840151044210156114ff57611bc183612512565b916001611bcc61257d565b5f858152910160205260409020936001600160a01b03611bea61257d565b541693611bf6866125f9565b338514906001600160a01b03611c0a612312565b16331480156120f4575b80156120a9575b611c249061236b565b6001600160a01b03611c34612328565b1615158061208a575b6120815760405163ba532a9160e01b81526004810188905294611c62602487016123b7565b610124356084870152610144356001600160a01b0381169081900361012c5760a4870152610164358060020b80910361012c5760c4870152610184358060020b80910361012c5760e48701526060866101048173__$08e89e547a556336527d5f207ab2ad924b$__5af49384156113e3575f975f975f9661203b575b50611cf9611cea612457565b611cf2612468565b908c61261c565b611d04969196612457565b96611d0d612468565b946040519661012088019188831067ffffffffffffffff8411176120275760609260405288521261012c5760405197611d4589612145565b60c4356001600160a01b038116810361012c57895260e435956001600160601b0387169788880361012c5760208b0188905261010435916001600160a01b038316830361012c578f92938f9460408e0152602083019c8d52604083019060020b8152606083019160020b825260808301925f845260a0810194855260c0810195865260e0810196875261010081019788526040519d8e91635f4d951360e01b835260048301905190611df691612479565b5180516001600160a01b0390811660c484015260208201516001600160601b031660e4840152604090910151166101049091015251600290810b6101248e01529051900b6101448c015251600f0b6101648b0152516101848a0152516101a4890152516101c4880152516101e487015261020486018190528580835a925f61022492602095f19586156113e3575f96611ff3575b5015611f7b575b50611e9d60c0996127b0565b92611ea6612312565b91507fb7da9012b9a9a5045da5937f4d0adf5059e86da9bffc00922c104f7f2a6b7b41610100611ed4612328565b93611edd612457565b611ee5612468565b602089015160020b9060018060a01b038a5116926040519860018060a01b0316895260020b602089015260020b60408801528960608801528d60808801528c60a08801528e87015260e086015260018060a01b031693a45160015f51602061294f5f395f51905f525560408051968752602087019590955293850152606084015260808301526001600160a01b031660a0820152f35b5f9996506020906064604051809c819363258e9ddd60e01b8352611fa1600484016123b7565b5af19889156113e3575f99611fbd575b50949794611e9d611e91565b98506020893d602011611feb575b81611fd860209383612199565b8101031261012c57975197611e9d611fb1565b3d9150611fcb565b9095506020813d60201161201f575b8161200f60209383612199565b8101031261012c5751948b611e8a565b3d9150612002565b634e487b7160e01b5f52604160045260245ffd5b9850945095506060873d606011612079575b8161205a60609383612199565b8101031261012c5786519560406020890151980151969796948a611cde565b3d915061204d565b8261142e612328565b5082516001600160a01b03908116906120a1612328565b161415611c3d565b506120b76020611483612312565b03818a5afa80156113e357611c24915f916120d5575b509050611c1b565b6120ee915060203d6020116114f8576114ea8183612199565b896120cd565b5081611c14565b3461012c5760c036600319011261012c5761211d612118366121e5565b612512565b600161212761257d565b01905f5260205260205f600b60408220015460020b13604051908152f35b6060810190811067ffffffffffffffff82111761202757604052565b60c0810190811067ffffffffffffffff82111761202757604052565b6080810190811067ffffffffffffffff82111761202757604052565b90601f8019910116810190811067ffffffffffffffff82111761202757604052565b600435906001600160a01b038216820361012c57565b35906001600160a01b038216820361012c57565b60c090600319011261012c57604051906121fe82612161565b816004356001600160a01b038116810361012c5781526024356001600160a01b038116810361012c57602082015260443560408201526064356060820152608435608082015260a435908160020b820361012c5760a00152565b9061018060031983011261012c57600460c08184031261012c5760a06040519161228183612161565b61228a816121d1565b8352612298602082016121d1565b60208401526040810135604084015260608101356060840152608081013560808401520135908160020b820361012c5760609160a08201529260c319011261012c5760c490610124358060020b810361012c5790610144358060020b810361012c5790610164356001600160801b038116810361012c5790565b60c4356001600160a01b038116810361012c5790565b610104356001600160a01b038116810361012c5790565b356001600160a01b038116810361012c5790565b9081602091031261012c5751801515810361012c5790565b1561237257565b60405162461bcd60e51b815260206004820152601960248201527f56414d4d4d616e616765723a20756e617574686f72697a6564000000000000006044820152606490fd5b60c4356001600160a01b0381169081900361012c57815260e4356001600160601b03811680910361012c576020820152610104356001600160a01b038116919082900361012c5760400152565b6001600160a01b03612415826121d1565b1682526020810135906001600160601b038216820361012c576001600160601b036040921660208401526124518260018060a01b0392016121d1565b16910152565b610164358060020b810361012c5790565b610184358060020b810361012c5790565b80516001600160a01b0390811683526020808301519091169083015260408082015190830152606080820151908301526080808201519083015260a09081015160020b910152565b356001600160601b038116810361012c5790565b6001600160a01b039091168152600291820b602082015291900b60408201526001600160801b039091166060820152608081019190915260a00190565b60018060a01b038151169060018060a01b0360208201511690604081015190606081015160a0608083015192015160020b92604051946020860196875260408601526060850152608084015260a083015260c082015260c0815261257760e082612199565b51902090565b604051602081017f44e57fd22033a0a4d7106c5aa4d69ee4a186fa406f641deecff253b57d716d938152602082526125b6604083612199565b9051902060ff191690565b60025f51602061294f5f395f51905f5254146125ea5760025f51602061294f5f395f51905f5255565b633ee5aeb560e01b5f5260045ffd5b600e01546001600160a01b03161561260d57565b63486aa30760e01b5f5260045ffd5b929160020b9060020b90808212156127855762010deb19821261275a5762010dec811361272f5761272c91600c8501600e86015460a01c60020b600a6126c7600989015460405161266c8161217d565b86815260208101918883526040820190868252606083019081528860020b5f528760205260405f2091845160020b60020b5f528860205260018060405f20955160020b965160020b925160020b9351940154940154946128cf565b97015490604051936126d88561217d565b80855260208501958652604085019182526060850192835260020b5f528260205260405f2092855160020b60020b5f5260205260028060405f209551810b9651810b9251810b9351940154940154946128cf565b90565b60405162461bcd60e51b815260206004820152600360248201526254554d60e81b6044820152606490fd5b60405162461bcd60e51b8152602060048201526003602482015262544c4d60e81b6044820152606490fd5b60405162461bcd60e51b8152602060048201526003602482015262544c5560e81b6044820152606490fd5b5f604080516127be81612145565b828152826020820152015260ff600e604051926127da84612145565b01546001600160a01b038116835260a081901c60020b602084015260b81c16604082015290565b5f51602061292f5f395f51905f52546001600160a01b0316330361182e57565b5f51602061298f5f395f51905f5280546001600160a01b03199081169091555f51602061292f5f395f51905f5280549182166001600160a01b0393841690811790915591167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3565b60ff5f51602061296f5f395f51905f525460401c16156128a857565b631afcd79f60e31b5f5260045ffd5b81810392915f13801582851316918412161761093b57565b929490939092600292830b920b821261291e57925b60020b131561290e57905b5f828201928312911290801582169115161761093b5761272c916128b7565b61291890836128b7565b906128ef565b61292890856128b7565b926128e456fe9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993009b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00a2646970667358221220e78dfc29d1ccb80a278eea46a3916c4e451676818c848460a1451d6467fd04a764736f6c634300081e0033f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00";
|
|
1008
|
+
|
|
1009
|
+
type VAMMManagerConstructorParams =
|
|
1010
|
+
| [linkLibraryAddresses: VAMMManagerLibraryAddresses, signer?: Signer]
|
|
1011
|
+
| ConstructorParameters<typeof ContractFactory>;
|
|
1012
|
+
|
|
1013
|
+
const isSuperArgs = (
|
|
1014
|
+
xs: VAMMManagerConstructorParams
|
|
1015
|
+
): xs is ConstructorParameters<typeof ContractFactory> => {
|
|
1016
|
+
return (
|
|
1017
|
+
typeof xs[0] === "string" ||
|
|
1018
|
+
(Array.isArray as (arg: any) => arg is readonly any[])(xs[0]) ||
|
|
1019
|
+
"_isInterface" in xs[0]
|
|
1020
|
+
);
|
|
1021
|
+
};
|
|
1022
|
+
|
|
1023
|
+
export class VAMMManager__factory extends ContractFactory {
|
|
1024
|
+
constructor(...args: VAMMManagerConstructorParams) {
|
|
1025
|
+
if (isSuperArgs(args)) {
|
|
1026
|
+
super(...args);
|
|
1027
|
+
} else {
|
|
1028
|
+
const [linkLibraryAddresses, signer] = args;
|
|
1029
|
+
super(
|
|
1030
|
+
_abi,
|
|
1031
|
+
VAMMManager__factory.linkBytecode(linkLibraryAddresses),
|
|
1032
|
+
signer
|
|
1033
|
+
);
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
static linkBytecode(
|
|
1038
|
+
linkLibraryAddresses: VAMMManagerLibraryAddresses
|
|
1039
|
+
): string {
|
|
1040
|
+
let linkedBytecode = _bytecode;
|
|
1041
|
+
|
|
1042
|
+
linkedBytecode = linkedBytecode.replace(
|
|
1043
|
+
new RegExp("__\\$08e89e547a556336527d5f207ab2ad924b\\$__", "g"),
|
|
1044
|
+
linkLibraryAddresses["src/core_libraries/VAMMLibrary.sol:VAMMLibrary"]
|
|
1045
|
+
.replace(/^0x/, "")
|
|
1046
|
+
.toLowerCase()
|
|
1047
|
+
);
|
|
1048
|
+
|
|
1049
|
+
return linkedBytecode;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
override getDeployTransaction(
|
|
1053
|
+
overrides?: NonPayableOverrides & { from?: string }
|
|
1054
|
+
): Promise<ContractDeployTransaction> {
|
|
1055
|
+
return super.getDeployTransaction(overrides || {});
|
|
1056
|
+
}
|
|
1057
|
+
override deploy(overrides?: NonPayableOverrides & { from?: string }) {
|
|
1058
|
+
return super.deploy(overrides || {}) as Promise<
|
|
1059
|
+
VAMMManager & {
|
|
1060
|
+
deploymentTransaction(): ContractTransactionResponse;
|
|
1061
|
+
}
|
|
1062
|
+
>;
|
|
1063
|
+
}
|
|
1064
|
+
override connect(runner: ContractRunner | null): VAMMManager__factory {
|
|
1065
|
+
return super.connect(runner) as VAMMManager__factory;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
static readonly bytecode = _bytecode;
|
|
1069
|
+
static readonly abi = _abi;
|
|
1070
|
+
static createInterface(): VAMMManagerInterface {
|
|
1071
|
+
return new Interface(_abi) as VAMMManagerInterface;
|
|
1072
|
+
}
|
|
1073
|
+
static connect(address: string, runner?: ContractRunner | null): VAMMManager {
|
|
1074
|
+
return new Contract(address, _abi, runner) as unknown as VAMMManager;
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
export interface VAMMManagerLibraryAddresses {
|
|
1079
|
+
["src/core_libraries/VAMMLibrary.sol:VAMMLibrary"]: string;
|
|
1080
|
+
}
|