@usdu-core/usdu-core 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/.claude/settings.local.json +12 -0
  2. package/.env.example +6 -0
  3. package/.prettierrc.json +7 -0
  4. package/LICENSE +674 -0
  5. package/README.md +244 -0
  6. package/contracts/curve/CurveAdapterV1.sol +310 -0
  7. package/contracts/curve/CurveAdapterV1_1.sol +198 -0
  8. package/contracts/curve/helpers/ICurveStableSwapNG.json +566 -0
  9. package/contracts/curve/helpers/ICurveStableSwapNG.sol +177 -0
  10. package/contracts/deploy/VaultDeployer.sol +110 -0
  11. package/contracts/morpho/MorphoAdapterV1.sol +255 -0
  12. package/contracts/morpho/MorphoAdapterV1_1.sol +137 -0
  13. package/contracts/morpho/MorphoAdapterV1_2.sol +126 -0
  14. package/contracts/morpho/helpers/AggregatorV3Interface.sol +24 -0
  15. package/contracts/morpho/helpers/ChainlinkDataFeedLib.sol +36 -0
  16. package/contracts/morpho/helpers/ConstantsLib.sol +20 -0
  17. package/contracts/morpho/helpers/ErrorsLib.sol +17 -0
  18. package/contracts/morpho/helpers/IERC4626.sol +6 -0
  19. package/contracts/morpho/helpers/IMetaMorphoV1_1.sol +229 -0
  20. package/contracts/morpho/helpers/IMetaMorphoV1_1Factory.sol +32 -0
  21. package/contracts/morpho/helpers/IMorpho.sol +361 -0
  22. package/contracts/morpho/helpers/IMorphoCallbacks.sol +52 -0
  23. package/contracts/morpho/helpers/IMorphoChainlinkOracleV2.sol +39 -0
  24. package/contracts/morpho/helpers/IMorphoChainlinkOracleV2Factory.sol +56 -0
  25. package/contracts/morpho/helpers/IOracle.sol +15 -0
  26. package/contracts/morpho/helpers/MarketParamsLib.sol +21 -0
  27. package/contracts/morpho/helpers/MathLib.sol +45 -0
  28. package/contracts/morpho/helpers/Morpho.sol.bak +517 -0
  29. package/contracts/morpho/helpers/MorphoChainlinkOracleV2.sol +157 -0
  30. package/contracts/morpho/helpers/PendingLib.sol +47 -0
  31. package/contracts/morpho/helpers/SharesMathLib.sol +45 -0
  32. package/contracts/morpho/helpers/VaultLib.sol +18 -0
  33. package/contracts/reward/RewardDistributionV1.sol +110 -0
  34. package/contracts/reward/RewardRouterV0.sol +63 -0
  35. package/contracts/reward/Rewards.example.json +72 -0
  36. package/contracts/stablecoin/IStablecoin.sol +211 -0
  37. package/contracts/stablecoin/IStablecoinMetadata.sol +27 -0
  38. package/contracts/stablecoin/IStablecoinModifier.sol +52 -0
  39. package/contracts/stablecoin/Stablecoin.sol +376 -0
  40. package/contracts/stablecoin/libraries/ConstantsLib.sol +13 -0
  41. package/contracts/stablecoin/libraries/ErrorsLib.sol +45 -0
  42. package/contracts/stablecoin/libraries/EventsLib.sol +74 -0
  43. package/contracts/stablecoin/libraries/PendingLib.sol +38 -0
  44. package/contracts/vault/VaultAdapterRecoverV1.sol +29 -0
  45. package/contracts/vault/VaultAdapterV1.sol +126 -0
  46. package/dist/index.d.mts +16154 -0
  47. package/dist/index.d.ts +16154 -0
  48. package/dist/index.js +21134 -0
  49. package/dist/index.mjs +21061 -0
  50. package/docs/CoreVault: Integration of new Markets.md +197 -0
  51. package/docs/CoreVault: SupplyQueue.md +11 -0
  52. package/docs/Markets USDC Vault.md +35 -0
  53. package/docs/Markets USDU Vault.md +89 -0
  54. package/docs/Markets WETH Vault.md +35 -0
  55. package/docs/Overview.drawio +117 -0
  56. package/exports/abis/curve/CurveAdapterV1.ts +599 -0
  57. package/exports/abis/curve/CurveAdapterV1_1.ts +609 -0
  58. package/exports/abis/curve/CurveAdapterV1_2.ts +721 -0
  59. package/exports/abis/curve/helper/ICurveStableSwapNG.ts +1589 -0
  60. package/exports/abis/morpho/MorphoAdapterV1.ts +516 -0
  61. package/exports/abis/morpho/MorphoAdapterV1_1.ts +489 -0
  62. package/exports/abis/morpho/MorphoAdapterV1_2.ts +459 -0
  63. package/exports/abis/morpho/helper/AggregatorV3Interface.ts +113 -0
  64. package/exports/abis/morpho/helper/IMetaMorphoV1_1.ts +1483 -0
  65. package/exports/abis/morpho/helper/IMetaMorphoV1_1Base.ts +607 -0
  66. package/exports/abis/morpho/helper/IMetaMorphoV1_1StaticTyping.ts +696 -0
  67. package/exports/abis/morpho/helper/IMorpho.ts +1024 -0
  68. package/exports/abis/morpho/helper/IMorphoBase.ts +886 -0
  69. package/exports/abis/morpho/helper/IMorphoChainlinkOracleV2.ts +132 -0
  70. package/exports/abis/morpho/helper/IMorphoChainlinkOracleV2Factory.ts +109 -0
  71. package/exports/abis/morpho/helper/IMorphoFlashLoanCallback.ts +20 -0
  72. package/exports/abis/morpho/helper/IMorphoLiquidateCallback.ts +20 -0
  73. package/exports/abis/morpho/helper/IMorphoRepayCallback.ts +20 -0
  74. package/exports/abis/morpho/helper/IMorphoStaticTyping.ts +1003 -0
  75. package/exports/abis/morpho/helper/IMorphoSupplyCallback.ts +20 -0
  76. package/exports/abis/morpho/helper/IMorphoSupplyCollateralCallback.ts +20 -0
  77. package/exports/abis/morpho/helper/IMulticall.ts +21 -0
  78. package/exports/abis/morpho/helper/IOracle.ts +15 -0
  79. package/exports/abis/morpho/helper/IOwnable.ts +55 -0
  80. package/exports/abis/morpho/helper/MorphoChainlinkOracleV2.ts +188 -0
  81. package/exports/abis/openzeppelin/ERC20.ts +310 -0
  82. package/exports/abis/openzeppelin/ERC20Permit.ts +520 -0
  83. package/exports/abis/openzeppelin/IERC20.ts +185 -0
  84. package/exports/abis/openzeppelin/IERC20Metadata.ts +224 -0
  85. package/exports/abis/openzeppelin/IERC20Permit.ts +77 -0
  86. package/exports/abis/openzeppelin/IERC4626.ts +614 -0
  87. package/exports/abis/reward/RewardDistributionV1.ts +246 -0
  88. package/exports/abis/stablecoin/ErrorsLib.ts +114 -0
  89. package/exports/abis/stablecoin/EventsLib.ts +372 -0
  90. package/exports/abis/stablecoin/IStablecoin.ts +642 -0
  91. package/exports/abis/stablecoin/IStablecoinMetadata.ts +856 -0
  92. package/exports/abis/stablecoin/IStablecoinModifier.ts +15 -0
  93. package/exports/abis/stablecoin/Stablecoin.ts +1922 -0
  94. package/exports/abis/termmax/ITermMaxVault.ts +2335 -0
  95. package/exports/abis/vault/VaultAdapterRecoverV1.ts +490 -0
  96. package/exports/abis/vault/VaultAdapterV1.ts +459 -0
  97. package/exports/address.config.ts +113 -0
  98. package/exports/address.types.ts +130 -0
  99. package/exports/index.ts +61 -0
  100. package/hardhat.config.ts +231 -0
  101. package/helper/store.args.ts +17 -0
  102. package/helper/wallet.info.ts +3 -0
  103. package/helper/wallet.ts +41 -0
  104. package/install-macos.sh +46 -0
  105. package/package.json +73 -0
  106. package/tsconfig.json +15 -0
  107. package/tsup.config.ts +10 -0
@@ -0,0 +1,1589 @@
1
+ export const ICurveStableSwapNG_ABI = [
2
+ {
3
+ anonymous: false,
4
+ inputs: [
5
+ {
6
+ indexed: true,
7
+ internalType: 'address',
8
+ name: 'provider',
9
+ type: 'address',
10
+ },
11
+ {
12
+ indexed: false,
13
+ internalType: 'uint256[]',
14
+ name: 'token_amounts',
15
+ type: 'uint256[]',
16
+ },
17
+ {
18
+ indexed: false,
19
+ internalType: 'uint256[]',
20
+ name: 'fees',
21
+ type: 'uint256[]',
22
+ },
23
+ {
24
+ indexed: false,
25
+ internalType: 'uint256',
26
+ name: 'invariant',
27
+ type: 'uint256',
28
+ },
29
+ {
30
+ indexed: false,
31
+ internalType: 'uint256',
32
+ name: 'token_supply',
33
+ type: 'uint256',
34
+ },
35
+ ],
36
+ name: 'AddLiquidity',
37
+ type: 'event',
38
+ },
39
+ {
40
+ anonymous: false,
41
+ inputs: [
42
+ {
43
+ indexed: false,
44
+ internalType: 'uint256',
45
+ name: 'fee',
46
+ type: 'uint256',
47
+ },
48
+ {
49
+ indexed: false,
50
+ internalType: 'uint256',
51
+ name: 'offpeg_fee_multiplier',
52
+ type: 'uint256',
53
+ },
54
+ ],
55
+ name: 'ApplyNewFee',
56
+ type: 'event',
57
+ },
58
+ {
59
+ anonymous: false,
60
+ inputs: [
61
+ {
62
+ indexed: true,
63
+ internalType: 'address',
64
+ name: 'owner',
65
+ type: 'address',
66
+ },
67
+ {
68
+ indexed: true,
69
+ internalType: 'address',
70
+ name: 'spender',
71
+ type: 'address',
72
+ },
73
+ {
74
+ indexed: false,
75
+ internalType: 'uint256',
76
+ name: 'value',
77
+ type: 'uint256',
78
+ },
79
+ ],
80
+ name: 'Approval',
81
+ type: 'event',
82
+ },
83
+ {
84
+ anonymous: false,
85
+ inputs: [
86
+ {
87
+ indexed: false,
88
+ internalType: 'uint256',
89
+ name: 'old_A',
90
+ type: 'uint256',
91
+ },
92
+ {
93
+ indexed: false,
94
+ internalType: 'uint256',
95
+ name: 'new_A',
96
+ type: 'uint256',
97
+ },
98
+ {
99
+ indexed: false,
100
+ internalType: 'uint256',
101
+ name: 'initial_time',
102
+ type: 'uint256',
103
+ },
104
+ {
105
+ indexed: false,
106
+ internalType: 'uint256',
107
+ name: 'future_time',
108
+ type: 'uint256',
109
+ },
110
+ ],
111
+ name: 'RampA',
112
+ type: 'event',
113
+ },
114
+ {
115
+ anonymous: false,
116
+ inputs: [
117
+ {
118
+ indexed: true,
119
+ internalType: 'address',
120
+ name: 'provider',
121
+ type: 'address',
122
+ },
123
+ {
124
+ indexed: false,
125
+ internalType: 'uint256[]',
126
+ name: 'token_amounts',
127
+ type: 'uint256[]',
128
+ },
129
+ {
130
+ indexed: false,
131
+ internalType: 'uint256[]',
132
+ name: 'fees',
133
+ type: 'uint256[]',
134
+ },
135
+ {
136
+ indexed: false,
137
+ internalType: 'uint256',
138
+ name: 'token_supply',
139
+ type: 'uint256',
140
+ },
141
+ ],
142
+ name: 'RemoveLiquidity',
143
+ type: 'event',
144
+ },
145
+ {
146
+ anonymous: false,
147
+ inputs: [
148
+ {
149
+ indexed: true,
150
+ internalType: 'address',
151
+ name: 'provider',
152
+ type: 'address',
153
+ },
154
+ {
155
+ indexed: false,
156
+ internalType: 'uint256[]',
157
+ name: 'token_amounts',
158
+ type: 'uint256[]',
159
+ },
160
+ {
161
+ indexed: false,
162
+ internalType: 'uint256[]',
163
+ name: 'fees',
164
+ type: 'uint256[]',
165
+ },
166
+ {
167
+ indexed: false,
168
+ internalType: 'uint256',
169
+ name: 'invariant',
170
+ type: 'uint256',
171
+ },
172
+ {
173
+ indexed: false,
174
+ internalType: 'uint256',
175
+ name: 'token_supply',
176
+ type: 'uint256',
177
+ },
178
+ ],
179
+ name: 'RemoveLiquidityImbalance',
180
+ type: 'event',
181
+ },
182
+ {
183
+ anonymous: false,
184
+ inputs: [
185
+ {
186
+ indexed: true,
187
+ internalType: 'address',
188
+ name: 'provider',
189
+ type: 'address',
190
+ },
191
+ {
192
+ indexed: false,
193
+ internalType: 'int128',
194
+ name: 'token_id',
195
+ type: 'int128',
196
+ },
197
+ {
198
+ indexed: false,
199
+ internalType: 'uint256',
200
+ name: 'token_amount',
201
+ type: 'uint256',
202
+ },
203
+ {
204
+ indexed: false,
205
+ internalType: 'uint256',
206
+ name: 'coin_amount',
207
+ type: 'uint256',
208
+ },
209
+ {
210
+ indexed: false,
211
+ internalType: 'uint256',
212
+ name: 'token_supply',
213
+ type: 'uint256',
214
+ },
215
+ ],
216
+ name: 'RemoveLiquidityOne',
217
+ type: 'event',
218
+ },
219
+ {
220
+ anonymous: false,
221
+ inputs: [
222
+ {
223
+ indexed: false,
224
+ internalType: 'uint256',
225
+ name: 'ma_exp_time',
226
+ type: 'uint256',
227
+ },
228
+ {
229
+ indexed: false,
230
+ internalType: 'uint256',
231
+ name: 'D_ma_time',
232
+ type: 'uint256',
233
+ },
234
+ ],
235
+ name: 'SetNewMATime',
236
+ type: 'event',
237
+ },
238
+ {
239
+ anonymous: false,
240
+ inputs: [
241
+ {
242
+ indexed: false,
243
+ internalType: 'uint256',
244
+ name: 'A',
245
+ type: 'uint256',
246
+ },
247
+ {
248
+ indexed: false,
249
+ internalType: 'uint256',
250
+ name: 't',
251
+ type: 'uint256',
252
+ },
253
+ ],
254
+ name: 'StopRampA',
255
+ type: 'event',
256
+ },
257
+ {
258
+ anonymous: false,
259
+ inputs: [
260
+ {
261
+ indexed: true,
262
+ internalType: 'address',
263
+ name: 'buyer',
264
+ type: 'address',
265
+ },
266
+ {
267
+ indexed: false,
268
+ internalType: 'int128',
269
+ name: 'sold_id',
270
+ type: 'int128',
271
+ },
272
+ {
273
+ indexed: false,
274
+ internalType: 'uint256',
275
+ name: 'tokens_sold',
276
+ type: 'uint256',
277
+ },
278
+ {
279
+ indexed: false,
280
+ internalType: 'int128',
281
+ name: 'bought_id',
282
+ type: 'int128',
283
+ },
284
+ {
285
+ indexed: false,
286
+ internalType: 'uint256',
287
+ name: 'tokens_bought',
288
+ type: 'uint256',
289
+ },
290
+ ],
291
+ name: 'TokenExchange',
292
+ type: 'event',
293
+ },
294
+ {
295
+ anonymous: false,
296
+ inputs: [
297
+ {
298
+ indexed: true,
299
+ internalType: 'address',
300
+ name: 'buyer',
301
+ type: 'address',
302
+ },
303
+ {
304
+ indexed: false,
305
+ internalType: 'int128',
306
+ name: 'sold_id',
307
+ type: 'int128',
308
+ },
309
+ {
310
+ indexed: false,
311
+ internalType: 'uint256',
312
+ name: 'tokens_sold',
313
+ type: 'uint256',
314
+ },
315
+ {
316
+ indexed: false,
317
+ internalType: 'int128',
318
+ name: 'bought_id',
319
+ type: 'int128',
320
+ },
321
+ {
322
+ indexed: false,
323
+ internalType: 'uint256',
324
+ name: 'tokens_bought',
325
+ type: 'uint256',
326
+ },
327
+ ],
328
+ name: 'TokenExchangeUnderlying',
329
+ type: 'event',
330
+ },
331
+ {
332
+ anonymous: false,
333
+ inputs: [
334
+ {
335
+ indexed: true,
336
+ internalType: 'address',
337
+ name: 'sender',
338
+ type: 'address',
339
+ },
340
+ {
341
+ indexed: true,
342
+ internalType: 'address',
343
+ name: 'receiver',
344
+ type: 'address',
345
+ },
346
+ {
347
+ indexed: false,
348
+ internalType: 'uint256',
349
+ name: 'value',
350
+ type: 'uint256',
351
+ },
352
+ ],
353
+ name: 'Transfer',
354
+ type: 'event',
355
+ },
356
+ {
357
+ inputs: [],
358
+ name: 'A',
359
+ outputs: [
360
+ {
361
+ internalType: 'uint256',
362
+ name: '',
363
+ type: 'uint256',
364
+ },
365
+ ],
366
+ stateMutability: 'view',
367
+ type: 'function',
368
+ },
369
+ {
370
+ inputs: [],
371
+ name: 'A_precise',
372
+ outputs: [
373
+ {
374
+ internalType: 'uint256',
375
+ name: '',
376
+ type: 'uint256',
377
+ },
378
+ ],
379
+ stateMutability: 'view',
380
+ type: 'function',
381
+ },
382
+ {
383
+ inputs: [],
384
+ name: 'DOMAIN_SEPARATOR',
385
+ outputs: [
386
+ {
387
+ internalType: 'bytes32',
388
+ name: '',
389
+ type: 'bytes32',
390
+ },
391
+ ],
392
+ stateMutability: 'view',
393
+ type: 'function',
394
+ },
395
+ {
396
+ inputs: [],
397
+ name: 'D_ma_time',
398
+ outputs: [
399
+ {
400
+ internalType: 'uint256',
401
+ name: '',
402
+ type: 'uint256',
403
+ },
404
+ ],
405
+ stateMutability: 'view',
406
+ type: 'function',
407
+ },
408
+ {
409
+ inputs: [],
410
+ name: 'D_oracle',
411
+ outputs: [
412
+ {
413
+ internalType: 'uint256',
414
+ name: '',
415
+ type: 'uint256',
416
+ },
417
+ ],
418
+ stateMutability: 'view',
419
+ type: 'function',
420
+ },
421
+ {
422
+ inputs: [],
423
+ name: 'N_COINS',
424
+ outputs: [
425
+ {
426
+ internalType: 'uint256',
427
+ name: '',
428
+ type: 'uint256',
429
+ },
430
+ ],
431
+ stateMutability: 'view',
432
+ type: 'function',
433
+ },
434
+ {
435
+ inputs: [
436
+ {
437
+ internalType: 'uint256[]',
438
+ name: '_amounts',
439
+ type: 'uint256[]',
440
+ },
441
+ {
442
+ internalType: 'uint256',
443
+ name: '_min_mint_amount',
444
+ type: 'uint256',
445
+ },
446
+ {
447
+ internalType: 'address',
448
+ name: '_receiver',
449
+ type: 'address',
450
+ },
451
+ ],
452
+ name: 'add_liquidity',
453
+ outputs: [
454
+ {
455
+ internalType: 'uint256',
456
+ name: '',
457
+ type: 'uint256',
458
+ },
459
+ ],
460
+ stateMutability: 'nonpayable',
461
+ type: 'function',
462
+ },
463
+ {
464
+ inputs: [
465
+ {
466
+ internalType: 'uint256[]',
467
+ name: '_amounts',
468
+ type: 'uint256[]',
469
+ },
470
+ {
471
+ internalType: 'uint256',
472
+ name: '_min_mint_amount',
473
+ type: 'uint256',
474
+ },
475
+ ],
476
+ name: 'add_liquidity',
477
+ outputs: [
478
+ {
479
+ internalType: 'uint256',
480
+ name: '',
481
+ type: 'uint256',
482
+ },
483
+ ],
484
+ stateMutability: 'nonpayable',
485
+ type: 'function',
486
+ },
487
+ {
488
+ inputs: [
489
+ {
490
+ internalType: 'uint256',
491
+ name: 'arg0',
492
+ type: 'uint256',
493
+ },
494
+ ],
495
+ name: 'admin_balances',
496
+ outputs: [
497
+ {
498
+ internalType: 'uint256',
499
+ name: '',
500
+ type: 'uint256',
501
+ },
502
+ ],
503
+ stateMutability: 'view',
504
+ type: 'function',
505
+ },
506
+ {
507
+ inputs: [],
508
+ name: 'admin_fee',
509
+ outputs: [
510
+ {
511
+ internalType: 'uint256',
512
+ name: '',
513
+ type: 'uint256',
514
+ },
515
+ ],
516
+ stateMutability: 'view',
517
+ type: 'function',
518
+ },
519
+ {
520
+ inputs: [
521
+ {
522
+ internalType: 'address',
523
+ name: 'arg0',
524
+ type: 'address',
525
+ },
526
+ {
527
+ internalType: 'address',
528
+ name: 'arg1',
529
+ type: 'address',
530
+ },
531
+ ],
532
+ name: 'allowance',
533
+ outputs: [
534
+ {
535
+ internalType: 'uint256',
536
+ name: '',
537
+ type: 'uint256',
538
+ },
539
+ ],
540
+ stateMutability: 'view',
541
+ type: 'function',
542
+ },
543
+ {
544
+ inputs: [
545
+ {
546
+ internalType: 'address',
547
+ name: '_spender',
548
+ type: 'address',
549
+ },
550
+ {
551
+ internalType: 'uint256',
552
+ name: '_value',
553
+ type: 'uint256',
554
+ },
555
+ ],
556
+ name: 'approve',
557
+ outputs: [
558
+ {
559
+ internalType: 'bool',
560
+ name: '',
561
+ type: 'bool',
562
+ },
563
+ ],
564
+ stateMutability: 'nonpayable',
565
+ type: 'function',
566
+ },
567
+ {
568
+ inputs: [
569
+ {
570
+ internalType: 'address',
571
+ name: 'arg0',
572
+ type: 'address',
573
+ },
574
+ ],
575
+ name: 'balanceOf',
576
+ outputs: [
577
+ {
578
+ internalType: 'uint256',
579
+ name: '',
580
+ type: 'uint256',
581
+ },
582
+ ],
583
+ stateMutability: 'view',
584
+ type: 'function',
585
+ },
586
+ {
587
+ inputs: [
588
+ {
589
+ internalType: 'uint256',
590
+ name: 'i',
591
+ type: 'uint256',
592
+ },
593
+ ],
594
+ name: 'balances',
595
+ outputs: [
596
+ {
597
+ internalType: 'uint256',
598
+ name: '',
599
+ type: 'uint256',
600
+ },
601
+ ],
602
+ stateMutability: 'view',
603
+ type: 'function',
604
+ },
605
+ {
606
+ inputs: [
607
+ {
608
+ internalType: 'uint256[]',
609
+ name: '_amounts',
610
+ type: 'uint256[]',
611
+ },
612
+ {
613
+ internalType: 'bool',
614
+ name: '_is_deposit',
615
+ type: 'bool',
616
+ },
617
+ ],
618
+ name: 'calc_token_amount',
619
+ outputs: [
620
+ {
621
+ internalType: 'uint256',
622
+ name: '',
623
+ type: 'uint256',
624
+ },
625
+ ],
626
+ stateMutability: 'view',
627
+ type: 'function',
628
+ },
629
+ {
630
+ inputs: [
631
+ {
632
+ internalType: 'uint256',
633
+ name: '_burn_amount',
634
+ type: 'uint256',
635
+ },
636
+ {
637
+ internalType: 'int128',
638
+ name: 'i',
639
+ type: 'int128',
640
+ },
641
+ ],
642
+ name: 'calc_withdraw_one_coin',
643
+ outputs: [
644
+ {
645
+ internalType: 'uint256',
646
+ name: '',
647
+ type: 'uint256',
648
+ },
649
+ ],
650
+ stateMutability: 'view',
651
+ type: 'function',
652
+ },
653
+ {
654
+ inputs: [
655
+ {
656
+ internalType: 'uint256',
657
+ name: 'arg0',
658
+ type: 'uint256',
659
+ },
660
+ ],
661
+ name: 'coins',
662
+ outputs: [
663
+ {
664
+ internalType: 'address',
665
+ name: '',
666
+ type: 'address',
667
+ },
668
+ ],
669
+ stateMutability: 'view',
670
+ type: 'function',
671
+ },
672
+ {
673
+ inputs: [],
674
+ name: 'decimals',
675
+ outputs: [
676
+ {
677
+ internalType: 'uint8',
678
+ name: '',
679
+ type: 'uint8',
680
+ },
681
+ ],
682
+ stateMutability: 'view',
683
+ type: 'function',
684
+ },
685
+ {
686
+ inputs: [
687
+ {
688
+ internalType: 'int128',
689
+ name: 'i',
690
+ type: 'int128',
691
+ },
692
+ {
693
+ internalType: 'int128',
694
+ name: 'j',
695
+ type: 'int128',
696
+ },
697
+ ],
698
+ name: 'dynamic_fee',
699
+ outputs: [
700
+ {
701
+ internalType: 'uint256',
702
+ name: '',
703
+ type: 'uint256',
704
+ },
705
+ ],
706
+ stateMutability: 'view',
707
+ type: 'function',
708
+ },
709
+ {
710
+ inputs: [
711
+ {
712
+ internalType: 'uint256',
713
+ name: 'i',
714
+ type: 'uint256',
715
+ },
716
+ ],
717
+ name: 'ema_price',
718
+ outputs: [
719
+ {
720
+ internalType: 'uint256',
721
+ name: '',
722
+ type: 'uint256',
723
+ },
724
+ ],
725
+ stateMutability: 'view',
726
+ type: 'function',
727
+ },
728
+ {
729
+ inputs: [
730
+ {
731
+ internalType: 'int128',
732
+ name: 'i',
733
+ type: 'int128',
734
+ },
735
+ {
736
+ internalType: 'int128',
737
+ name: 'j',
738
+ type: 'int128',
739
+ },
740
+ {
741
+ internalType: 'uint256',
742
+ name: '_dx',
743
+ type: 'uint256',
744
+ },
745
+ {
746
+ internalType: 'uint256',
747
+ name: '_min_dy',
748
+ type: 'uint256',
749
+ },
750
+ ],
751
+ name: 'exchange',
752
+ outputs: [
753
+ {
754
+ internalType: 'uint256',
755
+ name: '',
756
+ type: 'uint256',
757
+ },
758
+ ],
759
+ stateMutability: 'nonpayable',
760
+ type: 'function',
761
+ },
762
+ {
763
+ inputs: [
764
+ {
765
+ internalType: 'int128',
766
+ name: 'i',
767
+ type: 'int128',
768
+ },
769
+ {
770
+ internalType: 'int128',
771
+ name: 'j',
772
+ type: 'int128',
773
+ },
774
+ {
775
+ internalType: 'uint256',
776
+ name: '_dx',
777
+ type: 'uint256',
778
+ },
779
+ {
780
+ internalType: 'uint256',
781
+ name: '_min_dy',
782
+ type: 'uint256',
783
+ },
784
+ {
785
+ internalType: 'address',
786
+ name: '_receiver',
787
+ type: 'address',
788
+ },
789
+ ],
790
+ name: 'exchange',
791
+ outputs: [
792
+ {
793
+ internalType: 'uint256',
794
+ name: '',
795
+ type: 'uint256',
796
+ },
797
+ ],
798
+ stateMutability: 'nonpayable',
799
+ type: 'function',
800
+ },
801
+ {
802
+ inputs: [
803
+ {
804
+ internalType: 'int128',
805
+ name: 'i',
806
+ type: 'int128',
807
+ },
808
+ {
809
+ internalType: 'int128',
810
+ name: 'j',
811
+ type: 'int128',
812
+ },
813
+ {
814
+ internalType: 'uint256',
815
+ name: '_dx',
816
+ type: 'uint256',
817
+ },
818
+ {
819
+ internalType: 'uint256',
820
+ name: '_min_dy',
821
+ type: 'uint256',
822
+ },
823
+ ],
824
+ name: 'exchange_received',
825
+ outputs: [
826
+ {
827
+ internalType: 'uint256',
828
+ name: '',
829
+ type: 'uint256',
830
+ },
831
+ ],
832
+ stateMutability: 'nonpayable',
833
+ type: 'function',
834
+ },
835
+ {
836
+ inputs: [
837
+ {
838
+ internalType: 'int128',
839
+ name: 'i',
840
+ type: 'int128',
841
+ },
842
+ {
843
+ internalType: 'int128',
844
+ name: 'j',
845
+ type: 'int128',
846
+ },
847
+ {
848
+ internalType: 'uint256',
849
+ name: '_dx',
850
+ type: 'uint256',
851
+ },
852
+ {
853
+ internalType: 'uint256',
854
+ name: '_min_dy',
855
+ type: 'uint256',
856
+ },
857
+ {
858
+ internalType: 'address',
859
+ name: '_receiver',
860
+ type: 'address',
861
+ },
862
+ ],
863
+ name: 'exchange_received',
864
+ outputs: [
865
+ {
866
+ internalType: 'uint256',
867
+ name: '',
868
+ type: 'uint256',
869
+ },
870
+ ],
871
+ stateMutability: 'nonpayable',
872
+ type: 'function',
873
+ },
874
+ {
875
+ inputs: [],
876
+ name: 'fee',
877
+ outputs: [
878
+ {
879
+ internalType: 'uint256',
880
+ name: '',
881
+ type: 'uint256',
882
+ },
883
+ ],
884
+ stateMutability: 'view',
885
+ type: 'function',
886
+ },
887
+ {
888
+ inputs: [],
889
+ name: 'future_A',
890
+ outputs: [
891
+ {
892
+ internalType: 'uint256',
893
+ name: '',
894
+ type: 'uint256',
895
+ },
896
+ ],
897
+ stateMutability: 'view',
898
+ type: 'function',
899
+ },
900
+ {
901
+ inputs: [],
902
+ name: 'future_A_time',
903
+ outputs: [
904
+ {
905
+ internalType: 'uint256',
906
+ name: '',
907
+ type: 'uint256',
908
+ },
909
+ ],
910
+ stateMutability: 'view',
911
+ type: 'function',
912
+ },
913
+ {
914
+ inputs: [],
915
+ name: 'get_balances',
916
+ outputs: [
917
+ {
918
+ internalType: 'uint256[]',
919
+ name: '',
920
+ type: 'uint256[]',
921
+ },
922
+ ],
923
+ stateMutability: 'view',
924
+ type: 'function',
925
+ },
926
+ {
927
+ inputs: [
928
+ {
929
+ internalType: 'int128',
930
+ name: 'i',
931
+ type: 'int128',
932
+ },
933
+ {
934
+ internalType: 'int128',
935
+ name: 'j',
936
+ type: 'int128',
937
+ },
938
+ {
939
+ internalType: 'uint256',
940
+ name: 'dy',
941
+ type: 'uint256',
942
+ },
943
+ ],
944
+ name: 'get_dx',
945
+ outputs: [
946
+ {
947
+ internalType: 'uint256',
948
+ name: '',
949
+ type: 'uint256',
950
+ },
951
+ ],
952
+ stateMutability: 'view',
953
+ type: 'function',
954
+ },
955
+ {
956
+ inputs: [
957
+ {
958
+ internalType: 'int128',
959
+ name: 'i',
960
+ type: 'int128',
961
+ },
962
+ {
963
+ internalType: 'int128',
964
+ name: 'j',
965
+ type: 'int128',
966
+ },
967
+ {
968
+ internalType: 'uint256',
969
+ name: 'dx',
970
+ type: 'uint256',
971
+ },
972
+ ],
973
+ name: 'get_dy',
974
+ outputs: [
975
+ {
976
+ internalType: 'uint256',
977
+ name: '',
978
+ type: 'uint256',
979
+ },
980
+ ],
981
+ stateMutability: 'view',
982
+ type: 'function',
983
+ },
984
+ {
985
+ inputs: [
986
+ {
987
+ internalType: 'uint256',
988
+ name: 'i',
989
+ type: 'uint256',
990
+ },
991
+ ],
992
+ name: 'get_p',
993
+ outputs: [
994
+ {
995
+ internalType: 'uint256',
996
+ name: '',
997
+ type: 'uint256',
998
+ },
999
+ ],
1000
+ stateMutability: 'view',
1001
+ type: 'function',
1002
+ },
1003
+ {
1004
+ inputs: [],
1005
+ name: 'get_virtual_price',
1006
+ outputs: [
1007
+ {
1008
+ internalType: 'uint256',
1009
+ name: '',
1010
+ type: 'uint256',
1011
+ },
1012
+ ],
1013
+ stateMutability: 'view',
1014
+ type: 'function',
1015
+ },
1016
+ {
1017
+ inputs: [],
1018
+ name: 'initial_A',
1019
+ outputs: [
1020
+ {
1021
+ internalType: 'uint256',
1022
+ name: '',
1023
+ type: 'uint256',
1024
+ },
1025
+ ],
1026
+ stateMutability: 'view',
1027
+ type: 'function',
1028
+ },
1029
+ {
1030
+ inputs: [],
1031
+ name: 'initial_A_time',
1032
+ outputs: [
1033
+ {
1034
+ internalType: 'uint256',
1035
+ name: '',
1036
+ type: 'uint256',
1037
+ },
1038
+ ],
1039
+ stateMutability: 'view',
1040
+ type: 'function',
1041
+ },
1042
+ {
1043
+ inputs: [
1044
+ {
1045
+ internalType: 'uint256',
1046
+ name: 'i',
1047
+ type: 'uint256',
1048
+ },
1049
+ ],
1050
+ name: 'last_price',
1051
+ outputs: [
1052
+ {
1053
+ internalType: 'uint256',
1054
+ name: '',
1055
+ type: 'uint256',
1056
+ },
1057
+ ],
1058
+ stateMutability: 'view',
1059
+ type: 'function',
1060
+ },
1061
+ {
1062
+ inputs: [],
1063
+ name: 'ma_exp_time',
1064
+ outputs: [
1065
+ {
1066
+ internalType: 'uint256',
1067
+ name: '',
1068
+ type: 'uint256',
1069
+ },
1070
+ ],
1071
+ stateMutability: 'view',
1072
+ type: 'function',
1073
+ },
1074
+ {
1075
+ inputs: [],
1076
+ name: 'ma_last_time',
1077
+ outputs: [
1078
+ {
1079
+ internalType: 'uint256',
1080
+ name: '',
1081
+ type: 'uint256',
1082
+ },
1083
+ ],
1084
+ stateMutability: 'view',
1085
+ type: 'function',
1086
+ },
1087
+ {
1088
+ inputs: [],
1089
+ name: 'name',
1090
+ outputs: [
1091
+ {
1092
+ internalType: 'string',
1093
+ name: '',
1094
+ type: 'string',
1095
+ },
1096
+ ],
1097
+ stateMutability: 'view',
1098
+ type: 'function',
1099
+ },
1100
+ {
1101
+ inputs: [
1102
+ {
1103
+ internalType: 'address',
1104
+ name: 'arg0',
1105
+ type: 'address',
1106
+ },
1107
+ ],
1108
+ name: 'nonces',
1109
+ outputs: [
1110
+ {
1111
+ internalType: 'uint256',
1112
+ name: '',
1113
+ type: 'uint256',
1114
+ },
1115
+ ],
1116
+ stateMutability: 'view',
1117
+ type: 'function',
1118
+ },
1119
+ {
1120
+ inputs: [],
1121
+ name: 'offpeg_fee_multiplier',
1122
+ outputs: [
1123
+ {
1124
+ internalType: 'uint256',
1125
+ name: '',
1126
+ type: 'uint256',
1127
+ },
1128
+ ],
1129
+ stateMutability: 'view',
1130
+ type: 'function',
1131
+ },
1132
+ {
1133
+ inputs: [
1134
+ {
1135
+ internalType: 'address',
1136
+ name: '_owner',
1137
+ type: 'address',
1138
+ },
1139
+ {
1140
+ internalType: 'address',
1141
+ name: '_spender',
1142
+ type: 'address',
1143
+ },
1144
+ {
1145
+ internalType: 'uint256',
1146
+ name: '_value',
1147
+ type: 'uint256',
1148
+ },
1149
+ {
1150
+ internalType: 'uint256',
1151
+ name: '_deadline',
1152
+ type: 'uint256',
1153
+ },
1154
+ {
1155
+ internalType: 'uint8',
1156
+ name: '_v',
1157
+ type: 'uint8',
1158
+ },
1159
+ {
1160
+ internalType: 'bytes32',
1161
+ name: '_r',
1162
+ type: 'bytes32',
1163
+ },
1164
+ {
1165
+ internalType: 'bytes32',
1166
+ name: '_s',
1167
+ type: 'bytes32',
1168
+ },
1169
+ ],
1170
+ name: 'permit',
1171
+ outputs: [
1172
+ {
1173
+ internalType: 'bool',
1174
+ name: '',
1175
+ type: 'bool',
1176
+ },
1177
+ ],
1178
+ stateMutability: 'nonpayable',
1179
+ type: 'function',
1180
+ },
1181
+ {
1182
+ inputs: [
1183
+ {
1184
+ internalType: 'uint256',
1185
+ name: 'i',
1186
+ type: 'uint256',
1187
+ },
1188
+ ],
1189
+ name: 'price_oracle',
1190
+ outputs: [
1191
+ {
1192
+ internalType: 'uint256',
1193
+ name: '',
1194
+ type: 'uint256',
1195
+ },
1196
+ ],
1197
+ stateMutability: 'view',
1198
+ type: 'function',
1199
+ },
1200
+ {
1201
+ inputs: [
1202
+ {
1203
+ internalType: 'uint256',
1204
+ name: '_future_A',
1205
+ type: 'uint256',
1206
+ },
1207
+ {
1208
+ internalType: 'uint256',
1209
+ name: '_future_time',
1210
+ type: 'uint256',
1211
+ },
1212
+ ],
1213
+ name: 'ramp_A',
1214
+ outputs: [],
1215
+ stateMutability: 'nonpayable',
1216
+ type: 'function',
1217
+ },
1218
+ {
1219
+ inputs: [
1220
+ {
1221
+ internalType: 'uint256',
1222
+ name: '_burn_amount',
1223
+ type: 'uint256',
1224
+ },
1225
+ {
1226
+ internalType: 'uint256[]',
1227
+ name: '_min_amounts',
1228
+ type: 'uint256[]',
1229
+ },
1230
+ {
1231
+ internalType: 'address',
1232
+ name: '_receiver',
1233
+ type: 'address',
1234
+ },
1235
+ {
1236
+ internalType: 'bool',
1237
+ name: '_claim_admin_fees',
1238
+ type: 'bool',
1239
+ },
1240
+ ],
1241
+ name: 'remove_liquidity',
1242
+ outputs: [
1243
+ {
1244
+ internalType: 'uint256[]',
1245
+ name: '',
1246
+ type: 'uint256[]',
1247
+ },
1248
+ ],
1249
+ stateMutability: 'nonpayable',
1250
+ type: 'function',
1251
+ },
1252
+ {
1253
+ inputs: [
1254
+ {
1255
+ internalType: 'uint256',
1256
+ name: '_burn_amount',
1257
+ type: 'uint256',
1258
+ },
1259
+ {
1260
+ internalType: 'uint256[]',
1261
+ name: '_min_amounts',
1262
+ type: 'uint256[]',
1263
+ },
1264
+ {
1265
+ internalType: 'address',
1266
+ name: '_receiver',
1267
+ type: 'address',
1268
+ },
1269
+ ],
1270
+ name: 'remove_liquidity',
1271
+ outputs: [
1272
+ {
1273
+ internalType: 'uint256[]',
1274
+ name: '',
1275
+ type: 'uint256[]',
1276
+ },
1277
+ ],
1278
+ stateMutability: 'nonpayable',
1279
+ type: 'function',
1280
+ },
1281
+ {
1282
+ inputs: [
1283
+ {
1284
+ internalType: 'uint256',
1285
+ name: '_burn_amount',
1286
+ type: 'uint256',
1287
+ },
1288
+ {
1289
+ internalType: 'uint256[]',
1290
+ name: '_min_amounts',
1291
+ type: 'uint256[]',
1292
+ },
1293
+ ],
1294
+ name: 'remove_liquidity',
1295
+ outputs: [
1296
+ {
1297
+ internalType: 'uint256[]',
1298
+ name: '',
1299
+ type: 'uint256[]',
1300
+ },
1301
+ ],
1302
+ stateMutability: 'nonpayable',
1303
+ type: 'function',
1304
+ },
1305
+ {
1306
+ inputs: [
1307
+ {
1308
+ internalType: 'uint256[]',
1309
+ name: '_amounts',
1310
+ type: 'uint256[]',
1311
+ },
1312
+ {
1313
+ internalType: 'uint256',
1314
+ name: '_max_burn_amount',
1315
+ type: 'uint256',
1316
+ },
1317
+ {
1318
+ internalType: 'address',
1319
+ name: '_receiver',
1320
+ type: 'address',
1321
+ },
1322
+ ],
1323
+ name: 'remove_liquidity_imbalance',
1324
+ outputs: [
1325
+ {
1326
+ internalType: 'uint256',
1327
+ name: '',
1328
+ type: 'uint256',
1329
+ },
1330
+ ],
1331
+ stateMutability: 'nonpayable',
1332
+ type: 'function',
1333
+ },
1334
+ {
1335
+ inputs: [
1336
+ {
1337
+ internalType: 'uint256[]',
1338
+ name: '_amounts',
1339
+ type: 'uint256[]',
1340
+ },
1341
+ {
1342
+ internalType: 'uint256',
1343
+ name: '_max_burn_amount',
1344
+ type: 'uint256',
1345
+ },
1346
+ ],
1347
+ name: 'remove_liquidity_imbalance',
1348
+ outputs: [
1349
+ {
1350
+ internalType: 'uint256',
1351
+ name: '',
1352
+ type: 'uint256',
1353
+ },
1354
+ ],
1355
+ stateMutability: 'nonpayable',
1356
+ type: 'function',
1357
+ },
1358
+ {
1359
+ inputs: [
1360
+ {
1361
+ internalType: 'uint256',
1362
+ name: '_burn_amount',
1363
+ type: 'uint256',
1364
+ },
1365
+ {
1366
+ internalType: 'int128',
1367
+ name: 'i',
1368
+ type: 'int128',
1369
+ },
1370
+ {
1371
+ internalType: 'uint256',
1372
+ name: '_min_received',
1373
+ type: 'uint256',
1374
+ },
1375
+ {
1376
+ internalType: 'address',
1377
+ name: '_receiver',
1378
+ type: 'address',
1379
+ },
1380
+ ],
1381
+ name: 'remove_liquidity_one_coin',
1382
+ outputs: [
1383
+ {
1384
+ internalType: 'uint256',
1385
+ name: '',
1386
+ type: 'uint256',
1387
+ },
1388
+ ],
1389
+ stateMutability: 'nonpayable',
1390
+ type: 'function',
1391
+ },
1392
+ {
1393
+ inputs: [
1394
+ {
1395
+ internalType: 'uint256',
1396
+ name: '_burn_amount',
1397
+ type: 'uint256',
1398
+ },
1399
+ {
1400
+ internalType: 'int128',
1401
+ name: 'i',
1402
+ type: 'int128',
1403
+ },
1404
+ {
1405
+ internalType: 'uint256',
1406
+ name: '_min_received',
1407
+ type: 'uint256',
1408
+ },
1409
+ ],
1410
+ name: 'remove_liquidity_one_coin',
1411
+ outputs: [
1412
+ {
1413
+ internalType: 'uint256',
1414
+ name: '',
1415
+ type: 'uint256',
1416
+ },
1417
+ ],
1418
+ stateMutability: 'nonpayable',
1419
+ type: 'function',
1420
+ },
1421
+ {
1422
+ inputs: [],
1423
+ name: 'salt',
1424
+ outputs: [
1425
+ {
1426
+ internalType: 'bytes32',
1427
+ name: '',
1428
+ type: 'bytes32',
1429
+ },
1430
+ ],
1431
+ stateMutability: 'view',
1432
+ type: 'function',
1433
+ },
1434
+ {
1435
+ inputs: [
1436
+ {
1437
+ internalType: 'uint256',
1438
+ name: '_ma_exp_time',
1439
+ type: 'uint256',
1440
+ },
1441
+ {
1442
+ internalType: 'uint256',
1443
+ name: '_D_ma_time',
1444
+ type: 'uint256',
1445
+ },
1446
+ ],
1447
+ name: 'set_ma_exp_time',
1448
+ outputs: [],
1449
+ stateMutability: 'nonpayable',
1450
+ type: 'function',
1451
+ },
1452
+ {
1453
+ inputs: [
1454
+ {
1455
+ internalType: 'uint256',
1456
+ name: '_new_fee',
1457
+ type: 'uint256',
1458
+ },
1459
+ {
1460
+ internalType: 'uint256',
1461
+ name: '_new_offpeg_fee_multiplier',
1462
+ type: 'uint256',
1463
+ },
1464
+ ],
1465
+ name: 'set_new_fee',
1466
+ outputs: [],
1467
+ stateMutability: 'nonpayable',
1468
+ type: 'function',
1469
+ },
1470
+ {
1471
+ inputs: [],
1472
+ name: 'stop_ramp_A',
1473
+ outputs: [],
1474
+ stateMutability: 'nonpayable',
1475
+ type: 'function',
1476
+ },
1477
+ {
1478
+ inputs: [],
1479
+ name: 'stored_rates',
1480
+ outputs: [
1481
+ {
1482
+ internalType: 'uint256[]',
1483
+ name: '',
1484
+ type: 'uint256[]',
1485
+ },
1486
+ ],
1487
+ stateMutability: 'view',
1488
+ type: 'function',
1489
+ },
1490
+ {
1491
+ inputs: [],
1492
+ name: 'symbol',
1493
+ outputs: [
1494
+ {
1495
+ internalType: 'string',
1496
+ name: '',
1497
+ type: 'string',
1498
+ },
1499
+ ],
1500
+ stateMutability: 'view',
1501
+ type: 'function',
1502
+ },
1503
+ {
1504
+ inputs: [],
1505
+ name: 'totalSupply',
1506
+ outputs: [
1507
+ {
1508
+ internalType: 'uint256',
1509
+ name: '',
1510
+ type: 'uint256',
1511
+ },
1512
+ ],
1513
+ stateMutability: 'view',
1514
+ type: 'function',
1515
+ },
1516
+ {
1517
+ inputs: [
1518
+ {
1519
+ internalType: 'address',
1520
+ name: '_to',
1521
+ type: 'address',
1522
+ },
1523
+ {
1524
+ internalType: 'uint256',
1525
+ name: '_value',
1526
+ type: 'uint256',
1527
+ },
1528
+ ],
1529
+ name: 'transfer',
1530
+ outputs: [
1531
+ {
1532
+ internalType: 'bool',
1533
+ name: '',
1534
+ type: 'bool',
1535
+ },
1536
+ ],
1537
+ stateMutability: 'nonpayable',
1538
+ type: 'function',
1539
+ },
1540
+ {
1541
+ inputs: [
1542
+ {
1543
+ internalType: 'address',
1544
+ name: '_from',
1545
+ type: 'address',
1546
+ },
1547
+ {
1548
+ internalType: 'address',
1549
+ name: '_to',
1550
+ type: 'address',
1551
+ },
1552
+ {
1553
+ internalType: 'uint256',
1554
+ name: '_value',
1555
+ type: 'uint256',
1556
+ },
1557
+ ],
1558
+ name: 'transferFrom',
1559
+ outputs: [
1560
+ {
1561
+ internalType: 'bool',
1562
+ name: '',
1563
+ type: 'bool',
1564
+ },
1565
+ ],
1566
+ stateMutability: 'nonpayable',
1567
+ type: 'function',
1568
+ },
1569
+ {
1570
+ inputs: [],
1571
+ name: 'version',
1572
+ outputs: [
1573
+ {
1574
+ internalType: 'string',
1575
+ name: '',
1576
+ type: 'string',
1577
+ },
1578
+ ],
1579
+ stateMutability: 'view',
1580
+ type: 'function',
1581
+ },
1582
+ {
1583
+ inputs: [],
1584
+ name: 'withdraw_admin_fees',
1585
+ outputs: [],
1586
+ stateMutability: 'nonpayable',
1587
+ type: 'function',
1588
+ },
1589
+ ] as const;