@curvefi/api 2.47.2 → 2.47.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.
package/README.md CHANGED
@@ -1754,6 +1754,7 @@ import curve from "@curvefi/api";
1754
1754
  // 0x60d3d7ebbc44dc810a743703184f062d00e6db7e
1755
1755
  //After that should be deployed mirror gauge on mainnet with same salt
1756
1756
  //await curve.tricryptoFactory.deployGaugeMirror(sidechainId, salt);
1757
+ //const deployedGaugeMirrorAddress = await curve.tricryptoFactory.getDeployedGaugeMirrorAddress(sidechainId);
1757
1758
 
1758
1759
  // Deposit & Stake
1759
1760
 
@@ -21,3 +21,4 @@ export declare const deployGaugeSidechain: (pool: string, salt: string) => Promi
21
21
  export declare const deployGaugeMirrorEstimateGas: (chainId: number, salt: string) => Promise<number>;
22
22
  export declare const deployGaugeMirror: (chainId: number, salt: string) => Promise<ethers.ContractTransactionResponse>;
23
23
  export declare const getDeployedGaugeAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
24
+ export declare const getDeployedGaugeMirrorAddress: (chainId: number) => Promise<string>;
@@ -645,3 +645,20 @@ export var getDeployedGaugeAddress = function (tx) { return __awaiter(void 0, vo
645
645
  }
646
646
  });
647
647
  }); };
648
+ export var getDeployedGaugeMirrorAddress = function (chainId) { return __awaiter(void 0, void 0, void 0, function () {
649
+ var contract, gaugeCount, currentIndex;
650
+ return __generator(this, function (_a) {
651
+ switch (_a.label) {
652
+ case 0:
653
+ if (curve.chainId !== 1)
654
+ throw Error("There is no getDeployedGaugeMirrorAddress method on sidechain network");
655
+ contract = curve.contracts[curve.constants.ALIASES.gauge_factory].contract;
656
+ return [4 /*yield*/, contract.get_gauge_count(chainId)];
657
+ case 1:
658
+ gaugeCount = _a.sent();
659
+ currentIndex = Number(gaugeCount) - 1;
660
+ return [4 /*yield*/, contract.get_gauge(chainId, currentIndex)];
661
+ case 2: return [2 /*return*/, _a.sent()];
662
+ }
663
+ });
664
+ }); };
package/lib/index.d.ts CHANGED
@@ -70,6 +70,7 @@ declare const curve: {
70
70
  getDeployedPlainPoolAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
71
71
  getDeployedMetaPoolAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
72
72
  getDeployedGaugeAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
73
+ getDeployedGaugeMirrorAddress: (chainId: number) => Promise<string>;
73
74
  fetchRecentlyDeployedPool: (poolAddress: string) => Promise<string>;
74
75
  gaugeImplementation: () => string;
75
76
  estimateGas: {
@@ -99,6 +100,7 @@ declare const curve: {
99
100
  deployGaugeMirror: (chainId: number, salt: string) => Promise<ethers.ContractTransactionResponse>;
100
101
  getDeployedPoolAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
101
102
  getDeployedGaugeAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
103
+ getDeployedGaugeMirrorAddress: (chainId: number) => Promise<string>;
102
104
  fetchRecentlyDeployedPool: (poolAddress: string) => Promise<string>;
103
105
  gaugeImplementation: () => string;
104
106
  estimateGas: {
@@ -118,6 +120,7 @@ declare const curve: {
118
120
  deployGaugeMirror: (chainId: number, salt: string) => Promise<ethers.ContractTransactionResponse>;
119
121
  getDeployedPoolAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
120
122
  getDeployedGaugeAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
123
+ getDeployedGaugeMirrorAddress: (chainId: number) => Promise<string>;
121
124
  fetchRecentlyDeployedPool: (poolAddress: string) => Promise<string>;
122
125
  gaugeImplementation: () => string;
123
126
  estimateGas: {
package/lib/index.js CHANGED
@@ -40,7 +40,7 @@ import { getBestRouteAndOutput, getArgs, swapExpected, swapRequired, swapPriceIm
40
40
  import { curve as _curve } from "./curve.js";
41
41
  import { getCrv, getLockedAmountAndUnlockTime, getVeCrv, getVeCrvPct, calcUnlockTime, createLockEstimateGas, createLock, isApproved, approveEstimateGas, approve, increaseAmountEstimateGas, increaseAmount, increaseUnlockTimeEstimateGas, increaseUnlockTime, withdrawLockedCrvEstimateGas, withdrawLockedCrv, claimableFees, claimFeesEstimateGas, claimFees, lastEthBlock, getAnycallBalance, topUpAnycall, topUpAnycallEstimateGas, lastBlockSent, blockToSend, sendBlockhash, sendBlockhashEstimateGas, submitProof, submitProofEstimateGas, } from "./boosting.js";
42
42
  import { getBalances, getAllowance, hasAllowance, ensureAllowanceEstimateGas, ensureAllowance, getUsdRate, getTVL, getCoinsData, getVolume, hasDepositAndStake, hasRouter, } from "./utils.js";
43
- import { deployStablePlainPool, deployStablePlainPoolEstimateGas, getDeployedStablePlainPoolAddress, setOracle, setOracleEstimateGas, deployStableMetaPool, deployStableMetaPoolEstimateGas, getDeployedStableMetaPoolAddress, deployCryptoPool, deployCryptoPoolEstimateGas, getDeployedCryptoPoolAddress, deployTricryptoPool, deployTricryptoPoolEstimateGas, getDeployedTricryptoPoolAddress, deployGauge, deployGaugeEstimateGas, getDeployedGaugeAddress, deployGaugeSidechain, deployGaugeSidechainEstimateGas, deployGaugeMirror, deployGaugeMirrorEstimateGas, } from './factory/deploy.js';
43
+ import { deployStablePlainPool, deployStablePlainPoolEstimateGas, getDeployedStablePlainPoolAddress, setOracle, setOracleEstimateGas, deployStableMetaPool, deployStableMetaPoolEstimateGas, getDeployedStableMetaPoolAddress, deployCryptoPool, deployCryptoPoolEstimateGas, getDeployedCryptoPoolAddress, deployTricryptoPool, deployTricryptoPoolEstimateGas, getDeployedTricryptoPoolAddress, deployGauge, deployGaugeEstimateGas, getDeployedGaugeAddress, deployGaugeSidechain, deployGaugeSidechainEstimateGas, deployGaugeMirror, deployGaugeMirrorEstimateGas, getDeployedGaugeMirrorAddress, } from './factory/deploy.js';
44
44
  function init(providerType, providerSettings, options) {
45
45
  if (options === void 0) { options = {}; }
46
46
  return __awaiter(this, void 0, void 0, function () {
@@ -104,6 +104,7 @@ var curve = {
104
104
  getDeployedPlainPoolAddress: getDeployedStablePlainPoolAddress,
105
105
  getDeployedMetaPoolAddress: getDeployedStableMetaPoolAddress,
106
106
  getDeployedGaugeAddress: getDeployedGaugeAddress,
107
+ getDeployedGaugeMirrorAddress: getDeployedGaugeMirrorAddress,
107
108
  fetchRecentlyDeployedPool: _curve.fetchRecentlyDeployedFactoryPool,
108
109
  gaugeImplementation: function () { return _curve.getGaugeImplementation("factory"); },
109
110
  estimateGas: {
@@ -145,6 +146,7 @@ var curve = {
145
146
  }); }); },
146
147
  getDeployedPoolAddress: getDeployedCryptoPoolAddress,
147
148
  getDeployedGaugeAddress: getDeployedGaugeAddress,
149
+ getDeployedGaugeMirrorAddress: getDeployedGaugeMirrorAddress,
148
150
  fetchRecentlyDeployedPool: _curve.fetchRecentlyDeployedCryptoFactoryPool,
149
151
  gaugeImplementation: function () { return _curve.getGaugeImplementation("factory-crypto"); },
150
152
  estimateGas: {
@@ -176,6 +178,7 @@ var curve = {
176
178
  }); }); },
177
179
  getDeployedPoolAddress: getDeployedTricryptoPoolAddress,
178
180
  getDeployedGaugeAddress: getDeployedGaugeAddress,
181
+ getDeployedGaugeMirrorAddress: getDeployedGaugeMirrorAddress,
179
182
  fetchRecentlyDeployedPool: _curve.fetchRecentlyDeployedTricryptoFactoryPool,
180
183
  gaugeImplementation: function () { return _curve.getGaugeImplementation("factory-tricrypto"); },
181
184
  estimateGas: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curvefi/api",
3
- "version": "2.47.2",
3
+ "version": "2.47.3",
4
4
  "description": "JavaScript library for curve.fi",
5
5
  "main": "lib/index.js",
6
6
  "author": "Macket",