From 0afee2aa3c38ca36a0be97375466ec2283e7fefe Mon Sep 17 00:00:00 2001 From: fedorovdg Date: Thu, 10 Oct 2024 17:48:01 +0400 Subject: [PATCH 1/3] fix: _deployGaugeMirror ALIASES --- src/factory/deploy.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/factory/deploy.ts b/src/factory/deploy.ts index 3aa5ff0d..599047fe 100644 --- a/src/factory/deploy.ts +++ b/src/factory/deploy.ts @@ -884,7 +884,7 @@ const _deployGaugeSidechain = async (pool: string, salt: string, estimateGas: bo const _deployGaugeMirror = async (chainId: number, salt: string, estimateGas: boolean): Promise => { if (curve.chainId !== 1) throw Error("There is no deployGaugeMirror method on sidechain network"); - const rootGaugeFactory = chainId !== 42161? NETWORK_CONSTANTS[curve.chainId].root_gauge_factory: NETWORK_CONSTANTS[curve.chainId].root_gauge_factory_arbitrum; + const rootGaugeFactory = chainId !== 42161? curve.constants.ALIASES.root_gauge_factory: curve.constants.ALIASES.root_gauge_factory_arbitrum; const contract = curve.contracts[rootGaugeFactory].contract; const _salt = ethers.encodeBytes32String(salt) const gas = await contract.deploy_gauge.estimateGas(chainId, Typed.bytes32(_salt), curve.constantOptions); @@ -924,7 +924,7 @@ export const getDeployedGaugeMirrorAddressByTx = async (tx: ethers.ContractTrans export const getDeployedGaugeMirrorAddress = async (chainId: number): Promise => { if (curve.chainId !== 1) throw Error("There is no getDeployedGaugeMirrorAddress method on sidechain network"); - const rootGaugeFactory = chainId !== 42161? NETWORK_CONSTANTS[curve.chainId].root_gauge_factory: NETWORK_CONSTANTS[curve.chainId].root_gauge_factory_arbitrum; + const rootGaugeFactory = chainId !== 42161? curve.constants.ALIASES.root_gauge_factory: curve.constants.ALIASES.root_gauge_factory_arbitrum; const contract = curve.contracts[rootGaugeFactory].contract; const gaugeCount = await contract.get_gauge_count(chainId); const currentIndex: number = Number(gaugeCount) - 1; From b23662d47a17a78f9959d64c538131bec2f8bab0 Mon Sep 17 00:00:00 2001 From: fedorovdg Date: Thu, 10 Oct 2024 18:04:24 +0400 Subject: [PATCH 2/3] fix: fixed getDeployedGaugeMirrorAddress ALIASES --- src/factory/deploy.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/factory/deploy.ts b/src/factory/deploy.ts index 599047fe..ad636961 100644 --- a/src/factory/deploy.ts +++ b/src/factory/deploy.ts @@ -884,7 +884,7 @@ const _deployGaugeSidechain = async (pool: string, salt: string, estimateGas: bo const _deployGaugeMirror = async (chainId: number, salt: string, estimateGas: boolean): Promise => { if (curve.chainId !== 1) throw Error("There is no deployGaugeMirror method on sidechain network"); - const rootGaugeFactory = chainId !== 42161? curve.constants.ALIASES.root_gauge_factory: curve.constants.ALIASES.root_gauge_factory_arbitrum; + const rootGaugeFactory = chainId !== 42161? NETWORK_CONSTANTS[curve.chainId].ALIASES.root_gauge_factory: NETWORK_CONSTANTS[curve.chainId].ALIASES.root_gauge_factory_arbitrum; const contract = curve.contracts[rootGaugeFactory].contract; const _salt = ethers.encodeBytes32String(salt) const gas = await contract.deploy_gauge.estimateGas(chainId, Typed.bytes32(_salt), curve.constantOptions); @@ -924,7 +924,7 @@ export const getDeployedGaugeMirrorAddressByTx = async (tx: ethers.ContractTrans export const getDeployedGaugeMirrorAddress = async (chainId: number): Promise => { if (curve.chainId !== 1) throw Error("There is no getDeployedGaugeMirrorAddress method on sidechain network"); - const rootGaugeFactory = chainId !== 42161? curve.constants.ALIASES.root_gauge_factory: curve.constants.ALIASES.root_gauge_factory_arbitrum; + const rootGaugeFactory = chainId !== 42161? NETWORK_CONSTANTS[curve.chainId].ALIASES.root_gauge_factory: NETWORK_CONSTANTS[curve.chainId].ALIASES.root_gauge_factory_arbitrum; const contract = curve.contracts[rootGaugeFactory].contract; const gaugeCount = await contract.get_gauge_count(chainId); const currentIndex: number = Number(gaugeCount) - 1; From 2e2798b094942a36695b1acde147785911e1d4ee Mon Sep 17 00:00:00 2001 From: fedorovdg Date: Thu, 10 Oct 2024 18:08:49 +0400 Subject: [PATCH 3/3] build: v2.63.10 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bf82b09e..45aed2d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@curvefi/api", - "version": "2.63.9", + "version": "2.63.10", "description": "JavaScript library for curve.fi", "main": "lib/index.js", "author": "Macket",