@curvefi/api 1.11.0 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/README.md +68 -0
  2. package/lib/constants/abis/abis-ethereum.js +144 -16
  3. package/lib/constants/abis/abis-polygon.js +17 -1
  4. package/lib/constants/abis/json/aave/rewards.json +107 -0
  5. package/lib/constants/abis/json/atricrypto3/swap.json +63 -63
  6. package/lib/constants/abis/json/atricrypto3/zap.json +8 -8
  7. package/lib/constants/abis/json/busd/deposit.json +5 -10
  8. package/lib/constants/abis/json/busd/swap.json +18 -36
  9. package/lib/constants/abis/json/compound/deposit.json +5 -10
  10. package/lib/constants/abis/json/compound/migration.json +1 -2
  11. package/lib/constants/abis/json/compound/oldSwap.json +16 -32
  12. package/lib/constants/abis/json/compound/swap.json +18 -36
  13. package/lib/constants/abis/json/crveth/swap.json +61 -61
  14. package/lib/constants/abis/json/eurt/swap.json +29 -29
  15. package/lib/constants/abis/json/eurtusd/deposit.json +13 -13
  16. package/lib/constants/abis/json/eurtusd/swap.json +59 -59
  17. package/lib/constants/abis/json/gauge.json +1 -1
  18. package/lib/constants/abis/json/gauge_factory.json +879 -0
  19. package/lib/constants/abis/json/gauge_rewards_only.json +649 -0
  20. package/lib/constants/abis/json/gauge_synthetix.json +590 -0
  21. package/lib/constants/abis/json/gauge_v2.json +942 -0
  22. package/lib/constants/abis/json/gauge_v3.json +954 -0
  23. package/lib/constants/abis/json/gauge_v4.json +913 -0
  24. package/lib/constants/abis/json/iearn/deposit.json +5 -10
  25. package/lib/constants/abis/json/iearn/swap.json +18 -36
  26. package/lib/constants/abis/json/minter.json +165 -0
  27. package/lib/constants/abis/json/pax/deposit.json +5 -10
  28. package/lib/constants/abis/json/pax/swap.json +19 -38
  29. package/lib/constants/abis/json/ren/swap.json +19 -38
  30. package/lib/constants/abis/json/ren-polygon/swap.json +46 -46
  31. package/lib/constants/abis/json/reth/swap.json +38 -38
  32. package/lib/constants/abis/json/sbtc/swap.json +19 -38
  33. package/lib/constants/abis/json/streamer.json +257 -0
  34. package/lib/constants/abis/json/susdv2/deposit.json +5 -10
  35. package/lib/constants/abis/json/susdv2/swap.json +16 -32
  36. package/lib/constants/abis/json/tricrypto2/deposit.json +3 -3
  37. package/lib/constants/abis/json/tricrypto2/swap.json +60 -60
  38. package/lib/constants/abis/json/usdt/deposit.json +5 -10
  39. package/lib/constants/abis/json/usdt/swap.json +19 -37
  40. package/lib/constants/aliases.d.ts +2 -0
  41. package/lib/constants/aliases.js +3 -1
  42. package/lib/constants/coins-ethereum.js +4 -2
  43. package/lib/constants/coins-polygon.js +3 -2
  44. package/lib/curve.d.ts +2 -1
  45. package/lib/curve.js +73 -30
  46. package/lib/index.d.ts +1 -1
  47. package/lib/interfaces.d.ts +8 -0
  48. package/lib/pools.d.ts +36 -5
  49. package/lib/pools.js +313 -52
  50. package/lib/utils.d.ts +1 -1
  51. package/lib/utils.js +40 -29
  52. package/package.json +1 -1
@@ -92,7 +92,7 @@
92
92
  "type": "function"
93
93
  },
94
94
  {
95
- "gas": 8403,
95
+ "gas": "8403",
96
96
  "inputs": [
97
97
  {
98
98
  "name": "i",
@@ -118,7 +118,7 @@
118
118
  "type": "function"
119
119
  },
120
120
  {
121
- "gas": 4305,
121
+ "gas": "4305",
122
122
  "inputs": [
123
123
  {
124
124
  "name": "_amounts",
@@ -140,7 +140,7 @@
140
140
  "type": "function"
141
141
  },
142
142
  {
143
- "gas": 6199,
143
+ "gas": "6199",
144
144
  "inputs": [
145
145
  {
146
146
  "name": "token_amount",
@@ -162,7 +162,7 @@
162
162
  "type": "function"
163
163
  },
164
164
  {
165
- "gas": 1343,
165
+ "gas": "1343",
166
166
  "inputs": [
167
167
  {
168
168
  "name": "arg0",
@@ -180,7 +180,7 @@
180
180
  "type": "function"
181
181
  },
182
182
  {
183
- "gas": 1373,
183
+ "gas": "1373",
184
184
  "inputs": [
185
185
  {
186
186
  "name": "arg0",
@@ -198,7 +198,7 @@
198
198
  "type": "function"
199
199
  },
200
200
  {
201
- "gas": 1358,
201
+ "gas": "1358",
202
202
  "inputs": [],
203
203
  "name": "pool",
204
204
  "outputs": [
@@ -211,7 +211,7 @@
211
211
  "type": "function"
212
212
  },
213
213
  {
214
- "gas": 1388,
214
+ "gas": "1388",
215
215
  "inputs": [],
216
216
  "name": "base_pool",
217
217
  "outputs": [
@@ -224,7 +224,7 @@
224
224
  "type": "function"
225
225
  },
226
226
  {
227
- "gas": 1418,
227
+ "gas": "1418",
228
228
  "inputs": [],
229
229
  "name": "token",
230
230
  "outputs": [
@@ -95,8 +95,7 @@
95
95
  "name": "i"
96
96
  }
97
97
  ],
98
- "constant": true,
99
- "payable": false,
98
+ "stateMutability": "view",
100
99
  "type": "function",
101
100
  "gas": "3881601"
102
101
  },
@@ -144,8 +143,7 @@
144
143
  "name": "arg0"
145
144
  }
146
145
  ],
147
- "constant": true,
148
- "payable": false,
146
+ "stateMutability": "view",
149
147
  "type": "function",
150
148
  "gas": "1680"
151
149
  },
@@ -163,8 +161,7 @@
163
161
  "name": "arg0"
164
162
  }
165
163
  ],
166
- "constant": true,
167
- "payable": false,
164
+ "stateMutability": "view",
168
165
  "type": "function",
169
166
  "gas": "1710"
170
167
  },
@@ -177,8 +174,7 @@
177
174
  }
178
175
  ],
179
176
  "inputs": [],
180
- "constant": true,
181
- "payable": false,
177
+ "stateMutability": "view",
182
178
  "type": "function",
183
179
  "gas": "1541"
184
180
  },
@@ -191,8 +187,7 @@
191
187
  }
192
188
  ],
193
189
  "inputs": [],
194
- "constant": true,
195
- "payable": false,
190
+ "stateMutability": "view",
196
191
  "type": "function",
197
192
  "gas": "1571"
198
193
  }
@@ -271,8 +271,7 @@
271
271
  }
272
272
  ],
273
273
  "inputs": [],
274
- "constant": true,
275
- "payable": false,
274
+ "stateMutability": "view",
276
275
  "type": "function",
277
276
  "gas": "1535185"
278
277
  },
@@ -294,8 +293,7 @@
294
293
  "name": "deposit"
295
294
  }
296
295
  ],
297
- "constant": true,
298
- "payable": false,
296
+ "stateMutability": "view",
299
297
  "type": "function",
300
298
  "gas": "6067881"
301
299
  },
@@ -339,8 +337,7 @@
339
337
  "name": "dx"
340
338
  }
341
339
  ],
342
- "constant": true,
343
- "payable": false,
340
+ "stateMutability": "view",
344
341
  "type": "function",
345
342
  "gas": "3454227"
346
343
  },
@@ -366,8 +363,7 @@
366
363
  "name": "dy"
367
364
  }
368
365
  ],
369
- "constant": true,
370
- "payable": false,
366
+ "stateMutability": "view",
371
367
  "type": "function",
372
368
  "gas": "3454232"
373
369
  },
@@ -393,8 +389,7 @@
393
389
  "name": "dx"
394
390
  }
395
391
  ],
396
- "constant": true,
397
- "payable": false,
392
+ "stateMutability": "view",
398
393
  "type": "function",
399
394
  "gas": "3454087"
400
395
  },
@@ -420,8 +415,7 @@
420
415
  "name": "dy"
421
416
  }
422
417
  ],
423
- "constant": true,
424
- "payable": false,
418
+ "stateMutability": "view",
425
419
  "type": "function",
426
420
  "gas": "3454093"
427
421
  },
@@ -626,8 +620,7 @@
626
620
  "name": "arg0"
627
621
  }
628
622
  ],
629
- "constant": true,
630
- "payable": false,
623
+ "stateMutability": "view",
631
624
  "type": "function",
632
625
  "gas": "2160"
633
626
  },
@@ -645,8 +638,7 @@
645
638
  "name": "arg0"
646
639
  }
647
640
  ],
648
- "constant": true,
649
- "payable": false,
641
+ "stateMutability": "view",
650
642
  "type": "function",
651
643
  "gas": "2190"
652
644
  },
@@ -677,8 +669,7 @@
677
669
  }
678
670
  ],
679
671
  "inputs": [],
680
- "constant": true,
681
- "payable": false,
672
+ "stateMutability": "view",
682
673
  "type": "function",
683
674
  "gas": "2051"
684
675
  },
@@ -691,8 +682,7 @@
691
682
  }
692
683
  ],
693
684
  "inputs": [],
694
- "constant": true,
695
- "payable": false,
685
+ "stateMutability": "view",
696
686
  "type": "function",
697
687
  "gas": "2081"
698
688
  },
@@ -705,8 +695,7 @@
705
695
  }
706
696
  ],
707
697
  "inputs": [],
708
- "constant": true,
709
- "payable": false,
698
+ "stateMutability": "view",
710
699
  "type": "function",
711
700
  "gas": "2111"
712
701
  },
@@ -719,8 +708,7 @@
719
708
  }
720
709
  ],
721
710
  "inputs": [],
722
- "constant": true,
723
- "payable": false,
711
+ "stateMutability": "view",
724
712
  "type": "function",
725
713
  "gas": "2141"
726
714
  },
@@ -734,8 +722,7 @@
734
722
  }
735
723
  ],
736
724
  "inputs": [],
737
- "constant": true,
738
- "payable": false,
725
+ "stateMutability": "view",
739
726
  "type": "function",
740
727
  "gas": "2171"
741
728
  },
@@ -749,8 +736,7 @@
749
736
  }
750
737
  ],
751
738
  "inputs": [],
752
- "constant": true,
753
- "payable": false,
739
+ "stateMutability": "view",
754
740
  "type": "function",
755
741
  "gas": "2201"
756
742
  },
@@ -763,8 +749,7 @@
763
749
  }
764
750
  ],
765
751
  "inputs": [],
766
- "constant": true,
767
- "payable": false,
752
+ "stateMutability": "view",
768
753
  "type": "function",
769
754
  "gas": "2231"
770
755
  },
@@ -777,8 +762,7 @@
777
762
  }
778
763
  ],
779
764
  "inputs": [],
780
- "constant": true,
781
- "payable": false,
765
+ "stateMutability": "view",
782
766
  "type": "function",
783
767
  "gas": "2261"
784
768
  },
@@ -791,8 +775,7 @@
791
775
  }
792
776
  ],
793
777
  "inputs": [],
794
- "constant": true,
795
- "payable": false,
778
+ "stateMutability": "view",
796
779
  "type": "function",
797
780
  "gas": "2291"
798
781
  },
@@ -805,8 +788,7 @@
805
788
  }
806
789
  ],
807
790
  "inputs": [],
808
- "constant": true,
809
- "payable": false,
791
+ "stateMutability": "view",
810
792
  "type": "function",
811
793
  "gas": "2321"
812
794
  }
@@ -95,8 +95,7 @@
95
95
  "name": "i"
96
96
  }
97
97
  ],
98
- "constant": true,
99
- "payable": false,
98
+ "stateMutability": "view",
100
99
  "type": "function",
101
100
  "gas": "2945630"
102
101
  },
@@ -144,8 +143,7 @@
144
143
  "name": "arg0"
145
144
  }
146
145
  ],
147
- "constant": true,
148
- "payable": false,
146
+ "stateMutability": "view",
149
147
  "type": "function",
150
148
  "gas": "1680"
151
149
  },
@@ -163,8 +161,7 @@
163
161
  "name": "arg0"
164
162
  }
165
163
  ],
166
- "constant": true,
167
- "payable": false,
164
+ "stateMutability": "view",
168
165
  "type": "function",
169
166
  "gas": "1710"
170
167
  },
@@ -177,8 +174,7 @@
177
174
  }
178
175
  ],
179
176
  "inputs": [],
180
- "constant": true,
181
- "payable": false,
177
+ "stateMutability": "view",
182
178
  "type": "function",
183
179
  "gas": "1541"
184
180
  },
@@ -191,8 +187,7 @@
191
187
  }
192
188
  ],
193
189
  "inputs": [],
194
- "constant": true,
195
- "payable": false,
190
+ "stateMutability": "view",
196
191
  "type": "function",
197
192
  "gas": "1571"
198
193
  }
@@ -50,8 +50,7 @@
50
50
  "name": "arg0"
51
51
  }
52
52
  ],
53
- "constant": true,
54
- "payable": false,
53
+ "stateMutability": "view",
55
54
  "type": "function",
56
55
  "gas": "1380"
57
56
  }
@@ -239,8 +239,7 @@
239
239
  }
240
240
  ],
241
241
  "inputs": [],
242
- "constant": true,
243
- "payable": false,
242
+ "stateMutability": "view",
244
243
  "type": "function",
245
244
  "gas": "1083195"
246
245
  },
@@ -285,8 +284,7 @@
285
284
  "name": "dx"
286
285
  }
287
286
  ],
288
- "constant": true,
289
- "payable": false,
287
+ "stateMutability": "view",
290
288
  "type": "function",
291
289
  "gas": "2540055"
292
290
  },
@@ -312,8 +310,7 @@
312
310
  "name": "dx"
313
311
  }
314
312
  ],
315
- "constant": true,
316
- "payable": false,
313
+ "stateMutability": "view",
317
314
  "type": "function",
318
315
  "gas": "2540024"
319
316
  },
@@ -516,8 +513,7 @@
516
513
  "name": "arg0"
517
514
  }
518
515
  ],
519
- "constant": true,
520
- "payable": false,
516
+ "stateMutability": "view",
521
517
  "type": "function",
522
518
  "gas": "2040"
523
519
  },
@@ -535,8 +531,7 @@
535
531
  "name": "arg0"
536
532
  }
537
533
  ],
538
- "constant": true,
539
- "payable": false,
534
+ "stateMutability": "view",
540
535
  "type": "function",
541
536
  "gas": "2070"
542
537
  },
@@ -554,8 +549,7 @@
554
549
  "name": "arg0"
555
550
  }
556
551
  ],
557
- "constant": true,
558
- "payable": false,
552
+ "stateMutability": "view",
559
553
  "type": "function",
560
554
  "gas": "2100"
561
555
  },
@@ -568,8 +562,7 @@
568
562
  }
569
563
  ],
570
564
  "inputs": [],
571
- "constant": true,
572
- "payable": false,
565
+ "stateMutability": "view",
573
566
  "type": "function",
574
567
  "gas": "1931"
575
568
  },
@@ -582,8 +575,7 @@
582
575
  }
583
576
  ],
584
577
  "inputs": [],
585
- "constant": true,
586
- "payable": false,
578
+ "stateMutability": "view",
587
579
  "type": "function",
588
580
  "gas": "1961"
589
581
  },
@@ -596,8 +588,7 @@
596
588
  }
597
589
  ],
598
590
  "inputs": [],
599
- "constant": true,
600
- "payable": false,
591
+ "stateMutability": "view",
601
592
  "type": "function",
602
593
  "gas": "1991"
603
594
  },
@@ -610,8 +601,7 @@
610
601
  }
611
602
  ],
612
603
  "inputs": [],
613
- "constant": true,
614
- "payable": false,
604
+ "stateMutability": "view",
615
605
  "type": "function",
616
606
  "gas": "2021"
617
607
  },
@@ -625,8 +615,7 @@
625
615
  }
626
616
  ],
627
617
  "inputs": [],
628
- "constant": true,
629
- "payable": false,
618
+ "stateMutability": "view",
630
619
  "type": "function",
631
620
  "gas": "2051"
632
621
  },
@@ -640,8 +629,7 @@
640
629
  }
641
630
  ],
642
631
  "inputs": [],
643
- "constant": true,
644
- "payable": false,
632
+ "stateMutability": "view",
645
633
  "type": "function",
646
634
  "gas": "2081"
647
635
  },
@@ -654,8 +642,7 @@
654
642
  }
655
643
  ],
656
644
  "inputs": [],
657
- "constant": true,
658
- "payable": false,
645
+ "stateMutability": "view",
659
646
  "type": "function",
660
647
  "gas": "2111"
661
648
  },
@@ -668,8 +655,7 @@
668
655
  }
669
656
  ],
670
657
  "inputs": [],
671
- "constant": true,
672
- "payable": false,
658
+ "stateMutability": "view",
673
659
  "type": "function",
674
660
  "gas": "2141"
675
661
  },
@@ -682,8 +668,7 @@
682
668
  }
683
669
  ],
684
670
  "inputs": [],
685
- "constant": true,
686
- "payable": false,
671
+ "stateMutability": "view",
687
672
  "type": "function",
688
673
  "gas": "2171"
689
674
  },
@@ -696,8 +681,7 @@
696
681
  }
697
682
  ],
698
683
  "inputs": [],
699
- "constant": true,
700
- "payable": false,
684
+ "stateMutability": "view",
701
685
  "type": "function",
702
686
  "gas": "2201"
703
687
  }
@@ -271,8 +271,7 @@
271
271
  }
272
272
  ],
273
273
  "inputs": [],
274
- "constant": true,
275
- "payable": false,
274
+ "stateMutability": "view",
276
275
  "type": "function",
277
276
  "gas": "1084167"
278
277
  },
@@ -294,8 +293,7 @@
294
293
  "name": "deposit"
295
294
  }
296
295
  ],
297
- "constant": true,
298
- "payable": false,
296
+ "stateMutability": "view",
299
297
  "type": "function",
300
298
  "gas": "4239939"
301
299
  },
@@ -339,8 +337,7 @@
339
337
  "name": "dx"
340
338
  }
341
339
  ],
342
- "constant": true,
343
- "payable": false,
340
+ "stateMutability": "view",
344
341
  "type": "function",
345
342
  "gas": "2543681"
346
343
  },
@@ -366,8 +363,7 @@
366
363
  "name": "dy"
367
364
  }
368
365
  ],
369
- "constant": true,
370
- "payable": false,
366
+ "stateMutability": "view",
371
367
  "type": "function",
372
368
  "gas": "2543687"
373
369
  },
@@ -393,8 +389,7 @@
393
389
  "name": "dx"
394
390
  }
395
391
  ],
396
- "constant": true,
397
- "payable": false,
392
+ "stateMutability": "view",
398
393
  "type": "function",
399
394
  "gas": "2543506"
400
395
  },
@@ -420,8 +415,7 @@
420
415
  "name": "dy"
421
416
  }
422
417
  ],
423
- "constant": true,
424
- "payable": false,
418
+ "stateMutability": "view",
425
419
  "type": "function",
426
420
  "gas": "2543512"
427
421
  },
@@ -626,8 +620,7 @@
626
620
  "name": "arg0"
627
621
  }
628
622
  ],
629
- "constant": true,
630
- "payable": false,
623
+ "stateMutability": "view",
631
624
  "type": "function",
632
625
  "gas": "2190"
633
626
  },
@@ -645,8 +638,7 @@
645
638
  "name": "arg0"
646
639
  }
647
640
  ],
648
- "constant": true,
649
- "payable": false,
641
+ "stateMutability": "view",
650
642
  "type": "function",
651
643
  "gas": "2220"
652
644
  },
@@ -677,8 +669,7 @@
677
669
  }
678
670
  ],
679
671
  "inputs": [],
680
- "constant": true,
681
- "payable": false,
672
+ "stateMutability": "view",
682
673
  "type": "function",
683
674
  "gas": "2081"
684
675
  },
@@ -691,8 +682,7 @@
691
682
  }
692
683
  ],
693
684
  "inputs": [],
694
- "constant": true,
695
- "payable": false,
685
+ "stateMutability": "view",
696
686
  "type": "function",
697
687
  "gas": "2111"
698
688
  },
@@ -705,8 +695,7 @@
705
695
  }
706
696
  ],
707
697
  "inputs": [],
708
- "constant": true,
709
- "payable": false,
698
+ "stateMutability": "view",
710
699
  "type": "function",
711
700
  "gas": "2141"
712
701
  },
@@ -719,8 +708,7 @@
719
708
  }
720
709
  ],
721
710
  "inputs": [],
722
- "constant": true,
723
- "payable": false,
711
+ "stateMutability": "view",
724
712
  "type": "function",
725
713
  "gas": "2171"
726
714
  },
@@ -734,8 +722,7 @@
734
722
  }
735
723
  ],
736
724
  "inputs": [],
737
- "constant": true,
738
- "payable": false,
725
+ "stateMutability": "view",
739
726
  "type": "function",
740
727
  "gas": "2201"
741
728
  },
@@ -749,8 +736,7 @@
749
736
  }
750
737
  ],
751
738
  "inputs": [],
752
- "constant": true,
753
- "payable": false,
739
+ "stateMutability": "view",
754
740
  "type": "function",
755
741
  "gas": "2231"
756
742
  },
@@ -763,8 +749,7 @@
763
749
  }
764
750
  ],
765
751
  "inputs": [],
766
- "constant": true,
767
- "payable": false,
752
+ "stateMutability": "view",
768
753
  "type": "function",
769
754
  "gas": "2261"
770
755
  },
@@ -777,8 +762,7 @@
777
762
  }
778
763
  ],
779
764
  "inputs": [],
780
- "constant": true,
781
- "payable": false,
765
+ "stateMutability": "view",
782
766
  "type": "function",
783
767
  "gas": "2291"
784
768
  },
@@ -791,8 +775,7 @@
791
775
  }
792
776
  ],
793
777
  "inputs": [],
794
- "constant": true,
795
- "payable": false,
778
+ "stateMutability": "view",
796
779
  "type": "function",
797
780
  "gas": "2321"
798
781
  },
@@ -805,8 +788,7 @@
805
788
  }
806
789
  ],
807
790
  "inputs": [],
808
- "constant": true,
809
- "payable": false,
791
+ "stateMutability": "view",
810
792
  "type": "function",
811
793
  "gas": "2351"
812
794
  }