lynx-client 0.0.2 → 0.0.3
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 +0 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/lib/addresses/lensAddresses.js +16 -16
- package/dist/cjs/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.js +0 -13
- package/dist/cjs/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.js +6 -26
- package/dist/cjs/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.js +0 -1
- package/dist/cjs/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.js +3 -7
- package/dist/cjs/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.js +11 -47
- package/dist/cjs/lib/contractsIntegration/TradingFloorService/TradingFloorService.js +28 -9
- package/dist/cjs/lib/contractsIntegration/TradingFloorService/index.js +5 -0
- package/dist/cjs/lib/typechain/contracts/Lynx/Lex/LexPool/LexPoolV1.js +2 -0
- package/dist/cjs/lib/typechain/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor.js +2 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.js +1854 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.js +78 -6
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.js +297 -80
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.js +10 -109
- package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.js +51 -594
- package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.js +334 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/lib/addresses/lensAddresses.d.ts +16 -16
- package/dist/esm/lib/addresses/lensAddresses.js +16 -16
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts +3 -16
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.js +0 -13
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts +5 -5
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.js +6 -26
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts +0 -1
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.js +0 -1
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts +10 -21
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.js +3 -7
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts +1 -4
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.js +11 -47
- package/dist/esm/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts +10 -4
- package/dist/esm/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts +10 -4
- package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.js +28 -9
- package/dist/esm/lib/contractsIntegration/TradingFloorService/index.d.ts +3 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorService/index.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorService/index.js +5 -0
- package/dist/esm/lib/typechain/contracts/Lynx/Lex/LexPool/LexPoolV1.d.ts +1084 -0
- package/dist/esm/lib/typechain/contracts/Lynx/Lex/LexPool/LexPoolV1.d.ts.map +1 -0
- package/dist/esm/lib/typechain/contracts/Lynx/Lex/LexPool/LexPoolV1.js +2 -0
- package/dist/esm/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts +42 -6
- package/dist/esm/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts.map +1 -1
- package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts +150 -59
- package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts.map +1 -1
- package/dist/esm/lib/typechain/contracts/Peripheral/Lens/IntentsVerifierLens.d.ts +10 -65
- package/dist/esm/lib/typechain/contracts/Peripheral/Lens/IntentsVerifierLens.d.ts.map +1 -1
- package/dist/esm/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts +34 -112
- package/dist/esm/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts.map +1 -1
- package/dist/esm/lib/typechain/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor.d.ts +158 -0
- package/dist/esm/lib/typechain/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor.d.ts.map +1 -0
- package/dist/esm/lib/typechain/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor.js +2 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts +1425 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts.map +1 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.js +1854 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts +60 -5
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts.map +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.js +78 -6
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts +226 -64
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts.map +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.js +297 -80
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.d.ts +10 -85
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.d.ts.map +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.js +10 -109
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts +13 -442
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts.map +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.js +51 -594
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.d.ts +251 -0
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.d.ts.map +1 -0
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.js +334 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lib/addresses/lensAddresses.d.ts +16 -16
- package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts +3 -16
- package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts +5 -5
- package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts +0 -1
- package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts +10 -21
- package/dist/types/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts +1 -4
- package/dist/types/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts +10 -4
- package/dist/types/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts +10 -4
- package/dist/types/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/TradingFloorService/index.d.ts +3 -0
- package/dist/types/lib/contractsIntegration/TradingFloorService/index.d.ts.map +1 -0
- package/dist/types/lib/typechain/contracts/Lynx/Lex/LexPool/LexPoolV1.d.ts +1084 -0
- package/dist/types/lib/typechain/contracts/Lynx/Lex/LexPool/LexPoolV1.d.ts.map +1 -0
- package/dist/types/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts +42 -6
- package/dist/types/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts.map +1 -1
- package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts +150 -59
- package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts.map +1 -1
- package/dist/types/lib/typechain/contracts/Peripheral/Lens/IntentsVerifierLens.d.ts +10 -65
- package/dist/types/lib/typechain/contracts/Peripheral/Lens/IntentsVerifierLens.d.ts.map +1 -1
- package/dist/types/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts +34 -112
- package/dist/types/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts.map +1 -1
- package/dist/types/lib/typechain/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor.d.ts +158 -0
- package/dist/types/lib/typechain/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor.d.ts.map +1 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts +1425 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts.map +1 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts +60 -5
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts.map +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts +226 -64
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts.map +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.d.ts +10 -85
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.d.ts.map +1 -1
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts +13 -442
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts.map +1 -1
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.d.ts +251 -0
- package/dist/types/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.d.ts.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -39,6 +39,7 @@ __exportStar(require("./lib/addresses/lensAddresses"), exports);
|
|
|
39
39
|
__exportStar(require("./lib/addresses/systemAddresses"), exports);
|
|
40
40
|
__exportStar(require("./lib/contractsIntegration/deployedContractsConnector"), exports);
|
|
41
41
|
__exportStar(require("./lib/contractsIntegration/TradersPortalService"), exports);
|
|
42
|
+
__exportStar(require("./lib/contractsIntegration/TradingFloorService"), exports);
|
|
42
43
|
__exportStar(require("./lib/contractsIntegration/IntentsVerifierLensService"), exports);
|
|
43
44
|
__exportStar(require("./lib/contractsIntegration/TriggersAndPortalLensService"), exports);
|
|
44
45
|
__exportStar(require("./lib/contractsIntegration/TradingFloorLensService"), exports);
|
|
@@ -3,27 +3,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.LensAddresses = void 0;
|
|
4
4
|
exports.LensAddresses = {
|
|
5
5
|
boba: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
triggersAndPortalLens: "
|
|
6
|
+
intentsVerifierLens: "0x7DfA2F609573AB8eD8cA231498FF4E8f1e7d31Fa",
|
|
7
|
+
lexLens: "0xE4Ebc518A2Fb771057E8E1e85296a72a4587e11E",
|
|
8
|
+
tradingFloorLensLens: "0x7f68e8Ba4176683594342d9C39De22b93daC45E3",
|
|
9
|
+
triggersAndPortalLens: "0x5c3d344C24e4Cd7DDCdd15C660095FFb160d42e5",
|
|
10
10
|
},
|
|
11
11
|
sonic: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
triggersAndPortalLens: "
|
|
12
|
+
intentsVerifierLens: "0x0C1Fcd85856b5564a87ae378336b7CC0c139C5f7",
|
|
13
|
+
lexLens: "0xc8939875FeC9a0A2f1757272165f8F53659C47c4",
|
|
14
|
+
tradingFloorLensLens: "0x50631a46BEe1E63e46C3eDceE3d5af33E5904681",
|
|
15
|
+
triggersAndPortalLens: "0x7976e6E8145a11aB17D61497dfa0524999Ab6d3c",
|
|
16
16
|
},
|
|
17
17
|
fantom: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
triggersAndPortalLens: "
|
|
18
|
+
intentsVerifierLens: "",
|
|
19
|
+
lexLens: "",
|
|
20
|
+
tradingFloorLensLens: "",
|
|
21
|
+
triggersAndPortalLens: "",
|
|
22
22
|
},
|
|
23
23
|
flare: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
triggersAndPortalLens: "
|
|
24
|
+
intentsVerifierLens: "0x1CdA9C57526e0CDF97f63c2c0CD460a16f9855F5",
|
|
25
|
+
lexLens: "0x76CDbA9107a89af6Dda81655f26FBE67e1d4a749",
|
|
26
|
+
tradingFloorLensLens: "0x731cDbfF121a313c9af0146826E2A78cCBE9FF66",
|
|
27
|
+
triggersAndPortalLens: "0x36D550DbA557a930f0Dfcb4796c593b2215D52Af",
|
|
28
28
|
},
|
|
29
29
|
};
|
package/dist/cjs/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.js
CHANGED
|
@@ -1,15 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EMPTY_HASH_BASED_INTENTS_VERIFIER_REQUEST_BUILDING_INFO = exports.EMPTY_ACCOUNT_BASED_INTENTS_VERIFIER_REQUEST_BUILDING_INFO = void 0;
|
|
4
|
-
exports.EMPTY_ACCOUNT_BASED_INTENTS_VERIFIER_REQUEST_BUILDING_INFO = {
|
|
5
|
-
verifier: "",
|
|
6
|
-
account: "",
|
|
7
|
-
actionType: 0,
|
|
8
|
-
currentNonce: 0,
|
|
9
|
-
};
|
|
10
|
-
exports.EMPTY_HASH_BASED_INTENTS_VERIFIER_REQUEST_BUILDING_INFO = {
|
|
11
|
-
verifier: "",
|
|
12
|
-
hash: "",
|
|
13
|
-
actionType: 0,
|
|
14
|
-
currentNonce: 0,
|
|
15
|
-
};
|
package/dist/cjs/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.js
CHANGED
|
@@ -2,38 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.IntentsVerifierLensService = void 0;
|
|
4
4
|
const IntentsVerifierLens__factory_1 = require("../../typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory");
|
|
5
|
-
const ethersTypes_1 = require("../../utils/ethersTypes");
|
|
6
|
-
const IIntentsVerifierLensService_1 = require("./IIntentsVerifierLensService");
|
|
7
5
|
class IntentsVerifierLensService {
|
|
8
6
|
constructor(signerOrProvider, address) {
|
|
9
7
|
this.contract = IntentsVerifierLens__factory_1.IntentsVerifierLens__factory.connect(address, signerOrProvider);
|
|
10
8
|
}
|
|
11
|
-
async getRequestBuildingInfoForChipsIntentsVerifier(
|
|
12
|
-
|
|
13
|
-
const baseStruct = (0, ethersTypes_1.ethersStructResponseToObject)(result, IIntentsVerifierLensService_1.EMPTY_ACCOUNT_BASED_INTENTS_VERIFIER_REQUEST_BUILDING_INFO);
|
|
14
|
-
return {
|
|
15
|
-
...baseStruct,
|
|
16
|
-
actionType: Number(baseStruct.actionType),
|
|
17
|
-
currentNonce: Number(baseStruct.currentNonce),
|
|
18
|
-
};
|
|
9
|
+
async getRequestBuildingInfoForChipsIntentsVerifier() {
|
|
10
|
+
return await this.contract.getRequestBuildingInfoForChipsIntentsVerifier();
|
|
19
11
|
}
|
|
20
|
-
async getRequestBuildingInfoForLiquidityIntentsVerifier(
|
|
21
|
-
|
|
22
|
-
const baseStruct = (0, ethersTypes_1.ethersStructResponseToObject)(result, IIntentsVerifierLensService_1.EMPTY_ACCOUNT_BASED_INTENTS_VERIFIER_REQUEST_BUILDING_INFO);
|
|
23
|
-
return {
|
|
24
|
-
...baseStruct,
|
|
25
|
-
actionType: Number(baseStruct.actionType),
|
|
26
|
-
currentNonce: Number(baseStruct.currentNonce),
|
|
27
|
-
};
|
|
12
|
+
async getRequestBuildingInfoForLiquidityIntentsVerifier() {
|
|
13
|
+
return await this.contract.getRequestBuildingInfoForLiquidityIntentsVerifier();
|
|
28
14
|
}
|
|
29
|
-
async getRequestBuildingInfoForTradeIntentsVerifier(
|
|
30
|
-
|
|
31
|
-
const baseStruct = (0, ethersTypes_1.ethersStructResponseToObject)(result, IIntentsVerifierLensService_1.EMPTY_HASH_BASED_INTENTS_VERIFIER_REQUEST_BUILDING_INFO);
|
|
32
|
-
return {
|
|
33
|
-
...baseStruct,
|
|
34
|
-
actionType: Number(baseStruct.actionType),
|
|
35
|
-
currentNonce: Number(baseStruct.currentNonce),
|
|
36
|
-
};
|
|
15
|
+
async getRequestBuildingInfoForTradeIntentsVerifier() {
|
|
16
|
+
return await this.contract.getRequestBuildingInfoForTradeIntentsVerifier();
|
|
37
17
|
}
|
|
38
18
|
async registry() {
|
|
39
19
|
return await this.contract.registry();
|
package/dist/cjs/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.js
CHANGED
|
@@ -32,9 +32,7 @@ exports.EMPTY_COMPLETE_POSITION_DATA = {
|
|
|
32
32
|
exports.EMPTY_POSITIONS_RESULT = {
|
|
33
33
|
positions: [],
|
|
34
34
|
positionsCount: 0,
|
|
35
|
-
|
|
36
|
-
pairIdsLastIndex: 0,
|
|
37
|
-
pairTraderLastIndex: 0,
|
|
35
|
+
traderLastIndex: 0,
|
|
38
36
|
done: false,
|
|
39
37
|
};
|
|
40
38
|
exports.EMPTY_POSITION_LIQUIDATION_INFO = {
|
|
@@ -47,15 +45,13 @@ exports.EMPTY_POSITION_LIQUIDATION_INFO = {
|
|
|
47
45
|
exports.EMPTY_LIQUIDATION_RESULT = {
|
|
48
46
|
positionsLiquidationInfo: [],
|
|
49
47
|
positionsCount: 0,
|
|
50
|
-
|
|
51
|
-
pairIdsLastIndex: 0,
|
|
52
|
-
pairTraderLastIndex: 0,
|
|
48
|
+
traderLastIndex: 0,
|
|
53
49
|
positionLastIndex: 0,
|
|
54
50
|
done: false,
|
|
55
51
|
};
|
|
56
52
|
exports.EMPTY_TRADE_PARAMS = {
|
|
57
53
|
tradingFloor: "",
|
|
58
|
-
|
|
54
|
+
maxTradesPerTrader: 0,
|
|
59
55
|
maxSlF: 0,
|
|
60
56
|
maxSanityProfitF: 0,
|
|
61
57
|
};
|
package/dist/cjs/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.js
CHANGED
|
@@ -45,12 +45,9 @@ class TradingFloorLensService {
|
|
|
45
45
|
async getAllPositionsDataForAllTraders(params) {
|
|
46
46
|
const contractParams = {
|
|
47
47
|
tradingFloor: params.tradingFloor,
|
|
48
|
-
|
|
49
|
-
pairIdsStartIndex: BigInt(params.pairIdsStartIndex),
|
|
50
|
-
pairTraderStartIndex: BigInt(params.pairTraderStartIndex),
|
|
48
|
+
traderStartIndex: BigInt(params.traderStartIndex),
|
|
51
49
|
positionsLimit: BigInt(params.positionsLimit),
|
|
52
50
|
};
|
|
53
|
-
// @ts-ignore
|
|
54
51
|
const result = await this.contract.getAllPositionsDataForAllTraders.staticCall(contractParams);
|
|
55
52
|
const baseResult = (0, ethersTypes_1.ethersStructResponseToObject)(result, ITradingFloorLensService_1.EMPTY_POSITIONS_RESULT);
|
|
56
53
|
// Convert positions and filter out empty ones
|
|
@@ -61,44 +58,23 @@ class TradingFloorLensService {
|
|
|
61
58
|
...baseResult,
|
|
62
59
|
positions: convertedPositions,
|
|
63
60
|
positionsCount: Number(baseResult.positionsCount),
|
|
64
|
-
|
|
65
|
-
pairIdsLastIndex: Number(baseResult.pairIdsLastIndex),
|
|
66
|
-
pairTraderLastIndex: Number(baseResult.pairTraderLastIndex),
|
|
61
|
+
traderLastIndex: Number(baseResult.traderLastIndex),
|
|
67
62
|
};
|
|
68
63
|
}
|
|
69
|
-
async getAllPositionsDataForAllTradersInDimension(tradingFloor, settlementAsset, arraySize) {
|
|
70
|
-
// @ts-ignore
|
|
71
|
-
const result = await this.contract.getAllPositionsDataForAllTradersInDimension.staticCall(tradingFloor, settlementAsset, BigInt(arraySize));
|
|
72
|
-
// Convert and filter out empty positions (collateral = 0)
|
|
73
|
-
return result
|
|
74
|
-
.filter((pos) => pos.collateral > 0n)
|
|
75
|
-
.map((pos) => convertPositionData(pos));
|
|
76
|
-
}
|
|
77
|
-
async getAllPositionsDataForTraderInDimension(tradingFloor, settlementAsset, trader) {
|
|
78
|
-
// @ts-ignore
|
|
79
|
-
const result = await this.contract.getAllPositionsDataForTraderInDimension.staticCall(tradingFloor, settlementAsset, trader);
|
|
80
|
-
// Convert and filter out empty positions (collateral = 0)
|
|
81
|
-
return result
|
|
82
|
-
.filter((pos) => pos.collateral > 0n)
|
|
83
|
-
.map((pos) => convertPositionData(pos));
|
|
84
|
-
}
|
|
85
64
|
async getAllPositionsLiquidationInfo(params, phases) {
|
|
86
65
|
const contractParams = {
|
|
87
66
|
tradingFloor: params.tradingFloor,
|
|
88
|
-
|
|
89
|
-
pairIdsStartIndex: BigInt(params.pairIdsStartIndex),
|
|
90
|
-
pairTraderStartIndex: BigInt(params.pairTraderStartIndex),
|
|
67
|
+
traderStartIndex: BigInt(params.traderStartIndex),
|
|
91
68
|
positionStartIndex: BigInt(params.positionStartIndex),
|
|
92
69
|
positionsLimit: BigInt(params.positionsLimit),
|
|
93
70
|
};
|
|
94
71
|
let result;
|
|
95
72
|
if (phases !== undefined) {
|
|
96
|
-
|
|
97
|
-
result = await this.contract["getAllPositionsLiquidationInfo((address,uint256,uint256,uint256,uint16,uint256),uint8[])"].staticCall(contractParams, phases.map(p => BigInt(p)));
|
|
73
|
+
result = await this.contract["getAllPositionsLiquidationInfo((address,uint256,uint16,uint256),uint8[])"].staticCall(contractParams, phases.map((p) => BigInt(p)));
|
|
98
74
|
}
|
|
99
75
|
else {
|
|
100
|
-
|
|
101
|
-
|
|
76
|
+
result =
|
|
77
|
+
await this.contract["getAllPositionsLiquidationInfo((address,uint256,uint16,uint256))"].staticCall(contractParams);
|
|
102
78
|
}
|
|
103
79
|
const baseResult = (0, ethersTypes_1.ethersStructResponseToObject)(result, ITradingFloorLensService_1.EMPTY_LIQUIDATION_RESULT);
|
|
104
80
|
const convertedPositions = result.positionsLiquidationInfo.map((pos) => convertLiquidationInfo(pos));
|
|
@@ -106,39 +82,27 @@ class TradingFloorLensService {
|
|
|
106
82
|
...baseResult,
|
|
107
83
|
positionsLiquidationInfo: convertedPositions,
|
|
108
84
|
positionsCount: Number(baseResult.positionsCount),
|
|
109
|
-
|
|
110
|
-
pairIdsLastIndex: Number(baseResult.pairIdsLastIndex),
|
|
111
|
-
pairTraderLastIndex: Number(baseResult.pairTraderLastIndex),
|
|
85
|
+
traderLastIndex: Number(baseResult.traderLastIndex),
|
|
112
86
|
positionLastIndex: Number(baseResult.positionLastIndex),
|
|
113
87
|
};
|
|
114
88
|
}
|
|
115
89
|
async getCompletePositionData(tradingFloor, positionId) {
|
|
116
|
-
// @ts-ignore
|
|
117
90
|
const result = await this.contract.getCompletePositionData.staticCall(tradingFloor, positionId);
|
|
118
91
|
return convertPositionData(result);
|
|
119
92
|
}
|
|
120
|
-
async
|
|
121
|
-
|
|
122
|
-
const result = await this.contract.getPositionDataInPairsForTrader.staticCall(tradingFloor, settlementAsset, trader, pairIds.map(id => BigInt(id)));
|
|
123
|
-
// Convert and filter out empty positions (collateral = 0)
|
|
124
|
-
return result
|
|
125
|
-
.filter((pos) => pos.collateral > 0n)
|
|
126
|
-
.map((pos) => convertPositionData(pos));
|
|
127
|
-
}
|
|
128
|
-
async getPositionsDataInPairForTrader(tradingFloor, settlementAsset, trader, pairId) {
|
|
129
|
-
// @ts-ignore
|
|
130
|
-
const result = await this.contract.getPositionsDataInPairForTrader.staticCall(tradingFloor, settlementAsset, trader, BigInt(pairId));
|
|
93
|
+
async getPositionsDataForTrader(tradingFloor, trader) {
|
|
94
|
+
const result = await this.contract.getPositionsDataForTrader.staticCall(tradingFloor, trader);
|
|
131
95
|
// Convert and filter out empty positions (collateral = 0)
|
|
132
96
|
return result
|
|
133
97
|
.filter((pos) => pos.collateral > 0n)
|
|
134
98
|
.map((pos) => convertPositionData(pos));
|
|
135
99
|
}
|
|
136
100
|
async getTradingFloorTradeParams(tradingFloor) {
|
|
137
|
-
const result = await this.contract.getTradingFloorTradeParams(tradingFloor);
|
|
101
|
+
const result = await this.contract.getTradingFloorTradeParams.staticCall(tradingFloor);
|
|
138
102
|
// Result is a tuple/array-like object, extract the named properties
|
|
139
103
|
return {
|
|
140
104
|
tradingFloor: result.tradingFloor,
|
|
141
|
-
|
|
105
|
+
maxTradesPerTrader: Number(result.maxTradesPerTrader),
|
|
142
106
|
maxSlF: Number(result.maxSlF),
|
|
143
107
|
maxSanityProfitF: Number(result.maxSanityProfitF),
|
|
144
108
|
};
|
|
@@ -92,22 +92,41 @@ class TradingFloorService {
|
|
|
92
92
|
return this.tradingFloorContract.poolAccountantForAsset(asset);
|
|
93
93
|
}
|
|
94
94
|
// Read-only Functions - Trading Pair Information
|
|
95
|
-
async
|
|
96
|
-
return this.tradingFloorContract.
|
|
95
|
+
async deprecated_pairTraders(asset, pairId, index) {
|
|
96
|
+
return this.tradingFloorContract.deprecated_pairTraders(asset, pairId, index);
|
|
97
97
|
}
|
|
98
|
-
async
|
|
99
|
-
return this.tradingFloorContract.
|
|
98
|
+
async deprecated_pairTradersArray(asset, pairIndex) {
|
|
99
|
+
return this.tradingFloorContract.deprecated_pairTradersArray(asset, pairIndex);
|
|
100
100
|
}
|
|
101
|
-
async
|
|
102
|
-
const result = await this.tradingFloorContract.
|
|
101
|
+
async deprecated_pairTradersInfo(asset, trader, pairId) {
|
|
102
|
+
const result = await this.tradingFloorContract.deprecated_pairTradersInfo(asset, trader, pairId);
|
|
103
103
|
return {
|
|
104
|
-
positionsCounter: result.
|
|
104
|
+
positionsCounter: result.deprecated_positionsCounter,
|
|
105
105
|
positionInArray: result.positionInArray,
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
async pausedPairs(pairId) {
|
|
109
109
|
return this.tradingFloorContract.pausedPairs(pairId);
|
|
110
110
|
}
|
|
111
|
+
// Read-only Functions - Global Trader Tracking (v1.01)
|
|
112
|
+
async traders(index) {
|
|
113
|
+
return this.tradingFloorContract.traders(index);
|
|
114
|
+
}
|
|
115
|
+
async tradersAmount() {
|
|
116
|
+
return this.tradingFloorContract.tradersAmount();
|
|
117
|
+
}
|
|
118
|
+
async tradersIndex(trader) {
|
|
119
|
+
return this.tradingFloorContract.tradersIndex(trader);
|
|
120
|
+
}
|
|
121
|
+
async getActivePositionsAmountForTrader(trader) {
|
|
122
|
+
return this.tradingFloorContract.getActivePositionsAmountForTrader(trader);
|
|
123
|
+
}
|
|
124
|
+
async activePositionIdsByTrader(trader, index) {
|
|
125
|
+
return this.tradingFloorContract.activePositionIdsByTrader(trader, index);
|
|
126
|
+
}
|
|
127
|
+
async positionIdToActivePositionIndex(trader, positionId) {
|
|
128
|
+
return this.tradingFloorContract.positionIdToActivePositionIndex(trader, positionId);
|
|
129
|
+
}
|
|
111
130
|
// Read-only Functions - Trading Parameters
|
|
112
131
|
async maxSanityProfitF() {
|
|
113
132
|
return this.tradingFloorContract.maxSanityProfitF();
|
|
@@ -115,8 +134,8 @@ class TradingFloorService {
|
|
|
115
134
|
async maxSlF() {
|
|
116
135
|
return this.tradingFloorContract.maxSlF();
|
|
117
136
|
}
|
|
118
|
-
async
|
|
119
|
-
return this.tradingFloorContract.
|
|
137
|
+
async maxTradesPerTrader() {
|
|
138
|
+
return this.tradingFloorContract.maxTradesPerTrader();
|
|
120
139
|
}
|
|
121
140
|
// Read-only Functions - Fee Information
|
|
122
141
|
async feesMap(asset, feeType) {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TradingFloorService = void 0;
|
|
4
|
+
var TradingFloorService_1 = require("./TradingFloorService");
|
|
5
|
+
Object.defineProperty(exports, "TradingFloorService", { enumerable: true, get: function () { return TradingFloorService_1.TradingFloorService; } });
|