lynx-client 0.0.1-beta.3 → 0.0.1-beta.4
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/package.json +1 -1
- package/dist/cjs/index.js +0 -46
- package/dist/cjs/lib/addresses/lensAddresses.js +0 -29
- package/dist/cjs/lib/chains/chainConstants.js +0 -20
- package/dist/cjs/lib/chains/chainTypes.js +0 -23
- package/dist/cjs/lib/constants/contractEnums.js +0 -138
- package/dist/cjs/lib/constants/feeIds.js +0 -27
- package/dist/cjs/lib/constants/generalConstants.js +0 -4
- package/dist/cjs/lib/constants/groupIds.js +0 -27
- package/dist/cjs/lib/constants/pairIds.js +0 -91
- package/dist/cjs/lib/constants/scales.js +0 -19
- package/dist/cjs/lib/contractsIntegration/deployedContractsConnector.js +0 -22
- package/dist/cjs/lib/lynxSystem/chipsCalculationsUtils.js +0 -12
- package/dist/cjs/lib/lynxSystem/hashes.js +0 -8
- package/dist/cjs/lib/lynxSystem/leverageCalculationsUtils.js +0 -25
- package/dist/cjs/lib/lynxSystem/lynxScalesUtils.js +0 -20
- package/dist/cjs/lib/priceFeeds/pyth/pythFeedConstants.js +0 -63
- package/dist/cjs/lib/priceFeeds/pyth/pythFeedFunctions.js +0 -11
- package/dist/cjs/lib/typechain/common.js +0 -2
- package/dist/cjs/lib/typechain/contracts/Peripheral/Lens/IntentsVerifierLens.js +0 -2
- package/dist/cjs/lib/typechain/contracts/Peripheral/Lens/LexLens.js +0 -2
- package/dist/cjs/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.js +0 -2
- package/dist/cjs/lib/typechain/contracts/Peripheral/Lens/TriggersAndPortalLens.js +0 -2
- package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.js +0 -201
- package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.js +0 -2269
- package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.js +0 -1339
- package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.js +0 -253
- package/dist/cjs/lib/utils/addresses.js +0 -14
- package/dist/cjs/lib/utils/bignumbers.js +0 -35
- package/dist/cjs/lib/utils/cloning.js +0 -17
- package/dist/cjs/lib/utils/enumTypes.js +0 -2
- package/dist/cjs/lib/utils/ethersTypes.js +0 -51
- package/dist/cjs/lib/utils/types.js +0 -3
- package/dist/esm/index.d.ts +0 -31
- package/dist/esm/index.d.ts.map +0 -1
- package/dist/esm/index.js +0 -46
- package/dist/esm/lib/addresses/lensAddresses.d.ts +0 -27
- package/dist/esm/lib/addresses/lensAddresses.d.ts.map +0 -1
- package/dist/esm/lib/addresses/lensAddresses.js +0 -29
- package/dist/esm/lib/chains/chainConstants.d.ts +0 -18
- package/dist/esm/lib/chains/chainConstants.d.ts.map +0 -1
- package/dist/esm/lib/chains/chainConstants.js +0 -20
- package/dist/esm/lib/chains/chainTypes.d.ts +0 -10
- package/dist/esm/lib/chains/chainTypes.d.ts.map +0 -1
- package/dist/esm/lib/chains/chainTypes.js +0 -23
- package/dist/esm/lib/constants/contractEnums.d.ts +0 -148
- package/dist/esm/lib/constants/contractEnums.d.ts.map +0 -1
- package/dist/esm/lib/constants/contractEnums.js +0 -138
- package/dist/esm/lib/constants/feeIds.d.ts +0 -13
- package/dist/esm/lib/constants/feeIds.d.ts.map +0 -1
- package/dist/esm/lib/constants/feeIds.js +0 -27
- package/dist/esm/lib/constants/generalConstants.d.ts +0 -2
- package/dist/esm/lib/constants/generalConstants.d.ts.map +0 -1
- package/dist/esm/lib/constants/generalConstants.js +0 -4
- package/dist/esm/lib/constants/groupIds.d.ts +0 -15
- package/dist/esm/lib/constants/groupIds.d.ts.map +0 -1
- package/dist/esm/lib/constants/groupIds.js +0 -27
- package/dist/esm/lib/constants/pairIds.d.ts +0 -40
- package/dist/esm/lib/constants/pairIds.d.ts.map +0 -1
- package/dist/esm/lib/constants/pairIds.js +0 -91
- package/dist/esm/lib/constants/scales.d.ts +0 -15
- package/dist/esm/lib/constants/scales.d.ts.map +0 -1
- package/dist/esm/lib/constants/scales.js +0 -19
- package/dist/esm/lib/contractsIntegration/deployedContractsConnector.d.ts +0 -10
- package/dist/esm/lib/contractsIntegration/deployedContractsConnector.d.ts.map +0 -1
- package/dist/esm/lib/contractsIntegration/deployedContractsConnector.js +0 -22
- package/dist/esm/lib/lynxSystem/chipsCalculationsUtils.d.ts +0 -3
- package/dist/esm/lib/lynxSystem/chipsCalculationsUtils.d.ts.map +0 -1
- package/dist/esm/lib/lynxSystem/chipsCalculationsUtils.js +0 -12
- package/dist/esm/lib/lynxSystem/hashes.d.ts +0 -2
- package/dist/esm/lib/lynxSystem/hashes.d.ts.map +0 -1
- package/dist/esm/lib/lynxSystem/hashes.js +0 -8
- package/dist/esm/lib/lynxSystem/leverageCalculationsUtils.d.ts +0 -6
- package/dist/esm/lib/lynxSystem/leverageCalculationsUtils.d.ts.map +0 -1
- package/dist/esm/lib/lynxSystem/leverageCalculationsUtils.js +0 -25
- package/dist/esm/lib/lynxSystem/lynxScalesUtils.d.ts +0 -5
- package/dist/esm/lib/lynxSystem/lynxScalesUtils.d.ts.map +0 -1
- package/dist/esm/lib/lynxSystem/lynxScalesUtils.js +0 -20
- package/dist/esm/lib/priceFeeds/pyth/pythFeedConstants.d.ts +0 -5
- package/dist/esm/lib/priceFeeds/pyth/pythFeedConstants.d.ts.map +0 -1
- package/dist/esm/lib/priceFeeds/pyth/pythFeedConstants.js +0 -63
- package/dist/esm/lib/priceFeeds/pyth/pythFeedFunctions.d.ts +0 -7
- package/dist/esm/lib/priceFeeds/pyth/pythFeedFunctions.d.ts.map +0 -1
- package/dist/esm/lib/priceFeeds/pyth/pythFeedFunctions.js +0 -11
- package/dist/esm/lib/typechain/common.d.ts +0 -51
- package/dist/esm/lib/typechain/common.d.ts.map +0 -1
- package/dist/esm/lib/typechain/common.js +0 -2
- package/dist/esm/lib/typechain/contracts/Peripheral/Lens/IntentsVerifierLens.d.ts +0 -102
- package/dist/esm/lib/typechain/contracts/Peripheral/Lens/IntentsVerifierLens.d.ts.map +0 -1
- package/dist/esm/lib/typechain/contracts/Peripheral/Lens/IntentsVerifierLens.js +0 -2
- package/dist/esm/lib/typechain/contracts/Peripheral/Lens/LexLens.d.ts +0 -740
- package/dist/esm/lib/typechain/contracts/Peripheral/Lens/LexLens.d.ts.map +0 -1
- package/dist/esm/lib/typechain/contracts/Peripheral/Lens/LexLens.js +0 -2
- package/dist/esm/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts +0 -390
- package/dist/esm/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts.map +0 -1
- package/dist/esm/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.js +0 -2
- package/dist/esm/lib/typechain/contracts/Peripheral/Lens/TriggersAndPortalLens.d.ts +0 -152
- package/dist/esm/lib/typechain/contracts/Peripheral/Lens/TriggersAndPortalLens.d.ts.map +0 -1
- package/dist/esm/lib/typechain/contracts/Peripheral/Lens/TriggersAndPortalLens.js +0 -2
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.d.ts +0 -146
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.d.ts.map +0 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.js +0 -201
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts +0 -1747
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts.map +0 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.js +0 -2269
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts +0 -1042
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts.map +0 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.js +0 -1339
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts +0 -187
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts.map +0 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.js +0 -253
- package/dist/esm/lib/utils/addresses.d.ts +0 -4
- package/dist/esm/lib/utils/addresses.d.ts.map +0 -1
- package/dist/esm/lib/utils/addresses.js +0 -14
- package/dist/esm/lib/utils/bignumbers.d.ts +0 -6
- package/dist/esm/lib/utils/bignumbers.d.ts.map +0 -1
- package/dist/esm/lib/utils/bignumbers.js +0 -35
- package/dist/esm/lib/utils/cloning.d.ts +0 -6
- package/dist/esm/lib/utils/cloning.d.ts.map +0 -1
- package/dist/esm/lib/utils/cloning.js +0 -17
- package/dist/esm/lib/utils/enumTypes.d.ts +0 -2
- package/dist/esm/lib/utils/enumTypes.d.ts.map +0 -1
- package/dist/esm/lib/utils/enumTypes.js +0 -2
- package/dist/esm/lib/utils/ethersTypes.d.ts +0 -14
- package/dist/esm/lib/utils/ethersTypes.d.ts.map +0 -1
- package/dist/esm/lib/utils/ethersTypes.js +0 -51
- package/dist/esm/lib/utils/types.d.ts +0 -7
- package/dist/esm/lib/utils/types.d.ts.map +0 -1
- package/dist/esm/lib/utils/types.js +0 -3
- package/dist/types/index.d.ts +0 -31
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/lib/addresses/lensAddresses.d.ts +0 -27
- package/dist/types/lib/addresses/lensAddresses.d.ts.map +0 -1
- package/dist/types/lib/chains/chainConstants.d.ts +0 -18
- package/dist/types/lib/chains/chainConstants.d.ts.map +0 -1
- package/dist/types/lib/chains/chainTypes.d.ts +0 -10
- package/dist/types/lib/chains/chainTypes.d.ts.map +0 -1
- package/dist/types/lib/constants/contractEnums.d.ts +0 -148
- package/dist/types/lib/constants/contractEnums.d.ts.map +0 -1
- package/dist/types/lib/constants/feeIds.d.ts +0 -13
- package/dist/types/lib/constants/feeIds.d.ts.map +0 -1
- package/dist/types/lib/constants/generalConstants.d.ts +0 -2
- package/dist/types/lib/constants/generalConstants.d.ts.map +0 -1
- package/dist/types/lib/constants/groupIds.d.ts +0 -15
- package/dist/types/lib/constants/groupIds.d.ts.map +0 -1
- package/dist/types/lib/constants/pairIds.d.ts +0 -40
- package/dist/types/lib/constants/pairIds.d.ts.map +0 -1
- package/dist/types/lib/constants/scales.d.ts +0 -15
- package/dist/types/lib/constants/scales.d.ts.map +0 -1
- package/dist/types/lib/contractsIntegration/deployedContractsConnector.d.ts +0 -10
- package/dist/types/lib/contractsIntegration/deployedContractsConnector.d.ts.map +0 -1
- package/dist/types/lib/lynxSystem/chipsCalculationsUtils.d.ts +0 -3
- package/dist/types/lib/lynxSystem/chipsCalculationsUtils.d.ts.map +0 -1
- package/dist/types/lib/lynxSystem/hashes.d.ts +0 -2
- package/dist/types/lib/lynxSystem/hashes.d.ts.map +0 -1
- package/dist/types/lib/lynxSystem/leverageCalculationsUtils.d.ts +0 -6
- package/dist/types/lib/lynxSystem/leverageCalculationsUtils.d.ts.map +0 -1
- package/dist/types/lib/lynxSystem/lynxScalesUtils.d.ts +0 -5
- package/dist/types/lib/lynxSystem/lynxScalesUtils.d.ts.map +0 -1
- package/dist/types/lib/priceFeeds/pyth/pythFeedConstants.d.ts +0 -5
- package/dist/types/lib/priceFeeds/pyth/pythFeedConstants.d.ts.map +0 -1
- package/dist/types/lib/priceFeeds/pyth/pythFeedFunctions.d.ts +0 -7
- package/dist/types/lib/priceFeeds/pyth/pythFeedFunctions.d.ts.map +0 -1
- package/dist/types/lib/typechain/common.d.ts +0 -51
- package/dist/types/lib/typechain/common.d.ts.map +0 -1
- package/dist/types/lib/typechain/contracts/Peripheral/Lens/IntentsVerifierLens.d.ts +0 -102
- package/dist/types/lib/typechain/contracts/Peripheral/Lens/IntentsVerifierLens.d.ts.map +0 -1
- package/dist/types/lib/typechain/contracts/Peripheral/Lens/LexLens.d.ts +0 -740
- package/dist/types/lib/typechain/contracts/Peripheral/Lens/LexLens.d.ts.map +0 -1
- package/dist/types/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts +0 -390
- package/dist/types/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts.map +0 -1
- package/dist/types/lib/typechain/contracts/Peripheral/Lens/TriggersAndPortalLens.d.ts +0 -152
- package/dist/types/lib/typechain/contracts/Peripheral/Lens/TriggersAndPortalLens.d.ts.map +0 -1
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.d.ts +0 -146
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.d.ts.map +0 -1
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts +0 -1747
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts.map +0 -1
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts +0 -1042
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts.map +0 -1
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts +0 -187
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts.map +0 -1
- package/dist/types/lib/utils/addresses.d.ts +0 -4
- package/dist/types/lib/utils/addresses.d.ts.map +0 -1
- package/dist/types/lib/utils/bignumbers.d.ts +0 -6
- package/dist/types/lib/utils/bignumbers.d.ts.map +0 -1
- package/dist/types/lib/utils/cloning.d.ts +0 -6
- package/dist/types/lib/utils/cloning.d.ts.map +0 -1
- package/dist/types/lib/utils/enumTypes.d.ts +0 -2
- package/dist/types/lib/utils/enumTypes.d.ts.map +0 -1
- package/dist/types/lib/utils/ethersTypes.d.ts +0 -14
- package/dist/types/lib/utils/ethersTypes.d.ts.map +0 -1
- package/dist/types/lib/utils/types.d.ts +0 -7
- package/dist/types/lib/utils/types.d.ts.map +0 -1
package/package.json
CHANGED
package/dist/cjs/index.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./lib/chains/chainConstants"), exports);
|
|
18
|
-
__exportStar(require("./lib/chains/chainTypes"), exports);
|
|
19
|
-
__exportStar(require("./lib/utils/addresses"), exports);
|
|
20
|
-
__exportStar(require("./lib/utils/bignumbers"), exports);
|
|
21
|
-
__exportStar(require("./lib/lynxSystem/chipsCalculationsUtils"), exports);
|
|
22
|
-
__exportStar(require("./lib/lynxSystem/leverageCalculationsUtils"), exports);
|
|
23
|
-
__exportStar(require("./lib/utils/cloning"), exports);
|
|
24
|
-
__exportStar(require("./lib/utils/enumTypes"), exports);
|
|
25
|
-
__exportStar(require("./lib/utils/ethersTypes"), exports);
|
|
26
|
-
__exportStar(require("./lib/lynxSystem/hashes"), exports);
|
|
27
|
-
__exportStar(require("./lib/lynxSystem/lynxScalesUtils"), exports);
|
|
28
|
-
__exportStar(require("./lib/utils/types"), exports);
|
|
29
|
-
__exportStar(require("./lib/constants/contractEnums"), exports);
|
|
30
|
-
__exportStar(require("./lib/constants/generalConstants"), exports);
|
|
31
|
-
__exportStar(require("./lib/constants/scales"), exports);
|
|
32
|
-
__exportStar(require("./lib/constants/pairIds"), exports);
|
|
33
|
-
__exportStar(require("./lib/constants/groupIds"), exports);
|
|
34
|
-
__exportStar(require("./lib/constants/feeIds"), exports);
|
|
35
|
-
__exportStar(require("./lib/priceFeeds/pyth/pythFeedConstants"), exports);
|
|
36
|
-
__exportStar(require("./lib/priceFeeds/pyth/pythFeedFunctions"), exports);
|
|
37
|
-
__exportStar(require("./lib/addresses/lensAddresses"), exports);
|
|
38
|
-
__exportStar(require("./lib/contractsIntegration/deployedContractsConnector"), exports);
|
|
39
|
-
__exportStar(require("./lib/typechain/contracts/Peripheral/Lens/IntentsVerifierLens"), exports);
|
|
40
|
-
__exportStar(require("./lib/typechain/contracts/Peripheral/Lens/TriggersAndPortalLens"), exports);
|
|
41
|
-
__exportStar(require("./lib/typechain/contracts/Peripheral/Lens/LexLens"), exports);
|
|
42
|
-
__exportStar(require("./lib/typechain/contracts/Peripheral/Lens/TradingFloorLens"), exports);
|
|
43
|
-
__exportStar(require("./lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory"), exports);
|
|
44
|
-
__exportStar(require("./lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory"), exports);
|
|
45
|
-
__exportStar(require("./lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory"), exports);
|
|
46
|
-
__exportStar(require("./lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory"), exports);
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LensAddresses = void 0;
|
|
4
|
-
exports.LensAddresses = {
|
|
5
|
-
boba: {
|
|
6
|
-
lexLens: "0xCcFaDF4E72d5b2D382555E0eb72a1BF6F7f0EF7F",
|
|
7
|
-
tradingFloorLensLens: "0xed9D263917921cb5f0B9a59c5083beA4075F33e7",
|
|
8
|
-
intentsVerifierLens: "0x8F33670B7a076793D178D340AD70Cc097DD03739",
|
|
9
|
-
triggersAndPortalLens: "0xA03312361D07dfAe0C517a441C69BFA9E84e38bf",
|
|
10
|
-
},
|
|
11
|
-
sonic: {
|
|
12
|
-
lexLens: "0xBcb1D4ACbc844ba5FC0aA411b98aebD4A508B65F",
|
|
13
|
-
tradingFloorLensLens: "0xa5802951D972372f1385e9Ac83df738b3323d0A8",
|
|
14
|
-
intentsVerifierLens: "0xDBe9130AAe593Ec73a838ce286fa84c193bceFA1",
|
|
15
|
-
triggersAndPortalLens: "0xaA96df0a4F01212169c2347dc23D5AEb89924839",
|
|
16
|
-
},
|
|
17
|
-
fantom: {
|
|
18
|
-
lexLens: "0xB5A5041654391a720953D346367D3A3BE9c3d47B",
|
|
19
|
-
tradingFloorLensLens: "0x30377D42736Bf4b40A67C18e5dFC7f45496e8569",
|
|
20
|
-
intentsVerifierLens: "0xD9E77b2A3E9B1a21aC256802bB86Cba3e21627E7",
|
|
21
|
-
triggersAndPortalLens: "0x9544C73C97BD292a1F09ef671A5f8CcDf9Ff5429",
|
|
22
|
-
},
|
|
23
|
-
flare: {
|
|
24
|
-
lexLens: "0x812Ea46a0618f923ae473eb239a89A8169b34B85",
|
|
25
|
-
tradingFloorLensLens: "0x13d878F3C3f32400A727662af7dfAdBc8b389637",
|
|
26
|
-
intentsVerifierLens: "0x33576dFbA7Ed5E3F8F744132D6885cE106178161",
|
|
27
|
-
triggersAndPortalLens: "0x625D49B0258BB8277516C07494910d420FA31B06",
|
|
28
|
-
},
|
|
29
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CHAIN_ID_ZIRCUIT = exports.CHAIN_ID_LINEA = exports.CHAIN_ID_CELO = exports.CHAIN_ID_ARBITRUM_ONE = exports.CHAIN_ID_MODE = exports.CHAIN_ID_BASE = exports.CHAIN_ID_MANTLE_MAINNET = exports.CHAIN_ID_GOAT = exports.CHAIN_ID_BOBA_MAINNET = exports.CHAIN_ID_FUSE = exports.CHAIN_ID_FANTOM_OPERA = exports.CHAIN_ID_SONIC_MAINNET = exports.CHAIN_ID_POLYGON = exports.CHAIN_ID_BSC = exports.CHAIN_ID_FLARE = exports.CHAIN_ID_OPTIMISM = exports.CHAIN_ID_ETHEREUM_MAINNET = void 0;
|
|
4
|
-
exports.CHAIN_ID_ETHEREUM_MAINNET = 1;
|
|
5
|
-
exports.CHAIN_ID_OPTIMISM = 10;
|
|
6
|
-
exports.CHAIN_ID_FLARE = 14;
|
|
7
|
-
exports.CHAIN_ID_BSC = 56;
|
|
8
|
-
exports.CHAIN_ID_POLYGON = 137;
|
|
9
|
-
exports.CHAIN_ID_SONIC_MAINNET = 146;
|
|
10
|
-
exports.CHAIN_ID_FANTOM_OPERA = 250;
|
|
11
|
-
exports.CHAIN_ID_FUSE = 122;
|
|
12
|
-
exports.CHAIN_ID_BOBA_MAINNET = 288;
|
|
13
|
-
exports.CHAIN_ID_GOAT = 2345;
|
|
14
|
-
exports.CHAIN_ID_MANTLE_MAINNET = 5000;
|
|
15
|
-
exports.CHAIN_ID_BASE = 8453;
|
|
16
|
-
exports.CHAIN_ID_MODE = 34443;
|
|
17
|
-
exports.CHAIN_ID_ARBITRUM_ONE = 42161;
|
|
18
|
-
exports.CHAIN_ID_CELO = 42220;
|
|
19
|
-
exports.CHAIN_ID_LINEA = 59144;
|
|
20
|
-
exports.CHAIN_ID_ZIRCUIT = 48900;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CHAIN_ID_TO_NAME = void 0;
|
|
4
|
-
const chainConstants_1 = require("./chainConstants");
|
|
5
|
-
exports.CHAIN_ID_TO_NAME = {
|
|
6
|
-
[chainConstants_1.CHAIN_ID_ETHEREUM_MAINNET]: "ethereum",
|
|
7
|
-
[chainConstants_1.CHAIN_ID_OPTIMISM]: "optimism",
|
|
8
|
-
[chainConstants_1.CHAIN_ID_BSC]: "bsc",
|
|
9
|
-
[chainConstants_1.CHAIN_ID_FANTOM_OPERA]: "fantom",
|
|
10
|
-
[chainConstants_1.CHAIN_ID_POLYGON]: "polygon",
|
|
11
|
-
[chainConstants_1.CHAIN_ID_BOBA_MAINNET]: "boba",
|
|
12
|
-
[chainConstants_1.CHAIN_ID_MANTLE_MAINNET]: "mantle",
|
|
13
|
-
[chainConstants_1.CHAIN_ID_LINEA]: "linea",
|
|
14
|
-
[chainConstants_1.CHAIN_ID_FUSE]: "fuse",
|
|
15
|
-
[chainConstants_1.CHAIN_ID_ARBITRUM_ONE]: "arbitrum",
|
|
16
|
-
[chainConstants_1.CHAIN_ID_CELO]: "celo",
|
|
17
|
-
[chainConstants_1.CHAIN_ID_MODE]: "mode",
|
|
18
|
-
[chainConstants_1.CHAIN_ID_ZIRCUIT]: "zircuit",
|
|
19
|
-
[chainConstants_1.CHAIN_ID_BASE]: "base",
|
|
20
|
-
[chainConstants_1.CHAIN_ID_GOAT]: "goat",
|
|
21
|
-
[chainConstants_1.CHAIN_ID_SONIC_MAINNET]: "sonic",
|
|
22
|
-
[chainConstants_1.CHAIN_ID_FLARE]: "flare",
|
|
23
|
-
};
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GeneralTokenDispenserPusherLevelEnums = exports.ChipsIntentsVerifierActionsEnums = exports.LiquidityIntentsVerifierActionsEnums = exports.TradeIntentsVerifierActionsEnums = exports.ChipSpenderRolesEnums = exports.ChipModeEnums = exports.TradersPortalActionEnums = exports.UpdatePositionFieldOrderTypeEnums = exports.LexPoolNumberEnums = exports.LexPoolAddressesEnums = exports.PoolAccountantNumberEnums = exports.PoolAccountantAddressesEnums = exports.AdminNumericParam = exports.PositionCloseTypeEnums = exports.PositionFieldEnums = exports.FeeTypeEnums = exports.LimitTriggerEnums = exports.CloseOrderTypeEnums = exports.OpenOrderTypeEnums = exports.PositionPhaseEnums = void 0;
|
|
4
|
-
// ****** Trading Floor ******
|
|
5
|
-
exports.PositionPhaseEnums = {
|
|
6
|
-
NONE: 0,
|
|
7
|
-
OPEN_MARKET: 1,
|
|
8
|
-
OPEN_LIMIT: 2,
|
|
9
|
-
OPENED: 3,
|
|
10
|
-
CLOSE_MARKET: 4,
|
|
11
|
-
CLOSED: 5,
|
|
12
|
-
};
|
|
13
|
-
exports.OpenOrderTypeEnums = {
|
|
14
|
-
NONE: 0,
|
|
15
|
-
MARKET: 1,
|
|
16
|
-
LIMIT: 2,
|
|
17
|
-
};
|
|
18
|
-
exports.CloseOrderTypeEnums = {
|
|
19
|
-
NONE: 0,
|
|
20
|
-
MARKET: 1,
|
|
21
|
-
};
|
|
22
|
-
exports.LimitTriggerEnums = {
|
|
23
|
-
NONE: 0,
|
|
24
|
-
TP: 1,
|
|
25
|
-
SL: 2,
|
|
26
|
-
LIQ: 3,
|
|
27
|
-
};
|
|
28
|
-
exports.FeeTypeEnums = {
|
|
29
|
-
NOTE: 0,
|
|
30
|
-
OPEN_FEE: 1,
|
|
31
|
-
CLOSE_FEE: 2,
|
|
32
|
-
TRIGGER_FEE: 3,
|
|
33
|
-
};
|
|
34
|
-
exports.PositionFieldEnums = {
|
|
35
|
-
NONE: 0n,
|
|
36
|
-
TP: 1n,
|
|
37
|
-
SL: 2n,
|
|
38
|
-
};
|
|
39
|
-
exports.PositionCloseTypeEnums = {
|
|
40
|
-
NONE: 0,
|
|
41
|
-
TP: 1,
|
|
42
|
-
SL: 2,
|
|
43
|
-
LIQ: 3,
|
|
44
|
-
MARKET: 4,
|
|
45
|
-
};
|
|
46
|
-
exports.AdminNumericParam = {
|
|
47
|
-
NONE: 0,
|
|
48
|
-
MAX_TRADES_PER_PAIR: 1,
|
|
49
|
-
MAX_SL_F: 2,
|
|
50
|
-
MAX_SANITY_PROFIT_F: 3,
|
|
51
|
-
};
|
|
52
|
-
// ****** Lex ******
|
|
53
|
-
exports.PoolAccountantAddressesEnums = {
|
|
54
|
-
none: 0,
|
|
55
|
-
irm: 1,
|
|
56
|
-
frm: 2,
|
|
57
|
-
incentivizer: 3,
|
|
58
|
-
};
|
|
59
|
-
exports.PoolAccountantNumberEnums = {
|
|
60
|
-
none: 1,
|
|
61
|
-
minOpenFee: 1,
|
|
62
|
-
lexPartF: 2,
|
|
63
|
-
maxGainF: 3,
|
|
64
|
-
liquidationThresholdF: 4,
|
|
65
|
-
liquidationFeeF: 5,
|
|
66
|
-
fundingRateMax: 6,
|
|
67
|
-
interestShareFactor: 7,
|
|
68
|
-
borrowRateMax: 8,
|
|
69
|
-
maxTotalBorrows: 9,
|
|
70
|
-
maxVirtualUtilization: 10,
|
|
71
|
-
};
|
|
72
|
-
exports.LexPoolAddressesEnums = {
|
|
73
|
-
none: 0,
|
|
74
|
-
poolAccountant: 1,
|
|
75
|
-
pnlRole: 2,
|
|
76
|
-
};
|
|
77
|
-
exports.LexPoolNumberEnums = {
|
|
78
|
-
none: 0,
|
|
79
|
-
maxExtraWithdrawalAmountF: 1,
|
|
80
|
-
epochsDelayDeposit: 2,
|
|
81
|
-
epochsDelayRedeem: 3,
|
|
82
|
-
epochDuration: 4,
|
|
83
|
-
minDepositAmount: 5,
|
|
84
|
-
};
|
|
85
|
-
// ****** Order Book ******
|
|
86
|
-
exports.UpdatePositionFieldOrderTypeEnums = {
|
|
87
|
-
NONE: 0,
|
|
88
|
-
UPDATE_TP: 1,
|
|
89
|
-
UPDATE_SL: 2,
|
|
90
|
-
UPDATE_TP_AND_SL: 3,
|
|
91
|
-
};
|
|
92
|
-
// ****** Traders Portal ******
|
|
93
|
-
exports.TradersPortalActionEnums = {
|
|
94
|
-
NONE: 0,
|
|
95
|
-
REQUEST_POSITION_OPEN: 1,
|
|
96
|
-
REQUEST_POSITION_MARKET_CLOSE: 2,
|
|
97
|
-
REQUEST_POSITION_SINGLE_FIELD_UPDATE: 3,
|
|
98
|
-
REQUEST_POSITION_DOUBLE_FIELD_UPDATE: 4,
|
|
99
|
-
};
|
|
100
|
-
// ****** Base Chip ******
|
|
101
|
-
exports.ChipModeEnums = {
|
|
102
|
-
NONE: 0,
|
|
103
|
-
LOCAL: 1,
|
|
104
|
-
REMOTE: 2,
|
|
105
|
-
HYBRID: 3,
|
|
106
|
-
};
|
|
107
|
-
exports.ChipSpenderRolesEnums = {
|
|
108
|
-
TradingFloor: "TradingFloor",
|
|
109
|
-
LexPool: "LexPool",
|
|
110
|
-
ChipsIntentsVerifier: "ChipsIntentsVerifier",
|
|
111
|
-
ChipsIntentsVerifierAdmin: "ChipsIntentsVerifierAdmin",
|
|
112
|
-
};
|
|
113
|
-
// ****** Trade Intents Verifier ******
|
|
114
|
-
exports.TradeIntentsVerifierActionsEnums = {
|
|
115
|
-
NONE: 0,
|
|
116
|
-
REQUEST_POSITION_OPEN: 1,
|
|
117
|
-
REQUEST_POSITION_MARKET_CLOSE: 2,
|
|
118
|
-
REQUEST_POSITION_SINGLE_FIELD_UPDATE: 3,
|
|
119
|
-
REQUEST_POSITION_DOUBLE_FIELD_UPDATE: 4,
|
|
120
|
-
DIRECT_UPDATE_PENDING_LIMIT_POSITION: 5,
|
|
121
|
-
DIRECT_CANCEL_PENDING_LIMIT_POSITION: 6,
|
|
122
|
-
};
|
|
123
|
-
// ****** Liquidity Intents Verifier ******
|
|
124
|
-
exports.LiquidityIntentsVerifierActionsEnums = {
|
|
125
|
-
NONE: 0,
|
|
126
|
-
REQUEST_EPOCH_DEPOSIT: 1,
|
|
127
|
-
REQUEST_EPOCH_REDEEM: 2,
|
|
128
|
-
};
|
|
129
|
-
// ****** Chips Intents Verifier ******
|
|
130
|
-
exports.ChipsIntentsVerifierActionsEnums = {
|
|
131
|
-
NONE: 0,
|
|
132
|
-
CHIP_OUT_LZ: 1,
|
|
133
|
-
};
|
|
134
|
-
// ****** General Token Dispenser ******
|
|
135
|
-
exports.GeneralTokenDispenserPusherLevelEnums = {
|
|
136
|
-
NONE: 0,
|
|
137
|
-
BASE: 1,
|
|
138
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FEE_CONFIGS_IDENTIFIERS = exports.FEE_CONFIGS_IDS = void 0;
|
|
4
|
-
exports.FEE_CONFIGS_IDS = {
|
|
5
|
-
basicCryptoPair: 1,
|
|
6
|
-
catCryptoPair: 2,
|
|
7
|
-
forexPair: 3,
|
|
8
|
-
catForexPair: 4,
|
|
9
|
-
};
|
|
10
|
-
exports.FEE_CONFIGS_IDENTIFIERS = {
|
|
11
|
-
CRYPTO_COMMON: {
|
|
12
|
-
name: "crypto",
|
|
13
|
-
id: exports.FEE_CONFIGS_IDS.basicCryptoPair,
|
|
14
|
-
},
|
|
15
|
-
CRYPTO_CAT: {
|
|
16
|
-
name: "crypto_cat",
|
|
17
|
-
id: exports.FEE_CONFIGS_IDS.catCryptoPair,
|
|
18
|
-
},
|
|
19
|
-
FOREX: {
|
|
20
|
-
name: "forex",
|
|
21
|
-
id: exports.FEE_CONFIGS_IDS.forexPair,
|
|
22
|
-
},
|
|
23
|
-
FOREX_CAT: {
|
|
24
|
-
name: "forex_cat",
|
|
25
|
-
id: exports.FEE_CONFIGS_IDS.catForexPair,
|
|
26
|
-
},
|
|
27
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GROUP_CONFIGS_IDENTIFIERS = exports.GROUP_CONFIGS_IDS = void 0;
|
|
4
|
-
exports.GROUP_CONFIGS_IDS = {
|
|
5
|
-
basicCryptoGroup: 1,
|
|
6
|
-
catCryptoGroup: 2,
|
|
7
|
-
forexGroup: 3,
|
|
8
|
-
catForexGroup: 4,
|
|
9
|
-
};
|
|
10
|
-
exports.GROUP_CONFIGS_IDENTIFIERS = {
|
|
11
|
-
crypto: {
|
|
12
|
-
name: "crypto",
|
|
13
|
-
id: exports.GROUP_CONFIGS_IDS.basicCryptoGroup,
|
|
14
|
-
},
|
|
15
|
-
crypto_cat: {
|
|
16
|
-
name: "crypto_cat",
|
|
17
|
-
id: exports.GROUP_CONFIGS_IDS.catCryptoGroup,
|
|
18
|
-
},
|
|
19
|
-
forex: {
|
|
20
|
-
name: "forex",
|
|
21
|
-
id: exports.GROUP_CONFIGS_IDS.forexGroup,
|
|
22
|
-
},
|
|
23
|
-
forex_cat: {
|
|
24
|
-
name: "forex_cat",
|
|
25
|
-
id: exports.GROUP_CONFIGS_IDS.catForexGroup,
|
|
26
|
-
},
|
|
27
|
-
};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PAIRS_FROM_TO = exports.PAIR_CONFIGS_IDENTIFIERS = exports.PAIR_CONFIGS_IDS = void 0;
|
|
4
|
-
exports.getPairConfigsIdentifierFromPairId = getPairConfigsIdentifierFromPairId;
|
|
5
|
-
const groupIds_1 = require("./groupIds");
|
|
6
|
-
exports.PAIR_CONFIGS_IDS = {
|
|
7
|
-
// NONE: 0,
|
|
8
|
-
// CRYPTO
|
|
9
|
-
BTC_USD: 1,
|
|
10
|
-
ETH_USD: 2,
|
|
11
|
-
BNB_USD: 3,
|
|
12
|
-
FTM_USD: 4,
|
|
13
|
-
SOL_USD: 5,
|
|
14
|
-
// CRYPTO -- Specific cases
|
|
15
|
-
FLR_USD: 1001,
|
|
16
|
-
// CRYPTO -- new version of previous pair
|
|
17
|
-
S_USD: 2004,
|
|
18
|
-
// FOREX
|
|
19
|
-
EUR_USD: 8001,
|
|
20
|
-
GBP_USD: 8002,
|
|
21
|
-
AUD_USD: 8003,
|
|
22
|
-
NZD_USD: 8004,
|
|
23
|
-
// REVERSE FOREX
|
|
24
|
-
USD_JPY: 8101,
|
|
25
|
-
USD_CHF: 8102,
|
|
26
|
-
// STOCKS
|
|
27
|
-
// TSLA_USD: 9001,
|
|
28
|
-
// CAT MODE -- CRYPTO
|
|
29
|
-
BTC_USD_CAT: 10001,
|
|
30
|
-
ETH_USD_CAT: 10002,
|
|
31
|
-
// CAT MODE -- FOREX
|
|
32
|
-
EUR_USD_CAT: 18001,
|
|
33
|
-
GBP_USD_CAT: 18002,
|
|
34
|
-
AUD_USD_CAT: 18003,
|
|
35
|
-
NZD_USD_CAT: 18004,
|
|
36
|
-
// CAT MODE -- REVERSE FOREX
|
|
37
|
-
USD_JPY_CAT: 18101,
|
|
38
|
-
USD_CHF_CAT: 18102,
|
|
39
|
-
};
|
|
40
|
-
exports.PAIR_CONFIGS_IDENTIFIERS = {
|
|
41
|
-
// CRYPTO
|
|
42
|
-
BTC_USD: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.basicCryptoGroup, exports.PAIR_CONFIGS_IDS.BTC_USD, "BTC", "USD"),
|
|
43
|
-
ETH_USD: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.basicCryptoGroup, exports.PAIR_CONFIGS_IDS.ETH_USD, "ETH", "USD"),
|
|
44
|
-
BNB_USD: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.basicCryptoGroup, exports.PAIR_CONFIGS_IDS.BNB_USD, "BNB", "USD"),
|
|
45
|
-
FTM_USD: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.basicCryptoGroup, exports.PAIR_CONFIGS_IDS.FTM_USD, "FTM", "USD"),
|
|
46
|
-
SOL_USD: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.basicCryptoGroup, exports.PAIR_CONFIGS_IDS.SOL_USD, "SOL", "USD"),
|
|
47
|
-
// CRYPTO -- Specific cases
|
|
48
|
-
FLR_USD: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.basicCryptoGroup, exports.PAIR_CONFIGS_IDS.FLR_USD, "FLR", "USD"),
|
|
49
|
-
// CRYPTO -- new version of previous pair
|
|
50
|
-
S_USD: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.basicCryptoGroup, exports.PAIR_CONFIGS_IDS.S_USD, "S", "USD"),
|
|
51
|
-
// FOREX
|
|
52
|
-
EUR_USD: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.forexGroup, exports.PAIR_CONFIGS_IDS.EUR_USD, "EUR", "USD"),
|
|
53
|
-
GBP_USD: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.forexGroup, exports.PAIR_CONFIGS_IDS.GBP_USD, "GBP", "USD"),
|
|
54
|
-
AUD_USD: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.forexGroup, exports.PAIR_CONFIGS_IDS.AUD_USD, "AUD", "USD"),
|
|
55
|
-
NZD_USD: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.forexGroup, exports.PAIR_CONFIGS_IDS.NZD_USD, "NZD", "USD"),
|
|
56
|
-
// Reverse Forex
|
|
57
|
-
USD_JPY: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.forexGroup, exports.PAIR_CONFIGS_IDS.USD_JPY, "USD", "JPY"),
|
|
58
|
-
USD_CHF: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.forexGroup, exports.PAIR_CONFIGS_IDS.USD_CHF, "USD", "CHF"),
|
|
59
|
-
// CRYPTO CAT MODE
|
|
60
|
-
BTC_USD_CAT: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.catCryptoGroup, exports.PAIR_CONFIGS_IDS.BTC_USD_CAT, "BTC", "USD"),
|
|
61
|
-
ETH_USD_CAT: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.catCryptoGroup, exports.PAIR_CONFIGS_IDS.ETH_USD_CAT, "ETH", "USD"),
|
|
62
|
-
// FOREX CAT MODE
|
|
63
|
-
// FOREX
|
|
64
|
-
EUR_USD_CAT: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.catForexGroup, exports.PAIR_CONFIGS_IDS.EUR_USD_CAT, "EUR", "USD"),
|
|
65
|
-
GBP_USD_CAT: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.catForexGroup, exports.PAIR_CONFIGS_IDS.GBP_USD_CAT, "GBP", "USD"),
|
|
66
|
-
AUD_USD_CAT: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.catForexGroup, exports.PAIR_CONFIGS_IDS.AUD_USD_CAT, "AUD", "USD"),
|
|
67
|
-
NZD_USD_CAT: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.catForexGroup, exports.PAIR_CONFIGS_IDS.NZD_USD_CAT, "NZD", "USD"),
|
|
68
|
-
// Reverse Cat Forex
|
|
69
|
-
USD_JPY_CAT: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.catForexGroup, exports.PAIR_CONFIGS_IDS.USD_JPY_CAT, "USD", "JPY"),
|
|
70
|
-
USD_CHF_CAT: buildCryptoPairConfigsIdentifier(groupIds_1.GROUP_CONFIGS_IDS.catForexGroup, exports.PAIR_CONFIGS_IDS.USD_CHF_CAT, "USD", "CHF"),
|
|
71
|
-
};
|
|
72
|
-
const PAIR_ID_TO_NAME = Object.fromEntries(Object.entries(exports.PAIR_CONFIGS_IDENTIFIERS).map(([pairName, value]) => [
|
|
73
|
-
value.id,
|
|
74
|
-
pairName,
|
|
75
|
-
]));
|
|
76
|
-
function buildCryptoPairConfigsIdentifier(groupId, id, from, to) {
|
|
77
|
-
return {
|
|
78
|
-
groupId,
|
|
79
|
-
id,
|
|
80
|
-
from,
|
|
81
|
-
to,
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
function getPairConfigsIdentifierFromPairId(pairId) {
|
|
85
|
-
const pairName = PAIR_ID_TO_NAME[pairId];
|
|
86
|
-
return exports.PAIR_CONFIGS_IDENTIFIERS[pairName];
|
|
87
|
-
}
|
|
88
|
-
exports.PAIRS_FROM_TO = Object.fromEntries(Object.entries(exports.PAIR_CONFIGS_IDENTIFIERS).map(([pairName, value]) => [
|
|
89
|
-
value.id,
|
|
90
|
-
{ from: value.from, to: value.to },
|
|
91
|
-
]));
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CONTRACT_VERSION_SCALE = exports.PROXY_VERSION_SCALE = exports.LEX_TOKEN_UNIT = exports.LEX_TOKEN_SCALE = exports.ACCURACY_IMPROVEMENT_UNIT = exports.ACCURACY_IMPROVEMENT_SCALE = exports.FRACTION_UNIT = exports.FRACTION_MULTIPLIER_SCALE = exports.LEVERAGE_UNIT = exports.LEVERAGE_MULTIPLIER_SCALE = exports.PRICES_SCALE = exports.PRECISION_UNIT = exports.PRECISION_SCALE = exports.CHIP_DECIMALS = void 0;
|
|
4
|
-
exports.CHIP_DECIMALS = 18;
|
|
5
|
-
exports.PRECISION_SCALE = 18n;
|
|
6
|
-
exports.PRECISION_UNIT = 10n ** exports.PRECISION_SCALE;
|
|
7
|
-
exports.PRICES_SCALE = 8;
|
|
8
|
-
// NOTE : multiplier, not power
|
|
9
|
-
exports.LEVERAGE_MULTIPLIER_SCALE = 100;
|
|
10
|
-
exports.LEVERAGE_UNIT = BigInt(exports.LEVERAGE_MULTIPLIER_SCALE);
|
|
11
|
-
// NOTE : multiplier, not power
|
|
12
|
-
exports.FRACTION_MULTIPLIER_SCALE = 100000n; // allows 5 decimal points
|
|
13
|
-
exports.FRACTION_UNIT = exports.FRACTION_MULTIPLIER_SCALE;
|
|
14
|
-
exports.ACCURACY_IMPROVEMENT_SCALE = 9n;
|
|
15
|
-
exports.ACCURACY_IMPROVEMENT_UNIT = 10n ** exports.ACCURACY_IMPROVEMENT_SCALE;
|
|
16
|
-
exports.LEX_TOKEN_SCALE = 18n;
|
|
17
|
-
exports.LEX_TOKEN_UNIT = 10n ** exports.LEX_TOKEN_SCALE;
|
|
18
|
-
exports.PROXY_VERSION_SCALE = 1000; // 1,000 = 1.00, 1,120 = 1.12
|
|
19
|
-
exports.CONTRACT_VERSION_SCALE = 1000; // 1,000 = 1.00, 1,120 = 1.12
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.connectToTradingFloorLens = connectToTradingFloorLens;
|
|
4
|
-
exports.connectToLeXLens = connectToLeXLens;
|
|
5
|
-
exports.connectToIntentsVerifierLens = connectToIntentsVerifierLens;
|
|
6
|
-
exports.connectToTriggersAndPortalLens = connectToTriggersAndPortalLens;
|
|
7
|
-
const TradingFloorLens__factory_1 = require("../typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory");
|
|
8
|
-
const LexLens__factory_1 = require("../typechain/factories/contracts/Peripheral/Lens/LexLens__factory");
|
|
9
|
-
const IntentsVerifierLens__factory_1 = require("../typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory");
|
|
10
|
-
const TriggersAndPortalLens__factory_1 = require("../typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory");
|
|
11
|
-
function connectToTradingFloorLens(provider, address) {
|
|
12
|
-
return TradingFloorLens__factory_1.TradingFloorLens__factory.connect(address, provider);
|
|
13
|
-
}
|
|
14
|
-
function connectToLeXLens(provider, address) {
|
|
15
|
-
return LexLens__factory_1.LexLens__factory.connect(address, provider);
|
|
16
|
-
}
|
|
17
|
-
function connectToIntentsVerifierLens(provider, address) {
|
|
18
|
-
return IntentsVerifierLens__factory_1.IntentsVerifierLens__factory.connect(address, provider);
|
|
19
|
-
}
|
|
20
|
-
function connectToTriggersAndPortalLens(provider, address) {
|
|
21
|
-
return TriggersAndPortalLens__factory_1.TriggersAndPortalLens__factory.connect(address, provider);
|
|
22
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.floatToChipsBn = floatToChipsBn;
|
|
4
|
-
exports.chipsBnToUnits = chipsBnToUnits;
|
|
5
|
-
const scales_1 = require("../constants/scales");
|
|
6
|
-
const bignumbers_1 = require("../utils/bignumbers");
|
|
7
|
-
function floatToChipsBn(value) {
|
|
8
|
-
return (0, bignumbers_1.floatToUnitsBn)(value, scales_1.CHIP_DECIMALS);
|
|
9
|
-
}
|
|
10
|
-
function chipsBnToUnits(chipAmount) {
|
|
11
|
-
return (0, bignumbers_1.unitsBnToFloat)(chipAmount, scales_1.CHIP_DECIMALS);
|
|
12
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.hashContractName = hashContractName;
|
|
4
|
-
const ethers_1 = require("ethers");
|
|
5
|
-
function hashContractName(contractName) {
|
|
6
|
-
const contractNameHash = ethers_1.ethers.solidityPackedKeccak256(["string"], [contractName]);
|
|
7
|
-
return contractNameHash;
|
|
8
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.scaledLeverageToUnits = scaledLeverageToUnits;
|
|
4
|
-
exports.floatUnitsToScaledLeverage = floatUnitsToScaledLeverage;
|
|
5
|
-
exports.calculateLeveragedPosition = calculateLeveragedPosition;
|
|
6
|
-
exports.calculateCollateralFromLeveragedPosition = calculateCollateralFromLeveragedPosition;
|
|
7
|
-
exports.calculateLeveragedPosition_leverageUnits = calculateLeveragedPosition_leverageUnits;
|
|
8
|
-
const scales_1 = require("../constants/scales");
|
|
9
|
-
function scaledLeverageToUnits(scaledLeverage) {
|
|
10
|
-
return scaledLeverage / scales_1.LEVERAGE_MULTIPLIER_SCALE;
|
|
11
|
-
}
|
|
12
|
-
function floatUnitsToScaledLeverage(leverageInUnits) {
|
|
13
|
-
return leverageInUnits * scales_1.LEVERAGE_MULTIPLIER_SCALE;
|
|
14
|
-
}
|
|
15
|
-
function calculateLeveragedPosition(collateral, leverage) {
|
|
16
|
-
return (collateral * BigInt(leverage)) / scales_1.LEVERAGE_UNIT;
|
|
17
|
-
}
|
|
18
|
-
function calculateCollateralFromLeveragedPosition(leveragedPosition, leverage) {
|
|
19
|
-
return (leveragedPosition * scales_1.LEVERAGE_UNIT) / leverage;
|
|
20
|
-
}
|
|
21
|
-
function calculateLeveragedPosition_leverageUnits(collateral, leverageInUnits) {
|
|
22
|
-
// TODO : Change after changing scale
|
|
23
|
-
const leverageBn = floatUnitsToScaledLeverage(leverageInUnits);
|
|
24
|
-
return calculateLeveragedPosition(collateral, leverageBn);
|
|
25
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.precisionBnToFloat = precisionBnToFloat;
|
|
4
|
-
exports.floatToPrecisionBn = floatToPrecisionBn;
|
|
5
|
-
exports.priceBnToFloat = priceBnToFloat;
|
|
6
|
-
exports.floatToPriceBn = floatToPriceBn;
|
|
7
|
-
const scales_1 = require("../constants/scales");
|
|
8
|
-
const bignumbers_1 = require("../utils/bignumbers");
|
|
9
|
-
function precisionBnToFloat(precisionBn) {
|
|
10
|
-
return (0, bignumbers_1.unitsBnToFloat)(precisionBn, Number(scales_1.PRECISION_SCALE));
|
|
11
|
-
}
|
|
12
|
-
function floatToPrecisionBn(value) {
|
|
13
|
-
return (0, bignumbers_1.floatToUnitsBn)(value, Number(scales_1.PRECISION_SCALE));
|
|
14
|
-
}
|
|
15
|
-
function priceBnToFloat(pricesBn) {
|
|
16
|
-
return (0, bignumbers_1.unitsBnToFloat)(pricesBn, scales_1.PRICES_SCALE);
|
|
17
|
-
}
|
|
18
|
-
function floatToPriceBn(priceUnits) {
|
|
19
|
-
return (0, bignumbers_1.floatToUnitsBn)(priceUnits, scales_1.PRICES_SCALE);
|
|
20
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PYTH_PAIRS_PRICE_FEED_IDS = exports.PYTH_PRICE_ENTRIES = exports.PYTH_PRICE_KEYS = void 0;
|
|
4
|
-
const pairIds_1 = require("../../constants/pairIds");
|
|
5
|
-
exports.PYTH_PRICE_KEYS = {
|
|
6
|
-
[pairIds_1.PAIR_CONFIGS_IDS.BTC_USD]: "Crypto.BTC/USD",
|
|
7
|
-
[pairIds_1.PAIR_CONFIGS_IDS.ETH_USD]: "Crypto.ETH/USD",
|
|
8
|
-
[pairIds_1.PAIR_CONFIGS_IDS.BNB_USD]: "Crypto.BNB/USD",
|
|
9
|
-
[pairIds_1.PAIR_CONFIGS_IDS.FTM_USD]: "Crypto.FTM/USD",
|
|
10
|
-
[pairIds_1.PAIR_CONFIGS_IDS.SOL_USD]: "Crypto.SOL/USD",
|
|
11
|
-
[pairIds_1.PAIR_CONFIGS_IDS.FLR_USD]: "Crypto.FLR/USD",
|
|
12
|
-
[pairIds_1.PAIR_CONFIGS_IDS.S_USD]: "Crypto.S/USD",
|
|
13
|
-
// Forex
|
|
14
|
-
[pairIds_1.PAIR_CONFIGS_IDS.EUR_USD]: "Fx.EUR/USD",
|
|
15
|
-
[pairIds_1.PAIR_CONFIGS_IDS.GBP_USD]: "Fx.GBP/USD",
|
|
16
|
-
[pairIds_1.PAIR_CONFIGS_IDS.AUD_USD]: "Fx.AUD/USD",
|
|
17
|
-
[pairIds_1.PAIR_CONFIGS_IDS.NZD_USD]: "Fx.NZD/USD",
|
|
18
|
-
// Reverse Forex
|
|
19
|
-
[pairIds_1.PAIR_CONFIGS_IDS.USD_JPY]: "Fx.USD/JPY",
|
|
20
|
-
[pairIds_1.PAIR_CONFIGS_IDS.USD_CHF]: "Fx.USD/CHF",
|
|
21
|
-
// CAT Mode
|
|
22
|
-
[pairIds_1.PAIR_CONFIGS_IDS.BTC_USD_CAT]: "Crypto.BTC/USD",
|
|
23
|
-
[pairIds_1.PAIR_CONFIGS_IDS.ETH_USD_CAT]: "Crypto.ETH/USD",
|
|
24
|
-
// CAT Mode Forex
|
|
25
|
-
[pairIds_1.PAIR_CONFIGS_IDS.EUR_USD_CAT]: "Fx.EUR/USD",
|
|
26
|
-
[pairIds_1.PAIR_CONFIGS_IDS.GBP_USD_CAT]: "Fx.GBP/USD",
|
|
27
|
-
[pairIds_1.PAIR_CONFIGS_IDS.AUD_USD_CAT]: "Fx.AUD/USD",
|
|
28
|
-
[pairIds_1.PAIR_CONFIGS_IDS.NZD_USD_CAT]: "Fx.NZD/USD",
|
|
29
|
-
[pairIds_1.PAIR_CONFIGS_IDS.USD_JPY_CAT]: "Fx.USD/JPY",
|
|
30
|
-
[pairIds_1.PAIR_CONFIGS_IDS.USD_CHF_CAT]: "Fx.USD/CHF",
|
|
31
|
-
};
|
|
32
|
-
exports.PYTH_PRICE_ENTRIES = Object.entries(exports.PYTH_PRICE_KEYS).map(([stringPariId, stringKey]) => [
|
|
33
|
-
parseFloat(stringPariId),
|
|
34
|
-
stringKey,
|
|
35
|
-
]);
|
|
36
|
-
// You can find the ids of prices at https://pyth.network/developers/price-feed-ids
|
|
37
|
-
exports.PYTH_PAIRS_PRICE_FEED_IDS = {
|
|
38
|
-
[pairIds_1.PAIR_CONFIGS_IDS.BTC_USD]: "0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43",
|
|
39
|
-
[pairIds_1.PAIR_CONFIGS_IDS.ETH_USD]: "0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace",
|
|
40
|
-
[pairIds_1.PAIR_CONFIGS_IDS.BNB_USD]: "0x2f95862b045670cd22bee3114c39763a4a08beeb663b145d283c31d7d1101c4f",
|
|
41
|
-
// [PAIR_CONFIGS_IDS.FTM_USD]: "5c6c0d2386e3352356c3ab84434fafb5ea067ac2678a38a338c4a69ddc4bdb0c",
|
|
42
|
-
// NOTE : Using S instead of deprecated FTM
|
|
43
|
-
[pairIds_1.PAIR_CONFIGS_IDS.FTM_USD]: "0xf490b178d0c85683b7a0f2388b40af2e6f7c90cbe0f96b31f315f08d0e5a2d6d",
|
|
44
|
-
[pairIds_1.PAIR_CONFIGS_IDS.SOL_USD]: "0xef0d8b6fda2ceba41da15d4095d1da392a0d2f8ed0c6c7bc0f4cfac8c280b56d",
|
|
45
|
-
[pairIds_1.PAIR_CONFIGS_IDS.S_USD]: "0xf490b178d0c85683b7a0f2388b40af2e6f7c90cbe0f96b31f315f08d0e5a2d6d",
|
|
46
|
-
[pairIds_1.PAIR_CONFIGS_IDS.EUR_USD]: "0xa995d00bb36a63cef7fd2c287dc105fc8f3d93779f062f09551b0af3e81ec30b",
|
|
47
|
-
[pairIds_1.PAIR_CONFIGS_IDS.GBP_USD]: "0x84c2dde9633d93d1bcad84e7dc41c9d56578b7ec52fabedc1f335d673df0a7c1",
|
|
48
|
-
[pairIds_1.PAIR_CONFIGS_IDS.AUD_USD]: "0x67a6f93030420c1c9e3fe37c1ab6b77966af82f995944a9fefce357a22854a80",
|
|
49
|
-
[pairIds_1.PAIR_CONFIGS_IDS.NZD_USD]: "0x92eea8ba1b00078cdc2ef6f64f091f262e8c7d0576ee4677572f314ebfafa4c7",
|
|
50
|
-
[pairIds_1.PAIR_CONFIGS_IDS.USD_JPY]: "0xef2c98c804ba503c6a707e38be4dfbb16683775f195b091252bf24693042fd52",
|
|
51
|
-
[pairIds_1.PAIR_CONFIGS_IDS.USD_CHF]: "0x0b1e3297e69f162877b577b0d6a47a0d63b2392bc8499e6540da4187a63e28f8",
|
|
52
|
-
// NOTE : CAT pair will have the same price feed id as the non-CAT pair
|
|
53
|
-
[pairIds_1.PAIR_CONFIGS_IDS.BTC_USD_CAT]: "",
|
|
54
|
-
[pairIds_1.PAIR_CONFIGS_IDS.ETH_USD_CAT]: "",
|
|
55
|
-
[pairIds_1.PAIR_CONFIGS_IDS.EUR_USD_CAT]: "",
|
|
56
|
-
[pairIds_1.PAIR_CONFIGS_IDS.GBP_USD_CAT]: "",
|
|
57
|
-
[pairIds_1.PAIR_CONFIGS_IDS.AUD_USD_CAT]: "",
|
|
58
|
-
[pairIds_1.PAIR_CONFIGS_IDS.NZD_USD_CAT]: "",
|
|
59
|
-
[pairIds_1.PAIR_CONFIGS_IDS.USD_JPY_CAT]: "",
|
|
60
|
-
[pairIds_1.PAIR_CONFIGS_IDS.USD_CHF_CAT]: "",
|
|
61
|
-
// Pairs Unsupported by pyth
|
|
62
|
-
[pairIds_1.PAIR_CONFIGS_IDS.FLR_USD]: "",
|
|
63
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getPythFeedIdForPair = getPythFeedIdForPair;
|
|
4
|
-
const pythFeedConstants_1 = require("./pythFeedConstants");
|
|
5
|
-
/**
|
|
6
|
-
* Get the Pyth feed id for a pair
|
|
7
|
-
* @param pairId The pair id
|
|
8
|
-
*/
|
|
9
|
-
function getPythFeedIdForPair(pairId) {
|
|
10
|
-
return pythFeedConstants_1.PYTH_PRICE_KEYS[pairId];
|
|
11
|
-
}
|