@curvefi/api 2.68.39 → 2.68.40

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
@@ -28,7 +28,6 @@ import curve from "@curvefi/api";
28
28
  // Fetch factory pools
29
29
  await curve.factory.fetchPools();
30
30
  await curve.crvUSDFactory.fetchPools();
31
- await curve.EYWAFactory.fetchPools();
32
31
  await curve.cryptoFactory.fetchPools();
33
32
  await curve.twocryptoFactory.fetchPools();
34
33
  await curve.tricryptoFactory.fetchPools();
@@ -205,7 +204,6 @@ import curve from "@curvefi/api";
205
204
  await curve.init('JsonRpc', {}, { gasPrice: 0, maxFeePerGas: 0, maxPriorityFeePerGas: 0 });
206
205
  await curve.factory.fetchPools();
207
206
  await curve.crvUSDFactory.fetchPools();
208
- await curve.EYWAFactory.fetchPools();
209
207
  await curve.cryptoFactory.fetchPools();
210
208
  await curve.twocryptoFactory.fetchPools();
211
209
  await curve.tricryptoFactory.fetchPools();
@@ -260,10 +258,6 @@ import curve from "@curvefi/api";
260
258
 
261
259
  curve.crvUSDFactory.getPoolList();
262
260
  // ['factory-crvusd-0', 'factory-crvusd-1', 'factory-crvusd-2', 'factory-crvusd-3']
263
-
264
- // On Fantom network
265
- curve.EYWAFactory.getPoolList();
266
- // ['factory-eywa-0', 'factory-eywa-1', 'factory-eywa-2', 'factory-eywa-3']
267
261
 
268
262
  curve.cryptoFactory.getPoolList();
269
263
  // [
@@ -339,7 +333,6 @@ import curve from "@curvefi/api";
339
333
  await curve.init('JsonRpc', {}, { gasPrice: 0, maxFeePerGas: 0, maxPriorityFeePerGas: 0 });
340
334
  await curve.factory.fetchPools();
341
335
  await curve.crvUSDFactory.fetchPools();
342
- await curve.EYWAFactory.fetchPools();
343
336
  await curve.cryptoFactory.fetchPools();
344
337
  await curve.twocryptoFactory.fetchPools();
345
338
  await curve.tricryptoFactory.fetchPools();
@@ -1207,7 +1200,6 @@ import curve from "@curvefi/api";
1207
1200
  await curve.init('JsonRpc', {}, { gasPrice: 0, maxFeePerGas: 0, maxPriorityFeePerGas: 0 });
1208
1201
  await curve.factory.fetchPools();
1209
1202
  await curve.crvUSDFactory.fetchPools();
1210
- await curve.EYWAFactory.fetchPools();
1211
1203
  await curve.cryptoFactory.fetchPools();
1212
1204
  await curve.twocryptoFactory.fetchPools();
1213
1205
  await curve.tricryptoFactory.fetchPools();
@@ -1883,7 +1875,6 @@ import curve from "@curvefi/api";
1883
1875
  // Fetch pools from api (if false arg is not passed)
1884
1876
  await curve.factory.fetchPools();
1885
1877
  await curve.crvUSDFactory.fetchPools();
1886
- await curve.EYWAFactory.fetchPools();
1887
1878
  await curve.cryptoFactory.fetchPools();
1888
1879
  await curve.twocryptoFactory.fetchPools();
1889
1880
  await curve.tricryptoFactory.fetchPools();
@@ -24,10 +24,6 @@ import Plain4BasicABI from "../abis/factory-v2/Plain4Basic.json" with { type: 'j
24
24
  import Plain4BalancesABI from "../abis/factory-v2/Plain4Balances.json" with { type: 'json' };
25
25
  import Plain4ETHABI from "../abis/factory-v2/Plain4ETH.json" with { type: 'json' };
26
26
  import Plain4OptimizedABI from "../abis/factory-v2/Plain4Optimized.json" with { type: 'json' };
27
- import Plain6BasicABI from "../abis/factory-v2/Plain6Basic.json" with { type: 'json' };
28
- import Plain6BalancesABI from "../abis/factory-v2/Plain6Balances.json" with { type: 'json' };
29
- import Plain6ETHABI from "../abis/factory-v2/Plain6ETH.json" with { type: 'json' };
30
- import Plain6OptimizedABI from "../abis/factory-v2/Plain6Optimized.json" with { type: 'json' };
31
27
  // --- ZAPS --
32
28
  import factoryDepositABI from "../abis/factoryPools/deposit.json" with { type: 'json' };
33
29
  import fraxusdcMetaZapABI from "../abis/fraxusdc/meta_zap.json" with { type: 'json' };
@@ -110,11 +106,6 @@ export const implementationABIDictFantom = lowerCaseKeys({
110
106
  "0x775A21E0dfE25aF30FF2FCAC37512EbD8fD36471": Plain4BalancesABI,
111
107
  "0xb11Dc44A9f981fAF1669dca6DD40c3cc2554A2ce": Plain4ETHABI,
112
108
  "0x9D7C28226AA7142cBF234ab9aa9C203D095c528B": Plain4OptimizedABI,
113
- // !!! EYWA Factory !!!
114
- "0x736FB582A39BC8f7685f87010c76C674F7fB583e": Plain6BasicABI,
115
- "0x2C996b11a73276787Eb637D4459d1A7fea16B310": Plain6BalancesABI,
116
- "0xa4Fc50E45aF5bF22b519468c7c342C704e1F3d44": Plain6ETHABI,
117
- "0x65e38C41CcE6D9Bc202209Cc546B2f63985D4139": Plain6OptimizedABI,
118
109
  });
119
110
  export const implementationABIDictAvalanche = lowerCaseKeys({
120
111
  "0xA237034249290De2B07988Ac64b96f22c0E76fE0": MetaUSDABI,
@@ -58,7 +58,6 @@ const ALIASES_FANTOM = lowerCaseValues({
58
58
  "stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
59
59
  "crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
60
60
  "factory": "0x686d67265703d1f124c45e33d47d794c566889ba",
61
- "eywa_factory": '0x37F22A0B028f2152e6CAcef210e0C4d3b875f367',
62
61
  "crypto_factory": "0xE5De15A9C9bBedb4F5EC13B131E61245f2983A69",
63
62
  "stable_ng_factory": '0xe61Fb97Ef6eBFBa12B36Ffd7be785c1F5A2DE66b',
64
63
  "twocrypto_factory": '0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F',
@@ -169,7 +168,6 @@ const ALIASES_AURORA = lowerCaseValues({
169
168
  "crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC', // <--- NEW
170
169
  "factory": '0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F', // <--- TODO CHANGE
171
170
  "crvusd_factory": '0x4F8846Ae9380B90d2E71D5e3D042dff3E7ebb40d', // <-- DUMMY
172
- "eywa_factory": '0x37F22A0B028f2152e6CAcef210e0C4d3b875f367', // <--- DUMMY
173
171
  "crypto_factory": '0xF18056Bbd320E96A48e3Fbf8bC061322531aac99', // <--- TODO CHANGE
174
172
  "twocrypto_factory": '0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F', // <--- NEW
175
173
  "tricrypto_factory": '0x0c0e5f2fF0ff18a3be9b835635039256dC4B4963', // <--- TODO CHANGE
package/lib/curve.d.ts CHANGED
@@ -61,7 +61,6 @@ export declare class Curve implements ICurve {
61
61
  _updateDecimalsAndGauges(pools: IDict<IPoolData>): void;
62
62
  fetchFactoryPools: (useApi?: boolean) => Promise<void>;
63
63
  fetchCrvusdFactoryPools: (useApi?: boolean) => Promise<void>;
64
- fetchEywaFactoryPools: (useApi?: boolean) => Promise<void>;
65
64
  fetchCryptoFactoryPools: (useApi?: boolean) => Promise<void>;
66
65
  fetchStableNgFactoryPools: (useApi?: boolean) => Promise<void>;
67
66
  fetchTworyptoFactoryPools: (useApi?: boolean) => Promise<void>;
@@ -79,7 +78,6 @@ export declare class Curve implements ICurve {
79
78
  getMainPoolList: () => string[];
80
79
  getFactoryPoolList: () => string[];
81
80
  getCrvusdFactoryPoolList: () => string[];
82
- getEywaFactoryPoolList: () => string[];
83
81
  getCryptoFactoryPoolList: () => string[];
84
82
  getStableNgFactoryPoolList: () => string[];
85
83
  getTworyptoFactoryPoolList: () => string[];
package/lib/curve.js CHANGED
@@ -36,7 +36,6 @@ import routerPolygonABI from './constants/abis/routerPolygon.json' with { type:
36
36
  import routerNgPoolsOnlyABI from './constants/abis/router-ng-pools-only.json' with { type: 'json' };
37
37
  import streamerABI from './constants/abis/streamer.json' with { type: 'json' };
38
38
  import factoryABI from './constants/abis/factory.json' with { type: 'json' };
39
- import factoryEywaABI from './constants/abis/factory-eywa.json' with { type: 'json' };
40
39
  import factoryAdminABI from './constants/abis/factory-admin.json' with { type: 'json' };
41
40
  import cryptoFactoryABI from './constants/abis/factory-crypto.json' with { type: 'json' };
42
41
  import twocryptoFactoryABI from './constants/abis/factory-twocrypto-ng.json' with { type: 'json' };
@@ -114,21 +113,6 @@ export class Curve {
114
113
  this.constants.CRVUSD_FACTORY_POOLS_DATA = yield this._filterHiddenPools(this.constants.CRVUSD_FACTORY_POOLS_DATA);
115
114
  this._updateDecimalsAndGauges(this.constants.CRVUSD_FACTORY_POOLS_DATA);
116
115
  });
117
- this.fetchEywaFactoryPools = (...args_1) => __awaiter(this, [...args_1], void 0, function* (useApi = true) {
118
- if (!("eywa_factory" in this.constants.ALIASES))
119
- return;
120
- if (useApi) {
121
- this.constants.EYWA_FACTORY_POOLS_DATA = lowerCasePoolDataAddresses(yield getFactoryPoolsDataFromApi.call(this, "factory-eywa"));
122
- }
123
- else {
124
- if (this.isNoRPC) {
125
- throw new Error('RPC connection is required');
126
- }
127
- this.constants.EYWA_FACTORY_POOLS_DATA = lowerCasePoolDataAddresses(yield getFactoryPoolData.call(this, 0, undefined, this.constants.ALIASES.eywa_factory));
128
- }
129
- this.constants.EYWA_FACTORY_POOLS_DATA = yield this._filterHiddenPools(this.constants.EYWA_FACTORY_POOLS_DATA);
130
- this._updateDecimalsAndGauges(this.constants.EYWA_FACTORY_POOLS_DATA);
131
- });
132
116
  this.fetchCryptoFactoryPools = (...args_1) => __awaiter(this, [...args_1], void 0, function* (useApi = true) {
133
117
  if (!("crypto_factory" in this.constants.ALIASES))
134
118
  return;
@@ -299,7 +283,6 @@ export class Curve {
299
283
  this.getMainPoolList = () => Object.keys(this.constants.POOLS_DATA);
300
284
  this.getFactoryPoolList = () => Object.keys(this.constants.FACTORY_POOLS_DATA);
301
285
  this.getCrvusdFactoryPoolList = () => Object.keys(this.constants.CRVUSD_FACTORY_POOLS_DATA);
302
- this.getEywaFactoryPoolList = () => Object.keys(this.constants.EYWA_FACTORY_POOLS_DATA);
303
286
  this.getCryptoFactoryPoolList = () => Object.keys(this.constants.CRYPTO_FACTORY_POOLS_DATA);
304
287
  this.getStableNgFactoryPoolList = () => Object.keys(this.constants.STABLE_NG_FACTORY_POOLS_DATA);
305
288
  this.getTworyptoFactoryPoolList = () => Object.keys(this.constants.TWOCRYPTO_FACTORY_POOLS_DATA);
@@ -309,14 +292,13 @@ export class Curve {
309
292
  ...this.getMainPoolList(),
310
293
  ...this.getFactoryPoolList(),
311
294
  ...this.getCrvusdFactoryPoolList(),
312
- ...this.getEywaFactoryPoolList(),
313
295
  ...this.getCryptoFactoryPoolList(),
314
296
  ...this.getStableNgFactoryPoolList(),
315
297
  ...this.getTworyptoFactoryPoolList(),
316
298
  ...this.getTricryptoFactoryPoolList(),
317
299
  ];
318
300
  };
319
- this.getPoolsData = () => (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.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.STABLE_NG_FACTORY_POOLS_DATA), this.constants.TWOCRYPTO_FACTORY_POOLS_DATA), this.constants.TRICRYPTO_FACTORY_POOLS_DATA), this.constants.LLAMMAS_DATA));
301
+ this.getPoolsData = () => (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, this.constants.POOLS_DATA), this.constants.FACTORY_POOLS_DATA), this.constants.CRVUSD_FACTORY_POOLS_DATA), this.constants.CRYPTO_FACTORY_POOLS_DATA), this.constants.STABLE_NG_FACTORY_POOLS_DATA), this.constants.TWOCRYPTO_FACTORY_POOLS_DATA), this.constants.TRICRYPTO_FACTORY_POOLS_DATA), this.constants.LLAMMAS_DATA));
320
302
  this.getGaugeImplementation = (factoryType) => this.constants.FACTORY_GAUGE_IMPLEMENTATIONS[factoryType] || this.constants.ZERO_ADDRESS;
321
303
  this.getNetworkConstants = () => {
322
304
  return this.constants;
@@ -352,7 +334,6 @@ export class Curve {
352
334
  CRYPTO_FACTORY_CONSTANTS: {},
353
335
  FACTORY_POOLS_DATA: {},
354
336
  CRVUSD_FACTORY_POOLS_DATA: {},
355
- EYWA_FACTORY_POOLS_DATA: {},
356
337
  CRYPTO_FACTORY_POOLS_DATA: {},
357
338
  TWOCRYPTO_FACTORY_POOLS_DATA: {},
358
339
  TRICRYPTO_FACTORY_POOLS_DATA: {},
@@ -390,7 +371,6 @@ export class Curve {
390
371
  CRYPTO_FACTORY_CONSTANTS: {},
391
372
  FACTORY_POOLS_DATA: {},
392
373
  CRVUSD_FACTORY_POOLS_DATA: {},
393
- EYWA_FACTORY_POOLS_DATA: {},
394
374
  CRYPTO_FACTORY_POOLS_DATA: {},
395
375
  TWOCRYPTO_FACTORY_POOLS_DATA: {},
396
376
  TRICRYPTO_FACTORY_POOLS_DATA: {},
@@ -610,7 +590,6 @@ export class Curve {
610
590
  }
611
591
  }
612
592
  this.setContract(this.constants.ALIASES.crvusd_factory, factoryABI);
613
- this.setContract(this.constants.ALIASES.eywa_factory, factoryEywaABI);
614
593
  this.setContract(this.constants.ALIASES.crypto_factory, cryptoFactoryABI);
615
594
  this.setContract(this.constants.ALIASES.stable_ng_factory, stableNgFactoryABI);
616
595
  this.setContract(this.constants.ALIASES.twocrypto_factory, twocryptoFactoryABI);
@@ -15,7 +15,7 @@ const uncached_getPoolsFromApi = (network, poolType, isLiteChain) => __awaiter(v
15
15
  return (_a = yield fetchData(url)) !== null && _a !== void 0 ? _a : { poolData: [], tvl: 0, tvlAll: 0 };
16
16
  });
17
17
  const getPoolTypes = (isLiteChain) => isLiteChain ? ["factory-twocrypto", "factory-tricrypto", "factory-stable-ng"] :
18
- ["main", "crypto", "factory", "factory-crvusd", "factory-eywa", "factory-crypto", "factory-twocrypto", "factory-tricrypto", "factory-stable-ng"];
18
+ ["main", "crypto", "factory", "factory-crvusd", "factory-crypto", "factory-twocrypto", "factory-tricrypto", "factory-stable-ng"];
19
19
  export const uncached_getAllPoolsFromApi = (network, isLiteChain) => __awaiter(void 0, void 0, void 0, function* () {
20
20
  return Object.fromEntries(yield Promise.all(getPoolTypes(isLiteChain).map((poolType) => __awaiter(void 0, void 0, void 0, function* () {
21
21
  const data = yield uncached_getPoolsFromApi(network, poolType, isLiteChain);
@@ -84,8 +84,7 @@ function getFactoryIdsAndSwapAddresses() {
84
84
  if (calls.length === 0)
85
85
  return [[], []];
86
86
  const prefix = factoryAddress === this.constants.ALIASES.factory ? "factory-v2-" :
87
- factoryAddress === this.constants.ALIASES.crvusd_factory ? "factory-crvusd-" :
88
- factoryAddress === this.constants.ALIASES.stable_ng_factory ? "factory-stable-ng-" : "factory-eywa-";
87
+ factoryAddress === this.constants.ALIASES.crvusd_factory ? "factory-crvusd-" : "factory-stable-ng-";
89
88
  let factories = (yield this.multicallProvider.all(calls)).map((addr, i) => ({ id: prefix + (fromIdx + i), address: addr.toLowerCase() }));
90
89
  const swapAddresses = Object.values(this.constants.POOLS_DATA).map((pool) => pool.swap_address.toLowerCase());
91
90
  const blacklist = (_a = BLACK_LIST[this.chainId]) !== null && _a !== void 0 ? _a : [];
package/lib/index.d.ts CHANGED
@@ -99,10 +99,6 @@ export declare const createCurve: () => {
99
99
  fetchPools: (useApi?: boolean) => Promise<void>;
100
100
  getPoolList: () => string[];
101
101
  };
102
- EYWAFactory: {
103
- fetchPools: (useApi?: boolean) => Promise<void>;
104
- getPoolList: () => string[];
105
- };
106
102
  stableNgFactory: {
107
103
  fetchPools: (useApi?: boolean) => Promise<void>;
108
104
  fetchNewPools: () => Promise<string[]>;
@@ -433,10 +429,6 @@ declare const _default: {
433
429
  fetchPools: (useApi?: boolean) => Promise<void>;
434
430
  getPoolList: () => string[];
435
431
  };
436
- EYWAFactory: {
437
- fetchPools: (useApi?: boolean) => Promise<void>;
438
- getPoolList: () => string[];
439
- };
440
432
  stableNgFactory: {
441
433
  fetchPools: (useApi?: boolean) => Promise<void>;
442
434
  fetchNewPools: () => Promise<string[]>;
package/lib/index.js CHANGED
@@ -91,10 +91,6 @@ export const createCurve = () => {
91
91
  fetchPools: _curve.fetchCrvusdFactoryPools.bind(_curve),
92
92
  getPoolList: _curve.getCrvusdFactoryPoolList.bind(_curve),
93
93
  },
94
- EYWAFactory: {
95
- fetchPools: _curve.fetchEywaFactoryPools.bind(_curve),
96
- getPoolList: _curve.getEywaFactoryPoolList.bind(_curve),
97
- },
98
94
  stableNgFactory: {
99
95
  fetchPools: _curve.fetchStableNgFactoryPools.bind(_curve),
100
96
  fetchNewPools: _curve.fetchNewStableNgFactoryPools.bind(_curve),
@@ -6,7 +6,7 @@ export interface IDict<T> {
6
6
  }
7
7
  export type INetworkName = string;
8
8
  export type IChainId = number;
9
- export type IFactoryPoolType = "factory" | "factory-crvusd" | "factory-eywa" | "factory-crypto" | "factory-twocrypto" | "factory-tricrypto" | "factory-stable-ng";
9
+ export type IFactoryPoolType = "factory" | "factory-crvusd" | "factory-crypto" | "factory-twocrypto" | "factory-tricrypto" | "factory-stable-ng";
10
10
  export type IPoolType = "main" | "crypto" | IFactoryPoolType;
11
11
  export type ISwapType = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
12
12
  export type REFERENCE_ASSET = 'USD' | 'EUR' | 'BTC' | 'ETH' | 'LINK' | 'CRYPTO' | 'OTHER';
@@ -80,7 +80,6 @@ export interface INetworkConstants {
80
80
  CRYPTO_FACTORY_POOLS_DATA: IDict<IPoolData>;
81
81
  TWOCRYPTO_FACTORY_POOLS_DATA: IDict<IPoolData>;
82
82
  TRICRYPTO_FACTORY_POOLS_DATA: IDict<IPoolData>;
83
- EYWA_FACTORY_POOLS_DATA: IDict<IPoolData>;
84
83
  BASE_POOLS: IDict<number>;
85
84
  LLAMMAS_DATA: IDict<IPoolData>;
86
85
  COINS: IDict<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curvefi/api",
3
- "version": "2.68.39",
3
+ "version": "2.68.40",
4
4
  "description": "JavaScript library for curve.finance",
5
5
  "main": "lib/index.js",
6
6
  "author": "Macket",