lynx-client 0.0.5 → 0.0.6

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.
Files changed (131) hide show
  1. package/dist/cjs/lib/contractsIntegration/AcceptableImplementationClaimableAdminService/AcceptableImplementationClaimableAdminService.js +53 -0
  2. package/dist/cjs/lib/contractsIntegration/AcceptableImplementationClaimableAdminService/IAcceptableImplementationClaimableAdminService.js +2 -0
  3. package/dist/cjs/lib/contractsIntegration/AcceptableImplementationClaimableAdminService/index.js +5 -0
  4. package/dist/cjs/lib/contractsIntegration/LexPoolV1Service/ILexPoolV1Service.js +2 -0
  5. package/dist/cjs/lib/contractsIntegration/LexPoolV1Service/LexPoolV1Service.js +210 -0
  6. package/dist/cjs/lib/contractsIntegration/LexPoolV1Service/index.js +5 -0
  7. package/dist/cjs/lib/contractsIntegration/PNLRService/IPNLRService.js +2 -0
  8. package/dist/cjs/lib/contractsIntegration/PNLRService/PNLRService.js +124 -0
  9. package/dist/cjs/lib/contractsIntegration/PNLRService/index.js +5 -0
  10. package/dist/cjs/lib/contractsIntegration/PoolAccountantV1Service/IPoolAccountantV1Service.js +2 -0
  11. package/dist/cjs/lib/contractsIntegration/PoolAccountantV1Service/PoolAccountantV1Service.js +254 -0
  12. package/dist/cjs/lib/contractsIntegration/PoolAccountantV1Service/index.js +5 -0
  13. package/dist/cjs/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.js +9 -9
  14. package/dist/cjs/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.js +9 -9
  15. package/dist/cjs/lib/typechain/contracts/AdministrationContracts/AcceptableImplementationClaimableAdmin.js +2 -0
  16. package/dist/cjs/lib/typechain/contracts/Lynx/Lex/PNLR/PNLR.js +2 -0
  17. package/dist/cjs/lib/typechain/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1.js +2 -0
  18. package/dist/cjs/lib/typechain/contracts/Lynx/interfaces/IPriceValidatorV1.js +2 -0
  19. package/dist/cjs/lib/typechain/factories/contracts/AdministrationContracts/AcceptableImplementationClaimableAdmin__factory.js +232 -0
  20. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.js +585 -0
  21. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory.js +3762 -0
  22. package/dist/cjs/lib/typechain/factories/contracts/Lynx/interfaces/IPriceValidatorV1__factory.js +116 -0
  23. package/dist/esm/lib/contractsIntegration/AcceptableImplementationClaimableAdminService/AcceptableImplementationClaimableAdminService.d.ts +10 -0
  24. package/dist/esm/lib/contractsIntegration/AcceptableImplementationClaimableAdminService/AcceptableImplementationClaimableAdminService.d.ts.map +1 -0
  25. package/dist/esm/lib/contractsIntegration/AcceptableImplementationClaimableAdminService/AcceptableImplementationClaimableAdminService.js +53 -0
  26. package/dist/esm/lib/contractsIntegration/AcceptableImplementationClaimableAdminService/IAcceptableImplementationClaimableAdminService.d.ts +21 -0
  27. package/dist/esm/lib/contractsIntegration/AcceptableImplementationClaimableAdminService/IAcceptableImplementationClaimableAdminService.d.ts.map +1 -0
  28. package/dist/esm/lib/contractsIntegration/AcceptableImplementationClaimableAdminService/IAcceptableImplementationClaimableAdminService.js +2 -0
  29. package/dist/esm/lib/contractsIntegration/AcceptableImplementationClaimableAdminService/index.d.ts +3 -0
  30. package/dist/esm/lib/contractsIntegration/AcceptableImplementationClaimableAdminService/index.d.ts.map +1 -0
  31. package/dist/esm/lib/contractsIntegration/AcceptableImplementationClaimableAdminService/index.js +5 -0
  32. package/dist/esm/lib/contractsIntegration/LexPoolV1Service/ILexPoolV1Service.d.ts +124 -0
  33. package/dist/esm/lib/contractsIntegration/LexPoolV1Service/ILexPoolV1Service.d.ts.map +1 -0
  34. package/dist/esm/lib/contractsIntegration/LexPoolV1Service/ILexPoolV1Service.js +2 -0
  35. package/dist/esm/lib/contractsIntegration/LexPoolV1Service/LexPoolV1Service.d.ts +24 -0
  36. package/dist/esm/lib/contractsIntegration/LexPoolV1Service/LexPoolV1Service.d.ts.map +1 -0
  37. package/dist/esm/lib/contractsIntegration/LexPoolV1Service/LexPoolV1Service.js +210 -0
  38. package/dist/esm/lib/contractsIntegration/LexPoolV1Service/index.d.ts +3 -0
  39. package/dist/esm/lib/contractsIntegration/LexPoolV1Service/index.d.ts.map +1 -0
  40. package/dist/esm/lib/contractsIntegration/LexPoolV1Service/index.js +5 -0
  41. package/dist/esm/lib/contractsIntegration/PNLRService/IPNLRService.d.ts +49 -0
  42. package/dist/esm/lib/contractsIntegration/PNLRService/IPNLRService.d.ts.map +1 -0
  43. package/dist/esm/lib/contractsIntegration/PNLRService/IPNLRService.js +2 -0
  44. package/dist/esm/lib/contractsIntegration/PNLRService/PNLRService.d.ts +14 -0
  45. package/dist/esm/lib/contractsIntegration/PNLRService/PNLRService.d.ts.map +1 -0
  46. package/dist/esm/lib/contractsIntegration/PNLRService/PNLRService.js +124 -0
  47. package/dist/esm/lib/contractsIntegration/PNLRService/index.d.ts +3 -0
  48. package/dist/esm/lib/contractsIntegration/PNLRService/index.d.ts.map +1 -0
  49. package/dist/esm/lib/contractsIntegration/PNLRService/index.js +5 -0
  50. package/dist/esm/lib/contractsIntegration/PoolAccountantV1Service/IPoolAccountantV1Service.d.ts +160 -0
  51. package/dist/esm/lib/contractsIntegration/PoolAccountantV1Service/IPoolAccountantV1Service.d.ts.map +1 -0
  52. package/dist/esm/lib/contractsIntegration/PoolAccountantV1Service/IPoolAccountantV1Service.js +2 -0
  53. package/dist/esm/lib/contractsIntegration/PoolAccountantV1Service/PoolAccountantV1Service.d.ts +31 -0
  54. package/dist/esm/lib/contractsIntegration/PoolAccountantV1Service/PoolAccountantV1Service.d.ts.map +1 -0
  55. package/dist/esm/lib/contractsIntegration/PoolAccountantV1Service/PoolAccountantV1Service.js +254 -0
  56. package/dist/esm/lib/contractsIntegration/PoolAccountantV1Service/index.d.ts +3 -0
  57. package/dist/esm/lib/contractsIntegration/PoolAccountantV1Service/index.d.ts.map +1 -0
  58. package/dist/esm/lib/contractsIntegration/PoolAccountantV1Service/index.js +5 -0
  59. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts +2 -11
  60. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts.map +1 -1
  61. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.js +9 -9
  62. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts.map +1 -1
  63. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.js +9 -9
  64. package/dist/esm/lib/typechain/contracts/AdministrationContracts/AcceptableImplementationClaimableAdmin.d.ts +143 -0
  65. package/dist/esm/lib/typechain/contracts/AdministrationContracts/AcceptableImplementationClaimableAdmin.d.ts.map +1 -0
  66. package/dist/esm/lib/typechain/contracts/AdministrationContracts/AcceptableImplementationClaimableAdmin.js +2 -0
  67. package/dist/esm/lib/typechain/contracts/Lynx/Lex/PNLR/PNLR.d.ts +266 -0
  68. package/dist/esm/lib/typechain/contracts/Lynx/Lex/PNLR/PNLR.d.ts.map +1 -0
  69. package/dist/esm/lib/typechain/contracts/Lynx/Lex/PNLR/PNLR.js +2 -0
  70. package/dist/esm/lib/typechain/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1.d.ts +2085 -0
  71. package/dist/esm/lib/typechain/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1.d.ts.map +1 -0
  72. package/dist/esm/lib/typechain/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1.js +2 -0
  73. package/dist/esm/lib/typechain/contracts/Lynx/interfaces/IPriceValidatorV1.d.ts +72 -0
  74. package/dist/esm/lib/typechain/contracts/Lynx/interfaces/IPriceValidatorV1.d.ts.map +1 -0
  75. package/dist/esm/lib/typechain/contracts/Lynx/interfaces/IPriceValidatorV1.js +2 -0
  76. package/dist/esm/lib/typechain/factories/contracts/AdministrationContracts/AcceptableImplementationClaimableAdmin__factory.d.ts +173 -0
  77. package/dist/esm/lib/typechain/factories/contracts/AdministrationContracts/AcceptableImplementationClaimableAdmin__factory.d.ts.map +1 -0
  78. package/dist/esm/lib/typechain/factories/contracts/AdministrationContracts/AcceptableImplementationClaimableAdmin__factory.js +232 -0
  79. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.d.ts +439 -0
  80. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.d.ts.map +1 -0
  81. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.js +585 -0
  82. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory.d.ts +2899 -0
  83. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory.d.ts.map +1 -0
  84. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory.js +3762 -0
  85. package/dist/esm/lib/typechain/factories/contracts/Lynx/interfaces/IPriceValidatorV1__factory.d.ts +81 -0
  86. package/dist/esm/lib/typechain/factories/contracts/Lynx/interfaces/IPriceValidatorV1__factory.d.ts.map +1 -0
  87. package/dist/esm/lib/typechain/factories/contracts/Lynx/interfaces/IPriceValidatorV1__factory.js +116 -0
  88. package/dist/types/lib/contractsIntegration/AcceptableImplementationClaimableAdminService/AcceptableImplementationClaimableAdminService.d.ts +10 -0
  89. package/dist/types/lib/contractsIntegration/AcceptableImplementationClaimableAdminService/AcceptableImplementationClaimableAdminService.d.ts.map +1 -0
  90. package/dist/types/lib/contractsIntegration/AcceptableImplementationClaimableAdminService/IAcceptableImplementationClaimableAdminService.d.ts +21 -0
  91. package/dist/types/lib/contractsIntegration/AcceptableImplementationClaimableAdminService/IAcceptableImplementationClaimableAdminService.d.ts.map +1 -0
  92. package/dist/types/lib/contractsIntegration/AcceptableImplementationClaimableAdminService/index.d.ts +3 -0
  93. package/dist/types/lib/contractsIntegration/AcceptableImplementationClaimableAdminService/index.d.ts.map +1 -0
  94. package/dist/types/lib/contractsIntegration/LexPoolV1Service/ILexPoolV1Service.d.ts +124 -0
  95. package/dist/types/lib/contractsIntegration/LexPoolV1Service/ILexPoolV1Service.d.ts.map +1 -0
  96. package/dist/types/lib/contractsIntegration/LexPoolV1Service/LexPoolV1Service.d.ts +24 -0
  97. package/dist/types/lib/contractsIntegration/LexPoolV1Service/LexPoolV1Service.d.ts.map +1 -0
  98. package/dist/types/lib/contractsIntegration/LexPoolV1Service/index.d.ts +3 -0
  99. package/dist/types/lib/contractsIntegration/LexPoolV1Service/index.d.ts.map +1 -0
  100. package/dist/types/lib/contractsIntegration/PNLRService/IPNLRService.d.ts +49 -0
  101. package/dist/types/lib/contractsIntegration/PNLRService/IPNLRService.d.ts.map +1 -0
  102. package/dist/types/lib/contractsIntegration/PNLRService/PNLRService.d.ts +14 -0
  103. package/dist/types/lib/contractsIntegration/PNLRService/PNLRService.d.ts.map +1 -0
  104. package/dist/types/lib/contractsIntegration/PNLRService/index.d.ts +3 -0
  105. package/dist/types/lib/contractsIntegration/PNLRService/index.d.ts.map +1 -0
  106. package/dist/types/lib/contractsIntegration/PoolAccountantV1Service/IPoolAccountantV1Service.d.ts +160 -0
  107. package/dist/types/lib/contractsIntegration/PoolAccountantV1Service/IPoolAccountantV1Service.d.ts.map +1 -0
  108. package/dist/types/lib/contractsIntegration/PoolAccountantV1Service/PoolAccountantV1Service.d.ts +31 -0
  109. package/dist/types/lib/contractsIntegration/PoolAccountantV1Service/PoolAccountantV1Service.d.ts.map +1 -0
  110. package/dist/types/lib/contractsIntegration/PoolAccountantV1Service/index.d.ts +3 -0
  111. package/dist/types/lib/contractsIntegration/PoolAccountantV1Service/index.d.ts.map +1 -0
  112. package/dist/types/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts +2 -11
  113. package/dist/types/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts.map +1 -1
  114. package/dist/types/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts.map +1 -1
  115. package/dist/types/lib/typechain/contracts/AdministrationContracts/AcceptableImplementationClaimableAdmin.d.ts +143 -0
  116. package/dist/types/lib/typechain/contracts/AdministrationContracts/AcceptableImplementationClaimableAdmin.d.ts.map +1 -0
  117. package/dist/types/lib/typechain/contracts/Lynx/Lex/PNLR/PNLR.d.ts +266 -0
  118. package/dist/types/lib/typechain/contracts/Lynx/Lex/PNLR/PNLR.d.ts.map +1 -0
  119. package/dist/types/lib/typechain/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1.d.ts +2085 -0
  120. package/dist/types/lib/typechain/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1.d.ts.map +1 -0
  121. package/dist/types/lib/typechain/contracts/Lynx/interfaces/IPriceValidatorV1.d.ts +72 -0
  122. package/dist/types/lib/typechain/contracts/Lynx/interfaces/IPriceValidatorV1.d.ts.map +1 -0
  123. package/dist/types/lib/typechain/factories/contracts/AdministrationContracts/AcceptableImplementationClaimableAdmin__factory.d.ts +173 -0
  124. package/dist/types/lib/typechain/factories/contracts/AdministrationContracts/AcceptableImplementationClaimableAdmin__factory.d.ts.map +1 -0
  125. package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.d.ts +439 -0
  126. package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.d.ts.map +1 -0
  127. package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory.d.ts +2899 -0
  128. package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory.d.ts.map +1 -0
  129. package/dist/types/lib/typechain/factories/contracts/Lynx/interfaces/IPriceValidatorV1__factory.d.ts +81 -0
  130. package/dist/types/lib/typechain/factories/contracts/Lynx/interfaces/IPriceValidatorV1__factory.d.ts.map +1 -0
  131. package/package.json +1 -1
@@ -0,0 +1,254 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PoolAccountantV1Service = void 0;
4
+ const PoolAccountantV1__factory_1 = require("../../typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory");
5
+ // Note: registerOpenTrade, registerCloseTrade, and registerUpdateTp are internal protocol functions
6
+ // called only by other Lynx contracts and are not exposed for external use
7
+ class PoolAccountantV1FunctionsGroup_TradeUtilities {
8
+ constructor(contract) {
9
+ this.contract = contract;
10
+ }
11
+ async adjustClosePrice(closePrice, tp, long) {
12
+ return this.contract.adjustClosePrice(closePrice, tp, long);
13
+ }
14
+ async generatePositionHashId(settlementAsset, trader, pairId, index) {
15
+ return this.contract.generatePositionHashId(settlementAsset, trader, pairId, index);
16
+ }
17
+ }
18
+ class PoolAccountantV1FunctionsGroup_FeeCalculations {
19
+ constructor(contract) {
20
+ this.contract = contract;
21
+ }
22
+ async calcClosingFee(pairId, collateral, leverage) {
23
+ return this.contract.calcClosingFee(pairId, collateral, leverage);
24
+ }
25
+ async calcPerformanceFee(pairId, collateral, profitPrecision) {
26
+ return this.contract.calcPerformanceFee(pairId, collateral, profitPrecision);
27
+ }
28
+ async calcTradeDynamicFees(positionId, pairId, long, collateral, leverage, openPrice, tp) {
29
+ const result = await this.contract.calcTradeDynamicFees.staticCall(positionId, pairId, long, collateral, leverage, openPrice, tp);
30
+ return {
31
+ interest: result.interest,
32
+ funding: result.funding,
33
+ };
34
+ }
35
+ async calcBorrowAmount(collateral, leverage, long, openPrice, tp) {
36
+ return this.contract.calcBorrowAmount(collateral, leverage, long, openPrice, tp);
37
+ }
38
+ async calcAbsoluteSkew(openInterestLong, openInterestShort, additionIsLong, additionOpenInterest) {
39
+ return this.contract.calcAbsoluteSkew(openInterestLong, openInterestShort, additionIsLong, additionOpenInterest);
40
+ }
41
+ async calcAccrueFundingValues(pairId) {
42
+ const result = await this.contract.calcAccrueFundingValues(pairId);
43
+ return {
44
+ freshened: result.freshened,
45
+ valueLong: result.valueLong,
46
+ valueShort: result.valueShort,
47
+ protocolFundingShare: result.protocolFundingShare,
48
+ };
49
+ }
50
+ }
51
+ // Similarly implement other groups...
52
+ // For brevity, I'll create a simplified version with the main structure
53
+ class PoolAccountantV1Service {
54
+ constructor(signerOrProvider, address) {
55
+ this.poolAccountantContract = PoolAccountantV1__factory_1.PoolAccountantV1__factory.connect(address, signerOrProvider);
56
+ this.tradeUtilities = new PoolAccountantV1FunctionsGroup_TradeUtilities(this.poolAccountantContract);
57
+ this.feeCalculations = new PoolAccountantV1FunctionsGroup_FeeCalculations(this.poolAccountantContract);
58
+ this.verification = this.createVerificationGroup();
59
+ // Initialize other groups with direct method mappings
60
+ this.funding = this.createFundingGroup();
61
+ this.interest = this.createInterestGroup();
62
+ this.liquidation = this.createLiquidationGroup();
63
+ this.tradeValues = this.createTradeValuesGroup();
64
+ this.pairManagement = this.createPairManagementGroup();
65
+ this.adminConfiguration = this.createAdminConfigurationGroup();
66
+ this.poolInteraction = this.createPoolInteractionGroup();
67
+ this.stateVariables = this.createStateVariablesGroup();
68
+ this.contractInfo = this.createContractInfoGroup();
69
+ this.constants = this.createConstantsGroup();
70
+ }
71
+ createVerificationGroup() {
72
+ return {
73
+ verifyLeveragedPosition: async (pairIndex, collateral, leverage) => {
74
+ const result = await this.poolAccountantContract.verifyLeveragedPosition(pairIndex, collateral, leverage);
75
+ return result;
76
+ },
77
+ verifyOpenFee: async (pairIndex, leveragedPosition) => {
78
+ const result = await this.poolAccountantContract.verifyOpenFee(pairIndex, leveragedPosition);
79
+ return {
80
+ openFee: result[0],
81
+ lexPartFee: result[1],
82
+ };
83
+ },
84
+ verifyPerformanceFee: (pairIndex, collateral) => this.poolAccountantContract.verifyPerformanceFee(pairIndex, collateral),
85
+ verifyMaxPercentProfit: (openPrice, targetPrice, leverage, long) => this.poolAccountantContract.verifyMaxPercentProfit(openPrice, targetPrice, leverage, long),
86
+ verifyUtilizationForTraders: (totalBorrows, totalReserves, unrealizedFunding) => this.poolAccountantContract.verifyUtilizationForTraders(totalBorrows, totalReserves, unrealizedFunding),
87
+ };
88
+ }
89
+ createFundingGroup() {
90
+ return {
91
+ accrueFunding: async (pairId) => {
92
+ const result = await this.poolAccountantContract.accrueFunding.staticCall(pairId);
93
+ return {
94
+ valueLong: result[0],
95
+ valueShort: result[1],
96
+ protocolFundingShare: result[2],
97
+ };
98
+ },
99
+ calcAccrueFundingValues: (pairId) => this.poolAccountantContract
100
+ .calcAccrueFundingValues(pairId)
101
+ .then((r) => ({
102
+ freshened: r.freshened,
103
+ valueLong: r.valueLong,
104
+ valueShort: r.valueShort,
105
+ protocolFundingShare: r.protocolFundingShare,
106
+ })),
107
+ fundingIndicesCalculation: (oiLong, oiShort, fundingRate, timeDiff) => this.poolAccountantContract
108
+ .fundingIndicesCalculation(oiLong, oiShort, fundingRate, timeDiff)
109
+ .then((r) => ({
110
+ indexLongChange: r.indexLongChange,
111
+ indexShortChange: r.indexShortChange,
112
+ protocolFundingShare: r.protocolFundingShare,
113
+ })),
114
+ getTradeFunding: (positionId, pairId, long, collateral, leverage) => this.poolAccountantContract.getTradeFunding.staticCall(positionId, pairId, long, collateral, leverage),
115
+ getTradeFundingPure: (accFundingPerOi, endAccFundingPerOi, collateral, leverage) => this.poolAccountantContract.getTradeFundingPure(accFundingPerOi, endAccFundingPerOi, collateral, leverage),
116
+ getTradeInitialAccFundingPerOi: (positionId) => this.poolAccountantContract.getTradeInitialAccFundingPerOi(positionId),
117
+ getAccFundingLong: (pairIndex) => this.poolAccountantContract.getAccFundingLong(pairIndex),
118
+ getAccFundingShort: (pairIndex) => this.poolAccountantContract.getAccFundingShort(pairIndex),
119
+ getAccFundingUpdateBlock: (pairIndex) => this.poolAccountantContract.getAccFundingUpdateBlock(pairIndex),
120
+ };
121
+ }
122
+ createInterestGroup() {
123
+ return {
124
+ getTradeInterest: (positionId, borrowAmount) => this.poolAccountantContract.getTradeInterest.staticCall(positionId, borrowAmount),
125
+ getTradeInterestPure: (tradeAccInterest, borrowsAndInterestShare, borrowIndex, accBorrowIndex) => this.poolAccountantContract.getTradeInterestPure(tradeAccInterest, borrowsAndInterestShare, borrowIndex, accBorrowIndex),
126
+ getTradeInitialAccBorrowIndex: (positionId) => this.poolAccountantContract.getTradeInitialAccBorrowIndex(positionId),
127
+ accrueInterest: async (availableCash) => {
128
+ const result = await this.poolAccountantContract["accrueInterest(uint256)"].staticCall(availableCash);
129
+ return {
130
+ totalInterestNew: result[0],
131
+ interestShareNew: result[1],
132
+ borrowIndexNew: result[2],
133
+ };
134
+ },
135
+ };
136
+ }
137
+ createLiquidationGroup() {
138
+ return {
139
+ getTradeLiquidationPrice: (positionId, pairId, openPrice, tp, long, collateral, leverage) => this.poolAccountantContract.getTradeLiquidationPrice.staticCall(positionId, pairId, openPrice, tp, long, collateral, leverage),
140
+ getTradeLiquidationPriceView: (openPrice, long, collateral, leverage, interest, funding, closingFee) => this.poolAccountantContract.getTradeLiquidationPriceView(openPrice, long, collateral, leverage, interest, funding, closingFee),
141
+ };
142
+ }
143
+ createTradeValuesGroup() {
144
+ return {
145
+ getTradeValueView: (collateral, profitPrecision, interest, funding, closingFee, liquidation) => this.poolAccountantContract.getTradeValueView(collateral, profitPrecision, interest, funding, closingFee, liquidation),
146
+ getTradeClosingValues: async (positionId, pairId, collateral, leverage, long, openPrice, tp, closePrice, isLiquidation) => {
147
+ const params = {
148
+ collateral,
149
+ leverage,
150
+ long,
151
+ openPrice,
152
+ tp,
153
+ };
154
+ const result = await this.poolAccountantContract.getTradeClosingValues.staticCall(positionId, pairId, params, closePrice, isLiquidation);
155
+ return {
156
+ tradeValue: result[0],
157
+ safeClosingFee: result[1],
158
+ profitPrecision: result[2],
159
+ interest: result[3],
160
+ funding: result[4],
161
+ };
162
+ },
163
+ };
164
+ }
165
+ createPairManagementGroup() {
166
+ return {
167
+ pairTotalOpenInterest: (pairIndex) => this.poolAccountantContract.pairTotalOpenInterest(pairIndex),
168
+ calcAbsoluteSkew: (openInterestLong, openInterestShort, additionIsLong, additionOpenInterest) => this.poolAccountantContract.calcAbsoluteSkew(openInterestLong, openInterestShort, additionIsLong, additionOpenInterest),
169
+ pricePnL: (pairId, price) => this.poolAccountantContract.pricePnL(pairId, price),
170
+ };
171
+ }
172
+ createAdminConfigurationGroup() {
173
+ return {
174
+ setTradeIncentivizer: (incentivizer) => this.poolAccountantContract.setTradeIncentivizer(incentivizer),
175
+ setMaxGainF: (maxGainF) => this.poolAccountantContract.setMaxGainF(maxGainF),
176
+ setFrm: (frm) => this.poolAccountantContract.setFrm(frm),
177
+ setMinOpenFee: (min) => this.poolAccountantContract.setMinOpenFee(min),
178
+ setLexPartF: (partF) => this.poolAccountantContract.setLexPartF(partF),
179
+ setFundingRateMax: (maxValue) => this.poolAccountantContract.setFundingRateMax(maxValue),
180
+ setLiquidationThresholdF: (threshold) => this.poolAccountantContract.setLiquidationThresholdF(threshold),
181
+ setLiquidationFeeF: (fee) => this.poolAccountantContract.setLiquidationFeeF(fee),
182
+ setIrm: (irm) => this.poolAccountantContract.setIrm(irm),
183
+ setIrmHard: (irm) => this.poolAccountantContract.setIrmHard(irm),
184
+ setInterestShareFactor: (factor) => this.poolAccountantContract.setInterestShareFactor(factor),
185
+ setFundingShareFactor: (factor) => this.poolAccountantContract.setFundingShareFactor(factor),
186
+ setBorrowRateMax: (rate) => this.poolAccountantContract.setBorrowRateMax(rate),
187
+ setMaxTotalBorrows: (maxBorrows) => this.poolAccountantContract.setMaxTotalBorrows(maxBorrows),
188
+ setMaxVirtualUtilization: (maxUtilization) => this.poolAccountantContract.setMaxVirtualUtilization(maxUtilization),
189
+ };
190
+ }
191
+ createPoolInteractionGroup() {
192
+ return {
193
+ readAndZeroReserves: async () => {
194
+ const result = await this.poolAccountantContract.readAndZeroReserves.staticCall();
195
+ return {
196
+ accumulatedInterestShare: result[0],
197
+ accFundingShare: result[1],
198
+ };
199
+ },
200
+ };
201
+ }
202
+ createStateVariablesGroup() {
203
+ return {
204
+ // Interest and borrowing state
205
+ borrowIndex: () => this.poolAccountantContract.borrowIndex(),
206
+ borrowRateMax: () => this.poolAccountantContract.borrowRateMax(),
207
+ totalBorrows: () => this.poolAccountantContract.totalBorrows(),
208
+ totalInterest: () => this.poolAccountantContract.totalInterest(),
209
+ interestShare: () => this.poolAccountantContract.interestShare(),
210
+ interestShareFactor: () => this.poolAccountantContract.interestShareFactor(),
211
+ // Funding state
212
+ fundingRateMax: () => this.poolAccountantContract.fundingRateMax(),
213
+ fundingShare: () => this.poolAccountantContract.fundingShare(),
214
+ fundingShareFactor: () => this.poolAccountantContract.fundingShareFactor(),
215
+ unrealizedFunding: () => this.poolAccountantContract.unrealizedFunding(),
216
+ realizedFundingSurplusDeficit: () => this.poolAccountantContract.realizedFundingSurplusDeficit(),
217
+ // Configuration
218
+ maxGainF: () => this.poolAccountantContract.maxGainF(),
219
+ liquidationFeeF: () => this.poolAccountantContract.liquidationFeeF(),
220
+ liquidationThresholdF: () => this.poolAccountantContract.liquidationThresholdF(),
221
+ maxTotalBorrows: () => this.poolAccountantContract.maxTotalBorrows(),
222
+ maxVirtualUtilization: () => this.poolAccountantContract.maxVirtualUtilization(),
223
+ minOpenFee: () => this.poolAccountantContract.minOpenFee(),
224
+ lexPartF: () => this.poolAccountantContract.lexPartF(),
225
+ // Contract references
226
+ lexPool: () => this.poolAccountantContract.lexPool(),
227
+ tradingFloor: () => this.poolAccountantContract.tradingFloor(),
228
+ tradeIncentivizer: () => this.poolAccountantContract.tradeIncentivizer(),
229
+ frm: () => this.poolAccountantContract.frm(),
230
+ irm: () => this.poolAccountantContract.irm(),
231
+ underlying: () => this.poolAccountantContract.underlying(),
232
+ // Timestamps
233
+ accrualBlockTimestamp: () => this.poolAccountantContract.accrualBlockTimestamp(),
234
+ };
235
+ }
236
+ createContractInfoGroup() {
237
+ return {
238
+ admin: () => this.poolAccountantContract.admin(),
239
+ pendingAdmin: () => this.poolAccountantContract.pendingAdmin(),
240
+ implementation: () => this.poolAccountantContract.implementation(),
241
+ pendingImplementation: () => this.poolAccountantContract.pendingImplementation(),
242
+ registry: () => this.poolAccountantContract.registry(),
243
+ };
244
+ }
245
+ createConstantsGroup() {
246
+ return {
247
+ ACCURACY_IMPROVEMENT_SCALE: () => this.poolAccountantContract.ACCURACY_IMPROVEMENT_SCALE(),
248
+ FRACTION_SCALE: () => this.poolAccountantContract.FRACTION_SCALE(),
249
+ LEVERAGE_SCALE: () => this.poolAccountantContract.LEVERAGE_SCALE(),
250
+ PRECISION: () => this.poolAccountantContract.PRECISION(),
251
+ };
252
+ }
253
+ }
254
+ exports.PoolAccountantV1Service = PoolAccountantV1Service;
@@ -0,0 +1,3 @@
1
+ export type { IPoolAccountantV1Service, IPoolAccountantV1FunctionsGroup_TradeUtilities, IPoolAccountantV1FunctionsGroup_Verification, IPoolAccountantV1FunctionsGroup_FeeCalculations, IPoolAccountantV1FunctionsGroup_Funding, IPoolAccountantV1FunctionsGroup_Interest, IPoolAccountantV1FunctionsGroup_Liquidation, IPoolAccountantV1FunctionsGroup_TradeValues, IPoolAccountantV1FunctionsGroup_PairManagement, IPoolAccountantV1FunctionsGroup_AdminConfiguration, IPoolAccountantV1FunctionsGroup_PoolInteraction, IPoolAccountantV1FunctionsGroup_StateVariables, IPoolAccountantV1FunctionsGroup_ContractInfo, IPoolAccountantV1FunctionsGroup_Constants, TAccrueFundingValuesOutput, TFundingIndicesCalculationOutput, TTradeClosingValuesOutput, TDynamicFeesOutput } from "./IPoolAccountantV1Service";
2
+ export { PoolAccountantV1Service } from "./PoolAccountantV1Service";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/PoolAccountantV1Service/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,wBAAwB,EACxB,8CAA8C,EAC9C,4CAA4C,EAC5C,+CAA+C,EAC/C,uCAAuC,EACvC,wCAAwC,EACxC,2CAA2C,EAC3C,2CAA2C,EAC3C,8CAA8C,EAC9C,kDAAkD,EAClD,+CAA+C,EAC/C,8CAA8C,EAC9C,4CAA4C,EAC5C,yCAAyC,EACzC,0BAA0B,EAC1B,gCAAgC,EAChC,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PoolAccountantV1Service = void 0;
4
+ var PoolAccountantV1Service_1 = require("./PoolAccountantV1Service");
5
+ Object.defineProperty(exports, "PoolAccountantV1Service", { enumerable: true, get: function () { return PoolAccountantV1Service_1.PoolAccountantV1Service; } });
@@ -1,32 +1,23 @@
1
1
  import { BytesLike } from "ethers";
2
2
  import { TradingFloorLensStructs } from "../../typechain/contracts/Peripheral/Lens/TradingFloorLens";
3
3
  import { TSafeBigNumberStruct } from "../../utils/ethersTypes";
4
- export type TCompletePositionDataFromLensStruct = Omit<TSafeBigNumberStruct<TradingFloorLensStructs.CompletePositionDataFromLensStruct>, "pairId" | "positionIndex" | "phase" | "inPhaseSince" | "leverage" | "openPrice" | "spreadReductionF" | "minPrice" | "maxPrice" | "tpLastUpdated" | "slLastUpdated" | "tp" | "sl" | "pendingUpdateOrderType" | "pendingUpdateOrderTimestamp" | "liquidationPrice"> & {
4
+ export type TCompletePositionDataFromLensStruct = Omit<TSafeBigNumberStruct<TradingFloorLensStructs.CompletePositionDataFromLensStruct>, "pairId" | "positionIndex" | "phase" | "inPhaseSince" | "tpLastUpdated" | "slLastUpdated" | "pendingUpdateOrderType" | "pendingUpdateOrderTimestamp"> & {
5
5
  pairId: number;
6
6
  positionIndex: number;
7
7
  phase: number;
8
8
  inPhaseSince: number;
9
- leverage: number;
10
- openPrice: number;
11
- spreadReductionF: number;
12
- minPrice: number;
13
- maxPrice: number;
14
9
  tpLastUpdated: number;
15
10
  slLastUpdated: number;
16
- tp: number;
17
- sl: number;
18
11
  pendingUpdateOrderType: number;
19
12
  pendingUpdateOrderTimestamp: number;
20
- liquidationPrice: number;
21
13
  };
22
14
  export type TGetAllPositionsDataForAllTradersResultStruct = Omit<TSafeBigNumberStruct<TradingFloorLensStructs.GetAllPositionsDataForAllTradersResultStruct>, "positions" | "positionsCount" | "traderLastIndex"> & {
23
15
  positions: TCompletePositionDataFromLensStruct[];
24
16
  positionsCount: number;
25
17
  traderLastIndex: number;
26
18
  };
27
- export type TPositionLiquidationInfoStruct = Omit<TSafeBigNumberStruct<TradingFloorLensStructs.PositionLiquidationInfoStruct>, "phase" | "liquidationPrice"> & {
19
+ export type TPositionLiquidationInfoStruct = Omit<TSafeBigNumberStruct<TradingFloorLensStructs.PositionLiquidationInfoStruct>, "phase"> & {
28
20
  phase: number;
29
- liquidationPrice: number;
30
21
  };
31
22
  export type TGetAllPositionsLiquidationInfoResultStruct = Omit<TSafeBigNumberStruct<TradingFloorLensStructs.GetAllPositionsLiquidationInfoResultStruct>, "positionsLiquidationInfo" | "positionsCount" | "traderLastIndex" | "positionLastIndex"> & {
32
23
  positionsLiquidationInfo: TPositionLiquidationInfoStruct[];
@@ -1 +1 @@
1
- {"version":3,"file":"ITradingFloorLensService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,4DAA4D,CAAC;AACrG,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG/D,MAAM,MAAM,mCAAmC,GAAG,IAAI,CACpD,oBAAoB,CAAC,uBAAuB,CAAC,kCAAkC,CAAC,EAC9E,QAAQ,GACR,eAAe,GACf,OAAO,GACP,cAAc,GACd,UAAU,GACV,WAAW,GACX,kBAAkB,GAClB,UAAU,GACV,UAAU,GACV,eAAe,GACf,eAAe,GACf,IAAI,GACJ,IAAI,GACJ,wBAAwB,GAC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,EACnD,MAAM,CAAC,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,2CAA2C,CAAC,CAAC;IAExD,uBAAuB,CACrB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,SAAS,GACpB,OAAO,CAAC,mCAAmC,CAAC,CAAC;IAEhD,yBAAyB,CACvB,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,mCAAmC,EAAE,CAAC,CAAC;IAElD,0BAA0B,CACxB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,kCAAkC,CAAC,CAAC;CAChD"}
1
+ {"version":3,"file":"ITradingFloorLensService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,4DAA4D,CAAC;AACrG,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG/D,MAAM,MAAM,mCAAmC,GAAG,IAAI,CACpD,oBAAoB,CAAC,uBAAuB,CAAC,kCAAkC,CAAC,EAC9E,QAAQ,GACR,eAAe,GACf,OAAO,GACP,cAAc,GAMd,eAAe,GACf,eAAe,GAGf,wBAAwB,GACxB,6BAA6B,CAEhC,GAAG;IACF,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IAMrB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IAGtB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,2BAA2B,EAAE,MAAM,CAAC;CAErC,CAAC;AAEF,MAAM,MAAM,6CAA6C,GAAG,IAAI,CAC9D,oBAAoB,CAAC,uBAAuB,CAAC,4CAA4C,CAAC,EAC1F,WAAW,GAAG,gBAAgB,GAAG,iBAAiB,CACn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B,EAAE,mCA2BxC,CAAC;AAEJ,eAAO,MAAM,sBAAsB,EAAE,6CAMlC,CAAC;AAEJ,eAAO,MAAM,+BAA+B,EAAE,8BAM7C,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,2CAOpC,CAAC;AAEJ,eAAO,MAAM,kBAAkB,EAAE,kCAKhC,CAAC;AAEF,MAAM,WAAW,wBAAwB;IACvC,sBAAsB,CACpB,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,CAAC,CAAC;IAEnB,gCAAgC,CAC9B,MAAM,EAAE,6CAA6C,GACpD,OAAO,CAAC,6CAA6C,CAAC,CAAC;IAE1D,8BAA8B,CAC5B,MAAM,EAAE,2CAA2C,EACnD,MAAM,CAAC,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,2CAA2C,CAAC,CAAC;IAExD,uBAAuB,CACrB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,SAAS,GACpB,OAAO,CAAC,mCAAmC,CAAC,CAAC;IAEhD,yBAAyB,CACvB,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,mCAAmC,EAAE,CAAC,CAAC;IAElD,0BAA0B,CACxB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,kCAAkC,CAAC,CAAC;CAChD"}
@@ -11,23 +11,23 @@ exports.EMPTY_COMPLETE_POSITION_DATA = {
11
11
  collateral: 0n,
12
12
  phase: 0,
13
13
  inPhaseSince: 0,
14
- leverage: 0,
14
+ leverage: 0n,
15
15
  long: false,
16
- openPrice: 0,
17
- spreadReductionF: 0,
18
- minPrice: 0,
19
- maxPrice: 0,
16
+ openPrice: 0n,
17
+ spreadReductionF: 0n,
18
+ minPrice: 0n,
19
+ maxPrice: 0n,
20
20
  tpLastUpdated: 0,
21
21
  slLastUpdated: 0,
22
- tp: 0,
23
- sl: 0,
22
+ tp: 0n,
23
+ sl: 0n,
24
24
  pendingUpdateOrderType: 0,
25
25
  pendingUpdateOrderTimestamp: 0,
26
26
  pendingUpdateOrderFieldAValue: 0n,
27
27
  pendingUpdateOrderFieldBValue: 0n,
28
28
  funding: 0n,
29
29
  borrowInterest: 0n,
30
- liquidationPrice: 0,
30
+ liquidationPrice: 0n,
31
31
  };
32
32
  exports.EMPTY_POSITIONS_RESULT = {
33
33
  positions: [],
@@ -40,7 +40,7 @@ exports.EMPTY_POSITION_LIQUIDATION_INFO = {
40
40
  phase: 0,
41
41
  funding: 0n,
42
42
  borrowInterest: 0n,
43
- liquidationPrice: 0,
43
+ liquidationPrice: 0n,
44
44
  };
45
45
  exports.EMPTY_LIQUIDATION_RESULT = {
46
46
  positionsLiquidationInfo: [],
@@ -1 +1 @@
1
- {"version":3,"file":"TradingFloorLensService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIrD,OAAO,EACL,wBAAwB,EACxB,mCAAmC,EACnC,6CAA6C,EAC7C,6CAA6C,EAC7C,2CAA2C,EAC3C,2CAA2C,EAE3C,kCAAkC,EAKnC,MAAM,4BAA4B,CAAC;AAyCpC,qBAAa,uBAAwB,YAAW,wBAAwB;IACtE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAmB;gBAEhC,gBAAgB,EAAE,MAAM,GAAG,QAAQ,EAAE,eAAe,EAAE,MAAM;IAOlE,sBAAsB,CAC1B,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,CAAC;IASZ,gCAAgC,CACpC,MAAM,EAAE,6CAA6C,GACpD,OAAO,CAAC,6CAA6C,CAAC;IA6BnD,8BAA8B,CAClC,MAAM,EAAE,2CAA2C,EACnD,MAAM,CAAC,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,2CAA2C,CAAC;IAwCjD,uBAAuB,CAC3B,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,SAAS,GACpB,OAAO,CAAC,mCAAmC,CAAC;IAQzC,yBAAyB,CAC7B,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,mCAAmC,EAAE,CAAC;IAW3C,0BAA0B,CAC9B,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,kCAAkC,CAAC;CAU/C"}
1
+ {"version":3,"file":"TradingFloorLensService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIrD,OAAO,EACL,wBAAwB,EACxB,mCAAmC,EACnC,6CAA6C,EAC7C,6CAA6C,EAC7C,2CAA2C,EAC3C,2CAA2C,EAE3C,kCAAkC,EAKnC,MAAM,4BAA4B,CAAC;AAyCpC,qBAAa,uBAAwB,YAAW,wBAAwB;IACtE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAmB;gBAEhC,gBAAgB,EAAE,MAAM,GAAG,QAAQ,EAAE,eAAe,EAAE,MAAM;IAOlE,sBAAsB,CAC1B,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,CAAC;IASZ,gCAAgC,CACpC,MAAM,EAAE,6CAA6C,GACpD,OAAO,CAAC,6CAA6C,CAAC;IA4BnD,8BAA8B,CAClC,MAAM,EAAE,2CAA2C,EACnD,MAAM,CAAC,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,2CAA2C,CAAC;IAwCjD,uBAAuB,CAC3B,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,SAAS,GACpB,OAAO,CAAC,mCAAmC,CAAC;IAQzC,yBAAyB,CAC7B,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,mCAAmC,EAAE,CAAC;IAW3C,0BAA0B,CAC9B,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,kCAAkC,CAAC;CAW/C"}
@@ -13,18 +13,18 @@ function convertPositionData(pos) {
13
13
  positionIndex: Number(baseStruct.positionIndex),
14
14
  phase: Number(baseStruct.phase),
15
15
  inPhaseSince: Number(baseStruct.inPhaseSince),
16
- leverage: Number(baseStruct.leverage),
17
- openPrice: Number(baseStruct.openPrice),
18
- spreadReductionF: Number(baseStruct.spreadReductionF),
19
- minPrice: Number(baseStruct.minPrice),
20
- maxPrice: Number(baseStruct.maxPrice),
16
+ leverage: baseStruct.leverage,
17
+ openPrice: baseStruct.openPrice,
18
+ spreadReductionF: baseStruct.spreadReductionF,
19
+ minPrice: baseStruct.minPrice,
20
+ maxPrice: baseStruct.maxPrice,
21
21
  tpLastUpdated: Number(baseStruct.tpLastUpdated),
22
22
  slLastUpdated: Number(baseStruct.slLastUpdated),
23
- tp: Number(baseStruct.tp),
24
- sl: Number(baseStruct.sl),
23
+ tp: baseStruct.tp,
24
+ sl: baseStruct.sl,
25
25
  pendingUpdateOrderType: Number(baseStruct.pendingUpdateOrderType),
26
26
  pendingUpdateOrderTimestamp: Number(baseStruct.pendingUpdateOrderTimestamp),
27
- liquidationPrice: Number(baseStruct.liquidationPrice),
27
+ liquidationPrice: baseStruct.liquidationPrice,
28
28
  };
29
29
  }
30
30
  function convertLiquidationInfo(pos) {
@@ -32,7 +32,7 @@ function convertLiquidationInfo(pos) {
32
32
  return {
33
33
  ...baseStruct,
34
34
  phase: Number(baseStruct.phase),
35
- liquidationPrice: Number(baseStruct.liquidationPrice),
35
+ liquidationPrice: baseStruct.liquidationPrice,
36
36
  };
37
37
  }
38
38
  class TradingFloorLensService {
@@ -0,0 +1,143 @@
1
+ import type { BaseContract, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers";
2
+ import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "../../common";
3
+ export interface AcceptableImplementationClaimableAdminInterface extends Interface {
4
+ getFunction(nameOrSignature: "_acceptAdmin" | "_acceptImplementation" | "_setPendingAdmin" | "_setPendingImplementation" | "admin" | "implementation" | "pendingAdmin" | "pendingImplementation"): FunctionFragment;
5
+ getEvent(nameOrSignatureOrTopic: "NewAdmin" | "NewImplementation" | "NewPendingAdmin" | "NewPendingImplementation"): EventFragment;
6
+ encodeFunctionData(functionFragment: "_acceptAdmin", values?: undefined): string;
7
+ encodeFunctionData(functionFragment: "_acceptImplementation", values?: undefined): string;
8
+ encodeFunctionData(functionFragment: "_setPendingAdmin", values: [AddressLike]): string;
9
+ encodeFunctionData(functionFragment: "_setPendingImplementation", values: [AddressLike]): string;
10
+ encodeFunctionData(functionFragment: "admin", values?: undefined): string;
11
+ encodeFunctionData(functionFragment: "implementation", values?: undefined): string;
12
+ encodeFunctionData(functionFragment: "pendingAdmin", values?: undefined): string;
13
+ encodeFunctionData(functionFragment: "pendingImplementation", values?: undefined): string;
14
+ decodeFunctionResult(functionFragment: "_acceptAdmin", data: BytesLike): Result;
15
+ decodeFunctionResult(functionFragment: "_acceptImplementation", data: BytesLike): Result;
16
+ decodeFunctionResult(functionFragment: "_setPendingAdmin", data: BytesLike): Result;
17
+ decodeFunctionResult(functionFragment: "_setPendingImplementation", data: BytesLike): Result;
18
+ decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result;
19
+ decodeFunctionResult(functionFragment: "implementation", data: BytesLike): Result;
20
+ decodeFunctionResult(functionFragment: "pendingAdmin", data: BytesLike): Result;
21
+ decodeFunctionResult(functionFragment: "pendingImplementation", data: BytesLike): Result;
22
+ }
23
+ export declare namespace NewAdminEvent {
24
+ type InputTuple = [oldAdmin: AddressLike, newAdmin: AddressLike];
25
+ type OutputTuple = [oldAdmin: string, newAdmin: string];
26
+ interface OutputObject {
27
+ oldAdmin: string;
28
+ newAdmin: string;
29
+ }
30
+ type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
31
+ type Filter = TypedDeferredTopicFilter<Event>;
32
+ type Log = TypedEventLog<Event>;
33
+ type LogDescription = TypedLogDescription<Event>;
34
+ }
35
+ export declare namespace NewImplementationEvent {
36
+ type InputTuple = [
37
+ oldImplementation: AddressLike,
38
+ newImplementation: AddressLike
39
+ ];
40
+ type OutputTuple = [
41
+ oldImplementation: string,
42
+ newImplementation: string
43
+ ];
44
+ interface OutputObject {
45
+ oldImplementation: string;
46
+ newImplementation: string;
47
+ }
48
+ type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
49
+ type Filter = TypedDeferredTopicFilter<Event>;
50
+ type Log = TypedEventLog<Event>;
51
+ type LogDescription = TypedLogDescription<Event>;
52
+ }
53
+ export declare namespace NewPendingAdminEvent {
54
+ type InputTuple = [
55
+ oldPendingAdmin: AddressLike,
56
+ newPendingAdmin: AddressLike
57
+ ];
58
+ type OutputTuple = [oldPendingAdmin: string, newPendingAdmin: string];
59
+ interface OutputObject {
60
+ oldPendingAdmin: string;
61
+ newPendingAdmin: string;
62
+ }
63
+ type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
64
+ type Filter = TypedDeferredTopicFilter<Event>;
65
+ type Log = TypedEventLog<Event>;
66
+ type LogDescription = TypedLogDescription<Event>;
67
+ }
68
+ export declare namespace NewPendingImplementationEvent {
69
+ type InputTuple = [
70
+ oldPendingImplementation: AddressLike,
71
+ newPendingImplementation: AddressLike
72
+ ];
73
+ type OutputTuple = [
74
+ oldPendingImplementation: string,
75
+ newPendingImplementation: string
76
+ ];
77
+ interface OutputObject {
78
+ oldPendingImplementation: string;
79
+ newPendingImplementation: string;
80
+ }
81
+ type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
82
+ type Filter = TypedDeferredTopicFilter<Event>;
83
+ type Log = TypedEventLog<Event>;
84
+ type LogDescription = TypedLogDescription<Event>;
85
+ }
86
+ export interface AcceptableImplementationClaimableAdmin extends BaseContract {
87
+ connect(runner?: ContractRunner | null): AcceptableImplementationClaimableAdmin;
88
+ waitForDeployment(): Promise<this>;
89
+ interface: AcceptableImplementationClaimableAdminInterface;
90
+ queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
91
+ queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
92
+ on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
93
+ on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
94
+ once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
95
+ once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
96
+ listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
97
+ listeners(eventName?: string): Promise<Array<Listener>>;
98
+ removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
99
+ _acceptAdmin: TypedContractMethod<[], [void], "nonpayable">;
100
+ _acceptImplementation: TypedContractMethod<[], [bigint], "nonpayable">;
101
+ _setPendingAdmin: TypedContractMethod<[
102
+ newPendingAdmin: AddressLike
103
+ ], [
104
+ void
105
+ ], "nonpayable">;
106
+ _setPendingImplementation: TypedContractMethod<[
107
+ newPendingImplementation: AddressLike
108
+ ], [
109
+ void
110
+ ], "nonpayable">;
111
+ admin: TypedContractMethod<[], [string], "view">;
112
+ implementation: TypedContractMethod<[], [string], "view">;
113
+ pendingAdmin: TypedContractMethod<[], [string], "view">;
114
+ pendingImplementation: TypedContractMethod<[], [string], "view">;
115
+ getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
116
+ getFunction(nameOrSignature: "_acceptAdmin"): TypedContractMethod<[], [void], "nonpayable">;
117
+ getFunction(nameOrSignature: "_acceptImplementation"): TypedContractMethod<[], [bigint], "nonpayable">;
118
+ getFunction(nameOrSignature: "_setPendingAdmin"): TypedContractMethod<[newPendingAdmin: AddressLike], [void], "nonpayable">;
119
+ getFunction(nameOrSignature: "_setPendingImplementation"): TypedContractMethod<[
120
+ newPendingImplementation: AddressLike
121
+ ], [
122
+ void
123
+ ], "nonpayable">;
124
+ getFunction(nameOrSignature: "admin"): TypedContractMethod<[], [string], "view">;
125
+ getFunction(nameOrSignature: "implementation"): TypedContractMethod<[], [string], "view">;
126
+ getFunction(nameOrSignature: "pendingAdmin"): TypedContractMethod<[], [string], "view">;
127
+ getFunction(nameOrSignature: "pendingImplementation"): TypedContractMethod<[], [string], "view">;
128
+ getEvent(key: "NewAdmin"): TypedContractEvent<NewAdminEvent.InputTuple, NewAdminEvent.OutputTuple, NewAdminEvent.OutputObject>;
129
+ getEvent(key: "NewImplementation"): TypedContractEvent<NewImplementationEvent.InputTuple, NewImplementationEvent.OutputTuple, NewImplementationEvent.OutputObject>;
130
+ getEvent(key: "NewPendingAdmin"): TypedContractEvent<NewPendingAdminEvent.InputTuple, NewPendingAdminEvent.OutputTuple, NewPendingAdminEvent.OutputObject>;
131
+ getEvent(key: "NewPendingImplementation"): TypedContractEvent<NewPendingImplementationEvent.InputTuple, NewPendingImplementationEvent.OutputTuple, NewPendingImplementationEvent.OutputObject>;
132
+ filters: {
133
+ "NewAdmin(address,address)": TypedContractEvent<NewAdminEvent.InputTuple, NewAdminEvent.OutputTuple, NewAdminEvent.OutputObject>;
134
+ NewAdmin: TypedContractEvent<NewAdminEvent.InputTuple, NewAdminEvent.OutputTuple, NewAdminEvent.OutputObject>;
135
+ "NewImplementation(address,address)": TypedContractEvent<NewImplementationEvent.InputTuple, NewImplementationEvent.OutputTuple, NewImplementationEvent.OutputObject>;
136
+ NewImplementation: TypedContractEvent<NewImplementationEvent.InputTuple, NewImplementationEvent.OutputTuple, NewImplementationEvent.OutputObject>;
137
+ "NewPendingAdmin(address,address)": TypedContractEvent<NewPendingAdminEvent.InputTuple, NewPendingAdminEvent.OutputTuple, NewPendingAdminEvent.OutputObject>;
138
+ NewPendingAdmin: TypedContractEvent<NewPendingAdminEvent.InputTuple, NewPendingAdminEvent.OutputTuple, NewPendingAdminEvent.OutputObject>;
139
+ "NewPendingImplementation(address,address)": TypedContractEvent<NewPendingImplementationEvent.InputTuple, NewPendingImplementationEvent.OutputTuple, NewPendingImplementationEvent.OutputObject>;
140
+ NewPendingImplementation: TypedContractEvent<NewPendingImplementationEvent.InputTuple, NewPendingImplementationEvent.OutputTuple, NewPendingImplementationEvent.OutputObject>;
141
+ };
142
+ }
143
+ //# sourceMappingURL=AcceptableImplementationClaimableAdmin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AcceptableImplementationClaimableAdmin.d.ts","sourceRoot":"","sources":["../../../../../../lib/typechain/contracts/AdministrationContracts/AcceptableImplementationClaimableAdmin.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,MAAM,EACN,SAAS,EACT,aAAa,EACb,WAAW,EACX,cAAc,EACd,cAAc,EACd,QAAQ,EACT,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EACV,kBAAkB,EAClB,wBAAwB,EACxB,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,+CACf,SAAQ,SAAS;IACjB,WAAW,CACT,eAAe,EACX,cAAc,GACd,uBAAuB,GACvB,kBAAkB,GAClB,2BAA2B,GAC3B,OAAO,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