@curvefi/api 2.32.0 → 2.33.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 (59) hide show
  1. package/lib/boosting.js +385 -135
  2. package/lib/constants/aliases.js +22 -11
  3. package/lib/constants/coins/arbitrum.js +5 -5
  4. package/lib/constants/coins/aurora.js +5 -5
  5. package/lib/constants/coins/avalanche.js +6 -6
  6. package/lib/constants/coins/celo.js +5 -5
  7. package/lib/constants/coins/ethereum.js +10 -9
  8. package/lib/constants/coins/fantom.js +7 -7
  9. package/lib/constants/coins/kava.js +5 -5
  10. package/lib/constants/coins/moonbeam.js +5 -5
  11. package/lib/constants/coins/optimism.js +5 -5
  12. package/lib/constants/coins/polygon.js +6 -6
  13. package/lib/constants/coins/xdai.js +5 -5
  14. package/lib/constants/pools/arbitrum.js +1 -1
  15. package/lib/constants/pools/aurora.js +1 -1
  16. package/lib/constants/pools/avalanche.js +1 -1
  17. package/lib/constants/pools/celo.js +1 -1
  18. package/lib/constants/pools/ethereum.js +1 -1
  19. package/lib/constants/pools/fantom.js +1 -1
  20. package/lib/constants/pools/kava.js +1 -1
  21. package/lib/constants/pools/moonbeam.js +1 -1
  22. package/lib/constants/pools/optimism.js +1 -1
  23. package/lib/constants/pools/polygon.js +1 -1
  24. package/lib/constants/pools/xdai.js +1 -1
  25. package/lib/constants/utils.js +19 -18
  26. package/lib/curve.js +506 -282
  27. package/lib/external-api.js +132 -45
  28. package/lib/factory/common.js +3 -3
  29. package/lib/factory/constants-crypto.js +21 -21
  30. package/lib/factory/constants.js +32 -31
  31. package/lib/factory/deploy.js +336 -176
  32. package/lib/factory/factory-api.js +256 -180
  33. package/lib/factory/factory-crypto.js +309 -163
  34. package/lib/factory/factory.d.ts +1 -1
  35. package/lib/factory/factory.js +336 -186
  36. package/lib/index.js +98 -44
  37. package/lib/interfaces.d.ts +5 -0
  38. package/lib/pools/PoolTemplate.js +2879 -1468
  39. package/lib/pools/mixins/common.js +106 -22
  40. package/lib/pools/mixins/depositBalancedAmountsMixins.js +131 -48
  41. package/lib/pools/mixins/depositMixins.js +413 -144
  42. package/lib/pools/mixins/depositWrappedMixins.js +223 -72
  43. package/lib/pools/mixins/poolBalancesMixin.js +98 -22
  44. package/lib/pools/mixins/swapMixins.js +347 -125
  45. package/lib/pools/mixins/swapWrappedMixins.js +270 -88
  46. package/lib/pools/mixins/withdrawExpectedMixins.js +104 -23
  47. package/lib/pools/mixins/withdrawImbalanceMixins.js +316 -97
  48. package/lib/pools/mixins/withdrawImbalanceWrappedMixins.js +187 -51
  49. package/lib/pools/mixins/withdrawMixins.js +385 -122
  50. package/lib/pools/mixins/withdrawOneCoinExpectedMixins.js +88 -16
  51. package/lib/pools/mixins/withdrawOneCoinMixins.js +386 -123
  52. package/lib/pools/mixins/withdrawOneCoinWrappedExpectedMixins.js +62 -8
  53. package/lib/pools/mixins/withdrawOneCoinWrappedMixins.js +185 -53
  54. package/lib/pools/mixins/withdrawWrappedMixins.js +185 -50
  55. package/lib/pools/poolConstructor.js +25 -5
  56. package/lib/pools/utils.js +488 -299
  57. package/lib/router.js +675 -212
  58. package/lib/utils.js +675 -354
  59. package/package.json +1 -2
@@ -1,5 +1,5 @@
1
1
  import { lowerCaseValues } from "./utils.js";
2
- export const ALIASES_ETHEREUM = lowerCaseValues({
2
+ export var ALIASES_ETHEREUM = lowerCaseValues({
3
3
  "crv": "0xD533a949740bb3306d119CC777fa900bA034cd52",
4
4
  "minter": "0xd061D61a4d941c39E5453435B6345Dc261C2fcE0",
5
5
  "voting_escrow": "0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2",
@@ -10,10 +10,11 @@ export const ALIASES_ETHEREUM = lowerCaseValues({
10
10
  "deposit_and_stake": "0x271fbE8aB7f1fB262f81C77Ea5303F03DA9d3d6A",
11
11
  "stable_calc": "0x5552b631e2aD801fAa129Aacf4B701071cC9D1f7",
12
12
  "factory": '0xb9fc157394af804a3578134a6585c0dc9cc990d4',
13
+ "crvusd_factory": '0x0145FD99F1dd6e2491e44FCA608C481c9C5B97a9',
13
14
  "crypto_factory": '0xF18056Bbd320E96A48e3Fbf8bC061322531aac99',
14
15
  "registry_exchange": "",
15
16
  });
16
- export const ALIASES_POLYGON = lowerCaseValues({
17
+ export var ALIASES_POLYGON = lowerCaseValues({
17
18
  "crv": "0x172370d5cd63279efa6d502dab29171933a610af",
18
19
  "minter": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
19
20
  "voting_escrow": "0xb5acc710aede048600e10eedcefdf98d4abf4b1e",
@@ -24,10 +25,11 @@ export const ALIASES_POLYGON = lowerCaseValues({
24
25
  "deposit_and_stake": "0xB7De33440B7171159a9718CBE748086cecDd9685",
25
26
  "stable_calc": "0x5552b631e2aD801fAa129Aacf4B701071cC9D1f7",
26
27
  "factory": '0x722272d36ef0da72ff51c5a65db7b870e2e8d4ee',
28
+ "crvusd_factory": '0x0145FD99F1dd6e2491e44FCA608C481c9C5B97a9',
27
29
  "crypto_factory": "0xE5De15A9C9bBedb4F5EC13B131E61245f2983A69",
28
30
  "registry_exchange": "",
29
31
  });
30
- export const ALIASES_FANTOM = lowerCaseValues({
32
+ export var ALIASES_FANTOM = lowerCaseValues({
31
33
  "crv": "0x1E4F97b9f9F913c46F1632781732927B9019C68b",
32
34
  "minter": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
33
35
  "voting_escrow": "0xb75dca485e21a77e1b433ecacb74475fc67e259c",
@@ -38,10 +40,11 @@ export const ALIASES_FANTOM = lowerCaseValues({
38
40
  "deposit_and_stake": "0xB7De33440B7171159a9718CBE748086cecDd9685",
39
41
  "stable_calc": "0x5552b631e2aD801fAa129Aacf4B701071cC9D1f7",
40
42
  "factory": "0x686d67265703d1f124c45e33d47d794c566889ba",
43
+ "crvusd_factory": '0x0145FD99F1dd6e2491e44FCA608C481c9C5B97a9',
41
44
  "crypto_factory": "0xE5De15A9C9bBedb4F5EC13B131E61245f2983A69",
42
45
  "registry_exchange": "",
43
46
  });
44
- export const ALIASES_AVALANCHE = lowerCaseValues({
47
+ export var ALIASES_AVALANCHE = lowerCaseValues({
45
48
  "crv": "0x47536F17F4fF30e64A96a7555826b8f9e66ec468",
46
49
  "minter": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
47
50
  "voting_escrow": "0xc55837710bc500f1e3c7bb9dd1d51f7c5647e657",
@@ -52,10 +55,11 @@ export const ALIASES_AVALANCHE = lowerCaseValues({
52
55
  "deposit_and_stake": "0xB7De33440B7171159a9718CBE748086cecDd9685",
53
56
  "stable_calc": "0x5552b631e2aD801fAa129Aacf4B701071cC9D1f7",
54
57
  "factory": '0xb17b674D9c5CB2e441F8e196a2f048A81355d031',
58
+ "crvusd_factory": '0x0145FD99F1dd6e2491e44FCA608C481c9C5B97a9',
55
59
  "crypto_factory": '0xF18056Bbd320E96A48e3Fbf8bC061322531aac99',
56
60
  "registry_exchange": "",
57
61
  });
58
- export const ALIASES_ARBITRUM = lowerCaseValues({
62
+ export var ALIASES_ARBITRUM = lowerCaseValues({
59
63
  "crv": "0x11cDb42B0EB46D95f990BeDD4695A6e3fA034978",
60
64
  "minter": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
61
65
  "voting_escrow": "0x98c80fa823759b642c3e02f40533c164f40727ae",
@@ -66,10 +70,11 @@ export const ALIASES_ARBITRUM = lowerCaseValues({
66
70
  "deposit_and_stake": "0xB7De33440B7171159a9718CBE748086cecDd9685",
67
71
  "stable_calc": "0x5552b631e2aD801fAa129Aacf4B701071cC9D1f7",
68
72
  "factory": '0xb17b674D9c5CB2e441F8e196a2f048A81355d031',
73
+ "crvusd_factory": '0x0145FD99F1dd6e2491e44FCA608C481c9C5B97a9',
69
74
  "crypto_factory": '0xF18056Bbd320E96A48e3Fbf8bC061322531aac99',
70
75
  "registry_exchange": "",
71
76
  });
72
- export const ALIASES_OPTIMISM = lowerCaseValues({
77
+ export var ALIASES_OPTIMISM = lowerCaseValues({
73
78
  "crv": "0x0994206dfE8De6Ec6920FF4D779B0d950605Fb53",
74
79
  "minter": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
75
80
  "voting_escrow": "0x65a0b01756e837e6670634816e4f5b3a3ff21107",
@@ -80,10 +85,11 @@ export const ALIASES_OPTIMISM = lowerCaseValues({
80
85
  "deposit_and_stake": "0xB7De33440B7171159a9718CBE748086cecDd9685",
81
86
  "stable_calc": "0x5552b631e2aD801fAa129Aacf4B701071cC9D1f7",
82
87
  "factory": '0x2db0E83599a91b508Ac268a6197b8B14F5e72840',
88
+ "crvusd_factory": '0x0145FD99F1dd6e2491e44FCA608C481c9C5B97a9',
83
89
  "crypto_factory": '0xF18056Bbd320E96A48e3Fbf8bC061322531aac99',
84
90
  "registry_exchange": "",
85
91
  });
86
- export const ALIASES_XDAI = lowerCaseValues({
92
+ export var ALIASES_XDAI = lowerCaseValues({
87
93
  "crv": "0x712b3d230f3c1c19db860d80619288b1f0bdd0bd",
88
94
  "minter": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
89
95
  "voting_escrow": "0xefde221f306152971d8e9f181bfe998447975810",
@@ -94,10 +100,11 @@ export const ALIASES_XDAI = lowerCaseValues({
94
100
  "deposit_and_stake": "0xB7De33440B7171159a9718CBE748086cecDd9685",
95
101
  "stable_calc": "0x5552b631e2aD801fAa129Aacf4B701071cC9D1f7",
96
102
  "factory": '0xD19Baeadc667Cf2015e395f2B08668Ef120f41F5',
103
+ "crvusd_factory": '0x0145FD99F1dd6e2491e44FCA608C481c9C5B97a9',
97
104
  "crypto_factory": '0xF18056Bbd320E96A48e3Fbf8bC061322531aac99',
98
105
  "registry_exchange": "",
99
106
  });
100
- export const ALIASES_MOONBEAM = lowerCaseValues({
107
+ export var ALIASES_MOONBEAM = lowerCaseValues({
101
108
  "crv": "0x7C598c96D02398d89FbCb9d41Eab3DF0C16F227D",
102
109
  "minter": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
103
110
  "voting_escrow": "0x0000000000000000000000000000000000000000",
@@ -108,10 +115,11 @@ export const ALIASES_MOONBEAM = lowerCaseValues({
108
115
  "deposit_and_stake": "0xB7De33440B7171159a9718CBE748086cecDd9685",
109
116
  "stable_calc": "0x5552b631e2aD801fAa129Aacf4B701071cC9D1f7",
110
117
  "factory": '0x4244eB811D6e0Ef302326675207A95113dB4E1F8',
118
+ "crvusd_factory": '0x0145FD99F1dd6e2491e44FCA608C481c9C5B97a9',
111
119
  "crypto_factory": '0xF18056Bbd320E96A48e3Fbf8bC061322531aac99',
112
120
  "registry_exchange": "",
113
121
  });
114
- export const ALIASES_AURORA = lowerCaseValues({
122
+ export var ALIASES_AURORA = lowerCaseValues({
115
123
  "crv": "0x64D5BaF5ac030e2b7c435aDD967f787ae94D0205",
116
124
  "minter": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
117
125
  "voting_escrow": "0x0000000000000000000000000000000000000000",
@@ -122,10 +130,11 @@ export const ALIASES_AURORA = lowerCaseValues({
122
130
  "deposit_and_stake": "0xB7De33440B7171159a9718CBE748086cecDd9685",
123
131
  "stable_calc": "0x5552b631e2aD801fAa129Aacf4B701071cC9D1f7",
124
132
  "factory": '0xb9fc157394af804a3578134a6585c0dc9cc990d4',
133
+ "crvusd_factory": '0x0145FD99F1dd6e2491e44FCA608C481c9C5B97a9',
125
134
  "crypto_factory": '0xF18056Bbd320E96A48e3Fbf8bC061322531aac99',
126
135
  "registry_exchange": "",
127
136
  });
128
- export const ALIASES_KAVA = lowerCaseValues({
137
+ export var ALIASES_KAVA = lowerCaseValues({
129
138
  "crv": "0x64D5BaF5ac030e2b7c435aDD967f787ae94D0205",
130
139
  "minter": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
131
140
  "voting_escrow": "0x0000000000000000000000000000000000000000",
@@ -136,10 +145,11 @@ export const ALIASES_KAVA = lowerCaseValues({
136
145
  "deposit_and_stake": "0xB7De33440B7171159a9718CBE748086cecDd9685",
137
146
  "stable_calc": "0x5552b631e2aD801fAa129Aacf4B701071cC9D1f7",
138
147
  "factory": '0x40bc62805471eF53DdD5C5cF99ed3d9e5aa81b48',
148
+ "crvusd_factory": '0x0145FD99F1dd6e2491e44FCA608C481c9C5B97a9',
139
149
  "crypto_factory": '0xF18056Bbd320E96A48e3Fbf8bC061322531aac99',
140
150
  "registry_exchange": "",
141
151
  });
142
- export const ALIASES_CELO = lowerCaseValues({
152
+ export var ALIASES_CELO = lowerCaseValues({
143
153
  "crv": "0x0a7432cF27F1aE3825c313F3C81e7D3efD7639aB",
144
154
  "minter": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
145
155
  "voting_escrow": "0x0000000000000000000000000000000000000000",
@@ -150,6 +160,7 @@ export const ALIASES_CELO = lowerCaseValues({
150
160
  "deposit_and_stake": "0xB7De33440B7171159a9718CBE748086cecDd9685",
151
161
  "stable_calc": "0x5552b631e2aD801fAa129Aacf4B701071cC9D1f7",
152
162
  "factory": '0x5277A0226d10392295E8D383E9724D6E416d6e6C',
163
+ "crvusd_factory": '0x0145FD99F1dd6e2491e44FCA608C481c9C5B97a9',
153
164
  "crypto_factory": '0xF18056Bbd320E96A48e3Fbf8bC061322531aac99',
154
165
  "registry_exchange": "",
155
166
  });
@@ -1,5 +1,5 @@
1
1
  import { lowerCaseValues } from "../utils.js";
2
- export const COINS_ARBITRUM = lowerCaseValues({
2
+ export var COINS_ARBITRUM = lowerCaseValues({
3
3
  'crv': '0x11cDb42B0EB46D95f990BeDD4695A6e3fA034978',
4
4
  // --- USD ---
5
5
  'usdc': '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8',
@@ -15,7 +15,7 @@ export const COINS_ARBITRUM = lowerCaseValues({
15
15
  "weth": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1",
16
16
  "wsteth": "0x5979D7b546E38E414F7E9822514be443A4800529",
17
17
  });
18
- export const cTokensArbitrum = []; //.map((a) => a.toLowerCase());
19
- export const yTokensArbitrum = []; //.map((a) => a.toLowerCase());
20
- export const ycTokensArbitrum = []; //.map((a) => a.toLowerCase());
21
- export const aTokensArbitrum = []; //.map((a) => a.toLowerCase());
18
+ export var cTokensArbitrum = []; //.map((a) => a.toLowerCase());
19
+ export var yTokensArbitrum = []; //.map((a) => a.toLowerCase());
20
+ export var ycTokensArbitrum = []; //.map((a) => a.toLowerCase());
21
+ export var aTokensArbitrum = []; //.map((a) => a.toLowerCase());
@@ -1,5 +1,5 @@
1
1
  import { lowerCaseValues } from "../utils.js";
2
- export const COINS_AURORA = lowerCaseValues({
2
+ export var COINS_AURORA = lowerCaseValues({
3
3
  'crv': '0x64D5BaF5ac030e2b7c435aDD967f787ae94D0205',
4
4
  // --- USD ---
5
5
  'dai': '0xe3520349F477A5F6EB06107066048508498A291b',
@@ -7,7 +7,7 @@ export const COINS_AURORA = lowerCaseValues({
7
7
  'usdt': '0x4988a896b1227218e4A686fdE5EabdcAbd91571f',
8
8
  '3crv': '0xbF7E49483881C76487b0989CD7d9A8239B20CA41',
9
9
  });
10
- export const cTokensAurora = []; //.map((a) => a.toLowerCase());
11
- export const yTokensAurora = []; //.map((a) => a.toLowerCase());
12
- export const ycTokensAurora = []; //.map((a) => a.toLowerCase());
13
- export const aTokensAurora = []; //.map((a) => a.toLowerCase());
10
+ export var cTokensAurora = []; //.map((a) => a.toLowerCase());
11
+ export var yTokensAurora = []; //.map((a) => a.toLowerCase());
12
+ export var ycTokensAurora = []; //.map((a) => a.toLowerCase());
13
+ export var aTokensAurora = []; //.map((a) => a.toLowerCase());
@@ -1,5 +1,5 @@
1
1
  import { lowerCaseValues } from "../utils.js";
2
- export const COINS_AVALANCHE = lowerCaseValues({
2
+ export var COINS_AVALANCHE = lowerCaseValues({
3
3
  'crv': '0x47536F17F4fF30e64A96a7555826b8f9e66ec468',
4
4
  'crv.e': '0x249848BeCA43aC405b8102Ec90Dd5F22CA513c06',
5
5
  // --- USD ---
@@ -25,13 +25,13 @@ export const COINS_AVALANCHE = lowerCaseValues({
25
25
  'avax': '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
26
26
  'wavax': '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7',
27
27
  });
28
- export const cTokensAvalanche = []; //.map((a) => a.toLowerCase());
29
- export const yTokensAvalanche = []; //.map((a) => a.toLowerCase());
30
- export const ycTokensAvalanche = []; //.map((a) => a.toLowerCase());
31
- export const aTokensAvalanche = [
28
+ export var cTokensAvalanche = []; //.map((a) => a.toLowerCase());
29
+ export var yTokensAvalanche = []; //.map((a) => a.toLowerCase());
30
+ export var ycTokensAvalanche = []; //.map((a) => a.toLowerCase());
31
+ export var aTokensAvalanche = [
32
32
  '0x47AFa96Cdc9fAb46904A55a6ad4bf6660B53c38a',
33
33
  '0x46A51127C3ce23fb7AB1DE06226147F446e4a857',
34
34
  '0x532E6537FEA298397212F09A61e03311686f548e',
35
35
  '0x686bEF2417b6Dc32C50a3cBfbCC3bb60E1e9a15D',
36
36
  '0x53f7c5869a859F0AeC3D334ee8B4Cf01E3492f21', // avWETH
37
- ].map((a) => a.toLowerCase());
37
+ ].map(function (a) { return a.toLowerCase(); });
@@ -1,5 +1,5 @@
1
1
  import { lowerCaseValues } from "../utils.js";
2
- export const COINS_CELO = lowerCaseValues({
2
+ export var COINS_CELO = lowerCaseValues({
3
3
  'crv': '0x0a7432cF27F1aE3825c313F3C81e7D3efD7639aB',
4
4
  // --- USD ---
5
5
  'dai': '0x90Ca507a5D4458a4C6C6249d186b6dCb02a5BCCd',
@@ -7,7 +7,7 @@ export const COINS_CELO = lowerCaseValues({
7
7
  'usdt': '0x88eeC49252c8cbc039DCdB394c0c2BA2f1637EA0',
8
8
  '3crv': '0x998395fEd908d33CF27115A1D9Ab6555def6cd45',
9
9
  });
10
- export const cTokensCelo = []; //.map((a) => a.toLowerCase());
11
- export const yTokensCelo = []; //.map((a) => a.toLowerCase());
12
- export const ycTokensCelo = []; //.map((a) => a.toLowerCase());
13
- export const aTokensCelo = []; //.map((a) => a.toLowerCase());
10
+ export var cTokensCelo = []; //.map((a) => a.toLowerCase());
11
+ export var yTokensCelo = []; //.map((a) => a.toLowerCase());
12
+ export var ycTokensCelo = []; //.map((a) => a.toLowerCase());
13
+ export var aTokensCelo = []; //.map((a) => a.toLowerCase());
@@ -1,7 +1,8 @@
1
1
  import { lowerCaseValues } from "../utils.js";
2
- export const COINS_ETHEREUM = lowerCaseValues({
2
+ export var COINS_ETHEREUM = lowerCaseValues({
3
3
  crv: "0xD533a949740bb3306d119CC777fa900bA034cd52",
4
4
  // --- USD ---
5
+ 'crvusd': "0xEf1385D2b5dc6D14d5fecB86D53CdBefeCA20fcC",
5
6
  '3crv': "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490",
6
7
  ycdai: "0x99d1Fa417f94dcD62BfE781a1213c092a47041Bc",
7
8
  ycusdc: "0x9777d7E2b60bB01759D0E2f8be2095df444cb07E",
@@ -78,14 +79,14 @@ export const COINS_ETHEREUM = lowerCaseValues({
78
79
  t: "0xCdF7028ceAB81fA0C6971208e83fa7872994beE5",
79
80
  xaut: "0x68749665ff8d2d112fa859aa293f07a622782f38", // XAUt
80
81
  });
81
- export const cTokensEthereum = [
82
+ export var cTokensEthereum = [
82
83
  '0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643',
83
84
  '0x39AA39c021dfbaE8faC545936693aC917d5E7563',
84
85
  "0x8e595470ed749b85c6f7669de83eae304c2ec68f",
85
86
  "0x48759f220ed983db51fa7a8c0d2aab8f3ce4166a",
86
87
  "0x76eb2fe28b36b3ee97f3adae0c69606eedb2a37c", // cyUSDC
87
- ].map((a) => a.toLowerCase());
88
- export const yTokensEthereum = [
88
+ ].map(function (a) { return a.toLowerCase(); });
89
+ export var yTokensEthereum = [
89
90
  "0xC2cB1040220768554cf699b0d863A3cd4324ce32",
90
91
  "0x26EA744E5B887E5205727f55dFBE8685e3b21951",
91
92
  "0xE6354ed5bC4b393a5Aad09f21c46E101e692d447",
@@ -94,15 +95,15 @@ export const yTokensEthereum = [
94
95
  "0x83f798e925BcD4017Eb265844FDDAbb448f1707D",
95
96
  "0x04bC0Ab673d88aE9dbC9DA2380cB6B79C4BCa9aE",
96
97
  "0x73a052500105205d34Daf004eAb301916DA8190f", // yTUSD
97
- ].map((a) => a.toLowerCase());
98
- export const ycTokensEthereum = [
98
+ ].map(function (a) { return a.toLowerCase(); });
99
+ export var ycTokensEthereum = [
99
100
  "0x99d1Fa417f94dcD62BfE781a1213c092a47041Bc",
100
101
  "0x9777d7E2b60bB01759D0E2f8be2095df444cb07E",
101
102
  "0x1bE5d71F2dA660BFdee8012dDc58D024448A0A59", // ycUSDT
102
- ].map((a) => a.toLowerCase());
103
- export const aTokensEthereum = [
103
+ ].map(function (a) { return a.toLowerCase(); });
104
+ export var aTokensEthereum = [
104
105
  "0x028171bCA77440897B824Ca71D1c56caC55b68A3",
105
106
  "0xBcca60bB61934080951369a648Fb03DF4F96263C",
106
107
  "0x3Ed3B47Dd13EC9a98b44e6204A523E766B225811",
107
108
  "0x6c5024cd4f8a59110119c56f8933403a539555eb", // sSUSD
108
- ].map((a) => a.toLowerCase());
109
+ ].map(function (a) { return a.toLowerCase(); });
@@ -1,5 +1,5 @@
1
1
  import { lowerCaseValues } from "../utils.js";
2
- export const COINS_FANTOM = lowerCaseValues({
2
+ export var COINS_FANTOM = lowerCaseValues({
3
3
  'crv': '0x1E4F97b9f9F913c46F1632781732927B9019C68b',
4
4
  // --- USD ---
5
5
  'dai': '0x8d11ec38a3eb5e956b052f67da8bdc9bef8abf3e',
@@ -19,15 +19,15 @@ export const COINS_FANTOM = lowerCaseValues({
19
19
  // --- ETH ---
20
20
  'eth': '0x74b23882a30290451A17c44f4F05243b6b58C76d',
21
21
  });
22
- export const cTokensFantom = [
22
+ export var cTokensFantom = [
23
23
  '0x04c762a5dF2Fa02FE868F25359E0C259fB811CfE',
24
24
  '0x328A7b4d538A2b3942653a9983fdA3C12c571141',
25
25
  '0x70faC71debfD67394D1278D98A29dea79DC6E57A', // iFUSDT
26
- ].map((a) => a.toLowerCase());
27
- export const yTokensFantom = []; //.map((a) => a.toLowerCase());
28
- export const ycTokensFantom = []; //.map((a) => a.toLowerCase());
29
- export const aTokensFantom = [
26
+ ].map(function (a) { return a.toLowerCase(); });
27
+ export var yTokensFantom = []; //.map((a) => a.toLowerCase());
28
+ export var ycTokensFantom = []; //.map((a) => a.toLowerCase());
29
+ export var aTokensFantom = [
30
30
  '0x07e6332dd090d287d3489245038daf987955dcfb',
31
31
  '0xe578c856933d8e1082740bf7661e379aa2a30b26',
32
32
  '0x940f41f0ec9ba1a34cf001cc03347ac092f5f6b5', // gfUSDT
33
- ].map((a) => a.toLowerCase());
33
+ ].map(function (a) { return a.toLowerCase(); });
@@ -1,5 +1,5 @@
1
1
  import { lowerCaseValues } from "../utils.js";
2
- export const COINS_KAVA = lowerCaseValues({
2
+ export var COINS_KAVA = lowerCaseValues({
3
3
  'crv': '0x64D5BaF5ac030e2b7c435aDD967f787ae94D0205',
4
4
  // --- USD ---
5
5
  'dai': '0x765277EebeCA2e31912C9946eAe1021199B39C61',
@@ -7,7 +7,7 @@ export const COINS_KAVA = lowerCaseValues({
7
7
  'usdt': '0xB44a9B6905aF7c801311e8F4E76932ee959c663C',
8
8
  '3crv': '0x7A0e3b70b1dB0D6CA63Cac240895b2D21444A7b9',
9
9
  });
10
- export const cTokensKava = []; //.map((a) => a.toLowerCase());
11
- export const yTokensKava = []; //.map((a) => a.toLowerCase());
12
- export const ycTokensKava = []; //.map((a) => a.toLowerCase());
13
- export const aTokensKava = []; //.map((a) => a.toLowerCase());
10
+ export var cTokensKava = []; //.map((a) => a.toLowerCase());
11
+ export var yTokensKava = []; //.map((a) => a.toLowerCase());
12
+ export var ycTokensKava = []; //.map((a) => a.toLowerCase());
13
+ export var aTokensKava = []; //.map((a) => a.toLowerCase());
@@ -1,5 +1,5 @@
1
1
  import { lowerCaseValues } from "../utils.js";
2
- export const COINS_MOONBEAM = lowerCaseValues({
2
+ export var COINS_MOONBEAM = lowerCaseValues({
3
3
  'crv': '0x712b3d230f3c1c19db860d80619288b1f0bdd0bd',
4
4
  // --- USD ---
5
5
  'dai': '0xc234A67a4F840E61adE794be47de455361b52413',
@@ -7,7 +7,7 @@ export const COINS_MOONBEAM = lowerCaseValues({
7
7
  'usdt': '0x8e70cD5B4Ff3f62659049e74b6649c6603A0E594',
8
8
  '3crv': '0xace58a26b8db90498ef0330fdc9c2655db0c45e2',
9
9
  });
10
- export const cTokensMoonbeam = []; //.map((a) => a.toLowerCase());
11
- export const yTokensMoonbeam = []; //.map((a) => a.toLowerCase());
12
- export const ycTokensMoonbeam = []; //.map((a) => a.toLowerCase());
13
- export const aTokensMoonbeam = []; //.map((a) => a.toLowerCase());
10
+ export var cTokensMoonbeam = []; //.map((a) => a.toLowerCase());
11
+ export var yTokensMoonbeam = []; //.map((a) => a.toLowerCase());
12
+ export var ycTokensMoonbeam = []; //.map((a) => a.toLowerCase());
13
+ export var aTokensMoonbeam = []; //.map((a) => a.toLowerCase());
@@ -1,5 +1,5 @@
1
1
  import { lowerCaseValues } from "../utils.js";
2
- export const COINS_OPTIMISM = lowerCaseValues({
2
+ export var COINS_OPTIMISM = lowerCaseValues({
3
3
  'crv': '0x0994206dfE8De6Ec6920FF4D779B0d950605Fb53',
4
4
  // --- USD ---
5
5
  'dai': '0xda10009cbd5d07dd0cecc66161fc93d7c9000da1',
@@ -13,7 +13,7 @@ export const COINS_OPTIMISM = lowerCaseValues({
13
13
  'seth': '0xe405de8f52ba7559f9df3c368500b6e6ae6cee49',
14
14
  'wsteth': '0x1f32b1c2345538c0c6f582fcb022739c4a194ebb',
15
15
  });
16
- export const cTokensOptimism = []; //.map((a) => a.toLowerCase());
17
- export const yTokensOptimism = []; //.map((a) => a.toLowerCase());
18
- export const ycTokensOptimism = []; //.map((a) => a.toLowerCase());
19
- export const aTokensOptimism = []; //.map((a) => a.toLowerCase());
16
+ export var cTokensOptimism = []; //.map((a) => a.toLowerCase());
17
+ export var yTokensOptimism = []; //.map((a) => a.toLowerCase());
18
+ export var ycTokensOptimism = []; //.map((a) => a.toLowerCase());
19
+ export var aTokensOptimism = []; //.map((a) => a.toLowerCase());
@@ -1,5 +1,5 @@
1
1
  import { lowerCaseValues } from "../utils.js";
2
- export const COINS_POLYGON = lowerCaseValues({
2
+ export var COINS_POLYGON = lowerCaseValues({
3
3
  crv: "0x172370d5cd63279efa6d502dab29171933a610af",
4
4
  // -- USD ---
5
5
  dai: "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",
@@ -22,13 +22,13 @@ export const COINS_POLYGON = lowerCaseValues({
22
22
  // --- EUR ---
23
23
  eurt: "0x7BDF330f423Ea880FF95fC41A280fD5eCFD3D09f", // EURT
24
24
  });
25
- export const cTokensPolygon = []; //.map((a) => a.toLowerCase());
26
- export const yTokensPolygon = []; //.map((a) => a.toLowerCase());
27
- export const ycTokensPolygon = []; //.map((a) => a.toLowerCase());
28
- export const aTokensPolygon = [
25
+ export var cTokensPolygon = []; //.map((a) => a.toLowerCase());
26
+ export var yTokensPolygon = []; //.map((a) => a.toLowerCase());
27
+ export var ycTokensPolygon = []; //.map((a) => a.toLowerCase());
28
+ export var aTokensPolygon = [
29
29
  "0x27F8D03b3a2196956ED754baDc28D73be8830A6e",
30
30
  "0x1a13F4Ca1d028320A707D99520AbFefca3998b7F",
31
31
  "0x60D55F02A771d515e077c9C2403a1ef324885CeC",
32
32
  "0x5c2ed810328349100A66B82b78a1791B101C9D61",
33
33
  "0x28424507fefb6f7f8E9D3860F56504E4e5f5f390", // amWETH
34
- ].map((a) => a.toLowerCase());
34
+ ].map(function (a) { return a.toLowerCase(); });
@@ -1,5 +1,5 @@
1
1
  import { lowerCaseValues } from "../utils.js";
2
- export const COINS_XDAI = lowerCaseValues({
2
+ export var COINS_XDAI = lowerCaseValues({
3
3
  'crv': '0x712b3d230f3c1c19db860d80619288b1f0bdd0bd',
4
4
  // --- USD ---
5
5
  'wxdai': '0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d',
@@ -14,7 +14,7 @@ export const COINS_XDAI = lowerCaseValues({
14
14
  // --- EUR ---
15
15
  'eure': '0xcB444e90D8198415266c6a2724b7900fb12FC56E',
16
16
  });
17
- export const cTokensXDai = []; //.map((a) => a.toLowerCase());
18
- export const yTokensXDai = []; //.map((a) => a.toLowerCase());
19
- export const ycTokensXDai = []; //.map((a) => a.toLowerCase());
20
- export const aTokensXDai = []; //.map((a) => a.toLowerCase());
17
+ export var cTokensXDai = []; //.map((a) => a.toLowerCase());
18
+ export var yTokensXDai = []; //.map((a) => a.toLowerCase());
19
+ export var ycTokensXDai = []; //.map((a) => a.toLowerCase());
20
+ export var aTokensXDai = []; //.map((a) => a.toLowerCase());
@@ -7,7 +7,7 @@ import eursusdZapABI from '../abis/eursusd2/zap.json' assert { type: 'json' };
7
7
  import renSwapABI from '../abis/ren-arbitrum/swap.json' assert { type: 'json' };
8
8
  import gaugeChildABI from '../abis/gauge_child.json' assert { type: 'json' };
9
9
  import wstETHSwapABI from "../abis/wsteth/swap.json" assert { type: 'json' };
10
- export const POOLS_DATA_ARBITRUM = lowerCasePoolDataAddresses({
10
+ export var POOLS_DATA_ARBITRUM = lowerCasePoolDataAddresses({
11
11
  '2pool': {
12
12
  name: "2pool",
13
13
  full_name: "2pool",
@@ -1,7 +1,7 @@
1
1
  import { lowerCasePoolDataAddresses } from "../utils.js";
2
2
  import tripoolSwapABI from '../abis/3pool-optimism/swap.json' assert { type: 'json' };
3
3
  import gaugeRewardsOnlyABI from '../abis/gauge_rewards_only.json' assert { type: 'json' };
4
- export const POOLS_DATA_AURORA = lowerCasePoolDataAddresses({
4
+ export var POOLS_DATA_AURORA = lowerCasePoolDataAddresses({
5
5
  '3pool': {
6
6
  name: "3pool",
7
7
  full_name: "3pool",
@@ -6,7 +6,7 @@ import atricrypto3Zap from '../abis/atricrypto3/zap.json' assert { type: 'json'
6
6
  import AVAXCryptoSwapABI from "../abis/avaxcrypto/swap.json" assert { type: 'json' };
7
7
  import AVAXCryptoZapABI from "../abis/avaxcrypto/zap.json" assert { type: 'json' };
8
8
  import gaugeChildABI from '../abis/gauge_child.json' assert { type: 'json' };
9
- export const POOLS_DATA_AVALANCHE = lowerCasePoolDataAddresses({
9
+ export var POOLS_DATA_AVALANCHE = lowerCasePoolDataAddresses({
10
10
  aave: {
11
11
  name: "aave",
12
12
  full_name: "aave",
@@ -1,2 +1,2 @@
1
1
  import { lowerCasePoolDataAddresses } from "../utils.js";
2
- export const POOLS_DATA_CELO = lowerCasePoolDataAddresses({});
2
+ export var POOLS_DATA_CELO = lowerCasePoolDataAddresses({});
@@ -87,7 +87,7 @@ import fraxusdcSwapABI from '../abis/fraxusdc/swap.json' assert { type: 'json' }
87
87
  import frxethSwapABI from '../abis/frxeth/swap.json' assert { type: 'json' };
88
88
  import sbtc2SwapABI from '../abis/sbtc2/swap.json' assert { type: 'json' };
89
89
  import wbethSwapABI from '../abis/wbeth/swap.json' assert { type: 'json' };
90
- export const POOLS_DATA_ETHEREUM = lowerCasePoolDataAddresses({
90
+ export var POOLS_DATA_ETHEREUM = lowerCasePoolDataAddresses({
91
91
  compound: {
92
92
  name: "compound",
93
93
  full_name: "compound",
@@ -10,7 +10,7 @@ import aaveSwapABI from '../abis/aave/swap.json' assert { type: 'json' };
10
10
  import gaugeChildABI from '../abis/gauge_child.json' assert { type: 'json' };
11
11
  import gaugeRewardsOnlyABI from '../abis/gauge_rewards_only.json' assert { type: 'json' };
12
12
  import streamerABI from '../abis/streamer.json' assert { type: 'json' };
13
- export const POOLS_DATA_FANTOM = lowerCasePoolDataAddresses({
13
+ export var POOLS_DATA_FANTOM = lowerCasePoolDataAddresses({
14
14
  '2pool': {
15
15
  name: "2pool",
16
16
  full_name: "2pool",
@@ -1,2 +1,2 @@
1
1
  import { lowerCasePoolDataAddresses } from "../utils.js";
2
- export const POOLS_DATA_KAVA = lowerCasePoolDataAddresses({});
2
+ export var POOLS_DATA_KAVA = lowerCasePoolDataAddresses({});
@@ -1,7 +1,7 @@
1
1
  import { lowerCasePoolDataAddresses } from "../utils.js";
2
2
  import tripoolSwapABI from '../abis/3pool-optimism/swap.json' assert { type: 'json' };
3
3
  import gaugeChildABI from '../abis/gauge_child.json' assert { type: 'json' };
4
- export const POOLS_DATA_MOONBEAM = lowerCasePoolDataAddresses({
4
+ export var POOLS_DATA_MOONBEAM = lowerCasePoolDataAddresses({
5
5
  '3pool': {
6
6
  name: "3pool",
7
7
  full_name: "3pool",
@@ -2,7 +2,7 @@ import { lowerCasePoolDataAddresses } from "../utils.js";
2
2
  import tripoolSwapABI from '../abis/3pool-optimism/swap.json' assert { type: 'json' };
3
3
  import wstETHSwapABI from '../abis/wsteth/swap.json' assert { type: 'json' };
4
4
  import gaugeChildABI from '../abis/gauge_child.json' assert { type: 'json' };
5
- export const POOLS_DATA_OPTIMISM = lowerCasePoolDataAddresses({
5
+ export var POOLS_DATA_OPTIMISM = lowerCasePoolDataAddresses({
6
6
  '3pool': {
7
7
  name: "3pool",
8
8
  full_name: "3pool",
@@ -6,7 +6,7 @@ import atricrypto3Zap from '../abis/atricrypto3/zap.json' assert { type: 'json'
6
6
  import eurtusdSwap from '../abis/eurtusd/swap.json' assert { type: 'json' };
7
7
  import eurtusdZap from '../abis/eurtusd/deposit.json' assert { type: 'json' };
8
8
  import gaugeChildABI from '../abis/gauge_child.json' assert { type: 'json' };
9
- export const POOLS_DATA_POLYGON = lowerCasePoolDataAddresses({
9
+ export var POOLS_DATA_POLYGON = lowerCasePoolDataAddresses({
10
10
  aave: {
11
11
  name: "aave",
12
12
  full_name: "aave",
@@ -9,7 +9,7 @@ import eureDepositABI from "../abis/eureusd/zap.json" assert { type: 'json' };
9
9
  import gaugeRewardsOnlyABI from '../abis/gauge_rewards_only.json' assert { type: 'json' };
10
10
  import gaugeChildABI from '../abis/gauge_child.json' assert { type: 'json' };
11
11
  import streamerABI from '../abis/streamer.json' assert { type: 'json' };
12
- export const POOLS_DATA_XDAI = lowerCasePoolDataAddresses({
12
+ export var POOLS_DATA_XDAI = lowerCasePoolDataAddresses({
13
13
  '3pool': {
14
14
  name: "3pool",
15
15
  full_name: "3pool",
@@ -1,9 +1,9 @@
1
1
  import { curve } from "../curve.js";
2
- export const lowerCasePoolDataAddresses = (poolsData) => {
3
- for (const poolId in poolsData) {
2
+ export var lowerCasePoolDataAddresses = function (poolsData) {
3
+ for (var poolId in poolsData) {
4
4
  if (!Object.prototype.hasOwnProperty.call(poolsData, poolId))
5
5
  continue;
6
- const poolData = poolsData[poolId];
6
+ var poolData = poolsData[poolId];
7
7
  poolData.swap_address = poolData.swap_address.toLowerCase();
8
8
  poolData.token_address = poolData.token_address.toLowerCase();
9
9
  poolData.gauge_address = poolData.gauge_address.toLowerCase();
@@ -13,44 +13,45 @@ export const lowerCasePoolDataAddresses = (poolsData) => {
13
13
  poolData.sCurveRewards_address = poolData.sCurveRewards_address.toLowerCase();
14
14
  if (poolData.reward_contract)
15
15
  poolData.reward_contract = poolData.reward_contract.toLowerCase();
16
- poolData.underlying_coin_addresses = poolData.underlying_coin_addresses.map((a) => a.toLowerCase());
17
- poolData.wrapped_coin_addresses = poolData.wrapped_coin_addresses.map((a) => a.toLowerCase());
16
+ poolData.underlying_coin_addresses = poolData.underlying_coin_addresses.map(function (a) { return a.toLowerCase(); });
17
+ poolData.wrapped_coin_addresses = poolData.wrapped_coin_addresses.map(function (a) { return a.toLowerCase(); });
18
18
  }
19
19
  return poolsData;
20
20
  };
21
- export const extractDecimals = (poolsData) => {
22
- const DECIMALS = {};
23
- for (const poolId in poolsData) {
21
+ export var extractDecimals = function (poolsData) {
22
+ var DECIMALS = {};
23
+ for (var poolId in poolsData) {
24
24
  if (!Object.prototype.hasOwnProperty.call(poolsData, poolId))
25
25
  continue;
26
- const poolData = poolsData[poolId];
26
+ var poolData = poolsData[poolId];
27
27
  // LP token
28
28
  DECIMALS[poolData.token_address] = 18;
29
29
  // Underlying coins
30
- for (let i = 0; i < poolData.underlying_coin_addresses.length; i++) {
30
+ for (var i = 0; i < poolData.underlying_coin_addresses.length; i++) {
31
31
  DECIMALS[poolData.underlying_coin_addresses[i]] = poolData.underlying_decimals[i];
32
32
  }
33
33
  // Wrapped coins
34
- for (let i = 0; i < poolData.wrapped_coin_addresses.length; i++) {
34
+ for (var i = 0; i < poolData.wrapped_coin_addresses.length; i++) {
35
35
  DECIMALS[poolData.wrapped_coin_addresses[i]] = poolData.wrapped_decimals[i];
36
36
  }
37
37
  }
38
38
  return DECIMALS;
39
39
  };
40
- export const extractGauges = (poolsData) => {
41
- const GAUGES = [];
42
- for (const poolData of Object.values(poolsData)) {
40
+ export var extractGauges = function (poolsData) {
41
+ var GAUGES = [];
42
+ for (var _i = 0, _a = Object.values(poolsData); _i < _a.length; _i++) {
43
+ var poolData = _a[_i];
43
44
  if (poolData.gauge_address === curve.constants.ZERO_ADDRESS)
44
45
  continue;
45
46
  GAUGES.push(poolData.gauge_address);
46
47
  }
47
48
  return GAUGES;
48
49
  };
49
- export const lowerCaseValues = (dict) => {
50
+ export var lowerCaseValues = function (dict) {
50
51
  // @ts-ignore
51
- return Object.fromEntries(Object.entries(dict).map((entry) => [entry[0], entry[1].toLowerCase()]));
52
+ return Object.fromEntries(Object.entries(dict).map(function (entry) { return [entry[0], entry[1].toLowerCase()]; }));
52
53
  };
53
- export const lowerCaseKeys = (dict) => {
54
+ export var lowerCaseKeys = function (dict) {
54
55
  // @ts-ignore
55
- return Object.fromEntries(Object.entries(dict).map((entry) => [entry[0].toLowerCase(), entry[1]]));
56
+ return Object.fromEntries(Object.entries(dict).map(function (entry) { return [entry[0].toLowerCase(), entry[1]]; }));
56
57
  };