@curvefi/api 2.57.5 → 2.58.1
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/constants/aliases.d.ts +1 -0
- package/lib/constants/aliases.js +20 -0
- package/lib/constants/coins/xlayer.d.ts +6 -0
- package/lib/constants/coins/xlayer.js +9 -0
- package/lib/constants/pools/index.d.ts +2 -1
- package/lib/constants/pools/index.js +2 -1
- package/lib/constants/pools/xlayer.d.ts +2 -0
- package/lib/constants/pools/xlayer.js +2 -0
- package/lib/constants/tricryptoDeployImplementations.d.ts +5 -0
- package/lib/constants/tricryptoDeployImplementations.js +5 -0
- package/lib/constants/volumeNetworks.js +1 -1
- package/lib/curve.d.ts +2 -0
- package/lib/curve.js +25 -6
- package/lib/factory/constants.d.ts +5 -0
- package/lib/factory/constants.js +10 -0
- package/lib/interfaces.d.ts +2 -2
- package/lib/utils.d.ts +2 -2
- package/lib/utils.js +4 -4
- package/package.json +2 -2
|
@@ -13,3 +13,4 @@ export declare const ALIASES_ZKSYNC: import("../interfaces.js").IDict<string>;
|
|
|
13
13
|
export declare const ALIASES_BASE: import("../interfaces.js").IDict<string>;
|
|
14
14
|
export declare const ALIASES_BSC: import("../interfaces.js").IDict<string>;
|
|
15
15
|
export declare const ALIASES_FRAXTAL: import("../interfaces.js").IDict<string>;
|
|
16
|
+
export declare const ALIASES_XLAYER: import("../interfaces.js").IDict<string>;
|
package/lib/constants/aliases.js
CHANGED
|
@@ -308,6 +308,26 @@ export var ALIASES_FRAXTAL = lowerCaseValues({
|
|
|
308
308
|
"stable_ng_factory": '0xd2002373543Ce3527023C75e7518C274A51ce712',
|
|
309
309
|
"factory_admin": '0x0000000000000000000000000000000000000000',
|
|
310
310
|
});
|
|
311
|
+
export var ALIASES_XLAYER = lowerCaseValues({
|
|
312
|
+
"crv": "0x0000000000000000000000000000000000000000",
|
|
313
|
+
"gauge_factory": "0xeF672bD94913CB6f1d2812a6e18c1fFdEd8eFf5c",
|
|
314
|
+
"voting_escrow": "0x0000000000000000000000000000000000000000",
|
|
315
|
+
"fee_distributor": "0x0000000000000000000000000000000000000000",
|
|
316
|
+
"gauge_controller": "0x0000000000000000000000000000000000000000",
|
|
317
|
+
"address_provider": "0x0000000000000000000000000000000000000000",
|
|
318
|
+
"router": "0x4f37A9d177470499A2dD084621020b023fcffc1F",
|
|
319
|
+
"deposit_and_stake": "0x5552b631e2aD801fAa129Aacf4B701071cC9D1f7",
|
|
320
|
+
"stable_calc": "0x0fE38dCC905eC14F6099a83Ac5C93BF2601300CF",
|
|
321
|
+
"crypto_calc": '0x69522fb5337663d3B4dFB0030b881c1A750Adb4f',
|
|
322
|
+
"factory": '0x0000000000000000000000000000000000000000',
|
|
323
|
+
"crvusd_factory": '0x0000000000000000000000000000000000000000',
|
|
324
|
+
"eywa_factory": '0x0000000000000000000000000000000000000000',
|
|
325
|
+
"crypto_factory": '0x0000000000000000000000000000000000000000',
|
|
326
|
+
"twocrypto_factory": '0x0c59d36b23f809f8b6C7cb4c8C590a0AC103baEf',
|
|
327
|
+
"tricrypto_factory": '0xd3B17f862956464ae4403cCF829CE69199856e1e',
|
|
328
|
+
"stable_ng_factory": '0x5eeE3091f747E60a045a2E715a4c71e600e31F6E',
|
|
329
|
+
"factory_admin": '0x0000000000000000000000000000000000000000',
|
|
330
|
+
});
|
|
311
331
|
var registry_exchange_deprecated = {
|
|
312
332
|
'1': '0x99a58482bd75cbab83b27ec03ca68ff489b5788f',
|
|
313
333
|
'10': '0x22d710931f01c1681ca1570ff016ed42eb7b7c2a',
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IDict } from "../../interfaces.js";
|
|
2
|
+
export declare const COINS_XLAYER: IDict<string>;
|
|
3
|
+
export declare const cTokensXLayer: never[];
|
|
4
|
+
export declare const yTokensXLayer: never[];
|
|
5
|
+
export declare const ycTokensXLayer: never[];
|
|
6
|
+
export declare const aTokensXLayer: never[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { lowerCaseValues } from "../utils.js";
|
|
2
|
+
export var COINS_XLAYER = lowerCaseValues({
|
|
3
|
+
crv: '0x3d5320821bfca19fb0b5428f2c79d63bd5246f89',
|
|
4
|
+
okb: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
|
|
5
|
+
});
|
|
6
|
+
export var cTokensXLayer = []; //.map((a) => a.toLowerCase());
|
|
7
|
+
export var yTokensXLayer = []; //.map((a) => a.toLowerCase());
|
|
8
|
+
export var ycTokensXLayer = []; //.map((a) => a.toLowerCase());
|
|
9
|
+
export var aTokensXLayer = []; //.map((a) => a.toLowerCase());
|
|
@@ -14,4 +14,5 @@ import { POOLS_DATA_ZKSYNC } from "./zksync.js";
|
|
|
14
14
|
import { POOLS_DATA_BASE } from "./base.js";
|
|
15
15
|
import { POOLS_DATA_BSC } from "./bsc.js";
|
|
16
16
|
import { POOLS_DATA_FRAXTAL } from "./fraxtal.js";
|
|
17
|
-
|
|
17
|
+
import { POOLS_DATA_XLAYER } from "./xlayer.js";
|
|
18
|
+
export { POOLS_DATA_ETHEREUM, LLAMMAS_DATA_ETHEREUM, POOLS_DATA_POLYGON, POOLS_DATA_FANTOM, POOLS_DATA_AVALANCHE, POOLS_DATA_ARBITRUM, POOLS_DATA_OPTIMISM, POOLS_DATA_XDAI, POOLS_DATA_MOONBEAM, POOLS_DATA_AURORA, POOLS_DATA_KAVA, POOLS_DATA_CELO, POOLS_DATA_ZKSYNC, POOLS_DATA_BASE, POOLS_DATA_BSC, POOLS_DATA_FRAXTAL, POOLS_DATA_XLAYER, };
|
|
@@ -14,4 +14,5 @@ import { POOLS_DATA_ZKSYNC } from "./zksync.js";
|
|
|
14
14
|
import { POOLS_DATA_BASE } from "./base.js";
|
|
15
15
|
import { POOLS_DATA_BSC } from "./bsc.js";
|
|
16
16
|
import { POOLS_DATA_FRAXTAL } from "./fraxtal.js";
|
|
17
|
-
|
|
17
|
+
import { POOLS_DATA_XLAYER } from "./xlayer.js";
|
|
18
|
+
export { POOLS_DATA_ETHEREUM, LLAMMAS_DATA_ETHEREUM, POOLS_DATA_POLYGON, POOLS_DATA_FANTOM, POOLS_DATA_AVALANCHE, POOLS_DATA_ARBITRUM, POOLS_DATA_OPTIMISM, POOLS_DATA_XDAI, POOLS_DATA_MOONBEAM, POOLS_DATA_AURORA, POOLS_DATA_KAVA, POOLS_DATA_CELO, POOLS_DATA_ZKSYNC, POOLS_DATA_BASE, POOLS_DATA_BSC, POOLS_DATA_FRAXTAL, POOLS_DATA_XLAYER, };
|
|
@@ -24,6 +24,11 @@ export declare const tricryptoDeployImplementations: {
|
|
|
24
24
|
amm_native_transfers_enabled: string;
|
|
25
25
|
implementationIdx: number;
|
|
26
26
|
};
|
|
27
|
+
196: {
|
|
28
|
+
amm_native_transfers_disabled: string;
|
|
29
|
+
amm_native_transfers_enabled: string;
|
|
30
|
+
implementationIdx: number;
|
|
31
|
+
};
|
|
27
32
|
250: {
|
|
28
33
|
amm_native_transfers_disabled: string;
|
|
29
34
|
amm_native_transfers_enabled: string;
|
|
@@ -24,6 +24,11 @@ export var tricryptoDeployImplementations = {
|
|
|
24
24
|
amm_native_transfers_enabled: '0x0c59d36b23f809f8b6C7cb4c8C590a0AC103baEf'.toLowerCase(),
|
|
25
25
|
implementationIdx: 1,
|
|
26
26
|
},
|
|
27
|
+
196: {
|
|
28
|
+
amm_native_transfers_disabled: '0x64379C265Fc6595065D7d835AAaa731c0584dB80'.toLowerCase(),
|
|
29
|
+
amm_native_transfers_enabled: '0x0C9D8c7e486e822C29488Ff51BFf0167B4650953'.toLowerCase(),
|
|
30
|
+
implementationIdx: 1,
|
|
31
|
+
},
|
|
27
32
|
250: {
|
|
28
33
|
amm_native_transfers_disabled: '0xd125E7a0cEddF89c6473412d85835450897be6Dc'.toLowerCase(),
|
|
29
34
|
amm_native_transfers_enabled: '0x76303e4fDcA0AbF28aB3ee42Ce086E6503431F1D'.toLowerCase(),
|
package/lib/curve.d.ts
CHANGED
|
@@ -79,6 +79,8 @@ declare class Curve implements ICurve {
|
|
|
79
79
|
maxPriorityFeePerGas?: number;
|
|
80
80
|
chainId?: number;
|
|
81
81
|
}): Promise<void>;
|
|
82
|
+
initContract: (address: string, abi: any, provider: ethers.BrowserProvider | ethers.JsonRpcProvider | ethers.Signer) => ethers.Contract;
|
|
83
|
+
initMulticallContract: (address: string, abi: any) => MulticallContract;
|
|
82
84
|
setContract(address: string, abi: any): void;
|
|
83
85
|
_filterHiddenPools(pools: IDict<IPoolData>): Promise<IDict<IPoolData>>;
|
|
84
86
|
_updateDecimalsAndGauges(pools: IDict<IPoolData>): void;
|
package/lib/curve.js
CHANGED
|
@@ -90,8 +90,8 @@ import gasOracleABI from './constants/abis/gas_oracle_optimism.json' assert { ty
|
|
|
90
90
|
import gasOracleBlobABI from './constants/abis/gas_oracle_optimism_blob.json' assert { type: 'json' };
|
|
91
91
|
import votingProposalABI from './constants/abis/voting_proposal.json' assert { type: 'json' };
|
|
92
92
|
import circulatingSupplyABI from './constants/abis/circulating_supply.json' assert { type: 'json' };
|
|
93
|
-
import { POOLS_DATA_ETHEREUM, LLAMMAS_DATA_ETHEREUM, POOLS_DATA_POLYGON, POOLS_DATA_FANTOM, POOLS_DATA_AVALANCHE, POOLS_DATA_ARBITRUM, POOLS_DATA_OPTIMISM, POOLS_DATA_XDAI, POOLS_DATA_MOONBEAM, POOLS_DATA_AURORA, POOLS_DATA_KAVA, POOLS_DATA_CELO, POOLS_DATA_ZKSYNC, POOLS_DATA_BASE, POOLS_DATA_BSC, POOLS_DATA_FRAXTAL, } from './constants/pools/index.js';
|
|
94
|
-
import { ALIASES_ETHEREUM, ALIASES_OPTIMISM, ALIASES_POLYGON, ALIASES_FANTOM, ALIASES_AVALANCHE, ALIASES_ARBITRUM, ALIASES_XDAI, ALIASES_MOONBEAM, ALIASES_AURORA, ALIASES_KAVA, ALIASES_CELO, ALIASES_ZKSYNC, ALIASES_BASE, ALIASES_BSC, ALIASES_FRAXTAL, } from "./constants/aliases.js";
|
|
93
|
+
import { POOLS_DATA_ETHEREUM, LLAMMAS_DATA_ETHEREUM, POOLS_DATA_POLYGON, POOLS_DATA_FANTOM, POOLS_DATA_AVALANCHE, POOLS_DATA_ARBITRUM, POOLS_DATA_OPTIMISM, POOLS_DATA_XDAI, POOLS_DATA_MOONBEAM, POOLS_DATA_AURORA, POOLS_DATA_KAVA, POOLS_DATA_CELO, POOLS_DATA_ZKSYNC, POOLS_DATA_BASE, POOLS_DATA_BSC, POOLS_DATA_FRAXTAL, POOLS_DATA_XLAYER, } from './constants/pools/index.js';
|
|
94
|
+
import { ALIASES_ETHEREUM, ALIASES_OPTIMISM, ALIASES_POLYGON, ALIASES_FANTOM, ALIASES_AVALANCHE, ALIASES_ARBITRUM, ALIASES_XDAI, ALIASES_MOONBEAM, ALIASES_AURORA, ALIASES_KAVA, ALIASES_CELO, ALIASES_ZKSYNC, ALIASES_BASE, ALIASES_BSC, ALIASES_FRAXTAL, ALIASES_XLAYER, } from "./constants/aliases.js";
|
|
95
95
|
import { COINS_ETHEREUM, cTokensEthereum, yTokensEthereum, ycTokensEthereum, aTokensEthereum } from "./constants/coins/ethereum.js";
|
|
96
96
|
import { COINS_OPTIMISM, cTokensOptimism, yTokensOptimism, ycTokensOptimism, aTokensOptimism } from "./constants/coins/optimism.js";
|
|
97
97
|
import { COINS_POLYGON, cTokensPolygon, yTokensPolygon, ycTokensPolygon, aTokensPolygon } from "./constants/coins/polygon.js";
|
|
@@ -107,11 +107,12 @@ import { COINS_ZKSYNC, cTokensZkSync, yTokensZkSync, ycTokensZkSync, aTokensZkSy
|
|
|
107
107
|
import { COINS_BASE, cTokensBase, yTokensBase, ycTokensBase, aTokensBase } from "./constants/coins/base.js";
|
|
108
108
|
import { COINS_BSC, cTokensBsc, yTokensBsc, ycTokensBsc, aTokensBsc } from "./constants/coins/bsc.js";
|
|
109
109
|
import { COINS_FRAXTAL, cTokensFraxtal, yTokensFraxtal, ycTokensFraxtal, aTokensFraxtal } from "./constants/coins/fraxtal.js";
|
|
110
|
+
import { COINS_XLAYER, cTokensXLayer, yTokensXLayer, ycTokensXLayer, aTokensXLayer } from "./constants/coins/xlayer.js";
|
|
110
111
|
import { lowerCasePoolDataAddresses, extractDecimals, extractGauges } from "./constants/utils.js";
|
|
111
112
|
import { _getAllGauges, _getHiddenPools } from "./external-api.js";
|
|
112
113
|
import { L2Networks } from "./constants/L2Networks.js";
|
|
113
114
|
import { getTwocryptoFactoryPoolData } from "./factory/factory-twocrypto.js";
|
|
114
|
-
import {
|
|
115
|
+
import { memoizedContract, memoizedMulticallContract } from "./utils.js";
|
|
115
116
|
var _killGauges = function (poolsData) { return __awaiter(void 0, void 0, void 0, function () {
|
|
116
117
|
var gaugeData, isKilled, gaugeStatuses, poolId;
|
|
117
118
|
return __generator(this, function (_a) {
|
|
@@ -169,6 +170,12 @@ export var NATIVE_TOKENS = {
|
|
|
169
170
|
address: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
170
171
|
wrappedAddress: '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270'.toLowerCase(),
|
|
171
172
|
},
|
|
173
|
+
196: {
|
|
174
|
+
symbol: 'OKB',
|
|
175
|
+
wrappedSymbol: 'WOKB',
|
|
176
|
+
address: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
|
|
177
|
+
wrappedAddress: '0xe538905cf8410324e03a5a23c1c177a474d59b2b'.toLowerCase(),
|
|
178
|
+
},
|
|
172
179
|
250: {
|
|
173
180
|
symbol: 'FTM',
|
|
174
181
|
wrappedSymbol: 'WFTM',
|
|
@@ -282,6 +289,16 @@ export var NETWORK_CONSTANTS = {
|
|
|
282
289
|
ycTokens: ycTokensPolygon,
|
|
283
290
|
aTokens: aTokensPolygon,
|
|
284
291
|
},
|
|
292
|
+
196: {
|
|
293
|
+
NAME: 'x-layer',
|
|
294
|
+
ALIASES: ALIASES_XLAYER,
|
|
295
|
+
POOLS_DATA: POOLS_DATA_XLAYER,
|
|
296
|
+
COINS: COINS_XLAYER,
|
|
297
|
+
cTokens: cTokensXLayer,
|
|
298
|
+
yTokens: yTokensXLayer,
|
|
299
|
+
ycTokens: ycTokensXLayer,
|
|
300
|
+
aTokens: aTokensXLayer,
|
|
301
|
+
},
|
|
285
302
|
250: {
|
|
286
303
|
NAME: 'fantom',
|
|
287
304
|
ALIASES: ALIASES_FANTOM,
|
|
@@ -386,6 +403,8 @@ export var NETWORK_CONSTANTS = {
|
|
|
386
403
|
var Curve = /** @class */ (function () {
|
|
387
404
|
function Curve() {
|
|
388
405
|
var _this = this;
|
|
406
|
+
this.initContract = memoizedContract();
|
|
407
|
+
this.initMulticallContract = memoizedMulticallContract();
|
|
389
408
|
this.fetchFactoryPools = function (useApi) {
|
|
390
409
|
if (useApi === void 0) { useApi = true; }
|
|
391
410
|
return __awaiter(_this, void 0, void 0, function () {
|
|
@@ -1093,7 +1112,7 @@ var Curve = /** @class */ (function () {
|
|
|
1093
1112
|
this.setContract(this.constants.ALIASES.crypto_calc, cryptoCalcZapABI);
|
|
1094
1113
|
this.setContract(this.constants.ALIASES.stable_calc, StableCalcZapABI);
|
|
1095
1114
|
this.setContract(this.constants.ALIASES.factory, factoryABI);
|
|
1096
|
-
if (!(this.chainId !== 1313161554 && this.chainId !== 252)) return [3 /*break*/, 19];
|
|
1115
|
+
if (!(this.chainId !== 1313161554 && this.chainId !== 252 && this.chainId !== 196)) return [3 /*break*/, 19];
|
|
1097
1116
|
factoryContract = this.contracts[this.constants.ALIASES.factory].contract;
|
|
1098
1117
|
_o = this.constants.ALIASES;
|
|
1099
1118
|
return [4 /*yield*/, factoryContract.admin(this.constantOptions)];
|
|
@@ -1185,10 +1204,10 @@ var Curve = /** @class */ (function () {
|
|
|
1185
1204
|
var proxyHandler = {
|
|
1186
1205
|
get: function (target, name) {
|
|
1187
1206
|
if (name === 'contract') {
|
|
1188
|
-
return initContract(target['address'], target['abi'], curveInstance.signer || curveInstance.provider);
|
|
1207
|
+
return curveInstance.initContract(target['address'], target['abi'], curveInstance.signer || curveInstance.provider);
|
|
1189
1208
|
}
|
|
1190
1209
|
else if (name === 'multicallContract') {
|
|
1191
|
-
return initMulticallContract(target['address'], target['abi']);
|
|
1210
|
+
return curveInstance.initMulticallContract(target['address'], target['abi']);
|
|
1192
1211
|
}
|
|
1193
1212
|
else {
|
|
1194
1213
|
return target[name];
|
|
@@ -13,6 +13,7 @@ export declare const implementationABIDictZkSync: IDict<any>;
|
|
|
13
13
|
export declare const implementationABIDictBase: IDict<any>;
|
|
14
14
|
export declare const implementationABIDictBsc: IDict<any>;
|
|
15
15
|
export declare const implementationABIDictFraxtal: IDict<any>;
|
|
16
|
+
export declare const implementationABIDictXLayer: IDict<any>;
|
|
16
17
|
export declare const basePoolIdZapDictEthereum: IDict<{
|
|
17
18
|
address: string;
|
|
18
19
|
ABI: any;
|
|
@@ -69,6 +70,10 @@ export declare const basePoolIdZapDictFraxtal: IDict<{
|
|
|
69
70
|
address: string;
|
|
70
71
|
ABI: any;
|
|
71
72
|
}>;
|
|
73
|
+
export declare const basePoolIdZapDictXLayer: IDict<{
|
|
74
|
+
address: string;
|
|
75
|
+
ABI: any;
|
|
76
|
+
}>;
|
|
72
77
|
export declare const stableNgBasePoolZap: {
|
|
73
78
|
ABI: any;
|
|
74
79
|
address: string;
|
package/lib/factory/constants.js
CHANGED
|
@@ -348,6 +348,10 @@ export var implementationABIDictFraxtal = lowerCaseKeys({
|
|
|
348
348
|
"0x1764ee18e8B3ccA4787249Ceb249356192594585": PlainStableSwapNGABI,
|
|
349
349
|
"0x5eeE3091f747E60a045a2E715a4c71e600e31F6E": MetaStableSwapNGABI,
|
|
350
350
|
});
|
|
351
|
+
export var implementationABIDictXLayer = lowerCaseKeys({
|
|
352
|
+
"0x87FE17697D0f14A222e8bEf386a0860eCffDD617": PlainStableSwapNGABI,
|
|
353
|
+
"0x1764ee18e8B3ccA4787249Ceb249356192594585": MetaStableSwapNGABI,
|
|
354
|
+
});
|
|
351
355
|
export var basePoolIdZapDictEthereum = {
|
|
352
356
|
'3pool': {
|
|
353
357
|
address: "0xA79828DF1850E8a3A3064576f380D90aECDD3359".toLowerCase(),
|
|
@@ -445,6 +449,7 @@ export var basePoolIdZapDictZkSync = {};
|
|
|
445
449
|
export var basePoolIdZapDictBase = {};
|
|
446
450
|
export var basePoolIdZapDictBsc = {};
|
|
447
451
|
export var basePoolIdZapDictFraxtal = {};
|
|
452
|
+
export var basePoolIdZapDictXLayer = {};
|
|
448
453
|
export var stableNgBasePoolZap = {
|
|
449
454
|
ABI: StableNgBasePoolZapABI,
|
|
450
455
|
address: '0xe07a16358aa878cbda2d49a88e5106871e0db307'.toLowerCase(),
|
|
@@ -475,6 +480,11 @@ export var FACTORY_CONSTANTS = {
|
|
|
475
480
|
basePoolIdZapDict: basePoolIdZapDictPolygon,
|
|
476
481
|
stableNgBasePoolZap: stableNgBasePoolZap,
|
|
477
482
|
},
|
|
483
|
+
196: {
|
|
484
|
+
implementationABIDict: implementationABIDictXLayer,
|
|
485
|
+
basePoolIdZapDict: basePoolIdZapDictXLayer,
|
|
486
|
+
stableNgBasePoolZap: stableNgBasePoolZap,
|
|
487
|
+
},
|
|
478
488
|
250: {
|
|
479
489
|
implementationABIDict: implementationABIDictFantom,
|
|
480
490
|
basePoolIdZapDict: basePoolIdZapDictFantom,
|
package/lib/interfaces.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { Contract as MulticallContract, Provider as MulticallProvider } from "et
|
|
|
3
3
|
export interface IDict<T> {
|
|
4
4
|
[index: string]: T;
|
|
5
5
|
}
|
|
6
|
-
export type INetworkName = "ethereum" | "bsc" | "optimism" | "xdai" | "polygon" | "fantom" | "fraxtal" | "zksync" | "moonbeam" | "kava" | "base" | "arbitrum" | "celo" | "avalanche" | "aurora";
|
|
7
|
-
export type IChainId = 1 | 10 | 56 | 100 | 137 | 250 | 252 | 324 | 1284 | 2222 | 8453 | 42161 | 42220 | 43114 | 1313161554;
|
|
6
|
+
export type INetworkName = "ethereum" | "bsc" | "optimism" | "xdai" | "polygon" | "x-layer" | "fantom" | "fraxtal" | "zksync" | "moonbeam" | "kava" | "base" | "arbitrum" | "celo" | "avalanche" | "aurora";
|
|
7
|
+
export type IChainId = 1 | 10 | 56 | 100 | 137 | 196 | 250 | 252 | 324 | 1284 | 2222 | 8453 | 42161 | 42220 | 43114 | 1313161554;
|
|
8
8
|
export type IFactoryPoolType = "factory" | "factory-crvusd" | "factory-eywa" | "factory-crypto" | "factory-twocrypto" | "factory-tricrypto" | "factory-stable-ng";
|
|
9
9
|
export type IPoolType = "main" | "crypto" | IFactoryPoolType;
|
|
10
10
|
export type ISwapType = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
package/lib/utils.d.ts
CHANGED
|
@@ -66,5 +66,5 @@ export declare const getPoolName: (name: string) => string;
|
|
|
66
66
|
export declare const isStableNgPool: (name: string) => boolean;
|
|
67
67
|
export declare const assetTypeNameHandler: (assetTypeName: string) => REFERENCE_ASSET;
|
|
68
68
|
export declare const getBasePools: () => Promise<IBasePoolShortItem[]>;
|
|
69
|
-
export declare const
|
|
70
|
-
export declare const
|
|
69
|
+
export declare const memoizedContract: () => (address: string, abi: any, provider: BrowserProvider | JsonRpcProvider | Signer) => Contract;
|
|
70
|
+
export declare const memoizedMulticallContract: () => (address: string, abi: any) => MulticallContract;
|
package/lib/utils.js
CHANGED
|
@@ -627,6 +627,7 @@ export var _getUsdRate = function (assetId) { return __awaiter(void 0, void 0, v
|
|
|
627
627
|
56: "binance-smart-chain",
|
|
628
628
|
100: 'xdai',
|
|
629
629
|
137: 'polygon-pos',
|
|
630
|
+
196: 'x-layer',
|
|
630
631
|
250: 'fantom',
|
|
631
632
|
252: 'fraxtal',
|
|
632
633
|
324: 'zksync',
|
|
@@ -644,6 +645,7 @@ export var _getUsdRate = function (assetId) { return __awaiter(void 0, void 0, v
|
|
|
644
645
|
56: 'binancecoin',
|
|
645
646
|
100: 'xdai',
|
|
646
647
|
137: 'matic-network',
|
|
648
|
+
196: 'x-layer',
|
|
647
649
|
250: 'fantom',
|
|
648
650
|
252: 'frax-ether',
|
|
649
651
|
324: 'ethereum',
|
|
@@ -1004,7 +1006,7 @@ export var getBasePools = function () { return __awaiter(void 0, void 0, void 0,
|
|
|
1004
1006
|
}
|
|
1005
1007
|
});
|
|
1006
1008
|
}); };
|
|
1007
|
-
var memoizedContract = function () {
|
|
1009
|
+
export var memoizedContract = function () {
|
|
1008
1010
|
var cache = {};
|
|
1009
1011
|
return function (address, abi, provider) {
|
|
1010
1012
|
if (address in cache) {
|
|
@@ -1017,7 +1019,7 @@ var memoizedContract = function () {
|
|
|
1017
1019
|
}
|
|
1018
1020
|
};
|
|
1019
1021
|
};
|
|
1020
|
-
var memoizedMulticallContract = function () {
|
|
1022
|
+
export var memoizedMulticallContract = function () {
|
|
1021
1023
|
var cache = {};
|
|
1022
1024
|
return function (address, abi) {
|
|
1023
1025
|
if (address in cache) {
|
|
@@ -1030,5 +1032,3 @@ var memoizedMulticallContract = function () {
|
|
|
1030
1032
|
}
|
|
1031
1033
|
};
|
|
1032
1034
|
};
|
|
1033
|
-
export var initContract = memoizedContract();
|
|
1034
|
-
export var initMulticallContract = memoizedMulticallContract();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@curvefi/api",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.58.1",
|
|
4
4
|
"description": "JavaScript library for curve.fi",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"author": "Macket",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"axios": "^0.21.1",
|
|
36
36
|
"bignumber.js": "^9.0.1",
|
|
37
|
-
"ethcall": "
|
|
37
|
+
"ethcall": "6.0.5",
|
|
38
38
|
"ethers": "^6.11.0",
|
|
39
39
|
"memoizee": "^0.4.15"
|
|
40
40
|
}
|