@dhedge/v2-sdk 2.1.4 → 2.1.6

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 (41) hide show
  1. package/README.md +180 -45
  2. package/dist/config.d.ts +10 -0
  3. package/dist/entities/pool.d.ts +110 -1
  4. package/dist/services/hyperliquid/constants.d.ts +16 -0
  5. package/dist/services/hyperliquid/index.d.ts +6 -0
  6. package/dist/services/hyperliquid/marketData.d.ts +12 -0
  7. package/dist/services/hyperliquid/positionData.d.ts +1 -0
  8. package/dist/services/odos/index.d.ts +15 -1
  9. package/dist/services/toros/limitOrder.d.ts +8 -0
  10. package/dist/test/constants.d.ts +7 -0
  11. package/dist/test/wallet.d.ts +1 -0
  12. package/dist/types.d.ts +12 -2
  13. package/dist/v2-sdk.cjs.development.js +4256 -1335
  14. package/dist/v2-sdk.cjs.development.js.map +1 -1
  15. package/dist/v2-sdk.cjs.production.min.js +1 -1
  16. package/dist/v2-sdk.cjs.production.min.js.map +1 -1
  17. package/dist/v2-sdk.esm.js +5007 -2087
  18. package/dist/v2-sdk.esm.js.map +1 -1
  19. package/package.json +3 -2
  20. package/src/abi/hyperliquid/ICoreDepositWallet.json +130 -0
  21. package/src/abi/hyperliquid/ICoreWriter.json +1 -0
  22. package/src/abi/odos/OdosRouterV3.json +1351 -0
  23. package/src/abi/toros/IPoolLimitOrderManager.json +78 -0
  24. package/src/config.ts +44 -13
  25. package/src/entities/pool.ts +348 -4
  26. package/src/services/hyperliquid/constants.ts +23 -0
  27. package/src/services/hyperliquid/index.ts +176 -0
  28. package/src/services/hyperliquid/marketData.ts +157 -0
  29. package/src/services/hyperliquid/positionData.ts +33 -0
  30. package/src/services/odos/index.ts +97 -13
  31. package/src/services/toros/completeWithdrawal.ts +1 -1
  32. package/src/services/toros/initWithdrawal.ts +1 -1
  33. package/src/services/toros/limitOrder.ts +86 -0
  34. package/src/services/toros/swapData.ts +83 -12
  35. package/src/test/constants.ts +10 -3
  36. package/src/test/hyperliquid.test.ts +107 -0
  37. package/src/test/odos.test.ts +43 -12
  38. package/src/test/pool.test.ts +37 -45
  39. package/src/test/torosLimitOrder.test.ts +130 -0
  40. package/src/test/wallet.ts +2 -1
  41. package/src/types.ts +13 -2
@@ -0,0 +1,1351 @@
1
+ {
2
+ "abi": [
3
+ {
4
+ "inputs": [
5
+ {
6
+ "internalType": "address",
7
+ "name": "owner",
8
+ "type": "address"
9
+ }
10
+ ],
11
+ "stateMutability": "nonpayable",
12
+ "type": "constructor"
13
+ },
14
+ {
15
+ "inputs": [
16
+ {
17
+ "internalType": "address",
18
+ "name": "owner",
19
+ "type": "address"
20
+ }
21
+ ],
22
+ "name": "OwnableInvalidOwner",
23
+ "type": "error"
24
+ },
25
+ {
26
+ "inputs": [
27
+ {
28
+ "internalType": "address",
29
+ "name": "account",
30
+ "type": "address"
31
+ }
32
+ ],
33
+ "name": "OwnableUnauthorizedAccount",
34
+ "type": "error"
35
+ },
36
+ {
37
+ "inputs": [
38
+ {
39
+ "internalType": "address",
40
+ "name": "token",
41
+ "type": "address"
42
+ }
43
+ ],
44
+ "name": "SafeERC20FailedOperation",
45
+ "type": "error"
46
+ },
47
+ {
48
+ "anonymous": false,
49
+ "inputs": [
50
+ {
51
+ "indexed": true,
52
+ "internalType": "address",
53
+ "name": "account",
54
+ "type": "address"
55
+ }
56
+ ],
57
+ "name": "LiquidatorAddressChanged",
58
+ "type": "event"
59
+ },
60
+ {
61
+ "anonymous": false,
62
+ "inputs": [
63
+ {
64
+ "indexed": true,
65
+ "internalType": "address",
66
+ "name": "previousOwner",
67
+ "type": "address"
68
+ },
69
+ {
70
+ "indexed": true,
71
+ "internalType": "address",
72
+ "name": "newOwner",
73
+ "type": "address"
74
+ }
75
+ ],
76
+ "name": "OwnershipTransferStarted",
77
+ "type": "event"
78
+ },
79
+ {
80
+ "anonymous": false,
81
+ "inputs": [
82
+ {
83
+ "indexed": true,
84
+ "internalType": "address",
85
+ "name": "previousOwner",
86
+ "type": "address"
87
+ },
88
+ {
89
+ "indexed": true,
90
+ "internalType": "address",
91
+ "name": "newOwner",
92
+ "type": "address"
93
+ }
94
+ ],
95
+ "name": "OwnershipTransferred",
96
+ "type": "event"
97
+ },
98
+ {
99
+ "anonymous": false,
100
+ "inputs": [
101
+ {
102
+ "indexed": false,
103
+ "internalType": "address",
104
+ "name": "sender",
105
+ "type": "address"
106
+ },
107
+ {
108
+ "indexed": false,
109
+ "internalType": "uint256",
110
+ "name": "inputAmount",
111
+ "type": "uint256"
112
+ },
113
+ {
114
+ "indexed": false,
115
+ "internalType": "address",
116
+ "name": "inputToken",
117
+ "type": "address"
118
+ },
119
+ {
120
+ "indexed": false,
121
+ "internalType": "uint256",
122
+ "name": "amountOut",
123
+ "type": "uint256"
124
+ },
125
+ {
126
+ "indexed": false,
127
+ "internalType": "address",
128
+ "name": "outputToken",
129
+ "type": "address"
130
+ },
131
+ {
132
+ "indexed": false,
133
+ "internalType": "int256",
134
+ "name": "slippage",
135
+ "type": "int256"
136
+ },
137
+ {
138
+ "indexed": false,
139
+ "internalType": "uint64",
140
+ "name": "referralCode",
141
+ "type": "uint64"
142
+ },
143
+ {
144
+ "indexed": false,
145
+ "internalType": "uint64",
146
+ "name": "referralFee",
147
+ "type": "uint64"
148
+ },
149
+ {
150
+ "indexed": false,
151
+ "internalType": "address",
152
+ "name": "referralFeeRecipient",
153
+ "type": "address"
154
+ }
155
+ ],
156
+ "name": "Swap",
157
+ "type": "event"
158
+ },
159
+ {
160
+ "anonymous": false,
161
+ "inputs": [
162
+ {
163
+ "indexed": false,
164
+ "internalType": "address",
165
+ "name": "sender",
166
+ "type": "address"
167
+ },
168
+ {
169
+ "indexed": false,
170
+ "internalType": "uint256[]",
171
+ "name": "amountsIn",
172
+ "type": "uint256[]"
173
+ },
174
+ {
175
+ "indexed": false,
176
+ "internalType": "address[]",
177
+ "name": "tokensIn",
178
+ "type": "address[]"
179
+ },
180
+ {
181
+ "indexed": false,
182
+ "internalType": "uint256[]",
183
+ "name": "amountsOut",
184
+ "type": "uint256[]"
185
+ },
186
+ {
187
+ "indexed": false,
188
+ "internalType": "address[]",
189
+ "name": "tokensOut",
190
+ "type": "address[]"
191
+ },
192
+ {
193
+ "indexed": false,
194
+ "internalType": "int256[]",
195
+ "name": "slippage",
196
+ "type": "int256[]"
197
+ },
198
+ {
199
+ "indexed": false,
200
+ "internalType": "uint64",
201
+ "name": "referralCode",
202
+ "type": "uint64"
203
+ },
204
+ {
205
+ "indexed": false,
206
+ "internalType": "uint64",
207
+ "name": "referralFee",
208
+ "type": "uint64"
209
+ },
210
+ {
211
+ "indexed": false,
212
+ "internalType": "address",
213
+ "name": "referralFeeRecipient",
214
+ "type": "address"
215
+ }
216
+ ],
217
+ "name": "SwapMulti",
218
+ "type": "event"
219
+ },
220
+ {
221
+ "inputs": [],
222
+ "name": "FEE_DENOM",
223
+ "outputs": [
224
+ {
225
+ "internalType": "uint256",
226
+ "name": "",
227
+ "type": "uint256"
228
+ }
229
+ ],
230
+ "stateMutability": "view",
231
+ "type": "function"
232
+ },
233
+ {
234
+ "inputs": [],
235
+ "name": "acceptOwnership",
236
+ "outputs": [],
237
+ "stateMutability": "nonpayable",
238
+ "type": "function"
239
+ },
240
+ {
241
+ "inputs": [
242
+ {
243
+ "internalType": "uint256",
244
+ "name": "",
245
+ "type": "uint256"
246
+ }
247
+ ],
248
+ "name": "addressList",
249
+ "outputs": [
250
+ {
251
+ "internalType": "address",
252
+ "name": "",
253
+ "type": "address"
254
+ }
255
+ ],
256
+ "stateMutability": "view",
257
+ "type": "function"
258
+ },
259
+ {
260
+ "inputs": [
261
+ {
262
+ "internalType": "address",
263
+ "name": "account",
264
+ "type": "address"
265
+ }
266
+ ],
267
+ "name": "changeLiquidatorAddress",
268
+ "outputs": [],
269
+ "stateMutability": "nonpayable",
270
+ "type": "function"
271
+ },
272
+ {
273
+ "inputs": [],
274
+ "name": "liquidatorAddress",
275
+ "outputs": [
276
+ {
277
+ "internalType": "address",
278
+ "name": "",
279
+ "type": "address"
280
+ }
281
+ ],
282
+ "stateMutability": "view",
283
+ "type": "function"
284
+ },
285
+ {
286
+ "inputs": [],
287
+ "name": "owner",
288
+ "outputs": [
289
+ {
290
+ "internalType": "address",
291
+ "name": "",
292
+ "type": "address"
293
+ }
294
+ ],
295
+ "stateMutability": "view",
296
+ "type": "function"
297
+ },
298
+ {
299
+ "inputs": [],
300
+ "name": "pendingOwner",
301
+ "outputs": [
302
+ {
303
+ "internalType": "address",
304
+ "name": "",
305
+ "type": "address"
306
+ }
307
+ ],
308
+ "stateMutability": "view",
309
+ "type": "function"
310
+ },
311
+ {
312
+ "inputs": [],
313
+ "name": "renounceOwnership",
314
+ "outputs": [],
315
+ "stateMutability": "nonpayable",
316
+ "type": "function"
317
+ },
318
+ {
319
+ "inputs": [
320
+ {
321
+ "components": [
322
+ {
323
+ "internalType": "address",
324
+ "name": "inputToken",
325
+ "type": "address"
326
+ },
327
+ {
328
+ "internalType": "uint256",
329
+ "name": "inputAmount",
330
+ "type": "uint256"
331
+ },
332
+ {
333
+ "internalType": "address",
334
+ "name": "inputReceiver",
335
+ "type": "address"
336
+ },
337
+ {
338
+ "internalType": "address",
339
+ "name": "outputToken",
340
+ "type": "address"
341
+ },
342
+ {
343
+ "internalType": "uint256",
344
+ "name": "outputQuote",
345
+ "type": "uint256"
346
+ },
347
+ {
348
+ "internalType": "uint256",
349
+ "name": "outputMin",
350
+ "type": "uint256"
351
+ },
352
+ {
353
+ "internalType": "address",
354
+ "name": "outputReceiver",
355
+ "type": "address"
356
+ }
357
+ ],
358
+ "internalType": "struct IOdosRouterV3.swapTokenInfo",
359
+ "name": "tokenInfo",
360
+ "type": "tuple"
361
+ },
362
+ {
363
+ "internalType": "bytes",
364
+ "name": "pathDefinition",
365
+ "type": "bytes"
366
+ },
367
+ {
368
+ "internalType": "address",
369
+ "name": "executor",
370
+ "type": "address"
371
+ },
372
+ {
373
+ "components": [
374
+ {
375
+ "internalType": "uint64",
376
+ "name": "code",
377
+ "type": "uint64"
378
+ },
379
+ {
380
+ "internalType": "uint64",
381
+ "name": "fee",
382
+ "type": "uint64"
383
+ },
384
+ {
385
+ "internalType": "address",
386
+ "name": "feeRecipient",
387
+ "type": "address"
388
+ }
389
+ ],
390
+ "internalType": "struct IOdosRouterV3.swapReferralInfo",
391
+ "name": "referralInfo",
392
+ "type": "tuple"
393
+ }
394
+ ],
395
+ "name": "swap",
396
+ "outputs": [
397
+ {
398
+ "internalType": "uint256",
399
+ "name": "amountOut",
400
+ "type": "uint256"
401
+ }
402
+ ],
403
+ "stateMutability": "payable",
404
+ "type": "function"
405
+ },
406
+ {
407
+ "inputs": [],
408
+ "name": "swapCompact",
409
+ "outputs": [
410
+ {
411
+ "internalType": "uint256",
412
+ "name": "",
413
+ "type": "uint256"
414
+ }
415
+ ],
416
+ "stateMutability": "payable",
417
+ "type": "function"
418
+ },
419
+ {
420
+ "inputs": [
421
+ {
422
+ "components": [
423
+ {
424
+ "internalType": "address",
425
+ "name": "tokenAddress",
426
+ "type": "address"
427
+ },
428
+ {
429
+ "internalType": "uint256",
430
+ "name": "amountIn",
431
+ "type": "uint256"
432
+ },
433
+ {
434
+ "internalType": "address",
435
+ "name": "receiver",
436
+ "type": "address"
437
+ }
438
+ ],
439
+ "internalType": "struct IOdosRouterV3.inputTokenInfo[]",
440
+ "name": "inputs",
441
+ "type": "tuple[]"
442
+ },
443
+ {
444
+ "components": [
445
+ {
446
+ "internalType": "address",
447
+ "name": "tokenAddress",
448
+ "type": "address"
449
+ },
450
+ {
451
+ "internalType": "uint256",
452
+ "name": "amountQuote",
453
+ "type": "uint256"
454
+ },
455
+ {
456
+ "internalType": "uint256",
457
+ "name": "amountMin",
458
+ "type": "uint256"
459
+ },
460
+ {
461
+ "internalType": "address",
462
+ "name": "receiver",
463
+ "type": "address"
464
+ }
465
+ ],
466
+ "internalType": "struct IOdosRouterV3.outputTokenInfo[]",
467
+ "name": "outputs",
468
+ "type": "tuple[]"
469
+ },
470
+ {
471
+ "internalType": "bytes",
472
+ "name": "pathDefinition",
473
+ "type": "bytes"
474
+ },
475
+ {
476
+ "internalType": "address",
477
+ "name": "executor",
478
+ "type": "address"
479
+ },
480
+ {
481
+ "components": [
482
+ {
483
+ "internalType": "uint64",
484
+ "name": "code",
485
+ "type": "uint64"
486
+ },
487
+ {
488
+ "internalType": "uint64",
489
+ "name": "fee",
490
+ "type": "uint64"
491
+ },
492
+ {
493
+ "internalType": "address",
494
+ "name": "feeRecipient",
495
+ "type": "address"
496
+ }
497
+ ],
498
+ "internalType": "struct IOdosRouterV3.swapReferralInfo",
499
+ "name": "referralInfo",
500
+ "type": "tuple"
501
+ }
502
+ ],
503
+ "name": "swapMulti",
504
+ "outputs": [
505
+ {
506
+ "internalType": "uint256[]",
507
+ "name": "amountsOut",
508
+ "type": "uint256[]"
509
+ }
510
+ ],
511
+ "stateMutability": "payable",
512
+ "type": "function"
513
+ },
514
+ {
515
+ "inputs": [],
516
+ "name": "swapMultiCompact",
517
+ "outputs": [
518
+ {
519
+ "internalType": "uint256[]",
520
+ "name": "amountsOut",
521
+ "type": "uint256[]"
522
+ }
523
+ ],
524
+ "stateMutability": "payable",
525
+ "type": "function"
526
+ },
527
+ {
528
+ "inputs": [
529
+ {
530
+ "components": [
531
+ {
532
+ "internalType": "address",
533
+ "name": "contractAddress",
534
+ "type": "address"
535
+ },
536
+ {
537
+ "internalType": "uint256",
538
+ "name": "nonce",
539
+ "type": "uint256"
540
+ },
541
+ {
542
+ "internalType": "uint256",
543
+ "name": "deadline",
544
+ "type": "uint256"
545
+ },
546
+ {
547
+ "internalType": "bytes",
548
+ "name": "signature",
549
+ "type": "bytes"
550
+ }
551
+ ],
552
+ "internalType": "struct IOdosRouterV3.permit2Info",
553
+ "name": "permit2",
554
+ "type": "tuple"
555
+ },
556
+ {
557
+ "components": [
558
+ {
559
+ "internalType": "address",
560
+ "name": "tokenAddress",
561
+ "type": "address"
562
+ },
563
+ {
564
+ "internalType": "uint256",
565
+ "name": "amountIn",
566
+ "type": "uint256"
567
+ },
568
+ {
569
+ "internalType": "address",
570
+ "name": "receiver",
571
+ "type": "address"
572
+ }
573
+ ],
574
+ "internalType": "struct IOdosRouterV3.inputTokenInfo[]",
575
+ "name": "inputs",
576
+ "type": "tuple[]"
577
+ },
578
+ {
579
+ "components": [
580
+ {
581
+ "internalType": "address",
582
+ "name": "tokenAddress",
583
+ "type": "address"
584
+ },
585
+ {
586
+ "internalType": "uint256",
587
+ "name": "amountQuote",
588
+ "type": "uint256"
589
+ },
590
+ {
591
+ "internalType": "uint256",
592
+ "name": "amountMin",
593
+ "type": "uint256"
594
+ },
595
+ {
596
+ "internalType": "address",
597
+ "name": "receiver",
598
+ "type": "address"
599
+ }
600
+ ],
601
+ "internalType": "struct IOdosRouterV3.outputTokenInfo[]",
602
+ "name": "outputs",
603
+ "type": "tuple[]"
604
+ },
605
+ {
606
+ "internalType": "bytes",
607
+ "name": "pathDefinition",
608
+ "type": "bytes"
609
+ },
610
+ {
611
+ "internalType": "address",
612
+ "name": "executor",
613
+ "type": "address"
614
+ },
615
+ {
616
+ "components": [
617
+ {
618
+ "internalType": "uint64",
619
+ "name": "code",
620
+ "type": "uint64"
621
+ },
622
+ {
623
+ "internalType": "uint64",
624
+ "name": "fee",
625
+ "type": "uint64"
626
+ },
627
+ {
628
+ "internalType": "address",
629
+ "name": "feeRecipient",
630
+ "type": "address"
631
+ }
632
+ ],
633
+ "internalType": "struct IOdosRouterV3.swapReferralInfo",
634
+ "name": "referralInfo",
635
+ "type": "tuple"
636
+ }
637
+ ],
638
+ "name": "swapMultiPermit2",
639
+ "outputs": [
640
+ {
641
+ "internalType": "uint256[]",
642
+ "name": "amountsOut",
643
+ "type": "uint256[]"
644
+ }
645
+ ],
646
+ "stateMutability": "payable",
647
+ "type": "function"
648
+ },
649
+ {
650
+ "inputs": [
651
+ {
652
+ "components": [
653
+ {
654
+ "internalType": "address",
655
+ "name": "contractAddress",
656
+ "type": "address"
657
+ },
658
+ {
659
+ "internalType": "uint256",
660
+ "name": "nonce",
661
+ "type": "uint256"
662
+ },
663
+ {
664
+ "internalType": "uint256",
665
+ "name": "deadline",
666
+ "type": "uint256"
667
+ },
668
+ {
669
+ "internalType": "bytes",
670
+ "name": "signature",
671
+ "type": "bytes"
672
+ }
673
+ ],
674
+ "internalType": "struct IOdosRouterV3.permit2Info",
675
+ "name": "permit2",
676
+ "type": "tuple"
677
+ },
678
+ {
679
+ "components": [
680
+ {
681
+ "internalType": "address",
682
+ "name": "tokenAddress",
683
+ "type": "address"
684
+ },
685
+ {
686
+ "internalType": "uint256",
687
+ "name": "amountIn",
688
+ "type": "uint256"
689
+ },
690
+ {
691
+ "internalType": "address",
692
+ "name": "receiver",
693
+ "type": "address"
694
+ }
695
+ ],
696
+ "internalType": "struct IOdosRouterV3.inputTokenInfo[]",
697
+ "name": "inputs",
698
+ "type": "tuple[]"
699
+ },
700
+ {
701
+ "components": [
702
+ {
703
+ "internalType": "address",
704
+ "name": "tokenAddress",
705
+ "type": "address"
706
+ },
707
+ {
708
+ "internalType": "uint256",
709
+ "name": "amountQuote",
710
+ "type": "uint256"
711
+ },
712
+ {
713
+ "internalType": "uint256",
714
+ "name": "amountMin",
715
+ "type": "uint256"
716
+ },
717
+ {
718
+ "internalType": "address",
719
+ "name": "receiver",
720
+ "type": "address"
721
+ }
722
+ ],
723
+ "internalType": "struct IOdosRouterV3.outputTokenInfo[]",
724
+ "name": "outputs",
725
+ "type": "tuple[]"
726
+ },
727
+ {
728
+ "internalType": "bytes",
729
+ "name": "pathDefinition",
730
+ "type": "bytes"
731
+ },
732
+ {
733
+ "internalType": "address",
734
+ "name": "executor",
735
+ "type": "address"
736
+ },
737
+ {
738
+ "components": [
739
+ {
740
+ "internalType": "uint64",
741
+ "name": "code",
742
+ "type": "uint64"
743
+ },
744
+ {
745
+ "internalType": "uint64",
746
+ "name": "fee",
747
+ "type": "uint64"
748
+ },
749
+ {
750
+ "internalType": "address",
751
+ "name": "feeRecipient",
752
+ "type": "address"
753
+ }
754
+ ],
755
+ "internalType": "struct IOdosRouterV3.swapReferralInfo",
756
+ "name": "referralInfo",
757
+ "type": "tuple"
758
+ },
759
+ {
760
+ "internalType": "address",
761
+ "name": "hookTarget",
762
+ "type": "address"
763
+ },
764
+ {
765
+ "internalType": "bytes",
766
+ "name": "hookData",
767
+ "type": "bytes"
768
+ }
769
+ ],
770
+ "name": "swapMultiPermit2WithHook",
771
+ "outputs": [
772
+ {
773
+ "internalType": "uint256[]",
774
+ "name": "amountsOut",
775
+ "type": "uint256[]"
776
+ }
777
+ ],
778
+ "stateMutability": "payable",
779
+ "type": "function"
780
+ },
781
+ {
782
+ "inputs": [
783
+ {
784
+ "components": [
785
+ {
786
+ "internalType": "address",
787
+ "name": "tokenAddress",
788
+ "type": "address"
789
+ },
790
+ {
791
+ "internalType": "uint256",
792
+ "name": "amountIn",
793
+ "type": "uint256"
794
+ },
795
+ {
796
+ "internalType": "address",
797
+ "name": "receiver",
798
+ "type": "address"
799
+ }
800
+ ],
801
+ "internalType": "struct IOdosRouterV3.inputTokenInfo[]",
802
+ "name": "inputs",
803
+ "type": "tuple[]"
804
+ },
805
+ {
806
+ "components": [
807
+ {
808
+ "internalType": "address",
809
+ "name": "tokenAddress",
810
+ "type": "address"
811
+ },
812
+ {
813
+ "internalType": "uint256",
814
+ "name": "amountQuote",
815
+ "type": "uint256"
816
+ },
817
+ {
818
+ "internalType": "uint256",
819
+ "name": "amountMin",
820
+ "type": "uint256"
821
+ },
822
+ {
823
+ "internalType": "address",
824
+ "name": "receiver",
825
+ "type": "address"
826
+ }
827
+ ],
828
+ "internalType": "struct IOdosRouterV3.outputTokenInfo[]",
829
+ "name": "outputs",
830
+ "type": "tuple[]"
831
+ },
832
+ {
833
+ "internalType": "bytes",
834
+ "name": "pathDefinition",
835
+ "type": "bytes"
836
+ },
837
+ {
838
+ "internalType": "address",
839
+ "name": "executor",
840
+ "type": "address"
841
+ },
842
+ {
843
+ "components": [
844
+ {
845
+ "internalType": "uint64",
846
+ "name": "code",
847
+ "type": "uint64"
848
+ },
849
+ {
850
+ "internalType": "uint64",
851
+ "name": "fee",
852
+ "type": "uint64"
853
+ },
854
+ {
855
+ "internalType": "address",
856
+ "name": "feeRecipient",
857
+ "type": "address"
858
+ }
859
+ ],
860
+ "internalType": "struct IOdosRouterV3.swapReferralInfo",
861
+ "name": "referralInfo",
862
+ "type": "tuple"
863
+ },
864
+ {
865
+ "internalType": "address",
866
+ "name": "hookTarget",
867
+ "type": "address"
868
+ },
869
+ {
870
+ "internalType": "bytes",
871
+ "name": "hookData",
872
+ "type": "bytes"
873
+ }
874
+ ],
875
+ "name": "swapMultiWithHook",
876
+ "outputs": [
877
+ {
878
+ "internalType": "uint256[]",
879
+ "name": "amountsOut",
880
+ "type": "uint256[]"
881
+ }
882
+ ],
883
+ "stateMutability": "payable",
884
+ "type": "function"
885
+ },
886
+ {
887
+ "inputs": [
888
+ {
889
+ "components": [
890
+ {
891
+ "internalType": "address",
892
+ "name": "contractAddress",
893
+ "type": "address"
894
+ },
895
+ {
896
+ "internalType": "uint256",
897
+ "name": "nonce",
898
+ "type": "uint256"
899
+ },
900
+ {
901
+ "internalType": "uint256",
902
+ "name": "deadline",
903
+ "type": "uint256"
904
+ },
905
+ {
906
+ "internalType": "bytes",
907
+ "name": "signature",
908
+ "type": "bytes"
909
+ }
910
+ ],
911
+ "internalType": "struct IOdosRouterV3.permit2Info",
912
+ "name": "permit2",
913
+ "type": "tuple"
914
+ },
915
+ {
916
+ "components": [
917
+ {
918
+ "internalType": "address",
919
+ "name": "inputToken",
920
+ "type": "address"
921
+ },
922
+ {
923
+ "internalType": "uint256",
924
+ "name": "inputAmount",
925
+ "type": "uint256"
926
+ },
927
+ {
928
+ "internalType": "address",
929
+ "name": "inputReceiver",
930
+ "type": "address"
931
+ },
932
+ {
933
+ "internalType": "address",
934
+ "name": "outputToken",
935
+ "type": "address"
936
+ },
937
+ {
938
+ "internalType": "uint256",
939
+ "name": "outputQuote",
940
+ "type": "uint256"
941
+ },
942
+ {
943
+ "internalType": "uint256",
944
+ "name": "outputMin",
945
+ "type": "uint256"
946
+ },
947
+ {
948
+ "internalType": "address",
949
+ "name": "outputReceiver",
950
+ "type": "address"
951
+ }
952
+ ],
953
+ "internalType": "struct IOdosRouterV3.swapTokenInfo",
954
+ "name": "tokenInfo",
955
+ "type": "tuple"
956
+ },
957
+ {
958
+ "internalType": "bytes",
959
+ "name": "pathDefinition",
960
+ "type": "bytes"
961
+ },
962
+ {
963
+ "internalType": "address",
964
+ "name": "executor",
965
+ "type": "address"
966
+ },
967
+ {
968
+ "components": [
969
+ {
970
+ "internalType": "uint64",
971
+ "name": "code",
972
+ "type": "uint64"
973
+ },
974
+ {
975
+ "internalType": "uint64",
976
+ "name": "fee",
977
+ "type": "uint64"
978
+ },
979
+ {
980
+ "internalType": "address",
981
+ "name": "feeRecipient",
982
+ "type": "address"
983
+ }
984
+ ],
985
+ "internalType": "struct IOdosRouterV3.swapReferralInfo",
986
+ "name": "referralInfo",
987
+ "type": "tuple"
988
+ }
989
+ ],
990
+ "name": "swapPermit2",
991
+ "outputs": [
992
+ {
993
+ "internalType": "uint256",
994
+ "name": "amountOut",
995
+ "type": "uint256"
996
+ }
997
+ ],
998
+ "stateMutability": "nonpayable",
999
+ "type": "function"
1000
+ },
1001
+ {
1002
+ "inputs": [
1003
+ {
1004
+ "components": [
1005
+ {
1006
+ "internalType": "address",
1007
+ "name": "contractAddress",
1008
+ "type": "address"
1009
+ },
1010
+ {
1011
+ "internalType": "uint256",
1012
+ "name": "nonce",
1013
+ "type": "uint256"
1014
+ },
1015
+ {
1016
+ "internalType": "uint256",
1017
+ "name": "deadline",
1018
+ "type": "uint256"
1019
+ },
1020
+ {
1021
+ "internalType": "bytes",
1022
+ "name": "signature",
1023
+ "type": "bytes"
1024
+ }
1025
+ ],
1026
+ "internalType": "struct IOdosRouterV3.permit2Info",
1027
+ "name": "permit2",
1028
+ "type": "tuple"
1029
+ },
1030
+ {
1031
+ "components": [
1032
+ {
1033
+ "internalType": "address",
1034
+ "name": "inputToken",
1035
+ "type": "address"
1036
+ },
1037
+ {
1038
+ "internalType": "uint256",
1039
+ "name": "inputAmount",
1040
+ "type": "uint256"
1041
+ },
1042
+ {
1043
+ "internalType": "address",
1044
+ "name": "inputReceiver",
1045
+ "type": "address"
1046
+ },
1047
+ {
1048
+ "internalType": "address",
1049
+ "name": "outputToken",
1050
+ "type": "address"
1051
+ },
1052
+ {
1053
+ "internalType": "uint256",
1054
+ "name": "outputQuote",
1055
+ "type": "uint256"
1056
+ },
1057
+ {
1058
+ "internalType": "uint256",
1059
+ "name": "outputMin",
1060
+ "type": "uint256"
1061
+ },
1062
+ {
1063
+ "internalType": "address",
1064
+ "name": "outputReceiver",
1065
+ "type": "address"
1066
+ }
1067
+ ],
1068
+ "internalType": "struct IOdosRouterV3.swapTokenInfo",
1069
+ "name": "tokenInfo",
1070
+ "type": "tuple"
1071
+ },
1072
+ {
1073
+ "internalType": "bytes",
1074
+ "name": "pathDefinition",
1075
+ "type": "bytes"
1076
+ },
1077
+ {
1078
+ "internalType": "address",
1079
+ "name": "executor",
1080
+ "type": "address"
1081
+ },
1082
+ {
1083
+ "components": [
1084
+ {
1085
+ "internalType": "uint64",
1086
+ "name": "code",
1087
+ "type": "uint64"
1088
+ },
1089
+ {
1090
+ "internalType": "uint64",
1091
+ "name": "fee",
1092
+ "type": "uint64"
1093
+ },
1094
+ {
1095
+ "internalType": "address",
1096
+ "name": "feeRecipient",
1097
+ "type": "address"
1098
+ }
1099
+ ],
1100
+ "internalType": "struct IOdosRouterV3.swapReferralInfo",
1101
+ "name": "referralInfo",
1102
+ "type": "tuple"
1103
+ },
1104
+ {
1105
+ "internalType": "address",
1106
+ "name": "hookTarget",
1107
+ "type": "address"
1108
+ },
1109
+ {
1110
+ "internalType": "bytes",
1111
+ "name": "hookData",
1112
+ "type": "bytes"
1113
+ }
1114
+ ],
1115
+ "name": "swapPermit2WithHook",
1116
+ "outputs": [
1117
+ {
1118
+ "internalType": "uint256",
1119
+ "name": "amountOut",
1120
+ "type": "uint256"
1121
+ }
1122
+ ],
1123
+ "stateMutability": "nonpayable",
1124
+ "type": "function"
1125
+ },
1126
+ {
1127
+ "inputs": [
1128
+ {
1129
+ "components": [
1130
+ {
1131
+ "internalType": "address",
1132
+ "name": "tokenAddress",
1133
+ "type": "address"
1134
+ },
1135
+ {
1136
+ "internalType": "uint256",
1137
+ "name": "amountIn",
1138
+ "type": "uint256"
1139
+ },
1140
+ {
1141
+ "internalType": "address",
1142
+ "name": "receiver",
1143
+ "type": "address"
1144
+ }
1145
+ ],
1146
+ "internalType": "struct IOdosRouterV3.inputTokenInfo[]",
1147
+ "name": "inputs",
1148
+ "type": "tuple[]"
1149
+ },
1150
+ {
1151
+ "components": [
1152
+ {
1153
+ "internalType": "address",
1154
+ "name": "tokenAddress",
1155
+ "type": "address"
1156
+ },
1157
+ {
1158
+ "internalType": "uint256",
1159
+ "name": "amountQuote",
1160
+ "type": "uint256"
1161
+ },
1162
+ {
1163
+ "internalType": "uint256",
1164
+ "name": "amountMin",
1165
+ "type": "uint256"
1166
+ },
1167
+ {
1168
+ "internalType": "address",
1169
+ "name": "receiver",
1170
+ "type": "address"
1171
+ }
1172
+ ],
1173
+ "internalType": "struct IOdosRouterV3.outputTokenInfo[]",
1174
+ "name": "outputs",
1175
+ "type": "tuple[]"
1176
+ },
1177
+ {
1178
+ "internalType": "bytes",
1179
+ "name": "pathDefinition",
1180
+ "type": "bytes"
1181
+ },
1182
+ {
1183
+ "internalType": "address",
1184
+ "name": "executor",
1185
+ "type": "address"
1186
+ }
1187
+ ],
1188
+ "name": "swapRouterFunds",
1189
+ "outputs": [
1190
+ {
1191
+ "internalType": "uint256[]",
1192
+ "name": "amountsOut",
1193
+ "type": "uint256[]"
1194
+ }
1195
+ ],
1196
+ "stateMutability": "nonpayable",
1197
+ "type": "function"
1198
+ },
1199
+ {
1200
+ "inputs": [
1201
+ {
1202
+ "components": [
1203
+ {
1204
+ "internalType": "address",
1205
+ "name": "inputToken",
1206
+ "type": "address"
1207
+ },
1208
+ {
1209
+ "internalType": "uint256",
1210
+ "name": "inputAmount",
1211
+ "type": "uint256"
1212
+ },
1213
+ {
1214
+ "internalType": "address",
1215
+ "name": "inputReceiver",
1216
+ "type": "address"
1217
+ },
1218
+ {
1219
+ "internalType": "address",
1220
+ "name": "outputToken",
1221
+ "type": "address"
1222
+ },
1223
+ {
1224
+ "internalType": "uint256",
1225
+ "name": "outputQuote",
1226
+ "type": "uint256"
1227
+ },
1228
+ {
1229
+ "internalType": "uint256",
1230
+ "name": "outputMin",
1231
+ "type": "uint256"
1232
+ },
1233
+ {
1234
+ "internalType": "address",
1235
+ "name": "outputReceiver",
1236
+ "type": "address"
1237
+ }
1238
+ ],
1239
+ "internalType": "struct IOdosRouterV3.swapTokenInfo",
1240
+ "name": "tokenInfo",
1241
+ "type": "tuple"
1242
+ },
1243
+ {
1244
+ "internalType": "bytes",
1245
+ "name": "pathDefinition",
1246
+ "type": "bytes"
1247
+ },
1248
+ {
1249
+ "internalType": "address",
1250
+ "name": "executor",
1251
+ "type": "address"
1252
+ },
1253
+ {
1254
+ "components": [
1255
+ {
1256
+ "internalType": "uint64",
1257
+ "name": "code",
1258
+ "type": "uint64"
1259
+ },
1260
+ {
1261
+ "internalType": "uint64",
1262
+ "name": "fee",
1263
+ "type": "uint64"
1264
+ },
1265
+ {
1266
+ "internalType": "address",
1267
+ "name": "feeRecipient",
1268
+ "type": "address"
1269
+ }
1270
+ ],
1271
+ "internalType": "struct IOdosRouterV3.swapReferralInfo",
1272
+ "name": "referralInfo",
1273
+ "type": "tuple"
1274
+ },
1275
+ {
1276
+ "internalType": "address",
1277
+ "name": "hookTarget",
1278
+ "type": "address"
1279
+ },
1280
+ {
1281
+ "internalType": "bytes",
1282
+ "name": "hookData",
1283
+ "type": "bytes"
1284
+ }
1285
+ ],
1286
+ "name": "swapWithHook",
1287
+ "outputs": [
1288
+ {
1289
+ "internalType": "uint256",
1290
+ "name": "amountOut",
1291
+ "type": "uint256"
1292
+ }
1293
+ ],
1294
+ "stateMutability": "payable",
1295
+ "type": "function"
1296
+ },
1297
+ {
1298
+ "inputs": [
1299
+ {
1300
+ "internalType": "address",
1301
+ "name": "newOwner",
1302
+ "type": "address"
1303
+ }
1304
+ ],
1305
+ "name": "transferOwnership",
1306
+ "outputs": [],
1307
+ "stateMutability": "nonpayable",
1308
+ "type": "function"
1309
+ },
1310
+ {
1311
+ "inputs": [
1312
+ {
1313
+ "internalType": "address[]",
1314
+ "name": "tokens",
1315
+ "type": "address[]"
1316
+ },
1317
+ {
1318
+ "internalType": "uint256[]",
1319
+ "name": "amounts",
1320
+ "type": "uint256[]"
1321
+ },
1322
+ {
1323
+ "internalType": "address",
1324
+ "name": "dest",
1325
+ "type": "address"
1326
+ }
1327
+ ],
1328
+ "name": "transferRouterFunds",
1329
+ "outputs": [],
1330
+ "stateMutability": "nonpayable",
1331
+ "type": "function"
1332
+ },
1333
+ {
1334
+ "inputs": [
1335
+ {
1336
+ "internalType": "address[]",
1337
+ "name": "addresses",
1338
+ "type": "address[]"
1339
+ }
1340
+ ],
1341
+ "name": "writeAddressList",
1342
+ "outputs": [],
1343
+ "stateMutability": "nonpayable",
1344
+ "type": "function"
1345
+ },
1346
+ {
1347
+ "stateMutability": "payable",
1348
+ "type": "receive"
1349
+ }
1350
+ ]
1351
+ }