@marko00/routing-finder-mare 1.0.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 (173) hide show
  1. package/.idea/copilot.data.migration.agent.xml +6 -0
  2. package/.idea/copilot.data.migration.ask.xml +6 -0
  3. package/.idea/copilot.data.migration.ask2agent.xml +6 -0
  4. package/.idea/copilot.data.migration.edit.xml +6 -0
  5. package/.idea/modules.xml +8 -0
  6. package/.idea/php.xml +19 -0
  7. package/.idea/ratex-sdk.iml +8 -0
  8. package/.idea/vcs.xml +6 -0
  9. package/LICENSE-MIT +21 -0
  10. package/README.md +209 -0
  11. package/contracts/abi/BalancerHelperAbi.ts +1 -0
  12. package/contracts/abi/CamelotHelperAbi.ts +1 -0
  13. package/contracts/abi/RateXAbi.ts +482 -0
  14. package/contracts/abi/SushiSwapHelperAbi.ts +1 -0
  15. package/contracts/abi/UniswapHelperAbi.ts +1 -0
  16. package/contracts/abi/UniswapV2HelperAbi.ts +1 -0
  17. package/contracts/addresses-arbitrum.ts +8 -0
  18. package/contracts/addresses-mainnet.ts +7 -0
  19. package/contracts/addresses-polkadot.ts +9 -0
  20. package/contracts/addresses-sei.ts +9 -0
  21. package/contracts/rateX/BalancerHelper.ts +13 -0
  22. package/contracts/rateX/CamelotHelper.ts +13 -0
  23. package/contracts/rateX/SushiSwapHelper.ts +13 -0
  24. package/contracts/rateX/UniswapHelper.ts +19 -0
  25. package/contracts/rateX/UniswapV2Helper.ts +19 -0
  26. package/dexes/dexIdsList.ts +9 -0
  27. package/dexes/graph_queries/BalancerV2.ts +150 -0
  28. package/dexes/graph_queries/CamelotV2.ts +202 -0
  29. package/dexes/graph_queries/SushiSwapV2.ts +283 -0
  30. package/dexes/graph_queries/UniswapV2.ts +252 -0
  31. package/dexes/graph_queries/UniswapV3.ts +229 -0
  32. package/dexes/graph_queries/graphQueryFilters.ts +41 -0
  33. package/dexes/graph_queries/x_template.ts +67 -0
  34. package/dexes/pools/Balancer/BalancerState.ts +34 -0
  35. package/dexes/pools/Balancer/BalancerWeightedPool.ts +96 -0
  36. package/dexes/pools/Camelot.ts +164 -0
  37. package/dexes/pools/SushiSwapV2.ts +35 -0
  38. package/dexes/pools/UniswapV2.ts +36 -0
  39. package/dexes/pools/uniswap/UniswapV3.ts +40 -0
  40. package/dexes/pools/uniswap/testUniswapOffchainQuoter.ts +169 -0
  41. package/dexes/pools/uniswap/types.ts +174 -0
  42. package/dexes/pools/uniswap/uniswapOffchainQuoter.ts +173 -0
  43. package/dexes/pools/uniswap/uniswapState.ts +56 -0
  44. package/dexes/pools/uniswap/utils.ts +71 -0
  45. package/dist/contracts/abi/BalancerHelperAbi.d.ts +25 -0
  46. package/dist/contracts/abi/BalancerHelperAbi.js +4 -0
  47. package/dist/contracts/abi/CamelotHelperAbi.d.ts +45 -0
  48. package/dist/contracts/abi/CamelotHelperAbi.js +4 -0
  49. package/dist/contracts/abi/RateXAbi.d.ts +71 -0
  50. package/dist/contracts/abi/RateXAbi.js +485 -0
  51. package/dist/contracts/abi/SushiSwapHelperAbi.d.ts +45 -0
  52. package/dist/contracts/abi/SushiSwapHelperAbi.js +4 -0
  53. package/dist/contracts/abi/UniswapHelperAbi.d.ts +39 -0
  54. package/dist/contracts/abi/UniswapHelperAbi.js +4 -0
  55. package/dist/contracts/abi/UniswapV2HelperAbi.d.ts +45 -0
  56. package/dist/contracts/abi/UniswapV2HelperAbi.js +4 -0
  57. package/dist/contracts/addresses-arbitrum.d.ts +6 -0
  58. package/dist/contracts/addresses-arbitrum.js +10 -0
  59. package/dist/contracts/addresses-mainnet.d.ts +6 -0
  60. package/dist/contracts/addresses-mainnet.js +10 -0
  61. package/dist/contracts/addresses-polkadot.d.ts +6 -0
  62. package/dist/contracts/addresses-polkadot.js +10 -0
  63. package/dist/contracts/addresses-sei.d.ts +6 -0
  64. package/dist/contracts/addresses-sei.js +10 -0
  65. package/dist/contracts/rateX/BalancerHelper.d.ts +26 -0
  66. package/dist/contracts/rateX/BalancerHelper.js +14 -0
  67. package/dist/contracts/rateX/CamelotHelper.d.ts +46 -0
  68. package/dist/contracts/rateX/CamelotHelper.js +14 -0
  69. package/dist/contracts/rateX/SushiSwapHelper.d.ts +46 -0
  70. package/dist/contracts/rateX/SushiSwapHelper.js +14 -0
  71. package/dist/contracts/rateX/UniswapHelper.d.ts +40 -0
  72. package/dist/contracts/rateX/UniswapHelper.js +22 -0
  73. package/dist/contracts/rateX/UniswapV2Helper.d.ts +46 -0
  74. package/dist/contracts/rateX/UniswapV2Helper.js +22 -0
  75. package/dist/dexes/dexIdsList.d.ts +9 -0
  76. package/dist/dexes/dexIdsList.js +12 -0
  77. package/dist/dexes/graph_queries/BalancerV2.d.ts +14 -0
  78. package/dist/dexes/graph_queries/BalancerV2.js +141 -0
  79. package/dist/dexes/graph_queries/CamelotV2.d.ts +14 -0
  80. package/dist/dexes/graph_queries/CamelotV2.js +183 -0
  81. package/dist/dexes/graph_queries/SushiSwapV2.d.ts +14 -0
  82. package/dist/dexes/graph_queries/SushiSwapV2.js +263 -0
  83. package/dist/dexes/graph_queries/UniswapV2.d.ts +14 -0
  84. package/dist/dexes/graph_queries/UniswapV2.js +217 -0
  85. package/dist/dexes/graph_queries/UniswapV3.d.ts +14 -0
  86. package/dist/dexes/graph_queries/UniswapV3.js +198 -0
  87. package/dist/dexes/graph_queries/graphQueryFilters.d.ts +19 -0
  88. package/dist/dexes/graph_queries/graphQueryFilters.js +40 -0
  89. package/dist/dexes/graph_queries/x_template.d.ts +12 -0
  90. package/dist/dexes/graph_queries/x_template.js +57 -0
  91. package/dist/dexes/pools/Balancer/BalancerState.d.ts +6 -0
  92. package/dist/dexes/pools/Balancer/BalancerState.js +32 -0
  93. package/dist/dexes/pools/Balancer/BalancerWeightedPool.d.ts +12 -0
  94. package/dist/dexes/pools/Balancer/BalancerWeightedPool.js +109 -0
  95. package/dist/dexes/pools/Camelot.d.ts +12 -0
  96. package/dist/dexes/pools/Camelot.js +135 -0
  97. package/dist/dexes/pools/SushiSwapV2.d.ts +9 -0
  98. package/dist/dexes/pools/SushiSwapV2.js +34 -0
  99. package/dist/dexes/pools/UniswapV2.d.ts +9 -0
  100. package/dist/dexes/pools/UniswapV2.js +34 -0
  101. package/dist/dexes/pools/uniswap/UniswapV3.d.ts +7 -0
  102. package/dist/dexes/pools/uniswap/UniswapV3.js +36 -0
  103. package/dist/dexes/pools/uniswap/types.d.ts +76 -0
  104. package/dist/dexes/pools/uniswap/types.js +111 -0
  105. package/dist/dexes/pools/uniswap/uniswapOffchainQuoter.d.ts +13 -0
  106. package/dist/dexes/pools/uniswap/uniswapOffchainQuoter.js +121 -0
  107. package/dist/dexes/pools/uniswap/uniswapState.d.ts +14 -0
  108. package/dist/dexes/pools/uniswap/uniswapState.js +51 -0
  109. package/dist/dexes/pools/uniswap/utils.d.ts +3 -0
  110. package/dist/dexes/pools/uniswap/utils.js +41 -0
  111. package/dist/index.d.ts +26 -0
  112. package/dist/index.js +41 -0
  113. package/dist/routes.d.ts +1 -0
  114. package/dist/routes.js +20 -0
  115. package/dist/routing/iterative_spliting/main.d.ts +3 -0
  116. package/dist/routing/iterative_spliting/main.js +104 -0
  117. package/dist/routing/iterative_spliting/multiHopSwap.d.ts +4 -0
  118. package/dist/routing/iterative_spliting/multiHopSwap.js +83 -0
  119. package/dist/routing/main.d.ts +2 -0
  120. package/dist/routing/main.js +22 -0
  121. package/dist/routing/uni_like_algo/algo_config.d.ts +2 -0
  122. package/dist/routing/uni_like_algo/algo_config.js +8 -0
  123. package/dist/routing/uni_like_algo/amount_distribution.d.ts +2 -0
  124. package/dist/routing/uni_like_algo/amount_distribution.js +17 -0
  125. package/dist/routing/uni_like_algo/compute_routes_backtrack.d.ts +3 -0
  126. package/dist/routing/uni_like_algo/compute_routes_backtrack.js +44 -0
  127. package/dist/routing/uni_like_algo/main.d.ts +2 -0
  128. package/dist/routing/uni_like_algo/main.js +49 -0
  129. package/dist/routing/uni_like_algo/routes_quoter.d.ts +21 -0
  130. package/dist/routing/uni_like_algo/routes_quoter.js +53 -0
  131. package/dist/routing/uni_like_algo/swap_finder.d.ts +25 -0
  132. package/dist/routing/uni_like_algo/swap_finder.js +154 -0
  133. package/dist/routing/uni_like_algo/types.d.ts +40 -0
  134. package/dist/routing/uni_like_algo/types.js +12 -0
  135. package/dist/swap/graph_communication.d.ts +5 -0
  136. package/dist/swap/graph_communication.js +187 -0
  137. package/dist/swap/my_local_storage.d.ts +8 -0
  138. package/dist/swap/my_local_storage.js +16 -0
  139. package/dist/utils/addresses.d.ts +24 -0
  140. package/dist/utils/addresses.js +60 -0
  141. package/dist/utils/math/fixed-points.d.ts +14 -0
  142. package/dist/utils/math/fixed-points.js +123 -0
  143. package/dist/utils/math/log-exp.d.ts +5 -0
  144. package/dist/utils/math/log-exp.js +385 -0
  145. package/dist/utils/math/math.d.ts +12 -0
  146. package/dist/utils/math/math.js +50 -0
  147. package/dist/utils/types/types.d.ts +51 -0
  148. package/dist/utils/types/types.js +25 -0
  149. package/dist/utils/utils.d.ts +20 -0
  150. package/dist/utils/utils.js +72 -0
  151. package/images/decenter_logo.png +0 -0
  152. package/index.ts +50 -0
  153. package/package.json +39 -0
  154. package/routes.ts +27 -0
  155. package/routing/iterative_spliting/main.ts +131 -0
  156. package/routing/iterative_spliting/multiHopSwap.ts +98 -0
  157. package/routing/main.ts +22 -0
  158. package/routing/uni_like_algo/algo_config.ts +7 -0
  159. package/routing/uni_like_algo/amount_distribution.ts +16 -0
  160. package/routing/uni_like_algo/compute_routes_backtrack.ts +81 -0
  161. package/routing/uni_like_algo/main.ts +65 -0
  162. package/routing/uni_like_algo/routes_quoter.ts +63 -0
  163. package/routing/uni_like_algo/swap_finder.ts +185 -0
  164. package/routing/uni_like_algo/types.ts +54 -0
  165. package/swap/graph_communication.ts +212 -0
  166. package/swap/my_local_storage.ts +27 -0
  167. package/tsconfig.json +26 -0
  168. package/utils/addresses.ts +64 -0
  169. package/utils/math/fixed-points.ts +88 -0
  170. package/utils/math/log-exp.ts +469 -0
  171. package/utils/math/math.ts +46 -0
  172. package/utils/types/types.ts +100 -0
  173. package/utils/utils.ts +125 -0
@@ -0,0 +1,485 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RateXAbi = void 0;
4
+ exports.RateXAbi = [
5
+ {
6
+ inputs: [
7
+ {
8
+ components: [
9
+ {
10
+ internalType: "uint32",
11
+ name: "dexId",
12
+ type: "uint32",
13
+ },
14
+ {
15
+ internalType: "address",
16
+ name: "dexAddress",
17
+ type: "address",
18
+ },
19
+ ],
20
+ internalType: "struct RateX.DexType[]",
21
+ name: "_initialDexes",
22
+ type: "tuple[]",
23
+ },
24
+ ],
25
+ stateMutability: "nonpayable",
26
+ type: "constructor",
27
+ },
28
+ {
29
+ inputs: [],
30
+ name: "RateX__AmountInDoesNotMatch",
31
+ type: "error",
32
+ },
33
+ {
34
+ inputs: [],
35
+ name: "RateX__AmountLesserThanMinAmount",
36
+ type: "error",
37
+ },
38
+ {
39
+ inputs: [],
40
+ name: "RateX__AmountOutDoesNotMatch",
41
+ type: "error",
42
+ },
43
+ {
44
+ inputs: [],
45
+ name: "RateX__DelegateCallFailed",
46
+ type: "error",
47
+ },
48
+ {
49
+ inputs: [],
50
+ name: "RateX__DexAlreadyExists",
51
+ type: "error",
52
+ },
53
+ {
54
+ inputs: [],
55
+ name: "RateX__DexDoesNotExist",
56
+ type: "error",
57
+ },
58
+ {
59
+ inputs: [],
60
+ name: "RateX__NoRoutes",
61
+ type: "error",
62
+ },
63
+ {
64
+ inputs: [],
65
+ name: "RateX__NotPaused",
66
+ type: "error",
67
+ },
68
+ {
69
+ inputs: [],
70
+ name: "RateX__Paused",
71
+ type: "error",
72
+ },
73
+ {
74
+ inputs: [],
75
+ name: "RateX__ReentrantCall",
76
+ type: "error",
77
+ },
78
+ {
79
+ inputs: [],
80
+ name: "RateX__ZeroAddress",
81
+ type: "error",
82
+ },
83
+ {
84
+ anonymous: false,
85
+ inputs: [
86
+ {
87
+ indexed: false,
88
+ internalType: "uint32",
89
+ name: "dexId",
90
+ type: "uint32",
91
+ },
92
+ {
93
+ indexed: false,
94
+ internalType: "address",
95
+ name: "dexAddress",
96
+ type: "address",
97
+ },
98
+ ],
99
+ name: "DexAdded",
100
+ type: "event",
101
+ },
102
+ {
103
+ anonymous: false,
104
+ inputs: [
105
+ {
106
+ indexed: false,
107
+ internalType: "uint32",
108
+ name: "dexId",
109
+ type: "uint32",
110
+ },
111
+ ],
112
+ name: "DexRemoved",
113
+ type: "event",
114
+ },
115
+ {
116
+ anonymous: false,
117
+ inputs: [
118
+ {
119
+ indexed: false,
120
+ internalType: "uint32",
121
+ name: "dexId",
122
+ type: "uint32",
123
+ },
124
+ {
125
+ indexed: false,
126
+ internalType: "address",
127
+ name: "oldAddress",
128
+ type: "address",
129
+ },
130
+ {
131
+ indexed: false,
132
+ internalType: "address",
133
+ name: "newAddress",
134
+ type: "address",
135
+ },
136
+ ],
137
+ name: "DexReplaced",
138
+ type: "event",
139
+ },
140
+ {
141
+ anonymous: false,
142
+ inputs: [
143
+ {
144
+ indexed: true,
145
+ internalType: "address",
146
+ name: "previousOwner",
147
+ type: "address",
148
+ },
149
+ {
150
+ indexed: true,
151
+ internalType: "address",
152
+ name: "newOwner",
153
+ type: "address",
154
+ },
155
+ ],
156
+ name: "OwnershipTransferStarted",
157
+ type: "event",
158
+ },
159
+ {
160
+ anonymous: false,
161
+ inputs: [
162
+ {
163
+ indexed: true,
164
+ internalType: "address",
165
+ name: "previousOwner",
166
+ type: "address",
167
+ },
168
+ {
169
+ indexed: true,
170
+ internalType: "address",
171
+ name: "newOwner",
172
+ type: "address",
173
+ },
174
+ ],
175
+ name: "OwnershipTransferred",
176
+ type: "event",
177
+ },
178
+ {
179
+ anonymous: false,
180
+ inputs: [],
181
+ name: "Paused",
182
+ type: "event",
183
+ },
184
+ {
185
+ anonymous: false,
186
+ inputs: [
187
+ {
188
+ indexed: false,
189
+ internalType: "address",
190
+ name: "tokenIn",
191
+ type: "address",
192
+ },
193
+ {
194
+ indexed: false,
195
+ internalType: "address",
196
+ name: "tokenOut",
197
+ type: "address",
198
+ },
199
+ {
200
+ indexed: false,
201
+ internalType: "uint256",
202
+ name: "amountIn",
203
+ type: "uint256",
204
+ },
205
+ {
206
+ indexed: false,
207
+ internalType: "uint256",
208
+ name: "amountOut",
209
+ type: "uint256",
210
+ },
211
+ {
212
+ indexed: false,
213
+ internalType: "address",
214
+ name: "recipient",
215
+ type: "address",
216
+ },
217
+ ],
218
+ name: "SwapEvent",
219
+ type: "event",
220
+ },
221
+ {
222
+ anonymous: false,
223
+ inputs: [],
224
+ name: "Unpaused",
225
+ type: "event",
226
+ },
227
+ {
228
+ inputs: [],
229
+ name: "acceptOwnership",
230
+ outputs: [],
231
+ stateMutability: "nonpayable",
232
+ type: "function",
233
+ },
234
+ {
235
+ inputs: [
236
+ {
237
+ components: [
238
+ {
239
+ internalType: "uint32",
240
+ name: "dexId",
241
+ type: "uint32",
242
+ },
243
+ {
244
+ internalType: "address",
245
+ name: "dexAddress",
246
+ type: "address",
247
+ },
248
+ ],
249
+ internalType: "struct RateX.DexType",
250
+ name: "_dex",
251
+ type: "tuple",
252
+ },
253
+ ],
254
+ name: "addDex",
255
+ outputs: [],
256
+ stateMutability: "nonpayable",
257
+ type: "function",
258
+ },
259
+ {
260
+ inputs: [
261
+ {
262
+ internalType: "uint32",
263
+ name: "",
264
+ type: "uint32",
265
+ },
266
+ ],
267
+ name: "dexes",
268
+ outputs: [
269
+ {
270
+ internalType: "address",
271
+ name: "",
272
+ type: "address",
273
+ },
274
+ ],
275
+ stateMutability: "view",
276
+ type: "function",
277
+ },
278
+ {
279
+ inputs: [],
280
+ name: "isPaused",
281
+ outputs: [
282
+ {
283
+ internalType: "bool",
284
+ name: "paused",
285
+ type: "bool",
286
+ },
287
+ ],
288
+ stateMutability: "view",
289
+ type: "function",
290
+ },
291
+ {
292
+ inputs: [],
293
+ name: "owner",
294
+ outputs: [
295
+ {
296
+ internalType: "address",
297
+ name: "",
298
+ type: "address",
299
+ },
300
+ ],
301
+ stateMutability: "view",
302
+ type: "function",
303
+ },
304
+ {
305
+ inputs: [],
306
+ name: "pause",
307
+ outputs: [],
308
+ stateMutability: "nonpayable",
309
+ type: "function",
310
+ },
311
+ {
312
+ inputs: [],
313
+ name: "pendingOwner",
314
+ outputs: [
315
+ {
316
+ internalType: "address",
317
+ name: "",
318
+ type: "address",
319
+ },
320
+ ],
321
+ stateMutability: "view",
322
+ type: "function",
323
+ },
324
+ {
325
+ inputs: [
326
+ {
327
+ internalType: "uint32",
328
+ name: "_dexId",
329
+ type: "uint32",
330
+ },
331
+ ],
332
+ name: "removeDex",
333
+ outputs: [],
334
+ stateMutability: "nonpayable",
335
+ type: "function",
336
+ },
337
+ {
338
+ inputs: [],
339
+ name: "renounceOwnership",
340
+ outputs: [],
341
+ stateMutability: "nonpayable",
342
+ type: "function",
343
+ },
344
+ {
345
+ inputs: [
346
+ {
347
+ components: [
348
+ {
349
+ internalType: "uint32",
350
+ name: "dexId",
351
+ type: "uint32",
352
+ },
353
+ {
354
+ internalType: "address",
355
+ name: "dexAddress",
356
+ type: "address",
357
+ },
358
+ ],
359
+ internalType: "struct RateX.DexType",
360
+ name: "_dex",
361
+ type: "tuple",
362
+ },
363
+ ],
364
+ name: "replaceDex",
365
+ outputs: [],
366
+ stateMutability: "nonpayable",
367
+ type: "function",
368
+ },
369
+ {
370
+ inputs: [
371
+ {
372
+ internalType: "address",
373
+ name: "_token",
374
+ type: "address",
375
+ },
376
+ {
377
+ internalType: "address",
378
+ name: "_recipient",
379
+ type: "address",
380
+ },
381
+ {
382
+ internalType: "uint256",
383
+ name: "_amount",
384
+ type: "uint256",
385
+ },
386
+ ],
387
+ name: "rescueFunds",
388
+ outputs: [],
389
+ stateMutability: "nonpayable",
390
+ type: "function",
391
+ },
392
+ {
393
+ inputs: [
394
+ {
395
+ components: [
396
+ {
397
+ components: [
398
+ {
399
+ internalType: "bytes",
400
+ name: "data",
401
+ type: "bytes",
402
+ },
403
+ {
404
+ internalType: "uint32",
405
+ name: "dexId",
406
+ type: "uint32",
407
+ },
408
+ ],
409
+ internalType: "struct RateX.SwapStep[]",
410
+ name: "swaps",
411
+ type: "tuple[]",
412
+ },
413
+ {
414
+ internalType: "uint256",
415
+ name: "amountIn",
416
+ type: "uint256",
417
+ },
418
+ ],
419
+ internalType: "struct RateX.Route[]",
420
+ name: "_foundRoutes",
421
+ type: "tuple[]",
422
+ },
423
+ {
424
+ internalType: "address",
425
+ name: "_tokenIn",
426
+ type: "address",
427
+ },
428
+ {
429
+ internalType: "address",
430
+ name: "_tokenOut",
431
+ type: "address",
432
+ },
433
+ {
434
+ internalType: "uint256",
435
+ name: "_amountIn",
436
+ type: "uint256",
437
+ },
438
+ {
439
+ internalType: "uint256",
440
+ name: "_quotedAmountWithSlippageProtection",
441
+ type: "uint256",
442
+ },
443
+ {
444
+ internalType: "address",
445
+ name: "_recipient",
446
+ type: "address",
447
+ },
448
+ {
449
+ internalType: "uint256",
450
+ name: "_deadline",
451
+ type: "uint256",
452
+ },
453
+ ],
454
+ name: "swap",
455
+ outputs: [
456
+ {
457
+ internalType: "uint256",
458
+ name: "amountOut",
459
+ type: "uint256",
460
+ },
461
+ ],
462
+ stateMutability: "nonpayable",
463
+ type: "function",
464
+ },
465
+ {
466
+ inputs: [
467
+ {
468
+ internalType: "address",
469
+ name: "newOwner",
470
+ type: "address",
471
+ },
472
+ ],
473
+ name: "transferOwnership",
474
+ outputs: [],
475
+ stateMutability: "nonpayable",
476
+ type: "function",
477
+ },
478
+ {
479
+ inputs: [],
480
+ name: "unpause",
481
+ outputs: [],
482
+ stateMutability: "nonpayable",
483
+ type: "function",
484
+ },
485
+ ];
@@ -0,0 +1,45 @@
1
+ export declare const SushiSwapHelperAbi: {
2
+ inputs: {
3
+ components: ({
4
+ internalType: string;
5
+ name: string;
6
+ type: string;
7
+ components?: undefined;
8
+ } | {
9
+ components: {
10
+ internalType: string;
11
+ name: string;
12
+ type: string;
13
+ }[];
14
+ internalType: string;
15
+ name: string;
16
+ type: string;
17
+ })[];
18
+ internalType: string;
19
+ name: string;
20
+ type: string;
21
+ }[];
22
+ name: string;
23
+ outputs: {
24
+ components: ({
25
+ internalType: string;
26
+ name: string;
27
+ type: string;
28
+ components?: undefined;
29
+ } | {
30
+ components: {
31
+ internalType: string;
32
+ name: string;
33
+ type: string;
34
+ }[];
35
+ internalType: string;
36
+ name: string;
37
+ type: string;
38
+ })[];
39
+ internalType: string;
40
+ name: string;
41
+ type: string;
42
+ }[];
43
+ stateMutability: string;
44
+ type: string;
45
+ }[];
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SushiSwapHelperAbi = void 0;
4
+ exports.SushiSwapHelperAbi = [{ "inputs": [{ "components": [{ "internalType": "address", "name": "poolId", "type": "address" }, { "internalType": "string", "name": "dexId", "type": "string" }, { "components": [{ "internalType": "address", "name": "_address", "type": "address" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }], "internalType": "struct IHelperState.Token[]", "name": "tokens", "type": "tuple[]" }], "internalType": "struct IHelperState.PoolInfo[]", "name": "poolsInfo", "type": "tuple[]" }], "name": "getPoolsData", "outputs": [{ "components": [{ "internalType": "address", "name": "poolId", "type": "address" }, { "internalType": "string", "name": "dexId", "type": "string" }, { "components": [{ "internalType": "address", "name": "_address", "type": "address" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }], "internalType": "struct IHelperState.Token[]", "name": "tokens", "type": "tuple[]" }, { "internalType": "uint256[]", "name": "reserves", "type": "uint256[]" }], "internalType": "struct SushiSwapHelper.SushiSwapV2Pool[]", "name": "pools", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }];
@@ -0,0 +1,39 @@
1
+ export declare const UniswapHelperAbi: ({
2
+ inputs: {
3
+ internalType: string;
4
+ name: string;
5
+ type: string;
6
+ }[];
7
+ name: string;
8
+ outputs: {
9
+ internalType: string;
10
+ name: string;
11
+ type: string;
12
+ }[];
13
+ stateMutability: string;
14
+ type: string;
15
+ } | {
16
+ inputs: {
17
+ internalType: string;
18
+ name: string;
19
+ type: string;
20
+ }[];
21
+ name: string;
22
+ outputs: {
23
+ components: {
24
+ components: {
25
+ internalType: string;
26
+ name: string;
27
+ type: string;
28
+ }[];
29
+ internalType: string;
30
+ name: string;
31
+ type: string;
32
+ }[];
33
+ internalType: string;
34
+ name: string;
35
+ type: string;
36
+ }[];
37
+ stateMutability: string;
38
+ type: string;
39
+ })[];
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UniswapHelperAbi = void 0;
4
+ exports.UniswapHelperAbi = [{ "inputs": [{ "internalType": "address", "name": "_pool", "type": "address" }, { "internalType": "address", "name": "_tokenIn", "type": "address" }, { "internalType": "address", "name": "_tokenOut", "type": "address" }, { "internalType": "uint256", "name": "_amountIn", "type": "uint256" }], "name": "estimateAmountOut", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address[]", "name": "_pools", "type": "address[]" }, { "internalType": "uint256", "name": "_numOfTicks", "type": "uint256" }], "name": "fetchData", "outputs": [{ "components": [{ "components": [{ "internalType": "address", "name": "pool", "type": "address" }, { "internalType": "address", "name": "token0", "type": "address" }, { "internalType": "address", "name": "token1", "type": "address" }, { "internalType": "int24", "name": "tick", "type": "int24" }, { "internalType": "int128", "name": "tickLiquidityNet", "type": "int128" }, { "internalType": "int24", "name": "tickSpacing", "type": "int24" }, { "internalType": "uint24", "name": "fee", "type": "uint24" }, { "internalType": "uint160", "name": "sqrtPriceX96", "type": "uint160" }, { "internalType": "uint128", "name": "liquidity", "type": "uint128" }], "internalType": "struct IUniswapState.PoolInfo", "name": "info", "type": "tuple" }, { "components": [{ "internalType": "int24", "name": "tick", "type": "int24" }, { "internalType": "bool", "name": "initialized", "type": "bool" }, { "internalType": "int128", "name": "liquidityNet", "type": "int128" }], "internalType": "struct IUniswapState.TickData[]", "name": "zeroForOneTicks", "type": "tuple[]" }, { "components": [{ "internalType": "int24", "name": "tick", "type": "int24" }, { "internalType": "bool", "name": "initialized", "type": "bool" }, { "internalType": "int128", "name": "liquidityNet", "type": "int128" }], "internalType": "struct IUniswapState.TickData[]", "name": "oneForZeroTicks", "type": "tuple[]" }], "internalType": "struct IUniswapState.PoolData[]", "name": "poolData", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_pool", "type": "address" }, { "internalType": "uint256", "name": "_numOfTicks", "type": "uint256" }], "name": "fetchPoolData", "outputs": [{ "components": [{ "components": [{ "internalType": "address", "name": "pool", "type": "address" }, { "internalType": "address", "name": "token0", "type": "address" }, { "internalType": "address", "name": "token1", "type": "address" }, { "internalType": "int24", "name": "tick", "type": "int24" }, { "internalType": "int128", "name": "tickLiquidityNet", "type": "int128" }, { "internalType": "int24", "name": "tickSpacing", "type": "int24" }, { "internalType": "uint24", "name": "fee", "type": "uint24" }, { "internalType": "uint160", "name": "sqrtPriceX96", "type": "uint160" }, { "internalType": "uint128", "name": "liquidity", "type": "uint128" }], "internalType": "struct IUniswapState.PoolInfo", "name": "info", "type": "tuple" }, { "components": [{ "internalType": "int24", "name": "tick", "type": "int24" }, { "internalType": "bool", "name": "initialized", "type": "bool" }, { "internalType": "int128", "name": "liquidityNet", "type": "int128" }], "internalType": "struct IUniswapState.TickData[]", "name": "zeroForOneTicks", "type": "tuple[]" }, { "components": [{ "internalType": "int24", "name": "tick", "type": "int24" }, { "internalType": "bool", "name": "initialized", "type": "bool" }, { "internalType": "int128", "name": "liquidityNet", "type": "int128" }], "internalType": "struct IUniswapState.TickData[]", "name": "oneForZeroTicks", "type": "tuple[]" }], "internalType": "struct IUniswapState.PoolData", "name": "", "type": "tuple" }], "stateMutability": "view", "type": "function" }];
@@ -0,0 +1,45 @@
1
+ export declare const UniswapV2HelperAbi: {
2
+ inputs: {
3
+ components: ({
4
+ internalType: string;
5
+ name: string;
6
+ type: string;
7
+ components?: undefined;
8
+ } | {
9
+ components: {
10
+ internalType: string;
11
+ name: string;
12
+ type: string;
13
+ }[];
14
+ internalType: string;
15
+ name: string;
16
+ type: string;
17
+ })[];
18
+ internalType: string;
19
+ name: string;
20
+ type: string;
21
+ }[];
22
+ name: string;
23
+ outputs: {
24
+ components: ({
25
+ internalType: string;
26
+ name: string;
27
+ type: string;
28
+ components?: undefined;
29
+ } | {
30
+ components: {
31
+ internalType: string;
32
+ name: string;
33
+ type: string;
34
+ }[];
35
+ internalType: string;
36
+ name: string;
37
+ type: string;
38
+ })[];
39
+ internalType: string;
40
+ name: string;
41
+ type: string;
42
+ }[];
43
+ stateMutability: string;
44
+ type: string;
45
+ }[];
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UniswapV2HelperAbi = void 0;
4
+ exports.UniswapV2HelperAbi = [{ "inputs": [{ "components": [{ "internalType": "address", "name": "poolId", "type": "address" }, { "internalType": "string", "name": "dexId", "type": "string" }, { "components": [{ "internalType": "address", "name": "_address", "type": "address" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }], "internalType": "struct IHelperState.Token[]", "name": "tokens", "type": "tuple[]" }], "internalType": "struct IHelperState.PoolInfo[]", "name": "poolsInfo", "type": "tuple[]" }], "name": "getPoolsData", "outputs": [{ "components": [{ "internalType": "address", "name": "poolId", "type": "address" }, { "internalType": "string", "name": "dexId", "type": "string" }, { "components": [{ "internalType": "address", "name": "_address", "type": "address" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }], "internalType": "struct IHelperState.Token[]", "name": "tokens", "type": "tuple[]" }, { "internalType": "uint256[]", "name": "reserves", "type": "uint256[]" }], "internalType": "struct UniswapV2Helper.UniswapV2Pool[]", "name": "pools", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }];
@@ -0,0 +1,6 @@
1
+ export declare const RATE_X_ADDRESS = "0x1D3ac829f8b0056972491095342730710e956629";
2
+ export declare const UNISWAP_HELPER_ADDRESS = "0xBf70F85011047C4cF31696780BdB6db752527d7c";
3
+ export declare const SUSHISWAP_HELPER_ADDRESS = "0x141fc598Ed85a23e78f2b58ABe95AC013d196249";
4
+ export declare const CAMELOT_HELPER_ADDRESS = "0x91DE0353a4f93BD460dE3a373Feb50c53571c078";
5
+ export declare const BALANCER_HELPER_ADDRESS = "0xd1dFeDe71160a0a1e869e2D3F428A47531726BfE";
6
+ export declare const UNISWAP_V2_HELPER_ADDRESS = "0x24725a85903e83A4829F51287B8E0BD321121DbC";
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UNISWAP_V2_HELPER_ADDRESS = exports.BALANCER_HELPER_ADDRESS = exports.CAMELOT_HELPER_ADDRESS = exports.SUSHISWAP_HELPER_ADDRESS = exports.UNISWAP_HELPER_ADDRESS = exports.RATE_X_ADDRESS = void 0;
4
+ // chainId: 42161
5
+ exports.RATE_X_ADDRESS = "0x1D3ac829f8b0056972491095342730710e956629";
6
+ exports.UNISWAP_HELPER_ADDRESS = "0xBf70F85011047C4cF31696780BdB6db752527d7c";
7
+ exports.SUSHISWAP_HELPER_ADDRESS = "0x141fc598Ed85a23e78f2b58ABe95AC013d196249";
8
+ exports.CAMELOT_HELPER_ADDRESS = "0x91DE0353a4f93BD460dE3a373Feb50c53571c078";
9
+ exports.BALANCER_HELPER_ADDRESS = "0xd1dFeDe71160a0a1e869e2D3F428A47531726BfE";
10
+ exports.UNISWAP_V2_HELPER_ADDRESS = "0x24725a85903e83A4829F51287B8E0BD321121DbC";
@@ -0,0 +1,6 @@
1
+ export declare const RATE_X_ADDRESS = "0xAC64cF5B37124e62Ad716e664faF711Bd0882056";
2
+ export declare const UNISWAP_HELPER_ADDRESS = "0xBFA0CAC4e1FC4958Ef24732F5b1e063637D20704";
3
+ export declare const SUSHISWAP_HELPER_ADDRESS = "0xAc62F8Ff99B1fEa563Cf8d47Ce1B9fE76F3AC5b8";
4
+ export declare const CAMELOT_HELPER_ADDRESS = "Does not exist on mainnet";
5
+ export declare const BALANCER_HELPER_ADDRESS = "0xf77f3E6ed19DAFe90f90c3C1609207902C7414f9";
6
+ export declare const UNISWAP_V2_HELPER_ADDRESS = "0x043EEB82faC75641146955Fea5509C824b2AD22A";
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UNISWAP_V2_HELPER_ADDRESS = exports.BALANCER_HELPER_ADDRESS = exports.CAMELOT_HELPER_ADDRESS = exports.SUSHISWAP_HELPER_ADDRESS = exports.UNISWAP_HELPER_ADDRESS = exports.RATE_X_ADDRESS = void 0;
4
+ // chainId: 1
5
+ exports.RATE_X_ADDRESS = "0xAC64cF5B37124e62Ad716e664faF711Bd0882056";
6
+ exports.UNISWAP_HELPER_ADDRESS = "0xBFA0CAC4e1FC4958Ef24732F5b1e063637D20704";
7
+ exports.SUSHISWAP_HELPER_ADDRESS = "0xAc62F8Ff99B1fEa563Cf8d47Ce1B9fE76F3AC5b8";
8
+ exports.CAMELOT_HELPER_ADDRESS = "Does not exist on mainnet";
9
+ exports.BALANCER_HELPER_ADDRESS = "0xf77f3E6ed19DAFe90f90c3C1609207902C7414f9";
10
+ exports.UNISWAP_V2_HELPER_ADDRESS = "0x043EEB82faC75641146955Fea5509C824b2AD22A";