@gmx-io/sdk 0.2.0 → 1.0.0-alpha.2

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 (439) hide show
  1. package/README.md +28 -1
  2. package/build/cjs/scripts/prebuild/index.js +11 -0
  3. package/build/cjs/scripts/prebuild/prebuildKinkModelMarketRatesKeys.js +51 -0
  4. package/build/cjs/scripts/prebuild/prebuildMarketConfigKeys.js +25 -0
  5. package/build/cjs/scripts/prebuild/prebuildMarketValuesKeys.js +25 -0
  6. package/build/cjs/src/abis/CustomErrors.json +3254 -0
  7. package/build/cjs/src/abis/DataStore.json +1440 -0
  8. package/build/cjs/src/abis/ERC721.json +442 -0
  9. package/build/cjs/src/abis/EventEmitter.json +2065 -0
  10. package/build/cjs/src/abis/ExchangeRouter.json +1801 -0
  11. package/build/cjs/src/abis/GMT.json +522 -0
  12. package/build/cjs/src/abis/GlpManager.json +591 -0
  13. package/build/cjs/src/abis/GlvReader.json +1414 -0
  14. package/build/cjs/src/abis/GlvRouter.json +706 -0
  15. package/build/cjs/src/abis/GmxMigrator.json +657 -0
  16. package/build/cjs/src/abis/GovToken.json +1121 -0
  17. package/build/cjs/src/abis/MintableBaseToken.json +696 -0
  18. package/build/cjs/src/abis/Multicall.json +333 -0
  19. package/build/cjs/src/abis/OrderBook.json +1997 -0
  20. package/build/cjs/src/abis/OrderBookReader.json +111 -0
  21. package/build/cjs/src/abis/OrderExecutor.json +122 -0
  22. package/build/cjs/src/abis/PositionManager.json +1165 -0
  23. package/build/cjs/src/abis/PositionRouter.json +2030 -0
  24. package/build/cjs/src/abis/Reader.json +355 -0
  25. package/build/cjs/src/abis/ReaderV2.json +630 -0
  26. package/build/cjs/src/abis/ReferralStorage.json +507 -0
  27. package/build/cjs/src/abis/RewardReader.json +86 -0
  28. package/build/cjs/src/abis/RewardRouter.json +1024 -0
  29. package/build/cjs/src/abis/RewardTracker.json +918 -0
  30. package/build/cjs/src/abis/Router-v2.json +605 -0
  31. package/build/cjs/src/abis/Router.json +605 -0
  32. package/build/cjs/src/abis/SubaccountRouter.json +658 -0
  33. package/build/cjs/src/abis/SyntheticsReader.json +4706 -0
  34. package/build/cjs/src/abis/SyntheticsRouter.json +77 -0
  35. package/build/cjs/src/abis/Timelock.json +1737 -0
  36. package/build/cjs/src/abis/Token.json +345 -0
  37. package/build/cjs/src/abis/Treasury.json +411 -0
  38. package/build/cjs/src/abis/UniPool.json +89 -0
  39. package/build/cjs/src/abis/UniswapV2.json +1 -0
  40. package/build/cjs/src/abis/Vault.json +3220 -0
  41. package/build/cjs/src/abis/VaultReader.json +87 -0
  42. package/build/cjs/src/abis/VaultV2.json +3019 -0
  43. package/build/cjs/src/abis/VaultV2b.json +3220 -0
  44. package/build/cjs/src/abis/Vester.json +1031 -0
  45. package/build/cjs/src/abis/WETH.json +320 -0
  46. package/build/cjs/src/abis/YieldFarm.json +599 -0
  47. package/build/cjs/src/abis/YieldToken.json +560 -0
  48. package/build/cjs/src/abis/index.js +94 -0
  49. package/build/cjs/src/configs/__tests__/markets.spec.js +32 -0
  50. package/build/cjs/src/configs/__tests__/tokens.spec.js +40 -0
  51. package/build/cjs/src/configs/batch.js +42 -0
  52. package/build/cjs/src/configs/chains.js +98 -0
  53. package/build/cjs/src/configs/contracts.js +248 -0
  54. package/build/cjs/src/configs/dataStore.js +348 -0
  55. package/build/cjs/src/configs/factors.js +14 -0
  56. package/build/cjs/src/configs/markets.js +840 -0
  57. package/build/cjs/src/configs/oracleKeeper.js +45 -0
  58. package/build/cjs/src/configs/tokens.js +1635 -0
  59. package/build/cjs/src/index.js +75 -0
  60. package/build/cjs/src/modules/accounts/accounts.js +39 -0
  61. package/build/cjs/src/modules/accounts/accounts.spec.js +10 -0
  62. package/build/cjs/src/modules/base.js +19 -0
  63. package/build/cjs/src/modules/markets/index.js +334 -0
  64. package/build/cjs/src/modules/markets/markets.spec.js +40 -0
  65. package/build/cjs/src/modules/markets/query-builders.js +385 -0
  66. package/build/cjs/src/modules/markets/types.js +2 -0
  67. package/build/cjs/src/modules/oracle.js +45 -0
  68. package/build/cjs/src/modules/orders/helpers.js +225 -0
  69. package/build/cjs/src/modules/orders/helpers.spec.js +131 -0
  70. package/build/cjs/src/modules/orders/orders.js +293 -0
  71. package/build/cjs/src/modules/orders/orders.spec.js +19 -0
  72. package/build/cjs/src/modules/orders/transactions/cancelOrdersTxn.js +20 -0
  73. package/build/cjs/src/modules/orders/transactions/createDecreaseOrderTxn.js +104 -0
  74. package/build/cjs/src/modules/orders/transactions/createIncreaseOrderTxn.js +174 -0
  75. package/build/cjs/src/modules/orders/transactions/createSwapOrderTxn.js +84 -0
  76. package/build/cjs/src/modules/orders/transactions/createWrapOrUnwrapTxn.js +17 -0
  77. package/build/cjs/src/modules/orders/transactions/updateOrderTxn.js +51 -0
  78. package/build/cjs/src/modules/orders/utils.js +157 -0
  79. package/build/cjs/src/modules/positions/positions.js +501 -0
  80. package/build/cjs/src/modules/positions/positions.spec.js +28 -0
  81. package/build/cjs/src/modules/tokens/tokens.js +135 -0
  82. package/build/cjs/src/modules/tokens/tokens.spec.js +29 -0
  83. package/build/cjs/src/modules/trades/trades.js +266 -0
  84. package/build/cjs/src/modules/trades/trades.spec.js +17 -0
  85. package/build/cjs/src/modules/utils/utils.js +211 -0
  86. package/build/cjs/src/package.json +1 -0
  87. package/build/cjs/src/prebuilt/hashedKinkModelMarketRatesKeys.json +944 -0
  88. package/build/cjs/src/prebuilt/hashedMarketConfigKeys.json +5858 -0
  89. package/build/cjs/src/prebuilt/hashedMarketValuesKeys.json +1763 -0
  90. package/build/cjs/src/prebuilt/index.js +15 -0
  91. package/build/cjs/src/test/mock.js +246 -0
  92. package/build/cjs/src/types/common.js +2 -0
  93. package/build/cjs/src/types/fees.js +2 -0
  94. package/build/cjs/src/types/markets.js +2 -0
  95. package/build/cjs/src/types/orders.js +38 -0
  96. package/build/cjs/src/types/positions.js +2 -0
  97. package/build/cjs/src/types/referrals.js +12 -0
  98. package/build/cjs/src/types/sdk.js +2 -0
  99. package/build/cjs/src/types/sidecarOrders.js +2 -0
  100. package/build/cjs/src/types/tokens.js +2 -0
  101. package/build/cjs/src/types/trade.js +25 -0
  102. package/build/cjs/src/types/tradeHistory.js +11 -0
  103. package/build/cjs/src/utils/LruCache.js +49 -0
  104. package/build/cjs/src/utils/__tests__/LruCache.spec.js +45 -0
  105. package/build/cjs/src/utils/__tests__/bigmath.spec.js +40 -0
  106. package/build/cjs/src/utils/__tests__/fees.spec.js +64 -0
  107. package/build/cjs/src/utils/__tests__/hash.spec.js +43 -0
  108. package/build/cjs/src/utils/__tests__/markets.spec.js +267 -0
  109. package/build/cjs/src/utils/__tests__/numbers.spec.js +83 -0
  110. package/build/cjs/src/utils/__tests__/objects.spec.js +139 -0
  111. package/build/cjs/src/utils/__tests__/positions.spec.js +180 -0
  112. package/build/cjs/src/utils/__tests__/prices.spec.js +69 -0
  113. package/build/cjs/src/utils/__tests__/referrals.spec.js +20 -0
  114. package/build/cjs/src/utils/__tests__/subgraph.spec.js +161 -0
  115. package/build/cjs/src/utils/__tests__/tokens.spec.js +115 -0
  116. package/build/cjs/src/utils/__tests__/trade.spec.js +38 -0
  117. package/build/cjs/src/utils/bigmath.js +34 -0
  118. package/build/cjs/src/utils/buildUrl.js +12 -0
  119. package/build/cjs/src/utils/callContract.js +143 -0
  120. package/build/cjs/src/utils/common.js +14 -0
  121. package/build/cjs/src/utils/contracts.js +93 -0
  122. package/build/cjs/src/utils/fees/estimateOraclePriceCount.js +28 -0
  123. package/build/cjs/src/utils/fees/executionFee.js +113 -0
  124. package/build/cjs/src/utils/fees/executionFee.spec.js +66 -0
  125. package/build/cjs/src/utils/fees/getNaiveEstimatedGasBySwapCount.js +8 -0
  126. package/build/cjs/src/utils/fees/index.js +128 -0
  127. package/build/cjs/src/utils/fees/priceImpact.js +300 -0
  128. package/build/cjs/src/utils/graphqlFetcher.js +24 -0
  129. package/build/cjs/src/utils/hash.js +41 -0
  130. package/build/cjs/src/utils/marketKeysAndConfigs.js +262 -0
  131. package/build/cjs/src/utils/markets.js +169 -0
  132. package/build/cjs/src/utils/multicall.js +125 -0
  133. package/build/cjs/src/utils/numbers.js +73 -0
  134. package/build/cjs/src/utils/objects.js +47 -0
  135. package/build/cjs/src/utils/orders.js +210 -0
  136. package/build/cjs/src/utils/positions.js +145 -0
  137. package/build/cjs/src/utils/prices.js +141 -0
  138. package/build/cjs/src/utils/referrals.js +34 -0
  139. package/build/cjs/src/utils/simulateExecuteOrder.js +143 -0
  140. package/build/cjs/src/utils/subgraph.js +86 -0
  141. package/build/cjs/src/utils/swap/__tests__/buildMarketsAdjacencyGraph.spec.js +118 -0
  142. package/build/cjs/src/utils/swap/__tests__/findReachableTokens.spec.js +118 -0
  143. package/build/cjs/src/utils/swap/__tests__/findSwapPathsBetweenTokens.spec.js +150 -0
  144. package/build/cjs/src/utils/swap/__tests__/mockRouting.spec.js +429 -0
  145. package/build/cjs/src/utils/swap/__tests__/swapRouting.spec.js +617 -0
  146. package/build/cjs/src/utils/swap/__tests__/swapStats.spec.js +388 -0
  147. package/build/cjs/src/utils/swap/buildMarketsAdjacencyGraph.js +25 -0
  148. package/build/cjs/src/utils/swap/constants.js +5 -0
  149. package/build/cjs/src/utils/swap/findReachableTokens.js +37 -0
  150. package/build/cjs/src/utils/swap/findSwapPathsBetweenTokens.js +75 -0
  151. package/build/cjs/src/utils/swap/index.js +18 -0
  152. package/build/cjs/src/utils/swap/preparedSwapData.js +28 -0
  153. package/build/cjs/src/utils/swap/swapPath.js +132 -0
  154. package/build/cjs/src/utils/swap/swapRouting.js +359 -0
  155. package/build/cjs/src/utils/swap/swapStats.js +258 -0
  156. package/build/cjs/src/utils/swap/swapValues.js +190 -0
  157. package/build/cjs/src/utils/testUtil.js +22 -0
  158. package/build/cjs/src/utils/tokens.js +144 -0
  159. package/build/cjs/src/utils/trade/amounts.js +317 -0
  160. package/build/cjs/src/utils/trade/index.js +17 -0
  161. package/build/cjs/src/utils/trade/trade.js +61 -0
  162. package/build/cjs/src/utils/tradeHistory.js +137 -0
  163. package/build/cjs/tsconfig.cjs.tsbuildinfo +1 -0
  164. package/build/esm/src/abis/CustomErrors.json +3254 -0
  165. package/build/esm/src/abis/DataStore.json +1440 -0
  166. package/build/esm/src/abis/ERC721.json +442 -0
  167. package/build/esm/src/abis/EventEmitter.json +2065 -0
  168. package/build/esm/src/abis/ExchangeRouter.json +1801 -0
  169. package/build/esm/src/abis/GMT.json +522 -0
  170. package/build/esm/src/abis/GlpManager.json +591 -0
  171. package/build/esm/src/abis/GlvReader.json +1414 -0
  172. package/build/esm/src/abis/GlvRouter.json +706 -0
  173. package/build/esm/src/abis/GmxMigrator.json +657 -0
  174. package/build/esm/src/abis/GovToken.json +1121 -0
  175. package/build/esm/src/abis/MintableBaseToken.json +696 -0
  176. package/build/esm/src/abis/Multicall.json +333 -0
  177. package/build/esm/src/abis/OrderBook.json +1997 -0
  178. package/build/esm/src/abis/OrderBookReader.json +111 -0
  179. package/build/esm/src/abis/OrderExecutor.json +122 -0
  180. package/build/esm/src/abis/PositionManager.json +1165 -0
  181. package/build/esm/src/abis/PositionRouter.json +2030 -0
  182. package/build/esm/src/abis/Reader.json +355 -0
  183. package/build/esm/src/abis/ReaderV2.json +630 -0
  184. package/build/esm/src/abis/ReferralStorage.json +507 -0
  185. package/build/esm/src/abis/RewardReader.json +86 -0
  186. package/build/esm/src/abis/RewardRouter.json +1024 -0
  187. package/build/esm/src/abis/RewardTracker.json +918 -0
  188. package/build/esm/src/abis/Router-v2.json +605 -0
  189. package/build/esm/src/abis/Router.json +605 -0
  190. package/build/esm/src/abis/SubaccountRouter.json +658 -0
  191. package/build/esm/src/abis/SyntheticsReader.json +4706 -0
  192. package/build/esm/src/abis/SyntheticsRouter.json +77 -0
  193. package/build/esm/src/abis/Timelock.json +1737 -0
  194. package/build/esm/src/abis/Token.json +345 -0
  195. package/build/esm/src/abis/Treasury.json +411 -0
  196. package/build/esm/src/abis/UniPool.json +89 -0
  197. package/build/esm/src/abis/UniswapV2.json +1 -0
  198. package/build/esm/src/abis/Vault.json +3220 -0
  199. package/build/esm/src/abis/VaultReader.json +87 -0
  200. package/build/esm/src/abis/VaultV2.json +3019 -0
  201. package/build/esm/src/abis/VaultV2b.json +3220 -0
  202. package/build/esm/src/abis/Vester.json +1031 -0
  203. package/build/esm/src/abis/WETH.json +320 -0
  204. package/build/esm/src/abis/YieldFarm.json +599 -0
  205. package/build/esm/src/abis/YieldToken.json +560 -0
  206. package/build/esm/src/abis/index.js +88 -0
  207. package/build/esm/src/configs/__tests__/markets.spec.js +30 -0
  208. package/build/esm/src/configs/__tests__/tokens.spec.js +38 -0
  209. package/build/{src → esm/src}/configs/chains.js +1 -1
  210. package/build/{src → esm/src}/configs/contracts.js +10 -4
  211. package/build/{src → esm/src}/configs/factors.js +3 -1
  212. package/build/{src → esm/src}/configs/markets.js +92 -0
  213. package/build/esm/src/configs/oracleKeeper.js +36 -0
  214. package/build/{src → esm/src}/configs/tokens.js +154 -13
  215. package/build/{src → esm/src}/modules/accounts/accounts.js +1 -2
  216. package/build/{src → esm/src}/modules/markets/index.js +1 -2
  217. package/build/{src → esm/src}/modules/markets/query-builders.js +8 -10
  218. package/build/esm/src/modules/orders/helpers.js +220 -0
  219. package/build/esm/src/modules/orders/helpers.spec.js +106 -0
  220. package/build/{src → esm/src}/modules/orders/orders.js +20 -2
  221. package/build/{src → esm/src}/modules/orders/transactions/cancelOrdersTxn.js +3 -3
  222. package/build/{src → esm/src}/modules/orders/transactions/createDecreaseOrderTxn.js +5 -5
  223. package/build/{src → esm/src}/modules/orders/transactions/createIncreaseOrderTxn.js +8 -7
  224. package/build/{src → esm/src}/modules/orders/transactions/createSwapOrderTxn.js +5 -5
  225. package/build/{src → esm/src}/modules/orders/transactions/createWrapOrUnwrapTxn.js +3 -3
  226. package/build/{src → esm/src}/modules/orders/transactions/updateOrderTxn.js +4 -4
  227. package/build/{src → esm/src}/modules/orders/utils.js +4 -6
  228. package/build/{src → esm/src}/modules/positions/positions.js +11 -14
  229. package/build/{src → esm/src}/modules/tokens/tokens.js +4 -10
  230. package/build/{src → esm/src}/modules/trades/trades.js +27 -155
  231. package/build/{src → esm/src}/modules/utils/utils.js +27 -3
  232. package/build/esm/src/package.json +1 -0
  233. package/build/esm/src/prebuilt/hashedKinkModelMarketRatesKeys.json +944 -0
  234. package/build/esm/src/prebuilt/hashedMarketConfigKeys.json +5858 -0
  235. package/build/esm/src/prebuilt/hashedMarketValuesKeys.json +1763 -0
  236. package/build/{src → esm/src}/prebuilt/index.js +3 -7
  237. package/build/esm/src/test/mock.js +238 -0
  238. package/build/{src → esm/src}/types/orders.js +2 -0
  239. package/build/{src → esm/src}/types/trade.js +5 -0
  240. package/build/{src → esm/src}/utils/__tests__/markets.spec.js +4 -4
  241. package/build/esm/src/utils/__tests__/objects.spec.js +137 -0
  242. package/build/{src → esm/src}/utils/__tests__/prices.spec.js +16 -8
  243. package/build/{src → esm/src}/utils/__tests__/subgraph.spec.js +0 -4
  244. package/build/{src → esm/src}/utils/__tests__/tokens.spec.js +33 -3
  245. package/build/{src → esm/src}/utils/bigmath.js +3 -0
  246. package/build/{src → esm/src}/utils/fees/executionFee.js +3 -1
  247. package/build/esm/src/utils/fees/getNaiveEstimatedGasBySwapCount.js +4 -0
  248. package/build/{src → esm/src}/utils/fees/priceImpact.js +1 -1
  249. package/build/{src → esm/src}/utils/markets.js +0 -3
  250. package/build/{src → esm/src}/utils/multicall.js +5 -3
  251. package/build/{src → esm/src}/utils/numbers.js +5 -1
  252. package/build/esm/src/utils/objects.js +36 -0
  253. package/build/{src → esm/src}/utils/orders.js +42 -13
  254. package/build/esm/src/utils/prices.js +132 -0
  255. package/build/{src → esm/src}/utils/simulateExecuteOrder.js +14 -10
  256. package/build/{src → esm/src}/utils/subgraph.js +16 -6
  257. package/build/esm/src/utils/swap/__tests__/buildMarketsAdjacencyGraph.spec.js +116 -0
  258. package/build/esm/src/utils/swap/__tests__/findReachableTokens.spec.js +116 -0
  259. package/build/esm/src/utils/swap/__tests__/findSwapPathsBetweenTokens.spec.js +148 -0
  260. package/build/esm/src/utils/swap/__tests__/mockRouting.spec.js +427 -0
  261. package/build/esm/src/utils/swap/__tests__/swapRouting.spec.js +615 -0
  262. package/build/esm/src/utils/swap/__tests__/swapStats.spec.js +386 -0
  263. package/build/esm/src/utils/swap/buildMarketsAdjacencyGraph.js +21 -0
  264. package/build/esm/src/utils/swap/constants.js +2 -0
  265. package/build/esm/src/utils/swap/findReachableTokens.js +33 -0
  266. package/build/esm/src/utils/swap/findSwapPathsBetweenTokens.js +71 -0
  267. package/build/esm/src/utils/swap/index.js +2 -0
  268. package/build/esm/src/utils/swap/preparedSwapData.js +23 -0
  269. package/build/esm/src/utils/swap/swapPath.js +127 -0
  270. package/build/esm/src/utils/swap/swapRouting.js +341 -0
  271. package/build/{src/utils → esm/src/utils/swap}/swapStats.js +49 -7
  272. package/build/esm/src/utils/swap/swapValues.js +184 -0
  273. package/build/{src → esm/src}/utils/testUtil.js +1 -2
  274. package/build/esm/src/utils/tokens.js +127 -0
  275. package/build/esm/src/utils/trade/amounts.js +310 -0
  276. package/build/esm/src/utils/trade/index.js +1 -0
  277. package/build/{src/utils → esm/src/utils/trade}/trade.js +26 -4
  278. package/build/esm/src/utils/tradeHistory.js +132 -0
  279. package/build/esm/tsconfig.esm.tsbuildinfo +1 -0
  280. package/build/src/abis/index.d.ts +23 -0
  281. package/build/src/configs/__tests__/markets.spec.d.ts +1 -0
  282. package/build/src/configs/__tests__/tokens.spec.d.ts +1 -0
  283. package/build/src/configs/chains.d.ts +7 -22
  284. package/build/src/configs/contracts.d.ts +1 -220
  285. package/build/src/configs/factors.d.ts +3 -1
  286. package/build/src/configs/markets.d.ts +2 -1
  287. package/build/src/configs/oracleKeeper.d.ts +3 -0
  288. package/build/src/configs/tokens.d.ts +4 -4
  289. package/build/src/modules/markets/query-builders.d.ts +5 -4
  290. package/build/src/modules/oracle.d.ts +7 -3
  291. package/build/src/modules/orders/helpers.d.ts +50 -0
  292. package/build/src/modules/orders/helpers.spec.d.ts +1 -0
  293. package/build/src/modules/orders/orders.d.ts +6 -1
  294. package/build/src/modules/orders/transactions/createDecreaseOrderTxn.d.ts +1 -1
  295. package/build/src/modules/orders/transactions/createSwapOrderTxn.d.ts +1 -0
  296. package/build/src/modules/orders/transactions/updateOrderTxn.d.ts +2 -2
  297. package/build/src/modules/orders/utils.d.ts +5 -200
  298. package/build/src/modules/positions/positions.d.ts +1 -1
  299. package/build/src/modules/trades/trades.d.ts +2 -3
  300. package/build/src/modules/utils/utils.d.ts +4 -2
  301. package/build/src/prebuilt/index.d.ts +6 -2
  302. package/build/src/test/mock.d.ts +14 -0
  303. package/build/src/types/fees.d.ts +6 -0
  304. package/build/src/types/orders.d.ts +4 -3
  305. package/build/src/types/sdk.d.ts +4 -3
  306. package/build/src/types/tokens.d.ts +5 -0
  307. package/build/src/types/trade.d.ts +84 -9
  308. package/build/src/types/tradeHistory.d.ts +3 -3
  309. package/build/src/utils/bigmath.d.ts +1 -0
  310. package/build/src/utils/fees/executionFee.d.ts +1 -1
  311. package/build/src/utils/fees/getNaiveEstimatedGasBySwapCount.d.ts +2 -0
  312. package/build/src/utils/hash.d.ts +1 -1
  313. package/build/src/utils/multicall.d.ts +2 -1
  314. package/build/src/utils/numbers.d.ts +2 -0
  315. package/build/src/utils/objects.d.ts +6 -0
  316. package/build/src/utils/orders.d.ts +1 -0
  317. package/build/src/utils/positions.d.ts +1 -1
  318. package/build/src/utils/prices.d.ts +35 -1
  319. package/build/src/utils/subgraph.d.ts +7 -5
  320. package/build/src/utils/swap/__tests__/buildMarketsAdjacencyGraph.spec.d.ts +1 -0
  321. package/build/src/utils/swap/__tests__/findReachableTokens.spec.d.ts +1 -0
  322. package/build/src/utils/swap/__tests__/findSwapPathsBetweenTokens.spec.d.ts +1 -0
  323. package/build/src/utils/swap/__tests__/mockRouting.spec.d.ts +1 -0
  324. package/build/src/utils/swap/__tests__/swapRouting.spec.d.ts +1 -0
  325. package/build/src/utils/swap/__tests__/swapStats.spec.d.ts +1 -0
  326. package/build/src/utils/swap/buildMarketsAdjacencyGraph.d.ts +11 -0
  327. package/build/src/utils/swap/constants.d.ts +2 -0
  328. package/build/src/utils/swap/findReachableTokens.d.ts +2 -0
  329. package/build/src/utils/swap/findSwapPathsBetweenTokens.d.ts +3 -0
  330. package/build/src/utils/swap/index.d.ts +2 -0
  331. package/build/src/utils/swap/preparedSwapData.d.ts +14 -0
  332. package/build/src/utils/swap/swapPath.d.ts +23 -0
  333. package/build/src/utils/swap/swapRouting.d.ts +67 -0
  334. package/build/src/utils/{swapStats.d.ts → swap/swapStats.d.ts} +7 -2
  335. package/build/src/utils/swap/swapValues.d.ts +26 -0
  336. package/build/src/utils/testUtil.d.ts +2 -14560
  337. package/build/src/utils/tokens.d.ts +25 -1
  338. package/build/src/utils/trade/amounts.d.ts +70 -0
  339. package/build/src/utils/trade/index.d.ts +1 -0
  340. package/build/src/utils/{trade.d.ts → trade/trade.d.ts} +2 -1
  341. package/build/src/utils/tradeHistory.d.ts +7 -0
  342. package/package.json +43 -12
  343. package/build/src/abis/CustomErrors.json +0 -3254
  344. package/build/src/abis/DataStore.json +0 -1440
  345. package/build/src/abis/ERC721.json +0 -442
  346. package/build/src/abis/EventEmitter.json +0 -2065
  347. package/build/src/abis/ExchangeRouter.json +0 -1801
  348. package/build/src/abis/GMT.json +0 -522
  349. package/build/src/abis/GlpManager.json +0 -592
  350. package/build/src/abis/GlvReader.json +0 -1415
  351. package/build/src/abis/GlvRouter.json +0 -707
  352. package/build/src/abis/GmxMigrator.json +0 -657
  353. package/build/src/abis/GovToken.json +0 -1121
  354. package/build/src/abis/MintableBaseToken.json +0 -696
  355. package/build/src/abis/Multicall.json +0 -333
  356. package/build/src/abis/OrderBook.json +0 -1997
  357. package/build/src/abis/OrderBookReader.json +0 -111
  358. package/build/src/abis/OrderExecutor.json +0 -122
  359. package/build/src/abis/PositionManager.json +0 -1165
  360. package/build/src/abis/PositionRouter.json +0 -2030
  361. package/build/src/abis/Reader.json +0 -355
  362. package/build/src/abis/ReaderV2.json +0 -630
  363. package/build/src/abis/ReferralStorage.json +0 -507
  364. package/build/src/abis/RewardReader.json +0 -86
  365. package/build/src/abis/RewardRouter.json +0 -1024
  366. package/build/src/abis/RewardTracker.json +0 -918
  367. package/build/src/abis/Router-v2.json +0 -605
  368. package/build/src/abis/Router.json +0 -605
  369. package/build/src/abis/SubaccountRouter.json +0 -658
  370. package/build/src/abis/SyntheticsReader.json +0 -4709
  371. package/build/src/abis/SyntheticsRouter.json +0 -77
  372. package/build/src/abis/Timelock.json +0 -1737
  373. package/build/src/abis/Token.json +0 -345
  374. package/build/src/abis/Treasury.json +0 -411
  375. package/build/src/abis/UniPool.json +0 -89
  376. package/build/src/abis/UniswapV2.json +0 -1
  377. package/build/src/abis/Vault.json +0 -3220
  378. package/build/src/abis/VaultReader.json +0 -87
  379. package/build/src/abis/VaultV2.json +0 -3019
  380. package/build/src/abis/VaultV2b.json +0 -3220
  381. package/build/src/abis/Vester.json +0 -1031
  382. package/build/src/abis/WETH.json +0 -320
  383. package/build/src/abis/YieldFarm.json +0 -599
  384. package/build/src/abis/YieldToken.json +0 -560
  385. package/build/src/prebuilt/hashedKinkModelMarketRatesKeys.json +0 -840
  386. package/build/src/prebuilt/hashedMarketConfigKeys.json +0 -5208
  387. package/build/src/prebuilt/hashedMarketValuesKeys.json +0 -1568
  388. package/build/src/prebuilt/index.ts +0 -45
  389. package/build/src/utils/__tests__/objects.spec.js +0 -59
  390. package/build/src/utils/objects.js +0 -13
  391. package/build/src/utils/prices.js +0 -25
  392. package/build/src/utils/tokens.js +0 -68
  393. package/build/tsconfig.tsbuildinfo +0 -1
  394. package/build/{scripts → esm/scripts}/prebuild/index.js +2 -2
  395. package/build/{scripts → esm/scripts}/prebuild/prebuildKinkModelMarketRatesKeys.js +1 -1
  396. package/build/{scripts → esm/scripts}/prebuild/prebuildMarketConfigKeys.js +1 -1
  397. package/build/{scripts → esm/scripts}/prebuild/prebuildMarketValuesKeys.js +0 -0
  398. package/build/{src → esm/src}/configs/batch.js +0 -0
  399. package/build/{src → esm/src}/configs/dataStore.js +0 -0
  400. package/build/{src → esm/src}/index.js +2 -2
  401. package/build/{src → esm/src}/modules/accounts/accounts.spec.js +0 -0
  402. package/build/{src → esm/src}/modules/base.js +0 -0
  403. package/build/{src → esm/src}/modules/markets/markets.spec.js +2 -2
  404. package/build/{src → esm/src}/modules/markets/types.js +0 -0
  405. package/build/{src → esm/src}/modules/oracle.js +0 -0
  406. package/build/{src → esm/src}/modules/orders/orders.spec.js +0 -0
  407. package/build/{src → esm/src}/modules/positions/positions.spec.js +1 -1
  408. package/build/{src → esm/src}/modules/tokens/tokens.spec.js +1 -1
  409. package/build/{src → esm/src}/modules/trades/trades.spec.js +0 -0
  410. package/build/{src → esm/src}/types/common.js +0 -0
  411. package/build/{src → esm/src}/types/fees.js +0 -0
  412. package/build/{src → esm/src}/types/markets.js +0 -0
  413. package/build/{src → esm/src}/types/positions.js +0 -0
  414. package/build/{src → esm/src}/types/referrals.js +0 -0
  415. package/build/{src → esm/src}/types/sdk.js +0 -0
  416. package/build/{src → esm/src}/types/sidecarOrders.js +0 -0
  417. package/build/{src → esm/src}/types/tokens.js +0 -0
  418. package/build/{src → esm/src}/types/tradeHistory.js +0 -0
  419. package/build/{src → esm/src}/utils/LruCache.js +0 -0
  420. package/build/{src → esm/src}/utils/__tests__/LruCache.spec.js +0 -0
  421. package/build/{src → esm/src}/utils/__tests__/bigmath.spec.js +1 -1
  422. package/build/{src → esm/src}/utils/__tests__/fees.spec.js +1 -1
  423. package/build/{src → esm/src}/utils/__tests__/hash.spec.js +1 -1
  424. package/build/{src → esm/src}/utils/__tests__/numbers.spec.js +0 -0
  425. package/build/{src → esm/src}/utils/__tests__/positions.spec.js +0 -0
  426. package/build/{src → esm/src}/utils/__tests__/referrals.spec.js +1 -1
  427. package/build/{src → esm/src}/utils/__tests__/trade.spec.js +0 -0
  428. package/build/{src → esm/src}/utils/buildUrl.js +0 -0
  429. package/build/{src → esm/src}/utils/callContract.js +0 -0
  430. package/build/{src → esm/src}/utils/common.js +0 -0
  431. package/build/{src → esm/src}/utils/contracts.js +0 -0
  432. package/build/{src → esm/src}/utils/fees/estimateOraclePriceCount.js +0 -0
  433. package/build/{src → esm/src}/utils/fees/executionFee.spec.js +2 -2
  434. package/build/{src → esm/src}/utils/fees/index.js +0 -0
  435. package/build/{src → esm/src}/utils/graphqlFetcher.js +0 -0
  436. package/build/{src → esm/src}/utils/hash.js +0 -0
  437. package/build/{src → esm/src}/utils/marketKeysAndConfigs.js +1 -1
  438. package/build/{src → esm/src}/utils/positions.js +3 -3
  439. /package/build/{src → esm/src}/utils/referrals.js +0 -0
@@ -1,3254 +0,0 @@
1
- {
2
- "_format": "hh-sol-artifact-1",
3
- "contractName": "Errors",
4
- "sourceName": "contracts/error/Errors.sol",
5
- "abi": [
6
- {
7
- "inputs": [],
8
- "name": "ActionAlreadySignalled",
9
- "type": "error"
10
- },
11
- {
12
- "inputs": [],
13
- "name": "ActionNotSignalled",
14
- "type": "error"
15
- },
16
- {
17
- "inputs": [],
18
- "name": "AdlNotEnabled",
19
- "type": "error"
20
- },
21
- {
22
- "inputs": [
23
- {
24
- "internalType": "int256",
25
- "name": "pnlToPoolFactor",
26
- "type": "int256"
27
- },
28
- {
29
- "internalType": "uint256",
30
- "name": "maxPnlFactorForAdl",
31
- "type": "uint256"
32
- }
33
- ],
34
- "name": "AdlNotRequired",
35
- "type": "error"
36
- },
37
- {
38
- "inputs": [
39
- {
40
- "internalType": "bytes[]",
41
- "name": "values",
42
- "type": "bytes[]"
43
- },
44
- {
45
- "internalType": "uint256",
46
- "name": "index",
47
- "type": "uint256"
48
- },
49
- {
50
- "internalType": "string",
51
- "name": "label",
52
- "type": "string"
53
- }
54
- ],
55
- "name": "ArrayOutOfBoundsBytes",
56
- "type": "error"
57
- },
58
- {
59
- "inputs": [
60
- {
61
- "internalType": "uint256[]",
62
- "name": "values",
63
- "type": "uint256[]"
64
- },
65
- {
66
- "internalType": "uint256",
67
- "name": "index",
68
- "type": "uint256"
69
- },
70
- {
71
- "internalType": "string",
72
- "name": "label",
73
- "type": "string"
74
- }
75
- ],
76
- "name": "ArrayOutOfBoundsUint256",
77
- "type": "error"
78
- },
79
- {
80
- "inputs": [
81
- {
82
- "internalType": "uint256",
83
- "name": "minOracleBlockNumber",
84
- "type": "uint256"
85
- },
86
- {
87
- "internalType": "uint256",
88
- "name": "prevMinOracleBlockNumber",
89
- "type": "uint256"
90
- }
91
- ],
92
- "name": "BlockNumbersNotSorted",
93
- "type": "error"
94
- },
95
- {
96
- "inputs": [
97
- {
98
- "internalType": "address",
99
- "name": "token",
100
- "type": "address"
101
- },
102
- {
103
- "internalType": "uint256",
104
- "name": "timestamp",
105
- "type": "uint256"
106
- },
107
- {
108
- "internalType": "uint256",
109
- "name": "heartbeatDuration",
110
- "type": "uint256"
111
- }
112
- ],
113
- "name": "ChainlinkPriceFeedNotUpdated",
114
- "type": "error"
115
- },
116
- {
117
- "inputs": [
118
- {
119
- "internalType": "uint256",
120
- "name": "adjustedClaimableAmount",
121
- "type": "uint256"
122
- },
123
- {
124
- "internalType": "uint256",
125
- "name": "claimedAmount",
126
- "type": "uint256"
127
- }
128
- ],
129
- "name": "CollateralAlreadyClaimed",
130
- "type": "error"
131
- },
132
- {
133
- "inputs": [
134
- {
135
- "internalType": "uint256[]",
136
- "name": "compactedValues",
137
- "type": "uint256[]"
138
- },
139
- {
140
- "internalType": "uint256",
141
- "name": "index",
142
- "type": "uint256"
143
- },
144
- {
145
- "internalType": "uint256",
146
- "name": "slotIndex",
147
- "type": "uint256"
148
- },
149
- {
150
- "internalType": "string",
151
- "name": "label",
152
- "type": "string"
153
- }
154
- ],
155
- "name": "CompactedArrayOutOfBounds",
156
- "type": "error"
157
- },
158
- {
159
- "inputs": [
160
- {
161
- "internalType": "bytes32",
162
- "name": "baseKey",
163
- "type": "bytes32"
164
- },
165
- {
166
- "internalType": "uint256",
167
- "name": "value",
168
- "type": "uint256"
169
- }
170
- ],
171
- "name": "ConfigValueExceedsAllowedRange",
172
- "type": "error"
173
- },
174
- {
175
- "inputs": [
176
- {
177
- "internalType": "address",
178
- "name": "token",
179
- "type": "address"
180
- }
181
- ],
182
- "name": "DataStreamIdAlreadyExistsForToken",
183
- "type": "error"
184
- },
185
- {
186
- "inputs": [
187
- {
188
- "internalType": "bytes32",
189
- "name": "key",
190
- "type": "bytes32"
191
- }
192
- ],
193
- "name": "DepositNotFound",
194
- "type": "error"
195
- },
196
- {
197
- "inputs": [
198
- {
199
- "internalType": "bytes32",
200
- "name": "key",
201
- "type": "bytes32"
202
- }
203
- ],
204
- "name": "DisabledFeature",
205
- "type": "error"
206
- },
207
- {
208
- "inputs": [
209
- {
210
- "internalType": "address",
211
- "name": "market",
212
- "type": "address"
213
- }
214
- ],
215
- "name": "DisabledMarket",
216
- "type": "error"
217
- },
218
- {
219
- "inputs": [
220
- {
221
- "internalType": "uint256",
222
- "name": "index",
223
- "type": "uint256"
224
- },
225
- {
226
- "internalType": "string",
227
- "name": "label",
228
- "type": "string"
229
- }
230
- ],
231
- "name": "DuplicatedIndex",
232
- "type": "error"
233
- },
234
- {
235
- "inputs": [
236
- {
237
- "internalType": "address",
238
- "name": "market",
239
- "type": "address"
240
- }
241
- ],
242
- "name": "DuplicatedMarketInSwapPath",
243
- "type": "error"
244
- },
245
- {
246
- "inputs": [],
247
- "name": "EmptyAccount",
248
- "type": "error"
249
- },
250
- {
251
- "inputs": [
252
- {
253
- "internalType": "address",
254
- "name": "market",
255
- "type": "address"
256
- },
257
- {
258
- "internalType": "address",
259
- "name": "token",
260
- "type": "address"
261
- }
262
- ],
263
- "name": "EmptyAddressInMarketTokenBalanceValidation",
264
- "type": "error"
265
- },
266
- {
267
- "inputs": [],
268
- "name": "EmptyChainlinkPaymentToken",
269
- "type": "error"
270
- },
271
- {
272
- "inputs": [
273
- {
274
- "internalType": "address",
275
- "name": "token",
276
- "type": "address"
277
- }
278
- ],
279
- "name": "EmptyChainlinkPriceFeed",
280
- "type": "error"
281
- },
282
- {
283
- "inputs": [
284
- {
285
- "internalType": "address",
286
- "name": "token",
287
- "type": "address"
288
- }
289
- ],
290
- "name": "EmptyChainlinkPriceFeedMultiplier",
291
- "type": "error"
292
- },
293
- {
294
- "inputs": [
295
- {
296
- "internalType": "address",
297
- "name": "token",
298
- "type": "address"
299
- }
300
- ],
301
- "name": "EmptyDataStreamFeedId",
302
- "type": "error"
303
- },
304
- {
305
- "inputs": [
306
- {
307
- "internalType": "address",
308
- "name": "token",
309
- "type": "address"
310
- }
311
- ],
312
- "name": "EmptyDataStreamMultiplier",
313
- "type": "error"
314
- },
315
- {
316
- "inputs": [],
317
- "name": "EmptyDeposit",
318
- "type": "error"
319
- },
320
- {
321
- "inputs": [],
322
- "name": "EmptyDepositAmounts",
323
- "type": "error"
324
- },
325
- {
326
- "inputs": [],
327
- "name": "EmptyDepositAmountsAfterSwap",
328
- "type": "error"
329
- },
330
- {
331
- "inputs": [
332
- {
333
- "internalType": "address",
334
- "name": "glv",
335
- "type": "address"
336
- }
337
- ],
338
- "name": "EmptyGlv",
339
- "type": "error"
340
- },
341
- {
342
- "inputs": [],
343
- "name": "EmptyGlvDeposit",
344
- "type": "error"
345
- },
346
- {
347
- "inputs": [],
348
- "name": "EmptyGlvDepositAmounts",
349
- "type": "error"
350
- },
351
- {
352
- "inputs": [],
353
- "name": "EmptyGlvMarketAmount",
354
- "type": "error"
355
- },
356
- {
357
- "inputs": [],
358
- "name": "EmptyGlvTokenSupply",
359
- "type": "error"
360
- },
361
- {
362
- "inputs": [],
363
- "name": "EmptyGlvWithdrawal",
364
- "type": "error"
365
- },
366
- {
367
- "inputs": [],
368
- "name": "EmptyGlvWithdrawalAmount",
369
- "type": "error"
370
- },
371
- {
372
- "inputs": [],
373
- "name": "EmptyHoldingAddress",
374
- "type": "error"
375
- },
376
- {
377
- "inputs": [],
378
- "name": "EmptyMarket",
379
- "type": "error"
380
- },
381
- {
382
- "inputs": [],
383
- "name": "EmptyMarketTokenSupply",
384
- "type": "error"
385
- },
386
- {
387
- "inputs": [],
388
- "name": "EmptyOrder",
389
- "type": "error"
390
- },
391
- {
392
- "inputs": [],
393
- "name": "EmptyPosition",
394
- "type": "error"
395
- },
396
- {
397
- "inputs": [
398
- {
399
- "internalType": "address",
400
- "name": "token",
401
- "type": "address"
402
- }
403
- ],
404
- "name": "EmptyPrimaryPrice",
405
- "type": "error"
406
- },
407
- {
408
- "inputs": [],
409
- "name": "EmptyReceiver",
410
- "type": "error"
411
- },
412
- {
413
- "inputs": [],
414
- "name": "EmptyShift",
415
- "type": "error"
416
- },
417
- {
418
- "inputs": [],
419
- "name": "EmptyShiftAmount",
420
- "type": "error"
421
- },
422
- {
423
- "inputs": [],
424
- "name": "EmptySizeDeltaInTokens",
425
- "type": "error"
426
- },
427
- {
428
- "inputs": [
429
- {
430
- "internalType": "address",
431
- "name": "token",
432
- "type": "address"
433
- }
434
- ],
435
- "name": "EmptyTokenTranferGasLimit",
436
- "type": "error"
437
- },
438
- {
439
- "inputs": [],
440
- "name": "EmptyValidatedPrices",
441
- "type": "error"
442
- },
443
- {
444
- "inputs": [],
445
- "name": "EmptyWithdrawal",
446
- "type": "error"
447
- },
448
- {
449
- "inputs": [],
450
- "name": "EmptyWithdrawalAmount",
451
- "type": "error"
452
- },
453
- {
454
- "inputs": [],
455
- "name": "EndOfOracleSimulation",
456
- "type": "error"
457
- },
458
- {
459
- "inputs": [
460
- {
461
- "internalType": "bytes",
462
- "name": "data",
463
- "type": "bytes"
464
- }
465
- ],
466
- "name": "ExternalCallFailed",
467
- "type": "error"
468
- },
469
- {
470
- "inputs": [
471
- {
472
- "internalType": "bytes32",
473
- "name": "key",
474
- "type": "bytes32"
475
- }
476
- ],
477
- "name": "FeeBatchNotFound",
478
- "type": "error"
479
- },
480
- {
481
- "inputs": [
482
- {
483
- "internalType": "bytes32",
484
- "name": "salt",
485
- "type": "bytes32"
486
- },
487
- {
488
- "internalType": "address",
489
- "name": "glv",
490
- "type": "address"
491
- }
492
- ],
493
- "name": "GlvAlreadyExists",
494
- "type": "error"
495
- },
496
- {
497
- "inputs": [
498
- {
499
- "internalType": "bytes32",
500
- "name": "key",
501
- "type": "bytes32"
502
- }
503
- ],
504
- "name": "GlvDepositNotFound",
505
- "type": "error"
506
- },
507
- {
508
- "inputs": [
509
- {
510
- "internalType": "address",
511
- "name": "glv",
512
- "type": "address"
513
- },
514
- {
515
- "internalType": "address",
516
- "name": "market",
517
- "type": "address"
518
- }
519
- ],
520
- "name": "GlvDisabledMarket",
521
- "type": "error"
522
- },
523
- {
524
- "inputs": [
525
- {
526
- "internalType": "address",
527
- "name": "glv",
528
- "type": "address"
529
- },
530
- {
531
- "internalType": "address",
532
- "name": "market",
533
- "type": "address"
534
- }
535
- ],
536
- "name": "GlvEnabledMarket",
537
- "type": "error"
538
- },
539
- {
540
- "inputs": [
541
- {
542
- "internalType": "address",
543
- "name": "glv",
544
- "type": "address"
545
- },
546
- {
547
- "internalType": "address",
548
- "name": "market",
549
- "type": "address"
550
- },
551
- {
552
- "internalType": "uint256",
553
- "name": "marketTokenBalance",
554
- "type": "uint256"
555
- },
556
- {
557
- "internalType": "uint256",
558
- "name": "marketTokenAmount",
559
- "type": "uint256"
560
- }
561
- ],
562
- "name": "GlvInsufficientMarketTokenBalance",
563
- "type": "error"
564
- },
565
- {
566
- "inputs": [
567
- {
568
- "internalType": "address",
569
- "name": "glv",
570
- "type": "address"
571
- },
572
- {
573
- "internalType": "address",
574
- "name": "provided",
575
- "type": "address"
576
- },
577
- {
578
- "internalType": "address",
579
- "name": "expected",
580
- "type": "address"
581
- }
582
- ],
583
- "name": "GlvInvalidLongToken",
584
- "type": "error"
585
- },
586
- {
587
- "inputs": [
588
- {
589
- "internalType": "address",
590
- "name": "glv",
591
- "type": "address"
592
- },
593
- {
594
- "internalType": "address",
595
- "name": "provided",
596
- "type": "address"
597
- },
598
- {
599
- "internalType": "address",
600
- "name": "expected",
601
- "type": "address"
602
- }
603
- ],
604
- "name": "GlvInvalidShortToken",
605
- "type": "error"
606
- },
607
- {
608
- "inputs": [
609
- {
610
- "internalType": "address",
611
- "name": "glv",
612
- "type": "address"
613
- },
614
- {
615
- "internalType": "address",
616
- "name": "market",
617
- "type": "address"
618
- }
619
- ],
620
- "name": "GlvMarketAlreadyExists",
621
- "type": "error"
622
- },
623
- {
624
- "inputs": [
625
- {
626
- "internalType": "address",
627
- "name": "glv",
628
- "type": "address"
629
- },
630
- {
631
- "internalType": "uint256",
632
- "name": "glvMaxMarketCount",
633
- "type": "uint256"
634
- }
635
- ],
636
- "name": "GlvMaxMarketCountExceeded",
637
- "type": "error"
638
- },
639
- {
640
- "inputs": [
641
- {
642
- "internalType": "address",
643
- "name": "glv",
644
- "type": "address"
645
- },
646
- {
647
- "internalType": "address",
648
- "name": "market",
649
- "type": "address"
650
- },
651
- {
652
- "internalType": "uint256",
653
- "name": "maxMarketTokenBalanceAmount",
654
- "type": "uint256"
655
- },
656
- {
657
- "internalType": "uint256",
658
- "name": "marketTokenBalanceAmount",
659
- "type": "uint256"
660
- }
661
- ],
662
- "name": "GlvMaxMarketTokenBalanceAmountExceeded",
663
- "type": "error"
664
- },
665
- {
666
- "inputs": [
667
- {
668
- "internalType": "address",
669
- "name": "glv",
670
- "type": "address"
671
- },
672
- {
673
- "internalType": "address",
674
- "name": "market",
675
- "type": "address"
676
- },
677
- {
678
- "internalType": "uint256",
679
- "name": "maxMarketTokenBalanceUsd",
680
- "type": "uint256"
681
- },
682
- {
683
- "internalType": "uint256",
684
- "name": "marketTokenBalanceUsd",
685
- "type": "uint256"
686
- }
687
- ],
688
- "name": "GlvMaxMarketTokenBalanceUsdExceeded",
689
- "type": "error"
690
- },
691
- {
692
- "inputs": [],
693
- "name": "GlvNameTooLong",
694
- "type": "error"
695
- },
696
- {
697
- "inputs": [
698
- {
699
- "internalType": "address",
700
- "name": "glv",
701
- "type": "address"
702
- },
703
- {
704
- "internalType": "address",
705
- "name": "market",
706
- "type": "address"
707
- }
708
- ],
709
- "name": "GlvNegativeMarketPoolValue",
710
- "type": "error"
711
- },
712
- {
713
- "inputs": [
714
- {
715
- "internalType": "address",
716
- "name": "glv",
717
- "type": "address"
718
- },
719
- {
720
- "internalType": "address",
721
- "name": "market",
722
- "type": "address"
723
- }
724
- ],
725
- "name": "GlvNonZeroMarketBalance",
726
- "type": "error"
727
- },
728
- {
729
- "inputs": [
730
- {
731
- "internalType": "address",
732
- "name": "key",
733
- "type": "address"
734
- }
735
- ],
736
- "name": "GlvNotFound",
737
- "type": "error"
738
- },
739
- {
740
- "inputs": [
741
- {
742
- "internalType": "uint256",
743
- "name": "currentTimestamp",
744
- "type": "uint256"
745
- },
746
- {
747
- "internalType": "uint256",
748
- "name": "lastGlvShiftExecutedAt",
749
- "type": "uint256"
750
- },
751
- {
752
- "internalType": "uint256",
753
- "name": "glvShiftMinInterval",
754
- "type": "uint256"
755
- }
756
- ],
757
- "name": "GlvShiftIntervalNotYetPassed",
758
- "type": "error"
759
- },
760
- {
761
- "inputs": [
762
- {
763
- "internalType": "uint256",
764
- "name": "effectivePriceImpactFactor",
765
- "type": "uint256"
766
- },
767
- {
768
- "internalType": "uint256",
769
- "name": "glvMaxShiftPriceImpactFactor",
770
- "type": "uint256"
771
- }
772
- ],
773
- "name": "GlvShiftMaxPriceImpactExceeded",
774
- "type": "error"
775
- },
776
- {
777
- "inputs": [
778
- {
779
- "internalType": "bytes32",
780
- "name": "key",
781
- "type": "bytes32"
782
- }
783
- ],
784
- "name": "GlvShiftNotFound",
785
- "type": "error"
786
- },
787
- {
788
- "inputs": [],
789
- "name": "GlvSymbolTooLong",
790
- "type": "error"
791
- },
792
- {
793
- "inputs": [
794
- {
795
- "internalType": "address",
796
- "name": "glv",
797
- "type": "address"
798
- },
799
- {
800
- "internalType": "address",
801
- "name": "market",
802
- "type": "address"
803
- }
804
- ],
805
- "name": "GlvUnsupportedMarket",
806
- "type": "error"
807
- },
808
- {
809
- "inputs": [
810
- {
811
- "internalType": "bytes32",
812
- "name": "key",
813
- "type": "bytes32"
814
- }
815
- ],
816
- "name": "GlvWithdrawalNotFound",
817
- "type": "error"
818
- },
819
- {
820
- "inputs": [
821
- {
822
- "internalType": "uint256",
823
- "name": "signerIndex",
824
- "type": "uint256"
825
- }
826
- ],
827
- "name": "GmEmptySigner",
828
- "type": "error"
829
- },
830
- {
831
- "inputs": [
832
- {
833
- "internalType": "uint256",
834
- "name": "minOracleBlockNumber",
835
- "type": "uint256"
836
- },
837
- {
838
- "internalType": "uint256",
839
- "name": "currentBlockNumber",
840
- "type": "uint256"
841
- }
842
- ],
843
- "name": "GmInvalidBlockNumber",
844
- "type": "error"
845
- },
846
- {
847
- "inputs": [
848
- {
849
- "internalType": "uint256",
850
- "name": "minOracleBlockNumber",
851
- "type": "uint256"
852
- },
853
- {
854
- "internalType": "uint256",
855
- "name": "maxOracleBlockNumber",
856
- "type": "uint256"
857
- }
858
- ],
859
- "name": "GmInvalidMinMaxBlockNumber",
860
- "type": "error"
861
- },
862
- {
863
- "inputs": [
864
- {
865
- "internalType": "uint256",
866
- "name": "oracleSigners",
867
- "type": "uint256"
868
- },
869
- {
870
- "internalType": "uint256",
871
- "name": "maxOracleSigners",
872
- "type": "uint256"
873
- }
874
- ],
875
- "name": "GmMaxOracleSigners",
876
- "type": "error"
877
- },
878
- {
879
- "inputs": [
880
- {
881
- "internalType": "address",
882
- "name": "token",
883
- "type": "address"
884
- },
885
- {
886
- "internalType": "uint256",
887
- "name": "price",
888
- "type": "uint256"
889
- },
890
- {
891
- "internalType": "uint256",
892
- "name": "prevPrice",
893
- "type": "uint256"
894
- }
895
- ],
896
- "name": "GmMaxPricesNotSorted",
897
- "type": "error"
898
- },
899
- {
900
- "inputs": [
901
- {
902
- "internalType": "uint256",
903
- "name": "signerIndex",
904
- "type": "uint256"
905
- },
906
- {
907
- "internalType": "uint256",
908
- "name": "maxSignerIndex",
909
- "type": "uint256"
910
- }
911
- ],
912
- "name": "GmMaxSignerIndex",
913
- "type": "error"
914
- },
915
- {
916
- "inputs": [
917
- {
918
- "internalType": "uint256",
919
- "name": "oracleSigners",
920
- "type": "uint256"
921
- },
922
- {
923
- "internalType": "uint256",
924
- "name": "minOracleSigners",
925
- "type": "uint256"
926
- }
927
- ],
928
- "name": "GmMinOracleSigners",
929
- "type": "error"
930
- },
931
- {
932
- "inputs": [
933
- {
934
- "internalType": "address",
935
- "name": "token",
936
- "type": "address"
937
- },
938
- {
939
- "internalType": "uint256",
940
- "name": "price",
941
- "type": "uint256"
942
- },
943
- {
944
- "internalType": "uint256",
945
- "name": "prevPrice",
946
- "type": "uint256"
947
- }
948
- ],
949
- "name": "GmMinPricesNotSorted",
950
- "type": "error"
951
- },
952
- {
953
- "inputs": [
954
- {
955
- "internalType": "uint256",
956
- "name": "collateralAmount",
957
- "type": "uint256"
958
- },
959
- {
960
- "internalType": "int256",
961
- "name": "collateralDeltaAmount",
962
- "type": "int256"
963
- }
964
- ],
965
- "name": "InsufficientCollateralAmount",
966
- "type": "error"
967
- },
968
- {
969
- "inputs": [
970
- {
971
- "internalType": "int256",
972
- "name": "remainingCollateralUsd",
973
- "type": "int256"
974
- }
975
- ],
976
- "name": "InsufficientCollateralUsd",
977
- "type": "error"
978
- },
979
- {
980
- "inputs": [
981
- {
982
- "internalType": "uint256",
983
- "name": "minExecutionFee",
984
- "type": "uint256"
985
- },
986
- {
987
- "internalType": "uint256",
988
- "name": "executionFee",
989
- "type": "uint256"
990
- }
991
- ],
992
- "name": "InsufficientExecutionFee",
993
- "type": "error"
994
- },
995
- {
996
- "inputs": [
997
- {
998
- "internalType": "uint256",
999
- "name": "startingGas",
1000
- "type": "uint256"
1001
- },
1002
- {
1003
- "internalType": "uint256",
1004
- "name": "estimatedGasLimit",
1005
- "type": "uint256"
1006
- },
1007
- {
1008
- "internalType": "uint256",
1009
- "name": "minAdditionalGasForExecution",
1010
- "type": "uint256"
1011
- }
1012
- ],
1013
- "name": "InsufficientExecutionGas",
1014
- "type": "error"
1015
- },
1016
- {
1017
- "inputs": [
1018
- {
1019
- "internalType": "uint256",
1020
- "name": "startingGas",
1021
- "type": "uint256"
1022
- },
1023
- {
1024
- "internalType": "uint256",
1025
- "name": "minHandleErrorGas",
1026
- "type": "uint256"
1027
- }
1028
- ],
1029
- "name": "InsufficientExecutionGasForErrorHandling",
1030
- "type": "error"
1031
- },
1032
- {
1033
- "inputs": [
1034
- {
1035
- "internalType": "uint256",
1036
- "name": "remainingCostUsd",
1037
- "type": "uint256"
1038
- },
1039
- {
1040
- "internalType": "string",
1041
- "name": "step",
1042
- "type": "string"
1043
- }
1044
- ],
1045
- "name": "InsufficientFundsToPayForCosts",
1046
- "type": "error"
1047
- },
1048
- {
1049
- "inputs": [
1050
- {
1051
- "internalType": "uint256",
1052
- "name": "gas",
1053
- "type": "uint256"
1054
- },
1055
- {
1056
- "internalType": "uint256",
1057
- "name": "minHandleExecutionErrorGas",
1058
- "type": "uint256"
1059
- }
1060
- ],
1061
- "name": "InsufficientGasForCancellation",
1062
- "type": "error"
1063
- },
1064
- {
1065
- "inputs": [
1066
- {
1067
- "internalType": "uint256",
1068
- "name": "gasToBeForwarded",
1069
- "type": "uint256"
1070
- },
1071
- {
1072
- "internalType": "uint256",
1073
- "name": "callbackGasLimit",
1074
- "type": "uint256"
1075
- }
1076
- ],
1077
- "name": "InsufficientGasLeftForCallback",
1078
- "type": "error"
1079
- },
1080
- {
1081
- "inputs": [
1082
- {
1083
- "internalType": "uint256",
1084
- "name": "gas",
1085
- "type": "uint256"
1086
- },
1087
- {
1088
- "internalType": "uint256",
1089
- "name": "minHandleExecutionErrorGas",
1090
- "type": "uint256"
1091
- }
1092
- ],
1093
- "name": "InsufficientHandleExecutionErrorGas",
1094
- "type": "error"
1095
- },
1096
- {
1097
- "inputs": [
1098
- {
1099
- "internalType": "uint256",
1100
- "name": "balance",
1101
- "type": "uint256"
1102
- },
1103
- {
1104
- "internalType": "uint256",
1105
- "name": "expected",
1106
- "type": "uint256"
1107
- }
1108
- ],
1109
- "name": "InsufficientMarketTokens",
1110
- "type": "error"
1111
- },
1112
- {
1113
- "inputs": [
1114
- {
1115
- "internalType": "uint256",
1116
- "name": "outputAmount",
1117
- "type": "uint256"
1118
- },
1119
- {
1120
- "internalType": "uint256",
1121
- "name": "minOutputAmount",
1122
- "type": "uint256"
1123
- }
1124
- ],
1125
- "name": "InsufficientOutputAmount",
1126
- "type": "error"
1127
- },
1128
- {
1129
- "inputs": [
1130
- {
1131
- "internalType": "uint256",
1132
- "name": "poolAmount",
1133
- "type": "uint256"
1134
- },
1135
- {
1136
- "internalType": "uint256",
1137
- "name": "amount",
1138
- "type": "uint256"
1139
- }
1140
- ],
1141
- "name": "InsufficientPoolAmount",
1142
- "type": "error"
1143
- },
1144
- {
1145
- "inputs": [
1146
- {
1147
- "internalType": "uint256",
1148
- "name": "reservedUsd",
1149
- "type": "uint256"
1150
- },
1151
- {
1152
- "internalType": "uint256",
1153
- "name": "maxReservedUsd",
1154
- "type": "uint256"
1155
- }
1156
- ],
1157
- "name": "InsufficientReserve",
1158
- "type": "error"
1159
- },
1160
- {
1161
- "inputs": [
1162
- {
1163
- "internalType": "uint256",
1164
- "name": "reservedUsd",
1165
- "type": "uint256"
1166
- },
1167
- {
1168
- "internalType": "uint256",
1169
- "name": "maxReservedUsd",
1170
- "type": "uint256"
1171
- }
1172
- ],
1173
- "name": "InsufficientReserveForOpenInterest",
1174
- "type": "error"
1175
- },
1176
- {
1177
- "inputs": [
1178
- {
1179
- "internalType": "uint256",
1180
- "name": "outputAmount",
1181
- "type": "uint256"
1182
- },
1183
- {
1184
- "internalType": "uint256",
1185
- "name": "minOutputAmount",
1186
- "type": "uint256"
1187
- }
1188
- ],
1189
- "name": "InsufficientSwapOutputAmount",
1190
- "type": "error"
1191
- },
1192
- {
1193
- "inputs": [
1194
- {
1195
- "internalType": "uint256",
1196
- "name": "wntAmount",
1197
- "type": "uint256"
1198
- },
1199
- {
1200
- "internalType": "uint256",
1201
- "name": "executionFee",
1202
- "type": "uint256"
1203
- }
1204
- ],
1205
- "name": "InsufficientWntAmount",
1206
- "type": "error"
1207
- },
1208
- {
1209
- "inputs": [
1210
- {
1211
- "internalType": "uint256",
1212
- "name": "wntAmount",
1213
- "type": "uint256"
1214
- },
1215
- {
1216
- "internalType": "uint256",
1217
- "name": "executionFee",
1218
- "type": "uint256"
1219
- }
1220
- ],
1221
- "name": "InsufficientWntAmountForExecutionFee",
1222
- "type": "error"
1223
- },
1224
- {
1225
- "inputs": [
1226
- {
1227
- "internalType": "int256",
1228
- "name": "nextPnlToPoolFactor",
1229
- "type": "int256"
1230
- },
1231
- {
1232
- "internalType": "int256",
1233
- "name": "pnlToPoolFactor",
1234
- "type": "int256"
1235
- }
1236
- ],
1237
- "name": "InvalidAdl",
1238
- "type": "error"
1239
- },
1240
- {
1241
- "inputs": [
1242
- {
1243
- "internalType": "uint256",
1244
- "name": "amountIn",
1245
- "type": "uint256"
1246
- },
1247
- {
1248
- "internalType": "uint256",
1249
- "name": "remainingAmount",
1250
- "type": "uint256"
1251
- }
1252
- ],
1253
- "name": "InvalidAmountInForFeeBatch",
1254
- "type": "error"
1255
- },
1256
- {
1257
- "inputs": [
1258
- {
1259
- "internalType": "bytes32",
1260
- "name": "baseKey",
1261
- "type": "bytes32"
1262
- }
1263
- ],
1264
- "name": "InvalidBaseKey",
1265
- "type": "error"
1266
- },
1267
- {
1268
- "inputs": [
1269
- {
1270
- "internalType": "uint256",
1271
- "name": "largestMinBlockNumber",
1272
- "type": "uint256"
1273
- },
1274
- {
1275
- "internalType": "uint256",
1276
- "name": "smallestMaxBlockNumber",
1277
- "type": "uint256"
1278
- }
1279
- ],
1280
- "name": "InvalidBlockRangeSet",
1281
- "type": "error"
1282
- },
1283
- {
1284
- "inputs": [
1285
- {
1286
- "internalType": "uint256",
1287
- "name": "marketsLength",
1288
- "type": "uint256"
1289
- },
1290
- {
1291
- "internalType": "uint256",
1292
- "name": "tokensLength",
1293
- "type": "uint256"
1294
- }
1295
- ],
1296
- "name": "InvalidClaimAffiliateRewardsInput",
1297
- "type": "error"
1298
- },
1299
- {
1300
- "inputs": [
1301
- {
1302
- "internalType": "uint256",
1303
- "name": "marketsLength",
1304
- "type": "uint256"
1305
- },
1306
- {
1307
- "internalType": "uint256",
1308
- "name": "tokensLength",
1309
- "type": "uint256"
1310
- },
1311
- {
1312
- "internalType": "uint256",
1313
- "name": "timeKeysLength",
1314
- "type": "uint256"
1315
- }
1316
- ],
1317
- "name": "InvalidClaimCollateralInput",
1318
- "type": "error"
1319
- },
1320
- {
1321
- "inputs": [
1322
- {
1323
- "internalType": "uint256",
1324
- "name": "marketsLength",
1325
- "type": "uint256"
1326
- },
1327
- {
1328
- "internalType": "uint256",
1329
- "name": "tokensLength",
1330
- "type": "uint256"
1331
- }
1332
- ],
1333
- "name": "InvalidClaimFeesInput",
1334
- "type": "error"
1335
- },
1336
- {
1337
- "inputs": [
1338
- {
1339
- "internalType": "uint256",
1340
- "name": "marketsLength",
1341
- "type": "uint256"
1342
- },
1343
- {
1344
- "internalType": "uint256",
1345
- "name": "tokensLength",
1346
- "type": "uint256"
1347
- }
1348
- ],
1349
- "name": "InvalidClaimFundingFeesInput",
1350
- "type": "error"
1351
- },
1352
- {
1353
- "inputs": [
1354
- {
1355
- "internalType": "uint256",
1356
- "name": "marketsLength",
1357
- "type": "uint256"
1358
- },
1359
- {
1360
- "internalType": "uint256",
1361
- "name": "tokensLength",
1362
- "type": "uint256"
1363
- }
1364
- ],
1365
- "name": "InvalidClaimUiFeesInput",
1366
- "type": "error"
1367
- },
1368
- {
1369
- "inputs": [
1370
- {
1371
- "internalType": "uint256",
1372
- "name": "value",
1373
- "type": "uint256"
1374
- }
1375
- ],
1376
- "name": "InvalidClaimableFactor",
1377
- "type": "error"
1378
- },
1379
- {
1380
- "inputs": [
1381
- {
1382
- "internalType": "address",
1383
- "name": "market",
1384
- "type": "address"
1385
- },
1386
- {
1387
- "internalType": "address",
1388
- "name": "token",
1389
- "type": "address"
1390
- }
1391
- ],
1392
- "name": "InvalidCollateralTokenForMarket",
1393
- "type": "error"
1394
- },
1395
- {
1396
- "inputs": [
1397
- {
1398
- "internalType": "address",
1399
- "name": "token",
1400
- "type": "address"
1401
- },
1402
- {
1403
- "internalType": "int192",
1404
- "name": "bid",
1405
- "type": "int192"
1406
- },
1407
- {
1408
- "internalType": "int192",
1409
- "name": "ask",
1410
- "type": "int192"
1411
- }
1412
- ],
1413
- "name": "InvalidDataStreamBidAsk",
1414
- "type": "error"
1415
- },
1416
- {
1417
- "inputs": [
1418
- {
1419
- "internalType": "address",
1420
- "name": "token",
1421
- "type": "address"
1422
- },
1423
- {
1424
- "internalType": "bytes32",
1425
- "name": "feedId",
1426
- "type": "bytes32"
1427
- },
1428
- {
1429
- "internalType": "bytes32",
1430
- "name": "expectedFeedId",
1431
- "type": "bytes32"
1432
- }
1433
- ],
1434
- "name": "InvalidDataStreamFeedId",
1435
- "type": "error"
1436
- },
1437
- {
1438
- "inputs": [
1439
- {
1440
- "internalType": "address",
1441
- "name": "token",
1442
- "type": "address"
1443
- },
1444
- {
1445
- "internalType": "int192",
1446
- "name": "bid",
1447
- "type": "int192"
1448
- },
1449
- {
1450
- "internalType": "int192",
1451
- "name": "ask",
1452
- "type": "int192"
1453
- }
1454
- ],
1455
- "name": "InvalidDataStreamPrices",
1456
- "type": "error"
1457
- },
1458
- {
1459
- "inputs": [
1460
- {
1461
- "internalType": "uint256",
1462
- "name": "sizeDeltaUsd",
1463
- "type": "uint256"
1464
- },
1465
- {
1466
- "internalType": "uint256",
1467
- "name": "positionSizeInUsd",
1468
- "type": "uint256"
1469
- }
1470
- ],
1471
- "name": "InvalidDecreaseOrderSize",
1472
- "type": "error"
1473
- },
1474
- {
1475
- "inputs": [
1476
- {
1477
- "internalType": "uint256",
1478
- "name": "decreasePositionSwapType",
1479
- "type": "uint256"
1480
- }
1481
- ],
1482
- "name": "InvalidDecreasePositionSwapType",
1483
- "type": "error"
1484
- },
1485
- {
1486
- "inputs": [
1487
- {
1488
- "internalType": "uint256",
1489
- "name": "totalExecutionFee",
1490
- "type": "uint256"
1491
- },
1492
- {
1493
- "internalType": "uint256",
1494
- "name": "msgValue",
1495
- "type": "uint256"
1496
- }
1497
- ],
1498
- "name": "InvalidExecutionFeeForMigration",
1499
- "type": "error"
1500
- },
1501
- {
1502
- "inputs": [
1503
- {
1504
- "internalType": "uint256",
1505
- "name": "targetsLength",
1506
- "type": "uint256"
1507
- },
1508
- {
1509
- "internalType": "uint256",
1510
- "name": "dataListLength",
1511
- "type": "uint256"
1512
- }
1513
- ],
1514
- "name": "InvalidExternalCallInput",
1515
- "type": "error"
1516
- },
1517
- {
1518
- "inputs": [
1519
- {
1520
- "internalType": "address",
1521
- "name": "target",
1522
- "type": "address"
1523
- }
1524
- ],
1525
- "name": "InvalidExternalCallTarget",
1526
- "type": "error"
1527
- },
1528
- {
1529
- "inputs": [
1530
- {
1531
- "internalType": "uint256",
1532
- "name": "refundTokensLength",
1533
- "type": "uint256"
1534
- },
1535
- {
1536
- "internalType": "uint256",
1537
- "name": "refundReceiversLength",
1538
- "type": "uint256"
1539
- }
1540
- ],
1541
- "name": "InvalidExternalReceiversInput",
1542
- "type": "error"
1543
- },
1544
- {
1545
- "inputs": [
1546
- {
1547
- "internalType": "uint256",
1548
- "name": "tokenIndex",
1549
- "type": "uint256"
1550
- },
1551
- {
1552
- "internalType": "uint256",
1553
- "name": "feeBatchTokensLength",
1554
- "type": "uint256"
1555
- }
1556
- ],
1557
- "name": "InvalidFeeBatchTokenIndex",
1558
- "type": "error"
1559
- },
1560
- {
1561
- "inputs": [
1562
- {
1563
- "internalType": "address",
1564
- "name": "receiver",
1565
- "type": "address"
1566
- }
1567
- ],
1568
- "name": "InvalidFeeReceiver",
1569
- "type": "error"
1570
- },
1571
- {
1572
- "inputs": [
1573
- {
1574
- "internalType": "address",
1575
- "name": "token",
1576
- "type": "address"
1577
- },
1578
- {
1579
- "internalType": "int256",
1580
- "name": "price",
1581
- "type": "int256"
1582
- }
1583
- ],
1584
- "name": "InvalidFeedPrice",
1585
- "type": "error"
1586
- },
1587
- {
1588
- "inputs": [
1589
- {
1590
- "internalType": "uint256",
1591
- "name": "totalGlpAmountToRedeem",
1592
- "type": "uint256"
1593
- },
1594
- {
1595
- "internalType": "uint256",
1596
- "name": "totalGlpAmount",
1597
- "type": "uint256"
1598
- }
1599
- ],
1600
- "name": "InvalidGlpAmount",
1601
- "type": "error"
1602
- },
1603
- {
1604
- "inputs": [
1605
- {
1606
- "internalType": "address",
1607
- "name": "initialLongToken",
1608
- "type": "address"
1609
- }
1610
- ],
1611
- "name": "InvalidGlvDepositInitialLongToken",
1612
- "type": "error"
1613
- },
1614
- {
1615
- "inputs": [
1616
- {
1617
- "internalType": "address",
1618
- "name": "initialShortToken",
1619
- "type": "address"
1620
- }
1621
- ],
1622
- "name": "InvalidGlvDepositInitialShortToken",
1623
- "type": "error"
1624
- },
1625
- {
1626
- "inputs": [
1627
- {
1628
- "internalType": "uint256",
1629
- "name": "longTokenSwapPathLength",
1630
- "type": "uint256"
1631
- },
1632
- {
1633
- "internalType": "uint256",
1634
- "name": "shortTokenSwapPathLength",
1635
- "type": "uint256"
1636
- }
1637
- ],
1638
- "name": "InvalidGlvDepositSwapPath",
1639
- "type": "error"
1640
- },
1641
- {
1642
- "inputs": [
1643
- {
1644
- "internalType": "uint256",
1645
- "name": "minPrice",
1646
- "type": "uint256"
1647
- },
1648
- {
1649
- "internalType": "uint256",
1650
- "name": "maxPrice",
1651
- "type": "uint256"
1652
- }
1653
- ],
1654
- "name": "InvalidGmMedianMinMaxPrice",
1655
- "type": "error"
1656
- },
1657
- {
1658
- "inputs": [
1659
- {
1660
- "internalType": "address",
1661
- "name": "token",
1662
- "type": "address"
1663
- }
1664
- ],
1665
- "name": "InvalidGmOraclePrice",
1666
- "type": "error"
1667
- },
1668
- {
1669
- "inputs": [
1670
- {
1671
- "internalType": "address",
1672
- "name": "recoveredSigner",
1673
- "type": "address"
1674
- },
1675
- {
1676
- "internalType": "address",
1677
- "name": "expectedSigner",
1678
- "type": "address"
1679
- }
1680
- ],
1681
- "name": "InvalidGmSignature",
1682
- "type": "error"
1683
- },
1684
- {
1685
- "inputs": [
1686
- {
1687
- "internalType": "uint256",
1688
- "name": "minPrice",
1689
- "type": "uint256"
1690
- },
1691
- {
1692
- "internalType": "uint256",
1693
- "name": "maxPrice",
1694
- "type": "uint256"
1695
- }
1696
- ],
1697
- "name": "InvalidGmSignerMinMaxPrice",
1698
- "type": "error"
1699
- },
1700
- {
1701
- "inputs": [
1702
- {
1703
- "internalType": "address",
1704
- "name": "keeper",
1705
- "type": "address"
1706
- }
1707
- ],
1708
- "name": "InvalidKeeperForFrozenOrder",
1709
- "type": "error"
1710
- },
1711
- {
1712
- "inputs": [
1713
- {
1714
- "internalType": "address",
1715
- "name": "market",
1716
- "type": "address"
1717
- },
1718
- {
1719
- "internalType": "address",
1720
- "name": "token",
1721
- "type": "address"
1722
- },
1723
- {
1724
- "internalType": "uint256",
1725
- "name": "balance",
1726
- "type": "uint256"
1727
- },
1728
- {
1729
- "internalType": "uint256",
1730
- "name": "expectedMinBalance",
1731
- "type": "uint256"
1732
- }
1733
- ],
1734
- "name": "InvalidMarketTokenBalance",
1735
- "type": "error"
1736
- },
1737
- {
1738
- "inputs": [
1739
- {
1740
- "internalType": "address",
1741
- "name": "market",
1742
- "type": "address"
1743
- },
1744
- {
1745
- "internalType": "address",
1746
- "name": "token",
1747
- "type": "address"
1748
- },
1749
- {
1750
- "internalType": "uint256",
1751
- "name": "balance",
1752
- "type": "uint256"
1753
- },
1754
- {
1755
- "internalType": "uint256",
1756
- "name": "claimableFundingFeeAmount",
1757
- "type": "uint256"
1758
- }
1759
- ],
1760
- "name": "InvalidMarketTokenBalanceForClaimableFunding",
1761
- "type": "error"
1762
- },
1763
- {
1764
- "inputs": [
1765
- {
1766
- "internalType": "address",
1767
- "name": "market",
1768
- "type": "address"
1769
- },
1770
- {
1771
- "internalType": "address",
1772
- "name": "token",
1773
- "type": "address"
1774
- },
1775
- {
1776
- "internalType": "uint256",
1777
- "name": "balance",
1778
- "type": "uint256"
1779
- },
1780
- {
1781
- "internalType": "uint256",
1782
- "name": "collateralAmount",
1783
- "type": "uint256"
1784
- }
1785
- ],
1786
- "name": "InvalidMarketTokenBalanceForCollateralAmount",
1787
- "type": "error"
1788
- },
1789
- {
1790
- "inputs": [
1791
- {
1792
- "internalType": "uint256",
1793
- "name": "minGlvTokens",
1794
- "type": "uint256"
1795
- },
1796
- {
1797
- "internalType": "uint256",
1798
- "name": "expectedMinGlvTokens",
1799
- "type": "uint256"
1800
- }
1801
- ],
1802
- "name": "InvalidMinGlvTokensForFirstGlvDeposit",
1803
- "type": "error"
1804
- },
1805
- {
1806
- "inputs": [
1807
- {
1808
- "internalType": "uint256",
1809
- "name": "minMarketTokens",
1810
- "type": "uint256"
1811
- },
1812
- {
1813
- "internalType": "uint256",
1814
- "name": "expectedMinMarketTokens",
1815
- "type": "uint256"
1816
- }
1817
- ],
1818
- "name": "InvalidMinMarketTokensForFirstDeposit",
1819
- "type": "error"
1820
- },
1821
- {
1822
- "inputs": [
1823
- {
1824
- "internalType": "address",
1825
- "name": "token",
1826
- "type": "address"
1827
- },
1828
- {
1829
- "internalType": "uint256",
1830
- "name": "min",
1831
- "type": "uint256"
1832
- },
1833
- {
1834
- "internalType": "uint256",
1835
- "name": "max",
1836
- "type": "uint256"
1837
- }
1838
- ],
1839
- "name": "InvalidMinMaxForPrice",
1840
- "type": "error"
1841
- },
1842
- {
1843
- "inputs": [
1844
- {
1845
- "internalType": "address",
1846
- "name": "msgSender",
1847
- "type": "address"
1848
- }
1849
- ],
1850
- "name": "InvalidNativeTokenSender",
1851
- "type": "error"
1852
- },
1853
- {
1854
- "inputs": [
1855
- {
1856
- "internalType": "address",
1857
- "name": "provider",
1858
- "type": "address"
1859
- }
1860
- ],
1861
- "name": "InvalidOracleProvider",
1862
- "type": "error"
1863
- },
1864
- {
1865
- "inputs": [
1866
- {
1867
- "internalType": "address",
1868
- "name": "provider",
1869
- "type": "address"
1870
- },
1871
- {
1872
- "internalType": "address",
1873
- "name": "expectedProvider",
1874
- "type": "address"
1875
- }
1876
- ],
1877
- "name": "InvalidOracleProviderForToken",
1878
- "type": "error"
1879
- },
1880
- {
1881
- "inputs": [
1882
- {
1883
- "internalType": "uint256",
1884
- "name": "tokensLength",
1885
- "type": "uint256"
1886
- },
1887
- {
1888
- "internalType": "uint256",
1889
- "name": "dataLength",
1890
- "type": "uint256"
1891
- }
1892
- ],
1893
- "name": "InvalidOracleSetPricesDataParam",
1894
- "type": "error"
1895
- },
1896
- {
1897
- "inputs": [
1898
- {
1899
- "internalType": "uint256",
1900
- "name": "tokensLength",
1901
- "type": "uint256"
1902
- },
1903
- {
1904
- "internalType": "uint256",
1905
- "name": "providersLength",
1906
- "type": "uint256"
1907
- }
1908
- ],
1909
- "name": "InvalidOracleSetPricesProvidersParam",
1910
- "type": "error"
1911
- },
1912
- {
1913
- "inputs": [
1914
- {
1915
- "internalType": "address",
1916
- "name": "receiver",
1917
- "type": "address"
1918
- }
1919
- ],
1920
- "name": "InvalidOracleSigner",
1921
- "type": "error"
1922
- },
1923
- {
1924
- "inputs": [
1925
- {
1926
- "internalType": "uint256",
1927
- "name": "primaryPriceMin",
1928
- "type": "uint256"
1929
- },
1930
- {
1931
- "internalType": "uint256",
1932
- "name": "primaryPriceMax",
1933
- "type": "uint256"
1934
- },
1935
- {
1936
- "internalType": "uint256",
1937
- "name": "triggerPrice",
1938
- "type": "uint256"
1939
- },
1940
- {
1941
- "internalType": "uint256",
1942
- "name": "orderType",
1943
- "type": "uint256"
1944
- }
1945
- ],
1946
- "name": "InvalidOrderPrices",
1947
- "type": "error"
1948
- },
1949
- {
1950
- "inputs": [
1951
- {
1952
- "internalType": "address",
1953
- "name": "tokenOut",
1954
- "type": "address"
1955
- },
1956
- {
1957
- "internalType": "address",
1958
- "name": "expectedTokenOut",
1959
- "type": "address"
1960
- }
1961
- ],
1962
- "name": "InvalidOutputToken",
1963
- "type": "error"
1964
- },
1965
- {
1966
- "inputs": [
1967
- {
1968
- "internalType": "int256",
1969
- "name": "poolValue",
1970
- "type": "int256"
1971
- }
1972
- ],
1973
- "name": "InvalidPoolValueForDeposit",
1974
- "type": "error"
1975
- },
1976
- {
1977
- "inputs": [
1978
- {
1979
- "internalType": "int256",
1980
- "name": "poolValue",
1981
- "type": "int256"
1982
- }
1983
- ],
1984
- "name": "InvalidPoolValueForWithdrawal",
1985
- "type": "error"
1986
- },
1987
- {
1988
- "inputs": [
1989
- {
1990
- "internalType": "address",
1991
- "name": "market",
1992
- "type": "address"
1993
- }
1994
- ],
1995
- "name": "InvalidPositionMarket",
1996
- "type": "error"
1997
- },
1998
- {
1999
- "inputs": [
2000
- {
2001
- "internalType": "uint256",
2002
- "name": "sizeInUsd",
2003
- "type": "uint256"
2004
- },
2005
- {
2006
- "internalType": "uint256",
2007
- "name": "sizeInTokens",
2008
- "type": "uint256"
2009
- }
2010
- ],
2011
- "name": "InvalidPositionSizeValues",
2012
- "type": "error"
2013
- },
2014
- {
2015
- "inputs": [
2016
- {
2017
- "internalType": "uint256",
2018
- "name": "primaryTokensLength",
2019
- "type": "uint256"
2020
- },
2021
- {
2022
- "internalType": "uint256",
2023
- "name": "primaryPricesLength",
2024
- "type": "uint256"
2025
- }
2026
- ],
2027
- "name": "InvalidPrimaryPricesForSimulation",
2028
- "type": "error"
2029
- },
2030
- {
2031
- "inputs": [
2032
- {
2033
- "internalType": "address",
2034
- "name": "receiver",
2035
- "type": "address"
2036
- }
2037
- ],
2038
- "name": "InvalidReceiver",
2039
- "type": "error"
2040
- },
2041
- {
2042
- "inputs": [
2043
- {
2044
- "internalType": "address",
2045
- "name": "receiver",
2046
- "type": "address"
2047
- },
2048
- {
2049
- "internalType": "address",
2050
- "name": "expectedReceiver",
2051
- "type": "address"
2052
- }
2053
- ],
2054
- "name": "InvalidReceiverForFirstDeposit",
2055
- "type": "error"
2056
- },
2057
- {
2058
- "inputs": [
2059
- {
2060
- "internalType": "address",
2061
- "name": "receiver",
2062
- "type": "address"
2063
- },
2064
- {
2065
- "internalType": "address",
2066
- "name": "expectedReceiver",
2067
- "type": "address"
2068
- }
2069
- ],
2070
- "name": "InvalidReceiverForFirstGlvDeposit",
2071
- "type": "error"
2072
- },
2073
- {
2074
- "inputs": [
2075
- {
2076
- "internalType": "address",
2077
- "name": "receiver",
2078
- "type": "address"
2079
- },
2080
- {
2081
- "internalType": "address",
2082
- "name": "expectedReceiver",
2083
- "type": "address"
2084
- }
2085
- ],
2086
- "name": "InvalidReceiverForSubaccountOrder",
2087
- "type": "error"
2088
- },
2089
- {
2090
- "inputs": [
2091
- {
2092
- "internalType": "uint256",
2093
- "name": "sizeDeltaUsd",
2094
- "type": "uint256"
2095
- },
2096
- {
2097
- "internalType": "uint256",
2098
- "name": "positionSizeInUsd",
2099
- "type": "uint256"
2100
- }
2101
- ],
2102
- "name": "InvalidSizeDeltaForAdl",
2103
- "type": "error"
2104
- },
2105
- {
2106
- "inputs": [
2107
- {
2108
- "internalType": "address",
2109
- "name": "market",
2110
- "type": "address"
2111
- }
2112
- ],
2113
- "name": "InvalidSwapMarket",
2114
- "type": "error"
2115
- },
2116
- {
2117
- "inputs": [
2118
- {
2119
- "internalType": "address",
2120
- "name": "outputToken",
2121
- "type": "address"
2122
- },
2123
- {
2124
- "internalType": "address",
2125
- "name": "expectedOutputToken",
2126
- "type": "address"
2127
- }
2128
- ],
2129
- "name": "InvalidSwapOutputToken",
2130
- "type": "error"
2131
- },
2132
- {
2133
- "inputs": [
2134
- {
2135
- "internalType": "address[]",
2136
- "name": "path",
2137
- "type": "address[]"
2138
- },
2139
- {
2140
- "internalType": "address",
2141
- "name": "bridgingToken",
2142
- "type": "address"
2143
- }
2144
- ],
2145
- "name": "InvalidSwapPathForV1",
2146
- "type": "error"
2147
- },
2148
- {
2149
- "inputs": [
2150
- {
2151
- "internalType": "uint256",
2152
- "name": "timelockDelay",
2153
- "type": "uint256"
2154
- }
2155
- ],
2156
- "name": "InvalidTimelockDelay",
2157
- "type": "error"
2158
- },
2159
- {
2160
- "inputs": [
2161
- {
2162
- "internalType": "address",
2163
- "name": "tokenIn",
2164
- "type": "address"
2165
- },
2166
- {
2167
- "internalType": "address",
2168
- "name": "market",
2169
- "type": "address"
2170
- }
2171
- ],
2172
- "name": "InvalidTokenIn",
2173
- "type": "error"
2174
- },
2175
- {
2176
- "inputs": [
2177
- {
2178
- "internalType": "uint256",
2179
- "name": "uiFeeFactor",
2180
- "type": "uint256"
2181
- },
2182
- {
2183
- "internalType": "uint256",
2184
- "name": "maxUiFeeFactor",
2185
- "type": "uint256"
2186
- }
2187
- ],
2188
- "name": "InvalidUiFeeFactor",
2189
- "type": "error"
2190
- },
2191
- {
2192
- "inputs": [
2193
- {
2194
- "internalType": "string",
2195
- "name": "reason",
2196
- "type": "string"
2197
- },
2198
- {
2199
- "internalType": "int256",
2200
- "name": "remainingCollateralUsd",
2201
- "type": "int256"
2202
- },
2203
- {
2204
- "internalType": "int256",
2205
- "name": "minCollateralUsd",
2206
- "type": "int256"
2207
- },
2208
- {
2209
- "internalType": "int256",
2210
- "name": "minCollateralUsdForLeverage",
2211
- "type": "int256"
2212
- }
2213
- ],
2214
- "name": "LiquidatablePosition",
2215
- "type": "error"
2216
- },
2217
- {
2218
- "inputs": [
2219
- {
2220
- "internalType": "address",
2221
- "name": "fromMarketLongToken",
2222
- "type": "address"
2223
- },
2224
- {
2225
- "internalType": "address",
2226
- "name": "toMarketLongToken",
2227
- "type": "address"
2228
- }
2229
- ],
2230
- "name": "LongTokensAreNotEqual",
2231
- "type": "error"
2232
- },
2233
- {
2234
- "inputs": [
2235
- {
2236
- "internalType": "bytes32",
2237
- "name": "salt",
2238
- "type": "bytes32"
2239
- },
2240
- {
2241
- "internalType": "address",
2242
- "name": "existingMarketAddress",
2243
- "type": "address"
2244
- }
2245
- ],
2246
- "name": "MarketAlreadyExists",
2247
- "type": "error"
2248
- },
2249
- {
2250
- "inputs": [
2251
- {
2252
- "internalType": "address",
2253
- "name": "key",
2254
- "type": "address"
2255
- }
2256
- ],
2257
- "name": "MarketNotFound",
2258
- "type": "error"
2259
- },
2260
- {
2261
- "inputs": [
2262
- {
2263
- "internalType": "uint256",
2264
- "name": "index",
2265
- "type": "uint256"
2266
- },
2267
- {
2268
- "internalType": "string",
2269
- "name": "label",
2270
- "type": "string"
2271
- }
2272
- ],
2273
- "name": "MaskIndexOutOfBounds",
2274
- "type": "error"
2275
- },
2276
- {
2277
- "inputs": [
2278
- {
2279
- "internalType": "uint256",
2280
- "name": "count",
2281
- "type": "uint256"
2282
- },
2283
- {
2284
- "internalType": "uint256",
2285
- "name": "maxAutoCancelOrders",
2286
- "type": "uint256"
2287
- }
2288
- ],
2289
- "name": "MaxAutoCancelOrdersExceeded",
2290
- "type": "error"
2291
- },
2292
- {
2293
- "inputs": [
2294
- {
2295
- "internalType": "uint256",
2296
- "name": "callbackGasLimit",
2297
- "type": "uint256"
2298
- },
2299
- {
2300
- "internalType": "uint256",
2301
- "name": "maxCallbackGasLimit",
2302
- "type": "uint256"
2303
- }
2304
- ],
2305
- "name": "MaxCallbackGasLimitExceeded",
2306
- "type": "error"
2307
- },
2308
- {
2309
- "inputs": [
2310
- {
2311
- "internalType": "uint256",
2312
- "name": "maxFundingFactorPerSecond",
2313
- "type": "uint256"
2314
- },
2315
- {
2316
- "internalType": "uint256",
2317
- "name": "limit",
2318
- "type": "uint256"
2319
- }
2320
- ],
2321
- "name": "MaxFundingFactorPerSecondLimitExceeded",
2322
- "type": "error"
2323
- },
2324
- {
2325
- "inputs": [
2326
- {
2327
- "internalType": "uint256",
2328
- "name": "openInterest",
2329
- "type": "uint256"
2330
- },
2331
- {
2332
- "internalType": "uint256",
2333
- "name": "maxOpenInterest",
2334
- "type": "uint256"
2335
- }
2336
- ],
2337
- "name": "MaxOpenInterestExceeded",
2338
- "type": "error"
2339
- },
2340
- {
2341
- "inputs": [
2342
- {
2343
- "internalType": "uint256",
2344
- "name": "range",
2345
- "type": "uint256"
2346
- },
2347
- {
2348
- "internalType": "uint256",
2349
- "name": "maxRange",
2350
- "type": "uint256"
2351
- }
2352
- ],
2353
- "name": "MaxOracleTimestampRangeExceeded",
2354
- "type": "error"
2355
- },
2356
- {
2357
- "inputs": [
2358
- {
2359
- "internalType": "uint256",
2360
- "name": "poolAmount",
2361
- "type": "uint256"
2362
- },
2363
- {
2364
- "internalType": "uint256",
2365
- "name": "maxPoolAmount",
2366
- "type": "uint256"
2367
- }
2368
- ],
2369
- "name": "MaxPoolAmountExceeded",
2370
- "type": "error"
2371
- },
2372
- {
2373
- "inputs": [
2374
- {
2375
- "internalType": "uint256",
2376
- "name": "poolUsd",
2377
- "type": "uint256"
2378
- },
2379
- {
2380
- "internalType": "uint256",
2381
- "name": "maxPoolUsdForDeposit",
2382
- "type": "uint256"
2383
- }
2384
- ],
2385
- "name": "MaxPoolUsdForDepositExceeded",
2386
- "type": "error"
2387
- },
2388
- {
2389
- "inputs": [
2390
- {
2391
- "internalType": "uint256",
2392
- "name": "oracleTimestamp",
2393
- "type": "uint256"
2394
- },
2395
- {
2396
- "internalType": "uint256",
2397
- "name": "currentTimestamp",
2398
- "type": "uint256"
2399
- }
2400
- ],
2401
- "name": "MaxPriceAgeExceeded",
2402
- "type": "error"
2403
- },
2404
- {
2405
- "inputs": [
2406
- {
2407
- "internalType": "address",
2408
- "name": "token",
2409
- "type": "address"
2410
- },
2411
- {
2412
- "internalType": "uint256",
2413
- "name": "price",
2414
- "type": "uint256"
2415
- },
2416
- {
2417
- "internalType": "uint256",
2418
- "name": "refPrice",
2419
- "type": "uint256"
2420
- },
2421
- {
2422
- "internalType": "uint256",
2423
- "name": "maxRefPriceDeviationFactor",
2424
- "type": "uint256"
2425
- }
2426
- ],
2427
- "name": "MaxRefPriceDeviationExceeded",
2428
- "type": "error"
2429
- },
2430
- {
2431
- "inputs": [
2432
- {
2433
- "internalType": "address",
2434
- "name": "account",
2435
- "type": "address"
2436
- },
2437
- {
2438
- "internalType": "address",
2439
- "name": "subaccount",
2440
- "type": "address"
2441
- },
2442
- {
2443
- "internalType": "uint256",
2444
- "name": "count",
2445
- "type": "uint256"
2446
- },
2447
- {
2448
- "internalType": "uint256",
2449
- "name": "maxCount",
2450
- "type": "uint256"
2451
- }
2452
- ],
2453
- "name": "MaxSubaccountActionCountExceeded",
2454
- "type": "error"
2455
- },
2456
- {
2457
- "inputs": [
2458
- {
2459
- "internalType": "uint256",
2460
- "name": "swapPathLengh",
2461
- "type": "uint256"
2462
- },
2463
- {
2464
- "internalType": "uint256",
2465
- "name": "maxSwapPathLength",
2466
- "type": "uint256"
2467
- }
2468
- ],
2469
- "name": "MaxSwapPathLengthExceeded",
2470
- "type": "error"
2471
- },
2472
- {
2473
- "inputs": [
2474
- {
2475
- "internalType": "uint256",
2476
- "name": "timelockDelay",
2477
- "type": "uint256"
2478
- }
2479
- ],
2480
- "name": "MaxTimelockDelayExceeded",
2481
- "type": "error"
2482
- },
2483
- {
2484
- "inputs": [
2485
- {
2486
- "internalType": "uint256",
2487
- "name": "totalCallbackGasLimit",
2488
- "type": "uint256"
2489
- },
2490
- {
2491
- "internalType": "uint256",
2492
- "name": "maxTotalCallbackGasLimit",
2493
- "type": "uint256"
2494
- }
2495
- ],
2496
- "name": "MaxTotalCallbackGasLimitForAutoCancelOrdersExceeded",
2497
- "type": "error"
2498
- },
2499
- {
2500
- "inputs": [
2501
- {
2502
- "internalType": "uint256",
2503
- "name": "received",
2504
- "type": "uint256"
2505
- },
2506
- {
2507
- "internalType": "uint256",
2508
- "name": "expected",
2509
- "type": "uint256"
2510
- }
2511
- ],
2512
- "name": "MinGlvTokens",
2513
- "type": "error"
2514
- },
2515
- {
2516
- "inputs": [
2517
- {
2518
- "internalType": "uint256",
2519
- "name": "received",
2520
- "type": "uint256"
2521
- },
2522
- {
2523
- "internalType": "uint256",
2524
- "name": "expected",
2525
- "type": "uint256"
2526
- }
2527
- ],
2528
- "name": "MinLongTokens",
2529
- "type": "error"
2530
- },
2531
- {
2532
- "inputs": [
2533
- {
2534
- "internalType": "uint256",
2535
- "name": "received",
2536
- "type": "uint256"
2537
- },
2538
- {
2539
- "internalType": "uint256",
2540
- "name": "expected",
2541
- "type": "uint256"
2542
- }
2543
- ],
2544
- "name": "MinMarketTokens",
2545
- "type": "error"
2546
- },
2547
- {
2548
- "inputs": [
2549
- {
2550
- "internalType": "uint256",
2551
- "name": "positionSizeInUsd",
2552
- "type": "uint256"
2553
- },
2554
- {
2555
- "internalType": "uint256",
2556
- "name": "minPositionSizeUsd",
2557
- "type": "uint256"
2558
- }
2559
- ],
2560
- "name": "MinPositionSize",
2561
- "type": "error"
2562
- },
2563
- {
2564
- "inputs": [
2565
- {
2566
- "internalType": "uint256",
2567
- "name": "received",
2568
- "type": "uint256"
2569
- },
2570
- {
2571
- "internalType": "uint256",
2572
- "name": "expected",
2573
- "type": "uint256"
2574
- }
2575
- ],
2576
- "name": "MinShortTokens",
2577
- "type": "error"
2578
- },
2579
- {
2580
- "inputs": [
2581
- {
2582
- "internalType": "int256",
2583
- "name": "executionPrice",
2584
- "type": "int256"
2585
- },
2586
- {
2587
- "internalType": "uint256",
2588
- "name": "price",
2589
- "type": "uint256"
2590
- },
2591
- {
2592
- "internalType": "uint256",
2593
- "name": "positionSizeInUsd",
2594
- "type": "uint256"
2595
- },
2596
- {
2597
- "internalType": "int256",
2598
- "name": "priceImpactUsd",
2599
- "type": "int256"
2600
- },
2601
- {
2602
- "internalType": "uint256",
2603
- "name": "sizeDeltaUsd",
2604
- "type": "uint256"
2605
- }
2606
- ],
2607
- "name": "NegativeExecutionPrice",
2608
- "type": "error"
2609
- },
2610
- {
2611
- "inputs": [
2612
- {
2613
- "internalType": "address",
2614
- "name": "provider",
2615
- "type": "address"
2616
- }
2617
- ],
2618
- "name": "NonAtomicOracleProvider",
2619
- "type": "error"
2620
- },
2621
- {
2622
- "inputs": [
2623
- {
2624
- "internalType": "uint256",
2625
- "name": "tokensWithPricesLength",
2626
- "type": "uint256"
2627
- }
2628
- ],
2629
- "name": "NonEmptyTokensWithPrices",
2630
- "type": "error"
2631
- },
2632
- {
2633
- "inputs": [
2634
- {
2635
- "internalType": "address",
2636
- "name": "market",
2637
- "type": "address"
2638
- }
2639
- ],
2640
- "name": "OpenInterestCannotBeUpdatedForSwapOnlyMarket",
2641
- "type": "error"
2642
- },
2643
- {
2644
- "inputs": [
2645
- {
2646
- "internalType": "address",
2647
- "name": "token",
2648
- "type": "address"
2649
- }
2650
- ],
2651
- "name": "OracleProviderAlreadyExistsForToken",
2652
- "type": "error"
2653
- },
2654
- {
2655
- "inputs": [
2656
- {
2657
- "internalType": "uint256",
2658
- "name": "maxOracleTimestamp",
2659
- "type": "uint256"
2660
- },
2661
- {
2662
- "internalType": "uint256",
2663
- "name": "requestTimestamp",
2664
- "type": "uint256"
2665
- },
2666
- {
2667
- "internalType": "uint256",
2668
- "name": "requestExpirationTime",
2669
- "type": "uint256"
2670
- }
2671
- ],
2672
- "name": "OracleTimestampsAreLargerThanRequestExpirationTime",
2673
- "type": "error"
2674
- },
2675
- {
2676
- "inputs": [
2677
- {
2678
- "internalType": "uint256",
2679
- "name": "minOracleTimestamp",
2680
- "type": "uint256"
2681
- },
2682
- {
2683
- "internalType": "uint256",
2684
- "name": "expectedTimestamp",
2685
- "type": "uint256"
2686
- }
2687
- ],
2688
- "name": "OracleTimestampsAreSmallerThanRequired",
2689
- "type": "error"
2690
- },
2691
- {
2692
- "inputs": [],
2693
- "name": "OrderAlreadyFrozen",
2694
- "type": "error"
2695
- },
2696
- {
2697
- "inputs": [
2698
- {
2699
- "internalType": "bytes32",
2700
- "name": "key",
2701
- "type": "bytes32"
2702
- }
2703
- ],
2704
- "name": "OrderNotFound",
2705
- "type": "error"
2706
- },
2707
- {
2708
- "inputs": [
2709
- {
2710
- "internalType": "uint256",
2711
- "name": "price",
2712
- "type": "uint256"
2713
- },
2714
- {
2715
- "internalType": "uint256",
2716
- "name": "acceptablePrice",
2717
- "type": "uint256"
2718
- }
2719
- ],
2720
- "name": "OrderNotFulfillableAtAcceptablePrice",
2721
- "type": "error"
2722
- },
2723
- {
2724
- "inputs": [
2725
- {
2726
- "internalType": "uint256",
2727
- "name": "orderType",
2728
- "type": "uint256"
2729
- }
2730
- ],
2731
- "name": "OrderNotUpdatable",
2732
- "type": "error"
2733
- },
2734
- {
2735
- "inputs": [
2736
- {
2737
- "internalType": "uint256",
2738
- "name": "orderType",
2739
- "type": "uint256"
2740
- }
2741
- ],
2742
- "name": "OrderTypeCannotBeCreated",
2743
- "type": "error"
2744
- },
2745
- {
2746
- "inputs": [
2747
- {
2748
- "internalType": "int256",
2749
- "name": "pnlToPoolFactor",
2750
- "type": "int256"
2751
- },
2752
- {
2753
- "internalType": "uint256",
2754
- "name": "maxPnlFactor",
2755
- "type": "uint256"
2756
- }
2757
- ],
2758
- "name": "PnlFactorExceededForLongs",
2759
- "type": "error"
2760
- },
2761
- {
2762
- "inputs": [
2763
- {
2764
- "internalType": "int256",
2765
- "name": "pnlToPoolFactor",
2766
- "type": "int256"
2767
- },
2768
- {
2769
- "internalType": "uint256",
2770
- "name": "maxPnlFactor",
2771
- "type": "uint256"
2772
- }
2773
- ],
2774
- "name": "PnlFactorExceededForShorts",
2775
- "type": "error"
2776
- },
2777
- {
2778
- "inputs": [
2779
- {
2780
- "internalType": "int256",
2781
- "name": "nextPnlToPoolFactor",
2782
- "type": "int256"
2783
- },
2784
- {
2785
- "internalType": "uint256",
2786
- "name": "minPnlFactorForAdl",
2787
- "type": "uint256"
2788
- }
2789
- ],
2790
- "name": "PnlOvercorrected",
2791
- "type": "error"
2792
- },
2793
- {
2794
- "inputs": [
2795
- {
2796
- "internalType": "bytes32",
2797
- "name": "key",
2798
- "type": "bytes32"
2799
- }
2800
- ],
2801
- "name": "PositionNotFound",
2802
- "type": "error"
2803
- },
2804
- {
2805
- "inputs": [
2806
- {
2807
- "internalType": "string",
2808
- "name": "reason",
2809
- "type": "string"
2810
- },
2811
- {
2812
- "internalType": "int256",
2813
- "name": "remainingCollateralUsd",
2814
- "type": "int256"
2815
- },
2816
- {
2817
- "internalType": "int256",
2818
- "name": "minCollateralUsd",
2819
- "type": "int256"
2820
- },
2821
- {
2822
- "internalType": "int256",
2823
- "name": "minCollateralUsdForLeverage",
2824
- "type": "int256"
2825
- }
2826
- ],
2827
- "name": "PositionShouldNotBeLiquidated",
2828
- "type": "error"
2829
- },
2830
- {
2831
- "inputs": [
2832
- {
2833
- "internalType": "address",
2834
- "name": "token",
2835
- "type": "address"
2836
- },
2837
- {
2838
- "internalType": "uint256",
2839
- "name": "minPrice",
2840
- "type": "uint256"
2841
- },
2842
- {
2843
- "internalType": "uint256",
2844
- "name": "maxPrice",
2845
- "type": "uint256"
2846
- }
2847
- ],
2848
- "name": "PriceAlreadySet",
2849
- "type": "error"
2850
- },
2851
- {
2852
- "inputs": [
2853
- {
2854
- "internalType": "address",
2855
- "name": "token",
2856
- "type": "address"
2857
- }
2858
- ],
2859
- "name": "PriceFeedAlreadyExistsForToken",
2860
- "type": "error"
2861
- },
2862
- {
2863
- "inputs": [
2864
- {
2865
- "internalType": "int256",
2866
- "name": "priceImpactUsd",
2867
- "type": "int256"
2868
- },
2869
- {
2870
- "internalType": "uint256",
2871
- "name": "sizeDeltaUsd",
2872
- "type": "uint256"
2873
- }
2874
- ],
2875
- "name": "PriceImpactLargerThanOrderSize",
2876
- "type": "error"
2877
- },
2878
- {
2879
- "inputs": [
2880
- {
2881
- "internalType": "uint256",
2882
- "name": "requestAge",
2883
- "type": "uint256"
2884
- },
2885
- {
2886
- "internalType": "uint256",
2887
- "name": "requestExpirationAge",
2888
- "type": "uint256"
2889
- },
2890
- {
2891
- "internalType": "string",
2892
- "name": "requestType",
2893
- "type": "string"
2894
- }
2895
- ],
2896
- "name": "RequestNotYetCancellable",
2897
- "type": "error"
2898
- },
2899
- {
2900
- "inputs": [
2901
- {
2902
- "internalType": "address",
2903
- "name": "receiver",
2904
- "type": "address"
2905
- }
2906
- ],
2907
- "name": "SelfTransferNotSupported",
2908
- "type": "error"
2909
- },
2910
- {
2911
- "inputs": [],
2912
- "name": "SequencerDown",
2913
- "type": "error"
2914
- },
2915
- {
2916
- "inputs": [
2917
- {
2918
- "internalType": "uint256",
2919
- "name": "timeSinceUp",
2920
- "type": "uint256"
2921
- },
2922
- {
2923
- "internalType": "uint256",
2924
- "name": "sequencerGraceDuration",
2925
- "type": "uint256"
2926
- }
2927
- ],
2928
- "name": "SequencerGraceDurationNotYetPassed",
2929
- "type": "error"
2930
- },
2931
- {
2932
- "inputs": [
2933
- {
2934
- "internalType": "address",
2935
- "name": "market",
2936
- "type": "address"
2937
- }
2938
- ],
2939
- "name": "ShiftFromAndToMarketAreEqual",
2940
- "type": "error"
2941
- },
2942
- {
2943
- "inputs": [
2944
- {
2945
- "internalType": "bytes32",
2946
- "name": "key",
2947
- "type": "bytes32"
2948
- }
2949
- ],
2950
- "name": "ShiftNotFound",
2951
- "type": "error"
2952
- },
2953
- {
2954
- "inputs": [
2955
- {
2956
- "internalType": "address",
2957
- "name": "fromMarketLongToken",
2958
- "type": "address"
2959
- },
2960
- {
2961
- "internalType": "address",
2962
- "name": "toMarketLongToken",
2963
- "type": "address"
2964
- }
2965
- ],
2966
- "name": "ShortTokensAreNotEqual",
2967
- "type": "error"
2968
- },
2969
- {
2970
- "inputs": [
2971
- {
2972
- "internalType": "uint256",
2973
- "name": "signalTime",
2974
- "type": "uint256"
2975
- }
2976
- ],
2977
- "name": "SignalTimeNotYetPassed",
2978
- "type": "error"
2979
- },
2980
- {
2981
- "inputs": [
2982
- {
2983
- "internalType": "address",
2984
- "name": "account",
2985
- "type": "address"
2986
- },
2987
- {
2988
- "internalType": "address",
2989
- "name": "subaccount",
2990
- "type": "address"
2991
- }
2992
- ],
2993
- "name": "SubaccountNotAuthorized",
2994
- "type": "error"
2995
- },
2996
- {
2997
- "inputs": [
2998
- {
2999
- "internalType": "uint256",
3000
- "name": "amountAfterFees",
3001
- "type": "uint256"
3002
- },
3003
- {
3004
- "internalType": "int256",
3005
- "name": "negativeImpactAmount",
3006
- "type": "int256"
3007
- }
3008
- ],
3009
- "name": "SwapPriceImpactExceedsAmountIn",
3010
- "type": "error"
3011
- },
3012
- {
3013
- "inputs": [
3014
- {
3015
- "internalType": "uint256",
3016
- "name": "longTokenSwapPathLength",
3017
- "type": "uint256"
3018
- },
3019
- {
3020
- "internalType": "uint256",
3021
- "name": "shortTokenSwapPathLength",
3022
- "type": "uint256"
3023
- }
3024
- ],
3025
- "name": "SwapsNotAllowedForAtomicWithdrawal",
3026
- "type": "error"
3027
- },
3028
- {
3029
- "inputs": [],
3030
- "name": "ThereMustBeAtLeastOneRoleAdmin",
3031
- "type": "error"
3032
- },
3033
- {
3034
- "inputs": [],
3035
- "name": "ThereMustBeAtLeastOneTimelockMultiSig",
3036
- "type": "error"
3037
- },
3038
- {
3039
- "inputs": [
3040
- {
3041
- "internalType": "address",
3042
- "name": "token",
3043
- "type": "address"
3044
- },
3045
- {
3046
- "internalType": "address",
3047
- "name": "receiver",
3048
- "type": "address"
3049
- },
3050
- {
3051
- "internalType": "uint256",
3052
- "name": "amount",
3053
- "type": "uint256"
3054
- }
3055
- ],
3056
- "name": "TokenTransferError",
3057
- "type": "error"
3058
- },
3059
- {
3060
- "inputs": [],
3061
- "name": "UnableToGetBorrowingFactorEmptyPoolUsd",
3062
- "type": "error"
3063
- },
3064
- {
3065
- "inputs": [
3066
- {
3067
- "internalType": "address",
3068
- "name": "token",
3069
- "type": "address"
3070
- },
3071
- {
3072
- "internalType": "address",
3073
- "name": "market",
3074
- "type": "address"
3075
- }
3076
- ],
3077
- "name": "UnableToGetCachedTokenPrice",
3078
- "type": "error"
3079
- },
3080
- {
3081
- "inputs": [],
3082
- "name": "UnableToGetFundingFactorEmptyOpenInterest",
3083
- "type": "error"
3084
- },
3085
- {
3086
- "inputs": [
3087
- {
3088
- "internalType": "address",
3089
- "name": "inputToken",
3090
- "type": "address"
3091
- },
3092
- {
3093
- "internalType": "address",
3094
- "name": "market",
3095
- "type": "address"
3096
- }
3097
- ],
3098
- "name": "UnableToGetOppositeToken",
3099
- "type": "error"
3100
- },
3101
- {
3102
- "inputs": [
3103
- {
3104
- "internalType": "int256",
3105
- "name": "estimatedRemainingCollateralUsd",
3106
- "type": "int256"
3107
- }
3108
- ],
3109
- "name": "UnableToWithdrawCollateral",
3110
- "type": "error"
3111
- },
3112
- {
3113
- "inputs": [
3114
- {
3115
- "internalType": "address",
3116
- "name": "msgSender",
3117
- "type": "address"
3118
- },
3119
- {
3120
- "internalType": "string",
3121
- "name": "role",
3122
- "type": "string"
3123
- }
3124
- ],
3125
- "name": "Unauthorized",
3126
- "type": "error"
3127
- },
3128
- {
3129
- "inputs": [
3130
- {
3131
- "internalType": "uint256",
3132
- "name": "positionBorrowingFactor",
3133
- "type": "uint256"
3134
- },
3135
- {
3136
- "internalType": "uint256",
3137
- "name": "cumulativeBorrowingFactor",
3138
- "type": "uint256"
3139
- }
3140
- ],
3141
- "name": "UnexpectedBorrowingFactor",
3142
- "type": "error"
3143
- },
3144
- {
3145
- "inputs": [],
3146
- "name": "UnexpectedMarket",
3147
- "type": "error"
3148
- },
3149
- {
3150
- "inputs": [
3151
- {
3152
- "internalType": "int256",
3153
- "name": "poolValue",
3154
- "type": "int256"
3155
- }
3156
- ],
3157
- "name": "UnexpectedPoolValue",
3158
- "type": "error"
3159
- },
3160
- {
3161
- "inputs": [],
3162
- "name": "UnexpectedPositionState",
3163
- "type": "error"
3164
- },
3165
- {
3166
- "inputs": [
3167
- {
3168
- "internalType": "address",
3169
- "name": "token",
3170
- "type": "address"
3171
- },
3172
- {
3173
- "internalType": "address",
3174
- "name": "market",
3175
- "type": "address"
3176
- }
3177
- ],
3178
- "name": "UnexpectedTokenForVirtualInventory",
3179
- "type": "error"
3180
- },
3181
- {
3182
- "inputs": [
3183
- {
3184
- "internalType": "uint256",
3185
- "name": "orderType",
3186
- "type": "uint256"
3187
- }
3188
- ],
3189
- "name": "UnsupportedOrderType",
3190
- "type": "error"
3191
- },
3192
- {
3193
- "inputs": [
3194
- {
3195
- "internalType": "int256",
3196
- "name": "usdDelta",
3197
- "type": "int256"
3198
- },
3199
- {
3200
- "internalType": "uint256",
3201
- "name": "longOpenInterest",
3202
- "type": "uint256"
3203
- }
3204
- ],
3205
- "name": "UsdDeltaExceedsLongOpenInterest",
3206
- "type": "error"
3207
- },
3208
- {
3209
- "inputs": [
3210
- {
3211
- "internalType": "int256",
3212
- "name": "usdDelta",
3213
- "type": "int256"
3214
- },
3215
- {
3216
- "internalType": "uint256",
3217
- "name": "poolUsd",
3218
- "type": "uint256"
3219
- }
3220
- ],
3221
- "name": "UsdDeltaExceedsPoolValue",
3222
- "type": "error"
3223
- },
3224
- {
3225
- "inputs": [
3226
- {
3227
- "internalType": "int256",
3228
- "name": "usdDelta",
3229
- "type": "int256"
3230
- },
3231
- {
3232
- "internalType": "uint256",
3233
- "name": "shortOpenInterest",
3234
- "type": "uint256"
3235
- }
3236
- ],
3237
- "name": "UsdDeltaExceedsShortOpenInterest",
3238
- "type": "error"
3239
- },
3240
- {
3241
- "inputs": [
3242
- {
3243
- "internalType": "bytes32",
3244
- "name": "key",
3245
- "type": "bytes32"
3246
- }
3247
- ],
3248
- "name": "WithdrawalNotFound",
3249
- "type": "error"
3250
- }
3251
- ],
3252
- "linkReferences": {},
3253
- "deployedLinkReferences": {}
3254
- }