@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
@@ -0,0 +1,1121 @@
1
+ {
2
+ "address": "0x2A29D3a792000750807cc401806d6fd539928481",
3
+ "abi": [
4
+ {
5
+ "inputs": [
6
+ {
7
+ "internalType": "contract RoleStore",
8
+ "name": "roleStore_",
9
+ "type": "address"
10
+ },
11
+ {
12
+ "internalType": "string",
13
+ "name": "name_",
14
+ "type": "string"
15
+ },
16
+ {
17
+ "internalType": "string",
18
+ "name": "symbol_",
19
+ "type": "string"
20
+ },
21
+ {
22
+ "internalType": "uint8",
23
+ "name": "decimals_",
24
+ "type": "uint8"
25
+ }
26
+ ],
27
+ "stateMutability": "nonpayable",
28
+ "type": "constructor"
29
+ },
30
+ {
31
+ "inputs": [],
32
+ "name": "InvalidShortString",
33
+ "type": "error"
34
+ },
35
+ {
36
+ "inputs": [
37
+ {
38
+ "internalType": "string",
39
+ "name": "str",
40
+ "type": "string"
41
+ }
42
+ ],
43
+ "name": "StringTooLong",
44
+ "type": "error"
45
+ },
46
+ {
47
+ "inputs": [
48
+ {
49
+ "internalType": "address",
50
+ "name": "msgSender",
51
+ "type": "address"
52
+ },
53
+ {
54
+ "internalType": "string",
55
+ "name": "role",
56
+ "type": "string"
57
+ }
58
+ ],
59
+ "name": "Unauthorized",
60
+ "type": "error"
61
+ },
62
+ {
63
+ "anonymous": false,
64
+ "inputs": [
65
+ {
66
+ "indexed": true,
67
+ "internalType": "address",
68
+ "name": "owner",
69
+ "type": "address"
70
+ },
71
+ {
72
+ "indexed": true,
73
+ "internalType": "address",
74
+ "name": "spender",
75
+ "type": "address"
76
+ },
77
+ {
78
+ "indexed": false,
79
+ "internalType": "uint256",
80
+ "name": "value",
81
+ "type": "uint256"
82
+ }
83
+ ],
84
+ "name": "Approval",
85
+ "type": "event"
86
+ },
87
+ {
88
+ "anonymous": false,
89
+ "inputs": [
90
+ {
91
+ "indexed": true,
92
+ "internalType": "address",
93
+ "name": "delegator",
94
+ "type": "address"
95
+ },
96
+ {
97
+ "indexed": true,
98
+ "internalType": "address",
99
+ "name": "fromDelegate",
100
+ "type": "address"
101
+ },
102
+ {
103
+ "indexed": true,
104
+ "internalType": "address",
105
+ "name": "toDelegate",
106
+ "type": "address"
107
+ }
108
+ ],
109
+ "name": "DelegateChanged",
110
+ "type": "event"
111
+ },
112
+ {
113
+ "anonymous": false,
114
+ "inputs": [
115
+ {
116
+ "indexed": true,
117
+ "internalType": "address",
118
+ "name": "delegate",
119
+ "type": "address"
120
+ },
121
+ {
122
+ "indexed": false,
123
+ "internalType": "uint256",
124
+ "name": "previousBalance",
125
+ "type": "uint256"
126
+ },
127
+ {
128
+ "indexed": false,
129
+ "internalType": "uint256",
130
+ "name": "newBalance",
131
+ "type": "uint256"
132
+ }
133
+ ],
134
+ "name": "DelegateVotesChanged",
135
+ "type": "event"
136
+ },
137
+ {
138
+ "anonymous": false,
139
+ "inputs": [],
140
+ "name": "EIP712DomainChanged",
141
+ "type": "event"
142
+ },
143
+ {
144
+ "anonymous": false,
145
+ "inputs": [
146
+ {
147
+ "indexed": true,
148
+ "internalType": "address",
149
+ "name": "from",
150
+ "type": "address"
151
+ },
152
+ {
153
+ "indexed": true,
154
+ "internalType": "address",
155
+ "name": "to",
156
+ "type": "address"
157
+ },
158
+ {
159
+ "indexed": false,
160
+ "internalType": "uint256",
161
+ "name": "value",
162
+ "type": "uint256"
163
+ }
164
+ ],
165
+ "name": "Transfer",
166
+ "type": "event"
167
+ },
168
+ {
169
+ "inputs": [],
170
+ "name": "CLOCK_MODE",
171
+ "outputs": [
172
+ {
173
+ "internalType": "string",
174
+ "name": "",
175
+ "type": "string"
176
+ }
177
+ ],
178
+ "stateMutability": "view",
179
+ "type": "function"
180
+ },
181
+ {
182
+ "inputs": [],
183
+ "name": "DOMAIN_SEPARATOR",
184
+ "outputs": [
185
+ {
186
+ "internalType": "bytes32",
187
+ "name": "",
188
+ "type": "bytes32"
189
+ }
190
+ ],
191
+ "stateMutability": "view",
192
+ "type": "function"
193
+ },
194
+ {
195
+ "inputs": [
196
+ {
197
+ "internalType": "address",
198
+ "name": "owner",
199
+ "type": "address"
200
+ },
201
+ {
202
+ "internalType": "address",
203
+ "name": "spender",
204
+ "type": "address"
205
+ }
206
+ ],
207
+ "name": "allowance",
208
+ "outputs": [
209
+ {
210
+ "internalType": "uint256",
211
+ "name": "",
212
+ "type": "uint256"
213
+ }
214
+ ],
215
+ "stateMutability": "view",
216
+ "type": "function"
217
+ },
218
+ {
219
+ "inputs": [
220
+ {
221
+ "internalType": "address",
222
+ "name": "spender",
223
+ "type": "address"
224
+ },
225
+ {
226
+ "internalType": "uint256",
227
+ "name": "amount",
228
+ "type": "uint256"
229
+ }
230
+ ],
231
+ "name": "approve",
232
+ "outputs": [
233
+ {
234
+ "internalType": "bool",
235
+ "name": "",
236
+ "type": "bool"
237
+ }
238
+ ],
239
+ "stateMutability": "nonpayable",
240
+ "type": "function"
241
+ },
242
+ {
243
+ "inputs": [
244
+ {
245
+ "internalType": "address",
246
+ "name": "account",
247
+ "type": "address"
248
+ }
249
+ ],
250
+ "name": "balanceOf",
251
+ "outputs": [
252
+ {
253
+ "internalType": "uint256",
254
+ "name": "",
255
+ "type": "uint256"
256
+ }
257
+ ],
258
+ "stateMutability": "view",
259
+ "type": "function"
260
+ },
261
+ {
262
+ "inputs": [
263
+ {
264
+ "internalType": "address",
265
+ "name": "account",
266
+ "type": "address"
267
+ },
268
+ {
269
+ "internalType": "uint256",
270
+ "name": "amount",
271
+ "type": "uint256"
272
+ }
273
+ ],
274
+ "name": "burn",
275
+ "outputs": [],
276
+ "stateMutability": "nonpayable",
277
+ "type": "function"
278
+ },
279
+ {
280
+ "inputs": [
281
+ {
282
+ "internalType": "address",
283
+ "name": "account",
284
+ "type": "address"
285
+ },
286
+ {
287
+ "internalType": "uint32",
288
+ "name": "pos",
289
+ "type": "uint32"
290
+ }
291
+ ],
292
+ "name": "checkpoints",
293
+ "outputs": [
294
+ {
295
+ "components": [
296
+ {
297
+ "internalType": "uint32",
298
+ "name": "fromBlock",
299
+ "type": "uint32"
300
+ },
301
+ {
302
+ "internalType": "uint224",
303
+ "name": "votes",
304
+ "type": "uint224"
305
+ }
306
+ ],
307
+ "internalType": "struct ERC20Votes.Checkpoint",
308
+ "name": "",
309
+ "type": "tuple"
310
+ }
311
+ ],
312
+ "stateMutability": "view",
313
+ "type": "function"
314
+ },
315
+ {
316
+ "inputs": [],
317
+ "name": "clock",
318
+ "outputs": [
319
+ {
320
+ "internalType": "uint48",
321
+ "name": "",
322
+ "type": "uint48"
323
+ }
324
+ ],
325
+ "stateMutability": "view",
326
+ "type": "function"
327
+ },
328
+ {
329
+ "inputs": [],
330
+ "name": "decimals",
331
+ "outputs": [
332
+ {
333
+ "internalType": "uint8",
334
+ "name": "",
335
+ "type": "uint8"
336
+ }
337
+ ],
338
+ "stateMutability": "view",
339
+ "type": "function"
340
+ },
341
+ {
342
+ "inputs": [
343
+ {
344
+ "internalType": "address",
345
+ "name": "spender",
346
+ "type": "address"
347
+ },
348
+ {
349
+ "internalType": "uint256",
350
+ "name": "subtractedValue",
351
+ "type": "uint256"
352
+ }
353
+ ],
354
+ "name": "decreaseAllowance",
355
+ "outputs": [
356
+ {
357
+ "internalType": "bool",
358
+ "name": "",
359
+ "type": "bool"
360
+ }
361
+ ],
362
+ "stateMutability": "nonpayable",
363
+ "type": "function"
364
+ },
365
+ {
366
+ "inputs": [
367
+ {
368
+ "internalType": "address",
369
+ "name": "delegatee",
370
+ "type": "address"
371
+ }
372
+ ],
373
+ "name": "delegate",
374
+ "outputs": [],
375
+ "stateMutability": "nonpayable",
376
+ "type": "function"
377
+ },
378
+ {
379
+ "inputs": [
380
+ {
381
+ "internalType": "address",
382
+ "name": "delegatee",
383
+ "type": "address"
384
+ },
385
+ {
386
+ "internalType": "uint256",
387
+ "name": "nonce",
388
+ "type": "uint256"
389
+ },
390
+ {
391
+ "internalType": "uint256",
392
+ "name": "expiry",
393
+ "type": "uint256"
394
+ },
395
+ {
396
+ "internalType": "uint8",
397
+ "name": "v",
398
+ "type": "uint8"
399
+ },
400
+ {
401
+ "internalType": "bytes32",
402
+ "name": "r",
403
+ "type": "bytes32"
404
+ },
405
+ {
406
+ "internalType": "bytes32",
407
+ "name": "s",
408
+ "type": "bytes32"
409
+ }
410
+ ],
411
+ "name": "delegateBySig",
412
+ "outputs": [],
413
+ "stateMutability": "nonpayable",
414
+ "type": "function"
415
+ },
416
+ {
417
+ "inputs": [
418
+ {
419
+ "internalType": "address",
420
+ "name": "account",
421
+ "type": "address"
422
+ }
423
+ ],
424
+ "name": "delegates",
425
+ "outputs": [
426
+ {
427
+ "internalType": "address",
428
+ "name": "",
429
+ "type": "address"
430
+ }
431
+ ],
432
+ "stateMutability": "view",
433
+ "type": "function"
434
+ },
435
+ {
436
+ "inputs": [],
437
+ "name": "eip712Domain",
438
+ "outputs": [
439
+ {
440
+ "internalType": "bytes1",
441
+ "name": "fields",
442
+ "type": "bytes1"
443
+ },
444
+ {
445
+ "internalType": "string",
446
+ "name": "name",
447
+ "type": "string"
448
+ },
449
+ {
450
+ "internalType": "string",
451
+ "name": "version",
452
+ "type": "string"
453
+ },
454
+ {
455
+ "internalType": "uint256",
456
+ "name": "chainId",
457
+ "type": "uint256"
458
+ },
459
+ {
460
+ "internalType": "address",
461
+ "name": "verifyingContract",
462
+ "type": "address"
463
+ },
464
+ {
465
+ "internalType": "bytes32",
466
+ "name": "salt",
467
+ "type": "bytes32"
468
+ },
469
+ {
470
+ "internalType": "uint256[]",
471
+ "name": "extensions",
472
+ "type": "uint256[]"
473
+ }
474
+ ],
475
+ "stateMutability": "view",
476
+ "type": "function"
477
+ },
478
+ {
479
+ "inputs": [
480
+ {
481
+ "internalType": "uint256",
482
+ "name": "timepoint",
483
+ "type": "uint256"
484
+ }
485
+ ],
486
+ "name": "getPastTotalSupply",
487
+ "outputs": [
488
+ {
489
+ "internalType": "uint256",
490
+ "name": "",
491
+ "type": "uint256"
492
+ }
493
+ ],
494
+ "stateMutability": "view",
495
+ "type": "function"
496
+ },
497
+ {
498
+ "inputs": [
499
+ {
500
+ "internalType": "address",
501
+ "name": "account",
502
+ "type": "address"
503
+ },
504
+ {
505
+ "internalType": "uint256",
506
+ "name": "timepoint",
507
+ "type": "uint256"
508
+ }
509
+ ],
510
+ "name": "getPastVotes",
511
+ "outputs": [
512
+ {
513
+ "internalType": "uint256",
514
+ "name": "",
515
+ "type": "uint256"
516
+ }
517
+ ],
518
+ "stateMutability": "view",
519
+ "type": "function"
520
+ },
521
+ {
522
+ "inputs": [
523
+ {
524
+ "internalType": "address",
525
+ "name": "account",
526
+ "type": "address"
527
+ }
528
+ ],
529
+ "name": "getVotes",
530
+ "outputs": [
531
+ {
532
+ "internalType": "uint256",
533
+ "name": "",
534
+ "type": "uint256"
535
+ }
536
+ ],
537
+ "stateMutability": "view",
538
+ "type": "function"
539
+ },
540
+ {
541
+ "inputs": [
542
+ {
543
+ "internalType": "address",
544
+ "name": "spender",
545
+ "type": "address"
546
+ },
547
+ {
548
+ "internalType": "uint256",
549
+ "name": "addedValue",
550
+ "type": "uint256"
551
+ }
552
+ ],
553
+ "name": "increaseAllowance",
554
+ "outputs": [
555
+ {
556
+ "internalType": "bool",
557
+ "name": "",
558
+ "type": "bool"
559
+ }
560
+ ],
561
+ "stateMutability": "nonpayable",
562
+ "type": "function"
563
+ },
564
+ {
565
+ "inputs": [
566
+ {
567
+ "internalType": "address",
568
+ "name": "account",
569
+ "type": "address"
570
+ },
571
+ {
572
+ "internalType": "uint256",
573
+ "name": "amount",
574
+ "type": "uint256"
575
+ }
576
+ ],
577
+ "name": "mint",
578
+ "outputs": [],
579
+ "stateMutability": "nonpayable",
580
+ "type": "function"
581
+ },
582
+ {
583
+ "inputs": [],
584
+ "name": "name",
585
+ "outputs": [
586
+ {
587
+ "internalType": "string",
588
+ "name": "",
589
+ "type": "string"
590
+ }
591
+ ],
592
+ "stateMutability": "view",
593
+ "type": "function"
594
+ },
595
+ {
596
+ "inputs": [
597
+ {
598
+ "internalType": "address",
599
+ "name": "owner",
600
+ "type": "address"
601
+ }
602
+ ],
603
+ "name": "nonces",
604
+ "outputs": [
605
+ {
606
+ "internalType": "uint256",
607
+ "name": "",
608
+ "type": "uint256"
609
+ }
610
+ ],
611
+ "stateMutability": "view",
612
+ "type": "function"
613
+ },
614
+ {
615
+ "inputs": [
616
+ {
617
+ "internalType": "address",
618
+ "name": "account",
619
+ "type": "address"
620
+ }
621
+ ],
622
+ "name": "numCheckpoints",
623
+ "outputs": [
624
+ {
625
+ "internalType": "uint32",
626
+ "name": "",
627
+ "type": "uint32"
628
+ }
629
+ ],
630
+ "stateMutability": "view",
631
+ "type": "function"
632
+ },
633
+ {
634
+ "inputs": [
635
+ {
636
+ "internalType": "address",
637
+ "name": "owner",
638
+ "type": "address"
639
+ },
640
+ {
641
+ "internalType": "address",
642
+ "name": "spender",
643
+ "type": "address"
644
+ },
645
+ {
646
+ "internalType": "uint256",
647
+ "name": "value",
648
+ "type": "uint256"
649
+ },
650
+ {
651
+ "internalType": "uint256",
652
+ "name": "deadline",
653
+ "type": "uint256"
654
+ },
655
+ {
656
+ "internalType": "uint8",
657
+ "name": "v",
658
+ "type": "uint8"
659
+ },
660
+ {
661
+ "internalType": "bytes32",
662
+ "name": "r",
663
+ "type": "bytes32"
664
+ },
665
+ {
666
+ "internalType": "bytes32",
667
+ "name": "s",
668
+ "type": "bytes32"
669
+ }
670
+ ],
671
+ "name": "permit",
672
+ "outputs": [],
673
+ "stateMutability": "nonpayable",
674
+ "type": "function"
675
+ },
676
+ {
677
+ "inputs": [],
678
+ "name": "roleStore",
679
+ "outputs": [
680
+ {
681
+ "internalType": "contract RoleStore",
682
+ "name": "",
683
+ "type": "address"
684
+ }
685
+ ],
686
+ "stateMutability": "view",
687
+ "type": "function"
688
+ },
689
+ {
690
+ "inputs": [],
691
+ "name": "symbol",
692
+ "outputs": [
693
+ {
694
+ "internalType": "string",
695
+ "name": "",
696
+ "type": "string"
697
+ }
698
+ ],
699
+ "stateMutability": "view",
700
+ "type": "function"
701
+ },
702
+ {
703
+ "inputs": [],
704
+ "name": "totalSupply",
705
+ "outputs": [
706
+ {
707
+ "internalType": "uint256",
708
+ "name": "",
709
+ "type": "uint256"
710
+ }
711
+ ],
712
+ "stateMutability": "view",
713
+ "type": "function"
714
+ },
715
+ {
716
+ "inputs": [
717
+ {
718
+ "internalType": "address",
719
+ "name": "to",
720
+ "type": "address"
721
+ },
722
+ {
723
+ "internalType": "uint256",
724
+ "name": "amount",
725
+ "type": "uint256"
726
+ }
727
+ ],
728
+ "name": "transfer",
729
+ "outputs": [
730
+ {
731
+ "internalType": "bool",
732
+ "name": "",
733
+ "type": "bool"
734
+ }
735
+ ],
736
+ "stateMutability": "nonpayable",
737
+ "type": "function"
738
+ },
739
+ {
740
+ "inputs": [
741
+ {
742
+ "internalType": "address",
743
+ "name": "from",
744
+ "type": "address"
745
+ },
746
+ {
747
+ "internalType": "address",
748
+ "name": "to",
749
+ "type": "address"
750
+ },
751
+ {
752
+ "internalType": "uint256",
753
+ "name": "amount",
754
+ "type": "uint256"
755
+ }
756
+ ],
757
+ "name": "transferFrom",
758
+ "outputs": [
759
+ {
760
+ "internalType": "bool",
761
+ "name": "",
762
+ "type": "bool"
763
+ }
764
+ ],
765
+ "stateMutability": "nonpayable",
766
+ "type": "function"
767
+ }
768
+ ],
769
+ "transactionHash": "0xf41d2b874807c8dea4d0b21d1215669c990495bda5cdfa8ef7bb822e6edf3043",
770
+ "receipt": {
771
+ "to": null,
772
+ "from": "0xE7BfFf2aB721264887230037940490351700a068",
773
+ "contractAddress": "0x2A29D3a792000750807cc401806d6fd539928481",
774
+ "transactionIndex": 1,
775
+ "gasUsed": "15199775",
776
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
777
+ "blockHash": "0xc6e67e18e1c484c3ddd3cd5db795adc007a2633bf83bfc7d1c28ee352d90f9f6",
778
+ "transactionHash": "0xf41d2b874807c8dea4d0b21d1215669c990495bda5cdfa8ef7bb822e6edf3043",
779
+ "logs": [],
780
+ "blockNumber": 168596066,
781
+ "cumulativeGasUsed": "15199775",
782
+ "status": 1,
783
+ "byzantium": true
784
+ },
785
+ "args": [
786
+ "0x3c3d99FD298f679DBC2CEcd132b4eC4d0F5e6e72",
787
+ "GMX DAO",
788
+ "GMX_DAO",
789
+ 18
790
+ ],
791
+ "numDeployments": 1,
792
+ "solcInputHash": "ddb2cd26020caa6335eda5082c5c80ae",
793
+ "libraries": {},
794
+ "devdoc": {
795
+ "events": {
796
+ "Approval(address,address,uint256)": {
797
+ "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance."
798
+ },
799
+ "DelegateChanged(address,address,address)": {
800
+ "details": "Emitted when an account changes their delegate."
801
+ },
802
+ "DelegateVotesChanged(address,uint256,uint256)": {
803
+ "details": "Emitted when a token transfer or delegate change results in changes to a delegate's number of votes."
804
+ },
805
+ "EIP712DomainChanged()": {
806
+ "details": "MAY be emitted to signal that the domain could have changed."
807
+ },
808
+ "Transfer(address,address,uint256)": {
809
+ "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero."
810
+ }
811
+ },
812
+ "kind": "dev",
813
+ "methods": {
814
+ "CLOCK_MODE()": {
815
+ "details": "Description of the clock"
816
+ },
817
+ "DOMAIN_SEPARATOR()": {
818
+ "details": "See {IERC20Permit-DOMAIN_SEPARATOR}."
819
+ },
820
+ "allowance(address,address)": {
821
+ "details": "See {IERC20-allowance}."
822
+ },
823
+ "approve(address,uint256)": {
824
+ "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address."
825
+ },
826
+ "balanceOf(address)": {
827
+ "details": "See {IERC20-balanceOf}."
828
+ },
829
+ "checkpoints(address,uint32)": {
830
+ "details": "Get the `pos`-th checkpoint for `account`."
831
+ },
832
+ "clock()": {
833
+ "details": "Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting)."
834
+ },
835
+ "decimals()": {
836
+ "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}."
837
+ },
838
+ "decreaseAllowance(address,uint256)": {
839
+ "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`."
840
+ },
841
+ "delegate(address)": {
842
+ "details": "Delegate votes from the sender to `delegatee`."
843
+ },
844
+ "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": {
845
+ "details": "Delegates votes from signer to `delegatee`"
846
+ },
847
+ "delegates(address)": {
848
+ "details": "Get the address `account` is currently delegating to."
849
+ },
850
+ "eip712Domain()": {
851
+ "details": "See {EIP-5267}. _Available since v4.9._"
852
+ },
853
+ "getPastTotalSupply(uint256)": {
854
+ "details": "Retrieve the `totalSupply` at the end of `timepoint`. Note, this value is the sum of all balances. It is NOT the sum of all the delegated votes! Requirements: - `timepoint` must be in the past"
855
+ },
856
+ "getPastVotes(address,uint256)": {
857
+ "details": "Retrieve the number of votes for `account` at the end of `timepoint`. Requirements: - `timepoint` must be in the past"
858
+ },
859
+ "getVotes(address)": {
860
+ "details": "Gets the current votes balance for `account`"
861
+ },
862
+ "increaseAllowance(address,uint256)": {
863
+ "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address."
864
+ },
865
+ "name()": {
866
+ "details": "Returns the name of the token."
867
+ },
868
+ "nonces(address)": {
869
+ "details": "See {IERC20Permit-nonces}."
870
+ },
871
+ "numCheckpoints(address)": {
872
+ "details": "Get number of checkpoints for `account`."
873
+ },
874
+ "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": {
875
+ "details": "See {IERC20Permit-permit}."
876
+ },
877
+ "symbol()": {
878
+ "details": "Returns the symbol of the token, usually a shorter version of the name."
879
+ },
880
+ "totalSupply()": {
881
+ "details": "See {IERC20-totalSupply}."
882
+ },
883
+ "transfer(address,uint256)": {
884
+ "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`."
885
+ },
886
+ "transferFrom(address,address,uint256)": {
887
+ "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`."
888
+ }
889
+ },
890
+ "version": 1
891
+ },
892
+ "userdoc": {
893
+ "kind": "user",
894
+ "methods": {},
895
+ "version": 1
896
+ },
897
+ "storageLayout": {
898
+ "storage": [
899
+ {
900
+ "astId": 207,
901
+ "contract": "contracts/gov/GovToken.sol:GovToken",
902
+ "label": "_balances",
903
+ "offset": 0,
904
+ "slot": "0",
905
+ "type": "t_mapping(t_address,t_uint256)"
906
+ },
907
+ {
908
+ "astId": 213,
909
+ "contract": "contracts/gov/GovToken.sol:GovToken",
910
+ "label": "_allowances",
911
+ "offset": 0,
912
+ "slot": "1",
913
+ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))"
914
+ },
915
+ {
916
+ "astId": 215,
917
+ "contract": "contracts/gov/GovToken.sol:GovToken",
918
+ "label": "_totalSupply",
919
+ "offset": 0,
920
+ "slot": "2",
921
+ "type": "t_uint256"
922
+ },
923
+ {
924
+ "astId": 217,
925
+ "contract": "contracts/gov/GovToken.sol:GovToken",
926
+ "label": "_name",
927
+ "offset": 0,
928
+ "slot": "3",
929
+ "type": "t_string_storage"
930
+ },
931
+ {
932
+ "astId": 219,
933
+ "contract": "contracts/gov/GovToken.sol:GovToken",
934
+ "label": "_symbol",
935
+ "offset": 0,
936
+ "slot": "4",
937
+ "type": "t_string_storage"
938
+ },
939
+ {
940
+ "astId": 3579,
941
+ "contract": "contracts/gov/GovToken.sol:GovToken",
942
+ "label": "_nameFallback",
943
+ "offset": 0,
944
+ "slot": "5",
945
+ "type": "t_string_storage"
946
+ },
947
+ {
948
+ "astId": 3581,
949
+ "contract": "contracts/gov/GovToken.sol:GovToken",
950
+ "label": "_versionFallback",
951
+ "offset": 0,
952
+ "slot": "6",
953
+ "type": "t_string_storage"
954
+ },
955
+ {
956
+ "astId": 879,
957
+ "contract": "contracts/gov/GovToken.sol:GovToken",
958
+ "label": "_nonces",
959
+ "offset": 0,
960
+ "slot": "7",
961
+ "type": "t_mapping(t_address,t_struct(Counter)2557_storage)"
962
+ },
963
+ {
964
+ "astId": 887,
965
+ "contract": "contracts/gov/GovToken.sol:GovToken",
966
+ "label": "_PERMIT_TYPEHASH_DEPRECATED_SLOT",
967
+ "offset": 0,
968
+ "slot": "8",
969
+ "type": "t_bytes32"
970
+ },
971
+ {
972
+ "astId": 1054,
973
+ "contract": "contracts/gov/GovToken.sol:GovToken",
974
+ "label": "_delegates",
975
+ "offset": 0,
976
+ "slot": "9",
977
+ "type": "t_mapping(t_address,t_address)"
978
+ },
979
+ {
980
+ "astId": 1060,
981
+ "contract": "contracts/gov/GovToken.sol:GovToken",
982
+ "label": "_checkpoints",
983
+ "offset": 0,
984
+ "slot": "10",
985
+ "type": "t_mapping(t_address,t_array(t_struct(Checkpoint)1045_storage)dyn_storage)"
986
+ },
987
+ {
988
+ "astId": 1064,
989
+ "contract": "contracts/gov/GovToken.sol:GovToken",
990
+ "label": "_totalSupplyCheckpoints",
991
+ "offset": 0,
992
+ "slot": "11",
993
+ "type": "t_array(t_struct(Checkpoint)1045_storage)dyn_storage"
994
+ },
995
+ {
996
+ "astId": 27701,
997
+ "contract": "contracts/gov/GovToken.sol:GovToken",
998
+ "label": "_decimals",
999
+ "offset": 0,
1000
+ "slot": "12",
1001
+ "type": "t_uint8"
1002
+ }
1003
+ ],
1004
+ "types": {
1005
+ "t_address": {
1006
+ "encoding": "inplace",
1007
+ "label": "address",
1008
+ "numberOfBytes": "20"
1009
+ },
1010
+ "t_array(t_struct(Checkpoint)1045_storage)dyn_storage": {
1011
+ "base": "t_struct(Checkpoint)1045_storage",
1012
+ "encoding": "dynamic_array",
1013
+ "label": "struct ERC20Votes.Checkpoint[]",
1014
+ "numberOfBytes": "32"
1015
+ },
1016
+ "t_bytes32": {
1017
+ "encoding": "inplace",
1018
+ "label": "bytes32",
1019
+ "numberOfBytes": "32"
1020
+ },
1021
+ "t_mapping(t_address,t_address)": {
1022
+ "encoding": "mapping",
1023
+ "key": "t_address",
1024
+ "label": "mapping(address => address)",
1025
+ "numberOfBytes": "32",
1026
+ "value": "t_address"
1027
+ },
1028
+ "t_mapping(t_address,t_array(t_struct(Checkpoint)1045_storage)dyn_storage)": {
1029
+ "encoding": "mapping",
1030
+ "key": "t_address",
1031
+ "label": "mapping(address => struct ERC20Votes.Checkpoint[])",
1032
+ "numberOfBytes": "32",
1033
+ "value": "t_array(t_struct(Checkpoint)1045_storage)dyn_storage"
1034
+ },
1035
+ "t_mapping(t_address,t_mapping(t_address,t_uint256))": {
1036
+ "encoding": "mapping",
1037
+ "key": "t_address",
1038
+ "label": "mapping(address => mapping(address => uint256))",
1039
+ "numberOfBytes": "32",
1040
+ "value": "t_mapping(t_address,t_uint256)"
1041
+ },
1042
+ "t_mapping(t_address,t_struct(Counter)2557_storage)": {
1043
+ "encoding": "mapping",
1044
+ "key": "t_address",
1045
+ "label": "mapping(address => struct Counters.Counter)",
1046
+ "numberOfBytes": "32",
1047
+ "value": "t_struct(Counter)2557_storage"
1048
+ },
1049
+ "t_mapping(t_address,t_uint256)": {
1050
+ "encoding": "mapping",
1051
+ "key": "t_address",
1052
+ "label": "mapping(address => uint256)",
1053
+ "numberOfBytes": "32",
1054
+ "value": "t_uint256"
1055
+ },
1056
+ "t_string_storage": {
1057
+ "encoding": "bytes",
1058
+ "label": "string",
1059
+ "numberOfBytes": "32"
1060
+ },
1061
+ "t_struct(Checkpoint)1045_storage": {
1062
+ "encoding": "inplace",
1063
+ "label": "struct ERC20Votes.Checkpoint",
1064
+ "members": [
1065
+ {
1066
+ "astId": 1042,
1067
+ "contract": "contracts/gov/GovToken.sol:GovToken",
1068
+ "label": "fromBlock",
1069
+ "offset": 0,
1070
+ "slot": "0",
1071
+ "type": "t_uint32"
1072
+ },
1073
+ {
1074
+ "astId": 1044,
1075
+ "contract": "contracts/gov/GovToken.sol:GovToken",
1076
+ "label": "votes",
1077
+ "offset": 4,
1078
+ "slot": "0",
1079
+ "type": "t_uint224"
1080
+ }
1081
+ ],
1082
+ "numberOfBytes": "32"
1083
+ },
1084
+ "t_struct(Counter)2557_storage": {
1085
+ "encoding": "inplace",
1086
+ "label": "struct Counters.Counter",
1087
+ "members": [
1088
+ {
1089
+ "astId": 2556,
1090
+ "contract": "contracts/gov/GovToken.sol:GovToken",
1091
+ "label": "_value",
1092
+ "offset": 0,
1093
+ "slot": "0",
1094
+ "type": "t_uint256"
1095
+ }
1096
+ ],
1097
+ "numberOfBytes": "32"
1098
+ },
1099
+ "t_uint224": {
1100
+ "encoding": "inplace",
1101
+ "label": "uint224",
1102
+ "numberOfBytes": "28"
1103
+ },
1104
+ "t_uint256": {
1105
+ "encoding": "inplace",
1106
+ "label": "uint256",
1107
+ "numberOfBytes": "32"
1108
+ },
1109
+ "t_uint32": {
1110
+ "encoding": "inplace",
1111
+ "label": "uint32",
1112
+ "numberOfBytes": "4"
1113
+ },
1114
+ "t_uint8": {
1115
+ "encoding": "inplace",
1116
+ "label": "uint8",
1117
+ "numberOfBytes": "1"
1118
+ }
1119
+ }
1120
+ }
1121
+ }