@curvefi/api 1.10.0 → 1.14.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 (43) hide show
  1. package/README.md +38 -0
  2. package/lib/constants/abis/abis-ethereum.d.ts +1 -1
  3. package/lib/constants/abis/abis-ethereum.js +68 -2
  4. package/lib/constants/abis/abis-polygon.d.ts +4 -0
  5. package/lib/constants/abis/abis-polygon.js +154 -0
  6. package/lib/constants/abis/json/atricrypto3/swap.json +1269 -0
  7. package/lib/constants/abis/json/atricrypto3/zap.json +239 -0
  8. package/lib/constants/abis/json/busd/deposit.json +5 -10
  9. package/lib/constants/abis/json/busd/swap.json +18 -36
  10. package/lib/constants/abis/json/compound/deposit.json +5 -10
  11. package/lib/constants/abis/json/compound/migration.json +1 -2
  12. package/lib/constants/abis/json/compound/oldSwap.json +16 -32
  13. package/lib/constants/abis/json/compound/swap.json +18 -36
  14. package/lib/constants/abis/json/iearn/deposit.json +5 -10
  15. package/lib/constants/abis/json/iearn/swap.json +18 -36
  16. package/lib/constants/abis/json/paave/rewards.json +657 -0
  17. package/lib/constants/abis/json/pax/deposit.json +5 -10
  18. package/lib/constants/abis/json/pax/swap.json +19 -38
  19. package/lib/constants/abis/json/ren/swap.json +19 -38
  20. package/lib/constants/abis/json/ren-polygon/swap.json +1112 -0
  21. package/lib/constants/abis/json/sbtc/swap.json +19 -38
  22. package/lib/constants/abis/json/streamer.json +257 -0
  23. package/lib/constants/abis/json/susdv2/deposit.json +5 -10
  24. package/lib/constants/abis/json/susdv2/swap.json +16 -32
  25. package/lib/constants/abis/json/usdt/deposit.json +5 -10
  26. package/lib/constants/abis/json/usdt/swap.json +19 -37
  27. package/lib/constants/aliases.d.ts +16 -0
  28. package/lib/constants/aliases.js +19 -0
  29. package/lib/constants/coins-ethereum.d.ts +31 -0
  30. package/lib/constants/{coins.js → coins-ethereum.js} +48 -14
  31. package/lib/constants/coins-polygon.d.ts +31 -0
  32. package/lib/constants/coins-polygon.js +74 -0
  33. package/lib/curve.d.ts +23 -7
  34. package/lib/curve.js +133 -91
  35. package/lib/index.d.ts +2 -1
  36. package/lib/index.js +3 -0
  37. package/lib/interfaces.d.ts +3 -0
  38. package/lib/pools.d.ts +25 -4
  39. package/lib/pools.js +323 -101
  40. package/lib/utils.d.ts +1 -1
  41. package/lib/utils.js +49 -41
  42. package/package.json +6 -5
  43. package/lib/constants/coins.d.ts +0 -25
@@ -0,0 +1,657 @@
1
+ [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "address",
6
+ "name": "_owner",
7
+ "type": "address"
8
+ },
9
+ {
10
+ "internalType": "address",
11
+ "name": "_rewardsDistribution",
12
+ "type": "address"
13
+ },
14
+ {
15
+ "internalType": "address",
16
+ "name": "_rewardsToken",
17
+ "type": "address"
18
+ },
19
+ {
20
+ "internalType": "address",
21
+ "name": "_stakingToken",
22
+ "type": "address"
23
+ },
24
+ {
25
+ "internalType": "uint256",
26
+ "name": "_rewardsDuration",
27
+ "type": "uint256"
28
+ }
29
+ ],
30
+ "payable": false,
31
+ "stateMutability": "nonpayable",
32
+ "type": "constructor"
33
+ },
34
+ {
35
+ "anonymous": false,
36
+ "inputs": [
37
+ {
38
+ "indexed": false,
39
+ "internalType": "address",
40
+ "name": "oldOwner",
41
+ "type": "address"
42
+ },
43
+ {
44
+ "indexed": false,
45
+ "internalType": "address",
46
+ "name": "newOwner",
47
+ "type": "address"
48
+ }
49
+ ],
50
+ "name": "OwnerChanged",
51
+ "type": "event"
52
+ },
53
+ {
54
+ "anonymous": false,
55
+ "inputs": [
56
+ {
57
+ "indexed": false,
58
+ "internalType": "address",
59
+ "name": "newOwner",
60
+ "type": "address"
61
+ }
62
+ ],
63
+ "name": "OwnerNominated",
64
+ "type": "event"
65
+ },
66
+ {
67
+ "anonymous": false,
68
+ "inputs": [
69
+ {
70
+ "indexed": false,
71
+ "internalType": "bool",
72
+ "name": "isPaused",
73
+ "type": "bool"
74
+ }
75
+ ],
76
+ "name": "PauseChanged",
77
+ "type": "event"
78
+ },
79
+ {
80
+ "anonymous": false,
81
+ "inputs": [
82
+ {
83
+ "indexed": false,
84
+ "internalType": "address",
85
+ "name": "token",
86
+ "type": "address"
87
+ },
88
+ {
89
+ "indexed": false,
90
+ "internalType": "uint256",
91
+ "name": "amount",
92
+ "type": "uint256"
93
+ }
94
+ ],
95
+ "name": "Recovered",
96
+ "type": "event"
97
+ },
98
+ {
99
+ "anonymous": false,
100
+ "inputs": [
101
+ {
102
+ "indexed": false,
103
+ "internalType": "uint256",
104
+ "name": "reward",
105
+ "type": "uint256"
106
+ }
107
+ ],
108
+ "name": "RewardAdded",
109
+ "type": "event"
110
+ },
111
+ {
112
+ "anonymous": false,
113
+ "inputs": [
114
+ {
115
+ "indexed": true,
116
+ "internalType": "address",
117
+ "name": "user",
118
+ "type": "address"
119
+ },
120
+ {
121
+ "indexed": false,
122
+ "internalType": "uint256",
123
+ "name": "reward",
124
+ "type": "uint256"
125
+ }
126
+ ],
127
+ "name": "RewardPaid",
128
+ "type": "event"
129
+ },
130
+ {
131
+ "anonymous": false,
132
+ "inputs": [
133
+ {
134
+ "indexed": false,
135
+ "internalType": "uint256",
136
+ "name": "newDuration",
137
+ "type": "uint256"
138
+ }
139
+ ],
140
+ "name": "RewardsDurationUpdated",
141
+ "type": "event"
142
+ },
143
+ {
144
+ "anonymous": false,
145
+ "inputs": [
146
+ {
147
+ "indexed": true,
148
+ "internalType": "address",
149
+ "name": "user",
150
+ "type": "address"
151
+ },
152
+ {
153
+ "indexed": false,
154
+ "internalType": "uint256",
155
+ "name": "amount",
156
+ "type": "uint256"
157
+ }
158
+ ],
159
+ "name": "Staked",
160
+ "type": "event"
161
+ },
162
+ {
163
+ "anonymous": false,
164
+ "inputs": [
165
+ {
166
+ "indexed": true,
167
+ "internalType": "address",
168
+ "name": "user",
169
+ "type": "address"
170
+ },
171
+ {
172
+ "indexed": false,
173
+ "internalType": "uint256",
174
+ "name": "amount",
175
+ "type": "uint256"
176
+ }
177
+ ],
178
+ "name": "Withdrawn",
179
+ "type": "event"
180
+ },
181
+ {
182
+ "constant": false,
183
+ "inputs": [],
184
+ "name": "acceptOwnership",
185
+ "outputs": [],
186
+ "payable": false,
187
+ "stateMutability": "nonpayable",
188
+ "type": "function"
189
+ },
190
+ {
191
+ "constant": true,
192
+ "inputs": [
193
+ {
194
+ "internalType": "address",
195
+ "name": "account",
196
+ "type": "address"
197
+ }
198
+ ],
199
+ "name": "balanceOf",
200
+ "outputs": [
201
+ {
202
+ "internalType": "uint256",
203
+ "name": "",
204
+ "type": "uint256"
205
+ }
206
+ ],
207
+ "payable": false,
208
+ "stateMutability": "view",
209
+ "type": "function"
210
+ },
211
+ {
212
+ "constant": true,
213
+ "inputs": [
214
+ {
215
+ "internalType": "address",
216
+ "name": "account",
217
+ "type": "address"
218
+ }
219
+ ],
220
+ "name": "earned",
221
+ "outputs": [
222
+ {
223
+ "internalType": "uint256",
224
+ "name": "",
225
+ "type": "uint256"
226
+ }
227
+ ],
228
+ "payable": false,
229
+ "stateMutability": "view",
230
+ "type": "function"
231
+ },
232
+ {
233
+ "constant": false,
234
+ "inputs": [],
235
+ "name": "exit",
236
+ "outputs": [],
237
+ "payable": false,
238
+ "stateMutability": "nonpayable",
239
+ "type": "function"
240
+ },
241
+ {
242
+ "constant": false,
243
+ "inputs": [],
244
+ "name": "getReward",
245
+ "outputs": [],
246
+ "payable": false,
247
+ "stateMutability": "nonpayable",
248
+ "type": "function"
249
+ },
250
+ {
251
+ "constant": true,
252
+ "inputs": [],
253
+ "name": "getRewardForDuration",
254
+ "outputs": [
255
+ {
256
+ "internalType": "uint256",
257
+ "name": "",
258
+ "type": "uint256"
259
+ }
260
+ ],
261
+ "payable": false,
262
+ "stateMutability": "view",
263
+ "type": "function"
264
+ },
265
+ {
266
+ "constant": true,
267
+ "inputs": [],
268
+ "name": "lastPauseTime",
269
+ "outputs": [
270
+ {
271
+ "internalType": "uint256",
272
+ "name": "",
273
+ "type": "uint256"
274
+ }
275
+ ],
276
+ "payable": false,
277
+ "stateMutability": "view",
278
+ "type": "function"
279
+ },
280
+ {
281
+ "constant": true,
282
+ "inputs": [],
283
+ "name": "lastTimeRewardApplicable",
284
+ "outputs": [
285
+ {
286
+ "internalType": "uint256",
287
+ "name": "",
288
+ "type": "uint256"
289
+ }
290
+ ],
291
+ "payable": false,
292
+ "stateMutability": "view",
293
+ "type": "function"
294
+ },
295
+ {
296
+ "constant": true,
297
+ "inputs": [],
298
+ "name": "lastUpdateTime",
299
+ "outputs": [
300
+ {
301
+ "internalType": "uint256",
302
+ "name": "",
303
+ "type": "uint256"
304
+ }
305
+ ],
306
+ "payable": false,
307
+ "stateMutability": "view",
308
+ "type": "function"
309
+ },
310
+ {
311
+ "constant": false,
312
+ "inputs": [
313
+ {
314
+ "internalType": "address",
315
+ "name": "_owner",
316
+ "type": "address"
317
+ }
318
+ ],
319
+ "name": "nominateNewOwner",
320
+ "outputs": [],
321
+ "payable": false,
322
+ "stateMutability": "nonpayable",
323
+ "type": "function"
324
+ },
325
+ {
326
+ "constant": true,
327
+ "inputs": [],
328
+ "name": "nominatedOwner",
329
+ "outputs": [
330
+ {
331
+ "internalType": "address",
332
+ "name": "",
333
+ "type": "address"
334
+ }
335
+ ],
336
+ "payable": false,
337
+ "stateMutability": "view",
338
+ "type": "function"
339
+ },
340
+ {
341
+ "constant": false,
342
+ "inputs": [
343
+ {
344
+ "internalType": "uint256",
345
+ "name": "reward",
346
+ "type": "uint256"
347
+ }
348
+ ],
349
+ "name": "notifyRewardAmount",
350
+ "outputs": [],
351
+ "payable": false,
352
+ "stateMutability": "nonpayable",
353
+ "type": "function"
354
+ },
355
+ {
356
+ "constant": true,
357
+ "inputs": [],
358
+ "name": "owner",
359
+ "outputs": [
360
+ {
361
+ "internalType": "address",
362
+ "name": "",
363
+ "type": "address"
364
+ }
365
+ ],
366
+ "payable": false,
367
+ "stateMutability": "view",
368
+ "type": "function"
369
+ },
370
+ {
371
+ "constant": true,
372
+ "inputs": [],
373
+ "name": "paused",
374
+ "outputs": [
375
+ {
376
+ "internalType": "bool",
377
+ "name": "",
378
+ "type": "bool"
379
+ }
380
+ ],
381
+ "payable": false,
382
+ "stateMutability": "view",
383
+ "type": "function"
384
+ },
385
+ {
386
+ "constant": true,
387
+ "inputs": [],
388
+ "name": "periodFinish",
389
+ "outputs": [
390
+ {
391
+ "internalType": "uint256",
392
+ "name": "",
393
+ "type": "uint256"
394
+ }
395
+ ],
396
+ "payable": false,
397
+ "stateMutability": "view",
398
+ "type": "function"
399
+ },
400
+ {
401
+ "constant": false,
402
+ "inputs": [
403
+ {
404
+ "internalType": "address",
405
+ "name": "tokenAddress",
406
+ "type": "address"
407
+ },
408
+ {
409
+ "internalType": "uint256",
410
+ "name": "tokenAmount",
411
+ "type": "uint256"
412
+ }
413
+ ],
414
+ "name": "recoverERC20",
415
+ "outputs": [],
416
+ "payable": false,
417
+ "stateMutability": "nonpayable",
418
+ "type": "function"
419
+ },
420
+ {
421
+ "constant": true,
422
+ "inputs": [],
423
+ "name": "rewardPerToken",
424
+ "outputs": [
425
+ {
426
+ "internalType": "uint256",
427
+ "name": "",
428
+ "type": "uint256"
429
+ }
430
+ ],
431
+ "payable": false,
432
+ "stateMutability": "view",
433
+ "type": "function"
434
+ },
435
+ {
436
+ "constant": true,
437
+ "inputs": [],
438
+ "name": "rewardPerTokenStored",
439
+ "outputs": [
440
+ {
441
+ "internalType": "uint256",
442
+ "name": "",
443
+ "type": "uint256"
444
+ }
445
+ ],
446
+ "payable": false,
447
+ "stateMutability": "view",
448
+ "type": "function"
449
+ },
450
+ {
451
+ "constant": true,
452
+ "inputs": [],
453
+ "name": "rewardRate",
454
+ "outputs": [
455
+ {
456
+ "internalType": "uint256",
457
+ "name": "",
458
+ "type": "uint256"
459
+ }
460
+ ],
461
+ "payable": false,
462
+ "stateMutability": "view",
463
+ "type": "function"
464
+ },
465
+ {
466
+ "constant": true,
467
+ "inputs": [
468
+ {
469
+ "internalType": "address",
470
+ "name": "",
471
+ "type": "address"
472
+ }
473
+ ],
474
+ "name": "rewards",
475
+ "outputs": [
476
+ {
477
+ "internalType": "uint256",
478
+ "name": "",
479
+ "type": "uint256"
480
+ }
481
+ ],
482
+ "payable": false,
483
+ "stateMutability": "view",
484
+ "type": "function"
485
+ },
486
+ {
487
+ "constant": true,
488
+ "inputs": [],
489
+ "name": "rewardsDistribution",
490
+ "outputs": [
491
+ {
492
+ "internalType": "address",
493
+ "name": "",
494
+ "type": "address"
495
+ }
496
+ ],
497
+ "payable": false,
498
+ "stateMutability": "view",
499
+ "type": "function"
500
+ },
501
+ {
502
+ "constant": true,
503
+ "inputs": [],
504
+ "name": "rewardsDuration",
505
+ "outputs": [
506
+ {
507
+ "internalType": "uint256",
508
+ "name": "",
509
+ "type": "uint256"
510
+ }
511
+ ],
512
+ "payable": false,
513
+ "stateMutability": "view",
514
+ "type": "function"
515
+ },
516
+ {
517
+ "constant": true,
518
+ "inputs": [],
519
+ "name": "rewardsToken",
520
+ "outputs": [
521
+ {
522
+ "internalType": "contract IERC20",
523
+ "name": "",
524
+ "type": "address"
525
+ }
526
+ ],
527
+ "payable": false,
528
+ "stateMutability": "view",
529
+ "type": "function"
530
+ },
531
+ {
532
+ "constant": false,
533
+ "inputs": [
534
+ {
535
+ "internalType": "bool",
536
+ "name": "_paused",
537
+ "type": "bool"
538
+ }
539
+ ],
540
+ "name": "setPaused",
541
+ "outputs": [],
542
+ "payable": false,
543
+ "stateMutability": "nonpayable",
544
+ "type": "function"
545
+ },
546
+ {
547
+ "constant": false,
548
+ "inputs": [
549
+ {
550
+ "internalType": "address",
551
+ "name": "_rewardsDistribution",
552
+ "type": "address"
553
+ }
554
+ ],
555
+ "name": "setRewardsDistribution",
556
+ "outputs": [],
557
+ "payable": false,
558
+ "stateMutability": "nonpayable",
559
+ "type": "function"
560
+ },
561
+ {
562
+ "constant": false,
563
+ "inputs": [
564
+ {
565
+ "internalType": "uint256",
566
+ "name": "_rewardsDuration",
567
+ "type": "uint256"
568
+ }
569
+ ],
570
+ "name": "setRewardsDuration",
571
+ "outputs": [],
572
+ "payable": false,
573
+ "stateMutability": "nonpayable",
574
+ "type": "function"
575
+ },
576
+ {
577
+ "constant": false,
578
+ "inputs": [
579
+ {
580
+ "internalType": "uint256",
581
+ "name": "amount",
582
+ "type": "uint256"
583
+ }
584
+ ],
585
+ "name": "stake",
586
+ "outputs": [],
587
+ "payable": false,
588
+ "stateMutability": "nonpayable",
589
+ "type": "function"
590
+ },
591
+ {
592
+ "constant": true,
593
+ "inputs": [],
594
+ "name": "stakingToken",
595
+ "outputs": [
596
+ {
597
+ "internalType": "contract IERC20",
598
+ "name": "",
599
+ "type": "address"
600
+ }
601
+ ],
602
+ "payable": false,
603
+ "stateMutability": "view",
604
+ "type": "function"
605
+ },
606
+ {
607
+ "constant": true,
608
+ "inputs": [],
609
+ "name": "totalSupply",
610
+ "outputs": [
611
+ {
612
+ "internalType": "uint256",
613
+ "name": "",
614
+ "type": "uint256"
615
+ }
616
+ ],
617
+ "payable": false,
618
+ "stateMutability": "view",
619
+ "type": "function"
620
+ },
621
+ {
622
+ "constant": true,
623
+ "inputs": [
624
+ {
625
+ "internalType": "address",
626
+ "name": "",
627
+ "type": "address"
628
+ }
629
+ ],
630
+ "name": "userRewardPerTokenPaid",
631
+ "outputs": [
632
+ {
633
+ "internalType": "uint256",
634
+ "name": "",
635
+ "type": "uint256"
636
+ }
637
+ ],
638
+ "payable": false,
639
+ "stateMutability": "view",
640
+ "type": "function"
641
+ },
642
+ {
643
+ "constant": false,
644
+ "inputs": [
645
+ {
646
+ "internalType": "uint256",
647
+ "name": "amount",
648
+ "type": "uint256"
649
+ }
650
+ ],
651
+ "name": "withdraw",
652
+ "outputs": [],
653
+ "payable": false,
654
+ "stateMutability": "nonpayable",
655
+ "type": "function"
656
+ }
657
+ ]
@@ -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": "3881771"
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
  }