lynx-client 0.0.27 → 0.0.29
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/dist/cjs/index.js +5 -1
- package/dist/cjs/lib/addresses/lensAddresses.js +3 -3
- package/dist/cjs/lib/addresses/systemAddresses.js +4 -0
- package/dist/cjs/lib/contractsIntegration/FeatureFlaggerService/FeatureFlaggerService.js +117 -0
- package/dist/cjs/lib/contractsIntegration/FeatureFlaggerService/IFeatureFlaggerService.js +2 -0
- package/dist/cjs/lib/contractsIntegration/FeatureFlaggerService/index.js +18 -0
- package/dist/cjs/lib/contractsIntegration/LexLensService/ILexLensService.js +7 -1
- package/dist/cjs/lib/contractsIntegration/LexLensService/LexLensService.js +18 -4
- package/dist/cjs/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.js +7 -4
- package/dist/cjs/lib/typechain/contracts/Lynx/FeatureFlagger/FeatureFlaggerV1.js +2 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/FeatureFlagger/FeatureFlaggerV1__factory.js +478 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.js +187 -17
- package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.js +137 -1
- package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.js +1 -1
- package/dist/cjs/lib/utils/ethersTypes.js +37 -5
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +5 -1
- package/dist/esm/lib/addresses/lensAddresses.d.ts +3 -3
- package/dist/esm/lib/addresses/lensAddresses.js +3 -3
- package/dist/esm/lib/addresses/systemAddresses.d.ts +4 -0
- package/dist/esm/lib/addresses/systemAddresses.d.ts.map +1 -1
- package/dist/esm/lib/addresses/systemAddresses.js +4 -0
- package/dist/esm/lib/contractsIntegration/FeatureFlaggerService/FeatureFlaggerService.d.ts +17 -0
- package/dist/esm/lib/contractsIntegration/FeatureFlaggerService/FeatureFlaggerService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/FeatureFlaggerService/FeatureFlaggerService.js +117 -0
- package/dist/esm/lib/contractsIntegration/FeatureFlaggerService/IFeatureFlaggerService.d.ts +42 -0
- package/dist/esm/lib/contractsIntegration/FeatureFlaggerService/IFeatureFlaggerService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/FeatureFlaggerService/IFeatureFlaggerService.js +2 -0
- package/dist/esm/lib/contractsIntegration/FeatureFlaggerService/index.d.ts +3 -0
- package/dist/esm/lib/contractsIntegration/FeatureFlaggerService/index.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/FeatureFlaggerService/index.js +18 -0
- package/dist/esm/lib/contractsIntegration/LexLensService/ILexLensService.d.ts +3 -1
- package/dist/esm/lib/contractsIntegration/LexLensService/ILexLensService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/LexLensService/ILexLensService.js +7 -1
- package/dist/esm/lib/contractsIntegration/LexLensService/LexLensService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/LexLensService/LexLensService.js +18 -4
- package/dist/esm/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts +4 -3
- package/dist/esm/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.js +7 -4
- package/dist/esm/lib/typechain/contracts/Lynx/FeatureFlagger/FeatureFlaggerV1.d.ts +290 -0
- package/dist/esm/lib/typechain/contracts/Lynx/FeatureFlagger/FeatureFlaggerV1.d.ts.map +1 -0
- package/dist/esm/lib/typechain/contracts/Lynx/FeatureFlagger/FeatureFlaggerV1.js +2 -0
- package/dist/esm/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts +136 -21
- package/dist/esm/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts.map +1 -1
- package/dist/esm/lib/typechain/contracts/Peripheral/Lens/LexLens.d.ts +18 -1
- package/dist/esm/lib/typechain/contracts/Peripheral/Lens/LexLens.d.ts.map +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/FeatureFlagger/FeatureFlaggerV1__factory.d.ts +361 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/FeatureFlagger/FeatureFlaggerV1__factory.d.ts.map +1 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/FeatureFlagger/FeatureFlaggerV1__factory.js +478 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts +145 -14
- 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 +187 -17
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts +105 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts.map +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.js +137 -1
- 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/utils/ethersTypes.d.ts.map +1 -1
- package/dist/esm/lib/utils/ethersTypes.js +37 -5
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lib/addresses/lensAddresses.d.ts +3 -3
- package/dist/types/lib/addresses/systemAddresses.d.ts +4 -0
- package/dist/types/lib/addresses/systemAddresses.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/FeatureFlaggerService/FeatureFlaggerService.d.ts +17 -0
- package/dist/types/lib/contractsIntegration/FeatureFlaggerService/FeatureFlaggerService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/FeatureFlaggerService/IFeatureFlaggerService.d.ts +42 -0
- package/dist/types/lib/contractsIntegration/FeatureFlaggerService/IFeatureFlaggerService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/FeatureFlaggerService/index.d.ts +3 -0
- package/dist/types/lib/contractsIntegration/FeatureFlaggerService/index.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/LexLensService/ILexLensService.d.ts +3 -1
- package/dist/types/lib/contractsIntegration/LexLensService/ILexLensService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/LexLensService/LexLensService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts +4 -3
- package/dist/types/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts.map +1 -1
- package/dist/types/lib/typechain/contracts/Lynx/FeatureFlagger/FeatureFlaggerV1.d.ts +290 -0
- package/dist/types/lib/typechain/contracts/Lynx/FeatureFlagger/FeatureFlaggerV1.d.ts.map +1 -0
- package/dist/types/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts +136 -21
- package/dist/types/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts.map +1 -1
- package/dist/types/lib/typechain/contracts/Peripheral/Lens/LexLens.d.ts +18 -1
- package/dist/types/lib/typechain/contracts/Peripheral/Lens/LexLens.d.ts.map +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/FeatureFlagger/FeatureFlaggerV1__factory.d.ts +361 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/FeatureFlagger/FeatureFlaggerV1__factory.d.ts.map +1 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts +145 -14
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts.map +1 -1
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts +105 -1
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__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/utils/ethersTypes.d.ts.map +1 -1
- package/package.json +4 -2
package/dist/cjs/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.tradeIntentsVerifierPayloadTypes = exports.liquidityIntentsVerifierPayloadTypes = exports.chipsIntentsVerifierPayloadTypes = exports.PoolAccountantV1Service = exports.PNLRService = exports.AcceptableImplementationClaimableAdminService = exports.LexPoolV1Service = exports.WrappedNativeEngineChipHelperService = exports.EngineChipService = exports.OnBehalfTradingService = exports.TradeIntentsVerifierService = exports.LiquidityIntentsVerifierService = exports.ChipsIntentsVerifierService = void 0;
|
|
17
|
+
exports.tradeIntentsVerifierPayloadTypes = exports.liquidityIntentsVerifierPayloadTypes = exports.chipsIntentsVerifierPayloadTypes = exports.PoolAccountantV1Service = exports.PNLRService = exports.AcceptableImplementationClaimableAdminService = exports.LexPoolV1Service = exports.WrappedNativeEngineChipHelperService = exports.EngineChipService = exports.FeatureFlaggerService = exports.OnBehalfTradingService = exports.TradeIntentsVerifierService = exports.LiquidityIntentsVerifierService = exports.ChipsIntentsVerifierService = void 0;
|
|
18
18
|
__exportStar(require("./lib/chains/chainConstants"), exports);
|
|
19
19
|
__exportStar(require("./lib/chains/chainTypes"), exports);
|
|
20
20
|
__exportStar(require("./lib/utils/addresses"), exports);
|
|
@@ -51,6 +51,8 @@ var TradeIntentsVerifierService_1 = require("./lib/contractsIntegration/TradeInt
|
|
|
51
51
|
Object.defineProperty(exports, "TradeIntentsVerifierService", { enumerable: true, get: function () { return TradeIntentsVerifierService_1.TradeIntentsVerifierService; } });
|
|
52
52
|
var OnBehalfTradingService_1 = require("./lib/contractsIntegration/OnBehalfTradingService");
|
|
53
53
|
Object.defineProperty(exports, "OnBehalfTradingService", { enumerable: true, get: function () { return OnBehalfTradingService_1.OnBehalfTradingService; } });
|
|
54
|
+
var FeatureFlaggerService_1 = require("./lib/contractsIntegration/FeatureFlaggerService");
|
|
55
|
+
Object.defineProperty(exports, "FeatureFlaggerService", { enumerable: true, get: function () { return FeatureFlaggerService_1.FeatureFlaggerService; } });
|
|
54
56
|
var EngineChipService_1 = require("./lib/contractsIntegration/EngineChipService");
|
|
55
57
|
Object.defineProperty(exports, "EngineChipService", { enumerable: true, get: function () { return EngineChipService_1.EngineChipService; } });
|
|
56
58
|
var WrappedNativeEngineChipHelperService_1 = require("./lib/contractsIntegration/WrappedNativeEngineChipHelperService");
|
|
@@ -92,6 +94,8 @@ __exportStar(require("./lib/typechain/factories/contracts/Lynx/IntentsVerifier/L
|
|
|
92
94
|
__exportStar(require("./lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory"), exports);
|
|
93
95
|
// Contract factory export for OnBehalfTrading
|
|
94
96
|
__exportStar(require("./lib/typechain/factories/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1__factory"), exports);
|
|
97
|
+
// Contract factory export for FeatureFlagger
|
|
98
|
+
__exportStar(require("./lib/typechain/factories/contracts/Lynx/FeatureFlagger/FeatureFlaggerV1__factory"), exports);
|
|
95
99
|
// Contract factory exports for Chips
|
|
96
100
|
__exportStar(require("./lib/typechain/factories/contracts/Lynx/Chips/EngineChip/EngineChip__factory"), exports);
|
|
97
101
|
__exportStar(require("./lib/typechain/factories/contracts/Peripheral/Chips/WrappedNativeEngineChipHelper__factory"), exports);
|
|
@@ -4,14 +4,14 @@ exports.LensAddresses = void 0;
|
|
|
4
4
|
exports.LensAddresses = {
|
|
5
5
|
boba: {
|
|
6
6
|
intentsVerifierLens: "0x7DfA2F609573AB8eD8cA231498FF4E8f1e7d31Fa",
|
|
7
|
-
lexLens: "
|
|
7
|
+
lexLens: "0x50D5Fb715c2A8d2f70B95960E86B33B0acB84288",
|
|
8
8
|
tradingFloorLensLens: "0xa2320e397400bd2C56facFD958B602996FdC4a64",
|
|
9
9
|
triggersAndPortalLens: "0x1DD754d549d2643C5a798364a5cfb2fb24f151e7",
|
|
10
10
|
rateModelLens: "0xee6354F34892C5388FC69ea1CEc0f3050aF84fB9",
|
|
11
11
|
},
|
|
12
12
|
sonic: {
|
|
13
13
|
intentsVerifierLens: "0x0C1Fcd85856b5564a87ae378336b7CC0c139C5f7",
|
|
14
|
-
lexLens: "
|
|
14
|
+
lexLens: "0x63c665d10a23a6E52276a44bE7aC815a53C97904",
|
|
15
15
|
tradingFloorLensLens: "0xe8cB576813Eca9B3B9BD851Ce768eB0920274fE8",
|
|
16
16
|
triggersAndPortalLens: "0x1E3865f4Ff5d62dE2fec715d3e676B4b602c0893",
|
|
17
17
|
rateModelLens: "0x771176a09E84365552504437e3A026ea049CBa41",
|
|
@@ -25,7 +25,7 @@ exports.LensAddresses = {
|
|
|
25
25
|
},
|
|
26
26
|
flare: {
|
|
27
27
|
intentsVerifierLens: "0x8fBb98F9BbBBB455A86371D4B2E8ECc7b1b9C6F6",
|
|
28
|
-
lexLens: "
|
|
28
|
+
lexLens: "0x7F6D99833F25baCaC7Dfb14B93f928DC42eDF02c",
|
|
29
29
|
tradingFloorLensLens: "0x2779d0a13Bb4CB7798A8D656e8EdEbB560c17431",
|
|
30
30
|
triggersAndPortalLens: "0x22066b01a00dF4fC4Bc0567dE4D251c694dBA930",
|
|
31
31
|
rateModelLens: "0x7D1893Da64A559C5F23C0f565F62C8480ff6A295",
|
|
@@ -6,20 +6,24 @@ exports.LynxSystemAddresses = {
|
|
|
6
6
|
registryProxyAddress: "0x4CF3d61165a6Be8FF741320ad27Cab57faE5c207",
|
|
7
7
|
tradingFloorProxyAddress: "0x37792EecFA985D0b00a51864c970e7df406AA868",
|
|
8
8
|
orderBookProxyAddress: "0x08422B1cA26c4B6e28bd8635cABB03bC1DBe5D62",
|
|
9
|
+
featureFlaggerProxyAddress: "0xDFe692ca474E91683d4EB0f19B2A7759b284Dd6c",
|
|
9
10
|
},
|
|
10
11
|
boba: {
|
|
11
12
|
registryProxyAddress: "0xC5E782E2A4E2cFCb7eD454CF5a7b6aa2bB424B90",
|
|
12
13
|
tradingFloorProxyAddress: "0x87525b5542DbF7302cd95D82388d28e44ec9289D",
|
|
13
14
|
orderBookProxyAddress: "0xD22c72aB0f4967edB876d84773BfF0b60A92e51a",
|
|
15
|
+
featureFlaggerProxyAddress: "0x023d0Cb0D66025cceC1318BCeC96B7A0aA9b72Cb",
|
|
14
16
|
},
|
|
15
17
|
flare: {
|
|
16
18
|
registryProxyAddress: "0x5a32d0347f01e0F7c27Cc6330b4697BBce1eFD55",
|
|
17
19
|
tradingFloorProxyAddress: "0x9A60488fFAdA402E7E8CcAE2Fb3B72C792bDFE8D",
|
|
18
20
|
orderBookProxyAddress: "0x9106D70e4FD52eb2b47F0c8650f54632dA4E636B",
|
|
21
|
+
featureFlaggerProxyAddress: "0xa2F66D0Df97302CC6aF242D944383592C08C071d",
|
|
19
22
|
},
|
|
20
23
|
fantom: {
|
|
21
24
|
registryProxyAddress: "0x3b7ED1cDF0Fc64d95c0D0428b9Cc99b6A9a5CB94",
|
|
22
25
|
tradingFloorProxyAddress: "0x0420D838a2227727F2555aa54F0164A73c05C16b",
|
|
23
26
|
orderBookProxyAddress: "0x3552fE61af3F6d3235Dd1CB75402d4281d1FbaC6",
|
|
27
|
+
featureFlaggerProxyAddress: "",
|
|
24
28
|
},
|
|
25
29
|
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FeatureFlaggerService = void 0;
|
|
4
|
+
const FeatureFlaggerV1__factory_1 = require("../../typechain/factories/contracts/Lynx/FeatureFlagger/FeatureFlaggerV1__factory");
|
|
5
|
+
class FeatureManagement {
|
|
6
|
+
constructor(contract) {
|
|
7
|
+
this.contract = contract;
|
|
8
|
+
}
|
|
9
|
+
async adminRegisterFeature(featureId, name) {
|
|
10
|
+
return this.contract.adminRegisterFeature(featureId, name);
|
|
11
|
+
}
|
|
12
|
+
async adminDisableFeatureForUser(featureId, user) {
|
|
13
|
+
return this.contract.adminDisableFeatureForUser(featureId, user);
|
|
14
|
+
}
|
|
15
|
+
async adminBatchDisableFeatureForUsers(featureId, users) {
|
|
16
|
+
return this.contract.adminBatchDisableFeatureForUsers(featureId, users);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
class UserFeatureControl {
|
|
20
|
+
constructor(contract) {
|
|
21
|
+
this.contract = contract;
|
|
22
|
+
}
|
|
23
|
+
async setFeatureActivated(featureId, enabled) {
|
|
24
|
+
return this.contract.setFeatureActivated(featureId, enabled);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
class FeatureQueries {
|
|
28
|
+
constructor(contract) {
|
|
29
|
+
this.contract = contract;
|
|
30
|
+
}
|
|
31
|
+
async isFeatureActivated(featureId, user) {
|
|
32
|
+
return this.contract.isFeatureActivated(featureId, user);
|
|
33
|
+
}
|
|
34
|
+
async isFeatureRegistered(featureId) {
|
|
35
|
+
return this.contract.isFeatureRegistered(featureId);
|
|
36
|
+
}
|
|
37
|
+
async getFeatureMetadata(featureId) {
|
|
38
|
+
const result = await this.contract.getFeatureMetadata(featureId);
|
|
39
|
+
return {
|
|
40
|
+
name: result.name,
|
|
41
|
+
exists: result.exists,
|
|
42
|
+
usersCount: result.usersCount,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
async getFeatureUsers(featureId, startIndex, pageSize) {
|
|
46
|
+
const result = await this.contract.getFeatureUsers(featureId, startIndex, pageSize);
|
|
47
|
+
return {
|
|
48
|
+
users: result.users,
|
|
49
|
+
totalCount: result.totalCount,
|
|
50
|
+
hasMore: result.hasMore,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
async getFeatureUsersCount(featureId) {
|
|
54
|
+
return this.contract.getFeatureUsersCount(featureId);
|
|
55
|
+
}
|
|
56
|
+
async getAllFeatureIds() {
|
|
57
|
+
return this.contract.getAllFeatureIds();
|
|
58
|
+
}
|
|
59
|
+
async featureName(featureId) {
|
|
60
|
+
return this.contract.featureName(featureId);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
class ContractReferences {
|
|
64
|
+
constructor(contract) {
|
|
65
|
+
this.contract = contract;
|
|
66
|
+
}
|
|
67
|
+
async registry() {
|
|
68
|
+
return this.contract.registry();
|
|
69
|
+
}
|
|
70
|
+
async implementation() {
|
|
71
|
+
return this.contract.implementation();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
class PendableAdmin {
|
|
75
|
+
constructor(contract) {
|
|
76
|
+
this.contract = contract;
|
|
77
|
+
}
|
|
78
|
+
async admin() {
|
|
79
|
+
return this.contract.admin();
|
|
80
|
+
}
|
|
81
|
+
async pendingAdmin() {
|
|
82
|
+
return this.contract.pendingAdmin();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
class LynxVersionedContract {
|
|
86
|
+
constructor(contract) {
|
|
87
|
+
this.contract = contract;
|
|
88
|
+
}
|
|
89
|
+
async getContractName() {
|
|
90
|
+
return this.contract.getContractName();
|
|
91
|
+
}
|
|
92
|
+
async getContractVersion() {
|
|
93
|
+
return this.contract.getContractVersion();
|
|
94
|
+
}
|
|
95
|
+
async CONTRACT_NAME() {
|
|
96
|
+
return this.contract.CONTRACT_NAME();
|
|
97
|
+
}
|
|
98
|
+
async CONTRACT_VERSION() {
|
|
99
|
+
return this.contract.CONTRACT_VERSION();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
class FeatureFlaggerService {
|
|
103
|
+
constructor(address, signerOrProvider) {
|
|
104
|
+
this.signerOrProvider = signerOrProvider;
|
|
105
|
+
this.contract = FeatureFlaggerV1__factory_1.FeatureFlaggerV1__factory.connect(address, signerOrProvider);
|
|
106
|
+
this.featureManagement = new FeatureManagement(this.contract);
|
|
107
|
+
this.userFeatureControl = new UserFeatureControl(this.contract);
|
|
108
|
+
this.featureQueries = new FeatureQueries(this.contract);
|
|
109
|
+
this.contractReferences = new ContractReferences(this.contract);
|
|
110
|
+
this.pendableAdmin = new PendableAdmin(this.contract);
|
|
111
|
+
this.lynxVersionedContract = new LynxVersionedContract(this.contract);
|
|
112
|
+
}
|
|
113
|
+
getContract() {
|
|
114
|
+
return this.contract;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
exports.FeatureFlaggerService = FeatureFlaggerService;
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./FeatureFlaggerService"), exports);
|
|
18
|
+
__exportStar(require("./IFeatureFlaggerService"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EMPTY_SINGLE_POSITION_OUTPUT = exports.EMPTY_COMPLETE_LEX_CONFIGS = exports.EMPTY_COMPLETE_LEX_STATE = exports.EMPTY_POOL_ACCOUNTANT_CONFIGURATIONS_LENS = exports.EMPTY_POOL_ACCOUNTANT_STATE_LENS = exports.EMPTY_LEX_POOL_SUPPLIER_LENS_STATE = exports.EMPTY_LEX_GROUP_STATE_LENS = exports.EMPTY_LEX_PAIR_STATE_LENS = exports.EMPTY_GROUP_CONFIGS_LENS = exports.EMPTY_FEE_CONFIGS_LENS = exports.EMPTY_PAIR_CONFIGS_LENS = exports.EMPTY_LEX_POOL_LENS_CONFIGS = exports.EMPTY_LEX_POOL_LENS_STATE = exports.EMPTY_LEX_POOL_LENS_PARAMS = exports.EMPTY_PENDING_EPOCH_REDEEM = exports.EMPTY_PENDING_EPOCH_DEPOSIT = void 0;
|
|
3
|
+
exports.EMPTY_SINGLE_POSITION_OUTPUT = exports.EMPTY_COMPLETE_LEX_CONFIGS = exports.EMPTY_COMPLETE_LEX_STATE = exports.EMPTY_POOL_ACCOUNTANT_CONFIGURATIONS_LENS = exports.EMPTY_POOL_ACCOUNTANT_STATE_LENS = exports.EMPTY_LEX_POOL_SUPPLIER_LENS_STATE = exports.EMPTY_LEX_GROUP_STATE_LENS = exports.EMPTY_LEX_PAIR_STATE_LENS = exports.EMPTY_GROUP_CONFIGS_LENS = exports.EMPTY_FEE_CONFIGS_LENS = exports.EMPTY_PAIR_CONFIGS_LENS = exports.EMPTY_LEX_POOL_LENS_CONFIGS = exports.EMPTY_LEX_POOL_LENS_STATE = exports.EMPTY_LEX_POOL_LENS_PARAMS = exports.EMPTY_COLLATERAL_LIMITS_FOR_ASSET = exports.EMPTY_PENDING_EPOCH_REDEEM = exports.EMPTY_PENDING_EPOCH_DEPOSIT = void 0;
|
|
4
4
|
// Empty constants
|
|
5
5
|
exports.EMPTY_PENDING_EPOCH_DEPOSIT = {
|
|
6
6
|
account: "",
|
|
@@ -15,6 +15,10 @@ exports.EMPTY_PENDING_EPOCH_REDEEM = {
|
|
|
15
15
|
maxAmountOut: 0n,
|
|
16
16
|
minAmountOut: 0n,
|
|
17
17
|
};
|
|
18
|
+
exports.EMPTY_COLLATERAL_LIMITS_FOR_ASSET = {
|
|
19
|
+
minCollateral: 0n,
|
|
20
|
+
maxCollateral: 0n,
|
|
21
|
+
};
|
|
18
22
|
exports.EMPTY_LEX_POOL_LENS_PARAMS = {
|
|
19
23
|
lexToken: "",
|
|
20
24
|
name: "",
|
|
@@ -34,6 +38,8 @@ exports.EMPTY_LEX_POOL_LENS_STATE = {
|
|
|
34
38
|
connectedToCenter: false,
|
|
35
39
|
currentEpochNumber: 0n,
|
|
36
40
|
currentExchangeRate: 0n,
|
|
41
|
+
collateralLimitsNonCat: exports.EMPTY_COLLATERAL_LIMITS_FOR_ASSET,
|
|
42
|
+
collateralLimitsCat: exports.EMPTY_COLLATERAL_LIMITS_FOR_ASSET,
|
|
37
43
|
};
|
|
38
44
|
exports.EMPTY_LEX_POOL_LENS_CONFIGS = {
|
|
39
45
|
lexPool: "",
|
|
@@ -102,7 +102,11 @@ class LexLensService {
|
|
|
102
102
|
pairsStates: ILexLensService_1.EMPTY_LEX_PAIR_STATE_LENS,
|
|
103
103
|
groupsStates: ILexLensService_1.EMPTY_LEX_GROUP_STATE_LENS,
|
|
104
104
|
}, {
|
|
105
|
-
lexPoolState:
|
|
105
|
+
lexPoolState: {
|
|
106
|
+
...ILexLensService_1.EMPTY_LEX_POOL_LENS_STATE,
|
|
107
|
+
collateralLimitsNonCat: ILexLensService_1.EMPTY_COLLATERAL_LIMITS_FOR_ASSET,
|
|
108
|
+
collateralLimitsCat: ILexLensService_1.EMPTY_COLLATERAL_LIMITS_FOR_ASSET,
|
|
109
|
+
},
|
|
106
110
|
poolAccountantState: ILexLensService_1.EMPTY_POOL_ACCOUNTANT_STATE_LENS,
|
|
107
111
|
});
|
|
108
112
|
// Apply number conversions
|
|
@@ -125,7 +129,11 @@ class LexLensService {
|
|
|
125
129
|
pairsStates: ILexLensService_1.EMPTY_LEX_PAIR_STATE_LENS,
|
|
126
130
|
groupsStates: ILexLensService_1.EMPTY_LEX_GROUP_STATE_LENS,
|
|
127
131
|
}, {
|
|
128
|
-
lexPoolState:
|
|
132
|
+
lexPoolState: {
|
|
133
|
+
...ILexLensService_1.EMPTY_LEX_POOL_LENS_STATE,
|
|
134
|
+
collateralLimitsNonCat: ILexLensService_1.EMPTY_COLLATERAL_LIMITS_FOR_ASSET,
|
|
135
|
+
collateralLimitsCat: ILexLensService_1.EMPTY_COLLATERAL_LIMITS_FOR_ASSET,
|
|
136
|
+
},
|
|
129
137
|
poolAccountantState: ILexLensService_1.EMPTY_POOL_ACCOUNTANT_STATE_LENS,
|
|
130
138
|
});
|
|
131
139
|
// Apply number conversions
|
|
@@ -163,7 +171,10 @@ class LexLensService {
|
|
|
163
171
|
}
|
|
164
172
|
async getLexPoolState(lexPool) {
|
|
165
173
|
const result = await this.contract.getLexPoolState(lexPool);
|
|
166
|
-
return (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_LEX_POOL_LENS_STATE
|
|
174
|
+
return (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_LEX_POOL_LENS_STATE, {
|
|
175
|
+
collateralLimitsNonCat: ILexLensService_1.EMPTY_COLLATERAL_LIMITS_FOR_ASSET,
|
|
176
|
+
collateralLimitsCat: ILexLensService_1.EMPTY_COLLATERAL_LIMITS_FOR_ASSET,
|
|
177
|
+
});
|
|
167
178
|
}
|
|
168
179
|
async getLexPoolSupplierState(lexPool, supplier) {
|
|
169
180
|
const result = await this.contract.getLexPoolSupplierState(lexPool, supplier);
|
|
@@ -174,7 +185,10 @@ class LexLensService {
|
|
|
174
185
|
}
|
|
175
186
|
async getLexPoolsStateAll(lexPools) {
|
|
176
187
|
const results = await this.contract.getLexPoolsStateAll(lexPools);
|
|
177
|
-
return (0, ethersTypes_1.ethersStructResponseToArray)(results, ILexLensService_1.EMPTY_LEX_POOL_LENS_STATE
|
|
188
|
+
return (0, ethersTypes_1.ethersStructResponseToArray)(results, ILexLensService_1.EMPTY_LEX_POOL_LENS_STATE, {
|
|
189
|
+
collateralLimitsNonCat: ILexLensService_1.EMPTY_COLLATERAL_LIMITS_FOR_ASSET,
|
|
190
|
+
collateralLimitsCat: ILexLensService_1.EMPTY_COLLATERAL_LIMITS_FOR_ASSET,
|
|
191
|
+
});
|
|
178
192
|
}
|
|
179
193
|
async getPoolAccountantConfigurationsByPool(lexPool) {
|
|
180
194
|
const result = await this.contract.getPoolAccountantConfigurationsByPool(lexPool);
|
package/dist/cjs/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.js
CHANGED
|
@@ -73,6 +73,9 @@ class ContractReferences {
|
|
|
73
73
|
async getOnBehalfTrading() {
|
|
74
74
|
return this.tradingContract.getOnBehalfTrading();
|
|
75
75
|
}
|
|
76
|
+
async getFeatureFlagger() {
|
|
77
|
+
return this.tradingContract.getFeatureFlagger();
|
|
78
|
+
}
|
|
76
79
|
}
|
|
77
80
|
class PendableAdmin {
|
|
78
81
|
constructor(tradingContract) {
|
|
@@ -163,11 +166,11 @@ class OnBehalf {
|
|
|
163
166
|
constructor(tradingContract) {
|
|
164
167
|
this.tradingContract = tradingContract;
|
|
165
168
|
}
|
|
166
|
-
async
|
|
167
|
-
return this.tradingContract.
|
|
169
|
+
async onBehalfEnabled() {
|
|
170
|
+
return this.tradingContract.onBehalfEnabled();
|
|
168
171
|
}
|
|
169
|
-
async
|
|
170
|
-
return this.tradingContract.
|
|
172
|
+
async setOnBehalfEnabled(enabled) {
|
|
173
|
+
return this.tradingContract.setOnBehalfEnabled(enabled);
|
|
171
174
|
}
|
|
172
175
|
}
|
|
173
176
|
class TradersPortalServiceService {
|