@curvefi/api 2.25.5 → 2.26.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.
|
@@ -9,6 +9,8 @@ exports.COINS_AVALANCHE = (0, utils_1.lowerCaseValues)({
|
|
|
9
9
|
'dai.e': '0xd586E7F844cEa2F87f50152665BCbc2C279D8d70',
|
|
10
10
|
'usdc.e': '0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664',
|
|
11
11
|
'usdt.e': '0xc7198437980c041c805A1EDcbA50c1Ce5db95118',
|
|
12
|
+
'usdc': '0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E',
|
|
13
|
+
'usdt': '0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7',
|
|
12
14
|
'avdai': '0x47AFa96Cdc9fAb46904A55a6ad4bf6660B53c38a',
|
|
13
15
|
'avusdc': '0x46A51127C3ce23fb7AB1DE06226147F446e4a857',
|
|
14
16
|
'avusdt': '0x532E6537FEA298397212F09A61e03311686f548e',
|
|
@@ -103,4 +103,34 @@ exports.POOLS_DATA_AVALANCHE = (0, utils_1.lowerCasePoolDataAddresses)({
|
|
|
103
103
|
gauge_abi: gauge_child_json_1.default,
|
|
104
104
|
deposit_abi: zap_json_1.default,
|
|
105
105
|
},
|
|
106
|
+
aaveV3: {
|
|
107
|
+
name: "aaveV3",
|
|
108
|
+
full_name: "aaveV3",
|
|
109
|
+
symbol: "aaveV3",
|
|
110
|
+
reference_asset: 'USD',
|
|
111
|
+
swap_address: '0xD2AcAe14ae2ee0f6557aC6C6D0e407a92C36214b',
|
|
112
|
+
token_address: '0x5bE26703a658c332CE612eAe3A497059dA98394a',
|
|
113
|
+
gauge_address: '0x55f9Ba282c39793DB29C68F8f113fC97D23a6445',
|
|
114
|
+
is_lending: true,
|
|
115
|
+
underlying_coins: ['DAI.e', 'USDC', 'USDt'],
|
|
116
|
+
wrapped_coins: ['aAvaDAI', 'aAvaUSDC', 'aAvaUSDT'],
|
|
117
|
+
underlying_coin_addresses: [
|
|
118
|
+
'0xd586E7F844cEa2F87f50152665BCbc2C279D8d70',
|
|
119
|
+
'0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E',
|
|
120
|
+
'0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7',
|
|
121
|
+
],
|
|
122
|
+
wrapped_coin_addresses: [
|
|
123
|
+
'0x82E64f49Ed5EC1bC6e43DAD4FC8Af9bb3A2312EE',
|
|
124
|
+
'0x625E7708f30cA75bfd92586e17077590C60eb4cD',
|
|
125
|
+
'0x6ab707Aca953eDAeFBc4fD23bA73294241490620',
|
|
126
|
+
],
|
|
127
|
+
underlying_decimals: [18, 6, 6],
|
|
128
|
+
wrapped_decimals: [18, 6, 6],
|
|
129
|
+
use_lending: [true, true, true],
|
|
130
|
+
swap_abi: swap_json_1.default,
|
|
131
|
+
gauge_abi: gauge_child_json_1.default,
|
|
132
|
+
// sCurveRewards_abi: paaveRewardsabi,
|
|
133
|
+
// sCurveRewards_address: '0xB504b6EB06760019801a91B451d3f7BD9f027fC9',
|
|
134
|
+
// reward_token: "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",
|
|
135
|
+
},
|
|
106
136
|
});
|
|
@@ -166,6 +166,7 @@ function getFactoryPoolsDataFromApi(isCrypto) {
|
|
|
166
166
|
return [4 /*yield*/, (0, external_api_1._getPoolsFromApi)(network, factoryType)];
|
|
167
167
|
case 1:
|
|
168
168
|
rawPoolList = _a.apply(void 0, [(_c.sent()).poolData]);
|
|
169
|
+
rawPoolList = rawPoolList.filter(function (p) { return p.implementationAddress in constants_1.FACTORY_CONSTANTS[_this.chainId].implementationABIDict; });
|
|
169
170
|
mainAddresses = Object.values(this.constants.POOLS_DATA).map(function (pool) { return pool.swap_address; });
|
|
170
171
|
rawPoolList = rawPoolList.filter(function (p) { return !mainAddresses.includes(p.address); });
|
|
171
172
|
if (!(this.chainId !== 1)) return [3 /*break*/, 3];
|
package/lib/factory/factory.js
CHANGED
|
@@ -383,7 +383,7 @@ function getFactoryIsMeta(factorySwapAddresses) {
|
|
|
383
383
|
}
|
|
384
384
|
function getFactoryPoolData(swapAddress) {
|
|
385
385
|
return __awaiter(this, void 0, void 0, function () {
|
|
386
|
-
var _a,
|
|
386
|
+
var _a, rawPoolIds, rawSwapAddresses, _b, rawImplementations, poolIds, swapAddresses, implementations, implementationABIDict, i, swapABIs, gaugeAddresses, _c, poolSymbols, poolNames, referenceAssets, coinAddresses, existingCoinAddressNameDict, coinAddressNameDict, coinAddressDecimalsDict, isMeta, implementationBasePoolIdDict, basePoolIds, FACTORY_POOLS_DATA, _loop_2, this_1, i;
|
|
387
387
|
return __generator(this, function (_e) {
|
|
388
388
|
switch (_e.label) {
|
|
389
389
|
case 0:
|
|
@@ -397,11 +397,21 @@ function getFactoryPoolData(swapAddress) {
|
|
|
397
397
|
_b = _e.sent();
|
|
398
398
|
_e.label = 4;
|
|
399
399
|
case 4:
|
|
400
|
-
_a = _b,
|
|
401
|
-
return [4 /*yield*/, getFactoryImplementations.call(this,
|
|
400
|
+
_a = _b, rawPoolIds = _a[0], rawSwapAddresses = _a[1];
|
|
401
|
+
return [4 /*yield*/, getFactoryImplementations.call(this, rawSwapAddresses)];
|
|
402
402
|
case 5:
|
|
403
|
-
|
|
403
|
+
rawImplementations = _e.sent();
|
|
404
|
+
poolIds = [];
|
|
405
|
+
swapAddresses = [];
|
|
406
|
+
implementations = [];
|
|
404
407
|
implementationABIDict = constants_1.FACTORY_CONSTANTS[this.chainId].implementationABIDict;
|
|
408
|
+
for (i = 0; i < rawPoolIds.length; i++) {
|
|
409
|
+
if (rawImplementations[i] in implementationABIDict) {
|
|
410
|
+
poolIds.push(rawPoolIds[i]);
|
|
411
|
+
swapAddresses.push(rawSwapAddresses[i]);
|
|
412
|
+
implementations.push(rawImplementations[i]);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
405
415
|
swapABIs = implementations.map(function (addr) { return implementationABIDict[addr]; });
|
|
406
416
|
setFactorySwapContracts.call(this, swapAddresses, swapABIs);
|
|
407
417
|
return [4 /*yield*/, getFactoryGaugeAddresses.call(this, swapAddresses)];
|