@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,560 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "YieldToken",
4
+ "sourceName": "contracts/tokens/YieldToken.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "string",
10
+ "name": "_name",
11
+ "type": "string"
12
+ },
13
+ {
14
+ "internalType": "string",
15
+ "name": "_symbol",
16
+ "type": "string"
17
+ },
18
+ {
19
+ "internalType": "uint256",
20
+ "name": "_initialSupply",
21
+ "type": "uint256"
22
+ }
23
+ ],
24
+ "stateMutability": "nonpayable",
25
+ "type": "constructor"
26
+ },
27
+ {
28
+ "anonymous": false,
29
+ "inputs": [
30
+ {
31
+ "indexed": true,
32
+ "internalType": "address",
33
+ "name": "owner",
34
+ "type": "address"
35
+ },
36
+ {
37
+ "indexed": true,
38
+ "internalType": "address",
39
+ "name": "spender",
40
+ "type": "address"
41
+ },
42
+ {
43
+ "indexed": false,
44
+ "internalType": "uint256",
45
+ "name": "value",
46
+ "type": "uint256"
47
+ }
48
+ ],
49
+ "name": "Approval",
50
+ "type": "event"
51
+ },
52
+ {
53
+ "anonymous": false,
54
+ "inputs": [
55
+ {
56
+ "indexed": true,
57
+ "internalType": "address",
58
+ "name": "from",
59
+ "type": "address"
60
+ },
61
+ {
62
+ "indexed": true,
63
+ "internalType": "address",
64
+ "name": "to",
65
+ "type": "address"
66
+ },
67
+ {
68
+ "indexed": false,
69
+ "internalType": "uint256",
70
+ "name": "value",
71
+ "type": "uint256"
72
+ }
73
+ ],
74
+ "name": "Transfer",
75
+ "type": "event"
76
+ },
77
+ {
78
+ "inputs": [
79
+ {
80
+ "internalType": "address",
81
+ "name": "_account",
82
+ "type": "address"
83
+ }
84
+ ],
85
+ "name": "addAdmin",
86
+ "outputs": [],
87
+ "stateMutability": "nonpayable",
88
+ "type": "function"
89
+ },
90
+ {
91
+ "inputs": [
92
+ {
93
+ "internalType": "address",
94
+ "name": "_account",
95
+ "type": "address"
96
+ }
97
+ ],
98
+ "name": "addNonStakingAccount",
99
+ "outputs": [],
100
+ "stateMutability": "nonpayable",
101
+ "type": "function"
102
+ },
103
+ {
104
+ "inputs": [
105
+ {
106
+ "internalType": "address",
107
+ "name": "",
108
+ "type": "address"
109
+ }
110
+ ],
111
+ "name": "admins",
112
+ "outputs": [
113
+ {
114
+ "internalType": "bool",
115
+ "name": "",
116
+ "type": "bool"
117
+ }
118
+ ],
119
+ "stateMutability": "view",
120
+ "type": "function"
121
+ },
122
+ {
123
+ "inputs": [
124
+ {
125
+ "internalType": "address",
126
+ "name": "_owner",
127
+ "type": "address"
128
+ },
129
+ {
130
+ "internalType": "address",
131
+ "name": "_spender",
132
+ "type": "address"
133
+ }
134
+ ],
135
+ "name": "allowance",
136
+ "outputs": [
137
+ {
138
+ "internalType": "uint256",
139
+ "name": "",
140
+ "type": "uint256"
141
+ }
142
+ ],
143
+ "stateMutability": "view",
144
+ "type": "function"
145
+ },
146
+ {
147
+ "inputs": [
148
+ {
149
+ "internalType": "address",
150
+ "name": "",
151
+ "type": "address"
152
+ },
153
+ {
154
+ "internalType": "address",
155
+ "name": "",
156
+ "type": "address"
157
+ }
158
+ ],
159
+ "name": "allowances",
160
+ "outputs": [
161
+ {
162
+ "internalType": "uint256",
163
+ "name": "",
164
+ "type": "uint256"
165
+ }
166
+ ],
167
+ "stateMutability": "view",
168
+ "type": "function"
169
+ },
170
+ {
171
+ "inputs": [
172
+ {
173
+ "internalType": "address",
174
+ "name": "_spender",
175
+ "type": "address"
176
+ },
177
+ {
178
+ "internalType": "uint256",
179
+ "name": "_amount",
180
+ "type": "uint256"
181
+ }
182
+ ],
183
+ "name": "approve",
184
+ "outputs": [
185
+ {
186
+ "internalType": "bool",
187
+ "name": "",
188
+ "type": "bool"
189
+ }
190
+ ],
191
+ "stateMutability": "nonpayable",
192
+ "type": "function"
193
+ },
194
+ {
195
+ "inputs": [
196
+ {
197
+ "internalType": "address",
198
+ "name": "_account",
199
+ "type": "address"
200
+ }
201
+ ],
202
+ "name": "balanceOf",
203
+ "outputs": [
204
+ {
205
+ "internalType": "uint256",
206
+ "name": "",
207
+ "type": "uint256"
208
+ }
209
+ ],
210
+ "stateMutability": "view",
211
+ "type": "function"
212
+ },
213
+ {
214
+ "inputs": [
215
+ {
216
+ "internalType": "address",
217
+ "name": "",
218
+ "type": "address"
219
+ }
220
+ ],
221
+ "name": "balances",
222
+ "outputs": [
223
+ {
224
+ "internalType": "uint256",
225
+ "name": "",
226
+ "type": "uint256"
227
+ }
228
+ ],
229
+ "stateMutability": "view",
230
+ "type": "function"
231
+ },
232
+ {
233
+ "inputs": [
234
+ {
235
+ "internalType": "address",
236
+ "name": "_receiver",
237
+ "type": "address"
238
+ }
239
+ ],
240
+ "name": "claim",
241
+ "outputs": [],
242
+ "stateMutability": "nonpayable",
243
+ "type": "function"
244
+ },
245
+ {
246
+ "inputs": [],
247
+ "name": "decimals",
248
+ "outputs": [
249
+ {
250
+ "internalType": "uint8",
251
+ "name": "",
252
+ "type": "uint8"
253
+ }
254
+ ],
255
+ "stateMutability": "view",
256
+ "type": "function"
257
+ },
258
+ {
259
+ "inputs": [],
260
+ "name": "gov",
261
+ "outputs": [
262
+ {
263
+ "internalType": "address",
264
+ "name": "",
265
+ "type": "address"
266
+ }
267
+ ],
268
+ "stateMutability": "view",
269
+ "type": "function"
270
+ },
271
+ {
272
+ "inputs": [],
273
+ "name": "name",
274
+ "outputs": [
275
+ {
276
+ "internalType": "string",
277
+ "name": "",
278
+ "type": "string"
279
+ }
280
+ ],
281
+ "stateMutability": "view",
282
+ "type": "function"
283
+ },
284
+ {
285
+ "inputs": [
286
+ {
287
+ "internalType": "address",
288
+ "name": "",
289
+ "type": "address"
290
+ }
291
+ ],
292
+ "name": "nonStakingAccounts",
293
+ "outputs": [
294
+ {
295
+ "internalType": "bool",
296
+ "name": "",
297
+ "type": "bool"
298
+ }
299
+ ],
300
+ "stateMutability": "view",
301
+ "type": "function"
302
+ },
303
+ {
304
+ "inputs": [],
305
+ "name": "nonStakingSupply",
306
+ "outputs": [
307
+ {
308
+ "internalType": "uint256",
309
+ "name": "",
310
+ "type": "uint256"
311
+ }
312
+ ],
313
+ "stateMutability": "view",
314
+ "type": "function"
315
+ },
316
+ {
317
+ "inputs": [
318
+ {
319
+ "internalType": "address",
320
+ "name": "_account",
321
+ "type": "address"
322
+ },
323
+ {
324
+ "internalType": "address",
325
+ "name": "_receiver",
326
+ "type": "address"
327
+ }
328
+ ],
329
+ "name": "recoverClaim",
330
+ "outputs": [],
331
+ "stateMutability": "nonpayable",
332
+ "type": "function"
333
+ },
334
+ {
335
+ "inputs": [
336
+ {
337
+ "internalType": "address",
338
+ "name": "_account",
339
+ "type": "address"
340
+ }
341
+ ],
342
+ "name": "removeAdmin",
343
+ "outputs": [],
344
+ "stateMutability": "nonpayable",
345
+ "type": "function"
346
+ },
347
+ {
348
+ "inputs": [
349
+ {
350
+ "internalType": "address",
351
+ "name": "_account",
352
+ "type": "address"
353
+ }
354
+ ],
355
+ "name": "removeNonStakingAccount",
356
+ "outputs": [],
357
+ "stateMutability": "nonpayable",
358
+ "type": "function"
359
+ },
360
+ {
361
+ "inputs": [
362
+ {
363
+ "internalType": "address",
364
+ "name": "_gov",
365
+ "type": "address"
366
+ }
367
+ ],
368
+ "name": "setGov",
369
+ "outputs": [],
370
+ "stateMutability": "nonpayable",
371
+ "type": "function"
372
+ },
373
+ {
374
+ "inputs": [
375
+ {
376
+ "internalType": "string",
377
+ "name": "_name",
378
+ "type": "string"
379
+ },
380
+ {
381
+ "internalType": "string",
382
+ "name": "_symbol",
383
+ "type": "string"
384
+ }
385
+ ],
386
+ "name": "setInfo",
387
+ "outputs": [],
388
+ "stateMutability": "nonpayable",
389
+ "type": "function"
390
+ },
391
+ {
392
+ "inputs": [
393
+ {
394
+ "internalType": "address[]",
395
+ "name": "_yieldTrackers",
396
+ "type": "address[]"
397
+ }
398
+ ],
399
+ "name": "setYieldTrackers",
400
+ "outputs": [],
401
+ "stateMutability": "nonpayable",
402
+ "type": "function"
403
+ },
404
+ {
405
+ "inputs": [
406
+ {
407
+ "internalType": "address",
408
+ "name": "_account",
409
+ "type": "address"
410
+ }
411
+ ],
412
+ "name": "stakedBalance",
413
+ "outputs": [
414
+ {
415
+ "internalType": "uint256",
416
+ "name": "",
417
+ "type": "uint256"
418
+ }
419
+ ],
420
+ "stateMutability": "view",
421
+ "type": "function"
422
+ },
423
+ {
424
+ "inputs": [],
425
+ "name": "symbol",
426
+ "outputs": [
427
+ {
428
+ "internalType": "string",
429
+ "name": "",
430
+ "type": "string"
431
+ }
432
+ ],
433
+ "stateMutability": "view",
434
+ "type": "function"
435
+ },
436
+ {
437
+ "inputs": [],
438
+ "name": "totalStaked",
439
+ "outputs": [
440
+ {
441
+ "internalType": "uint256",
442
+ "name": "",
443
+ "type": "uint256"
444
+ }
445
+ ],
446
+ "stateMutability": "view",
447
+ "type": "function"
448
+ },
449
+ {
450
+ "inputs": [],
451
+ "name": "totalSupply",
452
+ "outputs": [
453
+ {
454
+ "internalType": "uint256",
455
+ "name": "",
456
+ "type": "uint256"
457
+ }
458
+ ],
459
+ "stateMutability": "view",
460
+ "type": "function"
461
+ },
462
+ {
463
+ "inputs": [
464
+ {
465
+ "internalType": "address",
466
+ "name": "_recipient",
467
+ "type": "address"
468
+ },
469
+ {
470
+ "internalType": "uint256",
471
+ "name": "_amount",
472
+ "type": "uint256"
473
+ }
474
+ ],
475
+ "name": "transfer",
476
+ "outputs": [
477
+ {
478
+ "internalType": "bool",
479
+ "name": "",
480
+ "type": "bool"
481
+ }
482
+ ],
483
+ "stateMutability": "nonpayable",
484
+ "type": "function"
485
+ },
486
+ {
487
+ "inputs": [
488
+ {
489
+ "internalType": "address",
490
+ "name": "_sender",
491
+ "type": "address"
492
+ },
493
+ {
494
+ "internalType": "address",
495
+ "name": "_recipient",
496
+ "type": "address"
497
+ },
498
+ {
499
+ "internalType": "uint256",
500
+ "name": "_amount",
501
+ "type": "uint256"
502
+ }
503
+ ],
504
+ "name": "transferFrom",
505
+ "outputs": [
506
+ {
507
+ "internalType": "bool",
508
+ "name": "",
509
+ "type": "bool"
510
+ }
511
+ ],
512
+ "stateMutability": "nonpayable",
513
+ "type": "function"
514
+ },
515
+ {
516
+ "inputs": [
517
+ {
518
+ "internalType": "address",
519
+ "name": "_token",
520
+ "type": "address"
521
+ },
522
+ {
523
+ "internalType": "address",
524
+ "name": "_account",
525
+ "type": "address"
526
+ },
527
+ {
528
+ "internalType": "uint256",
529
+ "name": "_amount",
530
+ "type": "uint256"
531
+ }
532
+ ],
533
+ "name": "withdrawToken",
534
+ "outputs": [],
535
+ "stateMutability": "nonpayable",
536
+ "type": "function"
537
+ },
538
+ {
539
+ "inputs": [
540
+ {
541
+ "internalType": "uint256",
542
+ "name": "",
543
+ "type": "uint256"
544
+ }
545
+ ],
546
+ "name": "yieldTrackers",
547
+ "outputs": [
548
+ {
549
+ "internalType": "address",
550
+ "name": "",
551
+ "type": "address"
552
+ }
553
+ ],
554
+ "stateMutability": "view",
555
+ "type": "function"
556
+ }
557
+ ],
558
+ "linkReferences": {},
559
+ "deployedLinkReferences": {}
560
+ }
@@ -0,0 +1,6 @@
1
+ import { ClientConfig } from "viem";
2
+ import type { BatchOptions } from "viem/_types/clients/transports/http";
3
+ export declare const BATCH_CONFIGS: Record<number, {
4
+ http: BatchOptions;
5
+ client: ClientConfig["batch"];
6
+ }>;
@@ -0,0 +1,51 @@
1
+ import { ARBITRUM, ARBITRUM_GOERLI, AVALANCHE, AVALANCHE_FUJI } from "./chains";
2
+ export const BATCH_CONFIGS = {
3
+ [ARBITRUM]: {
4
+ http: {
5
+ batchSize: 0, // disable batches, here batchSize is the number of eth_calls in a batch
6
+ wait: 0, // keep this setting in case batches are enabled in future
7
+ },
8
+ client: {
9
+ multicall: {
10
+ batchSize: 1024 * 1024, // here batchSize is the number of bytes in a multicall
11
+ wait: 0, // zero delay means formation of a batch in the current macro-task, like setTimeout(fn, 0)
12
+ },
13
+ },
14
+ },
15
+ [AVALANCHE]: {
16
+ http: {
17
+ batchSize: 0,
18
+ wait: 0,
19
+ },
20
+ client: {
21
+ multicall: {
22
+ batchSize: 1024 * 1024,
23
+ wait: 0,
24
+ },
25
+ },
26
+ },
27
+ [AVALANCHE_FUJI]: {
28
+ http: {
29
+ batchSize: 40,
30
+ wait: 0,
31
+ },
32
+ client: {
33
+ multicall: {
34
+ batchSize: 1024 * 1024,
35
+ wait: 0,
36
+ },
37
+ },
38
+ },
39
+ [ARBITRUM_GOERLI]: {
40
+ http: {
41
+ batchSize: 0,
42
+ wait: 0,
43
+ },
44
+ client: {
45
+ multicall: {
46
+ batchSize: 1024 * 1024,
47
+ wait: 0,
48
+ },
49
+ },
50
+ },
51
+ };
@@ -0,0 +1,37 @@
1
+ import { Chain } from "viem/chains";
2
+ export declare const AVALANCHE = 43114;
3
+ export declare const AVALANCHE_FUJI = 43113;
4
+ export declare const ARBITRUM = 42161;
5
+ export declare const ARBITRUM_GOERLI = 421613;
6
+ export declare const SUPPORTED_CHAIN_IDS: number[];
7
+ export declare const HIGH_EXECUTION_FEES_MAP: {
8
+ 42161: number;
9
+ 43114: number;
10
+ 43113: number;
11
+ };
12
+ export declare const MAX_FEE_PER_GAS_MAP: {
13
+ 43114: bigint;
14
+ };
15
+ export declare const GAS_PRICE_PREMIUM_MAP: {
16
+ 42161: bigint;
17
+ 43114: bigint;
18
+ };
19
+ export declare const MAX_PRIORITY_FEE_PER_GAS_MAP: Record<number, bigint | undefined>;
20
+ export declare const EXCESSIVE_EXECUTION_FEES_MAP: {
21
+ 42161: number;
22
+ 43114: number;
23
+ 43113: number;
24
+ };
25
+ export declare const GAS_PRICE_BUFFER_MAP: {
26
+ 42161: bigint;
27
+ };
28
+ export declare const getChain: (chainId: number) => Chain;
29
+ export declare function getHighExecutionFee(chainId: any): any;
30
+ export declare function getExcessiveExecutionFee(chainId: any): any;
31
+ export declare function isSupportedChain(chainId: number): boolean;
32
+ export declare const EXECUTION_FEE_CONFIG_V2: {
33
+ [chainId: number]: {
34
+ shouldUseMaxPriorityFeePerGas: boolean;
35
+ defaultBufferBps?: number;
36
+ };
37
+ };