@curvefi/api 2.71.3 → 2.71.5
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.
|
@@ -464,60 +464,6 @@
|
|
|
464
464
|
"stateMutability": "nonpayable",
|
|
465
465
|
"type": "function"
|
|
466
466
|
},
|
|
467
|
-
{
|
|
468
|
-
"inputs": [
|
|
469
|
-
{
|
|
470
|
-
"name": "i",
|
|
471
|
-
"type": "uint256"
|
|
472
|
-
},
|
|
473
|
-
{
|
|
474
|
-
"name": "j",
|
|
475
|
-
"type": "uint256"
|
|
476
|
-
},
|
|
477
|
-
{
|
|
478
|
-
"name": "dx",
|
|
479
|
-
"type": "uint256"
|
|
480
|
-
},
|
|
481
|
-
{
|
|
482
|
-
"name": "min_dy",
|
|
483
|
-
"type": "uint256"
|
|
484
|
-
},
|
|
485
|
-
{
|
|
486
|
-
"name": "receiver",
|
|
487
|
-
"type": "address"
|
|
488
|
-
}
|
|
489
|
-
],
|
|
490
|
-
"name": "exchange_received",
|
|
491
|
-
"outputs": [
|
|
492
|
-
{
|
|
493
|
-
"name": "",
|
|
494
|
-
"type": "uint256"
|
|
495
|
-
}
|
|
496
|
-
],
|
|
497
|
-
"stateMutability": "nonpayable",
|
|
498
|
-
"type": "function"
|
|
499
|
-
},
|
|
500
|
-
{
|
|
501
|
-
"inputs": [
|
|
502
|
-
{
|
|
503
|
-
"name": "amounts",
|
|
504
|
-
"type": "uint256[2]"
|
|
505
|
-
},
|
|
506
|
-
{
|
|
507
|
-
"name": "min_mint_amount",
|
|
508
|
-
"type": "uint256"
|
|
509
|
-
}
|
|
510
|
-
],
|
|
511
|
-
"name": "add_liquidity",
|
|
512
|
-
"outputs": [
|
|
513
|
-
{
|
|
514
|
-
"name": "",
|
|
515
|
-
"type": "uint256"
|
|
516
|
-
}
|
|
517
|
-
],
|
|
518
|
-
"stateMutability": "nonpayable",
|
|
519
|
-
"type": "function"
|
|
520
|
-
},
|
|
521
467
|
{
|
|
522
468
|
"inputs": [
|
|
523
469
|
{
|
|
@@ -527,39 +473,6 @@
|
|
|
527
473
|
{
|
|
528
474
|
"name": "min_mint_amount",
|
|
529
475
|
"type": "uint256"
|
|
530
|
-
},
|
|
531
|
-
{
|
|
532
|
-
"name": "receiver",
|
|
533
|
-
"type": "address"
|
|
534
|
-
}
|
|
535
|
-
],
|
|
536
|
-
"name": "add_liquidity",
|
|
537
|
-
"outputs": [
|
|
538
|
-
{
|
|
539
|
-
"name": "",
|
|
540
|
-
"type": "uint256"
|
|
541
|
-
}
|
|
542
|
-
],
|
|
543
|
-
"stateMutability": "nonpayable",
|
|
544
|
-
"type": "function"
|
|
545
|
-
},
|
|
546
|
-
{
|
|
547
|
-
"inputs": [
|
|
548
|
-
{
|
|
549
|
-
"name": "amounts",
|
|
550
|
-
"type": "uint256[2]"
|
|
551
|
-
},
|
|
552
|
-
{
|
|
553
|
-
"name": "min_mint_amount",
|
|
554
|
-
"type": "uint256"
|
|
555
|
-
},
|
|
556
|
-
{
|
|
557
|
-
"name": "receiver",
|
|
558
|
-
"type": "address"
|
|
559
|
-
},
|
|
560
|
-
{
|
|
561
|
-
"name": "donation",
|
|
562
|
-
"type": "bool"
|
|
563
476
|
}
|
|
564
477
|
],
|
|
565
478
|
"name": "add_liquidity",
|
|
@@ -593,31 +506,6 @@
|
|
|
593
506
|
"stateMutability": "nonpayable",
|
|
594
507
|
"type": "function"
|
|
595
508
|
},
|
|
596
|
-
{
|
|
597
|
-
"inputs": [
|
|
598
|
-
{
|
|
599
|
-
"name": "amount",
|
|
600
|
-
"type": "uint256"
|
|
601
|
-
},
|
|
602
|
-
{
|
|
603
|
-
"name": "min_amounts",
|
|
604
|
-
"type": "uint256[2]"
|
|
605
|
-
},
|
|
606
|
-
{
|
|
607
|
-
"name": "receiver",
|
|
608
|
-
"type": "address"
|
|
609
|
-
}
|
|
610
|
-
],
|
|
611
|
-
"name": "remove_liquidity",
|
|
612
|
-
"outputs": [
|
|
613
|
-
{
|
|
614
|
-
"name": "",
|
|
615
|
-
"type": "uint256[2]"
|
|
616
|
-
}
|
|
617
|
-
],
|
|
618
|
-
"stateMutability": "nonpayable",
|
|
619
|
-
"type": "function"
|
|
620
|
-
},
|
|
621
509
|
{
|
|
622
510
|
"inputs": [
|
|
623
511
|
{
|
|
@@ -647,39 +535,6 @@
|
|
|
647
535
|
"stateMutability": "nonpayable",
|
|
648
536
|
"type": "function"
|
|
649
537
|
},
|
|
650
|
-
{
|
|
651
|
-
"inputs": [
|
|
652
|
-
{
|
|
653
|
-
"name": "token_amount",
|
|
654
|
-
"type": "uint256"
|
|
655
|
-
},
|
|
656
|
-
{
|
|
657
|
-
"name": "i",
|
|
658
|
-
"type": "uint256"
|
|
659
|
-
},
|
|
660
|
-
{
|
|
661
|
-
"name": "amount_i",
|
|
662
|
-
"type": "uint256"
|
|
663
|
-
},
|
|
664
|
-
{
|
|
665
|
-
"name": "min_amount_j",
|
|
666
|
-
"type": "uint256"
|
|
667
|
-
},
|
|
668
|
-
{
|
|
669
|
-
"name": "receiver",
|
|
670
|
-
"type": "address"
|
|
671
|
-
}
|
|
672
|
-
],
|
|
673
|
-
"name": "remove_liquidity_fixed_out",
|
|
674
|
-
"outputs": [
|
|
675
|
-
{
|
|
676
|
-
"name": "",
|
|
677
|
-
"type": "uint256"
|
|
678
|
-
}
|
|
679
|
-
],
|
|
680
|
-
"stateMutability": "nonpayable",
|
|
681
|
-
"type": "function"
|
|
682
|
-
},
|
|
683
538
|
{
|
|
684
539
|
"inputs": [
|
|
685
540
|
{
|
|
@@ -705,35 +560,6 @@
|
|
|
705
560
|
"stateMutability": "nonpayable",
|
|
706
561
|
"type": "function"
|
|
707
562
|
},
|
|
708
|
-
{
|
|
709
|
-
"inputs": [
|
|
710
|
-
{
|
|
711
|
-
"name": "lp_token_amount",
|
|
712
|
-
"type": "uint256"
|
|
713
|
-
},
|
|
714
|
-
{
|
|
715
|
-
"name": "i",
|
|
716
|
-
"type": "uint256"
|
|
717
|
-
},
|
|
718
|
-
{
|
|
719
|
-
"name": "min_amount",
|
|
720
|
-
"type": "uint256"
|
|
721
|
-
},
|
|
722
|
-
{
|
|
723
|
-
"name": "receiver",
|
|
724
|
-
"type": "address"
|
|
725
|
-
}
|
|
726
|
-
],
|
|
727
|
-
"name": "remove_liquidity_one_coin",
|
|
728
|
-
"outputs": [
|
|
729
|
-
{
|
|
730
|
-
"name": "",
|
|
731
|
-
"type": "uint256"
|
|
732
|
-
}
|
|
733
|
-
],
|
|
734
|
-
"stateMutability": "nonpayable",
|
|
735
|
-
"type": "function"
|
|
736
|
-
},
|
|
737
563
|
{
|
|
738
564
|
"inputs": [],
|
|
739
565
|
"name": "user_supply",
|
|
@@ -954,35 +780,6 @@
|
|
|
954
780
|
"stateMutability": "view",
|
|
955
781
|
"type": "function"
|
|
956
782
|
},
|
|
957
|
-
{
|
|
958
|
-
"inputs": [
|
|
959
|
-
{
|
|
960
|
-
"name": "i",
|
|
961
|
-
"type": "uint256"
|
|
962
|
-
},
|
|
963
|
-
{
|
|
964
|
-
"name": "j",
|
|
965
|
-
"type": "uint256"
|
|
966
|
-
},
|
|
967
|
-
{
|
|
968
|
-
"name": "dy",
|
|
969
|
-
"type": "uint256"
|
|
970
|
-
},
|
|
971
|
-
{
|
|
972
|
-
"name": "n_iter",
|
|
973
|
-
"type": "uint256"
|
|
974
|
-
}
|
|
975
|
-
],
|
|
976
|
-
"name": "get_dx",
|
|
977
|
-
"outputs": [
|
|
978
|
-
{
|
|
979
|
-
"name": "",
|
|
980
|
-
"type": "uint256"
|
|
981
|
-
}
|
|
982
|
-
],
|
|
983
|
-
"stateMutability": "view",
|
|
984
|
-
"type": "function"
|
|
985
|
-
},
|
|
986
783
|
{
|
|
987
784
|
"inputs": [],
|
|
988
785
|
"name": "lp_price",
|
|
@@ -1064,60 +861,6 @@
|
|
|
1064
861
|
"stateMutability": "view",
|
|
1065
862
|
"type": "function"
|
|
1066
863
|
},
|
|
1067
|
-
{
|
|
1068
|
-
"inputs": [
|
|
1069
|
-
{
|
|
1070
|
-
"name": "amounts",
|
|
1071
|
-
"type": "uint256[2]"
|
|
1072
|
-
},
|
|
1073
|
-
{
|
|
1074
|
-
"name": "xp",
|
|
1075
|
-
"type": "uint256[2]"
|
|
1076
|
-
},
|
|
1077
|
-
{
|
|
1078
|
-
"name": "donation",
|
|
1079
|
-
"type": "bool"
|
|
1080
|
-
}
|
|
1081
|
-
],
|
|
1082
|
-
"name": "calc_token_fee",
|
|
1083
|
-
"outputs": [
|
|
1084
|
-
{
|
|
1085
|
-
"name": "",
|
|
1086
|
-
"type": "uint256"
|
|
1087
|
-
}
|
|
1088
|
-
],
|
|
1089
|
-
"stateMutability": "view",
|
|
1090
|
-
"type": "function"
|
|
1091
|
-
},
|
|
1092
|
-
{
|
|
1093
|
-
"inputs": [
|
|
1094
|
-
{
|
|
1095
|
-
"name": "amounts",
|
|
1096
|
-
"type": "uint256[2]"
|
|
1097
|
-
},
|
|
1098
|
-
{
|
|
1099
|
-
"name": "xp",
|
|
1100
|
-
"type": "uint256[2]"
|
|
1101
|
-
},
|
|
1102
|
-
{
|
|
1103
|
-
"name": "donation",
|
|
1104
|
-
"type": "bool"
|
|
1105
|
-
},
|
|
1106
|
-
{
|
|
1107
|
-
"name": "deposit",
|
|
1108
|
-
"type": "bool"
|
|
1109
|
-
}
|
|
1110
|
-
],
|
|
1111
|
-
"name": "calc_token_fee",
|
|
1112
|
-
"outputs": [
|
|
1113
|
-
{
|
|
1114
|
-
"name": "",
|
|
1115
|
-
"type": "uint256"
|
|
1116
|
-
}
|
|
1117
|
-
],
|
|
1118
|
-
"stateMutability": "view",
|
|
1119
|
-
"type": "function"
|
|
1120
|
-
},
|
|
1121
864
|
{
|
|
1122
865
|
"inputs": [],
|
|
1123
866
|
"name": "A",
|
package/lib/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare const createCurve: () => {
|
|
|
29
29
|
}) => void;
|
|
30
30
|
setGasStrategy: (strategy: import("./interfaces.js").IGasStrategy) => void;
|
|
31
31
|
getPoolList: () => string[];
|
|
32
|
+
getPoolsData: () => import("./interfaces.js").IDict<import("./interfaces.js").IPoolData>;
|
|
32
33
|
getMainPoolList: () => string[];
|
|
33
34
|
getUserPoolListByLiquidity: (address?: string | undefined) => Promise<string[]>;
|
|
34
35
|
getUserPoolListByClaimable: (address?: string | undefined) => Promise<string[]>;
|
|
@@ -366,6 +367,7 @@ declare const _default: {
|
|
|
366
367
|
}) => void;
|
|
367
368
|
setGasStrategy: (strategy: import("./interfaces.js").IGasStrategy) => void;
|
|
368
369
|
getPoolList: () => string[];
|
|
370
|
+
getPoolsData: () => import("./interfaces.js").IDict<import("./interfaces.js").IPoolData>;
|
|
369
371
|
getMainPoolList: () => string[];
|
|
370
372
|
getUserPoolListByLiquidity: (address?: string | undefined) => Promise<string[]>;
|
|
371
373
|
getUserPoolListByClaimable: (address?: string | undefined) => Promise<string[]>;
|
package/lib/index.js
CHANGED
|
@@ -34,6 +34,7 @@ export const createCurve = () => {
|
|
|
34
34
|
setCustomFeeData: _curve.setCustomFeeData.bind(_curve),
|
|
35
35
|
setGasStrategy: _curve.setGasStrategy.bind(_curve),
|
|
36
36
|
getPoolList: _curve.getPoolList.bind(_curve),
|
|
37
|
+
getPoolsData: _curve.getPoolsData.bind(_curve),
|
|
37
38
|
getMainPoolList: _curve.getMainPoolList.bind(_curve),
|
|
38
39
|
getUserPoolListByLiquidity: getUserPoolListByLiquidity.bind(_curve),
|
|
39
40
|
getUserPoolListByClaimable: getUserPoolListByClaimable.bind(_curve),
|
|
@@ -1040,7 +1040,7 @@ export class PoolTemplate extends CorePool {
|
|
|
1040
1040
|
if (!address)
|
|
1041
1041
|
throw Error("Need to connect wallet or pass address into args");
|
|
1042
1042
|
const gaugeContract = this.curve.contracts[this.gauge.address].contract;
|
|
1043
|
-
const rewardTokens = yield this.rewardTokens();
|
|
1043
|
+
const rewardTokens = yield this.rewardTokens(false);
|
|
1044
1044
|
const rewards = [];
|
|
1045
1045
|
if ('claimable_reward(address,address)' in gaugeContract) {
|
|
1046
1046
|
for (const rewardToken of rewardTokens) {
|
package/lib/prices-api.js
CHANGED
|
@@ -45,12 +45,12 @@ const _getGaugesOverview = memoize(() => __awaiter(void 0, void 0, void 0, funct
|
|
|
45
45
|
maxAge: 5 * 60 * 1000,
|
|
46
46
|
});
|
|
47
47
|
const getGaugeAddressByPoolAddress = (network) => __awaiter(void 0, void 0, void 0, function* () {
|
|
48
|
-
var _a;
|
|
48
|
+
var _a, _b;
|
|
49
49
|
const { gauges } = yield _getGaugesOverview();
|
|
50
50
|
const map = new Map();
|
|
51
51
|
for (const gauge of gauges !== null && gauges !== void 0 ? gauges : []) {
|
|
52
52
|
if (((_a = gauge.pool) === null || _a === void 0 ? void 0 : _a.chain) === network)
|
|
53
|
-
map.set(gauge.pool.address.toLowerCase(), gauge.address.toLowerCase());
|
|
53
|
+
map.set(gauge.pool.address.toLowerCase(), ((_b = gauge.effective_address) !== null && _b !== void 0 ? _b : gauge.address).toLowerCase());
|
|
54
54
|
}
|
|
55
55
|
return map;
|
|
56
56
|
});
|