@curvefi/api 2.63.4 → 2.63.6
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/lib/constants/abis/factory-tricrypto-mainnet.json +664 -0
- package/lib/constants/aliases.js +31 -19
- package/lib/curve.js +16 -12
- package/lib/factory/deploy.js +9 -4
- package/lib/factory/factory-api.js +1 -1
- package/lib/factory/factory-crypto.js +11 -12
- package/lib/factory/factory-tricrypto.js +16 -15
- package/lib/factory/factory-twocrypto.js +11 -12
- package/lib/factory/factory.js +13 -15
- package/lib/pools/PoolTemplate.js +4 -2
- package/lib/router.js +1 -1
- package/package.json +1 -1
- package/lib/constants/abis/gauge_factory_mainnet.json +0 -1
- /package/lib/constants/abis/{factory-tricrypto.json → factory-tricrypto-sidechain.json} +0 -0
- /package/lib/constants/abis/{gauge_factory_sidechain.json → gauge_factory/child_gauge_factory.json} +0 -0
- /package/lib/constants/abis/{gauge_factory_mainnet_for_fraxtal.json → gauge_factory/root_gauge_factory.json} +0 -0
|
@@ -0,0 +1,664 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "TricryptoPoolDeployed",
|
|
4
|
+
"inputs": [
|
|
5
|
+
{
|
|
6
|
+
"name": "pool",
|
|
7
|
+
"type": "address",
|
|
8
|
+
"indexed": false
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"name": "name",
|
|
12
|
+
"type": "string",
|
|
13
|
+
"indexed": false
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "symbol",
|
|
17
|
+
"type": "string",
|
|
18
|
+
"indexed": false
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "weth",
|
|
22
|
+
"type": "address",
|
|
23
|
+
"indexed": false
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "coins",
|
|
27
|
+
"type": "address[3]",
|
|
28
|
+
"indexed": false
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "math",
|
|
32
|
+
"type": "address",
|
|
33
|
+
"indexed": false
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "salt",
|
|
37
|
+
"type": "bytes32",
|
|
38
|
+
"indexed": false
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "packed_precisions",
|
|
42
|
+
"type": "uint256",
|
|
43
|
+
"indexed": false
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "packed_A_gamma",
|
|
47
|
+
"type": "uint256",
|
|
48
|
+
"indexed": false
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "packed_fee_params",
|
|
52
|
+
"type": "uint256",
|
|
53
|
+
"indexed": false
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "packed_rebalancing_params",
|
|
57
|
+
"type": "uint256",
|
|
58
|
+
"indexed": false
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "packed_prices",
|
|
62
|
+
"type": "uint256",
|
|
63
|
+
"indexed": false
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "deployer",
|
|
67
|
+
"type": "address",
|
|
68
|
+
"indexed": false
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"anonymous": false,
|
|
72
|
+
"type": "event"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "LiquidityGaugeDeployed",
|
|
76
|
+
"inputs": [
|
|
77
|
+
{
|
|
78
|
+
"name": "pool",
|
|
79
|
+
"type": "address",
|
|
80
|
+
"indexed": false
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "gauge",
|
|
84
|
+
"type": "address",
|
|
85
|
+
"indexed": false
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"anonymous": false,
|
|
89
|
+
"type": "event"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "UpdateFeeReceiver",
|
|
93
|
+
"inputs": [
|
|
94
|
+
{
|
|
95
|
+
"name": "_old_fee_receiver",
|
|
96
|
+
"type": "address",
|
|
97
|
+
"indexed": false
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "_new_fee_receiver",
|
|
101
|
+
"type": "address",
|
|
102
|
+
"indexed": false
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"anonymous": false,
|
|
106
|
+
"type": "event"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"name": "UpdatePoolImplementation",
|
|
110
|
+
"inputs": [
|
|
111
|
+
{
|
|
112
|
+
"name": "_implemention_id",
|
|
113
|
+
"type": "uint256",
|
|
114
|
+
"indexed": false
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "_old_pool_implementation",
|
|
118
|
+
"type": "address",
|
|
119
|
+
"indexed": false
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"name": "_new_pool_implementation",
|
|
123
|
+
"type": "address",
|
|
124
|
+
"indexed": false
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"anonymous": false,
|
|
128
|
+
"type": "event"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "UpdateGaugeImplementation",
|
|
132
|
+
"inputs": [
|
|
133
|
+
{
|
|
134
|
+
"name": "_old_gauge_implementation",
|
|
135
|
+
"type": "address",
|
|
136
|
+
"indexed": false
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "_new_gauge_implementation",
|
|
140
|
+
"type": "address",
|
|
141
|
+
"indexed": false
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
"anonymous": false,
|
|
145
|
+
"type": "event"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "UpdateMathImplementation",
|
|
149
|
+
"inputs": [
|
|
150
|
+
{
|
|
151
|
+
"name": "_old_math_implementation",
|
|
152
|
+
"type": "address",
|
|
153
|
+
"indexed": false
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "_new_math_implementation",
|
|
157
|
+
"type": "address",
|
|
158
|
+
"indexed": false
|
|
159
|
+
}
|
|
160
|
+
],
|
|
161
|
+
"anonymous": false,
|
|
162
|
+
"type": "event"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "UpdateViewsImplementation",
|
|
166
|
+
"inputs": [
|
|
167
|
+
{
|
|
168
|
+
"name": "_old_views_implementation",
|
|
169
|
+
"type": "address",
|
|
170
|
+
"indexed": false
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"name": "_new_views_implementation",
|
|
174
|
+
"type": "address",
|
|
175
|
+
"indexed": false
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
"anonymous": false,
|
|
179
|
+
"type": "event"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"name": "TransferOwnership",
|
|
183
|
+
"inputs": [
|
|
184
|
+
{
|
|
185
|
+
"name": "_old_owner",
|
|
186
|
+
"type": "address",
|
|
187
|
+
"indexed": false
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"name": "_new_owner",
|
|
191
|
+
"type": "address",
|
|
192
|
+
"indexed": false
|
|
193
|
+
}
|
|
194
|
+
],
|
|
195
|
+
"anonymous": false,
|
|
196
|
+
"type": "event"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"stateMutability": "nonpayable",
|
|
200
|
+
"type": "constructor",
|
|
201
|
+
"inputs": [
|
|
202
|
+
{
|
|
203
|
+
"name": "_fee_receiver",
|
|
204
|
+
"type": "address"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"name": "_admin",
|
|
208
|
+
"type": "address"
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
"outputs": []
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"stateMutability": "nonpayable",
|
|
215
|
+
"type": "function",
|
|
216
|
+
"name": "deploy_pool",
|
|
217
|
+
"inputs": [
|
|
218
|
+
{
|
|
219
|
+
"name": "_name",
|
|
220
|
+
"type": "string"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"name": "_symbol",
|
|
224
|
+
"type": "string"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"name": "_coins",
|
|
228
|
+
"type": "address[3]"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"name": "_weth",
|
|
232
|
+
"type": "address"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"name": "implementation_id",
|
|
236
|
+
"type": "uint256"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"name": "A",
|
|
240
|
+
"type": "uint256"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"name": "gamma",
|
|
244
|
+
"type": "uint256"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "mid_fee",
|
|
248
|
+
"type": "uint256"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"name": "out_fee",
|
|
252
|
+
"type": "uint256"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"name": "fee_gamma",
|
|
256
|
+
"type": "uint256"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"name": "allowed_extra_profit",
|
|
260
|
+
"type": "uint256"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"name": "adjustment_step",
|
|
264
|
+
"type": "uint256"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"name": "ma_exp_time",
|
|
268
|
+
"type": "uint256"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"name": "initial_prices",
|
|
272
|
+
"type": "uint256[2]"
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
"outputs": [
|
|
276
|
+
{
|
|
277
|
+
"name": "",
|
|
278
|
+
"type": "address"
|
|
279
|
+
}
|
|
280
|
+
]
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"stateMutability": "nonpayable",
|
|
284
|
+
"type": "function",
|
|
285
|
+
"name": "deploy_gauge",
|
|
286
|
+
"inputs": [
|
|
287
|
+
{
|
|
288
|
+
"name": "_pool",
|
|
289
|
+
"type": "address"
|
|
290
|
+
}
|
|
291
|
+
],
|
|
292
|
+
"outputs": [
|
|
293
|
+
{
|
|
294
|
+
"name": "",
|
|
295
|
+
"type": "address"
|
|
296
|
+
}
|
|
297
|
+
]
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"stateMutability": "nonpayable",
|
|
301
|
+
"type": "function",
|
|
302
|
+
"name": "set_fee_receiver",
|
|
303
|
+
"inputs": [
|
|
304
|
+
{
|
|
305
|
+
"name": "_fee_receiver",
|
|
306
|
+
"type": "address"
|
|
307
|
+
}
|
|
308
|
+
],
|
|
309
|
+
"outputs": []
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"stateMutability": "nonpayable",
|
|
313
|
+
"type": "function",
|
|
314
|
+
"name": "set_pool_implementation",
|
|
315
|
+
"inputs": [
|
|
316
|
+
{
|
|
317
|
+
"name": "_pool_implementation",
|
|
318
|
+
"type": "address"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"name": "_implementation_index",
|
|
322
|
+
"type": "uint256"
|
|
323
|
+
}
|
|
324
|
+
],
|
|
325
|
+
"outputs": []
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"stateMutability": "nonpayable",
|
|
329
|
+
"type": "function",
|
|
330
|
+
"name": "set_gauge_implementation",
|
|
331
|
+
"inputs": [
|
|
332
|
+
{
|
|
333
|
+
"name": "_gauge_implementation",
|
|
334
|
+
"type": "address"
|
|
335
|
+
}
|
|
336
|
+
],
|
|
337
|
+
"outputs": []
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"stateMutability": "nonpayable",
|
|
341
|
+
"type": "function",
|
|
342
|
+
"name": "set_views_implementation",
|
|
343
|
+
"inputs": [
|
|
344
|
+
{
|
|
345
|
+
"name": "_views_implementation",
|
|
346
|
+
"type": "address"
|
|
347
|
+
}
|
|
348
|
+
],
|
|
349
|
+
"outputs": []
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"stateMutability": "nonpayable",
|
|
353
|
+
"type": "function",
|
|
354
|
+
"name": "set_math_implementation",
|
|
355
|
+
"inputs": [
|
|
356
|
+
{
|
|
357
|
+
"name": "_math_implementation",
|
|
358
|
+
"type": "address"
|
|
359
|
+
}
|
|
360
|
+
],
|
|
361
|
+
"outputs": []
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"stateMutability": "nonpayable",
|
|
365
|
+
"type": "function",
|
|
366
|
+
"name": "commit_transfer_ownership",
|
|
367
|
+
"inputs": [
|
|
368
|
+
{
|
|
369
|
+
"name": "_addr",
|
|
370
|
+
"type": "address"
|
|
371
|
+
}
|
|
372
|
+
],
|
|
373
|
+
"outputs": []
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"stateMutability": "nonpayable",
|
|
377
|
+
"type": "function",
|
|
378
|
+
"name": "accept_transfer_ownership",
|
|
379
|
+
"inputs": [],
|
|
380
|
+
"outputs": []
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"stateMutability": "view",
|
|
384
|
+
"type": "function",
|
|
385
|
+
"name": "find_pool_for_coins",
|
|
386
|
+
"inputs": [
|
|
387
|
+
{
|
|
388
|
+
"name": "_from",
|
|
389
|
+
"type": "address"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"name": "_to",
|
|
393
|
+
"type": "address"
|
|
394
|
+
}
|
|
395
|
+
],
|
|
396
|
+
"outputs": [
|
|
397
|
+
{
|
|
398
|
+
"name": "",
|
|
399
|
+
"type": "address"
|
|
400
|
+
}
|
|
401
|
+
]
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"stateMutability": "view",
|
|
405
|
+
"type": "function",
|
|
406
|
+
"name": "find_pool_for_coins",
|
|
407
|
+
"inputs": [
|
|
408
|
+
{
|
|
409
|
+
"name": "_from",
|
|
410
|
+
"type": "address"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"name": "_to",
|
|
414
|
+
"type": "address"
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"name": "i",
|
|
418
|
+
"type": "uint256"
|
|
419
|
+
}
|
|
420
|
+
],
|
|
421
|
+
"outputs": [
|
|
422
|
+
{
|
|
423
|
+
"name": "",
|
|
424
|
+
"type": "address"
|
|
425
|
+
}
|
|
426
|
+
]
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"stateMutability": "view",
|
|
430
|
+
"type": "function",
|
|
431
|
+
"name": "get_coins",
|
|
432
|
+
"inputs": [
|
|
433
|
+
{
|
|
434
|
+
"name": "_pool",
|
|
435
|
+
"type": "address"
|
|
436
|
+
}
|
|
437
|
+
],
|
|
438
|
+
"outputs": [
|
|
439
|
+
{
|
|
440
|
+
"name": "",
|
|
441
|
+
"type": "address[3]"
|
|
442
|
+
}
|
|
443
|
+
]
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"stateMutability": "view",
|
|
447
|
+
"type": "function",
|
|
448
|
+
"name": "get_decimals",
|
|
449
|
+
"inputs": [
|
|
450
|
+
{
|
|
451
|
+
"name": "_pool",
|
|
452
|
+
"type": "address"
|
|
453
|
+
}
|
|
454
|
+
],
|
|
455
|
+
"outputs": [
|
|
456
|
+
{
|
|
457
|
+
"name": "",
|
|
458
|
+
"type": "uint256[3]"
|
|
459
|
+
}
|
|
460
|
+
]
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"stateMutability": "view",
|
|
464
|
+
"type": "function",
|
|
465
|
+
"name": "get_balances",
|
|
466
|
+
"inputs": [
|
|
467
|
+
{
|
|
468
|
+
"name": "_pool",
|
|
469
|
+
"type": "address"
|
|
470
|
+
}
|
|
471
|
+
],
|
|
472
|
+
"outputs": [
|
|
473
|
+
{
|
|
474
|
+
"name": "",
|
|
475
|
+
"type": "uint256[3]"
|
|
476
|
+
}
|
|
477
|
+
]
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
"stateMutability": "view",
|
|
481
|
+
"type": "function",
|
|
482
|
+
"name": "get_coin_indices",
|
|
483
|
+
"inputs": [
|
|
484
|
+
{
|
|
485
|
+
"name": "_pool",
|
|
486
|
+
"type": "address"
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"name": "_from",
|
|
490
|
+
"type": "address"
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"name": "_to",
|
|
494
|
+
"type": "address"
|
|
495
|
+
}
|
|
496
|
+
],
|
|
497
|
+
"outputs": [
|
|
498
|
+
{
|
|
499
|
+
"name": "",
|
|
500
|
+
"type": "uint256"
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"name": "",
|
|
504
|
+
"type": "uint256"
|
|
505
|
+
}
|
|
506
|
+
]
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"stateMutability": "view",
|
|
510
|
+
"type": "function",
|
|
511
|
+
"name": "get_gauge",
|
|
512
|
+
"inputs": [
|
|
513
|
+
{
|
|
514
|
+
"name": "_pool",
|
|
515
|
+
"type": "address"
|
|
516
|
+
}
|
|
517
|
+
],
|
|
518
|
+
"outputs": [
|
|
519
|
+
{
|
|
520
|
+
"name": "",
|
|
521
|
+
"type": "address"
|
|
522
|
+
}
|
|
523
|
+
]
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"stateMutability": "view",
|
|
527
|
+
"type": "function",
|
|
528
|
+
"name": "get_market_counts",
|
|
529
|
+
"inputs": [
|
|
530
|
+
{
|
|
531
|
+
"name": "coin_a",
|
|
532
|
+
"type": "address"
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
"name": "coin_b",
|
|
536
|
+
"type": "address"
|
|
537
|
+
}
|
|
538
|
+
],
|
|
539
|
+
"outputs": [
|
|
540
|
+
{
|
|
541
|
+
"name": "",
|
|
542
|
+
"type": "uint256"
|
|
543
|
+
}
|
|
544
|
+
]
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"stateMutability": "view",
|
|
548
|
+
"type": "function",
|
|
549
|
+
"name": "admin",
|
|
550
|
+
"inputs": [],
|
|
551
|
+
"outputs": [
|
|
552
|
+
{
|
|
553
|
+
"name": "",
|
|
554
|
+
"type": "address"
|
|
555
|
+
}
|
|
556
|
+
]
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
"stateMutability": "view",
|
|
560
|
+
"type": "function",
|
|
561
|
+
"name": "future_admin",
|
|
562
|
+
"inputs": [],
|
|
563
|
+
"outputs": [
|
|
564
|
+
{
|
|
565
|
+
"name": "",
|
|
566
|
+
"type": "address"
|
|
567
|
+
}
|
|
568
|
+
]
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"stateMutability": "view",
|
|
572
|
+
"type": "function",
|
|
573
|
+
"name": "fee_receiver",
|
|
574
|
+
"inputs": [],
|
|
575
|
+
"outputs": [
|
|
576
|
+
{
|
|
577
|
+
"name": "",
|
|
578
|
+
"type": "address"
|
|
579
|
+
}
|
|
580
|
+
]
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"stateMutability": "view",
|
|
584
|
+
"type": "function",
|
|
585
|
+
"name": "pool_implementations",
|
|
586
|
+
"inputs": [
|
|
587
|
+
{
|
|
588
|
+
"name": "arg0",
|
|
589
|
+
"type": "uint256"
|
|
590
|
+
}
|
|
591
|
+
],
|
|
592
|
+
"outputs": [
|
|
593
|
+
{
|
|
594
|
+
"name": "",
|
|
595
|
+
"type": "address"
|
|
596
|
+
}
|
|
597
|
+
]
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
"stateMutability": "view",
|
|
601
|
+
"type": "function",
|
|
602
|
+
"name": "gauge_implementation",
|
|
603
|
+
"inputs": [],
|
|
604
|
+
"outputs": [
|
|
605
|
+
{
|
|
606
|
+
"name": "",
|
|
607
|
+
"type": "address"
|
|
608
|
+
}
|
|
609
|
+
]
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
"stateMutability": "view",
|
|
613
|
+
"type": "function",
|
|
614
|
+
"name": "views_implementation",
|
|
615
|
+
"inputs": [],
|
|
616
|
+
"outputs": [
|
|
617
|
+
{
|
|
618
|
+
"name": "",
|
|
619
|
+
"type": "address"
|
|
620
|
+
}
|
|
621
|
+
]
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
"stateMutability": "view",
|
|
625
|
+
"type": "function",
|
|
626
|
+
"name": "math_implementation",
|
|
627
|
+
"inputs": [],
|
|
628
|
+
"outputs": [
|
|
629
|
+
{
|
|
630
|
+
"name": "",
|
|
631
|
+
"type": "address"
|
|
632
|
+
}
|
|
633
|
+
]
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
"stateMutability": "view",
|
|
637
|
+
"type": "function",
|
|
638
|
+
"name": "pool_count",
|
|
639
|
+
"inputs": [],
|
|
640
|
+
"outputs": [
|
|
641
|
+
{
|
|
642
|
+
"name": "",
|
|
643
|
+
"type": "uint256"
|
|
644
|
+
}
|
|
645
|
+
]
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
"stateMutability": "view",
|
|
649
|
+
"type": "function",
|
|
650
|
+
"name": "pool_list",
|
|
651
|
+
"inputs": [
|
|
652
|
+
{
|
|
653
|
+
"name": "arg0",
|
|
654
|
+
"type": "uint256"
|
|
655
|
+
}
|
|
656
|
+
],
|
|
657
|
+
"outputs": [
|
|
658
|
+
{
|
|
659
|
+
"name": "",
|
|
660
|
+
"type": "address"
|
|
661
|
+
}
|
|
662
|
+
]
|
|
663
|
+
}
|
|
664
|
+
]
|
package/lib/constants/aliases.js
CHANGED
|
@@ -2,8 +2,6 @@ import { lowerCaseValues } from "./utils.js";
|
|
|
2
2
|
export const ALIASES_ETHEREUM = lowerCaseValues({
|
|
3
3
|
"crv": "0xD533a949740bb3306d119CC777fa900bA034cd52",
|
|
4
4
|
"minter": '0xd061D61a4d941c39E5453435B6345Dc261C2fcE0',
|
|
5
|
-
"gauge_factory": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
6
|
-
"gauge_factory_fraxtal": "0xeF672bD94913CB6f1d2812a6e18c1fFdEd8eFf5c",
|
|
7
5
|
"voting_escrow": "0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2",
|
|
8
6
|
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc",
|
|
9
7
|
"fee_distributor_crvusd": "0xD16d5eC345Dd86Fb63C6a9C43c517210F1027914",
|
|
@@ -27,7 +25,8 @@ export const ALIASES_ETHEREUM = lowerCaseValues({
|
|
|
27
25
|
});
|
|
28
26
|
export const ALIASES_POLYGON = lowerCaseValues({
|
|
29
27
|
"crv": "0x172370d5cd63279efa6d502dab29171933a610af",
|
|
30
|
-
"
|
|
28
|
+
"child_gauge_factory": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
29
|
+
"root_gauge_factory": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
31
30
|
"voting_escrow": "0xb5acc710aede048600e10eedcefdf98d4abf4b1e",
|
|
32
31
|
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc",
|
|
33
32
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
@@ -47,7 +46,8 @@ export const ALIASES_POLYGON = lowerCaseValues({
|
|
|
47
46
|
});
|
|
48
47
|
export const ALIASES_FANTOM = lowerCaseValues({
|
|
49
48
|
"crv": "0x1E4F97b9f9F913c46F1632781732927B9019C68b",
|
|
50
|
-
"
|
|
49
|
+
"child_gauge_factory": "0xDb205f215f568ADf21b9573b62566f6d9a40bed6",
|
|
50
|
+
"root_gauge_factory": "0xDb205f215f568ADf21b9573b62566f6d9a40bed6",
|
|
51
51
|
"voting_escrow": "0xb75dca485e21a77e1b433ecacb74475fc67e259c",
|
|
52
52
|
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc",
|
|
53
53
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
@@ -67,7 +67,8 @@ export const ALIASES_FANTOM = lowerCaseValues({
|
|
|
67
67
|
});
|
|
68
68
|
export const ALIASES_AVALANCHE = lowerCaseValues({
|
|
69
69
|
"crv": "0x47536F17F4fF30e64A96a7555826b8f9e66ec468",
|
|
70
|
-
"
|
|
70
|
+
"child_gauge_factory": "0xDb205f215f568ADf21b9573b62566f6d9a40bed6",
|
|
71
|
+
"root_gauge_factory": "0xDb205f215f568ADf21b9573b62566f6d9a40bed6",
|
|
71
72
|
"voting_escrow": "0xc55837710bc500f1e3c7bb9dd1d51f7c5647e657",
|
|
72
73
|
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc",
|
|
73
74
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
@@ -87,7 +88,8 @@ export const ALIASES_AVALANCHE = lowerCaseValues({
|
|
|
87
88
|
});
|
|
88
89
|
export const ALIASES_ARBITRUM = lowerCaseValues({
|
|
89
90
|
"crv": "0x11cDb42B0EB46D95f990BeDD4695A6e3fA034978",
|
|
90
|
-
"
|
|
91
|
+
"child_gauge_factory": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
92
|
+
"root_gauge_factory": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
91
93
|
"voting_escrow": "0x98c80fa823759b642c3e02f40533c164f40727ae",
|
|
92
94
|
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc",
|
|
93
95
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
@@ -107,7 +109,8 @@ export const ALIASES_ARBITRUM = lowerCaseValues({
|
|
|
107
109
|
});
|
|
108
110
|
export const ALIASES_OPTIMISM = lowerCaseValues({
|
|
109
111
|
"crv": "0x0994206dfE8De6Ec6920FF4D779B0d950605Fb53",
|
|
110
|
-
"
|
|
112
|
+
"child_gauge_factory": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
113
|
+
"root_gauge_factory": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
111
114
|
"voting_escrow": "0x65a0b01756e837e6670634816e4f5b3a3ff21107",
|
|
112
115
|
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc",
|
|
113
116
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
@@ -129,8 +132,9 @@ export const ALIASES_OPTIMISM = lowerCaseValues({
|
|
|
129
132
|
});
|
|
130
133
|
export const ALIASES_XDAI = lowerCaseValues({
|
|
131
134
|
"crv": "0x712b3d230f3c1c19db860d80619288b1f0bdd0bd",
|
|
132
|
-
"
|
|
133
|
-
"
|
|
135
|
+
"child_gauge_factory": "0x7BE6BD57A319A7180f71552E58c9d32Da32b6f96",
|
|
136
|
+
"root_gauge_factory": "0x06471ED238306a427241B3eA81352244E77B004F",
|
|
137
|
+
"child_gauge_factory_old": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
134
138
|
"voting_escrow": "0xefde221f306152971d8e9f181bfe998447975810",
|
|
135
139
|
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc",
|
|
136
140
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
@@ -150,7 +154,8 @@ export const ALIASES_XDAI = lowerCaseValues({
|
|
|
150
154
|
});
|
|
151
155
|
export const ALIASES_MOONBEAM = lowerCaseValues({
|
|
152
156
|
"crv": "0x7C598c96D02398d89FbCb9d41Eab3DF0C16F227D",
|
|
153
|
-
"
|
|
157
|
+
"child_gauge_factory": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
158
|
+
"root_gauge_factory": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
154
159
|
"voting_escrow": "0x0000000000000000000000000000000000000000",
|
|
155
160
|
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc",
|
|
156
161
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
@@ -170,7 +175,7 @@ export const ALIASES_MOONBEAM = lowerCaseValues({
|
|
|
170
175
|
});
|
|
171
176
|
export const ALIASES_AURORA = lowerCaseValues({
|
|
172
177
|
"crv": "0x64D5BaF5ac030e2b7c435aDD967f787ae94D0205",
|
|
173
|
-
"
|
|
178
|
+
"child_gauge_factory": "0x0000000000000000000000000000000000000000",
|
|
174
179
|
"voting_escrow": "0x0000000000000000000000000000000000000000",
|
|
175
180
|
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc",
|
|
176
181
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
@@ -190,7 +195,8 @@ export const ALIASES_AURORA = lowerCaseValues({
|
|
|
190
195
|
});
|
|
191
196
|
export const ALIASES_KAVA = lowerCaseValues({
|
|
192
197
|
"crv": "0x64D5BaF5ac030e2b7c435aDD967f787ae94D0205",
|
|
193
|
-
"
|
|
198
|
+
"child_gauge_factory": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
199
|
+
"root_gauge_factory": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
194
200
|
"voting_escrow": "0x0000000000000000000000000000000000000000",
|
|
195
201
|
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc",
|
|
196
202
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
@@ -210,7 +216,8 @@ export const ALIASES_KAVA = lowerCaseValues({
|
|
|
210
216
|
});
|
|
211
217
|
export const ALIASES_CELO = lowerCaseValues({
|
|
212
218
|
"crv": "0x0a7432cF27F1aE3825c313F3C81e7D3efD7639aB",
|
|
213
|
-
"
|
|
219
|
+
"child_gauge_factory": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
220
|
+
"root_gauge_factory": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
214
221
|
"voting_escrow": "0x0000000000000000000000000000000000000000",
|
|
215
222
|
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc",
|
|
216
223
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
@@ -230,7 +237,7 @@ export const ALIASES_CELO = lowerCaseValues({
|
|
|
230
237
|
});
|
|
231
238
|
export const ALIASES_ZKSYNC = lowerCaseValues({
|
|
232
239
|
"crv": "0x5945932099f124194452a4c62d34bB37f16183B2",
|
|
233
|
-
"
|
|
240
|
+
"child_gauge_factory": "0x0000000000000000000000000000000000000000",
|
|
234
241
|
"voting_escrow": "0x0000000000000000000000000000000000000000",
|
|
235
242
|
"fee_distributor": "0x0000000000000000000000000000000000000000",
|
|
236
243
|
"gauge_controller": "0x0000000000000000000000000000000000000000",
|
|
@@ -250,7 +257,8 @@ export const ALIASES_ZKSYNC = lowerCaseValues({
|
|
|
250
257
|
});
|
|
251
258
|
export const ALIASES_BASE = lowerCaseValues({
|
|
252
259
|
"crv": "0x8Ee73c484A26e0A5df2Ee2a4960B789967dd0415",
|
|
253
|
-
"
|
|
260
|
+
"child_gauge_factory": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
261
|
+
"root_gauge_factory": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
254
262
|
"voting_escrow": "0x0000000000000000000000000000000000000000",
|
|
255
263
|
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc",
|
|
256
264
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
@@ -272,7 +280,8 @@ export const ALIASES_BASE = lowerCaseValues({
|
|
|
272
280
|
});
|
|
273
281
|
export const ALIASES_BSC = lowerCaseValues({
|
|
274
282
|
"crv": "0x8Ee73c484A26e0A5df2Ee2a4960B789967dd0415",
|
|
275
|
-
"
|
|
283
|
+
"child_gauge_factory": "0xDb205f215f568ADf21b9573b62566f6d9a40bed6",
|
|
284
|
+
"root_gauge_factory": "0xDb205f215f568ADf21b9573b62566f6d9a40bed6",
|
|
276
285
|
"voting_escrow": "0x0000000000000000000000000000000000000000",
|
|
277
286
|
"fee_distributor": "0x0000000000000000000000000000000000000000",
|
|
278
287
|
"gauge_controller": "0x0000000000000000000000000000000000000000",
|
|
@@ -292,7 +301,8 @@ export const ALIASES_BSC = lowerCaseValues({
|
|
|
292
301
|
});
|
|
293
302
|
export const ALIASES_FRAXTAL = lowerCaseValues({
|
|
294
303
|
"crv": "0x331B9182088e2A7d6D3Fe4742AbA1fB231aEcc56",
|
|
295
|
-
"
|
|
304
|
+
"child_gauge_factory": "0xeF672bD94913CB6f1d2812a6e18c1fFdEd8eFf5c",
|
|
305
|
+
"root_gauge_factory": "0xeF672bD94913CB6f1d2812a6e18c1fFdEd8eFf5c",
|
|
296
306
|
"voting_escrow": "0x0000000000000000000000000000000000000000",
|
|
297
307
|
"fee_distributor": "0x0000000000000000000000000000000000000000",
|
|
298
308
|
"gauge_controller": "0x0000000000000000000000000000000000000000",
|
|
@@ -312,7 +322,8 @@ export const ALIASES_FRAXTAL = lowerCaseValues({
|
|
|
312
322
|
});
|
|
313
323
|
export const ALIASES_XLAYER = lowerCaseValues({
|
|
314
324
|
"crv": "0x0000000000000000000000000000000000000000",
|
|
315
|
-
"
|
|
325
|
+
"child_gauge_factory": "0xeF672bD94913CB6f1d2812a6e18c1fFdEd8eFf5c",
|
|
326
|
+
"root_gauge_factory": "0xeF672bD94913CB6f1d2812a6e18c1fFdEd8eFf5c",
|
|
316
327
|
"voting_escrow": "0x0000000000000000000000000000000000000000",
|
|
317
328
|
"fee_distributor": "0x0000000000000000000000000000000000000000",
|
|
318
329
|
"gauge_controller": "0x0000000000000000000000000000000000000000",
|
|
@@ -332,7 +343,8 @@ export const ALIASES_XLAYER = lowerCaseValues({
|
|
|
332
343
|
});
|
|
333
344
|
export const ALIASES_MANTLE = lowerCaseValues({
|
|
334
345
|
"crv": "0x0000000000000000000000000000000000000000",
|
|
335
|
-
"
|
|
346
|
+
"child_gauge_factory": "0xeF672bD94913CB6f1d2812a6e18c1fFdEd8eFf5c",
|
|
347
|
+
"root_gauge_factory": "0xeF672bD94913CB6f1d2812a6e18c1fFdEd8eFf5c",
|
|
336
348
|
"voting_escrow": "0x0000000000000000000000000000000000000000",
|
|
337
349
|
"fee_distributor": "0x0000000000000000000000000000000000000000",
|
|
338
350
|
"gauge_controller": "0x0000000000000000000000000000000000000000",
|
package/lib/curve.js
CHANGED
|
@@ -16,9 +16,7 @@ import { getTricryptoFactoryPoolData } from "./factory/factory-tricrypto.js";
|
|
|
16
16
|
import ERC20Abi from './constants/abis/ERC20.json' assert { type: 'json' };
|
|
17
17
|
import cERC20Abi from './constants/abis/cERC20.json' assert { type: 'json' };
|
|
18
18
|
import yERC20Abi from './constants/abis/yERC20.json' assert { type: 'json' };
|
|
19
|
-
import
|
|
20
|
-
import gaugeFactoryForFraxtalABI from './constants/abis/gauge_factory_mainnet_for_fraxtal.json' assert { type: 'json' };
|
|
21
|
-
import gaugeFactorySidechainABI from './constants/abis/gauge_factory_sidechain.json' assert { type: 'json' };
|
|
19
|
+
import childGaugeFactoryABI from './constants/abis/gauge_factory/child_gauge_factory.json' assert { type: 'json' };
|
|
22
20
|
import minterMainnetABI from './constants/abis/minter_mainnet.json' assert { type: 'json' };
|
|
23
21
|
import votingEscrowABI from './constants/abis/votingescrow.json' assert { type: 'json' };
|
|
24
22
|
import anycallABI from './constants/abis/anycall.json' assert { type: 'json' };
|
|
@@ -39,7 +37,8 @@ import factoryEywaABI from './constants/abis/factory-eywa.json' assert { type: '
|
|
|
39
37
|
import factoryAdminABI from './constants/abis/factory-admin.json' assert { type: 'json' };
|
|
40
38
|
import cryptoFactoryABI from './constants/abis/factory-crypto.json' assert { type: 'json' };
|
|
41
39
|
import twocryptoFactoryABI from './constants/abis/factory-twocrypto-ng.json' assert { type: 'json' };
|
|
42
|
-
import
|
|
40
|
+
import tricryptoFactoryMainnetABI from './constants/abis/factory-tricrypto-mainnet.json' assert { type: 'json' };
|
|
41
|
+
import tricryptoFactorySidechainABI from './constants/abis/factory-tricrypto-sidechain.json' assert { type: 'json' };
|
|
43
42
|
import stableNgFactoryABI from './constants/abis/factory-stable-ng.json' assert { type: 'json' };
|
|
44
43
|
import gasOracleABI from './constants/abis/gas_oracle_optimism.json' assert { type: 'json' };
|
|
45
44
|
import gasOracleBlobABI from './constants/abis/gas_oracle_optimism_blob.json' assert { type: 'json' };
|
|
@@ -456,7 +455,7 @@ class Curve {
|
|
|
456
455
|
}
|
|
457
456
|
else {
|
|
458
457
|
this.constants.FACTORY_GAUGE_IMPLEMENTATIONS["factory-tricrypto"] =
|
|
459
|
-
yield this.contracts[this.constants.ALIASES.
|
|
458
|
+
yield this.contracts[this.constants.ALIASES.child_gauge_factory].contract.get_implementation(this.constantOptions);
|
|
460
459
|
}
|
|
461
460
|
});
|
|
462
461
|
this.fetchStableNgFactoryPools = (useApi = true) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -785,16 +784,16 @@ class Curve {
|
|
|
785
784
|
this.setContract(this.constants.NATIVE_TOKEN.wrappedAddress, ERC20Abi);
|
|
786
785
|
this.setContract(this.constants.ALIASES.crv, ERC20Abi);
|
|
787
786
|
this.constants.DECIMALS[this.constants.ALIASES.crv] = 18;
|
|
788
|
-
const _gaugeFactoryABI = this.chainId === 1 ? gaugeFactoryABI : gaugeFactorySidechainABI;
|
|
789
|
-
this.setContract(this.constants.ALIASES.gauge_factory, _gaugeFactoryABI);
|
|
790
|
-
if ("gauge_factory_old" in this.constants.ALIASES) {
|
|
791
|
-
this.setContract(this.constants.ALIASES.gauge_factory_old, _gaugeFactoryABI);
|
|
792
|
-
}
|
|
793
787
|
if (this.chainId === 1) {
|
|
794
788
|
this.setContract(this.constants.ALIASES.minter, minterMainnetABI);
|
|
795
|
-
this.setContract(this.constants.ALIASES.gauge_factory_fraxtal, gaugeFactoryForFraxtalABI);
|
|
796
789
|
this.setContract(this.constants.ALIASES.fee_distributor_crvusd, feeDistributorCrvUSDABI);
|
|
797
790
|
}
|
|
791
|
+
else {
|
|
792
|
+
this.setContract(this.constants.ALIASES.child_gauge_factory, childGaugeFactoryABI);
|
|
793
|
+
if ("child_gauge_factory_old" in this.constants.ALIASES) {
|
|
794
|
+
this.setContract(this.constants.ALIASES.child_gauge_factory_old, childGaugeFactoryABI);
|
|
795
|
+
}
|
|
796
|
+
}
|
|
798
797
|
this.setContract(this.constants.ALIASES.voting_escrow, votingEscrowABI);
|
|
799
798
|
this.setContract(this.constants.ALIASES.fee_distributor, feeDistributorABI);
|
|
800
799
|
this.setContract(this.constants.ALIASES.gauge_controller, gaugeControllerABI);
|
|
@@ -820,7 +819,12 @@ class Curve {
|
|
|
820
819
|
this.setContract(this.constants.ALIASES.eywa_factory, factoryEywaABI);
|
|
821
820
|
this.setContract(this.constants.ALIASES.crypto_factory, cryptoFactoryABI);
|
|
822
821
|
this.setContract(this.constants.ALIASES.twocrypto_factory, twocryptoFactoryABI);
|
|
823
|
-
|
|
822
|
+
if (this.chainId == 1) {
|
|
823
|
+
this.setContract(this.constants.ALIASES.tricrypto_factory, tricryptoFactoryMainnetABI);
|
|
824
|
+
}
|
|
825
|
+
else {
|
|
826
|
+
this.setContract(this.constants.ALIASES.tricrypto_factory, tricryptoFactorySidechainABI);
|
|
827
|
+
}
|
|
824
828
|
this.setContract(this.constants.ALIASES.stable_ng_factory, stableNgFactoryABI);
|
|
825
829
|
this.setContract(this.constants.ALIASES.anycall, anycallABI);
|
|
826
830
|
this.setContract(this.constants.ALIASES.voting_escrow_oracle, this.chainId === 1 ? votingEscrowOracleEthABI : votingEscrowOracleABI);
|
package/lib/factory/deploy.js
CHANGED
|
@@ -8,11 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { ethers, Contract, Typed } from "ethers";
|
|
11
|
-
import { curve } from "../curve.js";
|
|
11
|
+
import { curve, NETWORK_CONSTANTS } from "../curve.js";
|
|
12
12
|
import { getPool } from "../pools/index.js";
|
|
13
13
|
import { parseUnits, BN, mulBy1_3, getPoolIdBySwapAddress, DIGas, smartNumber } from '../utils.js';
|
|
14
14
|
import CurveLpTokenV5ABI from "../constants/abis/curve_lp_token_v5.json" assert { type: 'json' };
|
|
15
15
|
import Plain2ETHOracleABIABI from "../constants/abis/factory-v2/Plain2ETHOracle.json" assert { type: 'json' };
|
|
16
|
+
import rootGaugeFactoryABI from '../constants/abis/gauge_factory/root_gauge_factory.json' assert { type: 'json' };
|
|
16
17
|
import { tricryptoDeployImplementations } from "../constants/tricryptoDeployImplementations.js";
|
|
17
18
|
// ------- STABLE PLAIN POOLS -------
|
|
18
19
|
const _deployStablePlainPool = (name, symbol, coins, A, fee, // %
|
|
@@ -547,7 +548,7 @@ const _deployGauge = (pool, factory, estimateGas) => __awaiter(void 0, void 0, v
|
|
|
547
548
|
const _deployGaugeSidechain = (pool, salt, estimateGas) => __awaiter(void 0, void 0, void 0, function* () {
|
|
548
549
|
if (curve.chainId === 1)
|
|
549
550
|
throw Error("There is no deployGaugeSidechain method on ethereum network");
|
|
550
|
-
const contract = curve.contracts[curve.constants.ALIASES.
|
|
551
|
+
const contract = curve.contracts[curve.constants.ALIASES.child_gauge_factory].contract;
|
|
551
552
|
const _salt = ethers.encodeBytes32String(salt);
|
|
552
553
|
const gas = yield contract.deploy_gauge.estimateGas(pool, Typed.bytes32(_salt), curve.signerAddress, curve.constantOptions);
|
|
553
554
|
if (estimateGas)
|
|
@@ -559,7 +560,9 @@ const _deployGaugeSidechain = (pool, salt, estimateGas) => __awaiter(void 0, voi
|
|
|
559
560
|
const _deployGaugeMirror = (chainId, salt, estimateGas) => __awaiter(void 0, void 0, void 0, function* () {
|
|
560
561
|
if (curve.chainId !== 1)
|
|
561
562
|
throw Error("There is no deployGaugeMirror method on sidechain network");
|
|
562
|
-
const
|
|
563
|
+
const rootGaugeFactory = NETWORK_CONSTANTS[chainId].root_gauge_factory;
|
|
564
|
+
curve.setContract(rootGaugeFactory, rootGaugeFactoryABI);
|
|
565
|
+
const contract = curve.contracts[rootGaugeFactory].contract;
|
|
563
566
|
const _salt = ethers.encodeBytes32String(salt);
|
|
564
567
|
const gas = yield contract.deploy_gauge.estimateGas(chainId, Typed.bytes32(_salt), curve.constantOptions);
|
|
565
568
|
if (estimateGas)
|
|
@@ -593,7 +596,9 @@ export const getDeployedGaugeMirrorAddressByTx = (tx) => __awaiter(void 0, void
|
|
|
593
596
|
export const getDeployedGaugeMirrorAddress = (chainId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
594
597
|
if (curve.chainId !== 1)
|
|
595
598
|
throw Error("There is no getDeployedGaugeMirrorAddress method on sidechain network");
|
|
596
|
-
const
|
|
599
|
+
const rootGaugeFactory = NETWORK_CONSTANTS[chainId].root_gauge_factory;
|
|
600
|
+
curve.setContract(rootGaugeFactory, rootGaugeFactoryABI);
|
|
601
|
+
const contract = curve.contracts[rootGaugeFactory].contract;
|
|
597
602
|
const gaugeCount = yield contract.get_gauge_count(chainId);
|
|
598
603
|
const currentIndex = Number(gaugeCount) - 1;
|
|
599
604
|
return yield contract.get_gauge(chainId, currentIndex);
|
|
@@ -95,7 +95,7 @@ const getSwapAbiByFactoryType = (factoryType, pool) => {
|
|
|
95
95
|
const map = {
|
|
96
96
|
"factory-crypto": cryptoFactorySwapABI,
|
|
97
97
|
"factory-twocrypto": twocryptoFactorySwapABI,
|
|
98
|
-
"
|
|
98
|
+
"factory-tricrypto": isETHDisabled ? tricryptoFactoryEthDisabledSwapABI : tricryptoFactorySwapABI,
|
|
99
99
|
};
|
|
100
100
|
return map[factoryType];
|
|
101
101
|
};
|
|
@@ -68,11 +68,10 @@ function _getLpTokenMap(factorySwapAddresses) {
|
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
function getPoolsData(factorySwapAddresses) {
|
|
71
|
-
var _a;
|
|
72
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
73
72
|
const factoryMulticallContract = this.contracts[this.constants.ALIASES.crypto_factory].multicallContract;
|
|
74
|
-
const
|
|
75
|
-
const
|
|
73
|
+
const isChildGaugeFactoryNull = curve.chainId !== 1 && this.constants.ALIASES.child_gauge_factory === curve.constants.ZERO_ADDRESS;
|
|
74
|
+
const isChildGaugeFactoryOldNull = !("child_gauge_factory_old" in this.constants.ALIASES);
|
|
76
75
|
const calls = [];
|
|
77
76
|
if (this.chainId === 1) {
|
|
78
77
|
for (const addr of factorySwapAddresses) {
|
|
@@ -82,24 +81,24 @@ function getPoolsData(factorySwapAddresses) {
|
|
|
82
81
|
}
|
|
83
82
|
}
|
|
84
83
|
else {
|
|
85
|
-
const gaugeFactoryMulticallContract = this.contracts[this.constants.ALIASES.gauge_factory].multicallContract;
|
|
86
|
-
const gaugeFactoryOldMulticallContract = this.contracts[(_a = this.constants.ALIASES.gauge_factory_old) !== null && _a !== void 0 ? _a : curve.constants.ZERO_ADDRESS].multicallContract;
|
|
87
84
|
const LpTokenMap = yield _getLpTokenMap.call(this, factorySwapAddresses);
|
|
88
85
|
for (const addr of factorySwapAddresses) {
|
|
89
86
|
calls.push(factoryMulticallContract.get_token(addr));
|
|
90
|
-
if (!
|
|
91
|
-
calls.push(
|
|
92
|
-
|
|
93
|
-
|
|
87
|
+
if (!isChildGaugeFactoryNull) {
|
|
88
|
+
calls.push(this.contracts[this.constants.ALIASES.child_gauge_factory].multicallContract.get_gauge_from_lp_token(LpTokenMap[addr]));
|
|
89
|
+
}
|
|
90
|
+
if (!isChildGaugeFactoryOldNull) {
|
|
91
|
+
calls.push(this.contracts[this.constants.ALIASES.child_gauge_factory_old].multicallContract.get_gauge_from_lp_token(LpTokenMap[addr]));
|
|
92
|
+
}
|
|
94
93
|
calls.push(factoryMulticallContract.get_coins(addr));
|
|
95
94
|
}
|
|
96
95
|
}
|
|
97
96
|
const res = yield this.multicallProvider.all(calls);
|
|
98
|
-
if (
|
|
97
|
+
if (isChildGaugeFactoryNull || isChildGaugeFactoryOldNull) {
|
|
99
98
|
for (let index = 0; index < res.length; index++) {
|
|
100
|
-
if (
|
|
99
|
+
if (isChildGaugeFactoryNull && index % 4 == 1)
|
|
101
100
|
res.splice(index, 0, curve.constants.ZERO_ADDRESS);
|
|
102
|
-
if (
|
|
101
|
+
if (isChildGaugeFactoryOldNull && index % 4 == 2)
|
|
103
102
|
res.splice(index, 0, curve.constants.ZERO_ADDRESS);
|
|
104
103
|
}
|
|
105
104
|
}
|
|
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { curve } from "../curve.js";
|
|
11
11
|
import ERC20ABI from "../constants/abis/ERC20.json" assert { type: 'json' };
|
|
12
12
|
import tricryptoFactorySwapABI from "../constants/abis/factory-tricrypto/factory-tricrypto-pool.json" assert { type: 'json' };
|
|
13
|
+
import tricryptoFactoryEthDisabledSwapABI from "../constants/abis/factory-tricrypto/factory-tricrypto-pool-eth-disabled.json" assert { type: 'json' };
|
|
13
14
|
import factoryGaugeABI from "../constants/abis/gauge_factory.json" assert { type: 'json' };
|
|
14
15
|
import gaugeChildABI from "../constants/abis/gauge_child.json" assert { type: 'json' };
|
|
15
16
|
import { tricryptoDeployImplementations } from "../constants/tricryptoDeployImplementations.js";
|
|
@@ -47,37 +48,37 @@ function _handleCoinAddresses(coinAddresses) {
|
|
|
47
48
|
return coinAddresses.map((addresses) => addresses.map((addr) => this.chainId === 137 && addr === "0x0000000000000000000000000000000000001010" ? this.constants.NATIVE_TOKEN.wrappedAddress : addr.toLowerCase()));
|
|
48
49
|
}
|
|
49
50
|
function getPoolsData(factorySwapAddresses) {
|
|
50
|
-
var _a;
|
|
51
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52
52
|
const factoryMulticallContract = this.contracts[this.constants.ALIASES.tricrypto_factory].multicallContract;
|
|
53
|
-
const
|
|
54
|
-
const
|
|
53
|
+
const isChildGaugeFactoryNull = curve.chainId !== 1 && this.constants.ALIASES.child_gauge_factory === curve.constants.ZERO_ADDRESS;
|
|
54
|
+
const isChildGaugeFactoryOldNull = !("child_gauge_factory_old" in this.constants.ALIASES);
|
|
55
55
|
const calls = [];
|
|
56
56
|
if (this.chainId === 1) {
|
|
57
57
|
for (const addr of factorySwapAddresses) {
|
|
58
58
|
calls.push(factoryMulticallContract.get_gauge(addr));
|
|
59
59
|
calls.push(factoryMulticallContract.get_coins(addr));
|
|
60
|
-
calls.push(factoryMulticallContract.get_implementation_address(addr));
|
|
61
60
|
}
|
|
62
61
|
}
|
|
63
62
|
else {
|
|
64
|
-
const gaugeFactoryMulticallContract = this.contracts[this.constants.ALIASES.gauge_factory].multicallContract;
|
|
65
|
-
const gaugeFactoryOldMulticallContract = this.contracts[(_a = this.constants.ALIASES.gauge_factory_old) !== null && _a !== void 0 ? _a : curve.constants.ZERO_ADDRESS].multicallContract;
|
|
66
63
|
for (const addr of factorySwapAddresses) {
|
|
67
|
-
if (!
|
|
68
|
-
calls.push(
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
if (!isChildGaugeFactoryNull) {
|
|
65
|
+
calls.push(this.contracts[this.constants.ALIASES.child_gauge_factory].multicallContract.get_gauge_from_lp_token(addr));
|
|
66
|
+
}
|
|
67
|
+
if (!isChildGaugeFactoryOldNull) {
|
|
68
|
+
calls.push(this.contracts[this.constants.ALIASES.child_gauge_factory_old].multicallContract.get_gauge_from_lp_token(addr));
|
|
69
|
+
}
|
|
71
70
|
calls.push(factoryMulticallContract.get_coins(addr));
|
|
72
71
|
calls.push(factoryMulticallContract.get_implementation_address(addr));
|
|
73
72
|
}
|
|
74
73
|
}
|
|
75
74
|
const res = yield this.multicallProvider.all(calls);
|
|
76
|
-
if (
|
|
75
|
+
if (isChildGaugeFactoryNull || isChildGaugeFactoryOldNull || this.chainId === 1) {
|
|
77
76
|
for (let index = 0; index < res.length; index++) {
|
|
78
|
-
if (
|
|
77
|
+
if (isChildGaugeFactoryNull && index % 4 == 0)
|
|
78
|
+
res.splice(index, 0, curve.constants.ZERO_ADDRESS);
|
|
79
|
+
if (isChildGaugeFactoryOldNull && index % 4 == 1)
|
|
79
80
|
res.splice(index, 0, curve.constants.ZERO_ADDRESS);
|
|
80
|
-
if (
|
|
81
|
+
if (this.chainId === 1 && index % 4 == 3)
|
|
81
82
|
res.splice(index, 0, curve.constants.ZERO_ADDRESS);
|
|
82
83
|
}
|
|
83
84
|
}
|
|
@@ -186,8 +187,8 @@ export function getTricryptoFactoryPoolData(fromIdx = 0, swapAddress) {
|
|
|
186
187
|
const TRICRYPTO_FACTORY_POOLS_DATA = {};
|
|
187
188
|
const nativeToken = this.constants.NATIVE_TOKEN;
|
|
188
189
|
for (let i = 0; i < poolIds.length; i++) {
|
|
190
|
+
const isETHEnabled = this.chainId === 1 || implementationAddresses[i] === tricryptoDeployImplementations[curve.chainId].amm_native_transfers_enabled;
|
|
189
191
|
const underlyingCoinAddresses = coinAddresses[i].map((addr) => {
|
|
190
|
-
const isETHEnabled = implementationAddresses[i] === tricryptoDeployImplementations[curve.chainId].amm_native_transfers_enabled;
|
|
191
192
|
if (isETHEnabled) {
|
|
192
193
|
return addr === nativeToken.wrappedAddress ? nativeToken.address : addr;
|
|
193
194
|
}
|
|
@@ -212,7 +213,7 @@ export function getTricryptoFactoryPoolData(fromIdx = 0, swapAddress) {
|
|
|
212
213
|
wrapped_coin_addresses: coinAddresses[i],
|
|
213
214
|
underlying_decimals: [...underlyingCoinAddresses.map((addr) => coinAddressDecimalsDict[addr])],
|
|
214
215
|
wrapped_decimals: [...coinAddresses[i].map((addr) => coinAddressDecimalsDict[addr])],
|
|
215
|
-
swap_abi: tricryptoFactorySwapABI,
|
|
216
|
+
swap_abi: isETHEnabled ? tricryptoFactorySwapABI : tricryptoFactoryEthDisabledSwapABI,
|
|
216
217
|
gauge_abi: this.chainId === 1 ? factoryGaugeABI : gaugeChildABI,
|
|
217
218
|
is_ng: true,
|
|
218
219
|
};
|
|
@@ -46,11 +46,10 @@ function _handleCoinAddresses(coinAddresses) {
|
|
|
46
46
|
return coinAddresses.map((addresses) => addresses.map((addr) => this.chainId === 137 && addr === "0x0000000000000000000000000000000000001010" ? this.constants.NATIVE_TOKEN.wrappedAddress : addr.toLowerCase()));
|
|
47
47
|
}
|
|
48
48
|
function getPoolsData(factorySwapAddresses) {
|
|
49
|
-
var _a;
|
|
50
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
51
50
|
const factoryMulticallContract = this.contracts[this.constants.ALIASES.twocrypto_factory].multicallContract;
|
|
52
|
-
const
|
|
53
|
-
const
|
|
51
|
+
const isChildGaugeFactoryNull = curve.chainId !== 1 && this.constants.ALIASES.child_gauge_factory === curve.constants.ZERO_ADDRESS;
|
|
52
|
+
const isChildGaugeFactoryOldNull = !("child_gauge_factory_old" in this.constants.ALIASES);
|
|
54
53
|
const calls = [];
|
|
55
54
|
if (this.chainId === 1) {
|
|
56
55
|
for (const addr of factorySwapAddresses) {
|
|
@@ -59,22 +58,22 @@ function getPoolsData(factorySwapAddresses) {
|
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
60
|
else {
|
|
62
|
-
const gaugeFactoryMulticallContract = this.contracts[this.constants.ALIASES.gauge_factory].multicallContract;
|
|
63
|
-
const gaugeFactoryOldMulticallContract = this.contracts[(_a = this.constants.ALIASES.gauge_factory_old) !== null && _a !== void 0 ? _a : curve.constants.ZERO_ADDRESS].multicallContract;
|
|
64
61
|
for (const addr of factorySwapAddresses) {
|
|
65
|
-
if (!
|
|
66
|
-
calls.push(
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
if (!isChildGaugeFactoryNull) {
|
|
63
|
+
calls.push(this.contracts[this.constants.ALIASES.child_gauge_factory].multicallContract.get_gauge_from_lp_token(addr));
|
|
64
|
+
}
|
|
65
|
+
if (!isChildGaugeFactoryOldNull) {
|
|
66
|
+
calls.push(this.contracts[this.constants.ALIASES.child_gauge_factory_old].multicallContract.get_gauge_from_lp_token(addr));
|
|
67
|
+
}
|
|
69
68
|
calls.push(factoryMulticallContract.get_coins(addr));
|
|
70
69
|
}
|
|
71
70
|
}
|
|
72
71
|
const res = yield this.multicallProvider.all(calls);
|
|
73
|
-
if (
|
|
72
|
+
if (isChildGaugeFactoryNull || isChildGaugeFactoryOldNull) {
|
|
74
73
|
for (let index = 0; index < res.length; index++) {
|
|
75
|
-
if (
|
|
74
|
+
if (isChildGaugeFactoryNull && index % 3 == 0)
|
|
76
75
|
res.splice(index, 0, curve.constants.ZERO_ADDRESS);
|
|
77
|
-
if (
|
|
76
|
+
if (isChildGaugeFactoryOldNull && index % 3 == 1)
|
|
78
77
|
res.splice(index, 0, curve.constants.ZERO_ADDRESS);
|
|
79
78
|
}
|
|
80
79
|
}
|
package/lib/factory/factory.js
CHANGED
|
@@ -106,14 +106,11 @@ function _handleCoinAddresses(coinAddresses) {
|
|
|
106
106
|
.map((addr) => this.chainId === 137 && addr === "0x0000000000000000000000000000000000001010" ? this.constants.NATIVE_TOKEN.address : addr.toLowerCase()));
|
|
107
107
|
}
|
|
108
108
|
function getPoolsData(factorySwapAddresses, factoryAddress) {
|
|
109
|
-
var _a;
|
|
110
109
|
return __awaiter(this, void 0, void 0, function* () {
|
|
111
110
|
const factoryMulticallContract = this.contracts[factoryAddress].multicallContract;
|
|
112
|
-
const
|
|
113
|
-
const
|
|
111
|
+
const isChildGaugeFactoryNull = curve.chainId !== 1 && this.constants.ALIASES.child_gauge_factory === curve.constants.ZERO_ADDRESS;
|
|
112
|
+
const isChildGaugeFactoryOldNull = !("child_gauge_factory_old" in this.constants.ALIASES);
|
|
114
113
|
const isStableNgFactory = factoryAddress === this.constants.ALIASES['stable_ng_factory'];
|
|
115
|
-
const gaugeFactoryContract = this.contracts[this.constants.ALIASES.gauge_factory].multicallContract;
|
|
116
|
-
const gaugeFactoryOldContract = this.contracts[(_a = this.constants.ALIASES.gauge_factory_old) !== null && _a !== void 0 ? _a : curve.constants.ZERO_ADDRESS].multicallContract;
|
|
117
114
|
const calls = [];
|
|
118
115
|
for (const addr of factorySwapAddresses) {
|
|
119
116
|
const tempSwapContract = new MulticallContract(addr, ERC20ABI);
|
|
@@ -121,26 +118,27 @@ function getPoolsData(factorySwapAddresses, factoryAddress) {
|
|
|
121
118
|
if (this.chainId === 1) {
|
|
122
119
|
calls.push(factoryMulticallContract.get_gauge(addr));
|
|
123
120
|
}
|
|
124
|
-
else
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
121
|
+
else {
|
|
122
|
+
if (!isChildGaugeFactoryNull) {
|
|
123
|
+
calls.push(this.contracts[this.constants.ALIASES.child_gauge_factory].multicallContract.get_gauge_from_lp_token(addr));
|
|
124
|
+
}
|
|
125
|
+
if (!isChildGaugeFactoryOldNull) {
|
|
126
|
+
calls.push(this.contracts[this.constants.ALIASES.child_gauge_factory_old].multicallContract.get_gauge_from_lp_token(addr));
|
|
127
|
+
}
|
|
129
128
|
}
|
|
130
|
-
if (!isStableNgFactory)
|
|
129
|
+
if (!isStableNgFactory)
|
|
131
130
|
calls.push(factoryMulticallContract.get_pool_asset_type(addr));
|
|
132
|
-
}
|
|
133
131
|
calls.push(tempSwapContract.symbol());
|
|
134
132
|
calls.push(tempSwapContract.name());
|
|
135
133
|
calls.push(factoryMulticallContract.is_meta(addr));
|
|
136
134
|
calls.push(factoryMulticallContract.get_coins(addr));
|
|
137
135
|
}
|
|
138
136
|
const res = yield this.multicallProvider.all(calls);
|
|
139
|
-
if (
|
|
137
|
+
if (isChildGaugeFactoryNull || isChildGaugeFactoryOldNull || isStableNgFactory) {
|
|
140
138
|
for (let index = 0; index < res.length; index++) {
|
|
141
|
-
if (
|
|
139
|
+
if (isChildGaugeFactoryNull && index % 8 == 1)
|
|
142
140
|
res.splice(index, 0, curve.constants.ZERO_ADDRESS);
|
|
143
|
-
if (
|
|
141
|
+
if (isChildGaugeFactoryOldNull && index % 8 == 2)
|
|
144
142
|
res.splice(index, 0, curve.constants.ZERO_ADDRESS);
|
|
145
143
|
if (isStableNgFactory && index % 8 == 3)
|
|
146
144
|
res.splice(index, 0, -1);
|
|
@@ -1198,7 +1198,7 @@ export class PoolTemplate {
|
|
|
1198
1198
|
return Number(yield curve.contracts[curve.constants.ALIASES.minter].contract.mint.estimateGas(this.gauge.address, curve.constantOptions));
|
|
1199
1199
|
}
|
|
1200
1200
|
else {
|
|
1201
|
-
return smartNumber(yield curve.contracts[curve.constants.ALIASES.
|
|
1201
|
+
return smartNumber(yield curve.contracts[curve.constants.ALIASES.child_gauge_factory].contract.mint.estimateGas(this.gauge.address, curve.constantOptions));
|
|
1202
1202
|
}
|
|
1203
1203
|
});
|
|
1204
1204
|
}
|
|
@@ -1206,7 +1206,9 @@ export class PoolTemplate {
|
|
|
1206
1206
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1207
1207
|
if (this.rewardsOnly())
|
|
1208
1208
|
throw Error(`${this.name} has Rewards-Only Gauge. Use claimRewards instead`);
|
|
1209
|
-
const contract = curve.chainId === 1 ?
|
|
1209
|
+
const contract = curve.chainId === 1 ?
|
|
1210
|
+
curve.contracts[curve.constants.ALIASES.minter].contract :
|
|
1211
|
+
curve.contracts[curve.constants.ALIASES.child_gauge_factory].contract;
|
|
1210
1212
|
yield curve.updateFeeData();
|
|
1211
1213
|
const gasLimit = mulBy1_3(DIGas(yield contract.mint.estimateGas(this.gauge.address, curve.constantOptions)));
|
|
1212
1214
|
return (yield contract.mint(this.gauge.address, Object.assign(Object.assign({}, curve.options), { gasLimit }))).hash;
|
package/lib/router.js
CHANGED
|
@@ -46,7 +46,7 @@ const _buildRouteGraph = memoize(() => __awaiter(void 0, void 0, void 0, functio
|
|
|
46
46
|
return runWorker(routeGraphWorkerCode, routeGraphWorker, Object.assign({ type: 'createRouteGraph' }, input));
|
|
47
47
|
}), {
|
|
48
48
|
promise: true,
|
|
49
|
-
maxAge: 5 * 1000, // 5m
|
|
49
|
+
maxAge: 5 * 60 * 1000, // 5m
|
|
50
50
|
});
|
|
51
51
|
const _findRoutes = (inputCoinAddress, outputCoinAddress) => __awaiter(void 0, void 0, void 0, function* () {
|
|
52
52
|
const routerGraph = yield _buildRouteGraph();
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[{ "name": "BridgerUpdated", "inputs": [{ "name": "_chain_id", "type": "uint256", "indexed": true }, { "name": "_old_bridger", "type": "address", "indexed": false }, { "name": "_new_bridger", "type": "address", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "DeployedGauge", "inputs": [{ "name": "_implementation", "type": "address", "indexed": true }, { "name": "_chain_id", "type": "uint256", "indexed": true }, { "name": "_deployer", "type": "address", "indexed": true }, { "name": "_salt", "type": "bytes32", "indexed": false }, { "name": "_gauge", "type": "address", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "TransferOwnership", "inputs": [{ "name": "_old_owner", "type": "address", "indexed": false }, { "name": "_new_owner", "type": "address", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "UpdateCallProxy", "inputs": [{ "name": "_old_call_proxy", "type": "address", "indexed": false }, { "name": "_new_call_proxy", "type": "address", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "UpdateImplementation", "inputs": [{ "name": "_old_implementation", "type": "address", "indexed": false }, { "name": "_new_implementation", "type": "address", "indexed": false }], "anonymous": false, "type": "event" }, { "stateMutability": "nonpayable", "type": "constructor", "inputs": [{ "name": "_call_proxy", "type": "address" }, { "name": "_owner", "type": "address" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "transmit_emissions", "inputs": [{ "name": "_gauge", "type": "address" }], "outputs": [], "gas": 10132 }, { "stateMutability": "payable", "type": "function", "name": "deploy_gauge", "inputs": [{ "name": "_chain_id", "type": "uint256" }, { "name": "_salt", "type": "bytes32" }], "outputs": [{ "name": "", "type": "address" }], "gas": 165352 }, { "stateMutability": "nonpayable", "type": "function", "name": "deploy_child_gauge", "inputs": [{ "name": "_chain_id", "type": "uint256" }, { "name": "_lp_token", "type": "address" }, { "name": "_salt", "type": "bytes32" }], "outputs": [], "gas": 18165 }, { "stateMutability": "nonpayable", "type": "function", "name": "deploy_child_gauge", "inputs": [{ "name": "_chain_id", "type": "uint256" }, { "name": "_lp_token", "type": "address" }, { "name": "_salt", "type": "bytes32" }, { "name": "_manager", "type": "address" }], "outputs": [], "gas": 18165 }, { "stateMutability": "nonpayable", "type": "function", "name": "set_bridger", "inputs": [{ "name": "_chain_id", "type": "uint256" }, { "name": "_bridger", "type": "address" }], "outputs": [], "gas": 42889 }, { "stateMutability": "nonpayable", "type": "function", "name": "set_implementation", "inputs": [{ "name": "_implementation", "type": "address" }], "outputs": [], "gas": 41933 }, { "stateMutability": "nonpayable", "type": "function", "name": "set_call_proxy", "inputs": [{ "name": "_new_call_proxy", "type": "address" }], "outputs": [], "gas": 41963 }, { "stateMutability": "nonpayable", "type": "function", "name": "commit_transfer_ownership", "inputs": [{ "name": "_future_owner", "type": "address" }], "outputs": [], "gas": 37785 }, { "stateMutability": "nonpayable", "type": "function", "name": "accept_transfer_ownership", "inputs": [], "outputs": [], "gas": 41864 }, { "stateMutability": "view", "type": "function", "name": "call_proxy", "inputs": [], "outputs": [{ "name": "", "type": "address" }], "gas": 2700 }, { "stateMutability": "view", "type": "function", "name": "get_bridger", "inputs": [{ "name": "arg0", "type": "uint256" }], "outputs": [{ "name": "", "type": "address" }], "gas": 2845 }, { "stateMutability": "view", "type": "function", "name": "get_implementation", "inputs": [], "outputs": [{ "name": "", "type": "address" }], "gas": 2760 }, { "stateMutability": "view", "type": "function", "name": "get_gauge", "inputs": [{ "name": "arg0", "type": "uint256" }, { "name": "arg1", "type": "uint256" }], "outputs": [{ "name": "", "type": "address" }], "gas": 2950 }, { "stateMutability": "view", "type": "function", "name": "get_gauge_count", "inputs": [{ "name": "arg0", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }], "gas": 2935 }, { "stateMutability": "view", "type": "function", "name": "is_valid_gauge", "inputs": [{ "name": "arg0", "type": "address" }], "outputs": [{ "name": "", "type": "bool" }], "gas": 3116 }, { "stateMutability": "view", "type": "function", "name": "owner", "inputs": [], "outputs": [{ "name": "", "type": "address" }], "gas": 2880 }, { "stateMutability": "view", "type": "function", "name": "future_owner", "inputs": [], "outputs": [{ "name": "", "type": "address" }], "gas": 2910 }]
|
|
File without changes
|
/package/lib/constants/abis/{gauge_factory_sidechain.json → gauge_factory/child_gauge_factory.json}
RENAMED
|
File without changes
|
|
File without changes
|