@curvefi/api 2.54.4 → 2.54.5

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.
@@ -0,0 +1,68 @@
1
+ export declare const tricryptoDeployImplementations: {
2
+ 1: {
3
+ amm_native_transfers_disabled: string;
4
+ amm_native_transfers_enabled: string;
5
+ implementationIdx: number;
6
+ };
7
+ 10: {
8
+ amm_native_transfers_disabled: string;
9
+ amm_native_transfers_enabled: string;
10
+ implementationIdx: number;
11
+ };
12
+ 56: {
13
+ amm_native_transfers_disabled: string;
14
+ amm_native_transfers_enabled: string;
15
+ implementationIdx: number;
16
+ };
17
+ 100: {
18
+ amm_native_transfers_disabled: string;
19
+ amm_native_transfers_enabled: string;
20
+ implementationIdx: number;
21
+ };
22
+ 137: {
23
+ amm_native_transfers_disabled: string;
24
+ amm_native_transfers_enabled: string;
25
+ implementationIdx: number;
26
+ };
27
+ 250: {
28
+ amm_native_transfers_disabled: string;
29
+ amm_native_transfers_enabled: string;
30
+ implementationIdx: number;
31
+ };
32
+ 324: {
33
+ implementationIdx: number;
34
+ };
35
+ 1284: {
36
+ implementationIdx: number;
37
+ };
38
+ 2222: {
39
+ amm_native_transfers_disabled: string;
40
+ amm_native_transfers_enabled: string;
41
+ implementationIdx: number;
42
+ };
43
+ 8453: {
44
+ amm_native_transfers_disabled: string;
45
+ amm_native_transfers_enabled: string;
46
+ implementationIdx: number;
47
+ };
48
+ 42161: {
49
+ amm_native_transfers_disabled: string;
50
+ amm_native_transfers_enabled: string;
51
+ implementationIdx: number;
52
+ };
53
+ 42220: {
54
+ amm_native_transfers_disabled: string;
55
+ amm_native_transfers_enabled: string;
56
+ implementationIdx: number;
57
+ };
58
+ 43114: {
59
+ amm_native_transfers_disabled: string;
60
+ amm_native_transfers_enabled: string;
61
+ implementationIdx: number;
62
+ };
63
+ 1313161554: {
64
+ amm_native_transfers_disabled: string;
65
+ amm_native_transfers_enabled: string;
66
+ implementationIdx: number;
67
+ };
68
+ };
@@ -0,0 +1,68 @@
1
+ export var tricryptoDeployImplementations = {
2
+ 1: {
3
+ amm_native_transfers_disabled: '0x0000000000000000000000000000000000000000',
4
+ amm_native_transfers_enabled: '0x66442B0C5260B92cAa9c234ECf2408CBf6b19a6f',
5
+ implementationIdx: 0,
6
+ },
7
+ 10: {
8
+ amm_native_transfers_disabled: '0x0458ea5F4CD00E873264Be2031Ceb8f9d9b3116c',
9
+ amm_native_transfers_enabled: '0x1FE2a06c8bd81AE65FD1C5036451890b37976369',
10
+ implementationIdx: 1,
11
+ },
12
+ 56: {
13
+ amm_native_transfers_disabled: '0x6A8cbed756804B16E05E741eDaBd5cB544AE21bf',
14
+ amm_native_transfers_enabled: '0xBff334F8D5912AC5c4f2c590A2396d1C5d990123',
15
+ implementationIdx: 1,
16
+ },
17
+ 100: {
18
+ amm_native_transfers_disabled: '0x3f445D38E820c010a7A6E33c5F80cBEBE6930f61',
19
+ amm_native_transfers_enabled: '0xa54f3c1dfa5f7dbf2564829d14b3b74a65d26ae2',
20
+ implementationIdx: 1,
21
+ },
22
+ 137: {
23
+ amm_native_transfers_disabled: '0x3d6cB2F6DcF47CDd9C13E4e3beAe9af041d8796a',
24
+ amm_native_transfers_enabled: '0x0c59d36b23f809f8b6C7cb4c8C590a0AC103baEf',
25
+ implementationIdx: 1,
26
+ },
27
+ 250: {
28
+ amm_native_transfers_disabled: '0xd125E7a0cEddF89c6473412d85835450897be6Dc',
29
+ amm_native_transfers_enabled: '0x76303e4fDcA0AbF28aB3ee42Ce086E6503431F1D',
30
+ implementationIdx: 1,
31
+ },
32
+ 324: {
33
+ implementationIdx: 0,
34
+ },
35
+ 1284: {
36
+ implementationIdx: 0,
37
+ },
38
+ 2222: {
39
+ amm_native_transfers_disabled: '0x0c59d36b23f809f8b6C7cb4c8C590a0AC103baEf',
40
+ amm_native_transfers_enabled: '0xFAbC421e3368D158d802684A217a83c083c94CeB',
41
+ implementationIdx: 1,
42
+ },
43
+ 8453: {
44
+ amm_native_transfers_disabled: '0x0c59d36b23f809f8b6C7cb4c8C590a0AC103baEf',
45
+ amm_native_transfers_enabled: '0xa274c88e09fDF1798a7517096557e6c1bEa1f65A',
46
+ implementationIdx: 1,
47
+ },
48
+ 42161: {
49
+ amm_native_transfers_disabled: '0x1f7C86AffE5bCF7a1D74a8c8E2ef9E03BF31c1BD',
50
+ amm_native_transfers_enabled: '0xd7E72f3615aa65b92A4DBdC211E296a35512988B',
51
+ implementationIdx: 1,
52
+ },
53
+ 42220: {
54
+ amm_native_transfers_disabled: '0x0c59d36b23f809f8b6C7cb4c8C590a0AC103baEf',
55
+ amm_native_transfers_enabled: '0xFAbC421e3368D158d802684A217a83c083c94CeB',
56
+ implementationIdx: 1,
57
+ },
58
+ 43114: {
59
+ amm_native_transfers_disabled: '0x0c59d36b23f809f8b6C7cb4c8C590a0AC103baEf',
60
+ amm_native_transfers_enabled: '0xFAbC421e3368D158d802684A217a83c083c94CeB',
61
+ implementationIdx: 1,
62
+ },
63
+ 1313161554: {
64
+ amm_native_transfers_disabled: '0x3d6cB2F6DcF47CDd9C13E4e3beAe9af041d8796a',
65
+ amm_native_transfers_enabled: '0x0c59d36b23f809f8b6C7cb4c8C590a0AC103baEf',
66
+ implementationIdx: 1,
67
+ },
68
+ };
package/lib/curve.js CHANGED
@@ -530,8 +530,8 @@ var Curve = /** @class */ (function () {
530
530
  return __generator(this, function (_k) {
531
531
  switch (_k.label) {
532
532
  case 0:
533
- if (![1, 56, 8453, 42161].includes(this.chainId))
534
- return [2 /*return*/]; // Ethereum, Arbitrum
533
+ if ([324, 1284].includes(this.chainId))
534
+ return [2 /*return*/];
535
535
  if (!useApi) return [3 /*break*/, 2];
536
536
  _a = this.constants;
537
537
  _b = lowerCasePoolDataAddresses;
@@ -673,8 +673,8 @@ var Curve = /** @class */ (function () {
673
673
  return __generator(this, function (_b) {
674
674
  switch (_b.label) {
675
675
  case 0:
676
- if (![1, 56, 8453, 42161].includes(this.chainId))
677
- return [2 /*return*/, []]; // Ethereum, Arbitrum
676
+ if ([324, 1284].includes(this.chainId))
677
+ return [2 /*return*/, []];
678
678
  currentPoolIds = Object.keys(this.constants.TRICRYPTO_FACTORY_POOLS_DATA);
679
679
  lastPoolIdx = currentPoolIds.length === 0 ? -1 : Number(currentPoolIds[currentPoolIds.length - 1].split("-")[2]);
680
680
  _a = lowerCasePoolDataAddresses;
@@ -743,8 +743,8 @@ var Curve = /** @class */ (function () {
743
743
  return __generator(this, function (_b) {
744
744
  switch (_b.label) {
745
745
  case 0:
746
- if (![1, 56, 8453, 42161].includes(this.chainId))
747
- return [2 /*return*/, '']; // Ethereum, Arbitrum
746
+ if ([324, 1284].includes(this.chainId))
747
+ return [2 /*return*/, ''];
748
748
  _a = lowerCasePoolDataAddresses;
749
749
  return [4 /*yield*/, getTricryptoFactoryPoolData.call(this, 0, poolAddress)];
750
750
  case 1:
@@ -60,6 +60,7 @@ import { getPool } from "../pools/index.js";
60
60
  import { parseUnits, BN, mulBy1_3, getPoolIdBySwapAddress, DIGas, smartNumber } from '../utils.js';
61
61
  import CurveLpTokenV5ABI from "../constants/abis/curve_lp_token_v5.json" assert { type: 'json' };
62
62
  import Plain2ETHOracleABIABI from "../constants/abis/factory-v2/Plain2ETHOracle.json" assert { type: 'json' };
63
+ import { tricryptoDeployImplementations } from "../constants/tricryptoDeployImplementations.js";
63
64
  // ------- STABLE PLAIN POOLS -------
64
65
  var _deployStablePlainPool = function (name, symbol, coins, A, fee, // %
65
66
  assetType, // 0 = USD, 1 = ETH, 2 = BTC, 3 = Other
@@ -636,7 +637,7 @@ initialPrices, estimateGas) { return __awaiter(void 0, void 0, void 0, function
636
637
  _emaTime = parseUnits(Math.floor(emaTime / Math.log(2)), 0);
637
638
  _initialPrices = [parseUnits(initialPrices[0]), parseUnits(initialPrices[1])];
638
639
  contract = curve.contracts[curve.constants.ALIASES.tricrypto_factory].contract;
639
- return [4 /*yield*/, contract.deploy_pool.estimateGas(name, symbol, coins, curve.constants.ZERO_ADDRESS, 0, _A, _gamma, _midFee, _outFee, _feeGamma, _allowedExtraProfit, _adjustmentStep, _emaTime, _initialPrices, curve.constantOptions)];
640
+ return [4 /*yield*/, contract.deploy_pool.estimateGas(name, symbol, coins, curve.constants.ZERO_ADDRESS, tricryptoDeployImplementations[curve.chainId].implementationIdx, _A, _gamma, _midFee, _outFee, _feeGamma, _allowedExtraProfit, _adjustmentStep, _emaTime, _initialPrices, curve.constantOptions)];
640
641
  case 1:
641
642
  gas = _a.sent();
642
643
  if (estimateGas)
@@ -645,7 +646,7 @@ initialPrices, estimateGas) { return __awaiter(void 0, void 0, void 0, function
645
646
  return [4 /*yield*/, curve.updateFeeData()];
646
647
  case 2:
647
648
  _a.sent();
648
- return [4 /*yield*/, contract.deploy_pool(name, symbol, coins, curve.constants.NATIVE_TOKEN.wrappedAddress, 0, _A, _gamma, _midFee, _outFee, _feeGamma, _allowedExtraProfit, _adjustmentStep, _emaTime, _initialPrices, __assign(__assign({}, curve.options), { gasLimit: gasLimit }))];
649
+ return [4 /*yield*/, contract.deploy_pool(name, symbol, coins, curve.constants.NATIVE_TOKEN.wrappedAddress, tricryptoDeployImplementations[curve.chainId].implementationIdx, _A, _gamma, _midFee, _outFee, _feeGamma, _allowedExtraProfit, _adjustmentStep, _emaTime, _initialPrices, __assign(__assign({}, curve.options), { gasLimit: gasLimit }))];
649
650
  case 3: return [2 /*return*/, _a.sent()];
650
651
  }
651
652
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curvefi/api",
3
- "version": "2.54.4",
3
+ "version": "2.54.5",
4
4
  "description": "JavaScript library for curve.fi",
5
5
  "main": "lib/index.js",
6
6
  "author": "Macket",