@curvefi/api 2.54.7 → 2.54.9
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/abis/deposit_and_stake.json +1 -1
- package/lib/constants/aliases.js +1 -1
- package/lib/factory/constants.d.ts +2 -0
- package/lib/factory/constants.js +1 -0
- package/lib/factory/factory-api.js +2 -2
- package/lib/factory/factory.js +2 -2
- package/lib/pools/PoolTemplate.js +2 -2
- package/package.json +1 -1
package/lib/constants/aliases.js
CHANGED
|
@@ -8,7 +8,7 @@ export var ALIASES_ETHEREUM = lowerCaseValues({
|
|
|
8
8
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
9
9
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
10
10
|
"router": "0xF0d4c12A5768D806021F80a262B4d39d26C58b8D",
|
|
11
|
-
"deposit_and_stake": "
|
|
11
|
+
"deposit_and_stake": "0x56C526b0159a258887e0d79ec3a80dfb940d0cD7",
|
|
12
12
|
"stable_calc": "0x0DCDED3545D565bA3B19E683431381007245d983",
|
|
13
13
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
14
14
|
"factory": '0xb9fc157394af804a3578134a6585c0dc9cc990d4',
|
|
@@ -66,6 +66,7 @@ export declare const basePoolIdZapDictBsc: IDict<{
|
|
|
66
66
|
}>;
|
|
67
67
|
export declare const stableNgBasePoolZap: {
|
|
68
68
|
ABI: any;
|
|
69
|
+
address: string;
|
|
69
70
|
};
|
|
70
71
|
export declare const FACTORY_CONSTANTS: {
|
|
71
72
|
[index: number]: {
|
|
@@ -76,6 +77,7 @@ export declare const FACTORY_CONSTANTS: {
|
|
|
76
77
|
}>;
|
|
77
78
|
stableNgBasePoolZap: {
|
|
78
79
|
ABI: any;
|
|
80
|
+
address: string;
|
|
79
81
|
};
|
|
80
82
|
};
|
|
81
83
|
};
|
package/lib/factory/constants.js
CHANGED
|
@@ -442,6 +442,7 @@ export var basePoolIdZapDictBase = {};
|
|
|
442
442
|
export var basePoolIdZapDictBsc = {};
|
|
443
443
|
export var stableNgBasePoolZap = {
|
|
444
444
|
ABI: StableNgBasePoolZapABI,
|
|
445
|
+
address: '0xe07a16358aa878cbda2d49a88e5106871e0db307'.toLowerCase(),
|
|
445
446
|
};
|
|
446
447
|
export var FACTORY_CONSTANTS = {
|
|
447
448
|
1: {
|
|
@@ -241,7 +241,7 @@ export function getFactoryPoolsDataFromApi(factoryType) {
|
|
|
241
241
|
var basePoolIdZapDict = FACTORY_CONSTANTS[_this.chainId].basePoolIdZapDict;
|
|
242
242
|
var basePoolZap = isStableNgPool(basePoolId) ? FACTORY_CONSTANTS[_this.chainId].stableNgBasePoolZap : basePoolIdZapDict[basePoolId];
|
|
243
243
|
if (isStableNgPool(basePoolId)) {
|
|
244
|
-
_this.setContract(
|
|
244
|
+
_this.setContract(FACTORY_CONSTANTS[_this.chainId].stableNgBasePoolZap.address, FACTORY_CONSTANTS[_this.chainId].stableNgBasePoolZap.ABI);
|
|
245
245
|
}
|
|
246
246
|
FACTORY_POOLS_DATA[pool.id] = {
|
|
247
247
|
name: getPoolName(pool.name),
|
|
@@ -251,7 +251,7 @@ export function getFactoryPoolsDataFromApi(factoryType) {
|
|
|
251
251
|
swap_address: pool.address,
|
|
252
252
|
token_address: pool.address,
|
|
253
253
|
gauge_address: pool.gaugeAddress ? pool.gaugeAddress : curve.constants.ZERO_ADDRESS,
|
|
254
|
-
deposit_address:
|
|
254
|
+
deposit_address: basePoolZap.address,
|
|
255
255
|
implementation_address: pool.implementationAddress,
|
|
256
256
|
is_meta: true,
|
|
257
257
|
is_factory: true,
|
package/lib/factory/factory.js
CHANGED
|
@@ -434,7 +434,7 @@ export function getFactoryPoolData(fromIdx, swapAddress, factoryAddress) {
|
|
|
434
434
|
var basePoolIdZapDict = FACTORY_CONSTANTS[this_1.chainId].basePoolIdZapDict;
|
|
435
435
|
var basePoolZap = isStableNgPool(basePools.ids[i]) ? FACTORY_CONSTANTS[this_1.chainId].stableNgBasePoolZap : basePoolIdZapDict[basePools.ids[i]];
|
|
436
436
|
if (isStableNgPool(basePools.ids[i])) {
|
|
437
|
-
this_1.setContract(
|
|
437
|
+
this_1.setContract(FACTORY_CONSTANTS[this_1.chainId].stableNgBasePoolZap.address, FACTORY_CONSTANTS[this_1.chainId].stableNgBasePoolZap.ABI);
|
|
438
438
|
}
|
|
439
439
|
FACTORY_POOLS_DATA[poolIds[i]] = {
|
|
440
440
|
name: getPoolName(poolNames[i]),
|
|
@@ -444,7 +444,7 @@ export function getFactoryPoolData(fromIdx, swapAddress, factoryAddress) {
|
|
|
444
444
|
swap_address: swapAddresses[i],
|
|
445
445
|
token_address: swapAddresses[i],
|
|
446
446
|
gauge_address: gaugeAddresses[i],
|
|
447
|
-
deposit_address:
|
|
447
|
+
deposit_address: basePoolZap.address,
|
|
448
448
|
implementation_address: implementations[i],
|
|
449
449
|
is_meta: true,
|
|
450
450
|
is_factory: true,
|
|
@@ -2336,7 +2336,7 @@ var PoolTemplate = /** @class */ (function () {
|
|
|
2336
2336
|
_minMintAmount = fromBN(minAmountBN);
|
|
2337
2337
|
ethIndex = getEthIndex(coinAddresses);
|
|
2338
2338
|
value = _amounts[ethIndex] || curve.parseUnits("0");
|
|
2339
|
-
return [4 /*yield*/, contract.deposit_and_stake.estimateGas(depositAddress, this.lpToken, this.gauge, coins.length, coinAddresses, _amounts, _minMintAmount, useUnderlying, this.isStableNg && this.isPlain, this.isMetaFactory && isUnderlying ? this.address : curve.constants.ZERO_ADDRESS, __assign(__assign({}, curve.constantOptions), { value: value }))];
|
|
2339
|
+
return [4 /*yield*/, contract.deposit_and_stake.estimateGas(depositAddress, this.lpToken, this.gauge, coins.length, coinAddresses, _amounts, _minMintAmount, useUnderlying, (this.isStableNg && this.isPlain) || (isUnderlying && this.isMeta && (new PoolTemplate(this.basePool)).isStableNg), this.isMetaFactory && isUnderlying ? this.address : curve.constants.ZERO_ADDRESS, __assign(__assign({}, curve.constantOptions), { value: value }))];
|
|
2340
2340
|
case 17:
|
|
2341
2341
|
_gas = (_q.sent());
|
|
2342
2342
|
if (estimateGas)
|
|
@@ -2345,7 +2345,7 @@ var PoolTemplate = /** @class */ (function () {
|
|
|
2345
2345
|
case 18:
|
|
2346
2346
|
_q.sent();
|
|
2347
2347
|
gasLimit = DIGas(_gas) * curve.parseUnits("200", 0) / curve.parseUnits("100", 0);
|
|
2348
|
-
return [4 /*yield*/, contract.deposit_and_stake(depositAddress, this.lpToken, this.gauge, coins.length, coinAddresses, _amounts, _minMintAmount, useUnderlying, this.isStableNg && this.isPlain, this.isMetaFactory && isUnderlying ? this.address : curve.constants.ZERO_ADDRESS, __assign(__assign({}, curve.options), { gasLimit: gasLimit, value: value }))];
|
|
2348
|
+
return [4 /*yield*/, contract.deposit_and_stake(depositAddress, this.lpToken, this.gauge, coins.length, coinAddresses, _amounts, _minMintAmount, useUnderlying, (this.isStableNg && this.isPlain) || (isUnderlying && this.isMeta && (new PoolTemplate(this.basePool)).isStableNg), this.isMetaFactory && isUnderlying ? this.address : curve.constants.ZERO_ADDRESS, __assign(__assign({}, curve.options), { gasLimit: gasLimit, value: value }))];
|
|
2349
2349
|
case 19: return [2 /*return*/, (_q.sent()).hash];
|
|
2350
2350
|
}
|
|
2351
2351
|
});
|