@gmx-io/sdk 1.3.0 → 1.4.0

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 (443) hide show
  1. package/README.md +37 -37
  2. package/build/cjs/src/abis/ArbitrumNodeInterface.js +105 -0
  3. package/build/cjs/src/abis/ClaimHandler.js +424 -0
  4. package/build/cjs/src/abis/CustomErrors.js +1884 -0
  5. package/build/cjs/src/abis/DataStore.js +639 -0
  6. package/build/cjs/src/abis/ERC20PermitInterface.js +54 -0
  7. package/build/cjs/src/abis/ERC721.js +196 -0
  8. package/build/cjs/src/abis/EventEmitter.js +1228 -0
  9. package/build/cjs/src/abis/ExchangeRouter.js +1590 -0
  10. package/build/cjs/src/abis/GelatoRelayRouter.js +1579 -0
  11. package/build/cjs/src/abis/GlpManager.js +246 -0
  12. package/build/cjs/src/abis/GlvReader.js +1471 -0
  13. package/build/cjs/src/abis/GlvRouter.js +764 -0
  14. package/build/cjs/src/abis/GmxMigrator.js +269 -0
  15. package/build/cjs/src/abis/GovToken.js +325 -0
  16. package/build/cjs/src/abis/LayerZeroProvider.js +161 -0
  17. package/build/cjs/src/abis/MintableBaseToken.js +323 -0
  18. package/build/cjs/src/abis/Multicall.js +231 -0
  19. package/build/cjs/src/abis/MultichainClaimsRouter.js +1266 -0
  20. package/build/cjs/src/abis/MultichainGlvRouter.js +1150 -0
  21. package/build/cjs/src/abis/MultichainGmRouter.js +1449 -0
  22. package/build/cjs/src/abis/MultichainOrderRouter.js +2009 -0
  23. package/build/cjs/src/abis/MultichainSubaccountRouter.js +2069 -0
  24. package/build/cjs/src/abis/MultichainTransferRouter.js +915 -0
  25. package/build/cjs/src/abis/MultichainUtils.js +133 -0
  26. package/build/cjs/src/abis/MultichainVault.js +275 -0
  27. package/build/cjs/src/abis/Reader.js +140 -0
  28. package/build/cjs/src/abis/ReaderV2.js +259 -0
  29. package/build/cjs/src/abis/ReferralStorage.js +261 -0
  30. package/build/cjs/src/abis/RelayParams.js +55 -0
  31. package/build/cjs/src/abis/RewardReader.js +35 -0
  32. package/build/cjs/src/abis/RewardRouter.js +460 -0
  33. package/build/cjs/src/abis/RewardTracker.js +415 -0
  34. package/build/cjs/src/abis/SmartAccount.js +14 -0
  35. package/build/cjs/src/abis/StBTC.js +513 -0
  36. package/build/cjs/src/abis/SubaccountApproval.js +17 -0
  37. package/build/cjs/src/abis/SubaccountGelatoRelayRouter.js +2019 -0
  38. package/build/cjs/src/abis/SubaccountRouter.js +602 -0
  39. package/build/cjs/src/abis/SyntheticsReader.js +4905 -0
  40. package/build/cjs/src/abis/SyntheticsRouter.js +72 -0
  41. package/build/cjs/src/abis/Timelock.js +778 -0
  42. package/build/cjs/src/abis/Token.js +150 -0
  43. package/build/cjs/src/abis/Treasury.js +206 -0
  44. package/build/cjs/src/abis/UniPool.js +36 -0
  45. package/build/cjs/src/abis/UniswapV2.js +287 -0
  46. package/build/cjs/src/abis/UniswapV3Factory.js +200 -0
  47. package/build/cjs/src/abis/UniswapV3Pool.js +985 -0
  48. package/build/cjs/src/abis/UniswapV3PositionManager.js +991 -0
  49. package/build/cjs/src/abis/Vault.js +1308 -0
  50. package/build/cjs/src/abis/VaultReader.js +30 -0
  51. package/build/cjs/src/abis/VaultV2.js +1222 -0
  52. package/build/cjs/src/abis/VaultV2b.js +1308 -0
  53. package/build/cjs/src/abis/VenusVToken.js +49 -0
  54. package/build/cjs/src/abis/Vester.js +456 -0
  55. package/build/cjs/src/abis/WETH.js +137 -0
  56. package/build/cjs/src/abis/index.js +106 -118
  57. package/build/cjs/src/configs/batch.js +14 -1
  58. package/build/cjs/src/configs/chainIds.js +17 -0
  59. package/build/cjs/src/configs/chains.js +77 -66
  60. package/build/cjs/src/configs/contracts.js +59 -80
  61. package/build/cjs/src/configs/dataStore.js +6 -10
  62. package/build/cjs/src/configs/express.js +16 -3
  63. package/build/cjs/src/configs/factors.js +2 -3
  64. package/build/cjs/src/configs/markets.js +127 -1
  65. package/build/cjs/src/configs/multichain.js +26 -0
  66. package/build/cjs/src/configs/oracleKeeper.js +19 -4
  67. package/build/cjs/src/configs/tokens.js +110 -5
  68. package/build/cjs/src/configs/uniswapV3.js +18 -0
  69. package/build/cjs/src/configs/venus.js +58 -0
  70. package/build/cjs/src/modules/markets/index.js +36 -14
  71. package/build/cjs/src/modules/markets/query-builders.js +6 -10
  72. package/build/cjs/src/modules/orders/helpers.js +1 -0
  73. package/build/cjs/src/modules/orders/transactions/createDecreaseOrderTxn.js +1 -0
  74. package/build/cjs/src/modules/orders/transactions/createIncreaseOrderTxn.js +1 -0
  75. package/build/cjs/src/modules/orders/transactions/createSwapOrderTxn.js +1 -0
  76. package/build/cjs/src/modules/positions/positions.js +10 -2
  77. package/build/cjs/src/modules/trades/trades.js +2 -2
  78. package/build/cjs/src/prebuilt/hashedKinkModelMarketRatesKeys.json +88 -0
  79. package/build/cjs/src/prebuilt/hashedMarketConfigKeys.json +907 -453
  80. package/build/cjs/src/prebuilt/hashedMarketValuesKeys.json +165 -0
  81. package/build/cjs/src/test/mock.js +3 -3
  82. package/build/cjs/src/types/subsquid.js +193 -217
  83. package/build/cjs/src/types/tradeHistory.js +9 -1
  84. package/build/cjs/src/utils/LruCache.js +21 -17
  85. package/build/cjs/src/utils/__tests__/LruCache.spec.js +11 -0
  86. package/build/cjs/src/utils/__tests__/fees.spec.js +4 -4
  87. package/build/cjs/src/utils/__tests__/{subgraph.spec.js → indexers.spec.js} +18 -18
  88. package/build/cjs/src/utils/__tests__/numbers.spec.js +1 -1
  89. package/build/cjs/src/utils/bigmath.js +3 -0
  90. package/build/cjs/src/utils/buildUrl.js +1 -0
  91. package/build/cjs/src/utils/errors/transactionsErrors.js +1 -0
  92. package/build/cjs/src/utils/fees/index.js +5 -6
  93. package/build/cjs/src/utils/fees/priceImpact.js +29 -19
  94. package/build/cjs/src/utils/{subgraph.js → indexers.js} +17 -1
  95. package/build/cjs/src/utils/marketKeysAndConfigs.js +7 -11
  96. package/build/cjs/src/utils/markets.js +10 -1
  97. package/build/cjs/src/utils/numbers.js +11 -6
  98. package/build/cjs/src/utils/orderTransactions.js +5 -5
  99. package/build/cjs/src/utils/orders.js +9 -1
  100. package/build/cjs/src/utils/prices.js +0 -2
  101. package/build/cjs/src/utils/swap/botanixStaking.js +3 -3
  102. package/build/cjs/src/utils/swap/swapPath.js +1 -10
  103. package/build/cjs/src/utils/swap/swapValues.js +15 -15
  104. package/build/cjs/src/utils/trade/decrease.js +6 -9
  105. package/build/cjs/src/utils/trade/increase.js +9 -8
  106. package/build/cjs/src/utils/tradeHistory.js +3 -0
  107. package/build/esm/src/abis/ArbitrumNodeInterface.js +103 -0
  108. package/build/esm/src/abis/ClaimHandler.js +422 -0
  109. package/build/esm/src/abis/CustomErrors.js +1882 -0
  110. package/build/esm/src/abis/DataStore.js +637 -0
  111. package/build/esm/src/abis/ERC20PermitInterface.js +52 -0
  112. package/build/esm/src/abis/ERC721.js +194 -0
  113. package/build/esm/src/abis/EventEmitter.js +1226 -0
  114. package/build/esm/src/abis/ExchangeRouter.js +1588 -0
  115. package/build/esm/src/abis/GelatoRelayRouter.js +1577 -0
  116. package/build/esm/src/abis/GlpManager.js +244 -0
  117. package/build/esm/src/abis/GlvReader.js +1469 -0
  118. package/build/esm/src/abis/GlvRouter.js +762 -0
  119. package/build/esm/src/abis/GmxMigrator.js +267 -0
  120. package/build/esm/src/abis/GovToken.js +323 -0
  121. package/build/esm/src/abis/LayerZeroProvider.js +159 -0
  122. package/build/esm/src/abis/MintableBaseToken.js +321 -0
  123. package/build/esm/src/abis/Multicall.js +229 -0
  124. package/build/esm/src/abis/MultichainClaimsRouter.js +1264 -0
  125. package/build/esm/src/abis/MultichainGlvRouter.js +1148 -0
  126. package/build/esm/src/abis/MultichainGmRouter.js +1447 -0
  127. package/build/esm/src/abis/MultichainOrderRouter.js +2007 -0
  128. package/build/esm/src/abis/MultichainSubaccountRouter.js +2067 -0
  129. package/build/esm/src/abis/MultichainTransferRouter.js +913 -0
  130. package/build/esm/src/abis/MultichainUtils.js +131 -0
  131. package/build/esm/src/abis/MultichainVault.js +273 -0
  132. package/build/esm/src/abis/Reader.js +138 -0
  133. package/build/esm/src/abis/ReaderV2.js +257 -0
  134. package/build/esm/src/abis/ReferralStorage.js +259 -0
  135. package/build/esm/src/abis/RelayParams.js +53 -0
  136. package/build/esm/src/abis/RewardReader.js +33 -0
  137. package/build/esm/src/abis/RewardRouter.js +458 -0
  138. package/build/esm/src/abis/RewardTracker.js +413 -0
  139. package/build/esm/src/abis/SmartAccount.js +12 -0
  140. package/build/esm/src/abis/StBTC.js +511 -0
  141. package/build/esm/src/abis/SubaccountApproval.js +15 -0
  142. package/build/esm/src/abis/SubaccountGelatoRelayRouter.js +2017 -0
  143. package/build/esm/src/abis/SubaccountRouter.js +600 -0
  144. package/build/esm/src/abis/SyntheticsReader.js +4903 -0
  145. package/build/esm/src/abis/SyntheticsRouter.js +70 -0
  146. package/build/esm/src/abis/Timelock.js +776 -0
  147. package/build/esm/src/abis/Token.js +148 -0
  148. package/build/esm/src/abis/Treasury.js +204 -0
  149. package/build/esm/src/abis/UniPool.js +34 -0
  150. package/build/esm/src/abis/UniswapV2.js +285 -0
  151. package/build/esm/src/abis/UniswapV3Factory.js +198 -0
  152. package/build/esm/src/abis/UniswapV3Pool.js +983 -0
  153. package/build/esm/src/abis/UniswapV3PositionManager.js +989 -0
  154. package/build/esm/src/abis/Vault.js +1306 -0
  155. package/build/esm/src/abis/VaultReader.js +28 -0
  156. package/build/esm/src/abis/VaultV2.js +1220 -0
  157. package/build/esm/src/abis/VaultV2b.js +1306 -0
  158. package/build/esm/src/abis/VenusVToken.js +47 -0
  159. package/build/esm/src/abis/Vester.js +454 -0
  160. package/build/esm/src/abis/WETH.js +135 -0
  161. package/build/esm/src/abis/index.js +106 -118
  162. package/build/esm/src/configs/batch.js +14 -1
  163. package/build/esm/src/configs/chainIds.js +14 -0
  164. package/build/esm/src/configs/chains.js +15 -14
  165. package/build/esm/src/configs/contracts.js +59 -80
  166. package/build/esm/src/configs/dataStore.js +3 -6
  167. package/build/esm/src/configs/express.js +15 -2
  168. package/build/esm/src/configs/factors.js +1 -2
  169. package/build/esm/src/configs/markets.js +124 -0
  170. package/build/esm/src/configs/multichain.js +21 -0
  171. package/build/esm/src/configs/oracleKeeper.js +19 -4
  172. package/build/esm/src/configs/tokens.js +108 -4
  173. package/build/esm/src/configs/uniswapV3.js +13 -0
  174. package/build/esm/src/configs/venus.js +53 -0
  175. package/build/esm/src/modules/markets/index.js +36 -14
  176. package/build/esm/src/modules/markets/query-builders.js +6 -10
  177. package/build/esm/src/modules/orders/helpers.js +1 -0
  178. package/build/esm/src/modules/orders/transactions/createDecreaseOrderTxn.js +1 -0
  179. package/build/esm/src/modules/orders/transactions/createIncreaseOrderTxn.js +1 -0
  180. package/build/esm/src/modules/orders/transactions/createSwapOrderTxn.js +1 -0
  181. package/build/esm/src/modules/positions/positions.js +10 -2
  182. package/build/esm/src/modules/trades/trades.js +1 -1
  183. package/build/esm/src/prebuilt/hashedKinkModelMarketRatesKeys.json +88 -0
  184. package/build/esm/src/prebuilt/hashedMarketConfigKeys.json +907 -453
  185. package/build/esm/src/prebuilt/hashedMarketValuesKeys.json +165 -0
  186. package/build/esm/src/test/mock.js +3 -3
  187. package/build/esm/src/types/subsquid.js +192 -216
  188. package/build/esm/src/types/tradeHistory.js +6 -0
  189. package/build/esm/src/utils/LruCache.js +21 -17
  190. package/build/esm/src/utils/__tests__/LruCache.spec.js +11 -0
  191. package/build/esm/src/utils/__tests__/fees.spec.js +4 -4
  192. package/build/esm/src/utils/__tests__/{subgraph.spec.js → indexers.spec.js} +1 -1
  193. package/build/esm/src/utils/__tests__/numbers.spec.js +1 -1
  194. package/build/esm/src/utils/bigmath.js +3 -0
  195. package/build/esm/src/utils/buildUrl.js +1 -0
  196. package/build/esm/src/utils/errors/transactionsErrors.js +1 -0
  197. package/build/esm/src/utils/fees/index.js +5 -6
  198. package/build/esm/src/utils/fees/priceImpact.js +28 -19
  199. package/build/esm/src/utils/{subgraph.js → indexers.js} +15 -0
  200. package/build/esm/src/utils/marketKeysAndConfigs.js +8 -12
  201. package/build/esm/src/utils/markets.js +8 -0
  202. package/build/esm/src/utils/numbers.js +8 -4
  203. package/build/esm/src/utils/orderTransactions.js +5 -5
  204. package/build/esm/src/utils/orders.js +8 -1
  205. package/build/esm/src/utils/prices.js +0 -2
  206. package/build/esm/src/utils/swap/botanixStaking.js +3 -3
  207. package/build/esm/src/utils/swap/swapPath.js +1 -10
  208. package/build/esm/src/utils/swap/swapValues.js +15 -15
  209. package/build/esm/src/utils/trade/decrease.js +6 -9
  210. package/build/esm/src/utils/trade/increase.js +9 -8
  211. package/build/esm/src/utils/tradeHistory.js +3 -0
  212. package/build/types/src/abis/ArbitrumNodeInterface.d.ts +214 -0
  213. package/build/types/src/abis/ClaimHandler.d.ts +322 -0
  214. package/build/types/src/abis/CustomErrors.d.ts +3330 -0
  215. package/build/types/src/abis/DataStore.d.ts +1098 -0
  216. package/build/types/src/abis/ERC20PermitInterface.d.ts +90 -0
  217. package/build/types/src/abis/ERC721.d.ts +334 -0
  218. package/build/types/src/abis/EventEmitter.d.ts +1564 -0
  219. package/build/types/src/abis/ExchangeRouter.d.ts +1224 -0
  220. package/build/types/src/abis/GelatoRelayRouter.d.ts +1222 -0
  221. package/build/types/src/abis/GlpManager.d.ts +452 -0
  222. package/build/types/src/abis/GlvReader.d.ts +1131 -0
  223. package/build/types/src/abis/GlvRouter.d.ts +588 -0
  224. package/build/types/src/abis/GmxMigrator.d.ts +497 -0
  225. package/build/types/src/abis/GovToken.d.ts +588 -0
  226. package/build/types/src/abis/LayerZeroProvider.d.ts +285 -0
  227. package/build/types/src/abis/MintableBaseToken.d.ts +526 -0
  228. package/build/types/src/abis/Multicall.d.ts +323 -0
  229. package/build/types/src/abis/MultichainClaimsRouter.d.ts +973 -0
  230. package/build/types/src/abis/MultichainGlvRouter.d.ts +886 -0
  231. package/build/types/src/abis/MultichainGmRouter.d.ts +1118 -0
  232. package/build/types/src/abis/MultichainOrderRouter.d.ts +1557 -0
  233. package/build/types/src/abis/MultichainSubaccountRouter.d.ts +1606 -0
  234. package/build/types/src/abis/MultichainTransferRouter.d.ts +702 -0
  235. package/build/types/src/abis/MultichainUtils.d.ts +100 -0
  236. package/build/types/src/abis/MultichainVault.d.ts +208 -0
  237. package/build/types/src/abis/Reader.d.ts +264 -0
  238. package/build/types/src/abis/ReaderV2.d.ts +474 -0
  239. package/build/types/src/abis/ReferralStorage.d.ts +429 -0
  240. package/build/types/src/abis/RelayParams.d.ts +114 -0
  241. package/build/types/src/abis/RewardReader.d.ts +60 -0
  242. package/build/types/src/abis/RewardRouter.d.ts +790 -0
  243. package/build/types/src/abis/RewardTracker.d.ts +695 -0
  244. package/build/types/src/abis/SmartAccount.d.ts +20 -0
  245. package/build/types/src/abis/StBTC.d.ts +932 -0
  246. package/build/types/src/abis/SubaccountApproval.d.ts +29 -0
  247. package/build/types/src/abis/SubaccountGelatoRelayRouter.d.ts +1567 -0
  248. package/build/types/src/abis/SubaccountRouter.d.ts +465 -0
  249. package/build/types/src/abis/SyntheticsReader.d.ts +3780 -0
  250. package/build/types/src/abis/SyntheticsRouter.d.ts +54 -0
  251. package/build/types/src/abis/Timelock.d.ts +1356 -0
  252. package/build/types/src/abis/Token.d.ts +260 -0
  253. package/build/types/src/abis/Treasury.d.ts +312 -0
  254. package/build/types/src/abis/UniPool.d.ts +64 -0
  255. package/build/types/src/abis/UniswapV2.d.ts +511 -0
  256. package/build/types/src/abis/UniswapV3Factory.d.ts +154 -0
  257. package/build/types/src/abis/UniswapV3Pool.d.ts +771 -0
  258. package/build/types/src/abis/UniswapV3PositionManager.d.ts +767 -0
  259. package/build/types/src/abis/Vault.d.ts +2482 -0
  260. package/build/types/src/abis/VaultReader.d.ts +62 -0
  261. package/build/types/src/abis/VaultV2.d.ts +2327 -0
  262. package/build/types/src/abis/VaultV2b.d.ts +2482 -0
  263. package/build/types/src/abis/VenusVToken.d.ts +36 -0
  264. package/build/types/src/abis/Vester.d.ts +782 -0
  265. package/build/types/src/abis/WETH.d.ts +240 -0
  266. package/build/types/src/abis/index.d.ts +43288 -23
  267. package/build/types/src/configs/batch.d.ts +1 -0
  268. package/build/types/src/configs/chainIds.d.ts +10 -0
  269. package/build/types/src/configs/chains.d.ts +7 -12
  270. package/build/types/src/configs/contracts.d.ts +0 -21
  271. package/build/types/src/configs/dataStore.d.ts +2 -3
  272. package/build/types/src/configs/express.d.ts +4 -0
  273. package/build/types/src/configs/factors.d.ts +1 -2
  274. package/build/types/src/configs/markets.d.ts +3 -0
  275. package/build/types/src/configs/multichain.d.ts +5 -0
  276. package/build/types/src/configs/tokens.d.ts +1 -0
  277. package/build/types/src/configs/uniswapV3.d.ts +7 -0
  278. package/build/types/src/configs/venus.d.ts +16 -0
  279. package/build/types/src/index.d.ts +2 -2
  280. package/build/types/src/modules/base.d.ts +1 -1
  281. package/build/types/src/modules/markets/index.d.ts +1 -0
  282. package/build/types/src/modules/markets/query-builders.d.ts +2 -2
  283. package/build/types/src/modules/markets/types.d.ts +2 -2
  284. package/build/types/src/modules/orders/orders.d.ts +2 -2
  285. package/build/types/src/modules/orders/transactions/cancelOrdersTxn.d.ts +2 -2
  286. package/build/types/src/modules/orders/transactions/createDecreaseOrderTxn.d.ts +2 -1
  287. package/build/types/src/modules/orders/transactions/createIncreaseOrderTxn.d.ts +1 -0
  288. package/build/types/src/modules/orders/transactions/createSwapOrderTxn.d.ts +1 -0
  289. package/build/types/src/modules/orders/transactions/createWrapOrUnwrapTxn.d.ts +1 -1
  290. package/build/types/src/modules/orders/transactions/updateOrderTxn.d.ts +1 -1
  291. package/build/types/src/modules/orders/utils.d.ts +2 -2
  292. package/build/types/src/modules/positions/positions.d.ts +1 -1
  293. package/build/types/src/types/markets.d.ts +3 -3
  294. package/build/types/src/types/orders.d.ts +1 -0
  295. package/build/types/src/types/positions.d.ts +1 -0
  296. package/build/types/src/types/subsquid.d.ts +633 -305
  297. package/build/types/src/types/tokens.d.ts +15 -4
  298. package/build/types/src/types/trade.d.ts +1 -0
  299. package/build/types/src/types/tradeHistory.d.ts +5 -0
  300. package/build/types/src/utils/LruCache.d.ts +2 -2
  301. package/build/types/src/utils/bigmath.d.ts +1 -0
  302. package/build/types/src/utils/callContract.d.ts +1 -1
  303. package/build/types/src/utils/fees/priceImpact.d.ts +9 -3
  304. package/build/types/src/utils/hash.d.ts +1 -1
  305. package/build/types/src/utils/{subgraph.d.ts → indexers.d.ts} +1 -0
  306. package/build/types/src/utils/marketKeysAndConfigs.d.ts +2 -3
  307. package/build/types/src/utils/markets.d.ts +1 -0
  308. package/build/types/src/utils/numbers.d.ts +4 -0
  309. package/build/types/src/utils/orderTransactions.d.ts +7 -7
  310. package/build/types/src/utils/orders.d.ts +1 -0
  311. package/build/types/src/utils/prices.d.ts +0 -2
  312. package/build/types/src/utils/swap/swapPath.d.ts +0 -1
  313. package/build/types/src/utils/trade/decrease.d.ts +1 -0
  314. package/build/types/src/utils/trade/increase.d.ts +1 -0
  315. package/build/types/src/utils/tradeHistory.d.ts +1 -2
  316. package/package.json +6 -2
  317. package/build/cjs/src/abis/ArbitrumNodeInterface.json +0 -105
  318. package/build/cjs/src/abis/ClaimHandler.json +0 -424
  319. package/build/cjs/src/abis/CustomErrors.json +0 -4432
  320. package/build/cjs/src/abis/DataStore.json +0 -1459
  321. package/build/cjs/src/abis/ERC20PermitInterface.json +0 -118
  322. package/build/cjs/src/abis/ERC721.json +0 -442
  323. package/build/cjs/src/abis/EventEmitter.json +0 -2060
  324. package/build/cjs/src/abis/ExchangeRouter.json +0 -1706
  325. package/build/cjs/src/abis/GMT.json +0 -522
  326. package/build/cjs/src/abis/GelatoRelayRouter.json +0 -1579
  327. package/build/cjs/src/abis/GlpManager.json +0 -591
  328. package/build/cjs/src/abis/GlvReader.json +0 -1471
  329. package/build/cjs/src/abis/GlvRouter.json +0 -764
  330. package/build/cjs/src/abis/GmxMigrator.json +0 -657
  331. package/build/cjs/src/abis/GovToken.json +0 -768
  332. package/build/cjs/src/abis/LayerZeroProvider.json +0 -372
  333. package/build/cjs/src/abis/MintableBaseToken.json +0 -696
  334. package/build/cjs/src/abis/Multicall.json +0 -429
  335. package/build/cjs/src/abis/MultichainClaimsRouter.json +0 -1266
  336. package/build/cjs/src/abis/MultichainGlvRouter.json +0 -1150
  337. package/build/cjs/src/abis/MultichainGmRouter.json +0 -1449
  338. package/build/cjs/src/abis/MultichainOrderRouter.json +0 -1820
  339. package/build/cjs/src/abis/MultichainSubaccountRouter.json +0 -2069
  340. package/build/cjs/src/abis/MultichainTransferRouter.json +0 -915
  341. package/build/cjs/src/abis/MultichainUtils.json +0 -133
  342. package/build/cjs/src/abis/MultichainVault.json +0 -275
  343. package/build/cjs/src/abis/OrderBook.json +0 -1997
  344. package/build/cjs/src/abis/OrderBookReader.json +0 -111
  345. package/build/cjs/src/abis/OrderExecutor.json +0 -122
  346. package/build/cjs/src/abis/PositionManager.json +0 -1165
  347. package/build/cjs/src/abis/PositionRouter.json +0 -2030
  348. package/build/cjs/src/abis/Reader.json +0 -355
  349. package/build/cjs/src/abis/ReaderV2.json +0 -630
  350. package/build/cjs/src/abis/ReferralStorage.json +0 -557
  351. package/build/cjs/src/abis/RelayParams.json +0 -147
  352. package/build/cjs/src/abis/RewardReader.json +0 -86
  353. package/build/cjs/src/abis/RewardRouter.json +0 -1024
  354. package/build/cjs/src/abis/RewardTracker.json +0 -918
  355. package/build/cjs/src/abis/Router-v2.json +0 -605
  356. package/build/cjs/src/abis/Router.json +0 -605
  357. package/build/cjs/src/abis/SmartAccount.json +0 -28
  358. package/build/cjs/src/abis/StBTC.json +0 -1225
  359. package/build/cjs/src/abis/SubaccountApproval.json +0 -17
  360. package/build/cjs/src/abis/SubaccountGelatoRelayRouter.json +0 -2019
  361. package/build/cjs/src/abis/SubaccountRouter.json +0 -602
  362. package/build/cjs/src/abis/SyntheticsReader.json +0 -4905
  363. package/build/cjs/src/abis/SyntheticsRouter.json +0 -72
  364. package/build/cjs/src/abis/Timelock.json +0 -1737
  365. package/build/cjs/src/abis/Token.json +0 -345
  366. package/build/cjs/src/abis/Treasury.json +0 -411
  367. package/build/cjs/src/abis/UniPool.json +0 -89
  368. package/build/cjs/src/abis/UniswapV2.json +0 -1
  369. package/build/cjs/src/abis/Vault.json +0 -3220
  370. package/build/cjs/src/abis/VaultReader.json +0 -87
  371. package/build/cjs/src/abis/VaultV2.json +0 -3019
  372. package/build/cjs/src/abis/VaultV2b.json +0 -3220
  373. package/build/cjs/src/abis/Vester.json +0 -1031
  374. package/build/cjs/src/abis/WETH.json +0 -320
  375. package/build/cjs/src/abis/YieldFarm.json +0 -599
  376. package/build/cjs/src/abis/YieldToken.json +0 -560
  377. package/build/cjs/src/abis/__tests__/abis.spec.js +0 -40
  378. package/build/cjs/src/configs/__tests__/permits.spec.js +0 -109
  379. package/build/esm/src/abis/ArbitrumNodeInterface.json +0 -105
  380. package/build/esm/src/abis/ClaimHandler.json +0 -424
  381. package/build/esm/src/abis/CustomErrors.json +0 -4432
  382. package/build/esm/src/abis/DataStore.json +0 -1459
  383. package/build/esm/src/abis/ERC20PermitInterface.json +0 -118
  384. package/build/esm/src/abis/ERC721.json +0 -442
  385. package/build/esm/src/abis/EventEmitter.json +0 -2060
  386. package/build/esm/src/abis/ExchangeRouter.json +0 -1706
  387. package/build/esm/src/abis/GMT.json +0 -522
  388. package/build/esm/src/abis/GelatoRelayRouter.json +0 -1579
  389. package/build/esm/src/abis/GlpManager.json +0 -591
  390. package/build/esm/src/abis/GlvReader.json +0 -1471
  391. package/build/esm/src/abis/GlvRouter.json +0 -764
  392. package/build/esm/src/abis/GmxMigrator.json +0 -657
  393. package/build/esm/src/abis/GovToken.json +0 -768
  394. package/build/esm/src/abis/LayerZeroProvider.json +0 -372
  395. package/build/esm/src/abis/MintableBaseToken.json +0 -696
  396. package/build/esm/src/abis/Multicall.json +0 -429
  397. package/build/esm/src/abis/MultichainClaimsRouter.json +0 -1266
  398. package/build/esm/src/abis/MultichainGlvRouter.json +0 -1150
  399. package/build/esm/src/abis/MultichainGmRouter.json +0 -1449
  400. package/build/esm/src/abis/MultichainOrderRouter.json +0 -1820
  401. package/build/esm/src/abis/MultichainSubaccountRouter.json +0 -2069
  402. package/build/esm/src/abis/MultichainTransferRouter.json +0 -915
  403. package/build/esm/src/abis/MultichainUtils.json +0 -133
  404. package/build/esm/src/abis/MultichainVault.json +0 -275
  405. package/build/esm/src/abis/OrderBook.json +0 -1997
  406. package/build/esm/src/abis/OrderBookReader.json +0 -111
  407. package/build/esm/src/abis/OrderExecutor.json +0 -122
  408. package/build/esm/src/abis/PositionManager.json +0 -1165
  409. package/build/esm/src/abis/PositionRouter.json +0 -2030
  410. package/build/esm/src/abis/Reader.json +0 -355
  411. package/build/esm/src/abis/ReaderV2.json +0 -630
  412. package/build/esm/src/abis/ReferralStorage.json +0 -557
  413. package/build/esm/src/abis/RelayParams.json +0 -147
  414. package/build/esm/src/abis/RewardReader.json +0 -86
  415. package/build/esm/src/abis/RewardRouter.json +0 -1024
  416. package/build/esm/src/abis/RewardTracker.json +0 -918
  417. package/build/esm/src/abis/Router-v2.json +0 -605
  418. package/build/esm/src/abis/Router.json +0 -605
  419. package/build/esm/src/abis/SmartAccount.json +0 -28
  420. package/build/esm/src/abis/StBTC.json +0 -1225
  421. package/build/esm/src/abis/SubaccountApproval.json +0 -17
  422. package/build/esm/src/abis/SubaccountGelatoRelayRouter.json +0 -2019
  423. package/build/esm/src/abis/SubaccountRouter.json +0 -602
  424. package/build/esm/src/abis/SyntheticsReader.json +0 -4905
  425. package/build/esm/src/abis/SyntheticsRouter.json +0 -72
  426. package/build/esm/src/abis/Timelock.json +0 -1737
  427. package/build/esm/src/abis/Token.json +0 -345
  428. package/build/esm/src/abis/Treasury.json +0 -411
  429. package/build/esm/src/abis/UniPool.json +0 -89
  430. package/build/esm/src/abis/UniswapV2.json +0 -1
  431. package/build/esm/src/abis/Vault.json +0 -3220
  432. package/build/esm/src/abis/VaultReader.json +0 -87
  433. package/build/esm/src/abis/VaultV2.json +0 -3019
  434. package/build/esm/src/abis/VaultV2b.json +0 -3220
  435. package/build/esm/src/abis/Vester.json +0 -1031
  436. package/build/esm/src/abis/WETH.json +0 -320
  437. package/build/esm/src/abis/YieldFarm.json +0 -599
  438. package/build/esm/src/abis/YieldToken.json +0 -560
  439. package/build/esm/src/abis/__tests__/abis.spec.js +0 -35
  440. package/build/esm/src/configs/__tests__/permits.spec.js +0 -107
  441. package/build/types/src/configs/__tests__/permits.spec.d.ts +0 -1
  442. package/build/types/src/utils/__tests__/subgraph.spec.d.ts +0 -1
  443. /package/build/types/src/{abis/__tests__/abis.spec.d.ts → utils/__tests__/indexers.spec.d.ts} +0 -0
@@ -0,0 +1,4905 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = [
4
+ {
5
+ inputs: [
6
+ {
7
+ internalType: "contract DataStore",
8
+ name: "dataStore",
9
+ type: "address",
10
+ },
11
+ {
12
+ internalType: "address",
13
+ name: "account",
14
+ type: "address",
15
+ },
16
+ {
17
+ internalType: "uint256",
18
+ name: "start",
19
+ type: "uint256",
20
+ },
21
+ {
22
+ internalType: "uint256",
23
+ name: "end",
24
+ type: "uint256",
25
+ },
26
+ ],
27
+ name: "getAccountOrders",
28
+ outputs: [
29
+ {
30
+ components: [
31
+ {
32
+ internalType: "bytes32",
33
+ name: "orderKey",
34
+ type: "bytes32",
35
+ },
36
+ {
37
+ components: [
38
+ {
39
+ components: [
40
+ {
41
+ internalType: "address",
42
+ name: "account",
43
+ type: "address",
44
+ },
45
+ {
46
+ internalType: "address",
47
+ name: "receiver",
48
+ type: "address",
49
+ },
50
+ {
51
+ internalType: "address",
52
+ name: "cancellationReceiver",
53
+ type: "address",
54
+ },
55
+ {
56
+ internalType: "address",
57
+ name: "callbackContract",
58
+ type: "address",
59
+ },
60
+ {
61
+ internalType: "address",
62
+ name: "uiFeeReceiver",
63
+ type: "address",
64
+ },
65
+ {
66
+ internalType: "address",
67
+ name: "market",
68
+ type: "address",
69
+ },
70
+ {
71
+ internalType: "address",
72
+ name: "initialCollateralToken",
73
+ type: "address",
74
+ },
75
+ {
76
+ internalType: "address[]",
77
+ name: "swapPath",
78
+ type: "address[]",
79
+ },
80
+ ],
81
+ internalType: "struct Order.Addresses",
82
+ name: "addresses",
83
+ type: "tuple",
84
+ },
85
+ {
86
+ components: [
87
+ {
88
+ internalType: "enum Order.OrderType",
89
+ name: "orderType",
90
+ type: "uint8",
91
+ },
92
+ {
93
+ internalType: "enum Order.DecreasePositionSwapType",
94
+ name: "decreasePositionSwapType",
95
+ type: "uint8",
96
+ },
97
+ {
98
+ internalType: "uint256",
99
+ name: "sizeDeltaUsd",
100
+ type: "uint256",
101
+ },
102
+ {
103
+ internalType: "uint256",
104
+ name: "initialCollateralDeltaAmount",
105
+ type: "uint256",
106
+ },
107
+ {
108
+ internalType: "uint256",
109
+ name: "triggerPrice",
110
+ type: "uint256",
111
+ },
112
+ {
113
+ internalType: "uint256",
114
+ name: "acceptablePrice",
115
+ type: "uint256",
116
+ },
117
+ {
118
+ internalType: "uint256",
119
+ name: "executionFee",
120
+ type: "uint256",
121
+ },
122
+ {
123
+ internalType: "uint256",
124
+ name: "callbackGasLimit",
125
+ type: "uint256",
126
+ },
127
+ {
128
+ internalType: "uint256",
129
+ name: "minOutputAmount",
130
+ type: "uint256",
131
+ },
132
+ {
133
+ internalType: "uint256",
134
+ name: "updatedAtTime",
135
+ type: "uint256",
136
+ },
137
+ {
138
+ internalType: "uint256",
139
+ name: "validFromTime",
140
+ type: "uint256",
141
+ },
142
+ {
143
+ internalType: "uint256",
144
+ name: "srcChainId",
145
+ type: "uint256",
146
+ },
147
+ ],
148
+ internalType: "struct Order.Numbers",
149
+ name: "numbers",
150
+ type: "tuple",
151
+ },
152
+ {
153
+ components: [
154
+ {
155
+ internalType: "bool",
156
+ name: "isLong",
157
+ type: "bool",
158
+ },
159
+ {
160
+ internalType: "bool",
161
+ name: "shouldUnwrapNativeToken",
162
+ type: "bool",
163
+ },
164
+ {
165
+ internalType: "bool",
166
+ name: "isFrozen",
167
+ type: "bool",
168
+ },
169
+ {
170
+ internalType: "bool",
171
+ name: "autoCancel",
172
+ type: "bool",
173
+ },
174
+ ],
175
+ internalType: "struct Order.Flags",
176
+ name: "flags",
177
+ type: "tuple",
178
+ },
179
+ {
180
+ internalType: "bytes32[]",
181
+ name: "_dataList",
182
+ type: "bytes32[]",
183
+ },
184
+ ],
185
+ internalType: "struct Order.Props",
186
+ name: "order",
187
+ type: "tuple",
188
+ },
189
+ ],
190
+ internalType: "struct ReaderUtils.OrderInfo[]",
191
+ name: "",
192
+ type: "tuple[]",
193
+ },
194
+ ],
195
+ stateMutability: "view",
196
+ type: "function",
197
+ },
198
+ {
199
+ inputs: [
200
+ {
201
+ internalType: "contract DataStore",
202
+ name: "dataStore",
203
+ type: "address",
204
+ },
205
+ {
206
+ internalType: "contract IReferralStorage",
207
+ name: "referralStorage",
208
+ type: "address",
209
+ },
210
+ {
211
+ internalType: "address",
212
+ name: "account",
213
+ type: "address",
214
+ },
215
+ {
216
+ internalType: "address[]",
217
+ name: "markets",
218
+ type: "address[]",
219
+ },
220
+ {
221
+ components: [
222
+ {
223
+ components: [
224
+ {
225
+ internalType: "uint256",
226
+ name: "min",
227
+ type: "uint256",
228
+ },
229
+ {
230
+ internalType: "uint256",
231
+ name: "max",
232
+ type: "uint256",
233
+ },
234
+ ],
235
+ internalType: "struct Price.Props",
236
+ name: "indexTokenPrice",
237
+ type: "tuple",
238
+ },
239
+ {
240
+ components: [
241
+ {
242
+ internalType: "uint256",
243
+ name: "min",
244
+ type: "uint256",
245
+ },
246
+ {
247
+ internalType: "uint256",
248
+ name: "max",
249
+ type: "uint256",
250
+ },
251
+ ],
252
+ internalType: "struct Price.Props",
253
+ name: "longTokenPrice",
254
+ type: "tuple",
255
+ },
256
+ {
257
+ components: [
258
+ {
259
+ internalType: "uint256",
260
+ name: "min",
261
+ type: "uint256",
262
+ },
263
+ {
264
+ internalType: "uint256",
265
+ name: "max",
266
+ type: "uint256",
267
+ },
268
+ ],
269
+ internalType: "struct Price.Props",
270
+ name: "shortTokenPrice",
271
+ type: "tuple",
272
+ },
273
+ ],
274
+ internalType: "struct MarketUtils.MarketPrices[]",
275
+ name: "marketPrices",
276
+ type: "tuple[]",
277
+ },
278
+ {
279
+ internalType: "address",
280
+ name: "uiFeeReceiver",
281
+ type: "address",
282
+ },
283
+ {
284
+ internalType: "uint256",
285
+ name: "start",
286
+ type: "uint256",
287
+ },
288
+ {
289
+ internalType: "uint256",
290
+ name: "end",
291
+ type: "uint256",
292
+ },
293
+ ],
294
+ name: "getAccountPositionInfoList",
295
+ outputs: [
296
+ {
297
+ components: [
298
+ {
299
+ internalType: "bytes32",
300
+ name: "positionKey",
301
+ type: "bytes32",
302
+ },
303
+ {
304
+ components: [
305
+ {
306
+ components: [
307
+ {
308
+ internalType: "address",
309
+ name: "account",
310
+ type: "address",
311
+ },
312
+ {
313
+ internalType: "address",
314
+ name: "market",
315
+ type: "address",
316
+ },
317
+ {
318
+ internalType: "address",
319
+ name: "collateralToken",
320
+ type: "address",
321
+ },
322
+ ],
323
+ internalType: "struct Position.Addresses",
324
+ name: "addresses",
325
+ type: "tuple",
326
+ },
327
+ {
328
+ components: [
329
+ {
330
+ internalType: "uint256",
331
+ name: "sizeInUsd",
332
+ type: "uint256",
333
+ },
334
+ {
335
+ internalType: "uint256",
336
+ name: "sizeInTokens",
337
+ type: "uint256",
338
+ },
339
+ {
340
+ internalType: "uint256",
341
+ name: "collateralAmount",
342
+ type: "uint256",
343
+ },
344
+ {
345
+ internalType: "int256",
346
+ name: "pendingImpactAmount",
347
+ type: "int256",
348
+ },
349
+ {
350
+ internalType: "uint256",
351
+ name: "borrowingFactor",
352
+ type: "uint256",
353
+ },
354
+ {
355
+ internalType: "uint256",
356
+ name: "fundingFeeAmountPerSize",
357
+ type: "uint256",
358
+ },
359
+ {
360
+ internalType: "uint256",
361
+ name: "longTokenClaimableFundingAmountPerSize",
362
+ type: "uint256",
363
+ },
364
+ {
365
+ internalType: "uint256",
366
+ name: "shortTokenClaimableFundingAmountPerSize",
367
+ type: "uint256",
368
+ },
369
+ {
370
+ internalType: "uint256",
371
+ name: "increasedAtTime",
372
+ type: "uint256",
373
+ },
374
+ {
375
+ internalType: "uint256",
376
+ name: "decreasedAtTime",
377
+ type: "uint256",
378
+ },
379
+ ],
380
+ internalType: "struct Position.Numbers",
381
+ name: "numbers",
382
+ type: "tuple",
383
+ },
384
+ {
385
+ components: [
386
+ {
387
+ internalType: "bool",
388
+ name: "isLong",
389
+ type: "bool",
390
+ },
391
+ ],
392
+ internalType: "struct Position.Flags",
393
+ name: "flags",
394
+ type: "tuple",
395
+ },
396
+ ],
397
+ internalType: "struct Position.Props",
398
+ name: "position",
399
+ type: "tuple",
400
+ },
401
+ {
402
+ components: [
403
+ {
404
+ components: [
405
+ {
406
+ internalType: "bytes32",
407
+ name: "referralCode",
408
+ type: "bytes32",
409
+ },
410
+ {
411
+ internalType: "address",
412
+ name: "affiliate",
413
+ type: "address",
414
+ },
415
+ {
416
+ internalType: "address",
417
+ name: "trader",
418
+ type: "address",
419
+ },
420
+ {
421
+ internalType: "uint256",
422
+ name: "totalRebateFactor",
423
+ type: "uint256",
424
+ },
425
+ {
426
+ internalType: "uint256",
427
+ name: "affiliateRewardFactor",
428
+ type: "uint256",
429
+ },
430
+ {
431
+ internalType: "uint256",
432
+ name: "adjustedAffiliateRewardFactor",
433
+ type: "uint256",
434
+ },
435
+ {
436
+ internalType: "uint256",
437
+ name: "traderDiscountFactor",
438
+ type: "uint256",
439
+ },
440
+ {
441
+ internalType: "uint256",
442
+ name: "totalRebateAmount",
443
+ type: "uint256",
444
+ },
445
+ {
446
+ internalType: "uint256",
447
+ name: "traderDiscountAmount",
448
+ type: "uint256",
449
+ },
450
+ {
451
+ internalType: "uint256",
452
+ name: "affiliateRewardAmount",
453
+ type: "uint256",
454
+ },
455
+ ],
456
+ internalType: "struct PositionPricingUtils.PositionReferralFees",
457
+ name: "referral",
458
+ type: "tuple",
459
+ },
460
+ {
461
+ components: [
462
+ {
463
+ internalType: "uint256",
464
+ name: "traderTier",
465
+ type: "uint256",
466
+ },
467
+ {
468
+ internalType: "uint256",
469
+ name: "traderDiscountFactor",
470
+ type: "uint256",
471
+ },
472
+ {
473
+ internalType: "uint256",
474
+ name: "traderDiscountAmount",
475
+ type: "uint256",
476
+ },
477
+ ],
478
+ internalType: "struct PositionPricingUtils.PositionProFees",
479
+ name: "pro",
480
+ type: "tuple",
481
+ },
482
+ {
483
+ components: [
484
+ {
485
+ internalType: "uint256",
486
+ name: "fundingFeeAmount",
487
+ type: "uint256",
488
+ },
489
+ {
490
+ internalType: "uint256",
491
+ name: "claimableLongTokenAmount",
492
+ type: "uint256",
493
+ },
494
+ {
495
+ internalType: "uint256",
496
+ name: "claimableShortTokenAmount",
497
+ type: "uint256",
498
+ },
499
+ {
500
+ internalType: "uint256",
501
+ name: "latestFundingFeeAmountPerSize",
502
+ type: "uint256",
503
+ },
504
+ {
505
+ internalType: "uint256",
506
+ name: "latestLongTokenClaimableFundingAmountPerSize",
507
+ type: "uint256",
508
+ },
509
+ {
510
+ internalType: "uint256",
511
+ name: "latestShortTokenClaimableFundingAmountPerSize",
512
+ type: "uint256",
513
+ },
514
+ ],
515
+ internalType: "struct PositionPricingUtils.PositionFundingFees",
516
+ name: "funding",
517
+ type: "tuple",
518
+ },
519
+ {
520
+ components: [
521
+ {
522
+ internalType: "uint256",
523
+ name: "borrowingFeeUsd",
524
+ type: "uint256",
525
+ },
526
+ {
527
+ internalType: "uint256",
528
+ name: "borrowingFeeAmount",
529
+ type: "uint256",
530
+ },
531
+ {
532
+ internalType: "uint256",
533
+ name: "borrowingFeeReceiverFactor",
534
+ type: "uint256",
535
+ },
536
+ {
537
+ internalType: "uint256",
538
+ name: "borrowingFeeAmountForFeeReceiver",
539
+ type: "uint256",
540
+ },
541
+ ],
542
+ internalType: "struct PositionPricingUtils.PositionBorrowingFees",
543
+ name: "borrowing",
544
+ type: "tuple",
545
+ },
546
+ {
547
+ components: [
548
+ {
549
+ internalType: "address",
550
+ name: "uiFeeReceiver",
551
+ type: "address",
552
+ },
553
+ {
554
+ internalType: "uint256",
555
+ name: "uiFeeReceiverFactor",
556
+ type: "uint256",
557
+ },
558
+ {
559
+ internalType: "uint256",
560
+ name: "uiFeeAmount",
561
+ type: "uint256",
562
+ },
563
+ ],
564
+ internalType: "struct PositionPricingUtils.PositionUiFees",
565
+ name: "ui",
566
+ type: "tuple",
567
+ },
568
+ {
569
+ components: [
570
+ {
571
+ internalType: "uint256",
572
+ name: "liquidationFeeUsd",
573
+ type: "uint256",
574
+ },
575
+ {
576
+ internalType: "uint256",
577
+ name: "liquidationFeeAmount",
578
+ type: "uint256",
579
+ },
580
+ {
581
+ internalType: "uint256",
582
+ name: "liquidationFeeReceiverFactor",
583
+ type: "uint256",
584
+ },
585
+ {
586
+ internalType: "uint256",
587
+ name: "liquidationFeeAmountForFeeReceiver",
588
+ type: "uint256",
589
+ },
590
+ ],
591
+ internalType: "struct PositionPricingUtils.PositionLiquidationFees",
592
+ name: "liquidation",
593
+ type: "tuple",
594
+ },
595
+ {
596
+ components: [
597
+ {
598
+ internalType: "uint256",
599
+ name: "min",
600
+ type: "uint256",
601
+ },
602
+ {
603
+ internalType: "uint256",
604
+ name: "max",
605
+ type: "uint256",
606
+ },
607
+ ],
608
+ internalType: "struct Price.Props",
609
+ name: "collateralTokenPrice",
610
+ type: "tuple",
611
+ },
612
+ {
613
+ internalType: "uint256",
614
+ name: "positionFeeFactor",
615
+ type: "uint256",
616
+ },
617
+ {
618
+ internalType: "uint256",
619
+ name: "protocolFeeAmount",
620
+ type: "uint256",
621
+ },
622
+ {
623
+ internalType: "uint256",
624
+ name: "positionFeeReceiverFactor",
625
+ type: "uint256",
626
+ },
627
+ {
628
+ internalType: "uint256",
629
+ name: "feeReceiverAmount",
630
+ type: "uint256",
631
+ },
632
+ {
633
+ internalType: "uint256",
634
+ name: "feeAmountForPool",
635
+ type: "uint256",
636
+ },
637
+ {
638
+ internalType: "uint256",
639
+ name: "positionFeeAmountForPool",
640
+ type: "uint256",
641
+ },
642
+ {
643
+ internalType: "uint256",
644
+ name: "positionFeeAmount",
645
+ type: "uint256",
646
+ },
647
+ {
648
+ internalType: "uint256",
649
+ name: "totalCostAmountExcludingFunding",
650
+ type: "uint256",
651
+ },
652
+ {
653
+ internalType: "uint256",
654
+ name: "totalCostAmount",
655
+ type: "uint256",
656
+ },
657
+ {
658
+ internalType: "uint256",
659
+ name: "totalDiscountAmount",
660
+ type: "uint256",
661
+ },
662
+ ],
663
+ internalType: "struct PositionPricingUtils.PositionFees",
664
+ name: "fees",
665
+ type: "tuple",
666
+ },
667
+ {
668
+ components: [
669
+ {
670
+ internalType: "int256",
671
+ name: "priceImpactUsd",
672
+ type: "int256",
673
+ },
674
+ {
675
+ internalType: "uint256",
676
+ name: "executionPrice",
677
+ type: "uint256",
678
+ },
679
+ {
680
+ internalType: "bool",
681
+ name: "balanceWasImproved",
682
+ type: "bool",
683
+ },
684
+ {
685
+ internalType: "int256",
686
+ name: "proportionalPendingImpactUsd",
687
+ type: "int256",
688
+ },
689
+ {
690
+ internalType: "int256",
691
+ name: "totalImpactUsd",
692
+ type: "int256",
693
+ },
694
+ {
695
+ internalType: "uint256",
696
+ name: "priceImpactDiffUsd",
697
+ type: "uint256",
698
+ },
699
+ ],
700
+ internalType: "struct ReaderPricingUtils.ExecutionPriceResult",
701
+ name: "executionPriceResult",
702
+ type: "tuple",
703
+ },
704
+ {
705
+ internalType: "int256",
706
+ name: "basePnlUsd",
707
+ type: "int256",
708
+ },
709
+ {
710
+ internalType: "int256",
711
+ name: "uncappedBasePnlUsd",
712
+ type: "int256",
713
+ },
714
+ {
715
+ internalType: "int256",
716
+ name: "pnlAfterPriceImpactUsd",
717
+ type: "int256",
718
+ },
719
+ ],
720
+ internalType: "struct ReaderPositionUtils.PositionInfo[]",
721
+ name: "",
722
+ type: "tuple[]",
723
+ },
724
+ ],
725
+ stateMutability: "view",
726
+ type: "function",
727
+ },
728
+ {
729
+ inputs: [
730
+ {
731
+ internalType: "contract DataStore",
732
+ name: "dataStore",
733
+ type: "address",
734
+ },
735
+ {
736
+ internalType: "address",
737
+ name: "account",
738
+ type: "address",
739
+ },
740
+ {
741
+ internalType: "uint256",
742
+ name: "start",
743
+ type: "uint256",
744
+ },
745
+ {
746
+ internalType: "uint256",
747
+ name: "end",
748
+ type: "uint256",
749
+ },
750
+ ],
751
+ name: "getAccountPositions",
752
+ outputs: [
753
+ {
754
+ components: [
755
+ {
756
+ components: [
757
+ {
758
+ internalType: "address",
759
+ name: "account",
760
+ type: "address",
761
+ },
762
+ {
763
+ internalType: "address",
764
+ name: "market",
765
+ type: "address",
766
+ },
767
+ {
768
+ internalType: "address",
769
+ name: "collateralToken",
770
+ type: "address",
771
+ },
772
+ ],
773
+ internalType: "struct Position.Addresses",
774
+ name: "addresses",
775
+ type: "tuple",
776
+ },
777
+ {
778
+ components: [
779
+ {
780
+ internalType: "uint256",
781
+ name: "sizeInUsd",
782
+ type: "uint256",
783
+ },
784
+ {
785
+ internalType: "uint256",
786
+ name: "sizeInTokens",
787
+ type: "uint256",
788
+ },
789
+ {
790
+ internalType: "uint256",
791
+ name: "collateralAmount",
792
+ type: "uint256",
793
+ },
794
+ {
795
+ internalType: "int256",
796
+ name: "pendingImpactAmount",
797
+ type: "int256",
798
+ },
799
+ {
800
+ internalType: "uint256",
801
+ name: "borrowingFactor",
802
+ type: "uint256",
803
+ },
804
+ {
805
+ internalType: "uint256",
806
+ name: "fundingFeeAmountPerSize",
807
+ type: "uint256",
808
+ },
809
+ {
810
+ internalType: "uint256",
811
+ name: "longTokenClaimableFundingAmountPerSize",
812
+ type: "uint256",
813
+ },
814
+ {
815
+ internalType: "uint256",
816
+ name: "shortTokenClaimableFundingAmountPerSize",
817
+ type: "uint256",
818
+ },
819
+ {
820
+ internalType: "uint256",
821
+ name: "increasedAtTime",
822
+ type: "uint256",
823
+ },
824
+ {
825
+ internalType: "uint256",
826
+ name: "decreasedAtTime",
827
+ type: "uint256",
828
+ },
829
+ ],
830
+ internalType: "struct Position.Numbers",
831
+ name: "numbers",
832
+ type: "tuple",
833
+ },
834
+ {
835
+ components: [
836
+ {
837
+ internalType: "bool",
838
+ name: "isLong",
839
+ type: "bool",
840
+ },
841
+ ],
842
+ internalType: "struct Position.Flags",
843
+ name: "flags",
844
+ type: "tuple",
845
+ },
846
+ ],
847
+ internalType: "struct Position.Props[]",
848
+ name: "",
849
+ type: "tuple[]",
850
+ },
851
+ ],
852
+ stateMutability: "view",
853
+ type: "function",
854
+ },
855
+ {
856
+ inputs: [
857
+ {
858
+ internalType: "contract DataStore",
859
+ name: "dataStore",
860
+ type: "address",
861
+ },
862
+ {
863
+ internalType: "address",
864
+ name: "market",
865
+ type: "address",
866
+ },
867
+ {
868
+ internalType: "bool",
869
+ name: "isLong",
870
+ type: "bool",
871
+ },
872
+ {
873
+ components: [
874
+ {
875
+ components: [
876
+ {
877
+ internalType: "uint256",
878
+ name: "min",
879
+ type: "uint256",
880
+ },
881
+ {
882
+ internalType: "uint256",
883
+ name: "max",
884
+ type: "uint256",
885
+ },
886
+ ],
887
+ internalType: "struct Price.Props",
888
+ name: "indexTokenPrice",
889
+ type: "tuple",
890
+ },
891
+ {
892
+ components: [
893
+ {
894
+ internalType: "uint256",
895
+ name: "min",
896
+ type: "uint256",
897
+ },
898
+ {
899
+ internalType: "uint256",
900
+ name: "max",
901
+ type: "uint256",
902
+ },
903
+ ],
904
+ internalType: "struct Price.Props",
905
+ name: "longTokenPrice",
906
+ type: "tuple",
907
+ },
908
+ {
909
+ components: [
910
+ {
911
+ internalType: "uint256",
912
+ name: "min",
913
+ type: "uint256",
914
+ },
915
+ {
916
+ internalType: "uint256",
917
+ name: "max",
918
+ type: "uint256",
919
+ },
920
+ ],
921
+ internalType: "struct Price.Props",
922
+ name: "shortTokenPrice",
923
+ type: "tuple",
924
+ },
925
+ ],
926
+ internalType: "struct MarketUtils.MarketPrices",
927
+ name: "prices",
928
+ type: "tuple",
929
+ },
930
+ ],
931
+ name: "getAdlState",
932
+ outputs: [
933
+ {
934
+ internalType: "uint256",
935
+ name: "",
936
+ type: "uint256",
937
+ },
938
+ {
939
+ internalType: "bool",
940
+ name: "",
941
+ type: "bool",
942
+ },
943
+ {
944
+ internalType: "int256",
945
+ name: "",
946
+ type: "int256",
947
+ },
948
+ {
949
+ internalType: "uint256",
950
+ name: "",
951
+ type: "uint256",
952
+ },
953
+ ],
954
+ stateMutability: "view",
955
+ type: "function",
956
+ },
957
+ {
958
+ inputs: [
959
+ {
960
+ internalType: "contract DataStore",
961
+ name: "dataStore",
962
+ type: "address",
963
+ },
964
+ {
965
+ internalType: "bytes32",
966
+ name: "key",
967
+ type: "bytes32",
968
+ },
969
+ ],
970
+ name: "getDeposit",
971
+ outputs: [
972
+ {
973
+ components: [
974
+ {
975
+ components: [
976
+ {
977
+ internalType: "address",
978
+ name: "account",
979
+ type: "address",
980
+ },
981
+ {
982
+ internalType: "address",
983
+ name: "receiver",
984
+ type: "address",
985
+ },
986
+ {
987
+ internalType: "address",
988
+ name: "callbackContract",
989
+ type: "address",
990
+ },
991
+ {
992
+ internalType: "address",
993
+ name: "uiFeeReceiver",
994
+ type: "address",
995
+ },
996
+ {
997
+ internalType: "address",
998
+ name: "market",
999
+ type: "address",
1000
+ },
1001
+ {
1002
+ internalType: "address",
1003
+ name: "initialLongToken",
1004
+ type: "address",
1005
+ },
1006
+ {
1007
+ internalType: "address",
1008
+ name: "initialShortToken",
1009
+ type: "address",
1010
+ },
1011
+ {
1012
+ internalType: "address[]",
1013
+ name: "longTokenSwapPath",
1014
+ type: "address[]",
1015
+ },
1016
+ {
1017
+ internalType: "address[]",
1018
+ name: "shortTokenSwapPath",
1019
+ type: "address[]",
1020
+ },
1021
+ ],
1022
+ internalType: "struct Deposit.Addresses",
1023
+ name: "addresses",
1024
+ type: "tuple",
1025
+ },
1026
+ {
1027
+ components: [
1028
+ {
1029
+ internalType: "uint256",
1030
+ name: "initialLongTokenAmount",
1031
+ type: "uint256",
1032
+ },
1033
+ {
1034
+ internalType: "uint256",
1035
+ name: "initialShortTokenAmount",
1036
+ type: "uint256",
1037
+ },
1038
+ {
1039
+ internalType: "uint256",
1040
+ name: "minMarketTokens",
1041
+ type: "uint256",
1042
+ },
1043
+ {
1044
+ internalType: "uint256",
1045
+ name: "updatedAtTime",
1046
+ type: "uint256",
1047
+ },
1048
+ {
1049
+ internalType: "uint256",
1050
+ name: "executionFee",
1051
+ type: "uint256",
1052
+ },
1053
+ {
1054
+ internalType: "uint256",
1055
+ name: "callbackGasLimit",
1056
+ type: "uint256",
1057
+ },
1058
+ {
1059
+ internalType: "uint256",
1060
+ name: "srcChainId",
1061
+ type: "uint256",
1062
+ },
1063
+ ],
1064
+ internalType: "struct Deposit.Numbers",
1065
+ name: "numbers",
1066
+ type: "tuple",
1067
+ },
1068
+ {
1069
+ components: [
1070
+ {
1071
+ internalType: "bool",
1072
+ name: "shouldUnwrapNativeToken",
1073
+ type: "bool",
1074
+ },
1075
+ ],
1076
+ internalType: "struct Deposit.Flags",
1077
+ name: "flags",
1078
+ type: "tuple",
1079
+ },
1080
+ {
1081
+ internalType: "bytes32[]",
1082
+ name: "_dataList",
1083
+ type: "bytes32[]",
1084
+ },
1085
+ ],
1086
+ internalType: "struct Deposit.Props",
1087
+ name: "",
1088
+ type: "tuple",
1089
+ },
1090
+ ],
1091
+ stateMutability: "view",
1092
+ type: "function",
1093
+ },
1094
+ {
1095
+ inputs: [
1096
+ {
1097
+ internalType: "contract DataStore",
1098
+ name: "dataStore",
1099
+ type: "address",
1100
+ },
1101
+ {
1102
+ components: [
1103
+ {
1104
+ internalType: "address",
1105
+ name: "marketToken",
1106
+ type: "address",
1107
+ },
1108
+ {
1109
+ internalType: "address",
1110
+ name: "indexToken",
1111
+ type: "address",
1112
+ },
1113
+ {
1114
+ internalType: "address",
1115
+ name: "longToken",
1116
+ type: "address",
1117
+ },
1118
+ {
1119
+ internalType: "address",
1120
+ name: "shortToken",
1121
+ type: "address",
1122
+ },
1123
+ ],
1124
+ internalType: "struct Market.Props",
1125
+ name: "market",
1126
+ type: "tuple",
1127
+ },
1128
+ {
1129
+ components: [
1130
+ {
1131
+ components: [
1132
+ {
1133
+ internalType: "uint256",
1134
+ name: "min",
1135
+ type: "uint256",
1136
+ },
1137
+ {
1138
+ internalType: "uint256",
1139
+ name: "max",
1140
+ type: "uint256",
1141
+ },
1142
+ ],
1143
+ internalType: "struct Price.Props",
1144
+ name: "indexTokenPrice",
1145
+ type: "tuple",
1146
+ },
1147
+ {
1148
+ components: [
1149
+ {
1150
+ internalType: "uint256",
1151
+ name: "min",
1152
+ type: "uint256",
1153
+ },
1154
+ {
1155
+ internalType: "uint256",
1156
+ name: "max",
1157
+ type: "uint256",
1158
+ },
1159
+ ],
1160
+ internalType: "struct Price.Props",
1161
+ name: "longTokenPrice",
1162
+ type: "tuple",
1163
+ },
1164
+ {
1165
+ components: [
1166
+ {
1167
+ internalType: "uint256",
1168
+ name: "min",
1169
+ type: "uint256",
1170
+ },
1171
+ {
1172
+ internalType: "uint256",
1173
+ name: "max",
1174
+ type: "uint256",
1175
+ },
1176
+ ],
1177
+ internalType: "struct Price.Props",
1178
+ name: "shortTokenPrice",
1179
+ type: "tuple",
1180
+ },
1181
+ ],
1182
+ internalType: "struct MarketUtils.MarketPrices",
1183
+ name: "prices",
1184
+ type: "tuple",
1185
+ },
1186
+ {
1187
+ internalType: "uint256",
1188
+ name: "longTokenAmount",
1189
+ type: "uint256",
1190
+ },
1191
+ {
1192
+ internalType: "uint256",
1193
+ name: "shortTokenAmount",
1194
+ type: "uint256",
1195
+ },
1196
+ {
1197
+ internalType: "address",
1198
+ name: "uiFeeReceiver",
1199
+ type: "address",
1200
+ },
1201
+ {
1202
+ internalType: "enum ISwapPricingUtils.SwapPricingType",
1203
+ name: "swapPricingType",
1204
+ type: "uint8",
1205
+ },
1206
+ {
1207
+ internalType: "bool",
1208
+ name: "includeVirtualInventoryImpact",
1209
+ type: "bool",
1210
+ },
1211
+ ],
1212
+ name: "getDepositAmountOut",
1213
+ outputs: [
1214
+ {
1215
+ internalType: "uint256",
1216
+ name: "",
1217
+ type: "uint256",
1218
+ },
1219
+ ],
1220
+ stateMutability: "view",
1221
+ type: "function",
1222
+ },
1223
+ {
1224
+ inputs: [
1225
+ {
1226
+ internalType: "contract DataStore",
1227
+ name: "dataStore",
1228
+ type: "address",
1229
+ },
1230
+ {
1231
+ internalType: "address",
1232
+ name: "marketKey",
1233
+ type: "address",
1234
+ },
1235
+ {
1236
+ components: [
1237
+ {
1238
+ components: [
1239
+ {
1240
+ internalType: "uint256",
1241
+ name: "min",
1242
+ type: "uint256",
1243
+ },
1244
+ {
1245
+ internalType: "uint256",
1246
+ name: "max",
1247
+ type: "uint256",
1248
+ },
1249
+ ],
1250
+ internalType: "struct Price.Props",
1251
+ name: "indexTokenPrice",
1252
+ type: "tuple",
1253
+ },
1254
+ {
1255
+ components: [
1256
+ {
1257
+ internalType: "uint256",
1258
+ name: "min",
1259
+ type: "uint256",
1260
+ },
1261
+ {
1262
+ internalType: "uint256",
1263
+ name: "max",
1264
+ type: "uint256",
1265
+ },
1266
+ ],
1267
+ internalType: "struct Price.Props",
1268
+ name: "longTokenPrice",
1269
+ type: "tuple",
1270
+ },
1271
+ {
1272
+ components: [
1273
+ {
1274
+ internalType: "uint256",
1275
+ name: "min",
1276
+ type: "uint256",
1277
+ },
1278
+ {
1279
+ internalType: "uint256",
1280
+ name: "max",
1281
+ type: "uint256",
1282
+ },
1283
+ ],
1284
+ internalType: "struct Price.Props",
1285
+ name: "shortTokenPrice",
1286
+ type: "tuple",
1287
+ },
1288
+ ],
1289
+ internalType: "struct MarketUtils.MarketPrices",
1290
+ name: "prices",
1291
+ type: "tuple",
1292
+ },
1293
+ {
1294
+ internalType: "uint256",
1295
+ name: "positionSizeInUsd",
1296
+ type: "uint256",
1297
+ },
1298
+ {
1299
+ internalType: "uint256",
1300
+ name: "positionSizeInTokens",
1301
+ type: "uint256",
1302
+ },
1303
+ {
1304
+ internalType: "int256",
1305
+ name: "sizeDeltaUsd",
1306
+ type: "int256",
1307
+ },
1308
+ {
1309
+ internalType: "int256",
1310
+ name: "pendingImpactAmount",
1311
+ type: "int256",
1312
+ },
1313
+ {
1314
+ internalType: "bool",
1315
+ name: "isLong",
1316
+ type: "bool",
1317
+ },
1318
+ ],
1319
+ name: "getExecutionPrice",
1320
+ outputs: [
1321
+ {
1322
+ components: [
1323
+ {
1324
+ internalType: "int256",
1325
+ name: "priceImpactUsd",
1326
+ type: "int256",
1327
+ },
1328
+ {
1329
+ internalType: "uint256",
1330
+ name: "executionPrice",
1331
+ type: "uint256",
1332
+ },
1333
+ {
1334
+ internalType: "bool",
1335
+ name: "balanceWasImproved",
1336
+ type: "bool",
1337
+ },
1338
+ {
1339
+ internalType: "int256",
1340
+ name: "proportionalPendingImpactUsd",
1341
+ type: "int256",
1342
+ },
1343
+ {
1344
+ internalType: "int256",
1345
+ name: "totalImpactUsd",
1346
+ type: "int256",
1347
+ },
1348
+ {
1349
+ internalType: "uint256",
1350
+ name: "priceImpactDiffUsd",
1351
+ type: "uint256",
1352
+ },
1353
+ ],
1354
+ internalType: "struct ReaderPricingUtils.ExecutionPriceResult",
1355
+ name: "",
1356
+ type: "tuple",
1357
+ },
1358
+ ],
1359
+ stateMutability: "view",
1360
+ type: "function",
1361
+ },
1362
+ {
1363
+ inputs: [
1364
+ {
1365
+ internalType: "contract DataStore",
1366
+ name: "dataStore",
1367
+ type: "address",
1368
+ },
1369
+ {
1370
+ internalType: "address",
1371
+ name: "key",
1372
+ type: "address",
1373
+ },
1374
+ ],
1375
+ name: "getMarket",
1376
+ outputs: [
1377
+ {
1378
+ components: [
1379
+ {
1380
+ internalType: "address",
1381
+ name: "marketToken",
1382
+ type: "address",
1383
+ },
1384
+ {
1385
+ internalType: "address",
1386
+ name: "indexToken",
1387
+ type: "address",
1388
+ },
1389
+ {
1390
+ internalType: "address",
1391
+ name: "longToken",
1392
+ type: "address",
1393
+ },
1394
+ {
1395
+ internalType: "address",
1396
+ name: "shortToken",
1397
+ type: "address",
1398
+ },
1399
+ ],
1400
+ internalType: "struct Market.Props",
1401
+ name: "",
1402
+ type: "tuple",
1403
+ },
1404
+ ],
1405
+ stateMutability: "view",
1406
+ type: "function",
1407
+ },
1408
+ {
1409
+ inputs: [
1410
+ {
1411
+ internalType: "contract DataStore",
1412
+ name: "dataStore",
1413
+ type: "address",
1414
+ },
1415
+ {
1416
+ internalType: "bytes32",
1417
+ name: "salt",
1418
+ type: "bytes32",
1419
+ },
1420
+ ],
1421
+ name: "getMarketBySalt",
1422
+ outputs: [
1423
+ {
1424
+ components: [
1425
+ {
1426
+ internalType: "address",
1427
+ name: "marketToken",
1428
+ type: "address",
1429
+ },
1430
+ {
1431
+ internalType: "address",
1432
+ name: "indexToken",
1433
+ type: "address",
1434
+ },
1435
+ {
1436
+ internalType: "address",
1437
+ name: "longToken",
1438
+ type: "address",
1439
+ },
1440
+ {
1441
+ internalType: "address",
1442
+ name: "shortToken",
1443
+ type: "address",
1444
+ },
1445
+ ],
1446
+ internalType: "struct Market.Props",
1447
+ name: "",
1448
+ type: "tuple",
1449
+ },
1450
+ ],
1451
+ stateMutability: "view",
1452
+ type: "function",
1453
+ },
1454
+ {
1455
+ inputs: [
1456
+ {
1457
+ internalType: "contract DataStore",
1458
+ name: "dataStore",
1459
+ type: "address",
1460
+ },
1461
+ {
1462
+ components: [
1463
+ {
1464
+ components: [
1465
+ {
1466
+ internalType: "uint256",
1467
+ name: "min",
1468
+ type: "uint256",
1469
+ },
1470
+ {
1471
+ internalType: "uint256",
1472
+ name: "max",
1473
+ type: "uint256",
1474
+ },
1475
+ ],
1476
+ internalType: "struct Price.Props",
1477
+ name: "indexTokenPrice",
1478
+ type: "tuple",
1479
+ },
1480
+ {
1481
+ components: [
1482
+ {
1483
+ internalType: "uint256",
1484
+ name: "min",
1485
+ type: "uint256",
1486
+ },
1487
+ {
1488
+ internalType: "uint256",
1489
+ name: "max",
1490
+ type: "uint256",
1491
+ },
1492
+ ],
1493
+ internalType: "struct Price.Props",
1494
+ name: "longTokenPrice",
1495
+ type: "tuple",
1496
+ },
1497
+ {
1498
+ components: [
1499
+ {
1500
+ internalType: "uint256",
1501
+ name: "min",
1502
+ type: "uint256",
1503
+ },
1504
+ {
1505
+ internalType: "uint256",
1506
+ name: "max",
1507
+ type: "uint256",
1508
+ },
1509
+ ],
1510
+ internalType: "struct Price.Props",
1511
+ name: "shortTokenPrice",
1512
+ type: "tuple",
1513
+ },
1514
+ ],
1515
+ internalType: "struct MarketUtils.MarketPrices",
1516
+ name: "prices",
1517
+ type: "tuple",
1518
+ },
1519
+ {
1520
+ internalType: "address",
1521
+ name: "marketKey",
1522
+ type: "address",
1523
+ },
1524
+ ],
1525
+ name: "getMarketInfo",
1526
+ outputs: [
1527
+ {
1528
+ components: [
1529
+ {
1530
+ components: [
1531
+ {
1532
+ internalType: "address",
1533
+ name: "marketToken",
1534
+ type: "address",
1535
+ },
1536
+ {
1537
+ internalType: "address",
1538
+ name: "indexToken",
1539
+ type: "address",
1540
+ },
1541
+ {
1542
+ internalType: "address",
1543
+ name: "longToken",
1544
+ type: "address",
1545
+ },
1546
+ {
1547
+ internalType: "address",
1548
+ name: "shortToken",
1549
+ type: "address",
1550
+ },
1551
+ ],
1552
+ internalType: "struct Market.Props",
1553
+ name: "market",
1554
+ type: "tuple",
1555
+ },
1556
+ {
1557
+ internalType: "uint256",
1558
+ name: "borrowingFactorPerSecondForLongs",
1559
+ type: "uint256",
1560
+ },
1561
+ {
1562
+ internalType: "uint256",
1563
+ name: "borrowingFactorPerSecondForShorts",
1564
+ type: "uint256",
1565
+ },
1566
+ {
1567
+ components: [
1568
+ {
1569
+ components: [
1570
+ {
1571
+ components: [
1572
+ {
1573
+ internalType: "uint256",
1574
+ name: "longToken",
1575
+ type: "uint256",
1576
+ },
1577
+ {
1578
+ internalType: "uint256",
1579
+ name: "shortToken",
1580
+ type: "uint256",
1581
+ },
1582
+ ],
1583
+ internalType: "struct MarketUtils.CollateralType",
1584
+ name: "long",
1585
+ type: "tuple",
1586
+ },
1587
+ {
1588
+ components: [
1589
+ {
1590
+ internalType: "uint256",
1591
+ name: "longToken",
1592
+ type: "uint256",
1593
+ },
1594
+ {
1595
+ internalType: "uint256",
1596
+ name: "shortToken",
1597
+ type: "uint256",
1598
+ },
1599
+ ],
1600
+ internalType: "struct MarketUtils.CollateralType",
1601
+ name: "short",
1602
+ type: "tuple",
1603
+ },
1604
+ ],
1605
+ internalType: "struct MarketUtils.PositionType",
1606
+ name: "fundingFeeAmountPerSize",
1607
+ type: "tuple",
1608
+ },
1609
+ {
1610
+ components: [
1611
+ {
1612
+ components: [
1613
+ {
1614
+ internalType: "uint256",
1615
+ name: "longToken",
1616
+ type: "uint256",
1617
+ },
1618
+ {
1619
+ internalType: "uint256",
1620
+ name: "shortToken",
1621
+ type: "uint256",
1622
+ },
1623
+ ],
1624
+ internalType: "struct MarketUtils.CollateralType",
1625
+ name: "long",
1626
+ type: "tuple",
1627
+ },
1628
+ {
1629
+ components: [
1630
+ {
1631
+ internalType: "uint256",
1632
+ name: "longToken",
1633
+ type: "uint256",
1634
+ },
1635
+ {
1636
+ internalType: "uint256",
1637
+ name: "shortToken",
1638
+ type: "uint256",
1639
+ },
1640
+ ],
1641
+ internalType: "struct MarketUtils.CollateralType",
1642
+ name: "short",
1643
+ type: "tuple",
1644
+ },
1645
+ ],
1646
+ internalType: "struct MarketUtils.PositionType",
1647
+ name: "claimableFundingAmountPerSize",
1648
+ type: "tuple",
1649
+ },
1650
+ ],
1651
+ internalType: "struct ReaderUtils.BaseFundingValues",
1652
+ name: "baseFunding",
1653
+ type: "tuple",
1654
+ },
1655
+ {
1656
+ components: [
1657
+ {
1658
+ internalType: "bool",
1659
+ name: "longsPayShorts",
1660
+ type: "bool",
1661
+ },
1662
+ {
1663
+ internalType: "uint256",
1664
+ name: "fundingFactorPerSecond",
1665
+ type: "uint256",
1666
+ },
1667
+ {
1668
+ internalType: "int256",
1669
+ name: "nextSavedFundingFactorPerSecond",
1670
+ type: "int256",
1671
+ },
1672
+ {
1673
+ components: [
1674
+ {
1675
+ components: [
1676
+ {
1677
+ internalType: "uint256",
1678
+ name: "longToken",
1679
+ type: "uint256",
1680
+ },
1681
+ {
1682
+ internalType: "uint256",
1683
+ name: "shortToken",
1684
+ type: "uint256",
1685
+ },
1686
+ ],
1687
+ internalType: "struct MarketUtils.CollateralType",
1688
+ name: "long",
1689
+ type: "tuple",
1690
+ },
1691
+ {
1692
+ components: [
1693
+ {
1694
+ internalType: "uint256",
1695
+ name: "longToken",
1696
+ type: "uint256",
1697
+ },
1698
+ {
1699
+ internalType: "uint256",
1700
+ name: "shortToken",
1701
+ type: "uint256",
1702
+ },
1703
+ ],
1704
+ internalType: "struct MarketUtils.CollateralType",
1705
+ name: "short",
1706
+ type: "tuple",
1707
+ },
1708
+ ],
1709
+ internalType: "struct MarketUtils.PositionType",
1710
+ name: "fundingFeeAmountPerSizeDelta",
1711
+ type: "tuple",
1712
+ },
1713
+ {
1714
+ components: [
1715
+ {
1716
+ components: [
1717
+ {
1718
+ internalType: "uint256",
1719
+ name: "longToken",
1720
+ type: "uint256",
1721
+ },
1722
+ {
1723
+ internalType: "uint256",
1724
+ name: "shortToken",
1725
+ type: "uint256",
1726
+ },
1727
+ ],
1728
+ internalType: "struct MarketUtils.CollateralType",
1729
+ name: "long",
1730
+ type: "tuple",
1731
+ },
1732
+ {
1733
+ components: [
1734
+ {
1735
+ internalType: "uint256",
1736
+ name: "longToken",
1737
+ type: "uint256",
1738
+ },
1739
+ {
1740
+ internalType: "uint256",
1741
+ name: "shortToken",
1742
+ type: "uint256",
1743
+ },
1744
+ ],
1745
+ internalType: "struct MarketUtils.CollateralType",
1746
+ name: "short",
1747
+ type: "tuple",
1748
+ },
1749
+ ],
1750
+ internalType: "struct MarketUtils.PositionType",
1751
+ name: "claimableFundingAmountPerSizeDelta",
1752
+ type: "tuple",
1753
+ },
1754
+ ],
1755
+ internalType: "struct MarketUtils.GetNextFundingAmountPerSizeResult",
1756
+ name: "nextFunding",
1757
+ type: "tuple",
1758
+ },
1759
+ {
1760
+ components: [
1761
+ {
1762
+ internalType: "uint256",
1763
+ name: "virtualPoolAmountForLongToken",
1764
+ type: "uint256",
1765
+ },
1766
+ {
1767
+ internalType: "uint256",
1768
+ name: "virtualPoolAmountForShortToken",
1769
+ type: "uint256",
1770
+ },
1771
+ {
1772
+ internalType: "int256",
1773
+ name: "virtualInventoryForPositions",
1774
+ type: "int256",
1775
+ },
1776
+ ],
1777
+ internalType: "struct ReaderUtils.VirtualInventory",
1778
+ name: "virtualInventory",
1779
+ type: "tuple",
1780
+ },
1781
+ {
1782
+ internalType: "bool",
1783
+ name: "isDisabled",
1784
+ type: "bool",
1785
+ },
1786
+ ],
1787
+ internalType: "struct ReaderUtils.MarketInfo",
1788
+ name: "",
1789
+ type: "tuple",
1790
+ },
1791
+ ],
1792
+ stateMutability: "view",
1793
+ type: "function",
1794
+ },
1795
+ {
1796
+ inputs: [
1797
+ {
1798
+ internalType: "contract DataStore",
1799
+ name: "dataStore",
1800
+ type: "address",
1801
+ },
1802
+ {
1803
+ components: [
1804
+ {
1805
+ components: [
1806
+ {
1807
+ internalType: "uint256",
1808
+ name: "min",
1809
+ type: "uint256",
1810
+ },
1811
+ {
1812
+ internalType: "uint256",
1813
+ name: "max",
1814
+ type: "uint256",
1815
+ },
1816
+ ],
1817
+ internalType: "struct Price.Props",
1818
+ name: "indexTokenPrice",
1819
+ type: "tuple",
1820
+ },
1821
+ {
1822
+ components: [
1823
+ {
1824
+ internalType: "uint256",
1825
+ name: "min",
1826
+ type: "uint256",
1827
+ },
1828
+ {
1829
+ internalType: "uint256",
1830
+ name: "max",
1831
+ type: "uint256",
1832
+ },
1833
+ ],
1834
+ internalType: "struct Price.Props",
1835
+ name: "longTokenPrice",
1836
+ type: "tuple",
1837
+ },
1838
+ {
1839
+ components: [
1840
+ {
1841
+ internalType: "uint256",
1842
+ name: "min",
1843
+ type: "uint256",
1844
+ },
1845
+ {
1846
+ internalType: "uint256",
1847
+ name: "max",
1848
+ type: "uint256",
1849
+ },
1850
+ ],
1851
+ internalType: "struct Price.Props",
1852
+ name: "shortTokenPrice",
1853
+ type: "tuple",
1854
+ },
1855
+ ],
1856
+ internalType: "struct MarketUtils.MarketPrices[]",
1857
+ name: "marketPricesList",
1858
+ type: "tuple[]",
1859
+ },
1860
+ {
1861
+ internalType: "uint256",
1862
+ name: "start",
1863
+ type: "uint256",
1864
+ },
1865
+ {
1866
+ internalType: "uint256",
1867
+ name: "end",
1868
+ type: "uint256",
1869
+ },
1870
+ ],
1871
+ name: "getMarketInfoList",
1872
+ outputs: [
1873
+ {
1874
+ components: [
1875
+ {
1876
+ components: [
1877
+ {
1878
+ internalType: "address",
1879
+ name: "marketToken",
1880
+ type: "address",
1881
+ },
1882
+ {
1883
+ internalType: "address",
1884
+ name: "indexToken",
1885
+ type: "address",
1886
+ },
1887
+ {
1888
+ internalType: "address",
1889
+ name: "longToken",
1890
+ type: "address",
1891
+ },
1892
+ {
1893
+ internalType: "address",
1894
+ name: "shortToken",
1895
+ type: "address",
1896
+ },
1897
+ ],
1898
+ internalType: "struct Market.Props",
1899
+ name: "market",
1900
+ type: "tuple",
1901
+ },
1902
+ {
1903
+ internalType: "uint256",
1904
+ name: "borrowingFactorPerSecondForLongs",
1905
+ type: "uint256",
1906
+ },
1907
+ {
1908
+ internalType: "uint256",
1909
+ name: "borrowingFactorPerSecondForShorts",
1910
+ type: "uint256",
1911
+ },
1912
+ {
1913
+ components: [
1914
+ {
1915
+ components: [
1916
+ {
1917
+ components: [
1918
+ {
1919
+ internalType: "uint256",
1920
+ name: "longToken",
1921
+ type: "uint256",
1922
+ },
1923
+ {
1924
+ internalType: "uint256",
1925
+ name: "shortToken",
1926
+ type: "uint256",
1927
+ },
1928
+ ],
1929
+ internalType: "struct MarketUtils.CollateralType",
1930
+ name: "long",
1931
+ type: "tuple",
1932
+ },
1933
+ {
1934
+ components: [
1935
+ {
1936
+ internalType: "uint256",
1937
+ name: "longToken",
1938
+ type: "uint256",
1939
+ },
1940
+ {
1941
+ internalType: "uint256",
1942
+ name: "shortToken",
1943
+ type: "uint256",
1944
+ },
1945
+ ],
1946
+ internalType: "struct MarketUtils.CollateralType",
1947
+ name: "short",
1948
+ type: "tuple",
1949
+ },
1950
+ ],
1951
+ internalType: "struct MarketUtils.PositionType",
1952
+ name: "fundingFeeAmountPerSize",
1953
+ type: "tuple",
1954
+ },
1955
+ {
1956
+ components: [
1957
+ {
1958
+ components: [
1959
+ {
1960
+ internalType: "uint256",
1961
+ name: "longToken",
1962
+ type: "uint256",
1963
+ },
1964
+ {
1965
+ internalType: "uint256",
1966
+ name: "shortToken",
1967
+ type: "uint256",
1968
+ },
1969
+ ],
1970
+ internalType: "struct MarketUtils.CollateralType",
1971
+ name: "long",
1972
+ type: "tuple",
1973
+ },
1974
+ {
1975
+ components: [
1976
+ {
1977
+ internalType: "uint256",
1978
+ name: "longToken",
1979
+ type: "uint256",
1980
+ },
1981
+ {
1982
+ internalType: "uint256",
1983
+ name: "shortToken",
1984
+ type: "uint256",
1985
+ },
1986
+ ],
1987
+ internalType: "struct MarketUtils.CollateralType",
1988
+ name: "short",
1989
+ type: "tuple",
1990
+ },
1991
+ ],
1992
+ internalType: "struct MarketUtils.PositionType",
1993
+ name: "claimableFundingAmountPerSize",
1994
+ type: "tuple",
1995
+ },
1996
+ ],
1997
+ internalType: "struct ReaderUtils.BaseFundingValues",
1998
+ name: "baseFunding",
1999
+ type: "tuple",
2000
+ },
2001
+ {
2002
+ components: [
2003
+ {
2004
+ internalType: "bool",
2005
+ name: "longsPayShorts",
2006
+ type: "bool",
2007
+ },
2008
+ {
2009
+ internalType: "uint256",
2010
+ name: "fundingFactorPerSecond",
2011
+ type: "uint256",
2012
+ },
2013
+ {
2014
+ internalType: "int256",
2015
+ name: "nextSavedFundingFactorPerSecond",
2016
+ type: "int256",
2017
+ },
2018
+ {
2019
+ components: [
2020
+ {
2021
+ components: [
2022
+ {
2023
+ internalType: "uint256",
2024
+ name: "longToken",
2025
+ type: "uint256",
2026
+ },
2027
+ {
2028
+ internalType: "uint256",
2029
+ name: "shortToken",
2030
+ type: "uint256",
2031
+ },
2032
+ ],
2033
+ internalType: "struct MarketUtils.CollateralType",
2034
+ name: "long",
2035
+ type: "tuple",
2036
+ },
2037
+ {
2038
+ components: [
2039
+ {
2040
+ internalType: "uint256",
2041
+ name: "longToken",
2042
+ type: "uint256",
2043
+ },
2044
+ {
2045
+ internalType: "uint256",
2046
+ name: "shortToken",
2047
+ type: "uint256",
2048
+ },
2049
+ ],
2050
+ internalType: "struct MarketUtils.CollateralType",
2051
+ name: "short",
2052
+ type: "tuple",
2053
+ },
2054
+ ],
2055
+ internalType: "struct MarketUtils.PositionType",
2056
+ name: "fundingFeeAmountPerSizeDelta",
2057
+ type: "tuple",
2058
+ },
2059
+ {
2060
+ components: [
2061
+ {
2062
+ components: [
2063
+ {
2064
+ internalType: "uint256",
2065
+ name: "longToken",
2066
+ type: "uint256",
2067
+ },
2068
+ {
2069
+ internalType: "uint256",
2070
+ name: "shortToken",
2071
+ type: "uint256",
2072
+ },
2073
+ ],
2074
+ internalType: "struct MarketUtils.CollateralType",
2075
+ name: "long",
2076
+ type: "tuple",
2077
+ },
2078
+ {
2079
+ components: [
2080
+ {
2081
+ internalType: "uint256",
2082
+ name: "longToken",
2083
+ type: "uint256",
2084
+ },
2085
+ {
2086
+ internalType: "uint256",
2087
+ name: "shortToken",
2088
+ type: "uint256",
2089
+ },
2090
+ ],
2091
+ internalType: "struct MarketUtils.CollateralType",
2092
+ name: "short",
2093
+ type: "tuple",
2094
+ },
2095
+ ],
2096
+ internalType: "struct MarketUtils.PositionType",
2097
+ name: "claimableFundingAmountPerSizeDelta",
2098
+ type: "tuple",
2099
+ },
2100
+ ],
2101
+ internalType: "struct MarketUtils.GetNextFundingAmountPerSizeResult",
2102
+ name: "nextFunding",
2103
+ type: "tuple",
2104
+ },
2105
+ {
2106
+ components: [
2107
+ {
2108
+ internalType: "uint256",
2109
+ name: "virtualPoolAmountForLongToken",
2110
+ type: "uint256",
2111
+ },
2112
+ {
2113
+ internalType: "uint256",
2114
+ name: "virtualPoolAmountForShortToken",
2115
+ type: "uint256",
2116
+ },
2117
+ {
2118
+ internalType: "int256",
2119
+ name: "virtualInventoryForPositions",
2120
+ type: "int256",
2121
+ },
2122
+ ],
2123
+ internalType: "struct ReaderUtils.VirtualInventory",
2124
+ name: "virtualInventory",
2125
+ type: "tuple",
2126
+ },
2127
+ {
2128
+ internalType: "bool",
2129
+ name: "isDisabled",
2130
+ type: "bool",
2131
+ },
2132
+ ],
2133
+ internalType: "struct ReaderUtils.MarketInfo[]",
2134
+ name: "",
2135
+ type: "tuple[]",
2136
+ },
2137
+ ],
2138
+ stateMutability: "view",
2139
+ type: "function",
2140
+ },
2141
+ {
2142
+ inputs: [
2143
+ {
2144
+ internalType: "contract DataStore",
2145
+ name: "dataStore",
2146
+ type: "address",
2147
+ },
2148
+ {
2149
+ components: [
2150
+ {
2151
+ internalType: "address",
2152
+ name: "marketToken",
2153
+ type: "address",
2154
+ },
2155
+ {
2156
+ internalType: "address",
2157
+ name: "indexToken",
2158
+ type: "address",
2159
+ },
2160
+ {
2161
+ internalType: "address",
2162
+ name: "longToken",
2163
+ type: "address",
2164
+ },
2165
+ {
2166
+ internalType: "address",
2167
+ name: "shortToken",
2168
+ type: "address",
2169
+ },
2170
+ ],
2171
+ internalType: "struct Market.Props",
2172
+ name: "market",
2173
+ type: "tuple",
2174
+ },
2175
+ {
2176
+ components: [
2177
+ {
2178
+ internalType: "uint256",
2179
+ name: "min",
2180
+ type: "uint256",
2181
+ },
2182
+ {
2183
+ internalType: "uint256",
2184
+ name: "max",
2185
+ type: "uint256",
2186
+ },
2187
+ ],
2188
+ internalType: "struct Price.Props",
2189
+ name: "indexTokenPrice",
2190
+ type: "tuple",
2191
+ },
2192
+ {
2193
+ components: [
2194
+ {
2195
+ internalType: "uint256",
2196
+ name: "min",
2197
+ type: "uint256",
2198
+ },
2199
+ {
2200
+ internalType: "uint256",
2201
+ name: "max",
2202
+ type: "uint256",
2203
+ },
2204
+ ],
2205
+ internalType: "struct Price.Props",
2206
+ name: "longTokenPrice",
2207
+ type: "tuple",
2208
+ },
2209
+ {
2210
+ components: [
2211
+ {
2212
+ internalType: "uint256",
2213
+ name: "min",
2214
+ type: "uint256",
2215
+ },
2216
+ {
2217
+ internalType: "uint256",
2218
+ name: "max",
2219
+ type: "uint256",
2220
+ },
2221
+ ],
2222
+ internalType: "struct Price.Props",
2223
+ name: "shortTokenPrice",
2224
+ type: "tuple",
2225
+ },
2226
+ {
2227
+ internalType: "bytes32",
2228
+ name: "pnlFactorType",
2229
+ type: "bytes32",
2230
+ },
2231
+ {
2232
+ internalType: "bool",
2233
+ name: "maximize",
2234
+ type: "bool",
2235
+ },
2236
+ ],
2237
+ name: "getMarketTokenPrice",
2238
+ outputs: [
2239
+ {
2240
+ internalType: "int256",
2241
+ name: "",
2242
+ type: "int256",
2243
+ },
2244
+ {
2245
+ components: [
2246
+ {
2247
+ internalType: "int256",
2248
+ name: "poolValue",
2249
+ type: "int256",
2250
+ },
2251
+ {
2252
+ internalType: "int256",
2253
+ name: "longPnl",
2254
+ type: "int256",
2255
+ },
2256
+ {
2257
+ internalType: "int256",
2258
+ name: "shortPnl",
2259
+ type: "int256",
2260
+ },
2261
+ {
2262
+ internalType: "int256",
2263
+ name: "netPnl",
2264
+ type: "int256",
2265
+ },
2266
+ {
2267
+ internalType: "uint256",
2268
+ name: "longTokenAmount",
2269
+ type: "uint256",
2270
+ },
2271
+ {
2272
+ internalType: "uint256",
2273
+ name: "shortTokenAmount",
2274
+ type: "uint256",
2275
+ },
2276
+ {
2277
+ internalType: "uint256",
2278
+ name: "longTokenUsd",
2279
+ type: "uint256",
2280
+ },
2281
+ {
2282
+ internalType: "uint256",
2283
+ name: "shortTokenUsd",
2284
+ type: "uint256",
2285
+ },
2286
+ {
2287
+ internalType: "uint256",
2288
+ name: "totalBorrowingFees",
2289
+ type: "uint256",
2290
+ },
2291
+ {
2292
+ internalType: "uint256",
2293
+ name: "borrowingFeePoolFactor",
2294
+ type: "uint256",
2295
+ },
2296
+ {
2297
+ internalType: "uint256",
2298
+ name: "impactPoolAmount",
2299
+ type: "uint256",
2300
+ },
2301
+ {
2302
+ internalType: "uint256",
2303
+ name: "lentImpactPoolAmount",
2304
+ type: "uint256",
2305
+ },
2306
+ ],
2307
+ internalType: "struct MarketPoolValueInfo.Props",
2308
+ name: "",
2309
+ type: "tuple",
2310
+ },
2311
+ ],
2312
+ stateMutability: "view",
2313
+ type: "function",
2314
+ },
2315
+ {
2316
+ inputs: [
2317
+ {
2318
+ internalType: "contract DataStore",
2319
+ name: "dataStore",
2320
+ type: "address",
2321
+ },
2322
+ {
2323
+ internalType: "uint256",
2324
+ name: "start",
2325
+ type: "uint256",
2326
+ },
2327
+ {
2328
+ internalType: "uint256",
2329
+ name: "end",
2330
+ type: "uint256",
2331
+ },
2332
+ ],
2333
+ name: "getMarkets",
2334
+ outputs: [
2335
+ {
2336
+ components: [
2337
+ {
2338
+ internalType: "address",
2339
+ name: "marketToken",
2340
+ type: "address",
2341
+ },
2342
+ {
2343
+ internalType: "address",
2344
+ name: "indexToken",
2345
+ type: "address",
2346
+ },
2347
+ {
2348
+ internalType: "address",
2349
+ name: "longToken",
2350
+ type: "address",
2351
+ },
2352
+ {
2353
+ internalType: "address",
2354
+ name: "shortToken",
2355
+ type: "address",
2356
+ },
2357
+ ],
2358
+ internalType: "struct Market.Props[]",
2359
+ name: "",
2360
+ type: "tuple[]",
2361
+ },
2362
+ ],
2363
+ stateMutability: "view",
2364
+ type: "function",
2365
+ },
2366
+ {
2367
+ inputs: [
2368
+ {
2369
+ internalType: "contract DataStore",
2370
+ name: "dataStore",
2371
+ type: "address",
2372
+ },
2373
+ {
2374
+ components: [
2375
+ {
2376
+ internalType: "address",
2377
+ name: "marketToken",
2378
+ type: "address",
2379
+ },
2380
+ {
2381
+ internalType: "address",
2382
+ name: "indexToken",
2383
+ type: "address",
2384
+ },
2385
+ {
2386
+ internalType: "address",
2387
+ name: "longToken",
2388
+ type: "address",
2389
+ },
2390
+ {
2391
+ internalType: "address",
2392
+ name: "shortToken",
2393
+ type: "address",
2394
+ },
2395
+ ],
2396
+ internalType: "struct Market.Props",
2397
+ name: "market",
2398
+ type: "tuple",
2399
+ },
2400
+ {
2401
+ components: [
2402
+ {
2403
+ internalType: "uint256",
2404
+ name: "min",
2405
+ type: "uint256",
2406
+ },
2407
+ {
2408
+ internalType: "uint256",
2409
+ name: "max",
2410
+ type: "uint256",
2411
+ },
2412
+ ],
2413
+ internalType: "struct Price.Props",
2414
+ name: "indexTokenPrice",
2415
+ type: "tuple",
2416
+ },
2417
+ {
2418
+ internalType: "bool",
2419
+ name: "maximize",
2420
+ type: "bool",
2421
+ },
2422
+ ],
2423
+ name: "getNetPnl",
2424
+ outputs: [
2425
+ {
2426
+ internalType: "int256",
2427
+ name: "",
2428
+ type: "int256",
2429
+ },
2430
+ ],
2431
+ stateMutability: "view",
2432
+ type: "function",
2433
+ },
2434
+ {
2435
+ inputs: [
2436
+ {
2437
+ internalType: "contract DataStore",
2438
+ name: "dataStore",
2439
+ type: "address",
2440
+ },
2441
+ {
2442
+ components: [
2443
+ {
2444
+ internalType: "address",
2445
+ name: "marketToken",
2446
+ type: "address",
2447
+ },
2448
+ {
2449
+ internalType: "address",
2450
+ name: "indexToken",
2451
+ type: "address",
2452
+ },
2453
+ {
2454
+ internalType: "address",
2455
+ name: "longToken",
2456
+ type: "address",
2457
+ },
2458
+ {
2459
+ internalType: "address",
2460
+ name: "shortToken",
2461
+ type: "address",
2462
+ },
2463
+ ],
2464
+ internalType: "struct Market.Props",
2465
+ name: "market",
2466
+ type: "tuple",
2467
+ },
2468
+ {
2469
+ components: [
2470
+ {
2471
+ internalType: "uint256",
2472
+ name: "min",
2473
+ type: "uint256",
2474
+ },
2475
+ {
2476
+ internalType: "uint256",
2477
+ name: "max",
2478
+ type: "uint256",
2479
+ },
2480
+ ],
2481
+ internalType: "struct Price.Props",
2482
+ name: "indexTokenPrice",
2483
+ type: "tuple",
2484
+ },
2485
+ {
2486
+ internalType: "bool",
2487
+ name: "isLong",
2488
+ type: "bool",
2489
+ },
2490
+ {
2491
+ internalType: "bool",
2492
+ name: "maximize",
2493
+ type: "bool",
2494
+ },
2495
+ ],
2496
+ name: "getOpenInterestWithPnl",
2497
+ outputs: [
2498
+ {
2499
+ internalType: "int256",
2500
+ name: "",
2501
+ type: "int256",
2502
+ },
2503
+ ],
2504
+ stateMutability: "view",
2505
+ type: "function",
2506
+ },
2507
+ {
2508
+ inputs: [
2509
+ {
2510
+ internalType: "contract DataStore",
2511
+ name: "dataStore",
2512
+ type: "address",
2513
+ },
2514
+ {
2515
+ internalType: "bytes32",
2516
+ name: "key",
2517
+ type: "bytes32",
2518
+ },
2519
+ ],
2520
+ name: "getOrder",
2521
+ outputs: [
2522
+ {
2523
+ components: [
2524
+ {
2525
+ components: [
2526
+ {
2527
+ internalType: "address",
2528
+ name: "account",
2529
+ type: "address",
2530
+ },
2531
+ {
2532
+ internalType: "address",
2533
+ name: "receiver",
2534
+ type: "address",
2535
+ },
2536
+ {
2537
+ internalType: "address",
2538
+ name: "cancellationReceiver",
2539
+ type: "address",
2540
+ },
2541
+ {
2542
+ internalType: "address",
2543
+ name: "callbackContract",
2544
+ type: "address",
2545
+ },
2546
+ {
2547
+ internalType: "address",
2548
+ name: "uiFeeReceiver",
2549
+ type: "address",
2550
+ },
2551
+ {
2552
+ internalType: "address",
2553
+ name: "market",
2554
+ type: "address",
2555
+ },
2556
+ {
2557
+ internalType: "address",
2558
+ name: "initialCollateralToken",
2559
+ type: "address",
2560
+ },
2561
+ {
2562
+ internalType: "address[]",
2563
+ name: "swapPath",
2564
+ type: "address[]",
2565
+ },
2566
+ ],
2567
+ internalType: "struct Order.Addresses",
2568
+ name: "addresses",
2569
+ type: "tuple",
2570
+ },
2571
+ {
2572
+ components: [
2573
+ {
2574
+ internalType: "enum Order.OrderType",
2575
+ name: "orderType",
2576
+ type: "uint8",
2577
+ },
2578
+ {
2579
+ internalType: "enum Order.DecreasePositionSwapType",
2580
+ name: "decreasePositionSwapType",
2581
+ type: "uint8",
2582
+ },
2583
+ {
2584
+ internalType: "uint256",
2585
+ name: "sizeDeltaUsd",
2586
+ type: "uint256",
2587
+ },
2588
+ {
2589
+ internalType: "uint256",
2590
+ name: "initialCollateralDeltaAmount",
2591
+ type: "uint256",
2592
+ },
2593
+ {
2594
+ internalType: "uint256",
2595
+ name: "triggerPrice",
2596
+ type: "uint256",
2597
+ },
2598
+ {
2599
+ internalType: "uint256",
2600
+ name: "acceptablePrice",
2601
+ type: "uint256",
2602
+ },
2603
+ {
2604
+ internalType: "uint256",
2605
+ name: "executionFee",
2606
+ type: "uint256",
2607
+ },
2608
+ {
2609
+ internalType: "uint256",
2610
+ name: "callbackGasLimit",
2611
+ type: "uint256",
2612
+ },
2613
+ {
2614
+ internalType: "uint256",
2615
+ name: "minOutputAmount",
2616
+ type: "uint256",
2617
+ },
2618
+ {
2619
+ internalType: "uint256",
2620
+ name: "updatedAtTime",
2621
+ type: "uint256",
2622
+ },
2623
+ {
2624
+ internalType: "uint256",
2625
+ name: "validFromTime",
2626
+ type: "uint256",
2627
+ },
2628
+ {
2629
+ internalType: "uint256",
2630
+ name: "srcChainId",
2631
+ type: "uint256",
2632
+ },
2633
+ ],
2634
+ internalType: "struct Order.Numbers",
2635
+ name: "numbers",
2636
+ type: "tuple",
2637
+ },
2638
+ {
2639
+ components: [
2640
+ {
2641
+ internalType: "bool",
2642
+ name: "isLong",
2643
+ type: "bool",
2644
+ },
2645
+ {
2646
+ internalType: "bool",
2647
+ name: "shouldUnwrapNativeToken",
2648
+ type: "bool",
2649
+ },
2650
+ {
2651
+ internalType: "bool",
2652
+ name: "isFrozen",
2653
+ type: "bool",
2654
+ },
2655
+ {
2656
+ internalType: "bool",
2657
+ name: "autoCancel",
2658
+ type: "bool",
2659
+ },
2660
+ ],
2661
+ internalType: "struct Order.Flags",
2662
+ name: "flags",
2663
+ type: "tuple",
2664
+ },
2665
+ {
2666
+ internalType: "bytes32[]",
2667
+ name: "_dataList",
2668
+ type: "bytes32[]",
2669
+ },
2670
+ ],
2671
+ internalType: "struct Order.Props",
2672
+ name: "",
2673
+ type: "tuple",
2674
+ },
2675
+ ],
2676
+ stateMutability: "view",
2677
+ type: "function",
2678
+ },
2679
+ {
2680
+ inputs: [
2681
+ {
2682
+ internalType: "contract DataStore",
2683
+ name: "dataStore",
2684
+ type: "address",
2685
+ },
2686
+ {
2687
+ internalType: "address",
2688
+ name: "market",
2689
+ type: "address",
2690
+ },
2691
+ ],
2692
+ name: "getPendingPositionImpactPoolDistributionAmount",
2693
+ outputs: [
2694
+ {
2695
+ internalType: "uint256",
2696
+ name: "",
2697
+ type: "uint256",
2698
+ },
2699
+ {
2700
+ internalType: "uint256",
2701
+ name: "",
2702
+ type: "uint256",
2703
+ },
2704
+ ],
2705
+ stateMutability: "view",
2706
+ type: "function",
2707
+ },
2708
+ {
2709
+ inputs: [
2710
+ {
2711
+ internalType: "contract DataStore",
2712
+ name: "dataStore",
2713
+ type: "address",
2714
+ },
2715
+ {
2716
+ components: [
2717
+ {
2718
+ internalType: "address",
2719
+ name: "marketToken",
2720
+ type: "address",
2721
+ },
2722
+ {
2723
+ internalType: "address",
2724
+ name: "indexToken",
2725
+ type: "address",
2726
+ },
2727
+ {
2728
+ internalType: "address",
2729
+ name: "longToken",
2730
+ type: "address",
2731
+ },
2732
+ {
2733
+ internalType: "address",
2734
+ name: "shortToken",
2735
+ type: "address",
2736
+ },
2737
+ ],
2738
+ internalType: "struct Market.Props",
2739
+ name: "market",
2740
+ type: "tuple",
2741
+ },
2742
+ {
2743
+ components: [
2744
+ {
2745
+ internalType: "uint256",
2746
+ name: "min",
2747
+ type: "uint256",
2748
+ },
2749
+ {
2750
+ internalType: "uint256",
2751
+ name: "max",
2752
+ type: "uint256",
2753
+ },
2754
+ ],
2755
+ internalType: "struct Price.Props",
2756
+ name: "indexTokenPrice",
2757
+ type: "tuple",
2758
+ },
2759
+ {
2760
+ internalType: "bool",
2761
+ name: "isLong",
2762
+ type: "bool",
2763
+ },
2764
+ {
2765
+ internalType: "bool",
2766
+ name: "maximize",
2767
+ type: "bool",
2768
+ },
2769
+ ],
2770
+ name: "getPnl",
2771
+ outputs: [
2772
+ {
2773
+ internalType: "int256",
2774
+ name: "",
2775
+ type: "int256",
2776
+ },
2777
+ ],
2778
+ stateMutability: "view",
2779
+ type: "function",
2780
+ },
2781
+ {
2782
+ inputs: [
2783
+ {
2784
+ internalType: "contract DataStore",
2785
+ name: "dataStore",
2786
+ type: "address",
2787
+ },
2788
+ {
2789
+ internalType: "address",
2790
+ name: "marketAddress",
2791
+ type: "address",
2792
+ },
2793
+ {
2794
+ components: [
2795
+ {
2796
+ components: [
2797
+ {
2798
+ internalType: "uint256",
2799
+ name: "min",
2800
+ type: "uint256",
2801
+ },
2802
+ {
2803
+ internalType: "uint256",
2804
+ name: "max",
2805
+ type: "uint256",
2806
+ },
2807
+ ],
2808
+ internalType: "struct Price.Props",
2809
+ name: "indexTokenPrice",
2810
+ type: "tuple",
2811
+ },
2812
+ {
2813
+ components: [
2814
+ {
2815
+ internalType: "uint256",
2816
+ name: "min",
2817
+ type: "uint256",
2818
+ },
2819
+ {
2820
+ internalType: "uint256",
2821
+ name: "max",
2822
+ type: "uint256",
2823
+ },
2824
+ ],
2825
+ internalType: "struct Price.Props",
2826
+ name: "longTokenPrice",
2827
+ type: "tuple",
2828
+ },
2829
+ {
2830
+ components: [
2831
+ {
2832
+ internalType: "uint256",
2833
+ name: "min",
2834
+ type: "uint256",
2835
+ },
2836
+ {
2837
+ internalType: "uint256",
2838
+ name: "max",
2839
+ type: "uint256",
2840
+ },
2841
+ ],
2842
+ internalType: "struct Price.Props",
2843
+ name: "shortTokenPrice",
2844
+ type: "tuple",
2845
+ },
2846
+ ],
2847
+ internalType: "struct MarketUtils.MarketPrices",
2848
+ name: "prices",
2849
+ type: "tuple",
2850
+ },
2851
+ {
2852
+ internalType: "bool",
2853
+ name: "isLong",
2854
+ type: "bool",
2855
+ },
2856
+ {
2857
+ internalType: "bool",
2858
+ name: "maximize",
2859
+ type: "bool",
2860
+ },
2861
+ ],
2862
+ name: "getPnlToPoolFactor",
2863
+ outputs: [
2864
+ {
2865
+ internalType: "int256",
2866
+ name: "",
2867
+ type: "int256",
2868
+ },
2869
+ ],
2870
+ stateMutability: "view",
2871
+ type: "function",
2872
+ },
2873
+ {
2874
+ inputs: [
2875
+ {
2876
+ internalType: "contract DataStore",
2877
+ name: "dataStore",
2878
+ type: "address",
2879
+ },
2880
+ {
2881
+ internalType: "bytes32",
2882
+ name: "key",
2883
+ type: "bytes32",
2884
+ },
2885
+ ],
2886
+ name: "getPosition",
2887
+ outputs: [
2888
+ {
2889
+ components: [
2890
+ {
2891
+ components: [
2892
+ {
2893
+ internalType: "address",
2894
+ name: "account",
2895
+ type: "address",
2896
+ },
2897
+ {
2898
+ internalType: "address",
2899
+ name: "market",
2900
+ type: "address",
2901
+ },
2902
+ {
2903
+ internalType: "address",
2904
+ name: "collateralToken",
2905
+ type: "address",
2906
+ },
2907
+ ],
2908
+ internalType: "struct Position.Addresses",
2909
+ name: "addresses",
2910
+ type: "tuple",
2911
+ },
2912
+ {
2913
+ components: [
2914
+ {
2915
+ internalType: "uint256",
2916
+ name: "sizeInUsd",
2917
+ type: "uint256",
2918
+ },
2919
+ {
2920
+ internalType: "uint256",
2921
+ name: "sizeInTokens",
2922
+ type: "uint256",
2923
+ },
2924
+ {
2925
+ internalType: "uint256",
2926
+ name: "collateralAmount",
2927
+ type: "uint256",
2928
+ },
2929
+ {
2930
+ internalType: "int256",
2931
+ name: "pendingImpactAmount",
2932
+ type: "int256",
2933
+ },
2934
+ {
2935
+ internalType: "uint256",
2936
+ name: "borrowingFactor",
2937
+ type: "uint256",
2938
+ },
2939
+ {
2940
+ internalType: "uint256",
2941
+ name: "fundingFeeAmountPerSize",
2942
+ type: "uint256",
2943
+ },
2944
+ {
2945
+ internalType: "uint256",
2946
+ name: "longTokenClaimableFundingAmountPerSize",
2947
+ type: "uint256",
2948
+ },
2949
+ {
2950
+ internalType: "uint256",
2951
+ name: "shortTokenClaimableFundingAmountPerSize",
2952
+ type: "uint256",
2953
+ },
2954
+ {
2955
+ internalType: "uint256",
2956
+ name: "increasedAtTime",
2957
+ type: "uint256",
2958
+ },
2959
+ {
2960
+ internalType: "uint256",
2961
+ name: "decreasedAtTime",
2962
+ type: "uint256",
2963
+ },
2964
+ ],
2965
+ internalType: "struct Position.Numbers",
2966
+ name: "numbers",
2967
+ type: "tuple",
2968
+ },
2969
+ {
2970
+ components: [
2971
+ {
2972
+ internalType: "bool",
2973
+ name: "isLong",
2974
+ type: "bool",
2975
+ },
2976
+ ],
2977
+ internalType: "struct Position.Flags",
2978
+ name: "flags",
2979
+ type: "tuple",
2980
+ },
2981
+ ],
2982
+ internalType: "struct Position.Props",
2983
+ name: "",
2984
+ type: "tuple",
2985
+ },
2986
+ ],
2987
+ stateMutability: "view",
2988
+ type: "function",
2989
+ },
2990
+ {
2991
+ inputs: [
2992
+ {
2993
+ internalType: "contract DataStore",
2994
+ name: "dataStore",
2995
+ type: "address",
2996
+ },
2997
+ {
2998
+ internalType: "contract IReferralStorage",
2999
+ name: "referralStorage",
3000
+ type: "address",
3001
+ },
3002
+ {
3003
+ internalType: "bytes32",
3004
+ name: "positionKey",
3005
+ type: "bytes32",
3006
+ },
3007
+ {
3008
+ components: [
3009
+ {
3010
+ components: [
3011
+ {
3012
+ internalType: "uint256",
3013
+ name: "min",
3014
+ type: "uint256",
3015
+ },
3016
+ {
3017
+ internalType: "uint256",
3018
+ name: "max",
3019
+ type: "uint256",
3020
+ },
3021
+ ],
3022
+ internalType: "struct Price.Props",
3023
+ name: "indexTokenPrice",
3024
+ type: "tuple",
3025
+ },
3026
+ {
3027
+ components: [
3028
+ {
3029
+ internalType: "uint256",
3030
+ name: "min",
3031
+ type: "uint256",
3032
+ },
3033
+ {
3034
+ internalType: "uint256",
3035
+ name: "max",
3036
+ type: "uint256",
3037
+ },
3038
+ ],
3039
+ internalType: "struct Price.Props",
3040
+ name: "longTokenPrice",
3041
+ type: "tuple",
3042
+ },
3043
+ {
3044
+ components: [
3045
+ {
3046
+ internalType: "uint256",
3047
+ name: "min",
3048
+ type: "uint256",
3049
+ },
3050
+ {
3051
+ internalType: "uint256",
3052
+ name: "max",
3053
+ type: "uint256",
3054
+ },
3055
+ ],
3056
+ internalType: "struct Price.Props",
3057
+ name: "shortTokenPrice",
3058
+ type: "tuple",
3059
+ },
3060
+ ],
3061
+ internalType: "struct MarketUtils.MarketPrices",
3062
+ name: "prices",
3063
+ type: "tuple",
3064
+ },
3065
+ {
3066
+ internalType: "uint256",
3067
+ name: "sizeDeltaUsd",
3068
+ type: "uint256",
3069
+ },
3070
+ {
3071
+ internalType: "address",
3072
+ name: "uiFeeReceiver",
3073
+ type: "address",
3074
+ },
3075
+ {
3076
+ internalType: "bool",
3077
+ name: "usePositionSizeAsSizeDeltaUsd",
3078
+ type: "bool",
3079
+ },
3080
+ ],
3081
+ name: "getPositionInfo",
3082
+ outputs: [
3083
+ {
3084
+ components: [
3085
+ {
3086
+ internalType: "bytes32",
3087
+ name: "positionKey",
3088
+ type: "bytes32",
3089
+ },
3090
+ {
3091
+ components: [
3092
+ {
3093
+ components: [
3094
+ {
3095
+ internalType: "address",
3096
+ name: "account",
3097
+ type: "address",
3098
+ },
3099
+ {
3100
+ internalType: "address",
3101
+ name: "market",
3102
+ type: "address",
3103
+ },
3104
+ {
3105
+ internalType: "address",
3106
+ name: "collateralToken",
3107
+ type: "address",
3108
+ },
3109
+ ],
3110
+ internalType: "struct Position.Addresses",
3111
+ name: "addresses",
3112
+ type: "tuple",
3113
+ },
3114
+ {
3115
+ components: [
3116
+ {
3117
+ internalType: "uint256",
3118
+ name: "sizeInUsd",
3119
+ type: "uint256",
3120
+ },
3121
+ {
3122
+ internalType: "uint256",
3123
+ name: "sizeInTokens",
3124
+ type: "uint256",
3125
+ },
3126
+ {
3127
+ internalType: "uint256",
3128
+ name: "collateralAmount",
3129
+ type: "uint256",
3130
+ },
3131
+ {
3132
+ internalType: "int256",
3133
+ name: "pendingImpactAmount",
3134
+ type: "int256",
3135
+ },
3136
+ {
3137
+ internalType: "uint256",
3138
+ name: "borrowingFactor",
3139
+ type: "uint256",
3140
+ },
3141
+ {
3142
+ internalType: "uint256",
3143
+ name: "fundingFeeAmountPerSize",
3144
+ type: "uint256",
3145
+ },
3146
+ {
3147
+ internalType: "uint256",
3148
+ name: "longTokenClaimableFundingAmountPerSize",
3149
+ type: "uint256",
3150
+ },
3151
+ {
3152
+ internalType: "uint256",
3153
+ name: "shortTokenClaimableFundingAmountPerSize",
3154
+ type: "uint256",
3155
+ },
3156
+ {
3157
+ internalType: "uint256",
3158
+ name: "increasedAtTime",
3159
+ type: "uint256",
3160
+ },
3161
+ {
3162
+ internalType: "uint256",
3163
+ name: "decreasedAtTime",
3164
+ type: "uint256",
3165
+ },
3166
+ ],
3167
+ internalType: "struct Position.Numbers",
3168
+ name: "numbers",
3169
+ type: "tuple",
3170
+ },
3171
+ {
3172
+ components: [
3173
+ {
3174
+ internalType: "bool",
3175
+ name: "isLong",
3176
+ type: "bool",
3177
+ },
3178
+ ],
3179
+ internalType: "struct Position.Flags",
3180
+ name: "flags",
3181
+ type: "tuple",
3182
+ },
3183
+ ],
3184
+ internalType: "struct Position.Props",
3185
+ name: "position",
3186
+ type: "tuple",
3187
+ },
3188
+ {
3189
+ components: [
3190
+ {
3191
+ components: [
3192
+ {
3193
+ internalType: "bytes32",
3194
+ name: "referralCode",
3195
+ type: "bytes32",
3196
+ },
3197
+ {
3198
+ internalType: "address",
3199
+ name: "affiliate",
3200
+ type: "address",
3201
+ },
3202
+ {
3203
+ internalType: "address",
3204
+ name: "trader",
3205
+ type: "address",
3206
+ },
3207
+ {
3208
+ internalType: "uint256",
3209
+ name: "totalRebateFactor",
3210
+ type: "uint256",
3211
+ },
3212
+ {
3213
+ internalType: "uint256",
3214
+ name: "affiliateRewardFactor",
3215
+ type: "uint256",
3216
+ },
3217
+ {
3218
+ internalType: "uint256",
3219
+ name: "adjustedAffiliateRewardFactor",
3220
+ type: "uint256",
3221
+ },
3222
+ {
3223
+ internalType: "uint256",
3224
+ name: "traderDiscountFactor",
3225
+ type: "uint256",
3226
+ },
3227
+ {
3228
+ internalType: "uint256",
3229
+ name: "totalRebateAmount",
3230
+ type: "uint256",
3231
+ },
3232
+ {
3233
+ internalType: "uint256",
3234
+ name: "traderDiscountAmount",
3235
+ type: "uint256",
3236
+ },
3237
+ {
3238
+ internalType: "uint256",
3239
+ name: "affiliateRewardAmount",
3240
+ type: "uint256",
3241
+ },
3242
+ ],
3243
+ internalType: "struct PositionPricingUtils.PositionReferralFees",
3244
+ name: "referral",
3245
+ type: "tuple",
3246
+ },
3247
+ {
3248
+ components: [
3249
+ {
3250
+ internalType: "uint256",
3251
+ name: "traderTier",
3252
+ type: "uint256",
3253
+ },
3254
+ {
3255
+ internalType: "uint256",
3256
+ name: "traderDiscountFactor",
3257
+ type: "uint256",
3258
+ },
3259
+ {
3260
+ internalType: "uint256",
3261
+ name: "traderDiscountAmount",
3262
+ type: "uint256",
3263
+ },
3264
+ ],
3265
+ internalType: "struct PositionPricingUtils.PositionProFees",
3266
+ name: "pro",
3267
+ type: "tuple",
3268
+ },
3269
+ {
3270
+ components: [
3271
+ {
3272
+ internalType: "uint256",
3273
+ name: "fundingFeeAmount",
3274
+ type: "uint256",
3275
+ },
3276
+ {
3277
+ internalType: "uint256",
3278
+ name: "claimableLongTokenAmount",
3279
+ type: "uint256",
3280
+ },
3281
+ {
3282
+ internalType: "uint256",
3283
+ name: "claimableShortTokenAmount",
3284
+ type: "uint256",
3285
+ },
3286
+ {
3287
+ internalType: "uint256",
3288
+ name: "latestFundingFeeAmountPerSize",
3289
+ type: "uint256",
3290
+ },
3291
+ {
3292
+ internalType: "uint256",
3293
+ name: "latestLongTokenClaimableFundingAmountPerSize",
3294
+ type: "uint256",
3295
+ },
3296
+ {
3297
+ internalType: "uint256",
3298
+ name: "latestShortTokenClaimableFundingAmountPerSize",
3299
+ type: "uint256",
3300
+ },
3301
+ ],
3302
+ internalType: "struct PositionPricingUtils.PositionFundingFees",
3303
+ name: "funding",
3304
+ type: "tuple",
3305
+ },
3306
+ {
3307
+ components: [
3308
+ {
3309
+ internalType: "uint256",
3310
+ name: "borrowingFeeUsd",
3311
+ type: "uint256",
3312
+ },
3313
+ {
3314
+ internalType: "uint256",
3315
+ name: "borrowingFeeAmount",
3316
+ type: "uint256",
3317
+ },
3318
+ {
3319
+ internalType: "uint256",
3320
+ name: "borrowingFeeReceiverFactor",
3321
+ type: "uint256",
3322
+ },
3323
+ {
3324
+ internalType: "uint256",
3325
+ name: "borrowingFeeAmountForFeeReceiver",
3326
+ type: "uint256",
3327
+ },
3328
+ ],
3329
+ internalType: "struct PositionPricingUtils.PositionBorrowingFees",
3330
+ name: "borrowing",
3331
+ type: "tuple",
3332
+ },
3333
+ {
3334
+ components: [
3335
+ {
3336
+ internalType: "address",
3337
+ name: "uiFeeReceiver",
3338
+ type: "address",
3339
+ },
3340
+ {
3341
+ internalType: "uint256",
3342
+ name: "uiFeeReceiverFactor",
3343
+ type: "uint256",
3344
+ },
3345
+ {
3346
+ internalType: "uint256",
3347
+ name: "uiFeeAmount",
3348
+ type: "uint256",
3349
+ },
3350
+ ],
3351
+ internalType: "struct PositionPricingUtils.PositionUiFees",
3352
+ name: "ui",
3353
+ type: "tuple",
3354
+ },
3355
+ {
3356
+ components: [
3357
+ {
3358
+ internalType: "uint256",
3359
+ name: "liquidationFeeUsd",
3360
+ type: "uint256",
3361
+ },
3362
+ {
3363
+ internalType: "uint256",
3364
+ name: "liquidationFeeAmount",
3365
+ type: "uint256",
3366
+ },
3367
+ {
3368
+ internalType: "uint256",
3369
+ name: "liquidationFeeReceiverFactor",
3370
+ type: "uint256",
3371
+ },
3372
+ {
3373
+ internalType: "uint256",
3374
+ name: "liquidationFeeAmountForFeeReceiver",
3375
+ type: "uint256",
3376
+ },
3377
+ ],
3378
+ internalType: "struct PositionPricingUtils.PositionLiquidationFees",
3379
+ name: "liquidation",
3380
+ type: "tuple",
3381
+ },
3382
+ {
3383
+ components: [
3384
+ {
3385
+ internalType: "uint256",
3386
+ name: "min",
3387
+ type: "uint256",
3388
+ },
3389
+ {
3390
+ internalType: "uint256",
3391
+ name: "max",
3392
+ type: "uint256",
3393
+ },
3394
+ ],
3395
+ internalType: "struct Price.Props",
3396
+ name: "collateralTokenPrice",
3397
+ type: "tuple",
3398
+ },
3399
+ {
3400
+ internalType: "uint256",
3401
+ name: "positionFeeFactor",
3402
+ type: "uint256",
3403
+ },
3404
+ {
3405
+ internalType: "uint256",
3406
+ name: "protocolFeeAmount",
3407
+ type: "uint256",
3408
+ },
3409
+ {
3410
+ internalType: "uint256",
3411
+ name: "positionFeeReceiverFactor",
3412
+ type: "uint256",
3413
+ },
3414
+ {
3415
+ internalType: "uint256",
3416
+ name: "feeReceiverAmount",
3417
+ type: "uint256",
3418
+ },
3419
+ {
3420
+ internalType: "uint256",
3421
+ name: "feeAmountForPool",
3422
+ type: "uint256",
3423
+ },
3424
+ {
3425
+ internalType: "uint256",
3426
+ name: "positionFeeAmountForPool",
3427
+ type: "uint256",
3428
+ },
3429
+ {
3430
+ internalType: "uint256",
3431
+ name: "positionFeeAmount",
3432
+ type: "uint256",
3433
+ },
3434
+ {
3435
+ internalType: "uint256",
3436
+ name: "totalCostAmountExcludingFunding",
3437
+ type: "uint256",
3438
+ },
3439
+ {
3440
+ internalType: "uint256",
3441
+ name: "totalCostAmount",
3442
+ type: "uint256",
3443
+ },
3444
+ {
3445
+ internalType: "uint256",
3446
+ name: "totalDiscountAmount",
3447
+ type: "uint256",
3448
+ },
3449
+ ],
3450
+ internalType: "struct PositionPricingUtils.PositionFees",
3451
+ name: "fees",
3452
+ type: "tuple",
3453
+ },
3454
+ {
3455
+ components: [
3456
+ {
3457
+ internalType: "int256",
3458
+ name: "priceImpactUsd",
3459
+ type: "int256",
3460
+ },
3461
+ {
3462
+ internalType: "uint256",
3463
+ name: "executionPrice",
3464
+ type: "uint256",
3465
+ },
3466
+ {
3467
+ internalType: "bool",
3468
+ name: "balanceWasImproved",
3469
+ type: "bool",
3470
+ },
3471
+ {
3472
+ internalType: "int256",
3473
+ name: "proportionalPendingImpactUsd",
3474
+ type: "int256",
3475
+ },
3476
+ {
3477
+ internalType: "int256",
3478
+ name: "totalImpactUsd",
3479
+ type: "int256",
3480
+ },
3481
+ {
3482
+ internalType: "uint256",
3483
+ name: "priceImpactDiffUsd",
3484
+ type: "uint256",
3485
+ },
3486
+ ],
3487
+ internalType: "struct ReaderPricingUtils.ExecutionPriceResult",
3488
+ name: "executionPriceResult",
3489
+ type: "tuple",
3490
+ },
3491
+ {
3492
+ internalType: "int256",
3493
+ name: "basePnlUsd",
3494
+ type: "int256",
3495
+ },
3496
+ {
3497
+ internalType: "int256",
3498
+ name: "uncappedBasePnlUsd",
3499
+ type: "int256",
3500
+ },
3501
+ {
3502
+ internalType: "int256",
3503
+ name: "pnlAfterPriceImpactUsd",
3504
+ type: "int256",
3505
+ },
3506
+ ],
3507
+ internalType: "struct ReaderPositionUtils.PositionInfo",
3508
+ name: "",
3509
+ type: "tuple",
3510
+ },
3511
+ ],
3512
+ stateMutability: "view",
3513
+ type: "function",
3514
+ },
3515
+ {
3516
+ inputs: [
3517
+ {
3518
+ internalType: "contract DataStore",
3519
+ name: "dataStore",
3520
+ type: "address",
3521
+ },
3522
+ {
3523
+ internalType: "contract IReferralStorage",
3524
+ name: "referralStorage",
3525
+ type: "address",
3526
+ },
3527
+ {
3528
+ internalType: "bytes32[]",
3529
+ name: "positionKeys",
3530
+ type: "bytes32[]",
3531
+ },
3532
+ {
3533
+ components: [
3534
+ {
3535
+ components: [
3536
+ {
3537
+ internalType: "uint256",
3538
+ name: "min",
3539
+ type: "uint256",
3540
+ },
3541
+ {
3542
+ internalType: "uint256",
3543
+ name: "max",
3544
+ type: "uint256",
3545
+ },
3546
+ ],
3547
+ internalType: "struct Price.Props",
3548
+ name: "indexTokenPrice",
3549
+ type: "tuple",
3550
+ },
3551
+ {
3552
+ components: [
3553
+ {
3554
+ internalType: "uint256",
3555
+ name: "min",
3556
+ type: "uint256",
3557
+ },
3558
+ {
3559
+ internalType: "uint256",
3560
+ name: "max",
3561
+ type: "uint256",
3562
+ },
3563
+ ],
3564
+ internalType: "struct Price.Props",
3565
+ name: "longTokenPrice",
3566
+ type: "tuple",
3567
+ },
3568
+ {
3569
+ components: [
3570
+ {
3571
+ internalType: "uint256",
3572
+ name: "min",
3573
+ type: "uint256",
3574
+ },
3575
+ {
3576
+ internalType: "uint256",
3577
+ name: "max",
3578
+ type: "uint256",
3579
+ },
3580
+ ],
3581
+ internalType: "struct Price.Props",
3582
+ name: "shortTokenPrice",
3583
+ type: "tuple",
3584
+ },
3585
+ ],
3586
+ internalType: "struct MarketUtils.MarketPrices[]",
3587
+ name: "prices",
3588
+ type: "tuple[]",
3589
+ },
3590
+ {
3591
+ internalType: "address",
3592
+ name: "uiFeeReceiver",
3593
+ type: "address",
3594
+ },
3595
+ ],
3596
+ name: "getPositionInfoList",
3597
+ outputs: [
3598
+ {
3599
+ components: [
3600
+ {
3601
+ internalType: "bytes32",
3602
+ name: "positionKey",
3603
+ type: "bytes32",
3604
+ },
3605
+ {
3606
+ components: [
3607
+ {
3608
+ components: [
3609
+ {
3610
+ internalType: "address",
3611
+ name: "account",
3612
+ type: "address",
3613
+ },
3614
+ {
3615
+ internalType: "address",
3616
+ name: "market",
3617
+ type: "address",
3618
+ },
3619
+ {
3620
+ internalType: "address",
3621
+ name: "collateralToken",
3622
+ type: "address",
3623
+ },
3624
+ ],
3625
+ internalType: "struct Position.Addresses",
3626
+ name: "addresses",
3627
+ type: "tuple",
3628
+ },
3629
+ {
3630
+ components: [
3631
+ {
3632
+ internalType: "uint256",
3633
+ name: "sizeInUsd",
3634
+ type: "uint256",
3635
+ },
3636
+ {
3637
+ internalType: "uint256",
3638
+ name: "sizeInTokens",
3639
+ type: "uint256",
3640
+ },
3641
+ {
3642
+ internalType: "uint256",
3643
+ name: "collateralAmount",
3644
+ type: "uint256",
3645
+ },
3646
+ {
3647
+ internalType: "int256",
3648
+ name: "pendingImpactAmount",
3649
+ type: "int256",
3650
+ },
3651
+ {
3652
+ internalType: "uint256",
3653
+ name: "borrowingFactor",
3654
+ type: "uint256",
3655
+ },
3656
+ {
3657
+ internalType: "uint256",
3658
+ name: "fundingFeeAmountPerSize",
3659
+ type: "uint256",
3660
+ },
3661
+ {
3662
+ internalType: "uint256",
3663
+ name: "longTokenClaimableFundingAmountPerSize",
3664
+ type: "uint256",
3665
+ },
3666
+ {
3667
+ internalType: "uint256",
3668
+ name: "shortTokenClaimableFundingAmountPerSize",
3669
+ type: "uint256",
3670
+ },
3671
+ {
3672
+ internalType: "uint256",
3673
+ name: "increasedAtTime",
3674
+ type: "uint256",
3675
+ },
3676
+ {
3677
+ internalType: "uint256",
3678
+ name: "decreasedAtTime",
3679
+ type: "uint256",
3680
+ },
3681
+ ],
3682
+ internalType: "struct Position.Numbers",
3683
+ name: "numbers",
3684
+ type: "tuple",
3685
+ },
3686
+ {
3687
+ components: [
3688
+ {
3689
+ internalType: "bool",
3690
+ name: "isLong",
3691
+ type: "bool",
3692
+ },
3693
+ ],
3694
+ internalType: "struct Position.Flags",
3695
+ name: "flags",
3696
+ type: "tuple",
3697
+ },
3698
+ ],
3699
+ internalType: "struct Position.Props",
3700
+ name: "position",
3701
+ type: "tuple",
3702
+ },
3703
+ {
3704
+ components: [
3705
+ {
3706
+ components: [
3707
+ {
3708
+ internalType: "bytes32",
3709
+ name: "referralCode",
3710
+ type: "bytes32",
3711
+ },
3712
+ {
3713
+ internalType: "address",
3714
+ name: "affiliate",
3715
+ type: "address",
3716
+ },
3717
+ {
3718
+ internalType: "address",
3719
+ name: "trader",
3720
+ type: "address",
3721
+ },
3722
+ {
3723
+ internalType: "uint256",
3724
+ name: "totalRebateFactor",
3725
+ type: "uint256",
3726
+ },
3727
+ {
3728
+ internalType: "uint256",
3729
+ name: "affiliateRewardFactor",
3730
+ type: "uint256",
3731
+ },
3732
+ {
3733
+ internalType: "uint256",
3734
+ name: "adjustedAffiliateRewardFactor",
3735
+ type: "uint256",
3736
+ },
3737
+ {
3738
+ internalType: "uint256",
3739
+ name: "traderDiscountFactor",
3740
+ type: "uint256",
3741
+ },
3742
+ {
3743
+ internalType: "uint256",
3744
+ name: "totalRebateAmount",
3745
+ type: "uint256",
3746
+ },
3747
+ {
3748
+ internalType: "uint256",
3749
+ name: "traderDiscountAmount",
3750
+ type: "uint256",
3751
+ },
3752
+ {
3753
+ internalType: "uint256",
3754
+ name: "affiliateRewardAmount",
3755
+ type: "uint256",
3756
+ },
3757
+ ],
3758
+ internalType: "struct PositionPricingUtils.PositionReferralFees",
3759
+ name: "referral",
3760
+ type: "tuple",
3761
+ },
3762
+ {
3763
+ components: [
3764
+ {
3765
+ internalType: "uint256",
3766
+ name: "traderTier",
3767
+ type: "uint256",
3768
+ },
3769
+ {
3770
+ internalType: "uint256",
3771
+ name: "traderDiscountFactor",
3772
+ type: "uint256",
3773
+ },
3774
+ {
3775
+ internalType: "uint256",
3776
+ name: "traderDiscountAmount",
3777
+ type: "uint256",
3778
+ },
3779
+ ],
3780
+ internalType: "struct PositionPricingUtils.PositionProFees",
3781
+ name: "pro",
3782
+ type: "tuple",
3783
+ },
3784
+ {
3785
+ components: [
3786
+ {
3787
+ internalType: "uint256",
3788
+ name: "fundingFeeAmount",
3789
+ type: "uint256",
3790
+ },
3791
+ {
3792
+ internalType: "uint256",
3793
+ name: "claimableLongTokenAmount",
3794
+ type: "uint256",
3795
+ },
3796
+ {
3797
+ internalType: "uint256",
3798
+ name: "claimableShortTokenAmount",
3799
+ type: "uint256",
3800
+ },
3801
+ {
3802
+ internalType: "uint256",
3803
+ name: "latestFundingFeeAmountPerSize",
3804
+ type: "uint256",
3805
+ },
3806
+ {
3807
+ internalType: "uint256",
3808
+ name: "latestLongTokenClaimableFundingAmountPerSize",
3809
+ type: "uint256",
3810
+ },
3811
+ {
3812
+ internalType: "uint256",
3813
+ name: "latestShortTokenClaimableFundingAmountPerSize",
3814
+ type: "uint256",
3815
+ },
3816
+ ],
3817
+ internalType: "struct PositionPricingUtils.PositionFundingFees",
3818
+ name: "funding",
3819
+ type: "tuple",
3820
+ },
3821
+ {
3822
+ components: [
3823
+ {
3824
+ internalType: "uint256",
3825
+ name: "borrowingFeeUsd",
3826
+ type: "uint256",
3827
+ },
3828
+ {
3829
+ internalType: "uint256",
3830
+ name: "borrowingFeeAmount",
3831
+ type: "uint256",
3832
+ },
3833
+ {
3834
+ internalType: "uint256",
3835
+ name: "borrowingFeeReceiverFactor",
3836
+ type: "uint256",
3837
+ },
3838
+ {
3839
+ internalType: "uint256",
3840
+ name: "borrowingFeeAmountForFeeReceiver",
3841
+ type: "uint256",
3842
+ },
3843
+ ],
3844
+ internalType: "struct PositionPricingUtils.PositionBorrowingFees",
3845
+ name: "borrowing",
3846
+ type: "tuple",
3847
+ },
3848
+ {
3849
+ components: [
3850
+ {
3851
+ internalType: "address",
3852
+ name: "uiFeeReceiver",
3853
+ type: "address",
3854
+ },
3855
+ {
3856
+ internalType: "uint256",
3857
+ name: "uiFeeReceiverFactor",
3858
+ type: "uint256",
3859
+ },
3860
+ {
3861
+ internalType: "uint256",
3862
+ name: "uiFeeAmount",
3863
+ type: "uint256",
3864
+ },
3865
+ ],
3866
+ internalType: "struct PositionPricingUtils.PositionUiFees",
3867
+ name: "ui",
3868
+ type: "tuple",
3869
+ },
3870
+ {
3871
+ components: [
3872
+ {
3873
+ internalType: "uint256",
3874
+ name: "liquidationFeeUsd",
3875
+ type: "uint256",
3876
+ },
3877
+ {
3878
+ internalType: "uint256",
3879
+ name: "liquidationFeeAmount",
3880
+ type: "uint256",
3881
+ },
3882
+ {
3883
+ internalType: "uint256",
3884
+ name: "liquidationFeeReceiverFactor",
3885
+ type: "uint256",
3886
+ },
3887
+ {
3888
+ internalType: "uint256",
3889
+ name: "liquidationFeeAmountForFeeReceiver",
3890
+ type: "uint256",
3891
+ },
3892
+ ],
3893
+ internalType: "struct PositionPricingUtils.PositionLiquidationFees",
3894
+ name: "liquidation",
3895
+ type: "tuple",
3896
+ },
3897
+ {
3898
+ components: [
3899
+ {
3900
+ internalType: "uint256",
3901
+ name: "min",
3902
+ type: "uint256",
3903
+ },
3904
+ {
3905
+ internalType: "uint256",
3906
+ name: "max",
3907
+ type: "uint256",
3908
+ },
3909
+ ],
3910
+ internalType: "struct Price.Props",
3911
+ name: "collateralTokenPrice",
3912
+ type: "tuple",
3913
+ },
3914
+ {
3915
+ internalType: "uint256",
3916
+ name: "positionFeeFactor",
3917
+ type: "uint256",
3918
+ },
3919
+ {
3920
+ internalType: "uint256",
3921
+ name: "protocolFeeAmount",
3922
+ type: "uint256",
3923
+ },
3924
+ {
3925
+ internalType: "uint256",
3926
+ name: "positionFeeReceiverFactor",
3927
+ type: "uint256",
3928
+ },
3929
+ {
3930
+ internalType: "uint256",
3931
+ name: "feeReceiverAmount",
3932
+ type: "uint256",
3933
+ },
3934
+ {
3935
+ internalType: "uint256",
3936
+ name: "feeAmountForPool",
3937
+ type: "uint256",
3938
+ },
3939
+ {
3940
+ internalType: "uint256",
3941
+ name: "positionFeeAmountForPool",
3942
+ type: "uint256",
3943
+ },
3944
+ {
3945
+ internalType: "uint256",
3946
+ name: "positionFeeAmount",
3947
+ type: "uint256",
3948
+ },
3949
+ {
3950
+ internalType: "uint256",
3951
+ name: "totalCostAmountExcludingFunding",
3952
+ type: "uint256",
3953
+ },
3954
+ {
3955
+ internalType: "uint256",
3956
+ name: "totalCostAmount",
3957
+ type: "uint256",
3958
+ },
3959
+ {
3960
+ internalType: "uint256",
3961
+ name: "totalDiscountAmount",
3962
+ type: "uint256",
3963
+ },
3964
+ ],
3965
+ internalType: "struct PositionPricingUtils.PositionFees",
3966
+ name: "fees",
3967
+ type: "tuple",
3968
+ },
3969
+ {
3970
+ components: [
3971
+ {
3972
+ internalType: "int256",
3973
+ name: "priceImpactUsd",
3974
+ type: "int256",
3975
+ },
3976
+ {
3977
+ internalType: "uint256",
3978
+ name: "executionPrice",
3979
+ type: "uint256",
3980
+ },
3981
+ {
3982
+ internalType: "bool",
3983
+ name: "balanceWasImproved",
3984
+ type: "bool",
3985
+ },
3986
+ {
3987
+ internalType: "int256",
3988
+ name: "proportionalPendingImpactUsd",
3989
+ type: "int256",
3990
+ },
3991
+ {
3992
+ internalType: "int256",
3993
+ name: "totalImpactUsd",
3994
+ type: "int256",
3995
+ },
3996
+ {
3997
+ internalType: "uint256",
3998
+ name: "priceImpactDiffUsd",
3999
+ type: "uint256",
4000
+ },
4001
+ ],
4002
+ internalType: "struct ReaderPricingUtils.ExecutionPriceResult",
4003
+ name: "executionPriceResult",
4004
+ type: "tuple",
4005
+ },
4006
+ {
4007
+ internalType: "int256",
4008
+ name: "basePnlUsd",
4009
+ type: "int256",
4010
+ },
4011
+ {
4012
+ internalType: "int256",
4013
+ name: "uncappedBasePnlUsd",
4014
+ type: "int256",
4015
+ },
4016
+ {
4017
+ internalType: "int256",
4018
+ name: "pnlAfterPriceImpactUsd",
4019
+ type: "int256",
4020
+ },
4021
+ ],
4022
+ internalType: "struct ReaderPositionUtils.PositionInfo[]",
4023
+ name: "",
4024
+ type: "tuple[]",
4025
+ },
4026
+ ],
4027
+ stateMutability: "view",
4028
+ type: "function",
4029
+ },
4030
+ {
4031
+ inputs: [
4032
+ {
4033
+ internalType: "contract DataStore",
4034
+ name: "dataStore",
4035
+ type: "address",
4036
+ },
4037
+ {
4038
+ components: [
4039
+ {
4040
+ internalType: "address",
4041
+ name: "marketToken",
4042
+ type: "address",
4043
+ },
4044
+ {
4045
+ internalType: "address",
4046
+ name: "indexToken",
4047
+ type: "address",
4048
+ },
4049
+ {
4050
+ internalType: "address",
4051
+ name: "longToken",
4052
+ type: "address",
4053
+ },
4054
+ {
4055
+ internalType: "address",
4056
+ name: "shortToken",
4057
+ type: "address",
4058
+ },
4059
+ ],
4060
+ internalType: "struct Market.Props",
4061
+ name: "market",
4062
+ type: "tuple",
4063
+ },
4064
+ {
4065
+ components: [
4066
+ {
4067
+ components: [
4068
+ {
4069
+ internalType: "uint256",
4070
+ name: "min",
4071
+ type: "uint256",
4072
+ },
4073
+ {
4074
+ internalType: "uint256",
4075
+ name: "max",
4076
+ type: "uint256",
4077
+ },
4078
+ ],
4079
+ internalType: "struct Price.Props",
4080
+ name: "indexTokenPrice",
4081
+ type: "tuple",
4082
+ },
4083
+ {
4084
+ components: [
4085
+ {
4086
+ internalType: "uint256",
4087
+ name: "min",
4088
+ type: "uint256",
4089
+ },
4090
+ {
4091
+ internalType: "uint256",
4092
+ name: "max",
4093
+ type: "uint256",
4094
+ },
4095
+ ],
4096
+ internalType: "struct Price.Props",
4097
+ name: "longTokenPrice",
4098
+ type: "tuple",
4099
+ },
4100
+ {
4101
+ components: [
4102
+ {
4103
+ internalType: "uint256",
4104
+ name: "min",
4105
+ type: "uint256",
4106
+ },
4107
+ {
4108
+ internalType: "uint256",
4109
+ name: "max",
4110
+ type: "uint256",
4111
+ },
4112
+ ],
4113
+ internalType: "struct Price.Props",
4114
+ name: "shortTokenPrice",
4115
+ type: "tuple",
4116
+ },
4117
+ ],
4118
+ internalType: "struct MarketUtils.MarketPrices",
4119
+ name: "prices",
4120
+ type: "tuple",
4121
+ },
4122
+ {
4123
+ internalType: "bytes32",
4124
+ name: "positionKey",
4125
+ type: "bytes32",
4126
+ },
4127
+ {
4128
+ internalType: "uint256",
4129
+ name: "sizeDeltaUsd",
4130
+ type: "uint256",
4131
+ },
4132
+ ],
4133
+ name: "getPositionPnlUsd",
4134
+ outputs: [
4135
+ {
4136
+ internalType: "int256",
4137
+ name: "",
4138
+ type: "int256",
4139
+ },
4140
+ {
4141
+ internalType: "int256",
4142
+ name: "",
4143
+ type: "int256",
4144
+ },
4145
+ {
4146
+ internalType: "uint256",
4147
+ name: "",
4148
+ type: "uint256",
4149
+ },
4150
+ ],
4151
+ stateMutability: "view",
4152
+ type: "function",
4153
+ },
4154
+ {
4155
+ inputs: [
4156
+ {
4157
+ internalType: "contract DataStore",
4158
+ name: "dataStore",
4159
+ type: "address",
4160
+ },
4161
+ {
4162
+ internalType: "bytes32",
4163
+ name: "key",
4164
+ type: "bytes32",
4165
+ },
4166
+ ],
4167
+ name: "getShift",
4168
+ outputs: [
4169
+ {
4170
+ components: [
4171
+ {
4172
+ components: [
4173
+ {
4174
+ internalType: "address",
4175
+ name: "account",
4176
+ type: "address",
4177
+ },
4178
+ {
4179
+ internalType: "address",
4180
+ name: "receiver",
4181
+ type: "address",
4182
+ },
4183
+ {
4184
+ internalType: "address",
4185
+ name: "callbackContract",
4186
+ type: "address",
4187
+ },
4188
+ {
4189
+ internalType: "address",
4190
+ name: "uiFeeReceiver",
4191
+ type: "address",
4192
+ },
4193
+ {
4194
+ internalType: "address",
4195
+ name: "fromMarket",
4196
+ type: "address",
4197
+ },
4198
+ {
4199
+ internalType: "address",
4200
+ name: "toMarket",
4201
+ type: "address",
4202
+ },
4203
+ ],
4204
+ internalType: "struct Shift.Addresses",
4205
+ name: "addresses",
4206
+ type: "tuple",
4207
+ },
4208
+ {
4209
+ components: [
4210
+ {
4211
+ internalType: "uint256",
4212
+ name: "marketTokenAmount",
4213
+ type: "uint256",
4214
+ },
4215
+ {
4216
+ internalType: "uint256",
4217
+ name: "minMarketTokens",
4218
+ type: "uint256",
4219
+ },
4220
+ {
4221
+ internalType: "uint256",
4222
+ name: "updatedAtTime",
4223
+ type: "uint256",
4224
+ },
4225
+ {
4226
+ internalType: "uint256",
4227
+ name: "executionFee",
4228
+ type: "uint256",
4229
+ },
4230
+ {
4231
+ internalType: "uint256",
4232
+ name: "callbackGasLimit",
4233
+ type: "uint256",
4234
+ },
4235
+ {
4236
+ internalType: "uint256",
4237
+ name: "srcChainId",
4238
+ type: "uint256",
4239
+ },
4240
+ ],
4241
+ internalType: "struct Shift.Numbers",
4242
+ name: "numbers",
4243
+ type: "tuple",
4244
+ },
4245
+ {
4246
+ internalType: "bytes32[]",
4247
+ name: "_dataList",
4248
+ type: "bytes32[]",
4249
+ },
4250
+ ],
4251
+ internalType: "struct Shift.Props",
4252
+ name: "",
4253
+ type: "tuple",
4254
+ },
4255
+ ],
4256
+ stateMutability: "view",
4257
+ type: "function",
4258
+ },
4259
+ {
4260
+ inputs: [
4261
+ {
4262
+ internalType: "contract DataStore",
4263
+ name: "dataStore",
4264
+ type: "address",
4265
+ },
4266
+ {
4267
+ components: [
4268
+ {
4269
+ internalType: "address",
4270
+ name: "marketToken",
4271
+ type: "address",
4272
+ },
4273
+ {
4274
+ internalType: "address",
4275
+ name: "indexToken",
4276
+ type: "address",
4277
+ },
4278
+ {
4279
+ internalType: "address",
4280
+ name: "longToken",
4281
+ type: "address",
4282
+ },
4283
+ {
4284
+ internalType: "address",
4285
+ name: "shortToken",
4286
+ type: "address",
4287
+ },
4288
+ ],
4289
+ internalType: "struct Market.Props",
4290
+ name: "market",
4291
+ type: "tuple",
4292
+ },
4293
+ {
4294
+ components: [
4295
+ {
4296
+ components: [
4297
+ {
4298
+ internalType: "uint256",
4299
+ name: "min",
4300
+ type: "uint256",
4301
+ },
4302
+ {
4303
+ internalType: "uint256",
4304
+ name: "max",
4305
+ type: "uint256",
4306
+ },
4307
+ ],
4308
+ internalType: "struct Price.Props",
4309
+ name: "indexTokenPrice",
4310
+ type: "tuple",
4311
+ },
4312
+ {
4313
+ components: [
4314
+ {
4315
+ internalType: "uint256",
4316
+ name: "min",
4317
+ type: "uint256",
4318
+ },
4319
+ {
4320
+ internalType: "uint256",
4321
+ name: "max",
4322
+ type: "uint256",
4323
+ },
4324
+ ],
4325
+ internalType: "struct Price.Props",
4326
+ name: "longTokenPrice",
4327
+ type: "tuple",
4328
+ },
4329
+ {
4330
+ components: [
4331
+ {
4332
+ internalType: "uint256",
4333
+ name: "min",
4334
+ type: "uint256",
4335
+ },
4336
+ {
4337
+ internalType: "uint256",
4338
+ name: "max",
4339
+ type: "uint256",
4340
+ },
4341
+ ],
4342
+ internalType: "struct Price.Props",
4343
+ name: "shortTokenPrice",
4344
+ type: "tuple",
4345
+ },
4346
+ ],
4347
+ internalType: "struct MarketUtils.MarketPrices",
4348
+ name: "prices",
4349
+ type: "tuple",
4350
+ },
4351
+ {
4352
+ internalType: "address",
4353
+ name: "tokenIn",
4354
+ type: "address",
4355
+ },
4356
+ {
4357
+ internalType: "uint256",
4358
+ name: "amountIn",
4359
+ type: "uint256",
4360
+ },
4361
+ {
4362
+ internalType: "address",
4363
+ name: "uiFeeReceiver",
4364
+ type: "address",
4365
+ },
4366
+ ],
4367
+ name: "getSwapAmountOut",
4368
+ outputs: [
4369
+ {
4370
+ internalType: "uint256",
4371
+ name: "",
4372
+ type: "uint256",
4373
+ },
4374
+ {
4375
+ internalType: "int256",
4376
+ name: "",
4377
+ type: "int256",
4378
+ },
4379
+ {
4380
+ components: [
4381
+ {
4382
+ internalType: "uint256",
4383
+ name: "feeReceiverAmount",
4384
+ type: "uint256",
4385
+ },
4386
+ {
4387
+ internalType: "uint256",
4388
+ name: "feeAmountForPool",
4389
+ type: "uint256",
4390
+ },
4391
+ {
4392
+ internalType: "uint256",
4393
+ name: "amountAfterFees",
4394
+ type: "uint256",
4395
+ },
4396
+ {
4397
+ internalType: "address",
4398
+ name: "uiFeeReceiver",
4399
+ type: "address",
4400
+ },
4401
+ {
4402
+ internalType: "uint256",
4403
+ name: "uiFeeReceiverFactor",
4404
+ type: "uint256",
4405
+ },
4406
+ {
4407
+ internalType: "uint256",
4408
+ name: "uiFeeAmount",
4409
+ type: "uint256",
4410
+ },
4411
+ ],
4412
+ internalType: "struct SwapPricingUtils.SwapFees",
4413
+ name: "fees",
4414
+ type: "tuple",
4415
+ },
4416
+ ],
4417
+ stateMutability: "view",
4418
+ type: "function",
4419
+ },
4420
+ {
4421
+ inputs: [
4422
+ {
4423
+ internalType: "contract DataStore",
4424
+ name: "dataStore",
4425
+ type: "address",
4426
+ },
4427
+ {
4428
+ internalType: "address",
4429
+ name: "marketKey",
4430
+ type: "address",
4431
+ },
4432
+ {
4433
+ internalType: "address",
4434
+ name: "tokenIn",
4435
+ type: "address",
4436
+ },
4437
+ {
4438
+ internalType: "address",
4439
+ name: "tokenOut",
4440
+ type: "address",
4441
+ },
4442
+ {
4443
+ internalType: "uint256",
4444
+ name: "amountIn",
4445
+ type: "uint256",
4446
+ },
4447
+ {
4448
+ components: [
4449
+ {
4450
+ internalType: "uint256",
4451
+ name: "min",
4452
+ type: "uint256",
4453
+ },
4454
+ {
4455
+ internalType: "uint256",
4456
+ name: "max",
4457
+ type: "uint256",
4458
+ },
4459
+ ],
4460
+ internalType: "struct Price.Props",
4461
+ name: "tokenInPrice",
4462
+ type: "tuple",
4463
+ },
4464
+ {
4465
+ components: [
4466
+ {
4467
+ internalType: "uint256",
4468
+ name: "min",
4469
+ type: "uint256",
4470
+ },
4471
+ {
4472
+ internalType: "uint256",
4473
+ name: "max",
4474
+ type: "uint256",
4475
+ },
4476
+ ],
4477
+ internalType: "struct Price.Props",
4478
+ name: "tokenOutPrice",
4479
+ type: "tuple",
4480
+ },
4481
+ ],
4482
+ name: "getSwapPriceImpact",
4483
+ outputs: [
4484
+ {
4485
+ internalType: "int256",
4486
+ name: "",
4487
+ type: "int256",
4488
+ },
4489
+ {
4490
+ internalType: "int256",
4491
+ name: "",
4492
+ type: "int256",
4493
+ },
4494
+ {
4495
+ internalType: "int256",
4496
+ name: "",
4497
+ type: "int256",
4498
+ },
4499
+ ],
4500
+ stateMutability: "view",
4501
+ type: "function",
4502
+ },
4503
+ {
4504
+ inputs: [
4505
+ {
4506
+ internalType: "contract DataStore",
4507
+ name: "dataStore",
4508
+ type: "address",
4509
+ },
4510
+ {
4511
+ internalType: "bytes32",
4512
+ name: "key",
4513
+ type: "bytes32",
4514
+ },
4515
+ ],
4516
+ name: "getWithdrawal",
4517
+ outputs: [
4518
+ {
4519
+ components: [
4520
+ {
4521
+ components: [
4522
+ {
4523
+ internalType: "address",
4524
+ name: "account",
4525
+ type: "address",
4526
+ },
4527
+ {
4528
+ internalType: "address",
4529
+ name: "receiver",
4530
+ type: "address",
4531
+ },
4532
+ {
4533
+ internalType: "address",
4534
+ name: "callbackContract",
4535
+ type: "address",
4536
+ },
4537
+ {
4538
+ internalType: "address",
4539
+ name: "uiFeeReceiver",
4540
+ type: "address",
4541
+ },
4542
+ {
4543
+ internalType: "address",
4544
+ name: "market",
4545
+ type: "address",
4546
+ },
4547
+ {
4548
+ internalType: "address[]",
4549
+ name: "longTokenSwapPath",
4550
+ type: "address[]",
4551
+ },
4552
+ {
4553
+ internalType: "address[]",
4554
+ name: "shortTokenSwapPath",
4555
+ type: "address[]",
4556
+ },
4557
+ ],
4558
+ internalType: "struct Withdrawal.Addresses",
4559
+ name: "addresses",
4560
+ type: "tuple",
4561
+ },
4562
+ {
4563
+ components: [
4564
+ {
4565
+ internalType: "uint256",
4566
+ name: "marketTokenAmount",
4567
+ type: "uint256",
4568
+ },
4569
+ {
4570
+ internalType: "uint256",
4571
+ name: "minLongTokenAmount",
4572
+ type: "uint256",
4573
+ },
4574
+ {
4575
+ internalType: "uint256",
4576
+ name: "minShortTokenAmount",
4577
+ type: "uint256",
4578
+ },
4579
+ {
4580
+ internalType: "uint256",
4581
+ name: "updatedAtTime",
4582
+ type: "uint256",
4583
+ },
4584
+ {
4585
+ internalType: "uint256",
4586
+ name: "executionFee",
4587
+ type: "uint256",
4588
+ },
4589
+ {
4590
+ internalType: "uint256",
4591
+ name: "callbackGasLimit",
4592
+ type: "uint256",
4593
+ },
4594
+ {
4595
+ internalType: "uint256",
4596
+ name: "srcChainId",
4597
+ type: "uint256",
4598
+ },
4599
+ ],
4600
+ internalType: "struct Withdrawal.Numbers",
4601
+ name: "numbers",
4602
+ type: "tuple",
4603
+ },
4604
+ {
4605
+ components: [
4606
+ {
4607
+ internalType: "bool",
4608
+ name: "shouldUnwrapNativeToken",
4609
+ type: "bool",
4610
+ },
4611
+ ],
4612
+ internalType: "struct Withdrawal.Flags",
4613
+ name: "flags",
4614
+ type: "tuple",
4615
+ },
4616
+ {
4617
+ internalType: "bytes32[]",
4618
+ name: "_dataList",
4619
+ type: "bytes32[]",
4620
+ },
4621
+ ],
4622
+ internalType: "struct Withdrawal.Props",
4623
+ name: "",
4624
+ type: "tuple",
4625
+ },
4626
+ ],
4627
+ stateMutability: "view",
4628
+ type: "function",
4629
+ },
4630
+ {
4631
+ inputs: [
4632
+ {
4633
+ internalType: "contract DataStore",
4634
+ name: "dataStore",
4635
+ type: "address",
4636
+ },
4637
+ {
4638
+ components: [
4639
+ {
4640
+ internalType: "address",
4641
+ name: "marketToken",
4642
+ type: "address",
4643
+ },
4644
+ {
4645
+ internalType: "address",
4646
+ name: "indexToken",
4647
+ type: "address",
4648
+ },
4649
+ {
4650
+ internalType: "address",
4651
+ name: "longToken",
4652
+ type: "address",
4653
+ },
4654
+ {
4655
+ internalType: "address",
4656
+ name: "shortToken",
4657
+ type: "address",
4658
+ },
4659
+ ],
4660
+ internalType: "struct Market.Props",
4661
+ name: "market",
4662
+ type: "tuple",
4663
+ },
4664
+ {
4665
+ components: [
4666
+ {
4667
+ components: [
4668
+ {
4669
+ internalType: "uint256",
4670
+ name: "min",
4671
+ type: "uint256",
4672
+ },
4673
+ {
4674
+ internalType: "uint256",
4675
+ name: "max",
4676
+ type: "uint256",
4677
+ },
4678
+ ],
4679
+ internalType: "struct Price.Props",
4680
+ name: "indexTokenPrice",
4681
+ type: "tuple",
4682
+ },
4683
+ {
4684
+ components: [
4685
+ {
4686
+ internalType: "uint256",
4687
+ name: "min",
4688
+ type: "uint256",
4689
+ },
4690
+ {
4691
+ internalType: "uint256",
4692
+ name: "max",
4693
+ type: "uint256",
4694
+ },
4695
+ ],
4696
+ internalType: "struct Price.Props",
4697
+ name: "longTokenPrice",
4698
+ type: "tuple",
4699
+ },
4700
+ {
4701
+ components: [
4702
+ {
4703
+ internalType: "uint256",
4704
+ name: "min",
4705
+ type: "uint256",
4706
+ },
4707
+ {
4708
+ internalType: "uint256",
4709
+ name: "max",
4710
+ type: "uint256",
4711
+ },
4712
+ ],
4713
+ internalType: "struct Price.Props",
4714
+ name: "shortTokenPrice",
4715
+ type: "tuple",
4716
+ },
4717
+ ],
4718
+ internalType: "struct MarketUtils.MarketPrices",
4719
+ name: "prices",
4720
+ type: "tuple",
4721
+ },
4722
+ {
4723
+ internalType: "uint256",
4724
+ name: "marketTokenAmount",
4725
+ type: "uint256",
4726
+ },
4727
+ {
4728
+ internalType: "address",
4729
+ name: "uiFeeReceiver",
4730
+ type: "address",
4731
+ },
4732
+ {
4733
+ internalType: "enum ISwapPricingUtils.SwapPricingType",
4734
+ name: "swapPricingType",
4735
+ type: "uint8",
4736
+ },
4737
+ ],
4738
+ name: "getWithdrawalAmountOut",
4739
+ outputs: [
4740
+ {
4741
+ internalType: "uint256",
4742
+ name: "",
4743
+ type: "uint256",
4744
+ },
4745
+ {
4746
+ internalType: "uint256",
4747
+ name: "",
4748
+ type: "uint256",
4749
+ },
4750
+ ],
4751
+ stateMutability: "view",
4752
+ type: "function",
4753
+ },
4754
+ {
4755
+ inputs: [
4756
+ {
4757
+ internalType: "contract DataStore",
4758
+ name: "dataStore",
4759
+ type: "address",
4760
+ },
4761
+ {
4762
+ internalType: "contract IReferralStorage",
4763
+ name: "referralStorage",
4764
+ type: "address",
4765
+ },
4766
+ {
4767
+ internalType: "bytes32",
4768
+ name: "positionKey",
4769
+ type: "bytes32",
4770
+ },
4771
+ {
4772
+ components: [
4773
+ {
4774
+ internalType: "address",
4775
+ name: "marketToken",
4776
+ type: "address",
4777
+ },
4778
+ {
4779
+ internalType: "address",
4780
+ name: "indexToken",
4781
+ type: "address",
4782
+ },
4783
+ {
4784
+ internalType: "address",
4785
+ name: "longToken",
4786
+ type: "address",
4787
+ },
4788
+ {
4789
+ internalType: "address",
4790
+ name: "shortToken",
4791
+ type: "address",
4792
+ },
4793
+ ],
4794
+ internalType: "struct Market.Props",
4795
+ name: "market",
4796
+ type: "tuple",
4797
+ },
4798
+ {
4799
+ components: [
4800
+ {
4801
+ components: [
4802
+ {
4803
+ internalType: "uint256",
4804
+ name: "min",
4805
+ type: "uint256",
4806
+ },
4807
+ {
4808
+ internalType: "uint256",
4809
+ name: "max",
4810
+ type: "uint256",
4811
+ },
4812
+ ],
4813
+ internalType: "struct Price.Props",
4814
+ name: "indexTokenPrice",
4815
+ type: "tuple",
4816
+ },
4817
+ {
4818
+ components: [
4819
+ {
4820
+ internalType: "uint256",
4821
+ name: "min",
4822
+ type: "uint256",
4823
+ },
4824
+ {
4825
+ internalType: "uint256",
4826
+ name: "max",
4827
+ type: "uint256",
4828
+ },
4829
+ ],
4830
+ internalType: "struct Price.Props",
4831
+ name: "longTokenPrice",
4832
+ type: "tuple",
4833
+ },
4834
+ {
4835
+ components: [
4836
+ {
4837
+ internalType: "uint256",
4838
+ name: "min",
4839
+ type: "uint256",
4840
+ },
4841
+ {
4842
+ internalType: "uint256",
4843
+ name: "max",
4844
+ type: "uint256",
4845
+ },
4846
+ ],
4847
+ internalType: "struct Price.Props",
4848
+ name: "shortTokenPrice",
4849
+ type: "tuple",
4850
+ },
4851
+ ],
4852
+ internalType: "struct MarketUtils.MarketPrices",
4853
+ name: "prices",
4854
+ type: "tuple",
4855
+ },
4856
+ {
4857
+ internalType: "bool",
4858
+ name: "shouldValidateMinCollateralUsd",
4859
+ type: "bool",
4860
+ },
4861
+ {
4862
+ internalType: "bool",
4863
+ name: "forLiquidation",
4864
+ type: "bool",
4865
+ },
4866
+ ],
4867
+ name: "isPositionLiquidatable",
4868
+ outputs: [
4869
+ {
4870
+ internalType: "bool",
4871
+ name: "",
4872
+ type: "bool",
4873
+ },
4874
+ {
4875
+ internalType: "string",
4876
+ name: "",
4877
+ type: "string",
4878
+ },
4879
+ {
4880
+ components: [
4881
+ {
4882
+ internalType: "int256",
4883
+ name: "remainingCollateralUsd",
4884
+ type: "int256",
4885
+ },
4886
+ {
4887
+ internalType: "int256",
4888
+ name: "minCollateralUsd",
4889
+ type: "int256",
4890
+ },
4891
+ {
4892
+ internalType: "int256",
4893
+ name: "minCollateralUsdForLeverage",
4894
+ type: "int256",
4895
+ },
4896
+ ],
4897
+ internalType: "struct PositionUtils.IsPositionLiquidatableInfo",
4898
+ name: "",
4899
+ type: "tuple",
4900
+ },
4901
+ ],
4902
+ stateMutability: "view",
4903
+ type: "function",
4904
+ },
4905
+ ];