@gmx-io/sdk 0.0.1-alpha-1

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 (237) hide show
  1. package/LICENSE +40 -0
  2. package/README.md +79 -0
  3. package/build/abis/CustomErrors.json +3254 -0
  4. package/build/abis/DataStore.json +1440 -0
  5. package/build/abis/ERC721.json +442 -0
  6. package/build/abis/EventEmitter.json +2065 -0
  7. package/build/abis/ExchangeRouter.json +1598 -0
  8. package/build/abis/GMT.json +522 -0
  9. package/build/abis/GlpManager.json +592 -0
  10. package/build/abis/GlvReader.json +1425 -0
  11. package/build/abis/GlvRouter.json +613 -0
  12. package/build/abis/GmxMigrator.json +657 -0
  13. package/build/abis/GovToken.json +1121 -0
  14. package/build/abis/MintableBaseToken.json +696 -0
  15. package/build/abis/Multicall.json +333 -0
  16. package/build/abis/OrderBook.json +1997 -0
  17. package/build/abis/OrderBookReader.json +111 -0
  18. package/build/abis/OrderExecutor.json +122 -0
  19. package/build/abis/PositionManager.json +1165 -0
  20. package/build/abis/PositionRouter.json +2030 -0
  21. package/build/abis/Reader.json +355 -0
  22. package/build/abis/ReaderV2.json +630 -0
  23. package/build/abis/ReferralStorage.json +507 -0
  24. package/build/abis/RewardReader.json +86 -0
  25. package/build/abis/RewardRouter.json +769 -0
  26. package/build/abis/RewardTracker.json +918 -0
  27. package/build/abis/Router-v2.json +605 -0
  28. package/build/abis/Router.json +605 -0
  29. package/build/abis/SubaccountRouter.json +648 -0
  30. package/build/abis/SyntheticsReader.json +4577 -0
  31. package/build/abis/SyntheticsRouter.json +77 -0
  32. package/build/abis/Timelock.json +1737 -0
  33. package/build/abis/Token.json +345 -0
  34. package/build/abis/Treasury.json +411 -0
  35. package/build/abis/UniPool.json +89 -0
  36. package/build/abis/UniswapV2.json +1 -0
  37. package/build/abis/Vault.json +3220 -0
  38. package/build/abis/VaultReader.json +87 -0
  39. package/build/abis/VaultV2.json +3019 -0
  40. package/build/abis/VaultV2b.json +3220 -0
  41. package/build/abis/Vester.json +1031 -0
  42. package/build/abis/WETH.json +320 -0
  43. package/build/abis/YieldFarm.json +599 -0
  44. package/build/abis/YieldToken.json +560 -0
  45. package/build/prebuilt/hashedMarketConfigKeys.json +3658 -0
  46. package/build/prebuilt/hashedMarketValuesKeys.json +1103 -0
  47. package/build/prebuilt/index.ts +28 -0
  48. package/build/src/abis/CustomErrors.json +3254 -0
  49. package/build/src/abis/DataStore.json +1440 -0
  50. package/build/src/abis/ERC721.json +442 -0
  51. package/build/src/abis/EventEmitter.json +2065 -0
  52. package/build/src/abis/ExchangeRouter.json +1598 -0
  53. package/build/src/abis/GMT.json +522 -0
  54. package/build/src/abis/GlpManager.json +591 -0
  55. package/build/src/abis/GlvReader.json +1424 -0
  56. package/build/src/abis/GlvRouter.json +612 -0
  57. package/build/src/abis/GmxMigrator.json +657 -0
  58. package/build/src/abis/GovToken.json +1121 -0
  59. package/build/src/abis/MintableBaseToken.json +696 -0
  60. package/build/src/abis/Multicall.json +333 -0
  61. package/build/src/abis/OrderBook.json +1997 -0
  62. package/build/src/abis/OrderBookReader.json +111 -0
  63. package/build/src/abis/OrderExecutor.json +122 -0
  64. package/build/src/abis/PositionManager.json +1165 -0
  65. package/build/src/abis/PositionRouter.json +2030 -0
  66. package/build/src/abis/Reader.json +355 -0
  67. package/build/src/abis/ReaderV2.json +630 -0
  68. package/build/src/abis/ReferralStorage.json +507 -0
  69. package/build/src/abis/RewardReader.json +86 -0
  70. package/build/src/abis/RewardRouter.json +769 -0
  71. package/build/src/abis/RewardTracker.json +918 -0
  72. package/build/src/abis/Router-v2.json +605 -0
  73. package/build/src/abis/Router.json +605 -0
  74. package/build/src/abis/SubaccountRouter.json +648 -0
  75. package/build/src/abis/SyntheticsReader.json +4577 -0
  76. package/build/src/abis/SyntheticsRouter.json +77 -0
  77. package/build/src/abis/Timelock.json +1737 -0
  78. package/build/src/abis/Token.json +345 -0
  79. package/build/src/abis/Treasury.json +411 -0
  80. package/build/src/abis/UniPool.json +89 -0
  81. package/build/src/abis/UniswapV2.json +1 -0
  82. package/build/src/abis/Vault.json +3220 -0
  83. package/build/src/abis/VaultReader.json +87 -0
  84. package/build/src/abis/VaultV2.json +3019 -0
  85. package/build/src/abis/VaultV2b.json +3220 -0
  86. package/build/src/abis/Vester.json +1031 -0
  87. package/build/src/abis/WETH.json +320 -0
  88. package/build/src/abis/YieldFarm.json +599 -0
  89. package/build/src/abis/YieldToken.json +560 -0
  90. package/build/src/configs/batch.d.ts +6 -0
  91. package/build/src/configs/batch.js +51 -0
  92. package/build/src/configs/chains.d.ts +37 -0
  93. package/build/src/configs/chains.js +90 -0
  94. package/build/src/configs/contracts.d.ts +2 -0
  95. package/build/src/configs/contracts.js +218 -0
  96. package/build/src/configs/dataStore.d.ts +149 -0
  97. package/build/src/configs/dataStore.js +276 -0
  98. package/build/src/configs/factors.d.ts +20 -0
  99. package/build/src/configs/factors.js +21 -0
  100. package/build/src/configs/markets.d.ts +8 -0
  101. package/build/src/configs/markets.js +528 -0
  102. package/build/src/configs/subgraph.d.ts +3 -0
  103. package/build/src/configs/subgraph.js +3 -0
  104. package/build/src/configs/tokens.d.ts +89 -0
  105. package/build/src/configs/tokens.js +1269 -0
  106. package/build/src/index.d.ts +44 -0
  107. package/build/src/index.js +245 -0
  108. package/build/src/modules/accounts/accounts.d.ts +5 -0
  109. package/build/src/modules/accounts/accounts.js +36 -0
  110. package/build/src/modules/accounts/accounts.spec.d.ts +1 -0
  111. package/build/src/modules/accounts/accounts.spec.js +7 -0
  112. package/build/src/modules/base.d.ts +9 -0
  113. package/build/src/modules/base.js +15 -0
  114. package/build/src/modules/markets/index.d.ts +26 -0
  115. package/build/src/modules/markets/index.js +339 -0
  116. package/build/src/modules/markets/markets.spec.d.ts +1 -0
  117. package/build/src/modules/markets/markets.spec.js +38 -0
  118. package/build/src/modules/markets/query-builders.d.ts +40 -0
  119. package/build/src/modules/markets/query-builders.js +379 -0
  120. package/build/src/modules/markets/types.d.ts +42 -0
  121. package/build/src/modules/markets/types.js +1 -0
  122. package/build/src/modules/oracle.d.ts +31 -0
  123. package/build/src/modules/oracle.js +53 -0
  124. package/build/src/modules/orders/orders.d.ts +60 -0
  125. package/build/src/modules/orders/orders.js +270 -0
  126. package/build/src/modules/orders/orders.spec.d.ts +1 -0
  127. package/build/src/modules/orders/orders.spec.js +16 -0
  128. package/build/src/modules/orders/transactions/cancelOrdersTxn.d.ts +6 -0
  129. package/build/src/modules/orders/transactions/cancelOrdersTxn.js +15 -0
  130. package/build/src/modules/orders/transactions/createDecreaseOrderTxn.d.ts +32 -0
  131. package/build/src/modules/orders/transactions/createDecreaseOrderTxn.js +98 -0
  132. package/build/src/modules/orders/transactions/createIncreaseOrderTxn.d.ts +77 -0
  133. package/build/src/modules/orders/transactions/createIncreaseOrderTxn.js +164 -0
  134. package/build/src/modules/orders/transactions/createSwapOrderTxn.d.ts +16 -0
  135. package/build/src/modules/orders/transactions/createSwapOrderTxn.js +97 -0
  136. package/build/src/modules/orders/transactions/createWrapOrUnwrapTxn.d.ts +6 -0
  137. package/build/src/modules/orders/transactions/createWrapOrUnwrapTxn.js +13 -0
  138. package/build/src/modules/orders/transactions/updateOrderTxn.d.ts +23 -0
  139. package/build/src/modules/orders/transactions/updateOrderTxn.js +44 -0
  140. package/build/src/modules/orders/utils.d.ts +248 -0
  141. package/build/src/modules/orders/utils.js +151 -0
  142. package/build/src/modules/positions/positions.d.ts +48 -0
  143. package/build/src/modules/positions/positions.js +563 -0
  144. package/build/src/modules/positions/positions.spec.d.ts +1 -0
  145. package/build/src/modules/positions/positions.spec.js +25 -0
  146. package/build/src/modules/tokens/tokens.d.ts +26 -0
  147. package/build/src/modules/tokens/tokens.js +132 -0
  148. package/build/src/modules/tokens/tokens.spec.d.ts +1 -0
  149. package/build/src/modules/tokens/tokens.spec.js +19 -0
  150. package/build/src/modules/trades/trades.d.ts +48 -0
  151. package/build/src/modules/trades/trades.js +390 -0
  152. package/build/src/modules/trades/trades.spec.d.ts +1 -0
  153. package/build/src/modules/trades/trades.spec.js +14 -0
  154. package/build/src/prebuilt/hashedMarketConfigKeys.json +3658 -0
  155. package/build/src/prebuilt/hashedMarketValuesKeys.json +1103 -0
  156. package/build/src/prebuilt/index.d.ts +14 -0
  157. package/build/src/prebuilt/index.js +9 -0
  158. package/build/src/types/amounts.d.ts +223 -0
  159. package/build/src/types/amounts.js +17 -0
  160. package/build/src/types/fees.d.ts +34 -0
  161. package/build/src/types/fees.js +1 -0
  162. package/build/src/types/markets.d.ts +143 -0
  163. package/build/src/types/markets.js +1 -0
  164. package/build/src/types/orders.d.ts +74 -0
  165. package/build/src/types/orders.js +33 -0
  166. package/build/src/types/positions.d.ts +53 -0
  167. package/build/src/types/positions.js +1 -0
  168. package/build/src/types/referrals.d.ts +124 -0
  169. package/build/src/types/referrals.js +9 -0
  170. package/build/src/types/sdk.d.ts +32 -0
  171. package/build/src/types/sdk.js +1 -0
  172. package/build/src/types/sidecarOrders.d.ts +54 -0
  173. package/build/src/types/sidecarOrders.js +1 -0
  174. package/build/src/types/syntheticsEvents.d.ts +88 -0
  175. package/build/src/types/syntheticsEvents.js +1 -0
  176. package/build/src/types/tokens.d.ts +89 -0
  177. package/build/src/types/tokens.js +1 -0
  178. package/build/src/types/trade.d.ts +223 -0
  179. package/build/src/types/trade.js +17 -0
  180. package/build/src/types/tradeHistory.d.ts +107 -0
  181. package/build/src/types/tradeHistory.js +8 -0
  182. package/build/src/utils/LruCache.d.ts +10 -0
  183. package/build/src/utils/LruCache.js +45 -0
  184. package/build/src/utils/bigmath.d.ts +7 -0
  185. package/build/src/utils/bigmath.js +23 -0
  186. package/build/src/utils/buildUrl.d.ts +1 -0
  187. package/build/src/utils/buildUrl.js +5 -0
  188. package/build/src/utils/callContract.d.ts +17 -0
  189. package/build/src/utils/callContract.js +133 -0
  190. package/build/src/utils/common.d.ts +2 -0
  191. package/build/src/utils/common.js +2 -0
  192. package/build/src/utils/fees/estimateOraclePriceCount.d.ts +6 -0
  193. package/build/src/utils/fees/estimateOraclePriceCount.js +19 -0
  194. package/build/src/utils/fees/executionFee.d.ts +59 -0
  195. package/build/src/utils/fees/executionFee.js +108 -0
  196. package/build/src/utils/fees/index.d.ts +29 -0
  197. package/build/src/utils/fees/index.js +89 -0
  198. package/build/src/utils/fees/priceImpact.d.ts +75 -0
  199. package/build/src/utils/fees/priceImpact.js +287 -0
  200. package/build/src/utils/graphqlFetcher.d.ts +1 -0
  201. package/build/src/utils/graphqlFetcher.js +18 -0
  202. package/build/src/utils/hash.d.ts +5 -0
  203. package/build/src/utils/hash.js +35 -0
  204. package/build/src/utils/marketKeysAndConfigs.d.ts +66 -0
  205. package/build/src/utils/marketKeysAndConfigs.js +257 -0
  206. package/build/src/utils/markets.d.ts +40 -0
  207. package/build/src/utils/markets.js +129 -0
  208. package/build/src/utils/multicall.d.ts +64 -0
  209. package/build/src/utils/multicall.js +116 -0
  210. package/build/src/utils/numbers.d.ts +9 -0
  211. package/build/src/utils/numbers.js +30 -0
  212. package/build/src/utils/objects.d.ts +18 -0
  213. package/build/src/utils/objects.js +30 -0
  214. package/build/src/utils/orders.d.ts +28 -0
  215. package/build/src/utils/orders.js +178 -0
  216. package/build/src/utils/positions.d.ts +60 -0
  217. package/build/src/utils/positions.js +133 -0
  218. package/build/src/utils/prices.d.ts +15 -0
  219. package/build/src/utils/prices.js +34 -0
  220. package/build/src/utils/referrals.d.ts +2 -0
  221. package/build/src/utils/referrals.js +27 -0
  222. package/build/src/utils/simulateExecuteOrder.d.ts +16 -0
  223. package/build/src/utils/simulateExecuteOrder.js +143 -0
  224. package/build/src/utils/slidingWindowFallbackSwitcher.d.ts +24 -0
  225. package/build/src/utils/slidingWindowFallbackSwitcher.js +40 -0
  226. package/build/src/utils/subgraph.d.ts +21 -0
  227. package/build/src/utils/subgraph.js +72 -0
  228. package/build/src/utils/swapStats.d.ts +35 -0
  229. package/build/src/utils/swapStats.js +197 -0
  230. package/build/src/utils/test.d.ts +2 -0
  231. package/build/src/utils/test.js +24 -0
  232. package/build/src/utils/tokens.d.ts +18 -0
  233. package/build/src/utils/tokens.js +64 -0
  234. package/build/src/utils/trade.d.ts +10 -0
  235. package/build/src/utils/trade.js +32 -0
  236. package/build/tsconfig.tsbuildinfo +1 -0
  237. package/package.json +96 -0
@@ -0,0 +1,648 @@
1
+ {
2
+ "address": "0xe5485a4fD6527911e9b82A75A1bFEd6e47BE2241",
3
+ "abi": [
4
+ {
5
+ "inputs": [
6
+ {
7
+ "internalType": "contract Router",
8
+ "name": "_router",
9
+ "type": "address"
10
+ },
11
+ {
12
+ "internalType": "contract RoleStore",
13
+ "name": "_roleStore",
14
+ "type": "address"
15
+ },
16
+ {
17
+ "internalType": "contract DataStore",
18
+ "name": "_dataStore",
19
+ "type": "address"
20
+ },
21
+ {
22
+ "internalType": "contract EventEmitter",
23
+ "name": "_eventEmitter",
24
+ "type": "address"
25
+ },
26
+ {
27
+ "internalType": "contract IOrderHandler",
28
+ "name": "_orderHandler",
29
+ "type": "address"
30
+ },
31
+ {
32
+ "internalType": "contract OrderVault",
33
+ "name": "_orderVault",
34
+ "type": "address"
35
+ }
36
+ ],
37
+ "stateMutability": "nonpayable",
38
+ "type": "constructor"
39
+ },
40
+ {
41
+ "inputs": [
42
+ {
43
+ "internalType": "bytes32",
44
+ "name": "key",
45
+ "type": "bytes32"
46
+ }
47
+ ],
48
+ "name": "DisabledFeature",
49
+ "type": "error"
50
+ },
51
+ {
52
+ "inputs": [],
53
+ "name": "EmptyHoldingAddress",
54
+ "type": "error"
55
+ },
56
+ {
57
+ "inputs": [],
58
+ "name": "EmptyOrder",
59
+ "type": "error"
60
+ },
61
+ {
62
+ "inputs": [],
63
+ "name": "EmptyReceiver",
64
+ "type": "error"
65
+ },
66
+ {
67
+ "inputs": [
68
+ {
69
+ "internalType": "address",
70
+ "name": "token",
71
+ "type": "address"
72
+ }
73
+ ],
74
+ "name": "EmptyTokenTranferGasLimit",
75
+ "type": "error"
76
+ },
77
+ {
78
+ "inputs": [
79
+ {
80
+ "internalType": "address",
81
+ "name": "msgSender",
82
+ "type": "address"
83
+ }
84
+ ],
85
+ "name": "InvalidNativeTokenSender",
86
+ "type": "error"
87
+ },
88
+ {
89
+ "inputs": [
90
+ {
91
+ "internalType": "address",
92
+ "name": "receiver",
93
+ "type": "address"
94
+ },
95
+ {
96
+ "internalType": "address",
97
+ "name": "expectedReceiver",
98
+ "type": "address"
99
+ }
100
+ ],
101
+ "name": "InvalidReceiverForSubaccountOrder",
102
+ "type": "error"
103
+ },
104
+ {
105
+ "inputs": [
106
+ {
107
+ "internalType": "address",
108
+ "name": "account",
109
+ "type": "address"
110
+ },
111
+ {
112
+ "internalType": "address",
113
+ "name": "subaccount",
114
+ "type": "address"
115
+ },
116
+ {
117
+ "internalType": "uint256",
118
+ "name": "count",
119
+ "type": "uint256"
120
+ },
121
+ {
122
+ "internalType": "uint256",
123
+ "name": "maxCount",
124
+ "type": "uint256"
125
+ }
126
+ ],
127
+ "name": "MaxSubaccountActionCountExceeded",
128
+ "type": "error"
129
+ },
130
+ {
131
+ "inputs": [
132
+ {
133
+ "internalType": "address",
134
+ "name": "account",
135
+ "type": "address"
136
+ },
137
+ {
138
+ "internalType": "address",
139
+ "name": "subaccount",
140
+ "type": "address"
141
+ }
142
+ ],
143
+ "name": "SubaccountNotAuthorized",
144
+ "type": "error"
145
+ },
146
+ {
147
+ "inputs": [
148
+ {
149
+ "internalType": "address",
150
+ "name": "token",
151
+ "type": "address"
152
+ },
153
+ {
154
+ "internalType": "address",
155
+ "name": "receiver",
156
+ "type": "address"
157
+ },
158
+ {
159
+ "internalType": "uint256",
160
+ "name": "amount",
161
+ "type": "uint256"
162
+ }
163
+ ],
164
+ "name": "TokenTransferError",
165
+ "type": "error"
166
+ },
167
+ {
168
+ "inputs": [
169
+ {
170
+ "internalType": "address",
171
+ "name": "subaccount",
172
+ "type": "address"
173
+ }
174
+ ],
175
+ "name": "addSubaccount",
176
+ "outputs": [],
177
+ "stateMutability": "payable",
178
+ "type": "function"
179
+ },
180
+ {
181
+ "inputs": [
182
+ {
183
+ "internalType": "bytes32",
184
+ "name": "key",
185
+ "type": "bytes32"
186
+ }
187
+ ],
188
+ "name": "cancelOrder",
189
+ "outputs": [],
190
+ "stateMutability": "payable",
191
+ "type": "function"
192
+ },
193
+ {
194
+ "inputs": [
195
+ {
196
+ "internalType": "address",
197
+ "name": "account",
198
+ "type": "address"
199
+ },
200
+ {
201
+ "components": [
202
+ {
203
+ "components": [
204
+ {
205
+ "internalType": "address",
206
+ "name": "receiver",
207
+ "type": "address"
208
+ },
209
+ {
210
+ "internalType": "address",
211
+ "name": "cancellationReceiver",
212
+ "type": "address"
213
+ },
214
+ {
215
+ "internalType": "address",
216
+ "name": "callbackContract",
217
+ "type": "address"
218
+ },
219
+ {
220
+ "internalType": "address",
221
+ "name": "uiFeeReceiver",
222
+ "type": "address"
223
+ },
224
+ {
225
+ "internalType": "address",
226
+ "name": "market",
227
+ "type": "address"
228
+ },
229
+ {
230
+ "internalType": "address",
231
+ "name": "initialCollateralToken",
232
+ "type": "address"
233
+ },
234
+ {
235
+ "internalType": "address[]",
236
+ "name": "swapPath",
237
+ "type": "address[]"
238
+ }
239
+ ],
240
+ "internalType": "struct IBaseOrderUtils.CreateOrderParamsAddresses",
241
+ "name": "addresses",
242
+ "type": "tuple"
243
+ },
244
+ {
245
+ "components": [
246
+ {
247
+ "internalType": "uint256",
248
+ "name": "sizeDeltaUsd",
249
+ "type": "uint256"
250
+ },
251
+ {
252
+ "internalType": "uint256",
253
+ "name": "initialCollateralDeltaAmount",
254
+ "type": "uint256"
255
+ },
256
+ {
257
+ "internalType": "uint256",
258
+ "name": "triggerPrice",
259
+ "type": "uint256"
260
+ },
261
+ {
262
+ "internalType": "uint256",
263
+ "name": "acceptablePrice",
264
+ "type": "uint256"
265
+ },
266
+ {
267
+ "internalType": "uint256",
268
+ "name": "executionFee",
269
+ "type": "uint256"
270
+ },
271
+ {
272
+ "internalType": "uint256",
273
+ "name": "callbackGasLimit",
274
+ "type": "uint256"
275
+ },
276
+ {
277
+ "internalType": "uint256",
278
+ "name": "minOutputAmount",
279
+ "type": "uint256"
280
+ }
281
+ ],
282
+ "internalType": "struct IBaseOrderUtils.CreateOrderParamsNumbers",
283
+ "name": "numbers",
284
+ "type": "tuple"
285
+ },
286
+ {
287
+ "internalType": "enum Order.OrderType",
288
+ "name": "orderType",
289
+ "type": "uint8"
290
+ },
291
+ {
292
+ "internalType": "enum Order.DecreasePositionSwapType",
293
+ "name": "decreasePositionSwapType",
294
+ "type": "uint8"
295
+ },
296
+ {
297
+ "internalType": "bool",
298
+ "name": "isLong",
299
+ "type": "bool"
300
+ },
301
+ {
302
+ "internalType": "bool",
303
+ "name": "shouldUnwrapNativeToken",
304
+ "type": "bool"
305
+ },
306
+ {
307
+ "internalType": "bool",
308
+ "name": "autoCancel",
309
+ "type": "bool"
310
+ },
311
+ {
312
+ "internalType": "bytes32",
313
+ "name": "referralCode",
314
+ "type": "bytes32"
315
+ }
316
+ ],
317
+ "internalType": "struct IBaseOrderUtils.CreateOrderParams",
318
+ "name": "params",
319
+ "type": "tuple"
320
+ }
321
+ ],
322
+ "name": "createOrder",
323
+ "outputs": [
324
+ {
325
+ "internalType": "bytes32",
326
+ "name": "",
327
+ "type": "bytes32"
328
+ }
329
+ ],
330
+ "stateMutability": "payable",
331
+ "type": "function"
332
+ },
333
+ {
334
+ "inputs": [],
335
+ "name": "dataStore",
336
+ "outputs": [
337
+ {
338
+ "internalType": "contract DataStore",
339
+ "name": "",
340
+ "type": "address"
341
+ }
342
+ ],
343
+ "stateMutability": "view",
344
+ "type": "function"
345
+ },
346
+ {
347
+ "inputs": [],
348
+ "name": "eventEmitter",
349
+ "outputs": [
350
+ {
351
+ "internalType": "contract EventEmitter",
352
+ "name": "",
353
+ "type": "address"
354
+ }
355
+ ],
356
+ "stateMutability": "view",
357
+ "type": "function"
358
+ },
359
+ {
360
+ "inputs": [
361
+ {
362
+ "internalType": "bytes[]",
363
+ "name": "data",
364
+ "type": "bytes[]"
365
+ }
366
+ ],
367
+ "name": "multicall",
368
+ "outputs": [
369
+ {
370
+ "internalType": "bytes[]",
371
+ "name": "results",
372
+ "type": "bytes[]"
373
+ }
374
+ ],
375
+ "stateMutability": "payable",
376
+ "type": "function"
377
+ },
378
+ {
379
+ "inputs": [],
380
+ "name": "orderHandler",
381
+ "outputs": [
382
+ {
383
+ "internalType": "contract IOrderHandler",
384
+ "name": "",
385
+ "type": "address"
386
+ }
387
+ ],
388
+ "stateMutability": "view",
389
+ "type": "function"
390
+ },
391
+ {
392
+ "inputs": [],
393
+ "name": "orderVault",
394
+ "outputs": [
395
+ {
396
+ "internalType": "contract OrderVault",
397
+ "name": "",
398
+ "type": "address"
399
+ }
400
+ ],
401
+ "stateMutability": "view",
402
+ "type": "function"
403
+ },
404
+ {
405
+ "inputs": [
406
+ {
407
+ "internalType": "address",
408
+ "name": "subaccount",
409
+ "type": "address"
410
+ }
411
+ ],
412
+ "name": "removeSubaccount",
413
+ "outputs": [],
414
+ "stateMutability": "payable",
415
+ "type": "function"
416
+ },
417
+ {
418
+ "inputs": [],
419
+ "name": "roleStore",
420
+ "outputs": [
421
+ {
422
+ "internalType": "contract RoleStore",
423
+ "name": "",
424
+ "type": "address"
425
+ }
426
+ ],
427
+ "stateMutability": "view",
428
+ "type": "function"
429
+ },
430
+ {
431
+ "inputs": [],
432
+ "name": "router",
433
+ "outputs": [
434
+ {
435
+ "internalType": "contract Router",
436
+ "name": "",
437
+ "type": "address"
438
+ }
439
+ ],
440
+ "stateMutability": "view",
441
+ "type": "function"
442
+ },
443
+ {
444
+ "inputs": [
445
+ {
446
+ "internalType": "address",
447
+ "name": "receiver",
448
+ "type": "address"
449
+ },
450
+ {
451
+ "internalType": "uint256",
452
+ "name": "amount",
453
+ "type": "uint256"
454
+ }
455
+ ],
456
+ "name": "sendNativeToken",
457
+ "outputs": [],
458
+ "stateMutability": "payable",
459
+ "type": "function"
460
+ },
461
+ {
462
+ "inputs": [
463
+ {
464
+ "internalType": "address",
465
+ "name": "token",
466
+ "type": "address"
467
+ },
468
+ {
469
+ "internalType": "address",
470
+ "name": "receiver",
471
+ "type": "address"
472
+ },
473
+ {
474
+ "internalType": "uint256",
475
+ "name": "amount",
476
+ "type": "uint256"
477
+ }
478
+ ],
479
+ "name": "sendTokens",
480
+ "outputs": [],
481
+ "stateMutability": "payable",
482
+ "type": "function"
483
+ },
484
+ {
485
+ "inputs": [
486
+ {
487
+ "internalType": "address",
488
+ "name": "receiver",
489
+ "type": "address"
490
+ },
491
+ {
492
+ "internalType": "uint256",
493
+ "name": "amount",
494
+ "type": "uint256"
495
+ }
496
+ ],
497
+ "name": "sendWnt",
498
+ "outputs": [],
499
+ "stateMutability": "payable",
500
+ "type": "function"
501
+ },
502
+ {
503
+ "inputs": [
504
+ {
505
+ "internalType": "address",
506
+ "name": "subaccount",
507
+ "type": "address"
508
+ },
509
+ {
510
+ "internalType": "bytes32",
511
+ "name": "actionType",
512
+ "type": "bytes32"
513
+ },
514
+ {
515
+ "internalType": "uint256",
516
+ "name": "maxAllowedCount",
517
+ "type": "uint256"
518
+ }
519
+ ],
520
+ "name": "setMaxAllowedSubaccountActionCount",
521
+ "outputs": [],
522
+ "stateMutability": "payable",
523
+ "type": "function"
524
+ },
525
+ {
526
+ "inputs": [
527
+ {
528
+ "internalType": "address",
529
+ "name": "subaccount",
530
+ "type": "address"
531
+ },
532
+ {
533
+ "internalType": "uint256",
534
+ "name": "amount",
535
+ "type": "uint256"
536
+ }
537
+ ],
538
+ "name": "setSubaccountAutoTopUpAmount",
539
+ "outputs": [],
540
+ "stateMutability": "payable",
541
+ "type": "function"
542
+ },
543
+ {
544
+ "inputs": [
545
+ {
546
+ "internalType": "bytes32",
547
+ "name": "key",
548
+ "type": "bytes32"
549
+ },
550
+ {
551
+ "internalType": "uint256",
552
+ "name": "sizeDeltaUsd",
553
+ "type": "uint256"
554
+ },
555
+ {
556
+ "internalType": "uint256",
557
+ "name": "acceptablePrice",
558
+ "type": "uint256"
559
+ },
560
+ {
561
+ "internalType": "uint256",
562
+ "name": "triggerPrice",
563
+ "type": "uint256"
564
+ },
565
+ {
566
+ "internalType": "uint256",
567
+ "name": "minOutputAmount",
568
+ "type": "uint256"
569
+ },
570
+ {
571
+ "internalType": "bool",
572
+ "name": "autoCancel",
573
+ "type": "bool"
574
+ }
575
+ ],
576
+ "name": "updateOrder",
577
+ "outputs": [],
578
+ "stateMutability": "payable",
579
+ "type": "function"
580
+ },
581
+ {
582
+ "stateMutability": "payable",
583
+ "type": "receive"
584
+ }
585
+ ],
586
+ "transactionHash": "0xe5b71c86f938f547820ca3262678fb70c379c15ef02430fbb773ee4d37e86e09",
587
+ "receipt": {
588
+ "to": null,
589
+ "from": "0xE7BfFf2aB721264887230037940490351700a068",
590
+ "contractAddress": "0xe5485a4fD6527911e9b82A75A1bFEd6e47BE2241",
591
+ "transactionIndex": 0,
592
+ "gasUsed": "3707710",
593
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
594
+ "blockHash": "0x00c9beda5865106776abea90f56310f05628852d29d91b7c235c44a20123b601",
595
+ "transactionHash": "0xe5b71c86f938f547820ca3262678fb70c379c15ef02430fbb773ee4d37e86e09",
596
+ "logs": [],
597
+ "blockNumber": 46822607,
598
+ "cumulativeGasUsed": "3707710",
599
+ "status": 1,
600
+ "byzantium": true
601
+ },
602
+ "args": [
603
+ "0x820F5FfC5b525cD4d88Cd91aCf2c28F16530Cc68",
604
+ "0xA44F830B6a2B6fa76657a3B92C1fe74fcB7C6AfD",
605
+ "0x2F0b22339414ADeD7D5F06f9D604c7fF5b2fe3f6",
606
+ "0xDb17B211c34240B014ab6d61d4A31FA0C0e20c26",
607
+ "0x32A0258007a6ea78265a5AE4DBb28f176be4a8EB",
608
+ "0xD3D60D22d415aD43b7e64b510D86A30f19B1B12C"
609
+ ],
610
+ "numDeployments": 3,
611
+ "solcInputHash": "95ed34927f843d6700c121bcc6faf594",
612
+ "libraries": {
613
+ "OrderStoreUtils": "0x805a15bf16582eC8d76841062A47dFfEa7903131"
614
+ },
615
+ "devdoc": {
616
+ "kind": "dev",
617
+ "methods": {
618
+ "multicall(bytes[])": {
619
+ "details": "Receives and executes a batch of function calls on this contract."
620
+ }
621
+ },
622
+ "version": 1
623
+ },
624
+ "userdoc": {
625
+ "kind": "user",
626
+ "methods": {},
627
+ "version": 1
628
+ },
629
+ "storageLayout": {
630
+ "storage": [
631
+ {
632
+ "astId": 115,
633
+ "contract": "contracts/router/SubaccountRouter.sol:SubaccountRouter",
634
+ "label": "_status",
635
+ "offset": 0,
636
+ "slot": "0",
637
+ "type": "t_uint256"
638
+ }
639
+ ],
640
+ "types": {
641
+ "t_uint256": {
642
+ "encoding": "inplace",
643
+ "label": "uint256",
644
+ "numberOfBytes": "32"
645
+ }
646
+ }
647
+ }
648
+ }