@curvefi/api 2.69.9 → 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 -10
- package/lib/constants/coins/index.js +1 -10
- package/lib/constants/factory/crypto.d.ts +0 -45
- package/lib/constants/factory/crypto.js +0 -72
- package/lib/constants/factory/stable.d.ts +0 -9
- package/lib/constants/factory/stable.js +0 -119
- package/lib/constants/network_constants.js +2 -258
- package/lib/constants/pools/index.d.ts +1 -10
- package/lib/constants/pools/index.js +1 -10
- 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 -7
- package/lib/route-graph.worker.js +2 -3
- package/lib/utils.js +3 -55
- 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/MetaUSDGeist.json +0 -932
- 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/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/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,24 +45,6 @@ const ALIASES_POLYGON = lowerCaseValues({
|
|
|
45
45
|
"tricrypto_factory": '0xC1b393EfEF38140662b91441C6710Aa704973228',
|
|
46
46
|
"factory_admin": "",
|
|
47
47
|
});
|
|
48
|
-
const ALIASES_AVALANCHE = lowerCaseValues({
|
|
49
|
-
"crv": "0x47536F17F4fF30e64A96a7555826b8f9e66ec468",
|
|
50
|
-
"child_gauge_factory": "0x97aDC08FA1D849D2C48C5dcC1DaB568B169b0267",
|
|
51
|
-
"child_gauge_factory_old": "0xDb205f215f568ADf21b9573b62566f6d9a40bed6",
|
|
52
|
-
"voting_escrow": "0xc55837710bc500f1e3c7bb9dd1d51f7c5647e657",
|
|
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": '0xb17b674D9c5CB2e441F8e196a2f048A81355d031',
|
|
61
|
-
"stable_ng_factory": '0x1764ee18e8B3ccA4787249Ceb249356192594585',
|
|
62
|
-
"twocrypto_factory": '0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F',
|
|
63
|
-
"tricrypto_factory": '0x3d6cB2F6DcF47CDd9C13E4e3beAe9af041d8796a',
|
|
64
|
-
"factory_admin": "",
|
|
65
|
-
});
|
|
66
48
|
const ALIASES_ARBITRUM = lowerCaseValues({
|
|
67
49
|
"crv": "0x11cDb42B0EB46D95f990BeDD4695A6e3fA034978",
|
|
68
50
|
"child_gauge_factory": "0x988d1037e9608B21050A8EFba0c6C45e01A3Bce7",
|
|
@@ -123,86 +105,6 @@ const ALIASES_XDAI = lowerCaseValues({
|
|
|
123
105
|
"tricrypto_factory": '0xb47988aD49DCE8D909c6f9Cf7B26caF04e1445c8',
|
|
124
106
|
"factory_admin": "",
|
|
125
107
|
});
|
|
126
|
-
const ALIASES_MOONBEAM = lowerCaseValues({
|
|
127
|
-
"crv": "0x7C598c96D02398d89FbCb9d41Eab3DF0C16F227D",
|
|
128
|
-
"child_gauge_factory": "0xe35A879E5EfB4F1Bb7F70dCF3250f2e19f096bd8",
|
|
129
|
-
"child_gauge_factory_old": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
130
|
-
"voting_escrow": "0x0000000000000000000000000000000000000000",
|
|
131
|
-
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc", // <-- DUMMY
|
|
132
|
-
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
133
|
-
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
134
|
-
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
135
|
-
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
136
|
-
"factory": '0x4244eB811D6e0Ef302326675207A95113dB4E1F8',
|
|
137
|
-
"factory_admin": "",
|
|
138
|
-
});
|
|
139
|
-
const ALIASES_AURORA = lowerCaseValues({
|
|
140
|
-
"crv": "0x64D5BaF5ac030e2b7c435aDD967f787ae94D0205",
|
|
141
|
-
"child_gauge_factory": "0xe35A879E5EfB4F1Bb7F70dCF3250f2e19f096bd8", // <-- CHANGED
|
|
142
|
-
"voting_escrow": "0x0000000000000000000000000000000000000000", // <-- DUMMY
|
|
143
|
-
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc", // <-- DUMMY
|
|
144
|
-
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
145
|
-
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
146
|
-
"router": "0x0000000000000000000000000000000000000000",
|
|
147
|
-
"deposit_and_stake": "0x0000000000000000000000000000000000000000",
|
|
148
|
-
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4", // <-- CHANGED
|
|
149
|
-
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC', // <--- NEW
|
|
150
|
-
"factory": '0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F', // <--- TODO CHANGE
|
|
151
|
-
"crvusd_factory": '0x4F8846Ae9380B90d2E71D5e3D042dff3E7ebb40d', // <-- DUMMY
|
|
152
|
-
"crypto_factory": '0xF18056Bbd320E96A48e3Fbf8bC061322531aac99', // <--- TODO CHANGE
|
|
153
|
-
"twocrypto_factory": '0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F', // <--- NEW
|
|
154
|
-
"tricrypto_factory": '0x0c0e5f2fF0ff18a3be9b835635039256dC4B4963', // <--- TODO CHANGE
|
|
155
|
-
"stable_ng_factory": '0x5eeE3091f747E60a045a2E715a4c71e600e31F6E',
|
|
156
|
-
"factory_admin": "",
|
|
157
|
-
});
|
|
158
|
-
const ALIASES_KAVA = lowerCaseValues({
|
|
159
|
-
"crv": "0x64D5BaF5ac030e2b7c435aDD967f787ae94D0205", // <--- TODO CHANGE
|
|
160
|
-
"child_gauge_factory": "0xe35A879E5EfB4F1Bb7F70dCF3250f2e19f096bd8",
|
|
161
|
-
"child_gauge_factory_old": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
162
|
-
"voting_escrow": "0x0000000000000000000000000000000000000000", // <-- DUMMY
|
|
163
|
-
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc", // <-- DUMMY
|
|
164
|
-
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
165
|
-
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
166
|
-
"router": "0x0DCDED3545D565bA3B19E683431381007245d983",
|
|
167
|
-
"deposit_and_stake": "0x37c5ab57AF7100Bdc9B668d766e193CCbF6614FD",
|
|
168
|
-
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
169
|
-
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
170
|
-
"factory": '0x40bc62805471eF53DdD5C5cF99ed3d9e5aa81b48',
|
|
171
|
-
"stable_ng_factory": '0x1764ee18e8B3ccA4787249Ceb249356192594585',
|
|
172
|
-
"twocrypto_factory": '0xd3B17f862956464ae4403cCF829CE69199856e1e',
|
|
173
|
-
"tricrypto_factory": '0x3d6cB2F6DcF47CDd9C13E4e3beAe9af041d8796a',
|
|
174
|
-
"factory_admin": "",
|
|
175
|
-
});
|
|
176
|
-
const ALIASES_CELO = lowerCaseValues({
|
|
177
|
-
"crv": "0x0a7432cF27F1aE3825c313F3C81e7D3efD7639aB", // <--- TODO CHANGE
|
|
178
|
-
"child_gauge_factory": "0xe35A879E5EfB4F1Bb7F70dCF3250f2e19f096bd8",
|
|
179
|
-
"child_gauge_factory_old": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
180
|
-
"voting_escrow": "0x0000000000000000000000000000000000000000", // <-- DUMMY
|
|
181
|
-
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc", // <-- DUMMY
|
|
182
|
-
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
183
|
-
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
184
|
-
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
185
|
-
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
186
|
-
"factory": '0x5277A0226d10392295E8D383E9724D6E416d6e6C',
|
|
187
|
-
"stable_ng_factory": '0x1764ee18e8B3ccA4787249Ceb249356192594585',
|
|
188
|
-
"twocrypto_factory": '0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F',
|
|
189
|
-
"tricrypto_factory": '0x3d6cB2F6DcF47CDd9C13E4e3beAe9af041d8796a',
|
|
190
|
-
"factory_admin": "",
|
|
191
|
-
});
|
|
192
|
-
const ALIASES_ZKSYNC = lowerCaseValues({
|
|
193
|
-
"crv": "0x5945932099f124194452a4c62d34bB37f16183B2",
|
|
194
|
-
"child_gauge_factory": "0x167D9C27070Ce04b79820E6aaC0cF243d6098812",
|
|
195
|
-
"voting_escrow": "0x0000000000000000000000000000000000000000",
|
|
196
|
-
"fee_distributor": "0x0000000000000000000000000000000000000000",
|
|
197
|
-
"gauge_controller": "0x0000000000000000000000000000000000000000",
|
|
198
|
-
"address_provider": "0x0000000000000000000000000000000000000000",
|
|
199
|
-
"router": "0x7C915390e109CA66934f1eB285854375D1B127FA",
|
|
200
|
-
"deposit_and_stake": "0x253548e98C769aD2850da8DB3E4c2b2cE46E3839",
|
|
201
|
-
"stable_ng_factory": '0xFcAb5d04e8e031334D5e8D2C166B08daB0BE6CaE',
|
|
202
|
-
"twocrypto_factory": '0xf3a546AF64aFd6BB8292746BA66DB33aFAE72114',
|
|
203
|
-
"tricrypto_factory": '0x5d4174C40f1246dABe49693845442927d5929f0D',
|
|
204
|
-
"factory_admin": "0x0000000000000000000000000000000000000000",
|
|
205
|
-
});
|
|
206
108
|
const ALIASES_BASE = lowerCaseValues({
|
|
207
109
|
"crv": "0x8Ee73c484A26e0A5df2Ee2a4960B789967dd0415", // <--- TODO CHANGE
|
|
208
110
|
"child_gauge_factory": "0xe35A879E5EfB4F1Bb7F70dCF3250f2e19f096bd8",
|
|
@@ -260,50 +162,6 @@ const ALIASES_FRAXTAL = lowerCaseValues({
|
|
|
260
162
|
"fast_bridge": "0x3fE593E651Cd0B383AD36b75F4159f30BB0631A6",
|
|
261
163
|
"crvusd": "0xB102f7Efa0d5dE071A8D37B3548e1C7CB148Caf3",
|
|
262
164
|
});
|
|
263
|
-
const ALIASES_XLAYER = lowerCaseValues({
|
|
264
|
-
"crv": "0x0000000000000000000000000000000000000000",
|
|
265
|
-
"child_gauge_factory": "0xD5C3e070E121488806AaA5565283A164ACEB94Df",
|
|
266
|
-
"child_gauge_factory_old": "0xeF672bD94913CB6f1d2812a6e18c1fFdEd8eFf5c",
|
|
267
|
-
"voting_escrow": "0x0000000000000000000000000000000000000000",
|
|
268
|
-
"fee_distributor": "0x0000000000000000000000000000000000000000",
|
|
269
|
-
"gauge_controller": "0x0000000000000000000000000000000000000000",
|
|
270
|
-
"address_provider": "0x0000000000000000000000000000000000000000",
|
|
271
|
-
"router": "0xBFab8ebc836E1c4D81837798FC076D219C9a1855",
|
|
272
|
-
"deposit_and_stake": "0x5552b631e2aD801fAa129Aacf4B701071cC9D1f7",
|
|
273
|
-
"stable_ng_factory": '0x5eeE3091f747E60a045a2E715a4c71e600e31F6E',
|
|
274
|
-
"twocrypto_factory": '0x0c59d36b23f809f8b6C7cb4c8C590a0AC103baEf',
|
|
275
|
-
"tricrypto_factory": '0xd3B17f862956464ae4403cCF829CE69199856e1e',
|
|
276
|
-
"factory_admin": '0x0000000000000000000000000000000000000000',
|
|
277
|
-
});
|
|
278
|
-
const ALIASES_MANTLE = lowerCaseValues({
|
|
279
|
-
"crv": "0x0000000000000000000000000000000000000000",
|
|
280
|
-
"child_gauge_factory": "0x0B8D6B6CeFC7Aa1C2852442e518443B1b22e1C52",
|
|
281
|
-
"child_gauge_factory_old": "0xeF672bD94913CB6f1d2812a6e18c1fFdEd8eFf5c",
|
|
282
|
-
"voting_escrow": "0x0000000000000000000000000000000000000000",
|
|
283
|
-
"fee_distributor": "0x0000000000000000000000000000000000000000",
|
|
284
|
-
"gauge_controller": "0x0000000000000000000000000000000000000000",
|
|
285
|
-
"address_provider": "0x0000000000000000000000000000000000000000",
|
|
286
|
-
"router": "0x4f37A9d177470499A2dD084621020b023fcffc1F",
|
|
287
|
-
"deposit_and_stake": "0xF0d4c12A5768D806021F80a262B4d39d26C58b8D",
|
|
288
|
-
"stable_ng_factory": '0x5eeE3091f747E60a045a2E715a4c71e600e31F6E',
|
|
289
|
-
"twocrypto_factory": '0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F',
|
|
290
|
-
"tricrypto_factory": '0x0C9D8c7e486e822C29488Ff51BFf0167B4650953',
|
|
291
|
-
"factory_admin": '0x0000000000000000000000000000000000000000',
|
|
292
|
-
});
|
|
293
|
-
const ALIASES_SONIC = lowerCaseValues({
|
|
294
|
-
"crv": "0x5af79133999f7908953e94b7a5cf367740ebee35",
|
|
295
|
-
"child_gauge_factory": "0xf3A431008396df8A8b2DF492C913706BDB0874ef",
|
|
296
|
-
"voting_escrow": "0x0000000000000000000000000000000000000000",
|
|
297
|
-
"fee_distributor": "0x0000000000000000000000000000000000000000",
|
|
298
|
-
"gauge_controller": "0x0000000000000000000000000000000000000000",
|
|
299
|
-
"address_provider": "0x87FE17697D0f14A222e8bEf386a0860eCffDD617",
|
|
300
|
-
"router": "0x5eeE3091f747E60a045a2E715a4c71e600e31F6E",
|
|
301
|
-
"deposit_and_stake": "0x505d666E4DD174DcDD7FA090ed95554486d2Be44",
|
|
302
|
-
"stable_ng_factory": '0x7C2085419BE6a04f4ad88ea91bC9F5C6E6C463D8',
|
|
303
|
-
"twocrypto_factory": '0x1A83348F9cCFD3Fe1A8C0adBa580Ac4e267Fe495',
|
|
304
|
-
"tricrypto_factory": '0x635742dCC8313DCf8c904206037d962c042EAfBd',
|
|
305
|
-
"factory_admin": '0x0000000000000000000000000000000000000000',
|
|
306
|
-
});
|
|
307
165
|
const ALIASES_HYPERLIQUID = lowerCaseValues({
|
|
308
166
|
"crv": "0x0000000000000000000000000000000000000000", //
|
|
309
167
|
"child_gauge_factory": "0x8b3EFBEfa6eD222077455d6f0DCdA3bF4f3F57A6", //
|
|
@@ -385,30 +243,6 @@ export const NETWORK_CONSTANTS = {
|
|
|
385
243
|
},
|
|
386
244
|
aTokens: aTokensPolygon,
|
|
387
245
|
},
|
|
388
|
-
146: {
|
|
389
|
-
NAME: 'sonic',
|
|
390
|
-
ALIASES: ALIASES_SONIC,
|
|
391
|
-
POOLS_DATA: POOLS_DATA_SONIC,
|
|
392
|
-
COINS: COINS_SONIC,
|
|
393
|
-
NATIVE_COIN: {
|
|
394
|
-
symbol: 'S',
|
|
395
|
-
wrappedSymbol: 'wS',
|
|
396
|
-
address: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
397
|
-
wrappedAddress: '0x039e2fb66102314ce7b64ce5ce3e5183bc94ad38'.toLowerCase(),
|
|
398
|
-
},
|
|
399
|
-
},
|
|
400
|
-
196: {
|
|
401
|
-
NAME: 'x-layer',
|
|
402
|
-
ALIASES: ALIASES_XLAYER,
|
|
403
|
-
POOLS_DATA: POOLS_DATA_XLAYER,
|
|
404
|
-
COINS: COINS_XLAYER,
|
|
405
|
-
NATIVE_COIN: {
|
|
406
|
-
symbol: 'OKB',
|
|
407
|
-
wrappedSymbol: 'WOKB',
|
|
408
|
-
address: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
409
|
-
wrappedAddress: '0xe538905cf8410324e03a5a23c1c177a474d59b2b'.toLowerCase(),
|
|
410
|
-
},
|
|
411
|
-
},
|
|
412
246
|
252: {
|
|
413
247
|
NAME: 'fraxtal',
|
|
414
248
|
ALIASES: ALIASES_FRAXTAL,
|
|
@@ -421,18 +255,6 @@ export const NETWORK_CONSTANTS = {
|
|
|
421
255
|
wrappedAddress: '0xfc00000000000000000000000000000000000002'.toLowerCase(),
|
|
422
256
|
},
|
|
423
257
|
},
|
|
424
|
-
324: {
|
|
425
|
-
NAME: 'zksync',
|
|
426
|
-
ALIASES: ALIASES_ZKSYNC,
|
|
427
|
-
POOLS_DATA: POOLS_DATA_ZKSYNC,
|
|
428
|
-
COINS: COINS_ZKSYNC,
|
|
429
|
-
NATIVE_COIN: {
|
|
430
|
-
symbol: 'ETH',
|
|
431
|
-
wrappedSymbol: 'WETH',
|
|
432
|
-
address: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
433
|
-
wrappedAddress: '0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91'.toLowerCase(),
|
|
434
|
-
},
|
|
435
|
-
},
|
|
436
258
|
999: {
|
|
437
259
|
NAME: 'hyperliquid',
|
|
438
260
|
ALIASES: ALIASES_HYPERLIQUID,
|
|
@@ -445,42 +267,6 @@ export const NETWORK_CONSTANTS = {
|
|
|
445
267
|
wrappedAddress: '0x5555555555555555555555555555555555555555'.toLowerCase(),
|
|
446
268
|
},
|
|
447
269
|
},
|
|
448
|
-
1284: {
|
|
449
|
-
NAME: 'moonbeam',
|
|
450
|
-
ALIASES: ALIASES_MOONBEAM,
|
|
451
|
-
POOLS_DATA: POOLS_DATA_MOONBEAM,
|
|
452
|
-
COINS: COINS_MOONBEAM,
|
|
453
|
-
NATIVE_COIN: {
|
|
454
|
-
symbol: 'GLMR',
|
|
455
|
-
wrappedSymbol: 'WGLMR',
|
|
456
|
-
address: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
457
|
-
wrappedAddress: '0xAcc15dC74880C9944775448304B263D191c6077F'.toLowerCase(),
|
|
458
|
-
},
|
|
459
|
-
},
|
|
460
|
-
2222: {
|
|
461
|
-
NAME: 'kava',
|
|
462
|
-
ALIASES: ALIASES_KAVA,
|
|
463
|
-
POOLS_DATA: POOLS_DATA_KAVA,
|
|
464
|
-
COINS: COINS_KAVA,
|
|
465
|
-
NATIVE_COIN: {
|
|
466
|
-
symbol: 'KAVA',
|
|
467
|
-
wrappedSymbol: 'WKAVA',
|
|
468
|
-
address: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
469
|
-
wrappedAddress: '0xc86c7C0eFbd6A49B35E8714C5f59D99De09A225b'.toLowerCase(),
|
|
470
|
-
},
|
|
471
|
-
},
|
|
472
|
-
5000: {
|
|
473
|
-
NAME: 'mantle',
|
|
474
|
-
ALIASES: ALIASES_MANTLE,
|
|
475
|
-
POOLS_DATA: POOLS_DATA_MANTLE,
|
|
476
|
-
COINS: COINS_MANTLE,
|
|
477
|
-
NATIVE_COIN: {
|
|
478
|
-
symbol: 'MNT',
|
|
479
|
-
wrappedSymbol: 'WMNT',
|
|
480
|
-
address: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
481
|
-
wrappedAddress: '0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8'.toLowerCase(),
|
|
482
|
-
},
|
|
483
|
-
},
|
|
484
270
|
8453: {
|
|
485
271
|
NAME: 'base',
|
|
486
272
|
ALIASES: ALIASES_BASE,
|
|
@@ -505,56 +291,14 @@ export const NETWORK_CONSTANTS = {
|
|
|
505
291
|
wrappedAddress: '0x82af49447d8a07e3bd95bd0d56f35241523fbab1'.toLowerCase(),
|
|
506
292
|
},
|
|
507
293
|
},
|
|
508
|
-
42220: {
|
|
509
|
-
NAME: 'celo',
|
|
510
|
-
ALIASES: ALIASES_CELO,
|
|
511
|
-
POOLS_DATA: POOLS_DATA_CELO,
|
|
512
|
-
COINS: COINS_CELO,
|
|
513
|
-
NATIVE_COIN: {
|
|
514
|
-
symbol: 'CELO',
|
|
515
|
-
wrappedSymbol: 'WCELO',
|
|
516
|
-
address: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
517
|
-
wrappedAddress: '0x3Ad443d769A07f287806874F8E5405cE3Ac902b9'.toLowerCase(),
|
|
518
|
-
},
|
|
519
|
-
},
|
|
520
|
-
43114: {
|
|
521
|
-
NAME: 'avalanche',
|
|
522
|
-
ALIASES: ALIASES_AVALANCHE,
|
|
523
|
-
POOLS_DATA: POOLS_DATA_AVALANCHE,
|
|
524
|
-
COINS: COINS_AVALANCHE,
|
|
525
|
-
NATIVE_COIN: {
|
|
526
|
-
symbol: 'AVAX',
|
|
527
|
-
wrappedSymbol: 'WAVAX',
|
|
528
|
-
address: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
529
|
-
wrappedAddress: '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7'.toLowerCase(),
|
|
530
|
-
},
|
|
531
|
-
aTokens: aTokensAvalanche,
|
|
532
|
-
},
|
|
533
|
-
1313161554: {
|
|
534
|
-
NAME: 'aurora',
|
|
535
|
-
ALIASES: ALIASES_AURORA,
|
|
536
|
-
POOLS_DATA: POOLS_DATA_AURORA,
|
|
537
|
-
COINS: COINS_AURORA,
|
|
538
|
-
NATIVE_COIN: {
|
|
539
|
-
symbol: 'ETH',
|
|
540
|
-
wrappedSymbol: 'WETH',
|
|
541
|
-
address: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
542
|
-
wrappedAddress: '0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB'.toLowerCase(),
|
|
543
|
-
},
|
|
544
|
-
},
|
|
545
294
|
};
|
|
546
295
|
const registry_exchange_deprecated = {
|
|
547
296
|
'1': '0x99a58482bd75cbab83b27ec03ca68ff489b5788f',
|
|
548
297
|
'10': '0x22d710931f01c1681ca1570ff016ed42eb7b7c2a',
|
|
549
298
|
'100': '0xe6358f6a45b502477e83cc1cda759f540e4459ee',
|
|
550
299
|
'137': '0x2a426b3bb4fa87488387545f15d01d81352732f9',
|
|
551
|
-
'324': '0x0000000000000000000000000000000000000000',
|
|
552
|
-
'1284': '0x6600e98b71dabfD4A8Cac03b302B0189Adb86Afb',
|
|
553
|
-
'2222': '0xcbf451d41f2ba5b0d169740fd01293dcaf9becb9',
|
|
554
300
|
'8453': '0x0000000000000000000000000000000000000000',
|
|
555
301
|
'42161': '0x4c2af2df2a7e567b5155879720619ea06c5bb15d',
|
|
556
302
|
'42220': '0x0000000000000000000000000000000000000000',
|
|
557
|
-
'43114': '0xbff334f8d5912ac5c4f2c590a2396d1c5d990123',
|
|
558
|
-
'1313161554': '0x6600e98b71dabfd4a8cac03b302b0189adb86afb',
|
|
559
303
|
};
|
|
560
304
|
const router_deprecated = "0xfA9a30350048B2BF66865ee20363067c66f67e58";
|
|
@@ -1,20 +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_AVALANCHE } from "./avalanche.js";
|
|
5
4
|
import { POOLS_DATA_ARBITRUM } from "./arbitrum.js";
|
|
6
5
|
import { POOLS_DATA_OPTIMISM } from "./optimism.js";
|
|
7
6
|
import { POOLS_DATA_XDAI } from "./xdai.js";
|
|
8
|
-
import { POOLS_DATA_MOONBEAM } from "./moonbeam.js";
|
|
9
|
-
import { POOLS_DATA_AURORA } from "./aurora.js";
|
|
10
|
-
import { POOLS_DATA_KAVA } from "./kava.js";
|
|
11
|
-
import { POOLS_DATA_CELO } from "./celo.js";
|
|
12
|
-
import { POOLS_DATA_ZKSYNC } from "./zksync.js";
|
|
13
7
|
import { POOLS_DATA_BASE } from "./base.js";
|
|
14
8
|
import { POOLS_DATA_BSC } from "./bsc.js";
|
|
15
9
|
import { POOLS_DATA_FRAXTAL } from "./fraxtal.js";
|
|
16
|
-
import { POOLS_DATA_XLAYER } from "./xlayer.js";
|
|
17
|
-
import { POOLS_DATA_MANTLE } from "./mantle.js";
|
|
18
|
-
import { POOLS_DATA_SONIC } from "./sonic.js";
|
|
19
10
|
import { POOLS_DATA_HYPERLIQUID } from "./hyperliquid.js";
|
|
20
|
-
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,20 +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_AVALANCHE } from "./avalanche.js";
|
|
5
4
|
import { POOLS_DATA_ARBITRUM } from "./arbitrum.js";
|
|
6
5
|
import { POOLS_DATA_OPTIMISM } from "./optimism.js";
|
|
7
6
|
import { POOLS_DATA_XDAI } from "./xdai.js";
|
|
8
|
-
import { POOLS_DATA_MOONBEAM } from "./moonbeam.js";
|
|
9
|
-
import { POOLS_DATA_AURORA } from "./aurora.js";
|
|
10
|
-
import { POOLS_DATA_KAVA } from "./kava.js";
|
|
11
|
-
import { POOLS_DATA_CELO } from "./celo.js";
|
|
12
|
-
import { POOLS_DATA_ZKSYNC } from "./zksync.js";
|
|
13
7
|
import { POOLS_DATA_BASE } from "./base.js";
|
|
14
8
|
import { POOLS_DATA_BSC } from "./bsc.js";
|
|
15
9
|
import { POOLS_DATA_FRAXTAL } from "./fraxtal.js";
|
|
16
|
-
import { POOLS_DATA_XLAYER } from "./xlayer.js";
|
|
17
|
-
import { POOLS_DATA_MANTLE } from "./mantle.js";
|
|
18
|
-
import { POOLS_DATA_SONIC } from "./sonic.js";
|
|
19
10
|
import { POOLS_DATA_HYPERLIQUID } from "./hyperliquid.js";
|
|
20
|
-
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
|
}
|
|
@@ -383,11 +383,6 @@ export const checkVyperVulnerability = (chainId, poolId, implementation) => {
|
|
|
383
383
|
"0xAAe75FAebCae43b9d541Fd875622BE48D9B4f5D0",
|
|
384
384
|
"0x89287c32c2CAC1C76227F6d300B2DBbab6b75C08",
|
|
385
385
|
].map((a) => a.toLowerCase()),
|
|
386
|
-
43114: [
|
|
387
|
-
"0x64448B78561690B70E17CBE8029a3e5c1bB7136e",
|
|
388
|
-
"0xF1f85a74AD6c64315F85af52d3d46bF715236ADc",
|
|
389
|
-
"0x0eb0F1FaF5F509Ac53fA224477509EAD167cf410",
|
|
390
|
-
].map((a) => a.toLowerCase()),
|
|
391
386
|
};
|
|
392
387
|
const implementations = (_a = vulnerableImplementations[chainId]) !== null && _a !== void 0 ? _a : [];
|
|
393
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] = [{
|