@plutonlabs/sdk 0.0.40-beta → 0.0.42-beta

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.
@@ -2,8 +2,10 @@ export declare class PlutonRequestDto {
2
2
  id: string;
3
3
  user: string;
4
4
  tokenInAddress: string;
5
+ amountIn: string;
5
6
  initiationExpiry: string;
6
7
  orderDataType: string;
7
8
  orderData: string;
9
+ swapCallData: string;
8
10
  }
9
11
  //# sourceMappingURL=pluton_request.dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pluton_request.dto.d.ts","sourceRoot":"","sources":["../../../../../src/modules/chainsync/domain/dto/pluton_request.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,gBAAgB;IAG3B,EAAE,EAAE,MAAM,CAAC;IAIX,IAAI,EAAE,MAAM,CAAC;IAIb,cAAc,EAAE,MAAM,CAAC;IAIvB,gBAAgB,EAAE,MAAM,CAAC;IAKzB,aAAa,EAAE,MAAM,CAAC;IAItB,SAAS,EAAE,MAAM,CAAC;CACnB"}
1
+ {"version":3,"file":"pluton_request.dto.d.ts","sourceRoot":"","sources":["../../../../../src/modules/chainsync/domain/dto/pluton_request.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,gBAAgB;IAG3B,EAAE,EAAE,MAAM,CAAC;IAIX,IAAI,EAAE,MAAM,CAAC;IAIb,cAAc,EAAE,MAAM,CAAC;IAIvB,QAAQ,EAAE,MAAM,CAAC;IAIjB,gBAAgB,EAAE,MAAM,CAAC;IAKzB,aAAa,EAAE,MAAM,CAAC;IAItB,SAAS,EAAE,MAAM,CAAC;IAIlB,YAAY,EAAE,MAAM,CAAC;CACtB"}
@@ -29,6 +29,11 @@ __decorate([
29
29
  (0, class_validator_1.IsNotEmpty)(),
30
30
  __metadata("design:type", String)
31
31
  ], PlutonRequestDto.prototype, "tokenInAddress", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsString)(),
34
+ (0, class_validator_1.IsNotEmpty)(),
35
+ __metadata("design:type", String)
36
+ ], PlutonRequestDto.prototype, "amountIn", void 0);
32
37
  __decorate([
33
38
  (0, class_validator_1.IsString)(),
34
39
  (0, class_validator_1.IsNotEmpty)(),
@@ -45,4 +50,9 @@ __decorate([
45
50
  (0, class_validator_1.IsNotEmpty)(),
46
51
  __metadata("design:type", String)
47
52
  ], PlutonRequestDto.prototype, "orderData", void 0);
53
+ __decorate([
54
+ (0, class_validator_1.IsString)(),
55
+ (0, class_validator_1.IsNotEmpty)(),
56
+ __metadata("design:type", String)
57
+ ], PlutonRequestDto.prototype, "swapCallData", void 0);
48
58
  //# sourceMappingURL=pluton_request.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pluton_request.dto.js","sourceRoot":"","sources":["../../../../../src/modules/chainsync/domain/dto/pluton_request.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA0E;AAE1E,MAAa,gBAAgB;CAyB5B;AAzBD,4CAyBC;AAtBC;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;4CACF;AAIX;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;8CACA;AAIb;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;wDACU;AAIvB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACY;AAKzB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,2BAAS,EAAC,EAAE,CAAC;IACb,IAAA,4BAAU,GAAE;;uDACS;AAItB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mDACK"}
1
+ {"version":3,"file":"pluton_request.dto.js","sourceRoot":"","sources":["../../../../../src/modules/chainsync/domain/dto/pluton_request.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA0E;AAE1E,MAAa,gBAAgB;CAiC5B;AAjCD,4CAiCC;AA9BC;IAFC,IAAA,wBAAM,GAAE;IACR,IAAA,4BAAU,GAAE;;4CACF;AAIX;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;8CACA;AAIb;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;wDACU;AAIvB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;kDACI;AAIjB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACY;AAKzB;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,2BAAS,EAAC,EAAE,CAAC;IACb,IAAA,4BAAU,GAAE;;uDACS;AAItB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mDACK;AAIlB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;sDACQ"}
@@ -88,7 +88,7 @@
88
88
  "apiKey": ""
89
89
  }
90
90
  ],
91
- "isActive": true
91
+ "isActive": false
92
92
  },
93
93
  {
94
94
  "name": "TON",
@@ -24,7 +24,11 @@
24
24
  "type": "address",
25
25
  "internalType": "address"
26
26
  },
27
- { "name": "amount", "type": "uint256", "internalType": "uint256" }
27
+ {
28
+ "name": "amount",
29
+ "type": "uint256",
30
+ "internalType": "uint256"
31
+ }
28
32
  ],
29
33
  "outputs": [],
30
34
  "stateMutability": "nonpayable"
@@ -33,7 +37,11 @@
33
37
  "type": "function",
34
38
  "name": "claimAffiliate",
35
39
  "inputs": [
36
- { "name": "signature", "type": "bytes", "internalType": "bytes" },
40
+ {
41
+ "name": "signature",
42
+ "type": "bytes",
43
+ "internalType": "bytes"
44
+ },
37
45
  {
38
46
  "name": "affiliateAddress",
39
47
  "type": "address",
@@ -44,7 +52,11 @@
44
52
  "type": "address",
45
53
  "internalType": "address"
46
54
  },
47
- { "name": "amount", "type": "uint256", "internalType": "uint256" }
55
+ {
56
+ "name": "amount",
57
+ "type": "uint256",
58
+ "internalType": "uint256"
59
+ }
48
60
  ],
49
61
  "outputs": [],
50
62
  "stateMutability": "nonpayable"
@@ -53,7 +65,11 @@
53
65
  "type": "function",
54
66
  "name": "claimSolver",
55
67
  "inputs": [
56
- { "name": "signature", "type": "bytes", "internalType": "bytes" },
68
+ {
69
+ "name": "signature",
70
+ "type": "bytes",
71
+ "internalType": "bytes"
72
+ },
57
73
  {
58
74
  "name": "claimerAddress",
59
75
  "type": "address",
@@ -64,7 +80,11 @@
64
80
  "type": "address",
65
81
  "internalType": "address"
66
82
  },
67
- { "name": "amount", "type": "uint256", "internalType": "uint256" }
83
+ {
84
+ "name": "amount",
85
+ "type": "uint256",
86
+ "internalType": "uint256"
87
+ }
68
88
  ],
69
89
  "outputs": [],
70
90
  "stateMutability": "nonpayable"
@@ -74,16 +94,36 @@
74
94
  "name": "eip712Domain",
75
95
  "inputs": [],
76
96
  "outputs": [
77
- { "name": "fields", "type": "bytes1", "internalType": "bytes1" },
78
- { "name": "name", "type": "string", "internalType": "string" },
79
- { "name": "version", "type": "string", "internalType": "string" },
80
- { "name": "chainId", "type": "uint256", "internalType": "uint256" },
97
+ {
98
+ "name": "fields",
99
+ "type": "bytes1",
100
+ "internalType": "bytes1"
101
+ },
102
+ {
103
+ "name": "name",
104
+ "type": "string",
105
+ "internalType": "string"
106
+ },
107
+ {
108
+ "name": "version",
109
+ "type": "string",
110
+ "internalType": "string"
111
+ },
112
+ {
113
+ "name": "chainId",
114
+ "type": "uint256",
115
+ "internalType": "uint256"
116
+ },
81
117
  {
82
118
  "name": "verifyingContract",
83
119
  "type": "address",
84
120
  "internalType": "address"
85
121
  },
86
- { "name": "salt", "type": "bytes32", "internalType": "bytes32" },
122
+ {
123
+ "name": "salt",
124
+ "type": "bytes32",
125
+ "internalType": "bytes32"
126
+ },
87
127
  {
88
128
  "name": "extensions",
89
129
  "type": "uint256[]",
@@ -169,7 +209,11 @@
169
209
  "name": "owner",
170
210
  "inputs": [],
171
211
  "outputs": [
172
- { "name": "", "type": "address", "internalType": "address" }
212
+ {
213
+ "name": "",
214
+ "type": "address",
215
+ "internalType": "address"
216
+ }
173
217
  ],
174
218
  "stateMutability": "view"
175
219
  },
@@ -182,7 +226,11 @@
182
226
  "type": "tuple",
183
227
  "internalType": "struct PlutonContract.PlutonRequest",
184
228
  "components": [
185
- { "name": "id", "type": "bytes", "internalType": "bytes" },
229
+ {
230
+ "name": "id",
231
+ "type": "bytes",
232
+ "internalType": "bytes"
233
+ },
186
234
  {
187
235
  "name": "user",
188
236
  "type": "address",
@@ -223,7 +271,11 @@
223
271
  "type": "function",
224
272
  "name": "refundUser",
225
273
  "inputs": [
226
- { "name": "signature", "type": "bytes", "internalType": "bytes" },
274
+ {
275
+ "name": "signature",
276
+ "type": "bytes",
277
+ "internalType": "bytes"
278
+ },
227
279
  {
228
280
  "name": "refundAddress",
229
281
  "type": "address",
@@ -234,7 +286,11 @@
234
286
  "type": "address",
235
287
  "internalType": "address"
236
288
  },
237
- { "name": "amount", "type": "uint256", "internalType": "uint256" }
289
+ {
290
+ "name": "amount",
291
+ "type": "uint256",
292
+ "internalType": "uint256"
293
+ }
238
294
  ],
239
295
  "outputs": [],
240
296
  "stateMutability": "nonpayable"
@@ -250,7 +306,11 @@
250
306
  "type": "function",
251
307
  "name": "transferOwnership",
252
308
  "inputs": [
253
- { "name": "newOwner", "type": "address", "internalType": "address" }
309
+ {
310
+ "name": "newOwner",
311
+ "type": "address",
312
+ "internalType": "address"
313
+ }
254
314
  ],
255
315
  "outputs": [],
256
316
  "stateMutability": "nonpayable"
@@ -395,7 +455,11 @@
395
455
  "indexed": false,
396
456
  "internalType": "struct PlutonContract.PlutonRequest",
397
457
  "components": [
398
- { "name": "id", "type": "bytes", "internalType": "bytes" },
458
+ {
459
+ "name": "id",
460
+ "type": "bytes",
461
+ "internalType": "bytes"
462
+ },
399
463
  {
400
464
  "name": "user",
401
465
  "type": "address",
@@ -468,44 +532,84 @@
468
532
  ],
469
533
  "anonymous": false
470
534
  },
471
- { "type": "error", "name": "AlreadyResolved", "inputs": [] },
535
+ {
536
+ "type": "error",
537
+ "name": "AlreadyResolved",
538
+ "inputs": []
539
+ },
472
540
  {
473
541
  "type": "error",
474
542
  "name": "DeadlineReached",
475
543
  "inputs": [
476
- { "name": "", "type": "uint256", "internalType": "uint256" },
477
- { "name": "", "type": "uint256", "internalType": "uint256" }
544
+ {
545
+ "name": "",
546
+ "type": "uint256",
547
+ "internalType": "uint256"
548
+ },
549
+ {
550
+ "name": "",
551
+ "type": "uint256",
552
+ "internalType": "uint256"
553
+ }
478
554
  ]
479
555
  },
480
- { "type": "error", "name": "ECDSAInvalidSignature", "inputs": [] },
556
+ {
557
+ "type": "error",
558
+ "name": "ECDSAInvalidSignature",
559
+ "inputs": []
560
+ },
481
561
  {
482
562
  "type": "error",
483
563
  "name": "ECDSAInvalidSignatureLength",
484
564
  "inputs": [
485
- { "name": "length", "type": "uint256", "internalType": "uint256" }
565
+ {
566
+ "name": "length",
567
+ "type": "uint256",
568
+ "internalType": "uint256"
569
+ }
486
570
  ]
487
571
  },
488
572
  {
489
573
  "type": "error",
490
574
  "name": "ECDSAInvalidSignatureS",
491
575
  "inputs": [
492
- { "name": "s", "type": "bytes32", "internalType": "bytes32" }
576
+ {
577
+ "name": "s",
578
+ "type": "bytes32",
579
+ "internalType": "bytes32"
580
+ }
493
581
  ]
494
582
  },
495
- { "type": "error", "name": "EthNotTransferred", "inputs": [] },
496
- { "type": "error", "name": "InvalidShortString", "inputs": [] },
583
+ {
584
+ "type": "error",
585
+ "name": "EthNotTransferred",
586
+ "inputs": []
587
+ },
588
+ {
589
+ "type": "error",
590
+ "name": "InvalidShortString",
591
+ "inputs": []
592
+ },
497
593
  {
498
594
  "type": "error",
499
595
  "name": "OwnableInvalidOwner",
500
596
  "inputs": [
501
- { "name": "owner", "type": "address", "internalType": "address" }
597
+ {
598
+ "name": "owner",
599
+ "type": "address",
600
+ "internalType": "address"
601
+ }
502
602
  ]
503
603
  },
504
604
  {
505
605
  "type": "error",
506
606
  "name": "OwnableUnauthorizedAccount",
507
607
  "inputs": [
508
- { "name": "account", "type": "address", "internalType": "address" }
608
+ {
609
+ "name": "account",
610
+ "type": "address",
611
+ "internalType": "address"
612
+ }
509
613
  ]
510
614
  },
511
615
  {
@@ -517,45 +621,65 @@
517
621
  "type": "error",
518
622
  "name": "SafeERC20FailedOperation",
519
623
  "inputs": [
520
- { "name": "token", "type": "address", "internalType": "address" }
624
+ {
625
+ "name": "token",
626
+ "type": "address",
627
+ "internalType": "address"
628
+ }
521
629
  ]
522
630
  },
523
- { "type": "error", "name": "SignatureFailed", "inputs": [] },
631
+ {
632
+ "type": "error",
633
+ "name": "SignatureFailed",
634
+ "inputs": []
635
+ },
524
636
  {
525
637
  "type": "error",
526
638
  "name": "StringTooLong",
527
639
  "inputs": [
528
- { "name": "str", "type": "string", "internalType": "string" }
640
+ {
641
+ "name": "str",
642
+ "type": "string",
643
+ "internalType": "string"
644
+ }
529
645
  ]
530
646
  },
531
647
  {
532
648
  "type": "error",
533
649
  "name": "ValueNotEnough",
534
650
  "inputs": [
535
- { "name": "", "type": "uint256", "internalType": "uint256" },
536
- { "name": "", "type": "uint256", "internalType": "uint256" }
651
+ {
652
+ "name": "",
653
+ "type": "uint256",
654
+ "internalType": "uint256"
655
+ },
656
+ {
657
+ "name": "",
658
+ "type": "uint256",
659
+ "internalType": "uint256"
660
+ }
537
661
  ]
538
662
  }
539
663
  ]
540
664
  },
541
665
  "proxy": {
542
- "address": "0x8bC1Aff4D3de49bD9B710c31638d82E502CF4C68",
666
+ "address": "0x79699F0F4207d97819971f7D0F7b924D4E5A7a07",
543
667
  "abi": [
544
668
  {
545
669
  "type": "constructor",
546
670
  "inputs": [
547
671
  {
548
- "name": "_rangoDiamondAddress",
672
+ "name": "_plutonContractAddress",
549
673
  "type": "address",
550
674
  "internalType": "address"
551
675
  },
552
676
  {
553
- "name": "_plutonContractAddress",
677
+ "name": "_baseTokenAddress",
554
678
  "type": "address",
555
679
  "internalType": "address"
556
680
  },
557
681
  {
558
- "name": "_baseTokenAddress",
682
+ "name": "_swapRouterAddress",
559
683
  "type": "address",
560
684
  "internalType": "address"
561
685
  }
@@ -567,7 +691,11 @@
567
691
  "name": "baseTokenAddress",
568
692
  "inputs": [],
569
693
  "outputs": [
570
- { "name": "", "type": "address", "internalType": "address" }
694
+ {
695
+ "name": "",
696
+ "type": "address",
697
+ "internalType": "address"
698
+ }
571
699
  ],
572
700
  "stateMutability": "view"
573
701
  },
@@ -586,28 +714,33 @@
586
714
  },
587
715
  {
588
716
  "type": "function",
589
- "name": "rangoDiamondAddress",
590
- "inputs": [],
591
- "outputs": [
592
- { "name": "", "type": "address", "internalType": "address" }
593
- ],
594
- "stateMutability": "view"
595
- },
596
- {
597
- "type": "function",
598
- "name": "swapAndpluton",
717
+ "name": "swapAndPluton",
599
718
  "inputs": [
600
719
  {
601
- "name": "plutonRequest",
720
+ "name": "request",
602
721
  "type": "tuple",
603
- "internalType": "struct IPlutonMiddleware.PlutonRequest",
722
+ "internalType": "struct IPlutonMiddleware.PlutonAndSwapRequest",
604
723
  "components": [
605
- { "name": "id", "type": "bytes", "internalType": "bytes" },
724
+ {
725
+ "name": "id",
726
+ "type": "bytes",
727
+ "internalType": "bytes"
728
+ },
606
729
  {
607
730
  "name": "user",
608
731
  "type": "address",
609
732
  "internalType": "address"
610
733
  },
734
+ {
735
+ "name": "tokenInAddress",
736
+ "type": "address",
737
+ "internalType": "address"
738
+ },
739
+ {
740
+ "name": "amountIn",
741
+ "type": "uint256",
742
+ "internalType": "uint256"
743
+ },
611
744
  {
612
745
  "name": "initiationExpiry",
613
746
  "type": "uint256",
@@ -622,29 +755,40 @@
622
755
  "name": "orderData",
623
756
  "type": "bytes",
624
757
  "internalType": "bytes"
758
+ },
759
+ {
760
+ "name": "swapCallData",
761
+ "type": "bytes",
762
+ "internalType": "bytes"
625
763
  }
626
764
  ]
627
- },
765
+ }
766
+ ],
767
+ "outputs": [],
768
+ "stateMutability": "payable"
769
+ },
770
+ {
771
+ "type": "function",
772
+ "name": "swapRouterAddress",
773
+ "inputs": [],
774
+ "outputs": [
628
775
  {
629
- "name": "srcTokenAddress",
776
+ "name": "",
630
777
  "type": "address",
631
778
  "internalType": "address"
632
- },
633
- {
634
- "name": "amountIn",
635
- "type": "uint256",
636
- "internalType": "uint256"
637
- },
638
- { "name": "swapCallData", "type": "bytes", "internalType": "bytes" }
779
+ }
639
780
  ],
640
- "outputs": [],
641
- "stateMutability": "payable"
781
+ "stateMutability": "view"
642
782
  },
643
- { "type": "error", "name": "RangoSwapFailed", "inputs": [] },
644
783
  {
645
784
  "type": "error",
646
785
  "name": "ReentrancyGuardReentrantCall",
647
786
  "inputs": []
787
+ },
788
+ {
789
+ "type": "error",
790
+ "name": "SwapFailed",
791
+ "inputs": []
648
792
  }
649
793
  ]
650
794
  }
@@ -674,7 +818,11 @@
674
818
  "type": "address",
675
819
  "internalType": "address"
676
820
  },
677
- { "name": "amount", "type": "uint256", "internalType": "uint256" }
821
+ {
822
+ "name": "amount",
823
+ "type": "uint256",
824
+ "internalType": "uint256"
825
+ }
678
826
  ],
679
827
  "outputs": [],
680
828
  "stateMutability": "nonpayable"
@@ -683,7 +831,11 @@
683
831
  "type": "function",
684
832
  "name": "claimAffiliate",
685
833
  "inputs": [
686
- { "name": "signature", "type": "bytes", "internalType": "bytes" },
834
+ {
835
+ "name": "signature",
836
+ "type": "bytes",
837
+ "internalType": "bytes"
838
+ },
687
839
  {
688
840
  "name": "affiliateAddress",
689
841
  "type": "address",
@@ -694,7 +846,11 @@
694
846
  "type": "address",
695
847
  "internalType": "address"
696
848
  },
697
- { "name": "amount", "type": "uint256", "internalType": "uint256" }
849
+ {
850
+ "name": "amount",
851
+ "type": "uint256",
852
+ "internalType": "uint256"
853
+ }
698
854
  ],
699
855
  "outputs": [],
700
856
  "stateMutability": "nonpayable"
@@ -703,7 +859,11 @@
703
859
  "type": "function",
704
860
  "name": "claimSolver",
705
861
  "inputs": [
706
- { "name": "signature", "type": "bytes", "internalType": "bytes" },
862
+ {
863
+ "name": "signature",
864
+ "type": "bytes",
865
+ "internalType": "bytes"
866
+ },
707
867
  {
708
868
  "name": "claimerAddress",
709
869
  "type": "address",
@@ -714,7 +874,11 @@
714
874
  "type": "address",
715
875
  "internalType": "address"
716
876
  },
717
- { "name": "amount", "type": "uint256", "internalType": "uint256" }
877
+ {
878
+ "name": "amount",
879
+ "type": "uint256",
880
+ "internalType": "uint256"
881
+ }
718
882
  ],
719
883
  "outputs": [],
720
884
  "stateMutability": "nonpayable"
@@ -724,16 +888,36 @@
724
888
  "name": "eip712Domain",
725
889
  "inputs": [],
726
890
  "outputs": [
727
- { "name": "fields", "type": "bytes1", "internalType": "bytes1" },
728
- { "name": "name", "type": "string", "internalType": "string" },
729
- { "name": "version", "type": "string", "internalType": "string" },
730
- { "name": "chainId", "type": "uint256", "internalType": "uint256" },
891
+ {
892
+ "name": "fields",
893
+ "type": "bytes1",
894
+ "internalType": "bytes1"
895
+ },
896
+ {
897
+ "name": "name",
898
+ "type": "string",
899
+ "internalType": "string"
900
+ },
901
+ {
902
+ "name": "version",
903
+ "type": "string",
904
+ "internalType": "string"
905
+ },
906
+ {
907
+ "name": "chainId",
908
+ "type": "uint256",
909
+ "internalType": "uint256"
910
+ },
731
911
  {
732
912
  "name": "verifyingContract",
733
913
  "type": "address",
734
914
  "internalType": "address"
735
915
  },
736
- { "name": "salt", "type": "bytes32", "internalType": "bytes32" },
916
+ {
917
+ "name": "salt",
918
+ "type": "bytes32",
919
+ "internalType": "bytes32"
920
+ },
737
921
  {
738
922
  "name": "extensions",
739
923
  "type": "uint256[]",
@@ -819,7 +1003,11 @@
819
1003
  "name": "owner",
820
1004
  "inputs": [],
821
1005
  "outputs": [
822
- { "name": "", "type": "address", "internalType": "address" }
1006
+ {
1007
+ "name": "",
1008
+ "type": "address",
1009
+ "internalType": "address"
1010
+ }
823
1011
  ],
824
1012
  "stateMutability": "view"
825
1013
  },
@@ -832,7 +1020,11 @@
832
1020
  "type": "tuple",
833
1021
  "internalType": "struct PlutonContract.PlutonRequest",
834
1022
  "components": [
835
- { "name": "id", "type": "bytes", "internalType": "bytes" },
1023
+ {
1024
+ "name": "id",
1025
+ "type": "bytes",
1026
+ "internalType": "bytes"
1027
+ },
836
1028
  {
837
1029
  "name": "user",
838
1030
  "type": "address",
@@ -873,7 +1065,11 @@
873
1065
  "type": "function",
874
1066
  "name": "refundUser",
875
1067
  "inputs": [
876
- { "name": "signature", "type": "bytes", "internalType": "bytes" },
1068
+ {
1069
+ "name": "signature",
1070
+ "type": "bytes",
1071
+ "internalType": "bytes"
1072
+ },
877
1073
  {
878
1074
  "name": "refundAddress",
879
1075
  "type": "address",
@@ -884,7 +1080,11 @@
884
1080
  "type": "address",
885
1081
  "internalType": "address"
886
1082
  },
887
- { "name": "amount", "type": "uint256", "internalType": "uint256" }
1083
+ {
1084
+ "name": "amount",
1085
+ "type": "uint256",
1086
+ "internalType": "uint256"
1087
+ }
888
1088
  ],
889
1089
  "outputs": [],
890
1090
  "stateMutability": "nonpayable"
@@ -900,7 +1100,11 @@
900
1100
  "type": "function",
901
1101
  "name": "transferOwnership",
902
1102
  "inputs": [
903
- { "name": "newOwner", "type": "address", "internalType": "address" }
1103
+ {
1104
+ "name": "newOwner",
1105
+ "type": "address",
1106
+ "internalType": "address"
1107
+ }
904
1108
  ],
905
1109
  "outputs": [],
906
1110
  "stateMutability": "nonpayable"
@@ -1045,7 +1249,11 @@
1045
1249
  "indexed": false,
1046
1250
  "internalType": "struct PlutonContract.PlutonRequest",
1047
1251
  "components": [
1048
- { "name": "id", "type": "bytes", "internalType": "bytes" },
1252
+ {
1253
+ "name": "id",
1254
+ "type": "bytes",
1255
+ "internalType": "bytes"
1256
+ },
1049
1257
  {
1050
1258
  "name": "user",
1051
1259
  "type": "address",
@@ -1104,58 +1312,98 @@
1104
1312
  "internalType": "address"
1105
1313
  },
1106
1314
  {
1107
- "name": "amount",
1315
+ "name": "amount",
1316
+ "type": "uint256",
1317
+ "indexed": true,
1318
+ "internalType": "uint256"
1319
+ },
1320
+ {
1321
+ "name": "balanceDifference",
1322
+ "type": "uint256",
1323
+ "indexed": false,
1324
+ "internalType": "uint256"
1325
+ }
1326
+ ],
1327
+ "anonymous": false
1328
+ },
1329
+ {
1330
+ "type": "error",
1331
+ "name": "AlreadyResolved",
1332
+ "inputs": []
1333
+ },
1334
+ {
1335
+ "type": "error",
1336
+ "name": "DeadlineReached",
1337
+ "inputs": [
1338
+ {
1339
+ "name": "",
1108
1340
  "type": "uint256",
1109
- "indexed": true,
1110
1341
  "internalType": "uint256"
1111
1342
  },
1112
1343
  {
1113
- "name": "balanceDifference",
1344
+ "name": "",
1114
1345
  "type": "uint256",
1115
- "indexed": false,
1116
1346
  "internalType": "uint256"
1117
1347
  }
1118
- ],
1119
- "anonymous": false
1348
+ ]
1120
1349
  },
1121
- { "type": "error", "name": "AlreadyResolved", "inputs": [] },
1122
1350
  {
1123
1351
  "type": "error",
1124
- "name": "DeadlineReached",
1125
- "inputs": [
1126
- { "name": "", "type": "uint256", "internalType": "uint256" },
1127
- { "name": "", "type": "uint256", "internalType": "uint256" }
1128
- ]
1352
+ "name": "ECDSAInvalidSignature",
1353
+ "inputs": []
1129
1354
  },
1130
- { "type": "error", "name": "ECDSAInvalidSignature", "inputs": [] },
1131
1355
  {
1132
1356
  "type": "error",
1133
1357
  "name": "ECDSAInvalidSignatureLength",
1134
1358
  "inputs": [
1135
- { "name": "length", "type": "uint256", "internalType": "uint256" }
1359
+ {
1360
+ "name": "length",
1361
+ "type": "uint256",
1362
+ "internalType": "uint256"
1363
+ }
1136
1364
  ]
1137
1365
  },
1138
1366
  {
1139
1367
  "type": "error",
1140
1368
  "name": "ECDSAInvalidSignatureS",
1141
1369
  "inputs": [
1142
- { "name": "s", "type": "bytes32", "internalType": "bytes32" }
1370
+ {
1371
+ "name": "s",
1372
+ "type": "bytes32",
1373
+ "internalType": "bytes32"
1374
+ }
1143
1375
  ]
1144
1376
  },
1145
- { "type": "error", "name": "EthNotTransferred", "inputs": [] },
1146
- { "type": "error", "name": "InvalidShortString", "inputs": [] },
1377
+ {
1378
+ "type": "error",
1379
+ "name": "EthNotTransferred",
1380
+ "inputs": []
1381
+ },
1382
+ {
1383
+ "type": "error",
1384
+ "name": "InvalidShortString",
1385
+ "inputs": []
1386
+ },
1147
1387
  {
1148
1388
  "type": "error",
1149
1389
  "name": "OwnableInvalidOwner",
1150
1390
  "inputs": [
1151
- { "name": "owner", "type": "address", "internalType": "address" }
1391
+ {
1392
+ "name": "owner",
1393
+ "type": "address",
1394
+ "internalType": "address"
1395
+ }
1152
1396
  ]
1153
1397
  },
1154
1398
  {
1155
1399
  "type": "error",
1156
1400
  "name": "OwnableUnauthorizedAccount",
1157
1401
  "inputs": [
1158
- { "name": "account", "type": "address", "internalType": "address" }
1402
+ {
1403
+ "name": "account",
1404
+ "type": "address",
1405
+ "internalType": "address"
1406
+ }
1159
1407
  ]
1160
1408
  },
1161
1409
  {
@@ -1167,45 +1415,65 @@
1167
1415
  "type": "error",
1168
1416
  "name": "SafeERC20FailedOperation",
1169
1417
  "inputs": [
1170
- { "name": "token", "type": "address", "internalType": "address" }
1418
+ {
1419
+ "name": "token",
1420
+ "type": "address",
1421
+ "internalType": "address"
1422
+ }
1171
1423
  ]
1172
1424
  },
1173
- { "type": "error", "name": "SignatureFailed", "inputs": [] },
1425
+ {
1426
+ "type": "error",
1427
+ "name": "SignatureFailed",
1428
+ "inputs": []
1429
+ },
1174
1430
  {
1175
1431
  "type": "error",
1176
1432
  "name": "StringTooLong",
1177
1433
  "inputs": [
1178
- { "name": "str", "type": "string", "internalType": "string" }
1434
+ {
1435
+ "name": "str",
1436
+ "type": "string",
1437
+ "internalType": "string"
1438
+ }
1179
1439
  ]
1180
1440
  },
1181
1441
  {
1182
1442
  "type": "error",
1183
1443
  "name": "ValueNotEnough",
1184
1444
  "inputs": [
1185
- { "name": "", "type": "uint256", "internalType": "uint256" },
1186
- { "name": "", "type": "uint256", "internalType": "uint256" }
1445
+ {
1446
+ "name": "",
1447
+ "type": "uint256",
1448
+ "internalType": "uint256"
1449
+ },
1450
+ {
1451
+ "name": "",
1452
+ "type": "uint256",
1453
+ "internalType": "uint256"
1454
+ }
1187
1455
  ]
1188
1456
  }
1189
1457
  ]
1190
1458
  },
1191
1459
  "proxy": {
1192
- "address": "0x9498873819b83C144cC7cF824493Ab1dCa29ab3F",
1460
+ "address": "0x8bC1Aff4D3de49bD9B710c31638d82E502CF4C68",
1193
1461
  "abi": [
1194
1462
  {
1195
1463
  "type": "constructor",
1196
1464
  "inputs": [
1197
1465
  {
1198
- "name": "_rangoDiamondAddress",
1466
+ "name": "_plutonContractAddress",
1199
1467
  "type": "address",
1200
1468
  "internalType": "address"
1201
1469
  },
1202
1470
  {
1203
- "name": "_plutonContractAddress",
1471
+ "name": "_baseTokenAddress",
1204
1472
  "type": "address",
1205
1473
  "internalType": "address"
1206
1474
  },
1207
1475
  {
1208
- "name": "_baseTokenAddress",
1476
+ "name": "_swapRouterAddress",
1209
1477
  "type": "address",
1210
1478
  "internalType": "address"
1211
1479
  }
@@ -1217,7 +1485,11 @@
1217
1485
  "name": "baseTokenAddress",
1218
1486
  "inputs": [],
1219
1487
  "outputs": [
1220
- { "name": "", "type": "address", "internalType": "address" }
1488
+ {
1489
+ "name": "",
1490
+ "type": "address",
1491
+ "internalType": "address"
1492
+ }
1221
1493
  ],
1222
1494
  "stateMutability": "view"
1223
1495
  },
@@ -1236,28 +1508,33 @@
1236
1508
  },
1237
1509
  {
1238
1510
  "type": "function",
1239
- "name": "rangoDiamondAddress",
1240
- "inputs": [],
1241
- "outputs": [
1242
- { "name": "", "type": "address", "internalType": "address" }
1243
- ],
1244
- "stateMutability": "view"
1245
- },
1246
- {
1247
- "type": "function",
1248
- "name": "swapAndpluton",
1511
+ "name": "swapAndPluton",
1249
1512
  "inputs": [
1250
1513
  {
1251
- "name": "plutonRequest",
1514
+ "name": "request",
1252
1515
  "type": "tuple",
1253
- "internalType": "struct IPlutonMiddleware.PlutonRequest",
1516
+ "internalType": "struct IPlutonMiddleware.PlutonAndSwapRequest",
1254
1517
  "components": [
1255
- { "name": "id", "type": "bytes", "internalType": "bytes" },
1518
+ {
1519
+ "name": "id",
1520
+ "type": "bytes",
1521
+ "internalType": "bytes"
1522
+ },
1256
1523
  {
1257
1524
  "name": "user",
1258
1525
  "type": "address",
1259
1526
  "internalType": "address"
1260
1527
  },
1528
+ {
1529
+ "name": "tokenInAddress",
1530
+ "type": "address",
1531
+ "internalType": "address"
1532
+ },
1533
+ {
1534
+ "name": "amountIn",
1535
+ "type": "uint256",
1536
+ "internalType": "uint256"
1537
+ },
1261
1538
  {
1262
1539
  "name": "initiationExpiry",
1263
1540
  "type": "uint256",
@@ -1272,29 +1549,40 @@
1272
1549
  "name": "orderData",
1273
1550
  "type": "bytes",
1274
1551
  "internalType": "bytes"
1552
+ },
1553
+ {
1554
+ "name": "swapCallData",
1555
+ "type": "bytes",
1556
+ "internalType": "bytes"
1275
1557
  }
1276
1558
  ]
1277
- },
1559
+ }
1560
+ ],
1561
+ "outputs": [],
1562
+ "stateMutability": "payable"
1563
+ },
1564
+ {
1565
+ "type": "function",
1566
+ "name": "swapRouterAddress",
1567
+ "inputs": [],
1568
+ "outputs": [
1278
1569
  {
1279
- "name": "srcTokenAddress",
1570
+ "name": "",
1280
1571
  "type": "address",
1281
1572
  "internalType": "address"
1282
- },
1283
- {
1284
- "name": "amountIn",
1285
- "type": "uint256",
1286
- "internalType": "uint256"
1287
- },
1288
- { "name": "swapCallData", "type": "bytes", "internalType": "bytes" }
1573
+ }
1289
1574
  ],
1290
- "outputs": [],
1291
- "stateMutability": "payable"
1575
+ "stateMutability": "view"
1292
1576
  },
1293
- { "type": "error", "name": "RangoSwapFailed", "inputs": [] },
1294
1577
  {
1295
1578
  "type": "error",
1296
1579
  "name": "ReentrancyGuardReentrantCall",
1297
1580
  "inputs": []
1581
+ },
1582
+ {
1583
+ "type": "error",
1584
+ "name": "SwapFailed",
1585
+ "inputs": []
1298
1586
  }
1299
1587
  ]
1300
1588
  }
@@ -1963,119 +2251,132 @@
1963
2251
  ]
1964
2252
  },
1965
2253
  "proxy": {
1966
- "address": "0xc4e230092F5B238ae267E5E74370D55414D7b746",
2254
+ "address": "0x9498873819b83C144cC7cF824493Ab1dCa29ab3F",
1967
2255
  "abi": [
1968
2256
  {
2257
+ "type": "constructor",
1969
2258
  "inputs": [
1970
2259
  {
1971
- "internalType": "address",
1972
- "name": "_agniMultiCall3",
1973
- "type": "address"
1974
- },
1975
- {
1976
- "internalType": "address",
1977
2260
  "name": "_plutonContractAddress",
1978
- "type": "address"
2261
+ "type": "address",
2262
+ "internalType": "address"
1979
2263
  },
1980
2264
  {
1981
- "internalType": "address",
1982
2265
  "name": "_baseTokenAddress",
1983
- "type": "address"
2266
+ "type": "address",
2267
+ "internalType": "address"
2268
+ },
2269
+ {
2270
+ "name": "_swapRouterAddress",
2271
+ "type": "address",
2272
+ "internalType": "address"
1984
2273
  }
1985
2274
  ],
1986
- "stateMutability": "nonpayable",
1987
- "type": "constructor"
1988
- },
1989
- {
1990
- "inputs": [],
1991
- "name": "ReentrancyGuardReentrantCall",
1992
- "type": "error"
1993
- },
1994
- {
1995
- "inputs": [],
1996
- "name": "SwapFailed",
1997
- "type": "error"
2275
+ "stateMutability": "nonpayable"
1998
2276
  },
1999
2277
  {
2000
- "inputs": [],
2278
+ "type": "function",
2001
2279
  "name": "baseTokenAddress",
2280
+ "inputs": [],
2002
2281
  "outputs": [
2003
2282
  {
2004
- "internalType": "address",
2005
2283
  "name": "",
2006
- "type": "address"
2284
+ "type": "address",
2285
+ "internalType": "address"
2007
2286
  }
2008
2287
  ],
2009
- "stateMutability": "view",
2010
- "type": "function"
2288
+ "stateMutability": "view"
2011
2289
  },
2012
2290
  {
2013
- "inputs": [],
2291
+ "type": "function",
2014
2292
  "name": "plutonContract",
2293
+ "inputs": [],
2015
2294
  "outputs": [
2016
2295
  {
2017
- "internalType": "contract PlutonContract",
2018
2296
  "name": "",
2019
- "type": "address"
2297
+ "type": "address",
2298
+ "internalType": "contract PlutonContract"
2020
2299
  }
2021
2300
  ],
2022
- "stateMutability": "view",
2023
- "type": "function"
2301
+ "stateMutability": "view"
2024
2302
  },
2025
2303
  {
2304
+ "type": "function",
2305
+ "name": "swapAndPluton",
2026
2306
  "inputs": [
2027
2307
  {
2308
+ "name": "request",
2309
+ "type": "tuple",
2310
+ "internalType": "struct IPlutonMiddleware.PlutonAndSwapRequest",
2028
2311
  "components": [
2029
2312
  {
2030
- "internalType": "bytes",
2031
2313
  "name": "id",
2032
- "type": "bytes"
2314
+ "type": "bytes",
2315
+ "internalType": "bytes"
2033
2316
  },
2034
2317
  {
2035
- "internalType": "address",
2036
2318
  "name": "user",
2037
- "type": "address"
2319
+ "type": "address",
2320
+ "internalType": "address"
2321
+ },
2322
+ {
2323
+ "name": "tokenInAddress",
2324
+ "type": "address",
2325
+ "internalType": "address"
2326
+ },
2327
+ {
2328
+ "name": "amountIn",
2329
+ "type": "uint256",
2330
+ "internalType": "uint256"
2038
2331
  },
2039
2332
  {
2040
- "internalType": "uint256",
2041
2333
  "name": "initiationExpiry",
2042
- "type": "uint256"
2334
+ "type": "uint256",
2335
+ "internalType": "uint256"
2043
2336
  },
2044
2337
  {
2045
- "internalType": "bytes32",
2046
2338
  "name": "orderDataType",
2047
- "type": "bytes32"
2339
+ "type": "bytes32",
2340
+ "internalType": "bytes32"
2048
2341
  },
2049
2342
  {
2050
- "internalType": "bytes",
2051
2343
  "name": "orderData",
2052
- "type": "bytes"
2344
+ "type": "bytes",
2345
+ "internalType": "bytes"
2346
+ },
2347
+ {
2348
+ "name": "swapCallData",
2349
+ "type": "bytes",
2350
+ "internalType": "bytes"
2053
2351
  }
2054
- ],
2055
- "internalType": "struct IPlutonMiddleware.PlutonRequest",
2056
- "name": "plutonRequest",
2057
- "type": "tuple"
2058
- },
2059
- {
2060
- "internalType": "address",
2061
- "name": "srcTokenAddress",
2062
- "type": "address"
2063
- },
2064
- {
2065
- "internalType": "uint256",
2066
- "name": "amountIn",
2067
- "type": "uint256"
2068
- },
2069
- {
2070
- "internalType": "bytes",
2071
- "name": "swapCallData",
2072
- "type": "bytes"
2352
+ ]
2073
2353
  }
2074
2354
  ],
2075
- "name": "swapAndpluton",
2076
2355
  "outputs": [],
2077
- "stateMutability": "payable",
2078
- "type": "function"
2356
+ "stateMutability": "payable"
2357
+ },
2358
+ {
2359
+ "type": "function",
2360
+ "name": "swapRouterAddress",
2361
+ "inputs": [],
2362
+ "outputs": [
2363
+ {
2364
+ "name": "",
2365
+ "type": "address",
2366
+ "internalType": "address"
2367
+ }
2368
+ ],
2369
+ "stateMutability": "view"
2370
+ },
2371
+ {
2372
+ "type": "error",
2373
+ "name": "ReentrancyGuardReentrantCall",
2374
+ "inputs": []
2375
+ },
2376
+ {
2377
+ "type": "error",
2378
+ "name": "SwapFailed",
2379
+ "inputs": []
2079
2380
  }
2080
2381
  ]
2081
2382
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plutonlabs/sdk",
3
- "version": "0.0.40-beta",
3
+ "version": "0.0.42-beta",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [