@curvefi/api 2.40.1 → 2.41.0

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/curve.js CHANGED
@@ -79,6 +79,7 @@ import StableCalcZapABI from './constants/abis/stable_calc.json' assert { type:
79
79
  import registryExchangeABI from './constants/abis/registry_exchange.json' assert { type: 'json' };
80
80
  import streamerABI from './constants/abis/streamer.json' assert { type: 'json' };
81
81
  import factoryABI from './constants/abis/factory.json' assert { type: 'json' };
82
+ import factoryEywaABI from './constants/abis/factory-eywa.json' assert { type: 'json' };
82
83
  import factoryAdminABI from './constants/abis/factory-admin.json' assert { type: 'json' };
83
84
  import cryptoFactoryABI from './constants/abis/factory-crypto.json' assert { type: 'json' };
84
85
  import tricryptoFactoryABI from './constants/abis/factory-tricrypto.json' assert { type: 'json' };
@@ -305,9 +306,9 @@ var Curve = /** @class */ (function () {
305
306
  this.fetchFactoryPools = function (useApi) {
306
307
  if (useApi === void 0) { useApi = true; }
307
308
  return __awaiter(_this, void 0, void 0, function () {
308
- var _a, _b, _c, _d, _e;
309
- return __generator(this, function (_f) {
310
- switch (_f.label) {
309
+ var _a, _b, _c, _d, _e, _f, _g;
310
+ return __generator(this, function (_h) {
311
+ switch (_h.label) {
311
312
  case 0:
312
313
  if (this.chainId === 1313161554)
313
314
  return [2 /*return*/];
@@ -316,24 +317,29 @@ var Curve = /** @class */ (function () {
316
317
  _b = lowerCasePoolDataAddresses;
317
318
  return [4 /*yield*/, getFactoryPoolsDataFromApi.call(this, "factory")];
318
319
  case 1:
319
- _a.FACTORY_POOLS_DATA = _b.apply(void 0, [_f.sent()]);
320
+ _a.FACTORY_POOLS_DATA = _b.apply(void 0, [_h.sent()]);
320
321
  return [3 /*break*/, 4];
321
322
  case 2:
322
323
  _c = this.constants;
323
324
  _d = lowerCasePoolDataAddresses;
324
325
  return [4 /*yield*/, getFactoryPoolData.call(this)];
325
326
  case 3:
326
- _c.FACTORY_POOLS_DATA = _d.apply(void 0, [_f.sent()]);
327
- _f.label = 4;
327
+ _c.FACTORY_POOLS_DATA = _d.apply(void 0, [_h.sent()]);
328
+ _h.label = 4;
328
329
  case 4:
329
330
  _e = this.constants;
330
331
  return [4 /*yield*/, this._filterHiddenPools(this.constants.FACTORY_POOLS_DATA)];
331
332
  case 5:
332
- _e.FACTORY_POOLS_DATA = _f.sent();
333
+ _e.FACTORY_POOLS_DATA = _h.sent();
333
334
  this._updateDecimalsAndGauges(this.constants.FACTORY_POOLS_DATA);
334
335
  return [4 /*yield*/, _killGauges(this.constants.FACTORY_POOLS_DATA)];
335
336
  case 6:
336
- _f.sent();
337
+ _h.sent();
338
+ _f = this.constants.FACTORY_GAUGE_IMPLEMENTATIONS;
339
+ _g = "factory";
340
+ return [4 /*yield*/, this.contracts[this.constants.ALIASES.factory].contract.gauge_implementation(this.constantOptions)];
341
+ case 7:
342
+ _f[_g] = _h.sent();
337
343
  return [2 /*return*/];
338
344
  }
339
345
  });
@@ -376,12 +382,49 @@ var Curve = /** @class */ (function () {
376
382
  });
377
383
  });
378
384
  };
379
- this.fetchCryptoFactoryPools = function (useApi) {
385
+ this.fetchEywaFactoryPools = function (useApi) {
380
386
  if (useApi === void 0) { useApi = true; }
381
387
  return __awaiter(_this, void 0, void 0, function () {
382
388
  var _a, _b, _c, _d, _e;
383
389
  return __generator(this, function (_f) {
384
390
  switch (_f.label) {
391
+ case 0:
392
+ if (this.chainId != 250)
393
+ return [2 /*return*/];
394
+ if (!useApi) return [3 /*break*/, 2];
395
+ _a = this.constants;
396
+ _b = lowerCasePoolDataAddresses;
397
+ return [4 /*yield*/, getFactoryPoolsDataFromApi.call(this, "factory-eywa")];
398
+ case 1:
399
+ _a.EYWA_FACTORY_POOLS_DATA = _b.apply(void 0, [_f.sent()]);
400
+ return [3 /*break*/, 4];
401
+ case 2:
402
+ _c = this.constants;
403
+ _d = lowerCasePoolDataAddresses;
404
+ return [4 /*yield*/, getFactoryPoolData.call(this, 0, undefined, this.constants.ALIASES.eywa_factory)];
405
+ case 3:
406
+ _c.EYWA_FACTORY_POOLS_DATA = _d.apply(void 0, [_f.sent()]);
407
+ _f.label = 4;
408
+ case 4:
409
+ _e = this.constants;
410
+ return [4 /*yield*/, this._filterHiddenPools(this.constants.EYWA_FACTORY_POOLS_DATA)];
411
+ case 5:
412
+ _e.EYWA_FACTORY_POOLS_DATA = _f.sent();
413
+ this._updateDecimalsAndGauges(this.constants.EYWA_FACTORY_POOLS_DATA);
414
+ return [4 /*yield*/, _killGauges(this.constants.EYWA_FACTORY_POOLS_DATA)];
415
+ case 6:
416
+ _f.sent();
417
+ return [2 /*return*/];
418
+ }
419
+ });
420
+ });
421
+ };
422
+ this.fetchCryptoFactoryPools = function (useApi) {
423
+ if (useApi === void 0) { useApi = true; }
424
+ return __awaiter(_this, void 0, void 0, function () {
425
+ var _a, _b, _c, _d, _e, _f, _g;
426
+ return __generator(this, function (_h) {
427
+ switch (_h.label) {
385
428
  case 0:
386
429
  if (![1, 137, 250].includes(this.chainId))
387
430
  return [2 /*return*/];
@@ -390,24 +433,29 @@ var Curve = /** @class */ (function () {
390
433
  _b = lowerCasePoolDataAddresses;
391
434
  return [4 /*yield*/, getFactoryPoolsDataFromApi.call(this, "factory-crypto")];
392
435
  case 1:
393
- _a.CRYPTO_FACTORY_POOLS_DATA = _b.apply(void 0, [_f.sent()]);
436
+ _a.CRYPTO_FACTORY_POOLS_DATA = _b.apply(void 0, [_h.sent()]);
394
437
  return [3 /*break*/, 4];
395
438
  case 2:
396
439
  _c = this.constants;
397
440
  _d = lowerCasePoolDataAddresses;
398
441
  return [4 /*yield*/, getCryptoFactoryPoolData.call(this)];
399
442
  case 3:
400
- _c.CRYPTO_FACTORY_POOLS_DATA = _d.apply(void 0, [_f.sent()]);
401
- _f.label = 4;
443
+ _c.CRYPTO_FACTORY_POOLS_DATA = _d.apply(void 0, [_h.sent()]);
444
+ _h.label = 4;
402
445
  case 4:
403
446
  _e = this.constants;
404
447
  return [4 /*yield*/, this._filterHiddenPools(this.constants.CRYPTO_FACTORY_POOLS_DATA)];
405
448
  case 5:
406
- _e.CRYPTO_FACTORY_POOLS_DATA = _f.sent();
449
+ _e.CRYPTO_FACTORY_POOLS_DATA = _h.sent();
407
450
  this._updateDecimalsAndGauges(this.constants.CRYPTO_FACTORY_POOLS_DATA);
408
451
  return [4 /*yield*/, _killGauges(this.constants.CRYPTO_FACTORY_POOLS_DATA)];
409
452
  case 6:
410
- _f.sent();
453
+ _h.sent();
454
+ _f = this.constants.FACTORY_GAUGE_IMPLEMENTATIONS;
455
+ _g = "factory-crypto";
456
+ return [4 /*yield*/, this.contracts[this.constants.ALIASES.crypto_factory].contract.gauge_implementation(this.constantOptions)];
457
+ case 7:
458
+ _f[_g] = _h.sent();
411
459
  return [2 /*return*/];
412
460
  }
413
461
  });
@@ -416,9 +464,9 @@ var Curve = /** @class */ (function () {
416
464
  this.fetchTricryptoFactoryPools = function (useApi) {
417
465
  if (useApi === void 0) { useApi = true; }
418
466
  return __awaiter(_this, void 0, void 0, function () {
419
- var _a, _b, _c, _d, _e;
420
- return __generator(this, function (_f) {
421
- switch (_f.label) {
467
+ var _a, _b, _c, _d, _e, _f, _g;
468
+ return __generator(this, function (_h) {
469
+ switch (_h.label) {
422
470
  case 0:
423
471
  if (![1].includes(this.chainId))
424
472
  return [2 /*return*/];
@@ -427,24 +475,29 @@ var Curve = /** @class */ (function () {
427
475
  _b = lowerCasePoolDataAddresses;
428
476
  return [4 /*yield*/, getFactoryPoolsDataFromApi.call(this, "factory-tricrypto")];
429
477
  case 1:
430
- _a.TRICRYPTO_FACTORY_POOLS_DATA = _b.apply(void 0, [_f.sent()]);
478
+ _a.TRICRYPTO_FACTORY_POOLS_DATA = _b.apply(void 0, [_h.sent()]);
431
479
  return [3 /*break*/, 4];
432
480
  case 2:
433
481
  _c = this.constants;
434
482
  _d = lowerCasePoolDataAddresses;
435
483
  return [4 /*yield*/, getTricryptoFactoryPoolData.call(this)];
436
484
  case 3:
437
- _c.TRICRYPTO_FACTORY_POOLS_DATA = _d.apply(void 0, [_f.sent()]);
438
- _f.label = 4;
485
+ _c.TRICRYPTO_FACTORY_POOLS_DATA = _d.apply(void 0, [_h.sent()]);
486
+ _h.label = 4;
439
487
  case 4:
440
488
  _e = this.constants;
441
489
  return [4 /*yield*/, this._filterHiddenPools(this.constants.TRICRYPTO_FACTORY_POOLS_DATA)];
442
490
  case 5:
443
- _e.TRICRYPTO_FACTORY_POOLS_DATA = _f.sent();
491
+ _e.TRICRYPTO_FACTORY_POOLS_DATA = _h.sent();
444
492
  this._updateDecimalsAndGauges(this.constants.TRICRYPTO_FACTORY_POOLS_DATA);
445
493
  return [4 /*yield*/, _killGauges(this.constants.TRICRYPTO_FACTORY_POOLS_DATA)];
446
494
  case 6:
447
- _f.sent();
495
+ _h.sent();
496
+ _f = this.constants.FACTORY_GAUGE_IMPLEMENTATIONS;
497
+ _g = "factory-tricrypto";
498
+ return [4 /*yield*/, this.contracts[this.constants.ALIASES.tricrypto_factory].contract.gauge_implementation(this.constantOptions)];
499
+ case 7:
500
+ _f[_g] = _h.sent();
448
501
  return [2 /*return*/];
449
502
  }
450
503
  });
@@ -561,10 +614,12 @@ var Curve = /** @class */ (function () {
561
614
  this.getMainPoolList = function () { return Object.keys(_this.constants.POOLS_DATA); };
562
615
  this.getFactoryPoolList = function () { return Object.keys(_this.constants.FACTORY_POOLS_DATA); };
563
616
  this.getCrvusdFactoryPoolList = function () { return Object.keys(_this.constants.CRVUSD_FACTORY_POOLS_DATA); };
617
+ this.getEywaFactoryPoolList = function () { return Object.keys(_this.constants.EYWA_FACTORY_POOLS_DATA); };
564
618
  this.getCryptoFactoryPoolList = function () { return Object.keys(_this.constants.CRYPTO_FACTORY_POOLS_DATA); };
565
619
  this.getTricryptoFactoryPoolList = function () { return Object.keys(_this.constants.TRICRYPTO_FACTORY_POOLS_DATA); };
566
- this.getPoolList = function () { return __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], _this.getMainPoolList(), true), _this.getFactoryPoolList(), true), _this.getCrvusdFactoryPoolList(), true), _this.getCryptoFactoryPoolList(), true), _this.getTricryptoFactoryPoolList(), true); };
567
- this.getPoolsData = function () { return (__assign(__assign(__assign(__assign(__assign(__assign({}, _this.constants.POOLS_DATA), _this.constants.FACTORY_POOLS_DATA), _this.constants.CRVUSD_FACTORY_POOLS_DATA), _this.constants.CRYPTO_FACTORY_POOLS_DATA), _this.constants.TRICRYPTO_FACTORY_POOLS_DATA), _this.constants.LLAMMAS_DATA)); };
620
+ this.getPoolList = function () { return __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], _this.getMainPoolList(), true), _this.getFactoryPoolList(), true), _this.getCrvusdFactoryPoolList(), true), _this.getEywaFactoryPoolList(), true), _this.getCryptoFactoryPoolList(), true), _this.getTricryptoFactoryPoolList(), true); };
621
+ this.getPoolsData = function () { return (__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, _this.constants.POOLS_DATA), _this.constants.FACTORY_POOLS_DATA), _this.constants.CRVUSD_FACTORY_POOLS_DATA), _this.constants.EYWA_FACTORY_POOLS_DATA), _this.constants.CRYPTO_FACTORY_POOLS_DATA), _this.constants.TRICRYPTO_FACTORY_POOLS_DATA), _this.constants.LLAMMAS_DATA)); };
622
+ this.getGaugeImplementation = function (factoryType) { return _this.constants.FACTORY_GAUGE_IMPLEMENTATIONS[factoryType] || _this.constants.ZERO_ADDRESS; };
568
623
  // @ts-ignore
569
624
  this.provider = null;
570
625
  // @ts-ignore
@@ -584,12 +639,14 @@ var Curve = /** @class */ (function () {
584
639
  POOLS_DATA: {},
585
640
  FACTORY_POOLS_DATA: {},
586
641
  CRVUSD_FACTORY_POOLS_DATA: {},
642
+ EYWA_FACTORY_POOLS_DATA: {},
587
643
  CRYPTO_FACTORY_POOLS_DATA: {},
588
644
  TRICRYPTO_FACTORY_POOLS_DATA: {},
589
645
  LLAMMAS_DATA: {},
590
646
  COINS: {},
591
647
  DECIMALS: {},
592
648
  GAUGES: [],
649
+ FACTORY_GAUGE_IMPLEMENTATIONS: {},
593
650
  ZERO_ADDRESS: ethers.ZeroAddress,
594
651
  };
595
652
  }
@@ -621,12 +678,14 @@ var Curve = /** @class */ (function () {
621
678
  POOLS_DATA: {},
622
679
  FACTORY_POOLS_DATA: {},
623
680
  CRVUSD_FACTORY_POOLS_DATA: {},
681
+ EYWA_FACTORY_POOLS_DATA: {},
624
682
  CRYPTO_FACTORY_POOLS_DATA: {},
625
683
  TRICRYPTO_FACTORY_POOLS_DATA: {},
626
684
  LLAMMAS_DATA: {},
627
685
  COINS: {},
628
686
  DECIMALS: {},
629
687
  GAUGES: [],
688
+ FACTORY_GAUGE_IMPLEMENTATIONS: {},
630
689
  ZERO_ADDRESS: ethers.ZeroAddress,
631
690
  };
632
691
  if (!(providerType.toLowerCase() === 'JsonRpc'.toLowerCase())) return [3 /*break*/, 6];
@@ -811,6 +870,7 @@ var Curve = /** @class */ (function () {
811
870
  _q.label = 21;
812
871
  case 21:
813
872
  this.setContract(this.constants.ALIASES.crvusd_factory, factoryABI);
873
+ this.setContract(this.constants.ALIASES.eywa_factory, factoryEywaABI);
814
874
  this.setContract(this.constants.ALIASES.crypto_factory, cryptoFactoryABI);
815
875
  this.setContract(this.constants.ALIASES.tricrypto_factory, tricryptoFactoryABI);
816
876
  this.setContract(this.constants.ALIASES.anycall, anycallABI);
@@ -61,6 +61,7 @@ export var _getAllPoolsFromApi = function (network) { return __awaiter(void 0, v
61
61
  _getPoolsFromApi(network, "crypto"),
62
62
  _getPoolsFromApi(network, "factory"),
63
63
  _getPoolsFromApi(network, "factory-crvusd"),
64
+ _getPoolsFromApi(network, "factory-eywa"),
64
65
  _getPoolsFromApi(network, "factory-crypto"),
65
66
  _getPoolsFromApi(network, "factory-tricrypto"),
66
67
  ])];
@@ -23,6 +23,10 @@ import Plain4BasicABI from "../constants/abis/factory-v2/Plain4Basic.json" asser
23
23
  import Plain4BalancesABI from "../constants/abis/factory-v2/Plain4Balances.json" assert { type: 'json' };
24
24
  import Plain4ETHABI from "../constants/abis/factory-v2/Plain4ETH.json" assert { type: 'json' };
25
25
  import Plain4OptimizedABI from "../constants/abis/factory-v2/Plain4Optimized.json" assert { type: 'json' };
26
+ import Plain6BasicABI from "../constants/abis/factory-v2/Plain6Basic.json" assert { type: 'json' };
27
+ import Plain6BalancesABI from "../constants/abis/factory-v2/Plain6Balances.json" assert { type: 'json' };
28
+ import Plain6ETHABI from "../constants/abis/factory-v2/Plain6ETH.json" assert { type: 'json' };
29
+ import Plain6OptimizedABI from "../constants/abis/factory-v2/Plain6Optimized.json" assert { type: 'json' };
26
30
  // --- ZAPS --
27
31
  import factoryDepositABI from "../constants/abis/factoryPools/deposit.json" assert { type: 'json' };
28
32
  import fraxusdcMetaZapABI from "../constants/abis/fraxusdc/meta_zap.json" assert { type: 'json' };
@@ -101,6 +105,11 @@ export var implementationABIDictFantom = lowerCaseKeys({
101
105
  "0x775A21E0dfE25aF30FF2FCAC37512EbD8fD36471": Plain4BalancesABI,
102
106
  "0xb11Dc44A9f981fAF1669dca6DD40c3cc2554A2ce": Plain4ETHABI,
103
107
  "0x9D7C28226AA7142cBF234ab9aa9C203D095c528B": Plain4OptimizedABI,
108
+ // !!! EYWA Factory !!!
109
+ "0x736FB582A39BC8f7685f87010c76C674F7fB583e": Plain6BasicABI,
110
+ "0x2C996b11a73276787Eb637D4459d1A7fea16B310": Plain6BalancesABI,
111
+ "0xa4Fc50E45aF5bF22b519468c7c342C704e1F3d44": Plain6ETHABI,
112
+ "0x65e38C41CcE6D9Bc202209Cc546B2f63985D4139": Plain6OptimizedABI,
104
113
  });
105
114
  export var implementationABIDictAvalanche = lowerCaseKeys({
106
115
  "0xA237034249290De2B07988Ac64b96f22c0E76fE0": MetaUSDABI,
@@ -1,3 +1,3 @@
1
- import { IDict, IPoolData, ICurve, IPoolDataFromApi } from "../interfaces";
1
+ import { IDict, IFactoryPoolType, IPoolData, ICurve, IPoolDataFromApi } from "../interfaces";
2
2
  export declare const lowerCasePoolDataAddresses: (poolsData: IPoolDataFromApi[]) => IPoolDataFromApi[];
3
- export declare function getFactoryPoolsDataFromApi(this: ICurve, factoryType: "factory" | "factory-crvusd" | "factory-crypto" | "factory-tricrypto"): Promise<IDict<IPoolData>>;
3
+ export declare function getFactoryPoolsDataFromApi(this: ICurve, factoryType: IFactoryPoolType): Promise<IDict<IPoolData>>;
@@ -221,6 +221,7 @@ function getCoinsData(tokenAddresses, coinAddresses, existingCoinAddrNameDict, e
221
221
  }
222
222
  else if (addr === "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2") {
223
223
  coinAddrNamesDict[addr] = "MKR";
224
+ coinAddrDecimalsDict[addr] = 18;
224
225
  }
225
226
  else {
226
227
  newCoinAddresses.push(addr);
@@ -123,7 +123,8 @@ function getFactoryIdsAndSwapAddresses(fromIdx, factoryAddress) {
123
123
  }
124
124
  if (calls.length === 0)
125
125
  return [2 /*return*/, [[], []]];
126
- prefix = factoryAddress === this.constants.ALIASES.factory ? "factory-v2-" : "factory-crvusd-";
126
+ prefix = factoryAddress === this.constants.ALIASES.factory ? "factory-v2-" :
127
+ factoryAddress === this.constants.ALIASES.crvusd_factory ? "factory-crvusd-" : "factory-eywa-";
127
128
  return [4 /*yield*/, this.multicallProvider.all(calls)];
128
129
  case 2:
129
130
  factories = (_f.sent()).map(function (addr, i) { return ({ id: prefix + (fromIdx + i), address: addr.toLowerCase() }); });
package/lib/index.d.ts CHANGED
@@ -66,6 +66,7 @@ declare const curve: {
66
66
  getDeployedMetaPoolAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
67
67
  getDeployedGaugeAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
68
68
  fetchRecentlyDeployedPool: (poolAddress: string) => Promise<string>;
69
+ gaugeImplementation: () => string;
69
70
  estimateGas: {
70
71
  deployPlainPool: (name: string, symbol: string, coins: string[], A: string | number, fee: string | number, assetType: 0 | 1 | 2 | 3, implementationIdx: 0 | 1 | 2 | 3 | 4 | 5, emaTime?: number, oracleAddress?: string, methodName?: string) => Promise<number>;
71
72
  setOracle: (poolAddress: string, oracleAddress?: string, methodName?: string) => Promise<number>;
@@ -77,6 +78,10 @@ declare const curve: {
77
78
  fetchPools: (useApi?: boolean) => Promise<void>;
78
79
  getPoolList: () => string[];
79
80
  };
81
+ EYWAFactory: {
82
+ fetchPools: (useApi?: boolean) => Promise<void>;
83
+ getPoolList: () => string[];
84
+ };
80
85
  cryptoFactory: {
81
86
  fetchPools: (useApi?: boolean) => Promise<void>;
82
87
  fetchNewPools: () => Promise<string[]>;
@@ -86,6 +91,7 @@ declare const curve: {
86
91
  getDeployedPoolAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
87
92
  getDeployedGaugeAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
88
93
  fetchRecentlyDeployedPool: (poolAddress: string) => Promise<string>;
94
+ gaugeImplementation: () => string;
89
95
  estimateGas: {
90
96
  deployPool: (name: string, symbol: string, coins: string[], A: string | number, gamma: string | number, midFee: string | number, outFee: string | number, allowedExtraProfit: string | number, feeGamma: string | number, adjustmentStep: string | number, maHalfTime: number, initialPrice: string | number) => Promise<number>;
91
97
  deployGauge: (poolAddress: string) => Promise<number>;
@@ -100,6 +106,7 @@ declare const curve: {
100
106
  getDeployedPoolAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
101
107
  getDeployedGaugeAddress: (tx: ethers.ContractTransactionResponse) => Promise<string>;
102
108
  fetchRecentlyDeployedPool: (poolAddress: string) => Promise<string>;
109
+ gaugeImplementation: () => string;
103
110
  estimateGas: {
104
111
  deployPool: (name: string, symbol: string, coins: string[], A: string | number, gamma: string | number, midFee: string | number, outFee: string | number, allowedExtraProfit: string | number, feeGamma: string | number, adjustmentStep: string | number, emaTime: number, initialPrices: (string | number)[]) => Promise<number>;
105
112
  deployGauge: (poolAddress: string) => Promise<number>;
package/lib/index.js CHANGED
@@ -97,6 +97,7 @@ var curve = {
97
97
  getDeployedMetaPoolAddress: getDeployedStableMetaPoolAddress,
98
98
  getDeployedGaugeAddress: getDeployedGaugeAddress,
99
99
  fetchRecentlyDeployedPool: _curve.fetchRecentlyDeployedFactoryPool,
100
+ gaugeImplementation: function () { return _curve.getGaugeImplementation("factory"); },
100
101
  estimateGas: {
101
102
  deployPlainPool: deployStablePlainPoolEstimateGas,
102
103
  setOracle: setOracleEstimateGas,
@@ -110,6 +111,10 @@ var curve = {
110
111
  fetchPools: _curve.fetchCrvusdFactoryPools,
111
112
  getPoolList: _curve.getCrvusdFactoryPoolList,
112
113
  },
114
+ EYWAFactory: {
115
+ fetchPools: _curve.fetchEywaFactoryPools,
116
+ getPoolList: _curve.getEywaFactoryPoolList,
117
+ },
113
118
  cryptoFactory: {
114
119
  fetchPools: _curve.fetchCryptoFactoryPools,
115
120
  fetchNewPools: _curve.fetchNewCryptoFactoryPools,
@@ -121,6 +126,7 @@ var curve = {
121
126
  getDeployedPoolAddress: getDeployedCryptoPoolAddress,
122
127
  getDeployedGaugeAddress: getDeployedGaugeAddress,
123
128
  fetchRecentlyDeployedPool: _curve.fetchRecentlyDeployedCryptoFactoryPool,
129
+ gaugeImplementation: function () { return _curve.getGaugeImplementation("factory-crypto"); },
124
130
  estimateGas: {
125
131
  deployPool: deployCryptoPoolEstimateGas,
126
132
  deployGauge: function (poolAddress) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
@@ -139,6 +145,7 @@ var curve = {
139
145
  getDeployedPoolAddress: getDeployedTricryptoPoolAddress,
140
146
  getDeployedGaugeAddress: getDeployedGaugeAddress,
141
147
  fetchRecentlyDeployedPool: _curve.fetchRecentlyDeployedTricryptoFactoryPool,
148
+ gaugeImplementation: function () { return _curve.getGaugeImplementation("factory-tricrypto"); },
142
149
  estimateGas: {
143
150
  deployPool: deployTricryptoPoolEstimateGas,
144
151
  deployGauge: function (poolAddress) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
@@ -5,7 +5,8 @@ export interface IDict<T> {
5
5
  }
6
6
  export type INetworkName = "ethereum" | "optimism" | "xdai" | "polygon" | "fantom" | "moonbeam" | "kava" | "arbitrum" | "celo" | "avalanche" | "aurora";
7
7
  export type IChainId = 1 | 10 | 100 | 137 | 250 | 1284 | 2222 | 42161 | 42220 | 43114 | 1313161554;
8
- export type IPoolType = "main" | "crypto" | "factory" | "factory-crvusd" | "factory-crypto" | "factory-tricrypto";
8
+ export type IFactoryPoolType = "factory" | "factory-crvusd" | "factory-eywa" | "factory-crypto" | "factory-tricrypto";
9
+ export type IPoolType = "main" | "crypto" | IFactoryPoolType;
9
10
  export type REFERENCE_ASSET = 'USD' | 'EUR' | 'BTC' | 'ETH' | 'LINK' | 'CRYPTO' | 'OTHER';
10
11
  export interface IPoolData {
11
12
  name: string;
@@ -187,7 +187,7 @@ var PoolTemplate = /** @class */ (function () {
187
187
  if (this.id.startsWith("factory")) {
188
188
  poolType = "factory";
189
189
  factoryType = this.id.split("-")[1];
190
- if (factoryType)
190
+ if (factoryType !== "v2")
191
191
  poolType += "-" + factoryType;
192
192
  }
193
193
  return [4 /*yield*/, _getPoolsFromApi(network, poolType)];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curvefi/api",
3
- "version": "2.40.1",
3
+ "version": "2.41.0",
4
4
  "description": "JavaScript library for curve.fi",
5
5
  "main": "lib/index.js",
6
6
  "author": "Macket",