@d9-network/spec 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/.papi/contracts/burnManager.json +1300 -0
  2. package/.papi/contracts/burnMining.json +1385 -0
  3. package/.papi/contracts/crossChainTransfer.json +1693 -0
  4. package/.papi/contracts/marketMaker.json +1470 -0
  5. package/.papi/contracts/merchantMining.json +1750 -0
  6. package/.papi/contracts/miningPool.json +1019 -0
  7. package/.papi/contracts/nodeReward.json +1214 -0
  8. package/.papi/contracts/usdt.json +1036 -0
  9. package/.papi/descriptors/.gitignore +3 -0
  10. package/.papi/descriptors/package.json +24 -0
  11. package/.papi/metadata/d9.scale +0 -0
  12. package/.papi/polkadot-api.json +22 -0
  13. package/assets/ABIs/burn-manager.json +1300 -0
  14. package/assets/ABIs/burn-mining.json +1385 -0
  15. package/assets/ABIs/cross-chain-transfer.json +1693 -0
  16. package/assets/ABIs/market-maker.json +1470 -0
  17. package/assets/ABIs/merchant-mining.json +1750 -0
  18. package/assets/ABIs/mining-pool.json +1019 -0
  19. package/assets/ABIs/node-reward.json +1214 -0
  20. package/assets/ABIs/usdt.json +1036 -0
  21. package/package.json +51 -0
  22. package/scripts/papi-add-ink.ts +104 -0
  23. package/src/client.ts +68 -0
  24. package/src/index.ts +17 -0
  25. package/src/wallet/account.ts +57 -0
  26. package/src/wallet/hex.ts +30 -0
  27. package/src/wallet/index.ts +6 -0
  28. package/src/wallet/mnemonic.ts +19 -0
  29. package/src/wallet/signer.ts +9 -0
  30. package/src/wallet/sr25519.ts +42 -0
  31. package/src/wallet/ss58.ts +14 -0
  32. package/test/client.test.ts +15 -0
  33. package/test/descriptors.test.ts +32 -0
  34. package/test/wallet.test.ts +65 -0
  35. package/tsconfig.json +13 -0
  36. package/tsdown.config.ts +13 -0
@@ -0,0 +1,1693 @@
1
+ {
2
+ "source": {
3
+ "hash": "0x4beac590e0c2e670b87997c893281c9eac45c8515e51bd96d7e31a660bc75db2",
4
+ "language": "ink! 4.3.0",
5
+ "compiler": "rustc 1.76.0",
6
+ "build_info": {
7
+ "build_mode": "Release",
8
+ "cargo_contract_version": "4.0.2",
9
+ "rust_toolchain": "stable-aarch64-apple-darwin",
10
+ "wasm_opt_settings": {
11
+ "keep_debug_symbols": false,
12
+ "optimization_passes": "Z"
13
+ }
14
+ }
15
+ },
16
+ "contract": {
17
+ "name": "cross_chain_transfer",
18
+ "version": "0.1.0",
19
+ "authors": [
20
+ "D9 team tech@d9network.com"
21
+ ]
22
+ },
23
+ "image": null,
24
+ "spec": {
25
+ "constructors": [
26
+ {
27
+ "args": [
28
+ {
29
+ "label": "usdt_contract",
30
+ "type": {
31
+ "displayName": [
32
+ "AccountId"
33
+ ],
34
+ "type": 1
35
+ }
36
+ }
37
+ ],
38
+ "default": false,
39
+ "docs": [
40
+ "Constructor that initializes the `bool` value to the given `init_value`."
41
+ ],
42
+ "label": "new",
43
+ "payable": false,
44
+ "returnType": {
45
+ "displayName": [
46
+ "ink_primitives",
47
+ "ConstructorResult"
48
+ ],
49
+ "type": 7
50
+ },
51
+ "selector": "0x9bae9d5e"
52
+ }
53
+ ],
54
+ "docs": [],
55
+ "environment": {
56
+ "accountId": {
57
+ "displayName": [
58
+ "AccountId"
59
+ ],
60
+ "type": 1
61
+ },
62
+ "balance": {
63
+ "displayName": [
64
+ "Balance"
65
+ ],
66
+ "type": 5
67
+ },
68
+ "blockNumber": {
69
+ "displayName": [
70
+ "BlockNumber"
71
+ ],
72
+ "type": 28
73
+ },
74
+ "chainExtension": {
75
+ "displayName": [
76
+ "ChainExtension"
77
+ ],
78
+ "type": 29
79
+ },
80
+ "hash": {
81
+ "displayName": [
82
+ "Hash"
83
+ ],
84
+ "type": 27
85
+ },
86
+ "maxEventTopics": 4,
87
+ "timestamp": {
88
+ "displayName": [
89
+ "Timestamp"
90
+ ],
91
+ "type": 0
92
+ }
93
+ },
94
+ "events": [
95
+ {
96
+ "args": [
97
+ {
98
+ "docs": [],
99
+ "indexed": true,
100
+ "label": "transaction_id",
101
+ "type": {
102
+ "displayName": [
103
+ "String"
104
+ ],
105
+ "type": 4
106
+ }
107
+ },
108
+ {
109
+ "docs": [],
110
+ "indexed": true,
111
+ "label": "from_address",
112
+ "type": {
113
+ "displayName": [
114
+ "AccountId"
115
+ ],
116
+ "type": 1
117
+ }
118
+ },
119
+ {
120
+ "docs": [],
121
+ "indexed": true,
122
+ "label": "amount",
123
+ "type": {
124
+ "displayName": [
125
+ "u128"
126
+ ],
127
+ "type": 5
128
+ }
129
+ }
130
+ ],
131
+ "docs": [],
132
+ "label": "CommitCreated"
133
+ },
134
+ {
135
+ "args": [
136
+ {
137
+ "docs": [],
138
+ "indexed": true,
139
+ "label": "tx_id",
140
+ "type": {
141
+ "displayName": [
142
+ "String"
143
+ ],
144
+ "type": 4
145
+ }
146
+ },
147
+ {
148
+ "docs": [],
149
+ "indexed": true,
150
+ "label": "to_address",
151
+ "type": {
152
+ "displayName": [
153
+ "AccountId"
154
+ ],
155
+ "type": 1
156
+ }
157
+ },
158
+ {
159
+ "docs": [],
160
+ "indexed": true,
161
+ "label": "amount",
162
+ "type": {
163
+ "displayName": [
164
+ "u128"
165
+ ],
166
+ "type": 5
167
+ }
168
+ }
169
+ ],
170
+ "docs": [],
171
+ "label": "DispatchCompleted"
172
+ }
173
+ ],
174
+ "lang_error": {
175
+ "displayName": [
176
+ "ink",
177
+ "LangError"
178
+ ],
179
+ "type": 9
180
+ },
181
+ "messages": [
182
+ {
183
+ "args": [
184
+ {
185
+ "label": "admin",
186
+ "type": {
187
+ "displayName": [
188
+ "AccountId"
189
+ ],
190
+ "type": 1
191
+ }
192
+ }
193
+ ],
194
+ "default": false,
195
+ "docs": [],
196
+ "label": "add_transaction_admin",
197
+ "mutates": true,
198
+ "payable": false,
199
+ "returnType": {
200
+ "displayName": [
201
+ "ink",
202
+ "MessageResult"
203
+ ],
204
+ "type": 10
205
+ },
206
+ "selector": "0xec409e8a"
207
+ },
208
+ {
209
+ "args": [
210
+ {
211
+ "label": "admin",
212
+ "type": {
213
+ "displayName": [
214
+ "AccountId"
215
+ ],
216
+ "type": 1
217
+ }
218
+ }
219
+ ],
220
+ "default": false,
221
+ "docs": [],
222
+ "label": "remove_transaction_admin",
223
+ "mutates": true,
224
+ "payable": false,
225
+ "returnType": {
226
+ "displayName": [
227
+ "ink",
228
+ "MessageResult"
229
+ ],
230
+ "type": 10
231
+ },
232
+ "selector": "0xb3e15c07"
233
+ },
234
+ {
235
+ "args": [],
236
+ "default": false,
237
+ "docs": [],
238
+ "label": "get_transaction_admins",
239
+ "mutates": false,
240
+ "payable": false,
241
+ "returnType": {
242
+ "displayName": [
243
+ "ink",
244
+ "MessageResult"
245
+ ],
246
+ "type": 14
247
+ },
248
+ "selector": "0xa81d32bb"
249
+ },
250
+ {
251
+ "args": [
252
+ {
253
+ "label": "admin",
254
+ "type": {
255
+ "displayName": [
256
+ "AccountId"
257
+ ],
258
+ "type": 1
259
+ }
260
+ }
261
+ ],
262
+ "default": false,
263
+ "docs": [],
264
+ "label": "is_transaction_admin",
265
+ "mutates": false,
266
+ "payable": false,
267
+ "returnType": {
268
+ "displayName": [
269
+ "ink",
270
+ "MessageResult"
271
+ ],
272
+ "type": 15
273
+ },
274
+ "selector": "0x7a996b18"
275
+ },
276
+ {
277
+ "args": [
278
+ {
279
+ "label": "user_id",
280
+ "type": {
281
+ "displayName": [
282
+ "AccountId"
283
+ ],
284
+ "type": 1
285
+ }
286
+ }
287
+ ],
288
+ "default": false,
289
+ "docs": [],
290
+ "label": "record_cancelled_tron_transfer",
291
+ "mutates": true,
292
+ "payable": false,
293
+ "returnType": {
294
+ "displayName": [
295
+ "ink",
296
+ "MessageResult"
297
+ ],
298
+ "type": 10
299
+ },
300
+ "selector": "0x1617c8b4"
301
+ },
302
+ {
303
+ "args": [
304
+ {
305
+ "label": "user_id",
306
+ "type": {
307
+ "displayName": [
308
+ "AccountId"
309
+ ],
310
+ "type": 1
311
+ }
312
+ }
313
+ ],
314
+ "default": false,
315
+ "docs": [],
316
+ "label": "generate_tx_id",
317
+ "mutates": false,
318
+ "payable": false,
319
+ "returnType": {
320
+ "displayName": [
321
+ "ink",
322
+ "MessageResult"
323
+ ],
324
+ "type": 17
325
+ },
326
+ "selector": "0xfc9bd990"
327
+ },
328
+ {
329
+ "args": [
330
+ {
331
+ "label": "user_id",
332
+ "type": {
333
+ "displayName": [
334
+ "AccountId"
335
+ ],
336
+ "type": 1
337
+ }
338
+ }
339
+ ],
340
+ "default": false,
341
+ "docs": [
342
+ " get last transaction. function is called on both chains."
343
+ ],
344
+ "label": "get_last_transaction",
345
+ "mutates": false,
346
+ "payable": false,
347
+ "returnType": {
348
+ "displayName": [
349
+ "ink",
350
+ "MessageResult"
351
+ ],
352
+ "type": 18
353
+ },
354
+ "selector": "0x7081dd38"
355
+ },
356
+ {
357
+ "args": [
358
+ {
359
+ "label": "user_id",
360
+ "type": {
361
+ "displayName": [
362
+ "AccountId"
363
+ ],
364
+ "type": 1
365
+ }
366
+ }
367
+ ],
368
+ "default": false,
369
+ "docs": [
370
+ " Helper function to get the current transaction nonce for a user"
371
+ ],
372
+ "label": "get_current_nonce",
373
+ "mutates": false,
374
+ "payable": false,
375
+ "returnType": {
376
+ "displayName": [
377
+ "ink",
378
+ "MessageResult"
379
+ ],
380
+ "type": 24
381
+ },
382
+ "selector": "0xe5219595"
383
+ },
384
+ {
385
+ "args": [
386
+ {
387
+ "label": "tx_id",
388
+ "type": {
389
+ "displayName": [
390
+ "String"
391
+ ],
392
+ "type": 4
393
+ }
394
+ }
395
+ ],
396
+ "default": false,
397
+ "docs": [],
398
+ "label": "get_transaction",
399
+ "mutates": false,
400
+ "payable": false,
401
+ "returnType": {
402
+ "displayName": [
403
+ "ink",
404
+ "MessageResult"
405
+ ],
406
+ "type": 18
407
+ },
408
+ "selector": "0xfeeb858e"
409
+ },
410
+ {
411
+ "args": [
412
+ {
413
+ "label": "code_hash",
414
+ "type": {
415
+ "displayName": [],
416
+ "type": 2
417
+ }
418
+ }
419
+ ],
420
+ "default": false,
421
+ "docs": [
422
+ " Modifies the code which is used to execute calls to this contract address (`AccountId`).",
423
+ "",
424
+ " We use this to upgrade the contract logic. We don't do any authorization here, any caller",
425
+ " can execute this method. In a production contract you would do some authorization here."
426
+ ],
427
+ "label": "set_code",
428
+ "mutates": true,
429
+ "payable": false,
430
+ "returnType": {
431
+ "displayName": [
432
+ "ink",
433
+ "MessageResult"
434
+ ],
435
+ "type": 7
436
+ },
437
+ "selector": "0x694fb50f"
438
+ },
439
+ {
440
+ "args": [
441
+ {
442
+ "label": "transaction_id",
443
+ "type": {
444
+ "displayName": [
445
+ "String"
446
+ ],
447
+ "type": 4
448
+ }
449
+ },
450
+ {
451
+ "label": "from_address",
452
+ "type": {
453
+ "displayName": [
454
+ "AccountId"
455
+ ],
456
+ "type": 1
457
+ }
458
+ },
459
+ {
460
+ "label": "to_address",
461
+ "type": {
462
+ "displayName": [],
463
+ "type": 23
464
+ }
465
+ },
466
+ {
467
+ "label": "amount",
468
+ "type": {
469
+ "displayName": [
470
+ "Balance"
471
+ ],
472
+ "type": 5
473
+ }
474
+ }
475
+ ],
476
+ "default": false,
477
+ "docs": [],
478
+ "label": "asset_commit",
479
+ "mutates": true,
480
+ "payable": false,
481
+ "returnType": {
482
+ "displayName": [
483
+ "ink",
484
+ "MessageResult"
485
+ ],
486
+ "type": 25
487
+ },
488
+ "selector": "0xc2ad66bb"
489
+ },
490
+ {
491
+ "args": [
492
+ {
493
+ "label": "from_address",
494
+ "type": {
495
+ "displayName": [],
496
+ "type": 23
497
+ }
498
+ },
499
+ {
500
+ "label": "to_address",
501
+ "type": {
502
+ "displayName": [
503
+ "AccountId"
504
+ ],
505
+ "type": 1
506
+ }
507
+ },
508
+ {
509
+ "label": "amount",
510
+ "type": {
511
+ "displayName": [
512
+ "Balance"
513
+ ],
514
+ "type": 5
515
+ }
516
+ }
517
+ ],
518
+ "default": false,
519
+ "docs": [],
520
+ "label": "asset_dispatch",
521
+ "mutates": true,
522
+ "payable": false,
523
+ "returnType": {
524
+ "displayName": [
525
+ "ink",
526
+ "MessageResult"
527
+ ],
528
+ "type": 25
529
+ },
530
+ "selector": "0x535b25a5"
531
+ },
532
+ {
533
+ "args": [
534
+ {
535
+ "label": "new_controller",
536
+ "type": {
537
+ "displayName": [
538
+ "AccountId"
539
+ ],
540
+ "type": 1
541
+ }
542
+ }
543
+ ],
544
+ "default": false,
545
+ "docs": [],
546
+ "label": "change_controller",
547
+ "mutates": true,
548
+ "payable": false,
549
+ "returnType": {
550
+ "displayName": [
551
+ "ink",
552
+ "MessageResult"
553
+ ],
554
+ "type": 7
555
+ },
556
+ "selector": "0xc92e346d"
557
+ },
558
+ {
559
+ "args": [
560
+ {
561
+ "label": "new_admin",
562
+ "type": {
563
+ "displayName": [
564
+ "AccountId"
565
+ ],
566
+ "type": 1
567
+ }
568
+ }
569
+ ],
570
+ "default": false,
571
+ "docs": [],
572
+ "label": "relinquish_admin",
573
+ "mutates": true,
574
+ "payable": false,
575
+ "returnType": {
576
+ "displayName": [
577
+ "ink",
578
+ "MessageResult"
579
+ ],
580
+ "type": 7
581
+ },
582
+ "selector": "0xda7dbaee"
583
+ },
584
+ {
585
+ "args": [],
586
+ "default": false,
587
+ "docs": [],
588
+ "label": "claim_admin",
589
+ "mutates": true,
590
+ "payable": false,
591
+ "returnType": {
592
+ "displayName": [
593
+ "ink",
594
+ "MessageResult"
595
+ ],
596
+ "type": 7
597
+ },
598
+ "selector": "0xa8656c6c"
599
+ },
600
+ {
601
+ "args": [],
602
+ "default": false,
603
+ "docs": [],
604
+ "label": "cancel_admin_transfer",
605
+ "mutates": true,
606
+ "payable": false,
607
+ "returnType": {
608
+ "displayName": [
609
+ "ink",
610
+ "MessageResult"
611
+ ],
612
+ "type": 7
613
+ },
614
+ "selector": "0xd45e3d78"
615
+ }
616
+ ]
617
+ },
618
+ "storage": {
619
+ "root": {
620
+ "layout": {
621
+ "struct": {
622
+ "fields": [
623
+ {
624
+ "layout": {
625
+ "root": {
626
+ "layout": {
627
+ "leaf": {
628
+ "key": "0x8eb615e1",
629
+ "ty": 0
630
+ }
631
+ },
632
+ "root_key": "0x8eb615e1"
633
+ }
634
+ },
635
+ "name": "user_transaction_nonce"
636
+ },
637
+ {
638
+ "layout": {
639
+ "leaf": {
640
+ "key": "0x00000000",
641
+ "ty": 1
642
+ }
643
+ },
644
+ "name": "super_admin"
645
+ },
646
+ {
647
+ "layout": {
648
+ "leaf": {
649
+ "key": "0x00000000",
650
+ "ty": 1
651
+ }
652
+ },
653
+ "name": "new_admin"
654
+ },
655
+ {
656
+ "layout": {
657
+ "leaf": {
658
+ "key": "0x00000000",
659
+ "ty": 1
660
+ }
661
+ },
662
+ "name": "controller"
663
+ },
664
+ {
665
+ "layout": {
666
+ "leaf": {
667
+ "key": "0x00000000",
668
+ "ty": 1
669
+ }
670
+ },
671
+ "name": "usdt_contract"
672
+ },
673
+ {
674
+ "layout": {
675
+ "root": {
676
+ "layout": {
677
+ "struct": {
678
+ "fields": [
679
+ {
680
+ "layout": {
681
+ "leaf": {
682
+ "key": "0x82645412",
683
+ "ty": 4
684
+ }
685
+ },
686
+ "name": "transaction_id"
687
+ },
688
+ {
689
+ "layout": {
690
+ "enum": {
691
+ "dispatchKey": "0x82645412",
692
+ "name": "TransactionType",
693
+ "variants": {
694
+ "0": {
695
+ "fields": [],
696
+ "name": "Commit"
697
+ },
698
+ "1": {
699
+ "fields": [],
700
+ "name": "Dispatch"
701
+ }
702
+ }
703
+ }
704
+ },
705
+ "name": "transaction_type"
706
+ },
707
+ {
708
+ "layout": {
709
+ "enum": {
710
+ "dispatchKey": "0x82645412",
711
+ "name": "Chain",
712
+ "variants": {
713
+ "0": {
714
+ "fields": [],
715
+ "name": "D9"
716
+ },
717
+ "1": {
718
+ "fields": [],
719
+ "name": "TRON"
720
+ }
721
+ }
722
+ }
723
+ },
724
+ "name": "from_chain"
725
+ },
726
+ {
727
+ "layout": {
728
+ "enum": {
729
+ "dispatchKey": "0x82645412",
730
+ "name": "AddressType",
731
+ "variants": {
732
+ "0": {
733
+ "fields": [
734
+ {
735
+ "layout": {
736
+ "array": {
737
+ "layout": {
738
+ "leaf": {
739
+ "key": "0x82645412",
740
+ "ty": 3
741
+ }
742
+ },
743
+ "len": 21,
744
+ "offset": "0x82645412"
745
+ }
746
+ },
747
+ "name": "0"
748
+ }
749
+ ],
750
+ "name": "Tron"
751
+ },
752
+ "1": {
753
+ "fields": [
754
+ {
755
+ "layout": {
756
+ "leaf": {
757
+ "key": "0x82645412",
758
+ "ty": 1
759
+ }
760
+ },
761
+ "name": "0"
762
+ }
763
+ ],
764
+ "name": "D9"
765
+ }
766
+ }
767
+ }
768
+ },
769
+ "name": "from_address"
770
+ },
771
+ {
772
+ "layout": {
773
+ "enum": {
774
+ "dispatchKey": "0x82645412",
775
+ "name": "AddressType",
776
+ "variants": {
777
+ "0": {
778
+ "fields": [
779
+ {
780
+ "layout": {
781
+ "array": {
782
+ "layout": {
783
+ "leaf": {
784
+ "key": "0x82645412",
785
+ "ty": 3
786
+ }
787
+ },
788
+ "len": 21,
789
+ "offset": "0x82645412"
790
+ }
791
+ },
792
+ "name": "0"
793
+ }
794
+ ],
795
+ "name": "Tron"
796
+ },
797
+ "1": {
798
+ "fields": [
799
+ {
800
+ "layout": {
801
+ "leaf": {
802
+ "key": "0x82645412",
803
+ "ty": 1
804
+ }
805
+ },
806
+ "name": "0"
807
+ }
808
+ ],
809
+ "name": "D9"
810
+ }
811
+ }
812
+ }
813
+ },
814
+ "name": "to_address"
815
+ },
816
+ {
817
+ "layout": {
818
+ "leaf": {
819
+ "key": "0x82645412",
820
+ "ty": 5
821
+ }
822
+ },
823
+ "name": "amount"
824
+ },
825
+ {
826
+ "layout": {
827
+ "leaf": {
828
+ "key": "0x82645412",
829
+ "ty": 0
830
+ }
831
+ },
832
+ "name": "timestamp"
833
+ }
834
+ ],
835
+ "name": "Transaction"
836
+ }
837
+ },
838
+ "root_key": "0x82645412"
839
+ }
840
+ },
841
+ "name": "transactions"
842
+ },
843
+ {
844
+ "layout": {
845
+ "leaf": {
846
+ "key": "0x00000000",
847
+ "ty": 6
848
+ }
849
+ },
850
+ "name": "transaction_admins"
851
+ }
852
+ ],
853
+ "name": "CrossChainTransfer"
854
+ }
855
+ },
856
+ "root_key": "0x00000000"
857
+ }
858
+ },
859
+ "types": [
860
+ {
861
+ "id": 0,
862
+ "type": {
863
+ "def": {
864
+ "primitive": "u64"
865
+ }
866
+ }
867
+ },
868
+ {
869
+ "id": 1,
870
+ "type": {
871
+ "def": {
872
+ "composite": {
873
+ "fields": [
874
+ {
875
+ "type": 2,
876
+ "typeName": "[u8; 32]"
877
+ }
878
+ ]
879
+ }
880
+ },
881
+ "path": [
882
+ "ink_primitives",
883
+ "types",
884
+ "AccountId"
885
+ ]
886
+ }
887
+ },
888
+ {
889
+ "id": 2,
890
+ "type": {
891
+ "def": {
892
+ "array": {
893
+ "len": 32,
894
+ "type": 3
895
+ }
896
+ }
897
+ }
898
+ },
899
+ {
900
+ "id": 3,
901
+ "type": {
902
+ "def": {
903
+ "primitive": "u8"
904
+ }
905
+ }
906
+ },
907
+ {
908
+ "id": 4,
909
+ "type": {
910
+ "def": {
911
+ "primitive": "str"
912
+ }
913
+ }
914
+ },
915
+ {
916
+ "id": 5,
917
+ "type": {
918
+ "def": {
919
+ "primitive": "u128"
920
+ }
921
+ }
922
+ },
923
+ {
924
+ "id": 6,
925
+ "type": {
926
+ "def": {
927
+ "sequence": {
928
+ "type": 1
929
+ }
930
+ }
931
+ }
932
+ },
933
+ {
934
+ "id": 7,
935
+ "type": {
936
+ "def": {
937
+ "variant": {
938
+ "variants": [
939
+ {
940
+ "fields": [
941
+ {
942
+ "type": 8
943
+ }
944
+ ],
945
+ "index": 0,
946
+ "name": "Ok"
947
+ },
948
+ {
949
+ "fields": [
950
+ {
951
+ "type": 9
952
+ }
953
+ ],
954
+ "index": 1,
955
+ "name": "Err"
956
+ }
957
+ ]
958
+ }
959
+ },
960
+ "params": [
961
+ {
962
+ "name": "T",
963
+ "type": 8
964
+ },
965
+ {
966
+ "name": "E",
967
+ "type": 9
968
+ }
969
+ ],
970
+ "path": [
971
+ "Result"
972
+ ]
973
+ }
974
+ },
975
+ {
976
+ "id": 8,
977
+ "type": {
978
+ "def": {
979
+ "tuple": []
980
+ }
981
+ }
982
+ },
983
+ {
984
+ "id": 9,
985
+ "type": {
986
+ "def": {
987
+ "variant": {
988
+ "variants": [
989
+ {
990
+ "index": 1,
991
+ "name": "CouldNotReadInput"
992
+ }
993
+ ]
994
+ }
995
+ },
996
+ "path": [
997
+ "ink_primitives",
998
+ "LangError"
999
+ ]
1000
+ }
1001
+ },
1002
+ {
1003
+ "id": 10,
1004
+ "type": {
1005
+ "def": {
1006
+ "variant": {
1007
+ "variants": [
1008
+ {
1009
+ "fields": [
1010
+ {
1011
+ "type": 11
1012
+ }
1013
+ ],
1014
+ "index": 0,
1015
+ "name": "Ok"
1016
+ },
1017
+ {
1018
+ "fields": [
1019
+ {
1020
+ "type": 9
1021
+ }
1022
+ ],
1023
+ "index": 1,
1024
+ "name": "Err"
1025
+ }
1026
+ ]
1027
+ }
1028
+ },
1029
+ "params": [
1030
+ {
1031
+ "name": "T",
1032
+ "type": 11
1033
+ },
1034
+ {
1035
+ "name": "E",
1036
+ "type": 9
1037
+ }
1038
+ ],
1039
+ "path": [
1040
+ "Result"
1041
+ ]
1042
+ }
1043
+ },
1044
+ {
1045
+ "id": 11,
1046
+ "type": {
1047
+ "def": {
1048
+ "variant": {
1049
+ "variants": [
1050
+ {
1051
+ "fields": [
1052
+ {
1053
+ "type": 8
1054
+ }
1055
+ ],
1056
+ "index": 0,
1057
+ "name": "Ok"
1058
+ },
1059
+ {
1060
+ "fields": [
1061
+ {
1062
+ "type": 12
1063
+ }
1064
+ ],
1065
+ "index": 1,
1066
+ "name": "Err"
1067
+ }
1068
+ ]
1069
+ }
1070
+ },
1071
+ "params": [
1072
+ {
1073
+ "name": "T",
1074
+ "type": 8
1075
+ },
1076
+ {
1077
+ "name": "E",
1078
+ "type": 12
1079
+ }
1080
+ ],
1081
+ "path": [
1082
+ "Result"
1083
+ ]
1084
+ }
1085
+ },
1086
+ {
1087
+ "id": 12,
1088
+ "type": {
1089
+ "def": {
1090
+ "variant": {
1091
+ "variants": [
1092
+ {
1093
+ "fields": [
1094
+ {
1095
+ "type": 1,
1096
+ "typeName": "AccountId"
1097
+ }
1098
+ ],
1099
+ "index": 0,
1100
+ "name": "Restrictedto"
1101
+ },
1102
+ {
1103
+ "index": 1,
1104
+ "name": "AmountMustBeGreaterThanZero"
1105
+ },
1106
+ {
1107
+ "index": 2,
1108
+ "name": "TransactionAlreadyExists"
1109
+ },
1110
+ {
1111
+ "fields": [
1112
+ {
1113
+ "type": 13,
1114
+ "typeName": "Chain"
1115
+ }
1116
+ ],
1117
+ "index": 3,
1118
+ "name": "InvalidAddressLength"
1119
+ },
1120
+ {
1121
+ "index": 4,
1122
+ "name": "InvalidHexString"
1123
+ },
1124
+ {
1125
+ "index": 5,
1126
+ "name": "DecodedHexLengthInvalid"
1127
+ },
1128
+ {
1129
+ "index": 6,
1130
+ "name": "TronAddressInvalidByteLength"
1131
+ },
1132
+ {
1133
+ "index": 7,
1134
+ "name": "InvalidTronAddress"
1135
+ },
1136
+ {
1137
+ "index": 8,
1138
+ "name": "TronDecodeError"
1139
+ },
1140
+ {
1141
+ "index": 9,
1142
+ "name": "UnableToSendUSDT"
1143
+ },
1144
+ {
1145
+ "index": 10,
1146
+ "name": "InsufficientAllowance"
1147
+ },
1148
+ {
1149
+ "index": 11,
1150
+ "name": "UserUSDTBalanceInsufficient"
1151
+ },
1152
+ {
1153
+ "index": 12,
1154
+ "name": "D9orUSDTProvidedLiquidityAtZero"
1155
+ },
1156
+ {
1157
+ "index": 13,
1158
+ "name": "AlreadyTransactionAdmin"
1159
+ }
1160
+ ]
1161
+ }
1162
+ },
1163
+ "path": [
1164
+ "cross_chain_transfer",
1165
+ "cross_chain_transfer",
1166
+ "Error"
1167
+ ]
1168
+ }
1169
+ },
1170
+ {
1171
+ "id": 13,
1172
+ "type": {
1173
+ "def": {
1174
+ "variant": {
1175
+ "variants": [
1176
+ {
1177
+ "index": 0,
1178
+ "name": "D9"
1179
+ },
1180
+ {
1181
+ "index": 1,
1182
+ "name": "TRON"
1183
+ }
1184
+ ]
1185
+ }
1186
+ },
1187
+ "path": [
1188
+ "cross_chain_transfer",
1189
+ "cross_chain_transfer",
1190
+ "Chain"
1191
+ ]
1192
+ }
1193
+ },
1194
+ {
1195
+ "id": 14,
1196
+ "type": {
1197
+ "def": {
1198
+ "variant": {
1199
+ "variants": [
1200
+ {
1201
+ "fields": [
1202
+ {
1203
+ "type": 6
1204
+ }
1205
+ ],
1206
+ "index": 0,
1207
+ "name": "Ok"
1208
+ },
1209
+ {
1210
+ "fields": [
1211
+ {
1212
+ "type": 9
1213
+ }
1214
+ ],
1215
+ "index": 1,
1216
+ "name": "Err"
1217
+ }
1218
+ ]
1219
+ }
1220
+ },
1221
+ "params": [
1222
+ {
1223
+ "name": "T",
1224
+ "type": 6
1225
+ },
1226
+ {
1227
+ "name": "E",
1228
+ "type": 9
1229
+ }
1230
+ ],
1231
+ "path": [
1232
+ "Result"
1233
+ ]
1234
+ }
1235
+ },
1236
+ {
1237
+ "id": 15,
1238
+ "type": {
1239
+ "def": {
1240
+ "variant": {
1241
+ "variants": [
1242
+ {
1243
+ "fields": [
1244
+ {
1245
+ "type": 16
1246
+ }
1247
+ ],
1248
+ "index": 0,
1249
+ "name": "Ok"
1250
+ },
1251
+ {
1252
+ "fields": [
1253
+ {
1254
+ "type": 9
1255
+ }
1256
+ ],
1257
+ "index": 1,
1258
+ "name": "Err"
1259
+ }
1260
+ ]
1261
+ }
1262
+ },
1263
+ "params": [
1264
+ {
1265
+ "name": "T",
1266
+ "type": 16
1267
+ },
1268
+ {
1269
+ "name": "E",
1270
+ "type": 9
1271
+ }
1272
+ ],
1273
+ "path": [
1274
+ "Result"
1275
+ ]
1276
+ }
1277
+ },
1278
+ {
1279
+ "id": 16,
1280
+ "type": {
1281
+ "def": {
1282
+ "primitive": "bool"
1283
+ }
1284
+ }
1285
+ },
1286
+ {
1287
+ "id": 17,
1288
+ "type": {
1289
+ "def": {
1290
+ "variant": {
1291
+ "variants": [
1292
+ {
1293
+ "fields": [
1294
+ {
1295
+ "type": 4
1296
+ }
1297
+ ],
1298
+ "index": 0,
1299
+ "name": "Ok"
1300
+ },
1301
+ {
1302
+ "fields": [
1303
+ {
1304
+ "type": 9
1305
+ }
1306
+ ],
1307
+ "index": 1,
1308
+ "name": "Err"
1309
+ }
1310
+ ]
1311
+ }
1312
+ },
1313
+ "params": [
1314
+ {
1315
+ "name": "T",
1316
+ "type": 4
1317
+ },
1318
+ {
1319
+ "name": "E",
1320
+ "type": 9
1321
+ }
1322
+ ],
1323
+ "path": [
1324
+ "Result"
1325
+ ]
1326
+ }
1327
+ },
1328
+ {
1329
+ "id": 18,
1330
+ "type": {
1331
+ "def": {
1332
+ "variant": {
1333
+ "variants": [
1334
+ {
1335
+ "fields": [
1336
+ {
1337
+ "type": 19
1338
+ }
1339
+ ],
1340
+ "index": 0,
1341
+ "name": "Ok"
1342
+ },
1343
+ {
1344
+ "fields": [
1345
+ {
1346
+ "type": 9
1347
+ }
1348
+ ],
1349
+ "index": 1,
1350
+ "name": "Err"
1351
+ }
1352
+ ]
1353
+ }
1354
+ },
1355
+ "params": [
1356
+ {
1357
+ "name": "T",
1358
+ "type": 19
1359
+ },
1360
+ {
1361
+ "name": "E",
1362
+ "type": 9
1363
+ }
1364
+ ],
1365
+ "path": [
1366
+ "Result"
1367
+ ]
1368
+ }
1369
+ },
1370
+ {
1371
+ "id": 19,
1372
+ "type": {
1373
+ "def": {
1374
+ "variant": {
1375
+ "variants": [
1376
+ {
1377
+ "index": 0,
1378
+ "name": "None"
1379
+ },
1380
+ {
1381
+ "fields": [
1382
+ {
1383
+ "type": 20
1384
+ }
1385
+ ],
1386
+ "index": 1,
1387
+ "name": "Some"
1388
+ }
1389
+ ]
1390
+ }
1391
+ },
1392
+ "params": [
1393
+ {
1394
+ "name": "T",
1395
+ "type": 20
1396
+ }
1397
+ ],
1398
+ "path": [
1399
+ "Option"
1400
+ ]
1401
+ }
1402
+ },
1403
+ {
1404
+ "id": 20,
1405
+ "type": {
1406
+ "def": {
1407
+ "composite": {
1408
+ "fields": [
1409
+ {
1410
+ "name": "transaction_id",
1411
+ "type": 4,
1412
+ "typeName": "String"
1413
+ },
1414
+ {
1415
+ "name": "transaction_type",
1416
+ "type": 21,
1417
+ "typeName": "TransactionType"
1418
+ },
1419
+ {
1420
+ "name": "from_chain",
1421
+ "type": 13,
1422
+ "typeName": "Chain"
1423
+ },
1424
+ {
1425
+ "name": "from_address",
1426
+ "type": 22,
1427
+ "typeName": "AddressType"
1428
+ },
1429
+ {
1430
+ "name": "to_address",
1431
+ "type": 22,
1432
+ "typeName": "AddressType"
1433
+ },
1434
+ {
1435
+ "name": "amount",
1436
+ "type": 5,
1437
+ "typeName": "u128"
1438
+ },
1439
+ {
1440
+ "name": "timestamp",
1441
+ "type": 0,
1442
+ "typeName": "Timestamp"
1443
+ }
1444
+ ]
1445
+ }
1446
+ },
1447
+ "path": [
1448
+ "cross_chain_transfer",
1449
+ "cross_chain_transfer",
1450
+ "Transaction"
1451
+ ]
1452
+ }
1453
+ },
1454
+ {
1455
+ "id": 21,
1456
+ "type": {
1457
+ "def": {
1458
+ "variant": {
1459
+ "variants": [
1460
+ {
1461
+ "index": 0,
1462
+ "name": "Commit"
1463
+ },
1464
+ {
1465
+ "index": 1,
1466
+ "name": "Dispatch"
1467
+ }
1468
+ ]
1469
+ }
1470
+ },
1471
+ "path": [
1472
+ "cross_chain_transfer",
1473
+ "cross_chain_transfer",
1474
+ "TransactionType"
1475
+ ]
1476
+ }
1477
+ },
1478
+ {
1479
+ "id": 22,
1480
+ "type": {
1481
+ "def": {
1482
+ "variant": {
1483
+ "variants": [
1484
+ {
1485
+ "fields": [
1486
+ {
1487
+ "type": 23,
1488
+ "typeName": "[u8; 21]"
1489
+ }
1490
+ ],
1491
+ "index": 0,
1492
+ "name": "Tron"
1493
+ },
1494
+ {
1495
+ "fields": [
1496
+ {
1497
+ "type": 1,
1498
+ "typeName": "AccountId"
1499
+ }
1500
+ ],
1501
+ "index": 1,
1502
+ "name": "D9"
1503
+ }
1504
+ ]
1505
+ }
1506
+ },
1507
+ "path": [
1508
+ "cross_chain_transfer",
1509
+ "cross_chain_transfer",
1510
+ "AddressType"
1511
+ ]
1512
+ }
1513
+ },
1514
+ {
1515
+ "id": 23,
1516
+ "type": {
1517
+ "def": {
1518
+ "array": {
1519
+ "len": 21,
1520
+ "type": 3
1521
+ }
1522
+ }
1523
+ }
1524
+ },
1525
+ {
1526
+ "id": 24,
1527
+ "type": {
1528
+ "def": {
1529
+ "variant": {
1530
+ "variants": [
1531
+ {
1532
+ "fields": [
1533
+ {
1534
+ "type": 0
1535
+ }
1536
+ ],
1537
+ "index": 0,
1538
+ "name": "Ok"
1539
+ },
1540
+ {
1541
+ "fields": [
1542
+ {
1543
+ "type": 9
1544
+ }
1545
+ ],
1546
+ "index": 1,
1547
+ "name": "Err"
1548
+ }
1549
+ ]
1550
+ }
1551
+ },
1552
+ "params": [
1553
+ {
1554
+ "name": "T",
1555
+ "type": 0
1556
+ },
1557
+ {
1558
+ "name": "E",
1559
+ "type": 9
1560
+ }
1561
+ ],
1562
+ "path": [
1563
+ "Result"
1564
+ ]
1565
+ }
1566
+ },
1567
+ {
1568
+ "id": 25,
1569
+ "type": {
1570
+ "def": {
1571
+ "variant": {
1572
+ "variants": [
1573
+ {
1574
+ "fields": [
1575
+ {
1576
+ "type": 26
1577
+ }
1578
+ ],
1579
+ "index": 0,
1580
+ "name": "Ok"
1581
+ },
1582
+ {
1583
+ "fields": [
1584
+ {
1585
+ "type": 9
1586
+ }
1587
+ ],
1588
+ "index": 1,
1589
+ "name": "Err"
1590
+ }
1591
+ ]
1592
+ }
1593
+ },
1594
+ "params": [
1595
+ {
1596
+ "name": "T",
1597
+ "type": 26
1598
+ },
1599
+ {
1600
+ "name": "E",
1601
+ "type": 9
1602
+ }
1603
+ ],
1604
+ "path": [
1605
+ "Result"
1606
+ ]
1607
+ }
1608
+ },
1609
+ {
1610
+ "id": 26,
1611
+ "type": {
1612
+ "def": {
1613
+ "variant": {
1614
+ "variants": [
1615
+ {
1616
+ "fields": [
1617
+ {
1618
+ "type": 4
1619
+ }
1620
+ ],
1621
+ "index": 0,
1622
+ "name": "Ok"
1623
+ },
1624
+ {
1625
+ "fields": [
1626
+ {
1627
+ "type": 12
1628
+ }
1629
+ ],
1630
+ "index": 1,
1631
+ "name": "Err"
1632
+ }
1633
+ ]
1634
+ }
1635
+ },
1636
+ "params": [
1637
+ {
1638
+ "name": "T",
1639
+ "type": 4
1640
+ },
1641
+ {
1642
+ "name": "E",
1643
+ "type": 12
1644
+ }
1645
+ ],
1646
+ "path": [
1647
+ "Result"
1648
+ ]
1649
+ }
1650
+ },
1651
+ {
1652
+ "id": 27,
1653
+ "type": {
1654
+ "def": {
1655
+ "composite": {
1656
+ "fields": [
1657
+ {
1658
+ "type": 2,
1659
+ "typeName": "[u8; 32]"
1660
+ }
1661
+ ]
1662
+ }
1663
+ },
1664
+ "path": [
1665
+ "ink_primitives",
1666
+ "types",
1667
+ "Hash"
1668
+ ]
1669
+ }
1670
+ },
1671
+ {
1672
+ "id": 28,
1673
+ "type": {
1674
+ "def": {
1675
+ "primitive": "u32"
1676
+ }
1677
+ }
1678
+ },
1679
+ {
1680
+ "id": 29,
1681
+ "type": {
1682
+ "def": {
1683
+ "variant": {}
1684
+ },
1685
+ "path": [
1686
+ "d9_chain_extension",
1687
+ "D9ChainExtension"
1688
+ ]
1689
+ }
1690
+ }
1691
+ ],
1692
+ "version": "4"
1693
+ }