@curvefi/api 2.16.2 → 2.16.3
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.
|
@@ -65,7 +65,6 @@ var ethers_1 = require("ethers");
|
|
|
65
65
|
var ethcall_1 = require("ethcall");
|
|
66
66
|
var gauge_factory_json_1 = __importDefault(require("../constants/abis/gauge_factory.json"));
|
|
67
67
|
var gauge_child_json_1 = __importDefault(require("../constants/abis/gauge_child.json"));
|
|
68
|
-
var gauge_rewards_only_json_1 = __importDefault(require("../constants/abis/gauge_rewards_only.json"));
|
|
69
68
|
var ERC20_json_1 = __importDefault(require("../constants/abis/ERC20.json"));
|
|
70
69
|
var factory_crypto_pool_2_json_1 = __importDefault(require("../constants/abis/factory-crypto/factory-crypto-pool-2.json"));
|
|
71
70
|
var constants_1 = require("./constants");
|
|
@@ -109,8 +108,8 @@ function setFactoryGaugeContracts(rawPoolList) {
|
|
|
109
108
|
if (pool.gaugeAddress) {
|
|
110
109
|
var addr = pool.gaugeAddress.toLowerCase();
|
|
111
110
|
_this.contracts[addr] = {
|
|
112
|
-
contract: new ethers_1.Contract(addr, _this.chainId === 1 ? gauge_factory_json_1.default :
|
|
113
|
-
multicallContract: new ethcall_1.Contract(addr, _this.chainId === 1 ? gauge_factory_json_1.default :
|
|
111
|
+
contract: new ethers_1.Contract(addr, _this.chainId === 1 ? gauge_factory_json_1.default : gauge_child_json_1.default, _this.signer || _this.provider),
|
|
112
|
+
multicallContract: new ethcall_1.Contract(addr, _this.chainId === 1 ? gauge_factory_json_1.default : gauge_child_json_1.default),
|
|
114
113
|
};
|
|
115
114
|
}
|
|
116
115
|
});
|
|
@@ -310,7 +309,7 @@ function getFactoryPoolsDataFromApi(isCrypto) {
|
|
|
310
309
|
underlying_decimals: coinDecimals,
|
|
311
310
|
wrapped_decimals: coinDecimals,
|
|
312
311
|
swap_abi: implementationABIDict[pool.implementationAddress],
|
|
313
|
-
gauge_abi: _this.chainId === 1 ? gauge_factory_json_1.default :
|
|
312
|
+
gauge_abi: _this.chainId === 1 ? gauge_factory_json_1.default : gauge_child_json_1.default,
|
|
314
313
|
};
|
|
315
314
|
}
|
|
316
315
|
});
|
|
@@ -1116,6 +1116,8 @@ var PoolTemplate = /** @class */ (function () {
|
|
|
1116
1116
|
};
|
|
1117
1117
|
}
|
|
1118
1118
|
PoolTemplate.prototype.rewardsOnly = function () {
|
|
1119
|
+
if (curve_1.curve.chainId === 2222)
|
|
1120
|
+
return true; // TODO remove this for Kava
|
|
1119
1121
|
if (this.gauge === ethers_1.ethers.constants.AddressZero)
|
|
1120
1122
|
throw Error("".concat(this.name, " doesn't have gauge"));
|
|
1121
1123
|
var gaugeContract = curve_1.curve.contracts[this.gauge].contract;
|