@curvefi/api 2.67.1 → 2.67.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.
|
@@ -5,7 +5,6 @@ const ALIASES_ETHEREUM = lowerCaseValues({
|
|
|
5
5
|
"crv": "0xD533a949740bb3306d119CC777fa900bA034cd52", // <--- CHANGE
|
|
6
6
|
"minter": '0xd061D61a4d941c39E5453435B6345Dc261C2fcE0', // <--- RECOVERED
|
|
7
7
|
"root_gauge_factory": "0x306A45a1478A000dC701A6e1f7a569afb8D9DCD6",
|
|
8
|
-
"root_gauge_factory_arbitrum": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
9
8
|
"voting_escrow": "0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2",
|
|
10
9
|
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc",
|
|
11
10
|
"fee_distributor_crvusd": "0xD16d5eC345Dd86Fb63C6a9C43c517210F1027914",
|
|
@@ -86,7 +85,8 @@ const ALIASES_AVALANCHE = lowerCaseValues({
|
|
|
86
85
|
});
|
|
87
86
|
const ALIASES_ARBITRUM = lowerCaseValues({
|
|
88
87
|
"crv": "0x11cDb42B0EB46D95f990BeDD4695A6e3fA034978",
|
|
89
|
-
"child_gauge_factory": "
|
|
88
|
+
"child_gauge_factory": "0x988d1037e9608B21050A8EFba0c6C45e01A3Bce7",
|
|
89
|
+
"child_gauge_factory_old": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
|
|
90
90
|
"voting_escrow": "0x98c80fa823759b642c3e02f40533c164f40727ae",
|
|
91
91
|
"fee_distributor": "0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc", // <-- DUMMY
|
|
92
92
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
package/lib/curve.js
CHANGED
|
@@ -555,8 +555,6 @@ export class Curve {
|
|
|
555
555
|
this.setContract(this.constants.ALIASES.minter, minterMainnetABI);
|
|
556
556
|
this.setContract(this.constants.ALIASES.fee_distributor_crvusd, feeDistributorCrvUSDABI);
|
|
557
557
|
this.setContract(this.constants.ALIASES.root_gauge_factory, rootGaugeFactoryABI);
|
|
558
|
-
//TODO should be deleted
|
|
559
|
-
this.setContract(this.constants.ALIASES.root_gauge_factory_arbitrum, rootGaugeFactoryABI);
|
|
560
558
|
}
|
|
561
559
|
else {
|
|
562
560
|
this.setContract(this.constants.ALIASES.child_gauge_factory, childGaugeFactoryABI);
|
package/lib/factory/deploy.js
CHANGED
|
@@ -620,7 +620,7 @@ function _deployGaugeMirror(chainId, salt, estimateGas) {
|
|
|
620
620
|
return __awaiter(this, void 0, void 0, function* () {
|
|
621
621
|
if (this.chainId !== 1)
|
|
622
622
|
throw Error("There is no deployGaugeMirror method on sidechain network");
|
|
623
|
-
const rootGaugeFactory =
|
|
623
|
+
const rootGaugeFactory = NETWORK_CONSTANTS[this.chainId].ALIASES.root_gauge_factory;
|
|
624
624
|
const contract = this.contracts[rootGaugeFactory].contract;
|
|
625
625
|
const _salt = ethers.encodeBytes32String(salt);
|
|
626
626
|
const gas = yield contract.deploy_gauge.estimateGas(chainId, Typed.bytes32(_salt), this.constantOptions);
|
|
@@ -673,7 +673,7 @@ export function getDeployedGaugeMirrorAddress(chainId) {
|
|
|
673
673
|
return __awaiter(this, void 0, void 0, function* () {
|
|
674
674
|
if (this.chainId !== 1)
|
|
675
675
|
throw Error("There is no getDeployedGaugeMirrorAddress method on sidechain network");
|
|
676
|
-
const rootGaugeFactory =
|
|
676
|
+
const rootGaugeFactory = NETWORK_CONSTANTS[this.chainId].ALIASES.root_gauge_factory;
|
|
677
677
|
const contract = this.contracts[rootGaugeFactory].contract;
|
|
678
678
|
const gaugeCount = yield contract.get_gauge_count(chainId);
|
|
679
679
|
const currentIndex = Number(gaugeCount) - 1;
|
package/lib/pools/utils.js
CHANGED
|
@@ -167,8 +167,8 @@ function _getUserClaimable(pools, address, useCache) {
|
|
|
167
167
|
rewardInfoCalls.push(gaugeMulticallContract.claimable_tokens(address));
|
|
168
168
|
}
|
|
169
169
|
for (const token of rewardTokens[poolId]) {
|
|
170
|
-
// Don't reset
|
|
171
|
-
const { multicallContract } =
|
|
170
|
+
// Don't reset ABI if its already set, we might override an LP token ABI
|
|
171
|
+
const { multicallContract } = this.contracts[token] || _setContracts.call(this, token, ERC20Abi);
|
|
172
172
|
rewardInfoCalls.push(multicallContract.symbol(), multicallContract.decimals());
|
|
173
173
|
if ('claimable_reward(address,address)' in gaugeContract) {
|
|
174
174
|
rewardInfoCalls.push(gaugeMulticallContract.claimable_reward(address, token));
|
|
@@ -255,8 +255,8 @@ function _getUserClaimableUseApi(pools, address, useCache) {
|
|
|
255
255
|
rewardInfoCalls.push(gaugeMulticallContract.claimable_tokens(address));
|
|
256
256
|
}
|
|
257
257
|
for (const r of rewardTokens[poolId]) {
|
|
258
|
-
// Don't reset
|
|
259
|
-
if (r.token
|
|
258
|
+
// Don't reset ABI if its already set, we might override an LP token ABI
|
|
259
|
+
if (!this.contracts[r.token]) {
|
|
260
260
|
_setContracts.call(this, r.token, ERC20Abi);
|
|
261
261
|
}
|
|
262
262
|
if ('claimable_reward(address,address)' in gaugeContract) {
|