@curvefi/api 2.69.8 → 2.69.10
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.
- package/lib/constants/chainIds.d.ts +0 -1
- package/lib/constants/chainIds.js +0 -1
- package/lib/constants/coins/index.d.ts +1 -11
- package/lib/constants/coins/index.js +1 -11
- package/lib/constants/factory/crypto.d.ts +0 -50
- package/lib/constants/factory/crypto.js +0 -80
- package/lib/constants/factory/stable.d.ts +0 -13
- package/lib/constants/factory/stable.js +0 -139
- package/lib/constants/network_constants.js +2 -292
- package/lib/constants/pools/index.d.ts +1 -11
- package/lib/constants/pools/index.js +1 -11
- package/lib/constants/rewardNetworks.js +1 -1
- package/lib/constants/volumeNetworks.d.ts +0 -2
- package/lib/constants/volumeNetworks.js +1 -3
- package/lib/curve.js +1 -4
- package/lib/external-api.d.ts +0 -2
- package/lib/external-api.js +0 -41
- package/lib/pools/PoolTemplate.js +0 -2
- package/lib/pools/subClasses/statsPool.js +2 -2
- package/lib/pools/utils.js +2 -12
- package/lib/route-graph.worker.js +2 -4
- package/lib/utils.js +3 -57
- package/package.json +1 -1
- package/lib/constants/abis/avaxcrypto/swap.json +0 -1195
- package/lib/constants/abis/avaxcrypto/zap.json +0 -250
- package/lib/constants/abis/factory-v2/DepositZapMetaUsd2Fantom.json +0 -197
- package/lib/constants/abis/factory-v2/MetaUSDGeist.json +0 -932
- package/lib/constants/abis/fusdt/swap.json +0 -1221
- package/lib/constants/abis/fusdt/zap.json +0 -215
- package/lib/constants/abis/ren-fantom/swap.json +0 -868
- package/lib/constants/abis/tricrypto/swapNoZap.json +0 -1250
- package/lib/constants/coins/aurora.d.ts +0 -3
- package/lib/constants/coins/aurora.js +0 -9
- package/lib/constants/coins/avalanche.d.ts +0 -4
- package/lib/constants/coins/avalanche.js +0 -34
- package/lib/constants/coins/celo.d.ts +0 -3
- package/lib/constants/coins/celo.js +0 -9
- package/lib/constants/coins/fantom.d.ts +0 -5
- package/lib/constants/coins/fantom.js +0 -31
- package/lib/constants/coins/kava.d.ts +0 -3
- package/lib/constants/coins/kava.js +0 -9
- package/lib/constants/coins/mantle.d.ts +0 -2
- package/lib/constants/coins/mantle.js +0 -5
- package/lib/constants/coins/moonbeam.d.ts +0 -3
- package/lib/constants/coins/moonbeam.js +0 -9
- package/lib/constants/coins/sonic.d.ts +0 -2
- package/lib/constants/coins/sonic.js +0 -5
- package/lib/constants/coins/xlayer.d.ts +0 -2
- package/lib/constants/coins/xlayer.js +0 -5
- package/lib/constants/coins/zksync.d.ts +0 -2
- package/lib/constants/coins/zksync.js +0 -6
- package/lib/constants/pools/aurora.d.ts +0 -2
- package/lib/constants/pools/aurora.js +0 -31
- package/lib/constants/pools/avalanche.d.ts +0 -2
- package/lib/constants/pools/avalanche.js +0 -166
- package/lib/constants/pools/celo.d.ts +0 -2
- package/lib/constants/pools/celo.js +0 -2
- package/lib/constants/pools/fantom.d.ts +0 -2
- package/lib/constants/pools/fantom.js +0 -185
- package/lib/constants/pools/kava.d.ts +0 -2
- package/lib/constants/pools/kava.js +0 -2
- package/lib/constants/pools/mantle.d.ts +0 -2
- package/lib/constants/pools/mantle.js +0 -2
- package/lib/constants/pools/moonbeam.d.ts +0 -2
- package/lib/constants/pools/moonbeam.js +0 -31
- package/lib/constants/pools/sonic.d.ts +0 -2
- package/lib/constants/pools/sonic.js +0 -2
- package/lib/constants/pools/xlayer.d.ts +0 -2
- package/lib/constants/pools/xlayer.js +0 -2
- package/lib/constants/pools/zksync.d.ts +0 -2
- package/lib/constants/pools/zksync.js +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { lowerCaseValues } from "./utils.js";
|
|
2
|
-
import { POOLS_DATA_ETHEREUM, LLAMMAS_DATA_ETHEREUM, POOLS_DATA_POLYGON,
|
|
3
|
-
import { COINS_ETHEREUM, cTokensEthereum, yTokensEthereum, ycTokensEthereum, aTokensEthereum, COINS_OPTIMISM, COINS_POLYGON, aTokensPolygon,
|
|
2
|
+
import { POOLS_DATA_ETHEREUM, LLAMMAS_DATA_ETHEREUM, POOLS_DATA_POLYGON, POOLS_DATA_ARBITRUM, POOLS_DATA_OPTIMISM, POOLS_DATA_XDAI, POOLS_DATA_BASE, POOLS_DATA_BSC, POOLS_DATA_FRAXTAL, POOLS_DATA_HYPERLIQUID, } from './pools/index.js';
|
|
3
|
+
import { COINS_ETHEREUM, cTokensEthereum, yTokensEthereum, ycTokensEthereum, aTokensEthereum, COINS_OPTIMISM, COINS_POLYGON, aTokensPolygon, COINS_ARBITRUM, COINS_XDAI, COINS_BASE, COINS_BSC, COINS_FRAXTAL, COINS_HYPERLIQUID, } from "./coins/index.js";
|
|
4
4
|
const ALIASES_ETHEREUM = lowerCaseValues({
|
|
5
5
|
"crv": "0xD533a949740bb3306d119CC777fa900bA034cd52", // <--- CHANGE
|
|
6
6
|
"minter": '0xd061D61a4d941c39E5453435B6345Dc261C2fcE0', // <--- RECOVERED
|
|
@@ -45,43 +45,6 @@ const ALIASES_POLYGON = lowerCaseValues({
|
|
|
45
45
|
"tricrypto_factory": '0xC1b393EfEF38140662b91441C6710Aa704973228',
|
|
46
46
|
"factory_admin": "",
|
|
47
47
|
});
|
|
48
|
-
const ALIASES_FANTOM = lowerCaseValues({
|
|
49
|
-
"crv": "0x1E4F97b9f9F913c46F1632781732927B9019C68b",
|
|
50
|
-
"child_gauge_factory": "0x004A476B5B76738E34c86C7144554B9d34402F13",
|
|
51
|
-
"child_gauge_factory_old": "0xDb205f215f568ADf21b9573b62566f6d9a40bed6",
|
|
52
|
-
"voting_escrow": "0xb75dca485e21a77e1b433ecacb74475fc67e259c",
|
|
53
|
-
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc", // <-- DUMMY
|
|
54
|
-
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
55
|
-
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
56
|
-
"router": "0x0DCDED3545D565bA3B19E683431381007245d983",
|
|
57
|
-
"deposit_and_stake": "0x37c5ab57AF7100Bdc9B668d766e193CCbF6614FD",
|
|
58
|
-
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
59
|
-
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
60
|
-
"factory": "0x686d67265703d1f124c45e33d47d794c566889ba",
|
|
61
|
-
"crypto_factory": "0xE5De15A9C9bBedb4F5EC13B131E61245f2983A69",
|
|
62
|
-
"stable_ng_factory": '0xe61Fb97Ef6eBFBa12B36Ffd7be785c1F5A2DE66b',
|
|
63
|
-
"twocrypto_factory": '0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F',
|
|
64
|
-
"tricrypto_factory": '0x9AF14D26075f142eb3F292D5065EB3faa646167b',
|
|
65
|
-
"factory_admin": "",
|
|
66
|
-
});
|
|
67
|
-
const ALIASES_AVALANCHE = lowerCaseValues({
|
|
68
|
-
"crv": "0x47536F17F4fF30e64A96a7555826b8f9e66ec468",
|
|
69
|
-
"child_gauge_factory": "0x97aDC08FA1D849D2C48C5dcC1DaB568B169b0267",
|
|
70
|
-
"child_gauge_factory_old": "0xDb205f215f568ADf21b9573b62566f6d9a40bed6",
|
|
71
|
-
"voting_escrow": "0xc55837710bc500f1e3c7bb9dd1d51f7c5647e657",
|
|
72
|
-
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc", // <-- DUMMY
|
|
73
|
-
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
74
|
-
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
75
|
-
"router": "0x0DCDED3545D565bA3B19E683431381007245d983",
|
|
76
|
-
"deposit_and_stake": "0x37c5ab57AF7100Bdc9B668d766e193CCbF6614FD",
|
|
77
|
-
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
78
|
-
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
79
|
-
"factory": '0xb17b674D9c5CB2e441F8e196a2f048A81355d031',
|
|
80
|
-
"stable_ng_factory": '0x1764ee18e8B3ccA4787249Ceb249356192594585',
|
|
81
|
-
"twocrypto_factory": '0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F',
|
|
82
|
-
"tricrypto_factory": '0x3d6cB2F6DcF47CDd9C13E4e3beAe9af041d8796a',
|
|
83
|
-
"factory_admin": "",
|
|
84
|
-
});
|
|
85
48
|
const ALIASES_ARBITRUM = lowerCaseValues({
|
|
86
49
|
"crv": "0x11cDb42B0EB46D95f990BeDD4695A6e3fA034978",
|
|
87
50
|
"child_gauge_factory": "0x988d1037e9608B21050A8EFba0c6C45e01A3Bce7",
|
|
@@ -142,86 +105,6 @@ const ALIASES_XDAI = lowerCaseValues({
|
|
|
142
105
|
"tricrypto_factory": '0xb47988aD49DCE8D909c6f9Cf7B26caF04e1445c8',
|
|
143
106
|
"factory_admin": "",
|
|
144
107
|
});
|
|
145
|
-
const ALIASES_MOONBEAM = lowerCaseValues({
|
|
146
|
-
"crv": "0x7C598c96D02398d89FbCb9d41Eab3DF0C16F227D",
|
|
147
|
-
"child_gauge_factory": "0xe35A879E5EfB4F1Bb7F70dCF3250f2e19f096bd8",
|
|
148
|
-
"child_gauge_factory_old": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
149
|
-
"voting_escrow": "0x0000000000000000000000000000000000000000",
|
|
150
|
-
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc", // <-- DUMMY
|
|
151
|
-
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
152
|
-
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
153
|
-
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
154
|
-
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
155
|
-
"factory": '0x4244eB811D6e0Ef302326675207A95113dB4E1F8',
|
|
156
|
-
"factory_admin": "",
|
|
157
|
-
});
|
|
158
|
-
const ALIASES_AURORA = lowerCaseValues({
|
|
159
|
-
"crv": "0x64D5BaF5ac030e2b7c435aDD967f787ae94D0205",
|
|
160
|
-
"child_gauge_factory": "0xe35A879E5EfB4F1Bb7F70dCF3250f2e19f096bd8", // <-- CHANGED
|
|
161
|
-
"voting_escrow": "0x0000000000000000000000000000000000000000", // <-- DUMMY
|
|
162
|
-
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc", // <-- DUMMY
|
|
163
|
-
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
164
|
-
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
165
|
-
"router": "0x0000000000000000000000000000000000000000",
|
|
166
|
-
"deposit_and_stake": "0x0000000000000000000000000000000000000000",
|
|
167
|
-
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4", // <-- CHANGED
|
|
168
|
-
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC', // <--- NEW
|
|
169
|
-
"factory": '0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F', // <--- TODO CHANGE
|
|
170
|
-
"crvusd_factory": '0x4F8846Ae9380B90d2E71D5e3D042dff3E7ebb40d', // <-- DUMMY
|
|
171
|
-
"crypto_factory": '0xF18056Bbd320E96A48e3Fbf8bC061322531aac99', // <--- TODO CHANGE
|
|
172
|
-
"twocrypto_factory": '0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F', // <--- NEW
|
|
173
|
-
"tricrypto_factory": '0x0c0e5f2fF0ff18a3be9b835635039256dC4B4963', // <--- TODO CHANGE
|
|
174
|
-
"stable_ng_factory": '0x5eeE3091f747E60a045a2E715a4c71e600e31F6E',
|
|
175
|
-
"factory_admin": "",
|
|
176
|
-
});
|
|
177
|
-
const ALIASES_KAVA = lowerCaseValues({
|
|
178
|
-
"crv": "0x64D5BaF5ac030e2b7c435aDD967f787ae94D0205", // <--- TODO CHANGE
|
|
179
|
-
"child_gauge_factory": "0xe35A879E5EfB4F1Bb7F70dCF3250f2e19f096bd8",
|
|
180
|
-
"child_gauge_factory_old": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
181
|
-
"voting_escrow": "0x0000000000000000000000000000000000000000", // <-- DUMMY
|
|
182
|
-
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc", // <-- DUMMY
|
|
183
|
-
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
184
|
-
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
185
|
-
"router": "0x0DCDED3545D565bA3B19E683431381007245d983",
|
|
186
|
-
"deposit_and_stake": "0x37c5ab57AF7100Bdc9B668d766e193CCbF6614FD",
|
|
187
|
-
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
188
|
-
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
189
|
-
"factory": '0x40bc62805471eF53DdD5C5cF99ed3d9e5aa81b48',
|
|
190
|
-
"stable_ng_factory": '0x1764ee18e8B3ccA4787249Ceb249356192594585',
|
|
191
|
-
"twocrypto_factory": '0xd3B17f862956464ae4403cCF829CE69199856e1e',
|
|
192
|
-
"tricrypto_factory": '0x3d6cB2F6DcF47CDd9C13E4e3beAe9af041d8796a',
|
|
193
|
-
"factory_admin": "",
|
|
194
|
-
});
|
|
195
|
-
const ALIASES_CELO = lowerCaseValues({
|
|
196
|
-
"crv": "0x0a7432cF27F1aE3825c313F3C81e7D3efD7639aB", // <--- TODO CHANGE
|
|
197
|
-
"child_gauge_factory": "0xe35A879E5EfB4F1Bb7F70dCF3250f2e19f096bd8",
|
|
198
|
-
"child_gauge_factory_old": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
199
|
-
"voting_escrow": "0x0000000000000000000000000000000000000000", // <-- DUMMY
|
|
200
|
-
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc", // <-- DUMMY
|
|
201
|
-
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
202
|
-
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
203
|
-
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
204
|
-
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
205
|
-
"factory": '0x5277A0226d10392295E8D383E9724D6E416d6e6C',
|
|
206
|
-
"stable_ng_factory": '0x1764ee18e8B3ccA4787249Ceb249356192594585',
|
|
207
|
-
"twocrypto_factory": '0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F',
|
|
208
|
-
"tricrypto_factory": '0x3d6cB2F6DcF47CDd9C13E4e3beAe9af041d8796a',
|
|
209
|
-
"factory_admin": "",
|
|
210
|
-
});
|
|
211
|
-
const ALIASES_ZKSYNC = lowerCaseValues({
|
|
212
|
-
"crv": "0x5945932099f124194452a4c62d34bB37f16183B2",
|
|
213
|
-
"child_gauge_factory": "0x167D9C27070Ce04b79820E6aaC0cF243d6098812",
|
|
214
|
-
"voting_escrow": "0x0000000000000000000000000000000000000000",
|
|
215
|
-
"fee_distributor": "0x0000000000000000000000000000000000000000",
|
|
216
|
-
"gauge_controller": "0x0000000000000000000000000000000000000000",
|
|
217
|
-
"address_provider": "0x0000000000000000000000000000000000000000",
|
|
218
|
-
"router": "0x7C915390e109CA66934f1eB285854375D1B127FA",
|
|
219
|
-
"deposit_and_stake": "0x253548e98C769aD2850da8DB3E4c2b2cE46E3839",
|
|
220
|
-
"stable_ng_factory": '0xFcAb5d04e8e031334D5e8D2C166B08daB0BE6CaE',
|
|
221
|
-
"twocrypto_factory": '0xf3a546AF64aFd6BB8292746BA66DB33aFAE72114',
|
|
222
|
-
"tricrypto_factory": '0x5d4174C40f1246dABe49693845442927d5929f0D',
|
|
223
|
-
"factory_admin": "0x0000000000000000000000000000000000000000",
|
|
224
|
-
});
|
|
225
108
|
const ALIASES_BASE = lowerCaseValues({
|
|
226
109
|
"crv": "0x8Ee73c484A26e0A5df2Ee2a4960B789967dd0415", // <--- TODO CHANGE
|
|
227
110
|
"child_gauge_factory": "0xe35A879E5EfB4F1Bb7F70dCF3250f2e19f096bd8",
|
|
@@ -279,50 +162,6 @@ const ALIASES_FRAXTAL = lowerCaseValues({
|
|
|
279
162
|
"fast_bridge": "0x3fE593E651Cd0B383AD36b75F4159f30BB0631A6",
|
|
280
163
|
"crvusd": "0xB102f7Efa0d5dE071A8D37B3548e1C7CB148Caf3",
|
|
281
164
|
});
|
|
282
|
-
const ALIASES_XLAYER = lowerCaseValues({
|
|
283
|
-
"crv": "0x0000000000000000000000000000000000000000",
|
|
284
|
-
"child_gauge_factory": "0xD5C3e070E121488806AaA5565283A164ACEB94Df",
|
|
285
|
-
"child_gauge_factory_old": "0xeF672bD94913CB6f1d2812a6e18c1fFdEd8eFf5c",
|
|
286
|
-
"voting_escrow": "0x0000000000000000000000000000000000000000",
|
|
287
|
-
"fee_distributor": "0x0000000000000000000000000000000000000000",
|
|
288
|
-
"gauge_controller": "0x0000000000000000000000000000000000000000",
|
|
289
|
-
"address_provider": "0x0000000000000000000000000000000000000000",
|
|
290
|
-
"router": "0xBFab8ebc836E1c4D81837798FC076D219C9a1855",
|
|
291
|
-
"deposit_and_stake": "0x5552b631e2aD801fAa129Aacf4B701071cC9D1f7",
|
|
292
|
-
"stable_ng_factory": '0x5eeE3091f747E60a045a2E715a4c71e600e31F6E',
|
|
293
|
-
"twocrypto_factory": '0x0c59d36b23f809f8b6C7cb4c8C590a0AC103baEf',
|
|
294
|
-
"tricrypto_factory": '0xd3B17f862956464ae4403cCF829CE69199856e1e',
|
|
295
|
-
"factory_admin": '0x0000000000000000000000000000000000000000',
|
|
296
|
-
});
|
|
297
|
-
const ALIASES_MANTLE = lowerCaseValues({
|
|
298
|
-
"crv": "0x0000000000000000000000000000000000000000",
|
|
299
|
-
"child_gauge_factory": "0x0B8D6B6CeFC7Aa1C2852442e518443B1b22e1C52",
|
|
300
|
-
"child_gauge_factory_old": "0xeF672bD94913CB6f1d2812a6e18c1fFdEd8eFf5c",
|
|
301
|
-
"voting_escrow": "0x0000000000000000000000000000000000000000",
|
|
302
|
-
"fee_distributor": "0x0000000000000000000000000000000000000000",
|
|
303
|
-
"gauge_controller": "0x0000000000000000000000000000000000000000",
|
|
304
|
-
"address_provider": "0x0000000000000000000000000000000000000000",
|
|
305
|
-
"router": "0x4f37A9d177470499A2dD084621020b023fcffc1F",
|
|
306
|
-
"deposit_and_stake": "0xF0d4c12A5768D806021F80a262B4d39d26C58b8D",
|
|
307
|
-
"stable_ng_factory": '0x5eeE3091f747E60a045a2E715a4c71e600e31F6E',
|
|
308
|
-
"twocrypto_factory": '0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F',
|
|
309
|
-
"tricrypto_factory": '0x0C9D8c7e486e822C29488Ff51BFf0167B4650953',
|
|
310
|
-
"factory_admin": '0x0000000000000000000000000000000000000000',
|
|
311
|
-
});
|
|
312
|
-
const ALIASES_SONIC = lowerCaseValues({
|
|
313
|
-
"crv": "0x5af79133999f7908953e94b7a5cf367740ebee35",
|
|
314
|
-
"child_gauge_factory": "0xf3A431008396df8A8b2DF492C913706BDB0874ef",
|
|
315
|
-
"voting_escrow": "0x0000000000000000000000000000000000000000",
|
|
316
|
-
"fee_distributor": "0x0000000000000000000000000000000000000000",
|
|
317
|
-
"gauge_controller": "0x0000000000000000000000000000000000000000",
|
|
318
|
-
"address_provider": "0x87FE17697D0f14A222e8bEf386a0860eCffDD617",
|
|
319
|
-
"router": "0x5eeE3091f747E60a045a2E715a4c71e600e31F6E",
|
|
320
|
-
"deposit_and_stake": "0x505d666E4DD174DcDD7FA090ed95554486d2Be44",
|
|
321
|
-
"stable_ng_factory": '0x7C2085419BE6a04f4ad88ea91bC9F5C6E6C463D8',
|
|
322
|
-
"twocrypto_factory": '0x1A83348F9cCFD3Fe1A8C0adBa580Ac4e267Fe495',
|
|
323
|
-
"tricrypto_factory": '0x635742dCC8313DCf8c904206037d962c042EAfBd',
|
|
324
|
-
"factory_admin": '0x0000000000000000000000000000000000000000',
|
|
325
|
-
});
|
|
326
165
|
const ALIASES_HYPERLIQUID = lowerCaseValues({
|
|
327
166
|
"crv": "0x0000000000000000000000000000000000000000", //
|
|
328
167
|
"child_gauge_factory": "0x8b3EFBEfa6eD222077455d6f0DCdA3bF4f3F57A6", //
|
|
@@ -404,44 +243,6 @@ export const NETWORK_CONSTANTS = {
|
|
|
404
243
|
},
|
|
405
244
|
aTokens: aTokensPolygon,
|
|
406
245
|
},
|
|
407
|
-
146: {
|
|
408
|
-
NAME: 'sonic',
|
|
409
|
-
ALIASES: ALIASES_SONIC,
|
|
410
|
-
POOLS_DATA: POOLS_DATA_SONIC,
|
|
411
|
-
COINS: COINS_SONIC,
|
|
412
|
-
NATIVE_COIN: {
|
|
413
|
-
symbol: 'S',
|
|
414
|
-
wrappedSymbol: 'wS',
|
|
415
|
-
address: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
416
|
-
wrappedAddress: '0x039e2fb66102314ce7b64ce5ce3e5183bc94ad38'.toLowerCase(),
|
|
417
|
-
},
|
|
418
|
-
},
|
|
419
|
-
196: {
|
|
420
|
-
NAME: 'x-layer',
|
|
421
|
-
ALIASES: ALIASES_XLAYER,
|
|
422
|
-
POOLS_DATA: POOLS_DATA_XLAYER,
|
|
423
|
-
COINS: COINS_XLAYER,
|
|
424
|
-
NATIVE_COIN: {
|
|
425
|
-
symbol: 'OKB',
|
|
426
|
-
wrappedSymbol: 'WOKB',
|
|
427
|
-
address: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
428
|
-
wrappedAddress: '0xe538905cf8410324e03a5a23c1c177a474d59b2b'.toLowerCase(),
|
|
429
|
-
},
|
|
430
|
-
},
|
|
431
|
-
250: {
|
|
432
|
-
NAME: 'fantom',
|
|
433
|
-
ALIASES: ALIASES_FANTOM,
|
|
434
|
-
POOLS_DATA: POOLS_DATA_FANTOM,
|
|
435
|
-
COINS: COINS_FANTOM,
|
|
436
|
-
NATIVE_COIN: {
|
|
437
|
-
symbol: 'FTM',
|
|
438
|
-
wrappedSymbol: 'WFTM',
|
|
439
|
-
address: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
440
|
-
wrappedAddress: '0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83'.toLowerCase(),
|
|
441
|
-
},
|
|
442
|
-
cTokens: cTokensFantom,
|
|
443
|
-
aTokens: aTokensFantom,
|
|
444
|
-
},
|
|
445
246
|
252: {
|
|
446
247
|
NAME: 'fraxtal',
|
|
447
248
|
ALIASES: ALIASES_FRAXTAL,
|
|
@@ -454,18 +255,6 @@ export const NETWORK_CONSTANTS = {
|
|
|
454
255
|
wrappedAddress: '0xfc00000000000000000000000000000000000002'.toLowerCase(),
|
|
455
256
|
},
|
|
456
257
|
},
|
|
457
|
-
324: {
|
|
458
|
-
NAME: 'zksync',
|
|
459
|
-
ALIASES: ALIASES_ZKSYNC,
|
|
460
|
-
POOLS_DATA: POOLS_DATA_ZKSYNC,
|
|
461
|
-
COINS: COINS_ZKSYNC,
|
|
462
|
-
NATIVE_COIN: {
|
|
463
|
-
symbol: 'ETH',
|
|
464
|
-
wrappedSymbol: 'WETH',
|
|
465
|
-
address: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
466
|
-
wrappedAddress: '0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91'.toLowerCase(),
|
|
467
|
-
},
|
|
468
|
-
},
|
|
469
258
|
999: {
|
|
470
259
|
NAME: 'hyperliquid',
|
|
471
260
|
ALIASES: ALIASES_HYPERLIQUID,
|
|
@@ -478,42 +267,6 @@ export const NETWORK_CONSTANTS = {
|
|
|
478
267
|
wrappedAddress: '0x5555555555555555555555555555555555555555'.toLowerCase(),
|
|
479
268
|
},
|
|
480
269
|
},
|
|
481
|
-
1284: {
|
|
482
|
-
NAME: 'moonbeam',
|
|
483
|
-
ALIASES: ALIASES_MOONBEAM,
|
|
484
|
-
POOLS_DATA: POOLS_DATA_MOONBEAM,
|
|
485
|
-
COINS: COINS_MOONBEAM,
|
|
486
|
-
NATIVE_COIN: {
|
|
487
|
-
symbol: 'GLMR',
|
|
488
|
-
wrappedSymbol: 'WGLMR',
|
|
489
|
-
address: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
490
|
-
wrappedAddress: '0xAcc15dC74880C9944775448304B263D191c6077F'.toLowerCase(),
|
|
491
|
-
},
|
|
492
|
-
},
|
|
493
|
-
2222: {
|
|
494
|
-
NAME: 'kava',
|
|
495
|
-
ALIASES: ALIASES_KAVA,
|
|
496
|
-
POOLS_DATA: POOLS_DATA_KAVA,
|
|
497
|
-
COINS: COINS_KAVA,
|
|
498
|
-
NATIVE_COIN: {
|
|
499
|
-
symbol: 'KAVA',
|
|
500
|
-
wrappedSymbol: 'WKAVA',
|
|
501
|
-
address: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
502
|
-
wrappedAddress: '0xc86c7C0eFbd6A49B35E8714C5f59D99De09A225b'.toLowerCase(),
|
|
503
|
-
},
|
|
504
|
-
},
|
|
505
|
-
5000: {
|
|
506
|
-
NAME: 'mantle',
|
|
507
|
-
ALIASES: ALIASES_MANTLE,
|
|
508
|
-
POOLS_DATA: POOLS_DATA_MANTLE,
|
|
509
|
-
COINS: COINS_MANTLE,
|
|
510
|
-
NATIVE_COIN: {
|
|
511
|
-
symbol: 'MNT',
|
|
512
|
-
wrappedSymbol: 'WMNT',
|
|
513
|
-
address: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
514
|
-
wrappedAddress: '0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8'.toLowerCase(),
|
|
515
|
-
},
|
|
516
|
-
},
|
|
517
270
|
8453: {
|
|
518
271
|
NAME: 'base',
|
|
519
272
|
ALIASES: ALIASES_BASE,
|
|
@@ -538,57 +291,14 @@ export const NETWORK_CONSTANTS = {
|
|
|
538
291
|
wrappedAddress: '0x82af49447d8a07e3bd95bd0d56f35241523fbab1'.toLowerCase(),
|
|
539
292
|
},
|
|
540
293
|
},
|
|
541
|
-
42220: {
|
|
542
|
-
NAME: 'celo',
|
|
543
|
-
ALIASES: ALIASES_CELO,
|
|
544
|
-
POOLS_DATA: POOLS_DATA_CELO,
|
|
545
|
-
COINS: COINS_CELO,
|
|
546
|
-
NATIVE_COIN: {
|
|
547
|
-
symbol: 'CELO',
|
|
548
|
-
wrappedSymbol: 'WCELO',
|
|
549
|
-
address: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
550
|
-
wrappedAddress: '0x3Ad443d769A07f287806874F8E5405cE3Ac902b9'.toLowerCase(),
|
|
551
|
-
},
|
|
552
|
-
},
|
|
553
|
-
43114: {
|
|
554
|
-
NAME: 'avalanche',
|
|
555
|
-
ALIASES: ALIASES_AVALANCHE,
|
|
556
|
-
POOLS_DATA: POOLS_DATA_AVALANCHE,
|
|
557
|
-
COINS: COINS_AVALANCHE,
|
|
558
|
-
NATIVE_COIN: {
|
|
559
|
-
symbol: 'AVAX',
|
|
560
|
-
wrappedSymbol: 'WAVAX',
|
|
561
|
-
address: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
562
|
-
wrappedAddress: '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7'.toLowerCase(),
|
|
563
|
-
},
|
|
564
|
-
aTokens: aTokensAvalanche,
|
|
565
|
-
},
|
|
566
|
-
1313161554: {
|
|
567
|
-
NAME: 'aurora',
|
|
568
|
-
ALIASES: ALIASES_AURORA,
|
|
569
|
-
POOLS_DATA: POOLS_DATA_AURORA,
|
|
570
|
-
COINS: COINS_AURORA,
|
|
571
|
-
NATIVE_COIN: {
|
|
572
|
-
symbol: 'ETH',
|
|
573
|
-
wrappedSymbol: 'WETH',
|
|
574
|
-
address: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
575
|
-
wrappedAddress: '0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB'.toLowerCase(),
|
|
576
|
-
},
|
|
577
|
-
},
|
|
578
294
|
};
|
|
579
295
|
const registry_exchange_deprecated = {
|
|
580
296
|
'1': '0x99a58482bd75cbab83b27ec03ca68ff489b5788f',
|
|
581
297
|
'10': '0x22d710931f01c1681ca1570ff016ed42eb7b7c2a',
|
|
582
298
|
'100': '0xe6358f6a45b502477e83cc1cda759f540e4459ee',
|
|
583
299
|
'137': '0x2a426b3bb4fa87488387545f15d01d81352732f9',
|
|
584
|
-
'250': '0xfd8c73d35e522648312a43e7ceb85fe12c8c1760',
|
|
585
|
-
'324': '0x0000000000000000000000000000000000000000',
|
|
586
|
-
'1284': '0x6600e98b71dabfD4A8Cac03b302B0189Adb86Afb',
|
|
587
|
-
'2222': '0xcbf451d41f2ba5b0d169740fd01293dcaf9becb9',
|
|
588
300
|
'8453': '0x0000000000000000000000000000000000000000',
|
|
589
301
|
'42161': '0x4c2af2df2a7e567b5155879720619ea06c5bb15d',
|
|
590
302
|
'42220': '0x0000000000000000000000000000000000000000',
|
|
591
|
-
'43114': '0xbff334f8d5912ac5c4f2c590a2396d1c5d990123',
|
|
592
|
-
'1313161554': '0x6600e98b71dabfd4a8cac03b302b0189adb86afb',
|
|
593
303
|
};
|
|
594
304
|
const router_deprecated = "0xfA9a30350048B2BF66865ee20363067c66f67e58";
|
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
import { POOLS_DATA_ETHEREUM } from "./ethereum.js";
|
|
2
2
|
import { LLAMMAS_DATA_ETHEREUM } from "./ethereum.js";
|
|
3
3
|
import { POOLS_DATA_POLYGON } from "./polygon.js";
|
|
4
|
-
import { POOLS_DATA_FANTOM } from "./fantom.js";
|
|
5
|
-
import { POOLS_DATA_AVALANCHE } from "./avalanche.js";
|
|
6
4
|
import { POOLS_DATA_ARBITRUM } from "./arbitrum.js";
|
|
7
5
|
import { POOLS_DATA_OPTIMISM } from "./optimism.js";
|
|
8
6
|
import { POOLS_DATA_XDAI } from "./xdai.js";
|
|
9
|
-
import { POOLS_DATA_MOONBEAM } from "./moonbeam.js";
|
|
10
|
-
import { POOLS_DATA_AURORA } from "./aurora.js";
|
|
11
|
-
import { POOLS_DATA_KAVA } from "./kava.js";
|
|
12
|
-
import { POOLS_DATA_CELO } from "./celo.js";
|
|
13
|
-
import { POOLS_DATA_ZKSYNC } from "./zksync.js";
|
|
14
7
|
import { POOLS_DATA_BASE } from "./base.js";
|
|
15
8
|
import { POOLS_DATA_BSC } from "./bsc.js";
|
|
16
9
|
import { POOLS_DATA_FRAXTAL } from "./fraxtal.js";
|
|
17
|
-
import { POOLS_DATA_XLAYER } from "./xlayer.js";
|
|
18
|
-
import { POOLS_DATA_MANTLE } from "./mantle.js";
|
|
19
|
-
import { POOLS_DATA_SONIC } from "./sonic.js";
|
|
20
10
|
import { POOLS_DATA_HYPERLIQUID } from "./hyperliquid.js";
|
|
21
|
-
export { POOLS_DATA_ETHEREUM, LLAMMAS_DATA_ETHEREUM, POOLS_DATA_POLYGON,
|
|
11
|
+
export { POOLS_DATA_ETHEREUM, LLAMMAS_DATA_ETHEREUM, POOLS_DATA_POLYGON, POOLS_DATA_ARBITRUM, POOLS_DATA_OPTIMISM, POOLS_DATA_XDAI, POOLS_DATA_BASE, POOLS_DATA_BSC, POOLS_DATA_FRAXTAL, POOLS_DATA_HYPERLIQUID, };
|
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
import { POOLS_DATA_ETHEREUM } from "./ethereum.js";
|
|
2
2
|
import { LLAMMAS_DATA_ETHEREUM } from "./ethereum.js";
|
|
3
3
|
import { POOLS_DATA_POLYGON } from "./polygon.js";
|
|
4
|
-
import { POOLS_DATA_FANTOM } from "./fantom.js";
|
|
5
|
-
import { POOLS_DATA_AVALANCHE } from "./avalanche.js";
|
|
6
4
|
import { POOLS_DATA_ARBITRUM } from "./arbitrum.js";
|
|
7
5
|
import { POOLS_DATA_OPTIMISM } from "./optimism.js";
|
|
8
6
|
import { POOLS_DATA_XDAI } from "./xdai.js";
|
|
9
|
-
import { POOLS_DATA_MOONBEAM } from "./moonbeam.js";
|
|
10
|
-
import { POOLS_DATA_AURORA } from "./aurora.js";
|
|
11
|
-
import { POOLS_DATA_KAVA } from "./kava.js";
|
|
12
|
-
import { POOLS_DATA_CELO } from "./celo.js";
|
|
13
|
-
import { POOLS_DATA_ZKSYNC } from "./zksync.js";
|
|
14
7
|
import { POOLS_DATA_BASE } from "./base.js";
|
|
15
8
|
import { POOLS_DATA_BSC } from "./bsc.js";
|
|
16
9
|
import { POOLS_DATA_FRAXTAL } from "./fraxtal.js";
|
|
17
|
-
import { POOLS_DATA_XLAYER } from "./xlayer.js";
|
|
18
|
-
import { POOLS_DATA_MANTLE } from "./mantle.js";
|
|
19
|
-
import { POOLS_DATA_SONIC } from "./sonic.js";
|
|
20
10
|
import { POOLS_DATA_HYPERLIQUID } from "./hyperliquid.js";
|
|
21
|
-
export { POOLS_DATA_ETHEREUM, LLAMMAS_DATA_ETHEREUM, POOLS_DATA_POLYGON,
|
|
11
|
+
export { POOLS_DATA_ETHEREUM, LLAMMAS_DATA_ETHEREUM, POOLS_DATA_POLYGON, POOLS_DATA_ARBITRUM, POOLS_DATA_OPTIMISM, POOLS_DATA_XDAI, POOLS_DATA_BASE, POOLS_DATA_BSC, POOLS_DATA_FRAXTAL, POOLS_DATA_HYPERLIQUID, };
|
package/lib/curve.js
CHANGED
|
@@ -54,7 +54,7 @@ import { L2Networks } from "./constants/L2Networks.js";
|
|
|
54
54
|
import { getTwocryptoFactoryPoolData } from "./factory/factory-twocrypto.js";
|
|
55
55
|
import { applyFeeDataOverride, computeEip1559Fees, computeLegacyOrFallback, fetchFeeHistory, getNetworkConstants, } from "./utils.js";
|
|
56
56
|
import { _setPoolsFromApi } from "./cached.js";
|
|
57
|
-
export const OLD_CHAINS = [1, 10, 56, 100, 137,
|
|
57
|
+
export const OLD_CHAINS = [1, 10, 56, 100, 137, 8453, 42161]; // these chains have non-ng pools
|
|
58
58
|
export const memoizedContract = () => {
|
|
59
59
|
const cache = {};
|
|
60
60
|
return (address, abi, provider) => {
|
|
@@ -481,9 +481,6 @@ export class Curve {
|
|
|
481
481
|
this.constants.STABLE_FACTORY_CONSTANTS = (_k = STABLE_FACTORY_CONSTANTS[this.chainId]) !== null && _k !== void 0 ? _k : {};
|
|
482
482
|
this.constants.CRYPTO_FACTORY_CONSTANTS = (_l = CRYPTO_FACTORY_CONSTANTS[this.chainId]) !== null && _l !== void 0 ? _l : {};
|
|
483
483
|
}
|
|
484
|
-
if (this.chainId === 5000) {
|
|
485
|
-
this.constantOptions = {};
|
|
486
|
-
}
|
|
487
484
|
this.multicallProvider = new MulticallProvider(this.chainId, this.provider);
|
|
488
485
|
if (this.signer) {
|
|
489
486
|
try {
|
package/lib/external-api.d.ts
CHANGED
|
@@ -3,9 +3,7 @@ import { ICurveLiteNetwork, IDaoProposal, IDaoProposalListItem, IDict, IExtended
|
|
|
3
3
|
export declare const uncached_getAllPoolsFromApi: (network: INetworkName, isLiteChain: boolean) => Promise<Record<IPoolType, IExtendedPoolDataFromApi>>;
|
|
4
4
|
export declare const createUsdPricesDict: (allTypesExtendedPoolData: IExtendedPoolDataFromApi[]) => IDict<number>;
|
|
5
5
|
export declare const createCrvApyDict: (allTypesExtendedPoolData: IExtendedPoolDataFromApi[]) => IDict<[number, number]>;
|
|
6
|
-
export declare const _getSubgraphData: ((network: INetworkName) => Promise<IVolumeAndAPYs>) & memoize.Memoized<(network: INetworkName) => Promise<IVolumeAndAPYs>>;
|
|
7
6
|
export declare const _getVolumes: ((network: string) => Promise<IVolumeAndAPYs>) & memoize.Memoized<(network: string) => Promise<IVolumeAndAPYs>>;
|
|
8
|
-
export declare const _getFactoryAPYs: ((network: string) => Promise<IVolumeAndAPYs>) & memoize.Memoized<(network: string) => Promise<IVolumeAndAPYs>>;
|
|
9
7
|
export declare const _getAllGauges: (() => Promise<IDict<IGaugesDataFromApi>>) & memoize.Memoized<() => Promise<IDict<IGaugesDataFromApi>>>;
|
|
10
8
|
export declare const _getAllGaugesFormatted: (() => Promise<IDict<any>>) & memoize.Memoized<() => Promise<IDict<any>>>;
|
|
11
9
|
export declare const _getHiddenPools: ((isLiteChain: boolean) => Promise<IDict<string[]>>) & memoize.Memoized<(isLiteChain: boolean) => Promise<IDict<string[]>>>;
|
package/lib/external-api.js
CHANGED
|
@@ -107,25 +107,6 @@ export const createCrvApyDict = (allTypesExtendedPoolData) => {
|
|
|
107
107
|
}
|
|
108
108
|
return apyDict;
|
|
109
109
|
};
|
|
110
|
-
export const _getSubgraphData = memoize((network) => __awaiter(void 0, void 0, void 0, function* () {
|
|
111
|
-
var _a, _b, _c;
|
|
112
|
-
const data = yield fetchData(`https://api.curve.finance/api/getSubgraphData/${network}`);
|
|
113
|
-
const poolsData = data.poolList.map((data) => ({
|
|
114
|
-
address: data.address,
|
|
115
|
-
volumeUSD: data.volumeUSD,
|
|
116
|
-
day: data.latestDailyApy,
|
|
117
|
-
week: data.latestWeeklyApy,
|
|
118
|
-
}));
|
|
119
|
-
return {
|
|
120
|
-
poolsData: poolsData,
|
|
121
|
-
totalVolume: (_a = data.totalVolume) !== null && _a !== void 0 ? _a : 0,
|
|
122
|
-
cryptoVolume: (_b = data.cryptoVolume) !== null && _b !== void 0 ? _b : 0,
|
|
123
|
-
cryptoShare: (_c = data.cryptoShare) !== null && _c !== void 0 ? _c : 0,
|
|
124
|
-
};
|
|
125
|
-
}), {
|
|
126
|
-
promise: true,
|
|
127
|
-
maxAge: 5 * 60 * 1000, // 5m
|
|
128
|
-
});
|
|
129
110
|
export const _getVolumes = memoize((network) => __awaiter(void 0, void 0, void 0, function* () {
|
|
130
111
|
var _a, _b, _c;
|
|
131
112
|
const { pools, totalVolumes } = yield fetchData(`https://api.curve.finance/api/getVolumes/${network}`);
|
|
@@ -145,28 +126,6 @@ export const _getVolumes = memoize((network) => __awaiter(void 0, void 0, void 0
|
|
|
145
126
|
promise: true,
|
|
146
127
|
maxAge: 5 * 60 * 1000, // 5m
|
|
147
128
|
});
|
|
148
|
-
export const _getFactoryAPYs = memoize((network) => __awaiter(void 0, void 0, void 0, function* () {
|
|
149
|
-
const [stableData, cryptoData] = yield Promise.all(['stable', 'crypto'].map((type) => fetchData(`https://api.curve.finance/api/getFactoryAPYs/${network}/${type}`)));
|
|
150
|
-
const stableVolume = stableData.totalVolumeUsd || stableData.totalVolume || 0;
|
|
151
|
-
const cryptoVolume = cryptoData.totalVolumeUsd || cryptoData.totalVolume || 0;
|
|
152
|
-
return {
|
|
153
|
-
poolsData: [...stableData.poolDetails, ...cryptoData.poolDetails].map((item) => {
|
|
154
|
-
var _a, _b, _c;
|
|
155
|
-
return ({
|
|
156
|
-
address: item.poolAddress,
|
|
157
|
-
volumeUSD: (_a = item.totalVolumeUsd) !== null && _a !== void 0 ? _a : 0,
|
|
158
|
-
day: (_b = item.apy) !== null && _b !== void 0 ? _b : 0,
|
|
159
|
-
week: ((_c = item.apy) !== null && _c !== void 0 ? _c : 0) * 7, // Because api does not return week apy
|
|
160
|
-
});
|
|
161
|
-
}),
|
|
162
|
-
totalVolume: stableVolume + cryptoVolume,
|
|
163
|
-
cryptoVolume,
|
|
164
|
-
cryptoShare: 100 * cryptoVolume / (stableVolume + cryptoVolume),
|
|
165
|
-
};
|
|
166
|
-
}), {
|
|
167
|
-
promise: true,
|
|
168
|
-
maxAge: 5 * 60 * 1000, // 5m
|
|
169
|
-
});
|
|
170
129
|
export const _getAllGauges = memoize(() => fetchData(`https://api.curve.finance/api/getAllGauges`), {
|
|
171
130
|
promise: true,
|
|
172
131
|
maxAge: 5 * 60 * 1000, // 5m
|
|
@@ -591,8 +591,6 @@ export class PoolTemplate extends CorePool {
|
|
|
591
591
|
return checkVyperVulnerability(this.curve.chainId, this.id, this.implementation);
|
|
592
592
|
}
|
|
593
593
|
rewardsOnly() {
|
|
594
|
-
if (this.curve.chainId === 2222 || this.curve.chainId === 324)
|
|
595
|
-
return true; // TODO remove this for Kava and ZkSync
|
|
596
594
|
if (this.gauge.address === this.curve.constants.ZERO_ADDRESS)
|
|
597
595
|
throw Error(`${this.name} doesn't have gauge`);
|
|
598
596
|
return !findAbiFunction(this.curve.contracts[this.gauge.address].abi, 'inflation_rate')
|
|
@@ -134,7 +134,7 @@ export class StatsPool {
|
|
|
134
134
|
});
|
|
135
135
|
this.volume = () => __awaiter(this, void 0, void 0, function* () {
|
|
136
136
|
const curve = this.pool.curve;
|
|
137
|
-
if (curve.isLiteChain
|
|
137
|
+
if (curve.isLiteChain) {
|
|
138
138
|
throw Error('This method is not supported for the lite version');
|
|
139
139
|
}
|
|
140
140
|
const network = curve.constants.NETWORK_NAME;
|
|
@@ -147,7 +147,7 @@ export class StatsPool {
|
|
|
147
147
|
});
|
|
148
148
|
this.baseApy = () => __awaiter(this, void 0, void 0, function* () {
|
|
149
149
|
const curve = this.pool.curve;
|
|
150
|
-
if (curve.isLiteChain
|
|
150
|
+
if (curve.isLiteChain) {
|
|
151
151
|
throw Error('baseApy is not supported for the lite version');
|
|
152
152
|
}
|
|
153
153
|
const network = curve.constants.NETWORK_NAME;
|
package/lib/pools/utils.js
CHANGED
|
@@ -94,7 +94,7 @@ function _getUserClaimable(pools, address, useCache) {
|
|
|
94
94
|
const hasCrvReward = [];
|
|
95
95
|
for (const poolId of poolsToFetch) {
|
|
96
96
|
const pool = getPool.call(this, poolId);
|
|
97
|
-
if (
|
|
97
|
+
if (pool.gauge.address === this.constants.ZERO_ADDRESS) {
|
|
98
98
|
hasCrvReward.push(false);
|
|
99
99
|
continue;
|
|
100
100
|
}
|
|
@@ -227,7 +227,7 @@ function _getUserClaimableUseApi(pools, address, useCache) {
|
|
|
227
227
|
const hasCrvReward = [];
|
|
228
228
|
for (const poolId of poolsToFetch) {
|
|
229
229
|
const pool = getPool.call(this, poolId);
|
|
230
|
-
if (
|
|
230
|
+
if (pool.gauge.address === this.constants.ZERO_ADDRESS) {
|
|
231
231
|
hasCrvReward.push(false);
|
|
232
232
|
continue;
|
|
233
233
|
}
|
|
@@ -378,21 +378,11 @@ export const checkVyperVulnerability = (chainId, poolId, implementation) => {
|
|
|
378
378
|
"0xA9134FaE98F92217f457918505375Ae91fdc5e3c",
|
|
379
379
|
"0xf31bcdf0B9a5eCD7AB463eB905551fBc32e51856",
|
|
380
380
|
].map((a) => a.toLowerCase()),
|
|
381
|
-
250: [
|
|
382
|
-
"0xE6358f6a45B502477e83CC1CDa759f540E4459ee",
|
|
383
|
-
"0x5d58Eb45e97B43e471AF05cD2b11CeB4106E1b1a",
|
|
384
|
-
"0xb11Dc44A9f981fAF1669dca6DD40c3cc2554A2ce",
|
|
385
|
-
].map((a) => a.toLowerCase()),
|
|
386
381
|
42161: [
|
|
387
382
|
"0x7DA64233Fefb352f8F501B357c018158ED8aA455",
|
|
388
383
|
"0xAAe75FAebCae43b9d541Fd875622BE48D9B4f5D0",
|
|
389
384
|
"0x89287c32c2CAC1C76227F6d300B2DBbab6b75C08",
|
|
390
385
|
].map((a) => a.toLowerCase()),
|
|
391
|
-
43114: [
|
|
392
|
-
"0x64448B78561690B70E17CBE8029a3e5c1bB7136e",
|
|
393
|
-
"0xF1f85a74AD6c64315F85af52d3d46bF715236ADc",
|
|
394
|
-
"0x0eb0F1FaF5F509Ac53fA224477509EAD167cf410",
|
|
395
|
-
].map((a) => a.toLowerCase()),
|
|
396
386
|
};
|
|
397
387
|
const implementations = (_a = vulnerableImplementations[chainId]) !== null && _a !== void 0 ? _a : [];
|
|
398
388
|
return implementations.includes((_b = implementation === null || implementation === void 0 ? void 0 : implementation.toLowerCase()) !== null && _b !== void 0 ? _b : "");
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export function routeGraphWorker() {
|
|
2
2
|
const GRAPH_MAX_EDGES = 3;
|
|
3
|
-
const CELO_CHAIN_ID = 42220;
|
|
4
3
|
const ARC_CHAIN_ID = 5042; // native USDC is the same asset as its ERC-20 interface
|
|
5
4
|
// Pools excluded from router
|
|
6
5
|
const EXCLUDED_POOLS_FROM_ROUTER = {
|
|
@@ -11,8 +10,8 @@ export function routeGraphWorker() {
|
|
|
11
10
|
const routerGraph = {};
|
|
12
11
|
// Pool addresses we don't want to index when building routes
|
|
13
12
|
const blacklistedPools = new Set((blacklist !== null && blacklist !== void 0 ? blacklist : []).map((a) => a.toLowerCase()));
|
|
14
|
-
// ETH <-> WETH (exclude
|
|
15
|
-
if (chainId !==
|
|
13
|
+
// ETH <-> WETH (exclude Arc — native USDC = ERC-20 USDC)
|
|
14
|
+
if (chainId !== ARC_CHAIN_ID) {
|
|
16
15
|
const wrapperAddress = constants.NATIVE_TOKEN.wrapperAddress || constants.NATIVE_TOKEN.wrappedAddress;
|
|
17
16
|
routerGraph[constants.NATIVE_TOKEN.address] = {};
|
|
18
17
|
routerGraph[constants.NATIVE_TOKEN.address][constants.NATIVE_TOKEN.wrappedAddress] = [{
|
|
@@ -271,7 +270,6 @@ export function routeGraphWorker() {
|
|
|
271
270
|
if (blacklistedPools.has(poolAddress))
|
|
272
271
|
continue;
|
|
273
272
|
const excludedUnderlyingSwaps = (poolId === 'ib' && chainId === 1) ||
|
|
274
|
-
(poolId === 'geist' && chainId === 250) ||
|
|
275
273
|
(poolId === 'saave' && chainId === 1);
|
|
276
274
|
// Wrapped coin <-> LP "swaps" (actually add_liquidity/remove_liquidity_one_coin)
|
|
277
275
|
if (!poolData.is_fake && !poolData.is_llamma && wrappedCoinAddresses.length < 6) {
|