@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
@@ -267,12 +267,11 @@
267
267
  "outputs": [
268
268
  {
269
269
  "type": "uint256",
270
- "name": "out"
270
+ "name": ""
271
271
  }
272
272
  ],
273
273
  "inputs": [],
274
- "constant": true,
275
- "payable": false,
274
+ "stateMutability": "view",
276
275
  "type": "function",
277
276
  "gas": "1327351"
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": "5171741"
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": "3016651"
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": "3016657"
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": "3016494"
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": "3016500"
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
  }
@@ -0,0 +1,16 @@
1
+ export declare const ALIASES_ETHEREUM: {
2
+ crv: string;
3
+ voting_escrow: string;
4
+ gauge_controller: string;
5
+ address_provider: string;
6
+ router: string;
7
+ registry_exchange: string;
8
+ };
9
+ export declare const ALIASES_POLYGON: {
10
+ crv: string;
11
+ voting_escrow: string;
12
+ gauge_controller: string;
13
+ address_provider: string;
14
+ router: string;
15
+ registry_exchange: string;
16
+ };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ALIASES_POLYGON = exports.ALIASES_ETHEREUM = void 0;
4
+ exports.ALIASES_ETHEREUM = {
5
+ "crv": "0xD533a949740bb3306d119CC777fa900bA034cd52",
6
+ "voting_escrow": "0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2",
7
+ "gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
8
+ "address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
9
+ "router": "0xfA9a30350048B2BF66865ee20363067c66f67e58",
10
+ "registry_exchange": "",
11
+ };
12
+ exports.ALIASES_POLYGON = {
13
+ "crv": "0x172370d5cd63279efa6d502dab29171933a610af",
14
+ "voting_escrow": "0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2",
15
+ "gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
16
+ "address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
17
+ "router": "0xfA9a30350048B2BF66865ee20363067c66f67e58",
18
+ "registry_exchange": "",
19
+ };
@@ -0,0 +1,31 @@
1
+ export declare const BTC_COINS_ETHEREUM: {
2
+ [index: string]: string;
3
+ };
4
+ export declare const BTC_COINS_LOWER_CASE_ETHEREUM: any;
5
+ export declare const ETH_COINS_ETHEREUM: {
6
+ [index: string]: string;
7
+ };
8
+ export declare const ETH_COINS_LOWER_CASE_ETHEREUM: any;
9
+ export declare const LINK_COINS_ETHEREUM: {
10
+ [index: string]: string;
11
+ };
12
+ export declare const LINK_COINS_LOWER_CASE_ETHEREUM: any;
13
+ export declare const EUR_COINS_ETHEREUM: {
14
+ [index: string]: string;
15
+ };
16
+ export declare const EUR_COINS_LOWER_CASE_ETHEREUM: any;
17
+ export declare const USD_COINS_ETHEREUM: {
18
+ [index: string]: string;
19
+ };
20
+ export declare const USD_COINS_LOWER_CASE_ETHEREUM: any;
21
+ export declare const COINS_ETHEREUM: {
22
+ [index: string]: string;
23
+ };
24
+ export declare const DECIMALS_ETHEREUM: {
25
+ [index: string]: number;
26
+ };
27
+ export declare const DECIMALS_LOWER_CASE_ETHEREUM: any;
28
+ export declare const cTokensEthereum: string[];
29
+ export declare const yTokensEthereum: string[];
30
+ export declare const ycTokensEthereum: string[];
31
+ export declare const aTokensEthereum: string[];
@@ -11,8 +11,8 @@ var __assign = (this && this.__assign) || function () {
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.LOWER_CASE_DECIMALS = exports.DECIMALS = exports.COINS = exports.USD_COINS = exports.EUR_COINS = exports.LINK_COINS_LOWER_CASE = exports.LINK_COINS = exports.ETH_COINS_LOWER_CASE = exports.ETH_COINS = exports.BTC_COINS_LOWER_CASE = exports.BTC_COINS = void 0;
15
- exports.BTC_COINS = {
14
+ exports.aTokensEthereum = exports.ycTokensEthereum = exports.yTokensEthereum = exports.cTokensEthereum = exports.DECIMALS_LOWER_CASE_ETHEREUM = exports.DECIMALS_ETHEREUM = exports.COINS_ETHEREUM = exports.USD_COINS_LOWER_CASE_ETHEREUM = exports.USD_COINS_ETHEREUM = exports.EUR_COINS_LOWER_CASE_ETHEREUM = exports.EUR_COINS_ETHEREUM = exports.LINK_COINS_LOWER_CASE_ETHEREUM = exports.LINK_COINS_ETHEREUM = exports.ETH_COINS_LOWER_CASE_ETHEREUM = exports.ETH_COINS_ETHEREUM = exports.BTC_COINS_LOWER_CASE_ETHEREUM = exports.BTC_COINS_ETHEREUM = void 0;
15
+ exports.BTC_COINS_ETHEREUM = {
16
16
  sbtccrv: "0x075b1bb99792c9E1041bA13afEf80C91a1e70fB3",
17
17
  hbtc: "0x0316EB71485b0Ab14103307bf65a021042c6d380",
18
18
  renbtc: "0xEB4C2781e4ebA804CE9a9803C67d0893436bB27D",
@@ -24,8 +24,8 @@ exports.BTC_COINS = {
24
24
  sbtc: "0xfE18be6b3Bd88A2D2A7f928d00292E7a9963CfC6", // sBTC
25
25
  };
26
26
  // @ts-ignore
27
- exports.BTC_COINS_LOWER_CASE = Object.fromEntries(Object.entries(exports.BTC_COINS).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
28
- exports.ETH_COINS = {
27
+ exports.BTC_COINS_LOWER_CASE_ETHEREUM = Object.fromEntries(Object.entries(exports.BTC_COINS_ETHEREUM).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
28
+ exports.ETH_COINS_ETHEREUM = {
29
29
  steth: "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84",
30
30
  eth: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
31
31
  ankreth: "0xE95A203B1a91a908F9B9CE46459d101078c2c3cb",
@@ -34,19 +34,21 @@ exports.ETH_COINS = {
34
34
  weth: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", // WETH
35
35
  };
36
36
  // @ts-ignore
37
- exports.ETH_COINS_LOWER_CASE = Object.fromEntries(Object.entries(exports.ETH_COINS).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
38
- exports.LINK_COINS = {
37
+ exports.ETH_COINS_LOWER_CASE_ETHEREUM = Object.fromEntries(Object.entries(exports.ETH_COINS_ETHEREUM).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
38
+ exports.LINK_COINS_ETHEREUM = {
39
39
  link: "0x514910771AF9Ca656af840dff83E8264EcF986CA",
40
40
  slink: "0xbBC455cb4F1B9e4bFC4B73970d360c8f032EfEE6", // sLINK
41
41
  };
42
42
  // @ts-ignore
43
- exports.LINK_COINS_LOWER_CASE = Object.fromEntries(Object.entries(exports.LINK_COINS).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
44
- exports.EUR_COINS = {
43
+ exports.LINK_COINS_LOWER_CASE_ETHEREUM = Object.fromEntries(Object.entries(exports.LINK_COINS_ETHEREUM).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
44
+ exports.EUR_COINS_ETHEREUM = {
45
45
  eurs: "0xdB25f211AB05b1c97D595516F45794528a807ad8",
46
46
  seur: "0xD71eCFF9342A5Ced620049e616c5035F1dB98620",
47
47
  eurt: "0xC581b735A1688071A1746c968e0798D642EDE491", // EURT
48
48
  };
49
- exports.USD_COINS = {
49
+ // @ts-ignore
50
+ exports.EUR_COINS_LOWER_CASE_ETHEREUM = Object.fromEntries(Object.entries(exports.EUR_COINS_ETHEREUM).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
51
+ exports.USD_COINS_ETHEREUM = {
50
52
  ycdai: "0x99d1Fa417f94dcD62BfE781a1213c092a47041Bc",
51
53
  ycusdc: "0x9777d7E2b60bB01759D0E2f8be2095df444cb07E",
52
54
  ycusdt: "0x1bE5d71F2dA660BFdee8012dDc58D024448A0A59",
@@ -88,10 +90,13 @@ exports.USD_COINS = {
88
90
  alusd: "0xbc6da0fe9ad5f3b0d58160288917aa56653660e9",
89
91
  mim: "0x99d8a9c45b2eca8864373a26d1459e3dff1e17f3",
90
92
  '3crv': "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490",
91
- crv: "0xD533a949740bb3306d119CC777fa900bA034cd52", // CRV
93
+ crv: "0xD533a949740bb3306d119CC777fa900bA034cd52",
94
+ cvx: "0x4e3fbd56cd56c3e72c1403e103b45db9da5b9d2b", // CVX
92
95
  };
93
- exports.COINS = __assign(__assign(__assign(__assign(__assign(__assign({}, exports.BTC_COINS), exports.ETH_COINS), exports.LINK_COINS), exports.EUR_COINS), exports.USD_COINS), { snx: "0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f" });
94
- exports.DECIMALS = {
96
+ // @ts-ignore
97
+ exports.USD_COINS_LOWER_CASE_ETHEREUM = Object.fromEntries(Object.entries(exports.USD_COINS_ETHEREUM).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
98
+ exports.COINS_ETHEREUM = __assign(__assign(__assign(__assign(__assign(__assign({}, exports.BTC_COINS_ETHEREUM), exports.ETH_COINS_ETHEREUM), exports.LINK_COINS_ETHEREUM), exports.EUR_COINS_ETHEREUM), exports.USD_COINS_ETHEREUM), { snx: "0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f" });
99
+ exports.DECIMALS_ETHEREUM = {
95
100
  "0x075b1bb99792c9E1041bA13afEf80C91a1e70fB3": 18,
96
101
  "0x0316EB71485b0Ab14103307bf65a021042c6d380": 18,
97
102
  "0x99d1Fa417f94dcD62BfE781a1213c092a47041Bc": 18,
@@ -154,7 +159,36 @@ exports.DECIMALS = {
154
159
  "0xbc6da0fe9ad5f3b0d58160288917aa56653660e9": 18,
155
160
  "0x99d8a9c45b2eca8864373a26d1459e3dff1e17f3": 18,
156
161
  "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490": 18,
157
- "0xD533a949740bb3306d119CC777fa900bA034cd52": 18, // CRV
162
+ "0xD533a949740bb3306d119CC777fa900bA034cd52": 18,
163
+ "0x4e3fbd56cd56c3e72c1403e103b45db9da5b9d2b": 18, // CVX
158
164
  };
159
165
  // @ts-ignore
160
- exports.LOWER_CASE_DECIMALS = Object.fromEntries(Object.entries(exports.DECIMALS).map(function (entry) { return [entry[0].toLowerCase(), entry[1]]; }));
166
+ exports.DECIMALS_LOWER_CASE_ETHEREUM = Object.fromEntries(Object.entries(exports.DECIMALS_ETHEREUM).map(function (entry) { return [entry[0].toLowerCase(), entry[1]]; }));
167
+ exports.cTokensEthereum = [
168
+ '0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643',
169
+ '0x39AA39c021dfbaE8faC545936693aC917d5E7563',
170
+ "0x8e595470ed749b85c6f7669de83eae304c2ec68f",
171
+ "0x48759f220ed983db51fa7a8c0d2aab8f3ce4166a",
172
+ "0x76eb2fe28b36b3ee97f3adae0c69606eedb2a37c", // cyUSDC
173
+ ];
174
+ exports.yTokensEthereum = [
175
+ "0xC2cB1040220768554cf699b0d863A3cd4324ce32",
176
+ "0x26EA744E5B887E5205727f55dFBE8685e3b21951",
177
+ "0xE6354ed5bC4b393a5Aad09f21c46E101e692d447",
178
+ "0x16de59092dAE5CcF4A1E6439D611fd0653f0Bd01",
179
+ "0xd6aD7a6750A7593E092a9B218d66C0A814a3436e",
180
+ "0x83f798e925BcD4017Eb265844FDDAbb448f1707D",
181
+ "0x04bC0Ab673d88aE9dbC9DA2380cB6B79C4BCa9aE",
182
+ "0x73a052500105205d34Daf004eAb301916DA8190f", // yTUSD
183
+ ];
184
+ exports.ycTokensEthereum = [
185
+ "0x99d1Fa417f94dcD62BfE781a1213c092a47041Bc",
186
+ "0x9777d7E2b60bB01759D0E2f8be2095df444cb07E",
187
+ "0x1bE5d71F2dA660BFdee8012dDc58D024448A0A59", // ycUSDT
188
+ ];
189
+ exports.aTokensEthereum = [
190
+ "0x028171bCA77440897B824Ca71D1c56caC55b68A3",
191
+ "0xBcca60bB61934080951369a648Fb03DF4F96263C",
192
+ "0x3Ed3B47Dd13EC9a98b44e6204A523E766B225811",
193
+ "0x6c5024cd4f8a59110119c56f8933403a539555eb", // sSUSD
194
+ ];
@@ -0,0 +1,31 @@
1
+ export declare const BTC_COINS_POLYGON: {
2
+ [index: string]: string;
3
+ };
4
+ export declare const BTC_COINS_LOWER_CASE_POLYGON: any;
5
+ export declare const ETH_COINS_POLYGON: {
6
+ [index: string]: string;
7
+ };
8
+ export declare const ETH_COINS_LOWER_CASE_POLYGON: any;
9
+ export declare const LINK_COINS_POLYGON: {
10
+ [index: string]: string;
11
+ };
12
+ export declare const LINK_COINS_LOWER_CASE_POLYGON: any;
13
+ export declare const EUR_COINS_POLYGON: {
14
+ [index: string]: string;
15
+ };
16
+ export declare const EUR_COINS_LOWER_CASE_POLYGON: any;
17
+ export declare const USD_COINS_POLYGON: {
18
+ [index: string]: string;
19
+ };
20
+ export declare const USD_COINS_LOWER_CASE_POLYGON: any;
21
+ export declare const COINS_POLYGON: {
22
+ [index: string]: string;
23
+ };
24
+ export declare const DECIMALS_POLYGON: {
25
+ [index: string]: number;
26
+ };
27
+ export declare const DECIMALS_LOWER_CASE_POLYGON: any;
28
+ export declare const cTokensPolygon: never[];
29
+ export declare const yTokensPolygon: never[];
30
+ export declare const ycTokensPolygon: never[];
31
+ export declare const aTokensPolygon: string[];
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.aTokensPolygon = exports.ycTokensPolygon = exports.yTokensPolygon = exports.cTokensPolygon = exports.DECIMALS_LOWER_CASE_POLYGON = exports.DECIMALS_POLYGON = exports.COINS_POLYGON = exports.USD_COINS_LOWER_CASE_POLYGON = exports.USD_COINS_POLYGON = exports.EUR_COINS_LOWER_CASE_POLYGON = exports.EUR_COINS_POLYGON = exports.LINK_COINS_LOWER_CASE_POLYGON = exports.LINK_COINS_POLYGON = exports.ETH_COINS_LOWER_CASE_POLYGON = exports.ETH_COINS_POLYGON = exports.BTC_COINS_LOWER_CASE_POLYGON = exports.BTC_COINS_POLYGON = void 0;
15
+ exports.BTC_COINS_POLYGON = {
16
+ wbtc: "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6",
17
+ renbtc: "0xDBf31dF14B66535aF65AaC99C32e9eA844e14501",
18
+ amwbtc: "0x5c2ed810328349100A66B82b78a1791B101C9D61", // amWBTC
19
+ };
20
+ // @ts-ignore
21
+ exports.BTC_COINS_LOWER_CASE_POLYGON = Object.fromEntries(Object.entries(exports.BTC_COINS_POLYGON).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
22
+ exports.ETH_COINS_POLYGON = {
23
+ weth: "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",
24
+ amweth: "0x28424507fefb6f7f8E9D3860F56504E4e5f5f390", // amWETH
25
+ };
26
+ // @ts-ignore
27
+ exports.ETH_COINS_LOWER_CASE_POLYGON = Object.fromEntries(Object.entries(exports.ETH_COINS_POLYGON).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
28
+ exports.LINK_COINS_POLYGON = {};
29
+ // @ts-ignore
30
+ exports.LINK_COINS_LOWER_CASE_POLYGON = Object.fromEntries(Object.entries(exports.LINK_COINS_POLYGON).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
31
+ exports.EUR_COINS_POLYGON = {
32
+ eurt: "0x7BDF330f423Ea880FF95fC41A280fD5eCFD3D09f", // EURT
33
+ };
34
+ // @ts-ignore
35
+ exports.EUR_COINS_LOWER_CASE_POLYGON = Object.fromEntries(Object.entries(exports.EUR_COINS_POLYGON).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
36
+ exports.USD_COINS_POLYGON = {
37
+ dai: "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",
38
+ usdc: "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
39
+ usdt: "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
40
+ amdai: "0x27F8D03b3a2196956ED754baDc28D73be8830A6e",
41
+ amusdc: "0x1a13F4Ca1d028320A707D99520AbFefca3998b7F",
42
+ amusdt: "0x60D55F02A771d515e077c9C2403a1ef324885CeC",
43
+ am3crv: "0xE7a24EF0C5e95Ffb0f6684b813A78F2a3AD7D171", // am3CRV
44
+ };
45
+ // @ts-ignore
46
+ exports.USD_COINS_LOWER_CASE_POLYGON = Object.fromEntries(Object.entries(exports.USD_COINS_POLYGON).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
47
+ exports.COINS_POLYGON = __assign(__assign(__assign(__assign(__assign({}, exports.BTC_COINS_POLYGON), exports.ETH_COINS_POLYGON), exports.LINK_COINS_POLYGON), exports.EUR_COINS_POLYGON), exports.USD_COINS_POLYGON);
48
+ exports.DECIMALS_POLYGON = {
49
+ "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063": 18,
50
+ "0x2791bca1f2de4661ed88a30c99a7a9449aa84174": 6,
51
+ "0xc2132d05d31c914a87c6611c10748aeb04b58e8f": 6,
52
+ "0x27F8D03b3a2196956ED754baDc28D73be8830A6e": 18,
53
+ "0x1a13F4Ca1d028320A707D99520AbFefca3998b7F": 6,
54
+ "0x60D55F02A771d515e077c9C2403a1ef324885CeC": 6,
55
+ "0xE7a24EF0C5e95Ffb0f6684b813A78F2a3AD7D171": 18,
56
+ "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6": 8,
57
+ "0xDBf31dF14B66535aF65AaC99C32e9eA844e14501": 8,
58
+ "0x5c2ed810328349100A66B82b78a1791B101C9D61": 8,
59
+ "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619": 18,
60
+ "0x28424507fefb6f7f8E9D3860F56504E4e5f5f390": 18,
61
+ "0x7BDF330f423Ea880FF95fC41A280fD5eCFD3D09f": 6, // EURT
62
+ };
63
+ // @ts-ignore
64
+ exports.DECIMALS_LOWER_CASE_POLYGON = Object.fromEntries(Object.entries(exports.DECIMALS_POLYGON).map(function (entry) { return [entry[0].toLowerCase(), entry[1]]; }));
65
+ exports.cTokensPolygon = [];
66
+ exports.yTokensPolygon = [];
67
+ exports.ycTokensPolygon = [];
68
+ exports.aTokensPolygon = [
69
+ "0x27F8D03b3a2196956ED754baDc28D73be8830A6e",
70
+ "0x1a13F4Ca1d028320A707D99520AbFefca3998b7F",
71
+ "0x60D55F02A771d515e077c9C2403a1ef324885CeC",
72
+ "0x5c2ed810328349100A66B82b78a1791B101C9D61",
73
+ "0x28424507fefb6f7f8E9D3860F56504E4e5f5f390", // amWETH
74
+ ];
package/lib/curve.d.ts CHANGED
@@ -1,14 +1,29 @@
1
1
  import { ethers, Contract } from "ethers";
2
2
  import { Networkish } from "@ethersproject/networks";
3
- import { Provider as MulticallProvider, Contract as MulticallContract } from 'ethers-multicall';
4
- export declare const ALIASES: {
3
+ import { Provider as MulticallProvider, Contract as MulticallContract } from 'ethcall';
4
+ import { PoolDataInterface, DictInterface } from "./interfaces";
5
+ export declare let POOLS_DATA: {
6
+ [index: string]: PoolDataInterface;
7
+ };
8
+ export declare let LP_TOKENS: string[];
9
+ export declare let GAUGES: string[];
10
+ export declare let BTC_COINS: DictInterface<string>;
11
+ export declare let BTC_COINS_LOWER_CASE: DictInterface<string>;
12
+ export declare let ETH_COINS: DictInterface<string>;
13
+ export declare let ETH_COINS_LOWER_CASE: DictInterface<string>;
14
+ export declare let LINK_COINS: DictInterface<string>;
15
+ export declare let LINK_COINS_LOWER_CASE: DictInterface<string>;
16
+ export declare let EUR_COINS: DictInterface<string>;
17
+ export declare let EUR_COINS_LOWER_CASE: DictInterface<string>;
18
+ export declare let USD_COINS: DictInterface<string>;
19
+ export declare let USD_COINS_LOWER_CASE: DictInterface<string>;
20
+ export declare let COINS: DictInterface<string>;
21
+ export declare let DECIMALS: DictInterface<number>;
22
+ export declare let DECIMALS_LOWER_CASE: DictInterface<number>;
23
+ export declare let ALIASES: {
5
24
  crv: string;
6
- pool_proxy: string;
7
- gauge_proxy: string;
8
25
  voting_escrow: string;
9
26
  gauge_controller: string;
10
- minter: string;
11
- fee_distributor: string;
12
27
  address_provider: string;
13
28
  router: string;
14
29
  registry_exchange: string;
@@ -18,6 +33,7 @@ declare class Curve {
18
33
  multicallProvider: MulticallProvider;
19
34
  signer: ethers.Signer;
20
35
  signerAddress: string;
36
+ chainId: number;
21
37
  contracts: {
22
38
  [index: string]: {
23
39
  contract: Contract;
@@ -38,7 +54,7 @@ declare class Curve {
38
54
  maxPriorityFeePerGas?: number | ethers.BigNumber;
39
55
  };
40
56
  constructor();
41
- init(providerType: 'JsonRpc' | 'Web3' | 'Infura', providerSettings: {
57
+ init(providerType: 'JsonRpc' | 'Web3' | 'Infura' | 'Alchemy', providerSettings: {
42
58
  url?: string;
43
59
  privateKey?: string;
44
60
  } | {