@gmx-io/sdk 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/build/cjs/src/abis/ClaimHandler.json +1 -16
  2. package/build/cjs/src/abis/CustomErrors.json +642 -61
  3. package/build/cjs/src/abis/DataStore.json +25 -6
  4. package/build/cjs/src/abis/EventEmitter.json +1 -6
  5. package/build/cjs/src/abis/ExchangeRouter.json +195 -290
  6. package/build/cjs/src/abis/GelatoRelayRouter.json +251 -98
  7. package/build/cjs/src/abis/GlvReader.json +60 -3
  8. package/build/cjs/src/abis/GlvRouter.json +144 -86
  9. package/build/cjs/src/abis/GovToken.json +1 -354
  10. package/build/cjs/src/abis/LayerZeroProvider.json +372 -0
  11. package/build/cjs/src/abis/Multicall.json +134 -38
  12. package/build/cjs/src/abis/MultichainClaimsRouter.json +1266 -0
  13. package/build/cjs/src/abis/MultichainGlvRouter.json +1150 -0
  14. package/build/cjs/src/abis/MultichainGmRouter.json +1449 -0
  15. package/build/cjs/src/abis/MultichainOrderRouter.json +1820 -0
  16. package/build/cjs/src/abis/MultichainSubaccountRouter.json +2069 -0
  17. package/build/cjs/src/abis/MultichainTransferRouter.json +915 -0
  18. package/build/cjs/src/abis/MultichainUtils.json +133 -0
  19. package/build/cjs/src/abis/MultichainVault.json +275 -0
  20. package/build/cjs/src/abis/ReferralStorage.json +69 -19
  21. package/build/cjs/src/abis/RelayParams.json +85 -48
  22. package/build/cjs/src/abis/SmartAccount.json +28 -0
  23. package/build/cjs/src/abis/SubaccountGelatoRelayRouter.json +282 -148
  24. package/build/cjs/src/abis/SubaccountRouter.json +62 -118
  25. package/build/cjs/src/abis/SyntheticsReader.json +342 -474
  26. package/build/cjs/src/abis/SyntheticsRouter.json +1 -6
  27. package/build/cjs/src/abis/index.js +51 -7
  28. package/build/cjs/src/configs/__tests__/markets.spec.js +1 -1
  29. package/build/cjs/src/configs/__tests__/permits.spec.js +1 -1
  30. package/build/cjs/src/configs/__tests__/tokens.spec.js +1 -1
  31. package/build/cjs/src/configs/batch.js +48 -0
  32. package/build/cjs/src/configs/chains.js +41 -8
  33. package/build/cjs/src/configs/contracts.js +151 -41
  34. package/build/cjs/src/configs/dataStore.js +39 -5
  35. package/build/cjs/src/configs/express.js +4 -0
  36. package/build/cjs/src/configs/factors.js +1 -1
  37. package/build/cjs/src/configs/markets.js +128 -0
  38. package/build/cjs/src/configs/oracleKeeper.js +2 -0
  39. package/build/cjs/src/configs/tokens.js +217 -2
  40. package/build/cjs/src/modules/markets/index.js +9 -4
  41. package/build/cjs/src/modules/markets/query-builders.js +28 -8
  42. package/build/cjs/src/modules/orders/helpers.js +2 -2
  43. package/build/cjs/src/modules/orders/helpers.spec.js +1 -1
  44. package/build/cjs/src/modules/orders/utils.js +4 -5
  45. package/build/cjs/src/modules/positions/positions.js +38 -5
  46. package/build/cjs/src/modules/utils/utils.js +1 -0
  47. package/build/cjs/src/prebuilt/hashedKinkModelMarketRatesKeys.json +146 -0
  48. package/build/cjs/src/prebuilt/hashedMarketConfigKeys.json +2207 -532
  49. package/build/cjs/src/prebuilt/hashedMarketValuesKeys.json +272 -0
  50. package/build/cjs/src/test/mock.js +9 -4
  51. package/build/cjs/src/types/subsquid.js +507 -1
  52. package/build/cjs/src/utils/LruCache.js +4 -0
  53. package/build/cjs/src/utils/__tests__/LruCache.spec.js +18 -0
  54. package/build/cjs/src/utils/__tests__/numbers.spec.js +18 -16
  55. package/build/cjs/src/utils/__tests__/orderTransactions/batchUtils.spec.js +0 -1
  56. package/build/cjs/src/utils/__tests__/orderTransactions/decreaseOrders.spec.js +8 -0
  57. package/build/cjs/src/utils/__tests__/orderTransactions/exchangeRouterMulticall.spec.js +38 -30
  58. package/build/cjs/src/utils/__tests__/orderTransactions/increaseOrders.spec.js +10 -0
  59. package/build/cjs/src/utils/__tests__/orderTransactions/swapOrders.spec.js +6 -0
  60. package/build/cjs/src/utils/__tests__/positions.spec.js +23 -6
  61. package/build/cjs/src/utils/bigmath.js +9 -2
  62. package/build/cjs/src/utils/errors/parseError.js +35 -1
  63. package/build/cjs/src/utils/fees/executionFee.js +5 -3
  64. package/build/cjs/src/utils/fees/index.js +8 -6
  65. package/build/cjs/src/utils/fees/priceImpact.js +94 -32
  66. package/build/cjs/src/utils/gelatoRelay.js +5 -0
  67. package/build/cjs/src/utils/marketKeysAndConfigs.js +24 -4
  68. package/build/cjs/src/utils/markets.js +10 -3
  69. package/build/cjs/src/utils/numbers.js +18 -17
  70. package/build/cjs/src/utils/orderTransactions.js +5 -1
  71. package/build/cjs/src/utils/positions.js +77 -9
  72. package/build/cjs/src/utils/prices.js +19 -13
  73. package/build/cjs/src/utils/swap/__tests__/mockRouting.spec.js +1 -0
  74. package/build/cjs/src/utils/swap/swapStats.js +6 -3
  75. package/build/cjs/src/utils/trade/decrease.js +470 -0
  76. package/build/cjs/src/utils/trade/{amounts.js → increase.js} +86 -31
  77. package/build/cjs/src/utils/tradeHistory.js +3 -0
  78. package/build/esm/src/abis/ClaimHandler.json +1 -16
  79. package/build/esm/src/abis/CustomErrors.json +642 -61
  80. package/build/esm/src/abis/DataStore.json +25 -6
  81. package/build/esm/src/abis/EventEmitter.json +1 -6
  82. package/build/esm/src/abis/ExchangeRouter.json +195 -290
  83. package/build/esm/src/abis/GelatoRelayRouter.json +251 -98
  84. package/build/esm/src/abis/GlvReader.json +60 -3
  85. package/build/esm/src/abis/GlvRouter.json +144 -86
  86. package/build/esm/src/abis/GovToken.json +1 -354
  87. package/build/esm/src/abis/LayerZeroProvider.json +372 -0
  88. package/build/esm/src/abis/Multicall.json +134 -38
  89. package/build/esm/src/abis/MultichainClaimsRouter.json +1266 -0
  90. package/build/esm/src/abis/MultichainGlvRouter.json +1150 -0
  91. package/build/esm/src/abis/MultichainGmRouter.json +1449 -0
  92. package/build/esm/src/abis/MultichainOrderRouter.json +1820 -0
  93. package/build/esm/src/abis/MultichainSubaccountRouter.json +2069 -0
  94. package/build/esm/src/abis/MultichainTransferRouter.json +915 -0
  95. package/build/esm/src/abis/MultichainUtils.json +133 -0
  96. package/build/esm/src/abis/MultichainVault.json +275 -0
  97. package/build/esm/src/abis/ReferralStorage.json +69 -19
  98. package/build/esm/src/abis/RelayParams.json +85 -48
  99. package/build/esm/src/abis/SmartAccount.json +28 -0
  100. package/build/esm/src/abis/SubaccountGelatoRelayRouter.json +282 -148
  101. package/build/esm/src/abis/SubaccountRouter.json +62 -118
  102. package/build/esm/src/abis/SyntheticsReader.json +342 -474
  103. package/build/esm/src/abis/SyntheticsRouter.json +1 -6
  104. package/build/esm/src/abis/index.js +51 -7
  105. package/build/esm/src/configs/__tests__/markets.spec.js +3 -3
  106. package/build/esm/src/configs/__tests__/permits.spec.js +2 -2
  107. package/build/esm/src/configs/__tests__/tokens.spec.js +2 -2
  108. package/build/esm/src/configs/batch.js +49 -1
  109. package/build/esm/src/configs/chains.js +40 -7
  110. package/build/esm/src/configs/contracts.js +152 -42
  111. package/build/esm/src/configs/dataStore.js +29 -1
  112. package/build/esm/src/configs/express.js +5 -1
  113. package/build/esm/src/configs/factors.js +1 -1
  114. package/build/esm/src/configs/markets.js +129 -1
  115. package/build/esm/src/configs/oracleKeeper.js +3 -1
  116. package/build/esm/src/configs/tokens.js +216 -2
  117. package/build/esm/src/modules/markets/index.js +9 -4
  118. package/build/esm/src/modules/markets/query-builders.js +28 -8
  119. package/build/esm/src/modules/orders/helpers.js +1 -1
  120. package/build/esm/src/modules/orders/helpers.spec.js +1 -1
  121. package/build/esm/src/modules/orders/utils.js +4 -5
  122. package/build/esm/src/modules/positions/positions.js +40 -7
  123. package/build/esm/src/modules/utils/utils.js +1 -0
  124. package/build/esm/src/prebuilt/hashedKinkModelMarketRatesKeys.json +146 -0
  125. package/build/esm/src/prebuilt/hashedMarketConfigKeys.json +2207 -532
  126. package/build/esm/src/prebuilt/hashedMarketValuesKeys.json +272 -0
  127. package/build/esm/src/test/mock.js +9 -4
  128. package/build/esm/src/types/subsquid.js +506 -0
  129. package/build/esm/src/utils/LruCache.js +4 -0
  130. package/build/esm/src/utils/__tests__/LruCache.spec.js +18 -0
  131. package/build/esm/src/utils/__tests__/numbers.spec.js +18 -16
  132. package/build/esm/src/utils/__tests__/orderTransactions/batchUtils.spec.js +0 -1
  133. package/build/esm/src/utils/__tests__/orderTransactions/decreaseOrders.spec.js +8 -0
  134. package/build/esm/src/utils/__tests__/orderTransactions/exchangeRouterMulticall.spec.js +38 -30
  135. package/build/esm/src/utils/__tests__/orderTransactions/increaseOrders.spec.js +10 -0
  136. package/build/esm/src/utils/__tests__/orderTransactions/swapOrders.spec.js +7 -1
  137. package/build/esm/src/utils/__tests__/positions.spec.js +23 -6
  138. package/build/esm/src/utils/bigmath.js +9 -2
  139. package/build/esm/src/utils/errors/parseError.js +31 -0
  140. package/build/esm/src/utils/fees/executionFee.js +5 -3
  141. package/build/esm/src/utils/fees/index.js +8 -6
  142. package/build/esm/src/utils/fees/priceImpact.js +88 -30
  143. package/build/esm/src/utils/gelatoRelay.js +2 -0
  144. package/build/esm/src/utils/marketKeysAndConfigs.js +25 -5
  145. package/build/esm/src/utils/markets.js +7 -1
  146. package/build/esm/src/utils/numbers.js +18 -17
  147. package/build/esm/src/utils/orderTransactions.js +5 -1
  148. package/build/esm/src/utils/positions.js +75 -11
  149. package/build/esm/src/utils/prices.js +20 -14
  150. package/build/esm/src/utils/swap/__tests__/mockRouting.spec.js +1 -0
  151. package/build/esm/src/utils/swap/swapStats.js +6 -3
  152. package/build/esm/src/utils/trade/decrease.js +460 -0
  153. package/build/esm/src/utils/trade/{amounts.js → increase.js} +87 -33
  154. package/build/esm/src/utils/tradeHistory.js +3 -0
  155. package/build/types/src/abis/index.d.ts +1 -1
  156. package/build/types/src/configs/batch.d.ts +2 -2
  157. package/build/types/src/configs/chains.d.ts +25 -20
  158. package/build/types/src/configs/contracts.d.ts +118 -10
  159. package/build/types/src/configs/dataStore.d.ts +16 -0
  160. package/build/types/src/configs/factors.d.ts +1 -1
  161. package/build/types/src/configs/markets.d.ts +2 -2
  162. package/build/types/src/configs/tokens.d.ts +1 -0
  163. package/build/types/src/index.d.ts +1 -1
  164. package/build/types/src/modules/base.d.ts +1 -1
  165. package/build/types/src/modules/markets/query-builders.d.ts +3 -2
  166. package/build/types/src/modules/markets/types.d.ts +2 -2
  167. package/build/types/src/modules/orders/utils.d.ts +6 -5
  168. package/build/types/src/types/fees.d.ts +1 -0
  169. package/build/types/src/types/markets.d.ts +10 -5
  170. package/build/types/src/types/orders.d.ts +1 -1
  171. package/build/types/src/types/positions.d.ts +26 -2
  172. package/build/types/src/types/sdk.d.ts +2 -2
  173. package/build/types/src/types/subsquid.d.ts +1259 -9
  174. package/build/types/src/types/tokens.d.ts +7 -0
  175. package/build/types/src/types/trade.d.ts +14 -3
  176. package/build/types/src/types/tradeHistory.d.ts +3 -0
  177. package/build/types/src/utils/LruCache.d.ts +1 -0
  178. package/build/types/src/utils/bigmath.d.ts +2 -1
  179. package/build/types/src/utils/errors/parseError.d.ts +11 -0
  180. package/build/types/src/utils/fees/executionFee.d.ts +6 -3
  181. package/build/types/src/utils/fees/index.d.ts +2 -2
  182. package/build/types/src/utils/fees/priceImpact.d.ts +33 -5
  183. package/build/types/src/utils/marketKeysAndConfigs.d.ts +9 -4
  184. package/build/types/src/utils/markets.d.ts +7 -0
  185. package/build/types/src/utils/multicall.d.ts +1 -1
  186. package/build/types/src/utils/numbers.d.ts +6 -3
  187. package/build/types/src/utils/orderTransactions.d.ts +6 -4
  188. package/build/types/src/utils/positions.d.ts +30 -0
  189. package/build/types/src/utils/prices.d.ts +4 -0
  190. package/build/types/src/utils/swap/swapValues.d.ts +1 -1
  191. package/build/types/src/utils/trade/decrease.d.ts +77 -0
  192. package/build/types/src/utils/trade/{amounts.d.ts → increase.d.ts} +16 -1
  193. package/package.json +2 -2
@@ -0,0 +1,372 @@
1
+ {
2
+ "abi": [
3
+ {
4
+ "inputs": [
5
+ {
6
+ "internalType": "contract DataStore",
7
+ "name": "_dataStore",
8
+ "type": "address"
9
+ },
10
+ {
11
+ "internalType": "contract RoleStore",
12
+ "name": "_roleStore",
13
+ "type": "address"
14
+ },
15
+ {
16
+ "internalType": "contract EventEmitter",
17
+ "name": "_eventEmitter",
18
+ "type": "address"
19
+ },
20
+ {
21
+ "internalType": "contract MultichainVault",
22
+ "name": "_multichainVault",
23
+ "type": "address"
24
+ },
25
+ {
26
+ "internalType": "contract IMultichainGmRouter",
27
+ "name": "_multichainGmRouter",
28
+ "type": "address"
29
+ },
30
+ {
31
+ "internalType": "contract IMultichainGlvRouter",
32
+ "name": "_multichainGlvRouter",
33
+ "type": "address"
34
+ },
35
+ {
36
+ "internalType": "contract IMultichainOrderRouter",
37
+ "name": "_multichainOrderRouter",
38
+ "type": "address"
39
+ }
40
+ ],
41
+ "stateMutability": "nonpayable",
42
+ "type": "constructor"
43
+ },
44
+ {
45
+ "inputs": [],
46
+ "name": "EmptyHoldingAddress",
47
+ "type": "error"
48
+ },
49
+ {
50
+ "inputs": [],
51
+ "name": "EmptyReceiver",
52
+ "type": "error"
53
+ },
54
+ {
55
+ "inputs": [
56
+ {
57
+ "internalType": "address",
58
+ "name": "token",
59
+ "type": "address"
60
+ }
61
+ ],
62
+ "name": "EmptyTokenTranferGasLimit",
63
+ "type": "error"
64
+ },
65
+ {
66
+ "inputs": [],
67
+ "name": "EmptyWithdrawalAmount",
68
+ "type": "error"
69
+ },
70
+ {
71
+ "inputs": [
72
+ {
73
+ "internalType": "uint256",
74
+ "name": "gas",
75
+ "type": "uint256"
76
+ },
77
+ {
78
+ "internalType": "uint256",
79
+ "name": "estimatedGasLimit",
80
+ "type": "uint256"
81
+ }
82
+ ],
83
+ "name": "InsufficientGasLeft",
84
+ "type": "error"
85
+ },
86
+ {
87
+ "inputs": [
88
+ {
89
+ "internalType": "address",
90
+ "name": "token",
91
+ "type": "address"
92
+ }
93
+ ],
94
+ "name": "InvalidBridgeOutToken",
95
+ "type": "error"
96
+ },
97
+ {
98
+ "inputs": [
99
+ {
100
+ "internalType": "uint256",
101
+ "name": "eid",
102
+ "type": "uint256"
103
+ }
104
+ ],
105
+ "name": "InvalidEid",
106
+ "type": "error"
107
+ },
108
+ {
109
+ "inputs": [
110
+ {
111
+ "internalType": "address",
112
+ "name": "token",
113
+ "type": "address"
114
+ },
115
+ {
116
+ "internalType": "address",
117
+ "name": "receiver",
118
+ "type": "address"
119
+ },
120
+ {
121
+ "internalType": "uint256",
122
+ "name": "amount",
123
+ "type": "uint256"
124
+ }
125
+ ],
126
+ "name": "TokenTransferError",
127
+ "type": "error"
128
+ },
129
+ {
130
+ "inputs": [
131
+ {
132
+ "internalType": "address",
133
+ "name": "msgSender",
134
+ "type": "address"
135
+ },
136
+ {
137
+ "internalType": "string",
138
+ "name": "role",
139
+ "type": "string"
140
+ }
141
+ ],
142
+ "name": "Unauthorized",
143
+ "type": "error"
144
+ },
145
+ {
146
+ "anonymous": false,
147
+ "inputs": [
148
+ {
149
+ "indexed": false,
150
+ "internalType": "string",
151
+ "name": "reason",
152
+ "type": "string"
153
+ },
154
+ {
155
+ "indexed": false,
156
+ "internalType": "bytes",
157
+ "name": "returndata",
158
+ "type": "bytes"
159
+ }
160
+ ],
161
+ "name": "TokenTransferReverted",
162
+ "type": "event"
163
+ },
164
+ {
165
+ "inputs": [
166
+ {
167
+ "internalType": "address",
168
+ "name": "account",
169
+ "type": "address"
170
+ },
171
+ {
172
+ "internalType": "uint256",
173
+ "name": "srcChainId",
174
+ "type": "uint256"
175
+ },
176
+ {
177
+ "components": [
178
+ {
179
+ "internalType": "address",
180
+ "name": "token",
181
+ "type": "address"
182
+ },
183
+ {
184
+ "internalType": "uint256",
185
+ "name": "amount",
186
+ "type": "uint256"
187
+ },
188
+ {
189
+ "internalType": "uint256",
190
+ "name": "minAmountOut",
191
+ "type": "uint256"
192
+ },
193
+ {
194
+ "internalType": "address",
195
+ "name": "provider",
196
+ "type": "address"
197
+ },
198
+ {
199
+ "internalType": "bytes",
200
+ "name": "data",
201
+ "type": "bytes"
202
+ }
203
+ ],
204
+ "internalType": "struct IRelayUtils.BridgeOutParams",
205
+ "name": "params",
206
+ "type": "tuple"
207
+ }
208
+ ],
209
+ "name": "bridgeOut",
210
+ "outputs": [
211
+ {
212
+ "internalType": "uint256",
213
+ "name": "",
214
+ "type": "uint256"
215
+ }
216
+ ],
217
+ "stateMutability": "nonpayable",
218
+ "type": "function"
219
+ },
220
+ {
221
+ "inputs": [],
222
+ "name": "dataStore",
223
+ "outputs": [
224
+ {
225
+ "internalType": "contract DataStore",
226
+ "name": "",
227
+ "type": "address"
228
+ }
229
+ ],
230
+ "stateMutability": "view",
231
+ "type": "function"
232
+ },
233
+ {
234
+ "inputs": [],
235
+ "name": "eventEmitter",
236
+ "outputs": [
237
+ {
238
+ "internalType": "contract EventEmitter",
239
+ "name": "",
240
+ "type": "address"
241
+ }
242
+ ],
243
+ "stateMutability": "view",
244
+ "type": "function"
245
+ },
246
+ {
247
+ "inputs": [
248
+ {
249
+ "internalType": "address",
250
+ "name": "from",
251
+ "type": "address"
252
+ },
253
+ {
254
+ "internalType": "bytes32",
255
+ "name": "",
256
+ "type": "bytes32"
257
+ },
258
+ {
259
+ "internalType": "bytes",
260
+ "name": "message",
261
+ "type": "bytes"
262
+ },
263
+ {
264
+ "internalType": "address",
265
+ "name": "",
266
+ "type": "address"
267
+ },
268
+ {
269
+ "internalType": "bytes",
270
+ "name": "",
271
+ "type": "bytes"
272
+ }
273
+ ],
274
+ "name": "lzCompose",
275
+ "outputs": [],
276
+ "stateMutability": "payable",
277
+ "type": "function"
278
+ },
279
+ {
280
+ "inputs": [],
281
+ "name": "multichainGlvRouter",
282
+ "outputs": [
283
+ {
284
+ "internalType": "contract IMultichainGlvRouter",
285
+ "name": "",
286
+ "type": "address"
287
+ }
288
+ ],
289
+ "stateMutability": "view",
290
+ "type": "function"
291
+ },
292
+ {
293
+ "inputs": [],
294
+ "name": "multichainGmRouter",
295
+ "outputs": [
296
+ {
297
+ "internalType": "contract IMultichainGmRouter",
298
+ "name": "",
299
+ "type": "address"
300
+ }
301
+ ],
302
+ "stateMutability": "view",
303
+ "type": "function"
304
+ },
305
+ {
306
+ "inputs": [],
307
+ "name": "multichainOrderRouter",
308
+ "outputs": [
309
+ {
310
+ "internalType": "contract IMultichainOrderRouter",
311
+ "name": "",
312
+ "type": "address"
313
+ }
314
+ ],
315
+ "stateMutability": "view",
316
+ "type": "function"
317
+ },
318
+ {
319
+ "inputs": [],
320
+ "name": "multichainVault",
321
+ "outputs": [
322
+ {
323
+ "internalType": "contract MultichainVault",
324
+ "name": "",
325
+ "type": "address"
326
+ }
327
+ ],
328
+ "stateMutability": "view",
329
+ "type": "function"
330
+ },
331
+ {
332
+ "inputs": [],
333
+ "name": "roleStore",
334
+ "outputs": [
335
+ {
336
+ "internalType": "contract RoleStore",
337
+ "name": "",
338
+ "type": "address"
339
+ }
340
+ ],
341
+ "stateMutability": "view",
342
+ "type": "function"
343
+ },
344
+ {
345
+ "inputs": [
346
+ {
347
+ "internalType": "address",
348
+ "name": "token",
349
+ "type": "address"
350
+ },
351
+ {
352
+ "internalType": "address",
353
+ "name": "receiver",
354
+ "type": "address"
355
+ },
356
+ {
357
+ "internalType": "uint256",
358
+ "name": "amount",
359
+ "type": "uint256"
360
+ }
361
+ ],
362
+ "name": "withdrawTokens",
363
+ "outputs": [],
364
+ "stateMutability": "nonpayable",
365
+ "type": "function"
366
+ },
367
+ {
368
+ "stateMutability": "payable",
369
+ "type": "receive"
370
+ }
371
+ ]
372
+ }
@@ -1,7 +1,4 @@
1
1
  {
2
- "_format": "hh-sol-artifact-1",
3
- "contractName": "Multicall2",
4
- "sourceName": "contracts/mock/Multicall2.sol",
5
2
  "abi": [
6
3
  {
7
4
  "inputs": [
@@ -18,7 +15,7 @@
18
15
  "type": "bytes"
19
16
  }
20
17
  ],
21
- "internalType": "struct Multicall2.Call[]",
18
+ "internalType": "struct Multicall3.Call[]",
22
19
  "name": "calls",
23
20
  "type": "tuple[]"
24
21
  }
@@ -36,7 +33,108 @@
36
33
  "type": "bytes[]"
37
34
  }
38
35
  ],
39
- "stateMutability": "nonpayable",
36
+ "stateMutability": "payable",
37
+ "type": "function"
38
+ },
39
+ {
40
+ "inputs": [
41
+ {
42
+ "components": [
43
+ {
44
+ "internalType": "address",
45
+ "name": "target",
46
+ "type": "address"
47
+ },
48
+ {
49
+ "internalType": "bool",
50
+ "name": "allowFailure",
51
+ "type": "bool"
52
+ },
53
+ {
54
+ "internalType": "bytes",
55
+ "name": "callData",
56
+ "type": "bytes"
57
+ }
58
+ ],
59
+ "internalType": "struct Multicall3.Call3[]",
60
+ "name": "calls",
61
+ "type": "tuple[]"
62
+ }
63
+ ],
64
+ "name": "aggregate3",
65
+ "outputs": [
66
+ {
67
+ "components": [
68
+ {
69
+ "internalType": "bool",
70
+ "name": "success",
71
+ "type": "bool"
72
+ },
73
+ {
74
+ "internalType": "bytes",
75
+ "name": "returnData",
76
+ "type": "bytes"
77
+ }
78
+ ],
79
+ "internalType": "struct Multicall3.Result[]",
80
+ "name": "returnData",
81
+ "type": "tuple[]"
82
+ }
83
+ ],
84
+ "stateMutability": "payable",
85
+ "type": "function"
86
+ },
87
+ {
88
+ "inputs": [
89
+ {
90
+ "components": [
91
+ {
92
+ "internalType": "address",
93
+ "name": "target",
94
+ "type": "address"
95
+ },
96
+ {
97
+ "internalType": "bool",
98
+ "name": "allowFailure",
99
+ "type": "bool"
100
+ },
101
+ {
102
+ "internalType": "uint256",
103
+ "name": "value",
104
+ "type": "uint256"
105
+ },
106
+ {
107
+ "internalType": "bytes",
108
+ "name": "callData",
109
+ "type": "bytes"
110
+ }
111
+ ],
112
+ "internalType": "struct Multicall3.Call3Value[]",
113
+ "name": "calls",
114
+ "type": "tuple[]"
115
+ }
116
+ ],
117
+ "name": "aggregate3Value",
118
+ "outputs": [
119
+ {
120
+ "components": [
121
+ {
122
+ "internalType": "bool",
123
+ "name": "success",
124
+ "type": "bool"
125
+ },
126
+ {
127
+ "internalType": "bytes",
128
+ "name": "returnData",
129
+ "type": "bytes"
130
+ }
131
+ ],
132
+ "internalType": "struct Multicall3.Result[]",
133
+ "name": "returnData",
134
+ "type": "tuple[]"
135
+ }
136
+ ],
137
+ "stateMutability": "payable",
40
138
  "type": "function"
41
139
  },
42
140
  {
@@ -54,7 +152,7 @@
54
152
  "type": "bytes"
55
153
  }
56
154
  ],
57
- "internalType": "struct Multicall2.Call[]",
155
+ "internalType": "struct Multicall3.Call[]",
58
156
  "name": "calls",
59
157
  "type": "tuple[]"
60
158
  }
@@ -84,12 +182,25 @@
84
182
  "type": "bytes"
85
183
  }
86
184
  ],
87
- "internalType": "struct Multicall2.Result[]",
185
+ "internalType": "struct Multicall3.Result[]",
88
186
  "name": "returnData",
89
187
  "type": "tuple[]"
90
188
  }
91
189
  ],
92
- "stateMutability": "nonpayable",
190
+ "stateMutability": "payable",
191
+ "type": "function"
192
+ },
193
+ {
194
+ "inputs": [],
195
+ "name": "getBasefee",
196
+ "outputs": [
197
+ {
198
+ "internalType": "uint256",
199
+ "name": "basefee",
200
+ "type": "uint256"
201
+ }
202
+ ],
203
+ "stateMutability": "view",
93
204
  "type": "function"
94
205
  },
95
206
  {
@@ -126,12 +237,12 @@
126
237
  },
127
238
  {
128
239
  "inputs": [],
129
- "name": "getCurrentBlockCoinbase",
240
+ "name": "getChainId",
130
241
  "outputs": [
131
242
  {
132
- "internalType": "address",
133
- "name": "coinbase",
134
- "type": "address"
243
+ "internalType": "uint256",
244
+ "name": "chainid",
245
+ "type": "uint256"
135
246
  }
136
247
  ],
137
248
  "stateMutability": "view",
@@ -139,12 +250,12 @@
139
250
  },
140
251
  {
141
252
  "inputs": [],
142
- "name": "getCurrentBlockDifficulty",
253
+ "name": "getCurrentBlockCoinbase",
143
254
  "outputs": [
144
255
  {
145
- "internalType": "uint256",
146
- "name": "difficulty",
147
- "type": "uint256"
256
+ "internalType": "address",
257
+ "name": "coinbase",
258
+ "type": "address"
148
259
  }
149
260
  ],
150
261
  "stateMutability": "view",
@@ -195,19 +306,6 @@
195
306
  "stateMutability": "view",
196
307
  "type": "function"
197
308
  },
198
- {
199
- "inputs": [],
200
- "name": "getL1BlockNumber",
201
- "outputs": [
202
- {
203
- "internalType": "uint256",
204
- "name": "l1BlockNumber",
205
- "type": "uint256"
206
- }
207
- ],
208
- "stateMutability": "view",
209
- "type": "function"
210
- },
211
309
  {
212
310
  "inputs": [],
213
311
  "name": "getLastBlockHash",
@@ -241,7 +339,7 @@
241
339
  "type": "bytes"
242
340
  }
243
341
  ],
244
- "internalType": "struct Multicall2.Call[]",
342
+ "internalType": "struct Multicall3.Call[]",
245
343
  "name": "calls",
246
344
  "type": "tuple[]"
247
345
  }
@@ -261,12 +359,12 @@
261
359
  "type": "bytes"
262
360
  }
263
361
  ],
264
- "internalType": "struct Multicall2.Result[]",
362
+ "internalType": "struct Multicall3.Result[]",
265
363
  "name": "returnData",
266
364
  "type": "tuple[]"
267
365
  }
268
366
  ],
269
- "stateMutability": "nonpayable",
367
+ "stateMutability": "payable",
270
368
  "type": "function"
271
369
  },
272
370
  {
@@ -289,7 +387,7 @@
289
387
  "type": "bytes"
290
388
  }
291
389
  ],
292
- "internalType": "struct Multicall2.Call[]",
390
+ "internalType": "struct Multicall3.Call[]",
293
391
  "name": "calls",
294
392
  "type": "tuple[]"
295
393
  }
@@ -319,15 +417,13 @@
319
417
  "type": "bytes"
320
418
  }
321
419
  ],
322
- "internalType": "struct Multicall2.Result[]",
420
+ "internalType": "struct Multicall3.Result[]",
323
421
  "name": "returnData",
324
422
  "type": "tuple[]"
325
423
  }
326
424
  ],
327
- "stateMutability": "nonpayable",
425
+ "stateMutability": "payable",
328
426
  "type": "function"
329
427
  }
330
- ],
331
- "linkReferences": {},
332
- "deployedLinkReferences": {}
428
+ ]
333
429
  }