@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,1300 @@
1
+ {
2
+ "source": {
3
+ "hash": "0x2da1b7ebb4065bd2ec52012d674d4b203fab69681292bc4e594fc26fc9c2445f",
4
+ "language": "ink! 4.3.0",
5
+ "compiler": "rustc 1.72.0",
6
+ "build_info": {
7
+ "build_mode": "Release",
8
+ "cargo_contract_version": "3.2.0",
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": "d9-burn-manager",
18
+ "version": "1.0.0",
19
+ "authors": [
20
+ "D9Dev"
21
+ ]
22
+ },
23
+ "spec": {
24
+ "constructors": [
25
+ {
26
+ "args": [
27
+ {
28
+ "label": "admin",
29
+ "type": {
30
+ "displayName": [
31
+ "AccountId"
32
+ ],
33
+ "type": 0
34
+ }
35
+ },
36
+ {
37
+ "label": "burn_contracts",
38
+ "type": {
39
+ "displayName": [
40
+ "Vec"
41
+ ],
42
+ "type": 3
43
+ }
44
+ }
45
+ ],
46
+ "default": false,
47
+ "docs": [
48
+ "Constructor that initializes the `bool` value to the given `init_value`."
49
+ ],
50
+ "label": "new",
51
+ "payable": true,
52
+ "returnType": {
53
+ "displayName": [
54
+ "ink_primitives",
55
+ "ConstructorResult"
56
+ ],
57
+ "type": 6
58
+ },
59
+ "selector": "0x9bae9d5e"
60
+ }
61
+ ],
62
+ "docs": [],
63
+ "environment": {
64
+ "accountId": {
65
+ "displayName": [
66
+ "AccountId"
67
+ ],
68
+ "type": 0
69
+ },
70
+ "balance": {
71
+ "displayName": [
72
+ "Balance"
73
+ ],
74
+ "type": 4
75
+ },
76
+ "blockNumber": {
77
+ "displayName": [
78
+ "BlockNumber"
79
+ ],
80
+ "type": 24
81
+ },
82
+ "chainExtension": {
83
+ "displayName": [
84
+ "ChainExtension"
85
+ ],
86
+ "type": 25
87
+ },
88
+ "hash": {
89
+ "displayName": [
90
+ "Hash"
91
+ ],
92
+ "type": 23
93
+ },
94
+ "maxEventTopics": 4,
95
+ "timestamp": {
96
+ "displayName": [
97
+ "Timestamp"
98
+ ],
99
+ "type": 5
100
+ }
101
+ },
102
+ "events": [
103
+ {
104
+ "args": [
105
+ {
106
+ "docs": [
107
+ " initiator of of the burn"
108
+ ],
109
+ "indexed": true,
110
+ "label": "from",
111
+ "type": {
112
+ "displayName": [
113
+ "AccountId"
114
+ ],
115
+ "type": 0
116
+ }
117
+ },
118
+ {
119
+ "docs": [
120
+ "amount of tokens burned"
121
+ ],
122
+ "indexed": true,
123
+ "label": "amount",
124
+ "type": {
125
+ "displayName": [
126
+ "Balance"
127
+ ],
128
+ "type": 4
129
+ }
130
+ }
131
+ ],
132
+ "docs": [],
133
+ "label": "WithdrawalExecuted"
134
+ },
135
+ {
136
+ "args": [
137
+ {
138
+ "docs": [
139
+ " initiator of of the burn"
140
+ ],
141
+ "indexed": true,
142
+ "label": "from",
143
+ "type": {
144
+ "displayName": [
145
+ "AccountId"
146
+ ],
147
+ "type": 0
148
+ }
149
+ },
150
+ {
151
+ "docs": [
152
+ "amount of tokens burned"
153
+ ],
154
+ "indexed": true,
155
+ "label": "amount",
156
+ "type": {
157
+ "displayName": [
158
+ "Balance"
159
+ ],
160
+ "type": 4
161
+ }
162
+ }
163
+ ],
164
+ "docs": [],
165
+ "label": "BurnExecuted"
166
+ }
167
+ ],
168
+ "lang_error": {
169
+ "displayName": [
170
+ "ink",
171
+ "LangError"
172
+ ],
173
+ "type": 8
174
+ },
175
+ "messages": [
176
+ {
177
+ "args": [
178
+ {
179
+ "label": "burn_beneficiary",
180
+ "type": {
181
+ "displayName": [
182
+ "AccountId"
183
+ ],
184
+ "type": 0
185
+ }
186
+ },
187
+ {
188
+ "label": "burn_contract",
189
+ "type": {
190
+ "displayName": [
191
+ "AccountId"
192
+ ],
193
+ "type": 0
194
+ }
195
+ }
196
+ ],
197
+ "default": false,
198
+ "docs": [
199
+ " Executes a burn by making a cross-contract call, updates the total burned amount,",
200
+ " updates the user's portfolio, and emits a `BurnExecuted` event.",
201
+ "",
202
+ " # Arguments",
203
+ "",
204
+ " * `burn_contract` - Account ID of the contract to call for the burn.",
205
+ "",
206
+ " # Errors",
207
+ "",
208
+ " Returns `Err` if the burn amount is zero, the burn contract is not valid,",
209
+ " or the cross-contract call fails.",
210
+ "",
211
+ " # Returns",
212
+ "",
213
+ " Returns `Ok` with the updated portfolio on success."
214
+ ],
215
+ "label": "burn",
216
+ "mutates": true,
217
+ "payable": true,
218
+ "returnType": {
219
+ "displayName": [
220
+ "ink",
221
+ "MessageResult"
222
+ ],
223
+ "type": 9
224
+ },
225
+ "selector": "0xb1efc17b"
226
+ },
227
+ {
228
+ "args": [
229
+ {
230
+ "label": "burn_contract",
231
+ "type": {
232
+ "displayName": [
233
+ "AccountId"
234
+ ],
235
+ "type": 0
236
+ }
237
+ }
238
+ ],
239
+ "default": false,
240
+ "docs": [],
241
+ "label": "withdraw",
242
+ "mutates": true,
243
+ "payable": false,
244
+ "returnType": {
245
+ "displayName": [
246
+ "ink",
247
+ "MessageResult"
248
+ ],
249
+ "type": 9
250
+ },
251
+ "selector": "0x410fcc9d"
252
+ },
253
+ {
254
+ "args": [
255
+ {
256
+ "label": "account_id",
257
+ "type": {
258
+ "displayName": [
259
+ "AccountId"
260
+ ],
261
+ "type": 0
262
+ }
263
+ }
264
+ ],
265
+ "default": false,
266
+ "docs": [],
267
+ "label": "get_ancestors",
268
+ "mutates": false,
269
+ "payable": false,
270
+ "returnType": {
271
+ "displayName": [
272
+ "ink",
273
+ "MessageResult"
274
+ ],
275
+ "type": 15
276
+ },
277
+ "selector": "0xe2ee2364"
278
+ },
279
+ {
280
+ "args": [
281
+ {
282
+ "label": "burn_contract",
283
+ "type": {
284
+ "displayName": [
285
+ "AccountId"
286
+ ],
287
+ "type": 0
288
+ }
289
+ }
290
+ ],
291
+ "default": false,
292
+ "docs": [],
293
+ "label": "add_burn_contract",
294
+ "mutates": true,
295
+ "payable": false,
296
+ "returnType": {
297
+ "displayName": [
298
+ "ink",
299
+ "MessageResult"
300
+ ],
301
+ "type": 17
302
+ },
303
+ "selector": "0x50cb7e6b"
304
+ },
305
+ {
306
+ "args": [
307
+ {
308
+ "label": "burn_contract",
309
+ "type": {
310
+ "displayName": [
311
+ "AccountId"
312
+ ],
313
+ "type": 0
314
+ }
315
+ }
316
+ ],
317
+ "default": false,
318
+ "docs": [],
319
+ "label": "remove_burn_contract",
320
+ "mutates": true,
321
+ "payable": false,
322
+ "returnType": {
323
+ "displayName": [
324
+ "ink",
325
+ "MessageResult"
326
+ ],
327
+ "type": 6
328
+ },
329
+ "selector": "0x2610355d"
330
+ },
331
+ {
332
+ "args": [],
333
+ "default": false,
334
+ "docs": [],
335
+ "label": "get_admin",
336
+ "mutates": false,
337
+ "payable": false,
338
+ "returnType": {
339
+ "displayName": [
340
+ "ink",
341
+ "MessageResult"
342
+ ],
343
+ "type": 19
344
+ },
345
+ "selector": "0x57b8a8a7"
346
+ },
347
+ {
348
+ "args": [],
349
+ "default": false,
350
+ "docs": [],
351
+ "label": "get_total_burned",
352
+ "mutates": false,
353
+ "payable": false,
354
+ "returnType": {
355
+ "displayName": [
356
+ "ink",
357
+ "MessageResult"
358
+ ],
359
+ "type": 20
360
+ },
361
+ "selector": "0x717d96e0"
362
+ },
363
+ {
364
+ "args": [
365
+ {
366
+ "label": "account_id",
367
+ "type": {
368
+ "displayName": [
369
+ "AccountId"
370
+ ],
371
+ "type": 0
372
+ }
373
+ }
374
+ ],
375
+ "default": false,
376
+ "docs": [],
377
+ "label": "get_portfolio",
378
+ "mutates": false,
379
+ "payable": false,
380
+ "returnType": {
381
+ "displayName": [
382
+ "ink",
383
+ "MessageResult"
384
+ ],
385
+ "type": 21
386
+ },
387
+ "selector": "0xf3246265"
388
+ }
389
+ ]
390
+ },
391
+ "storage": {
392
+ "root": {
393
+ "layout": {
394
+ "struct": {
395
+ "fields": [
396
+ {
397
+ "layout": {
398
+ "leaf": {
399
+ "key": "0x00000000",
400
+ "ty": 0
401
+ }
402
+ },
403
+ "name": "admin"
404
+ },
405
+ {
406
+ "layout": {
407
+ "leaf": {
408
+ "key": "0x00000000",
409
+ "ty": 3
410
+ }
411
+ },
412
+ "name": "burn_contracts"
413
+ },
414
+ {
415
+ "layout": {
416
+ "root": {
417
+ "layout": {
418
+ "struct": {
419
+ "fields": [
420
+ {
421
+ "layout": {
422
+ "leaf": {
423
+ "key": "0x249fe4b2",
424
+ "ty": 4
425
+ }
426
+ },
427
+ "name": "amount_burned"
428
+ },
429
+ {
430
+ "layout": {
431
+ "leaf": {
432
+ "key": "0x249fe4b2",
433
+ "ty": 4
434
+ }
435
+ },
436
+ "name": "balance_due"
437
+ },
438
+ {
439
+ "layout": {
440
+ "leaf": {
441
+ "key": "0x249fe4b2",
442
+ "ty": 4
443
+ }
444
+ },
445
+ "name": "balance_paid"
446
+ },
447
+ {
448
+ "layout": {
449
+ "enum": {
450
+ "dispatchKey": "0x249fe4b2",
451
+ "name": "Option",
452
+ "variants": {
453
+ "0": {
454
+ "fields": [],
455
+ "name": "None"
456
+ },
457
+ "1": {
458
+ "fields": [
459
+ {
460
+ "layout": {
461
+ "struct": {
462
+ "fields": [
463
+ {
464
+ "layout": {
465
+ "leaf": {
466
+ "key": "0x249fe4b2",
467
+ "ty": 5
468
+ }
469
+ },
470
+ "name": "time"
471
+ },
472
+ {
473
+ "layout": {
474
+ "leaf": {
475
+ "key": "0x249fe4b2",
476
+ "ty": 0
477
+ }
478
+ },
479
+ "name": "contract"
480
+ }
481
+ ],
482
+ "name": "ActionRecord"
483
+ }
484
+ },
485
+ "name": "0"
486
+ }
487
+ ],
488
+ "name": "Some"
489
+ }
490
+ }
491
+ }
492
+ },
493
+ "name": "last_withdrawal"
494
+ },
495
+ {
496
+ "layout": {
497
+ "struct": {
498
+ "fields": [
499
+ {
500
+ "layout": {
501
+ "leaf": {
502
+ "key": "0x249fe4b2",
503
+ "ty": 5
504
+ }
505
+ },
506
+ "name": "time"
507
+ },
508
+ {
509
+ "layout": {
510
+ "leaf": {
511
+ "key": "0x249fe4b2",
512
+ "ty": 0
513
+ }
514
+ },
515
+ "name": "contract"
516
+ }
517
+ ],
518
+ "name": "ActionRecord"
519
+ }
520
+ },
521
+ "name": "last_burn"
522
+ }
523
+ ],
524
+ "name": "BurnPortfolio"
525
+ }
526
+ },
527
+ "root_key": "0x249fe4b2"
528
+ }
529
+ },
530
+ "name": "portfolios"
531
+ },
532
+ {
533
+ "layout": {
534
+ "leaf": {
535
+ "key": "0x00000000",
536
+ "ty": 4
537
+ }
538
+ },
539
+ "name": "total_amount_burned"
540
+ }
541
+ ],
542
+ "name": "D9BurnManager"
543
+ }
544
+ },
545
+ "root_key": "0x00000000"
546
+ }
547
+ },
548
+ "types": [
549
+ {
550
+ "id": 0,
551
+ "type": {
552
+ "def": {
553
+ "composite": {
554
+ "fields": [
555
+ {
556
+ "type": 1,
557
+ "typeName": "[u8; 32]"
558
+ }
559
+ ]
560
+ }
561
+ },
562
+ "path": [
563
+ "ink_primitives",
564
+ "types",
565
+ "AccountId"
566
+ ]
567
+ }
568
+ },
569
+ {
570
+ "id": 1,
571
+ "type": {
572
+ "def": {
573
+ "array": {
574
+ "len": 32,
575
+ "type": 2
576
+ }
577
+ }
578
+ }
579
+ },
580
+ {
581
+ "id": 2,
582
+ "type": {
583
+ "def": {
584
+ "primitive": "u8"
585
+ }
586
+ }
587
+ },
588
+ {
589
+ "id": 3,
590
+ "type": {
591
+ "def": {
592
+ "sequence": {
593
+ "type": 0
594
+ }
595
+ }
596
+ }
597
+ },
598
+ {
599
+ "id": 4,
600
+ "type": {
601
+ "def": {
602
+ "primitive": "u128"
603
+ }
604
+ }
605
+ },
606
+ {
607
+ "id": 5,
608
+ "type": {
609
+ "def": {
610
+ "primitive": "u64"
611
+ }
612
+ }
613
+ },
614
+ {
615
+ "id": 6,
616
+ "type": {
617
+ "def": {
618
+ "variant": {
619
+ "variants": [
620
+ {
621
+ "fields": [
622
+ {
623
+ "type": 7
624
+ }
625
+ ],
626
+ "index": 0,
627
+ "name": "Ok"
628
+ },
629
+ {
630
+ "fields": [
631
+ {
632
+ "type": 8
633
+ }
634
+ ],
635
+ "index": 1,
636
+ "name": "Err"
637
+ }
638
+ ]
639
+ }
640
+ },
641
+ "params": [
642
+ {
643
+ "name": "T",
644
+ "type": 7
645
+ },
646
+ {
647
+ "name": "E",
648
+ "type": 8
649
+ }
650
+ ],
651
+ "path": [
652
+ "Result"
653
+ ]
654
+ }
655
+ },
656
+ {
657
+ "id": 7,
658
+ "type": {
659
+ "def": {
660
+ "tuple": []
661
+ }
662
+ }
663
+ },
664
+ {
665
+ "id": 8,
666
+ "type": {
667
+ "def": {
668
+ "variant": {
669
+ "variants": [
670
+ {
671
+ "index": 1,
672
+ "name": "CouldNotReadInput"
673
+ }
674
+ ]
675
+ }
676
+ },
677
+ "path": [
678
+ "ink_primitives",
679
+ "LangError"
680
+ ]
681
+ }
682
+ },
683
+ {
684
+ "id": 9,
685
+ "type": {
686
+ "def": {
687
+ "variant": {
688
+ "variants": [
689
+ {
690
+ "fields": [
691
+ {
692
+ "type": 10
693
+ }
694
+ ],
695
+ "index": 0,
696
+ "name": "Ok"
697
+ },
698
+ {
699
+ "fields": [
700
+ {
701
+ "type": 8
702
+ }
703
+ ],
704
+ "index": 1,
705
+ "name": "Err"
706
+ }
707
+ ]
708
+ }
709
+ },
710
+ "params": [
711
+ {
712
+ "name": "T",
713
+ "type": 10
714
+ },
715
+ {
716
+ "name": "E",
717
+ "type": 8
718
+ }
719
+ ],
720
+ "path": [
721
+ "Result"
722
+ ]
723
+ }
724
+ },
725
+ {
726
+ "id": 10,
727
+ "type": {
728
+ "def": {
729
+ "variant": {
730
+ "variants": [
731
+ {
732
+ "fields": [
733
+ {
734
+ "type": 11
735
+ }
736
+ ],
737
+ "index": 0,
738
+ "name": "Ok"
739
+ },
740
+ {
741
+ "fields": [
742
+ {
743
+ "type": 14
744
+ }
745
+ ],
746
+ "index": 1,
747
+ "name": "Err"
748
+ }
749
+ ]
750
+ }
751
+ },
752
+ "params": [
753
+ {
754
+ "name": "T",
755
+ "type": 11
756
+ },
757
+ {
758
+ "name": "E",
759
+ "type": 14
760
+ }
761
+ ],
762
+ "path": [
763
+ "Result"
764
+ ]
765
+ }
766
+ },
767
+ {
768
+ "id": 11,
769
+ "type": {
770
+ "def": {
771
+ "composite": {
772
+ "fields": [
773
+ {
774
+ "name": "amount_burned",
775
+ "type": 4,
776
+ "typeName": "Balance"
777
+ },
778
+ {
779
+ "name": "balance_due",
780
+ "type": 4,
781
+ "typeName": "Balance"
782
+ },
783
+ {
784
+ "name": "balance_paid",
785
+ "type": 4,
786
+ "typeName": "Balance"
787
+ },
788
+ {
789
+ "name": "last_withdrawal",
790
+ "type": 12,
791
+ "typeName": "Option<ActionRecord>"
792
+ },
793
+ {
794
+ "name": "last_burn",
795
+ "type": 13,
796
+ "typeName": "ActionRecord"
797
+ }
798
+ ]
799
+ }
800
+ },
801
+ "path": [
802
+ "d9_burn_common",
803
+ "BurnPortfolio"
804
+ ]
805
+ }
806
+ },
807
+ {
808
+ "id": 12,
809
+ "type": {
810
+ "def": {
811
+ "variant": {
812
+ "variants": [
813
+ {
814
+ "index": 0,
815
+ "name": "None"
816
+ },
817
+ {
818
+ "fields": [
819
+ {
820
+ "type": 13
821
+ }
822
+ ],
823
+ "index": 1,
824
+ "name": "Some"
825
+ }
826
+ ]
827
+ }
828
+ },
829
+ "params": [
830
+ {
831
+ "name": "T",
832
+ "type": 13
833
+ }
834
+ ],
835
+ "path": [
836
+ "Option"
837
+ ]
838
+ }
839
+ },
840
+ {
841
+ "id": 13,
842
+ "type": {
843
+ "def": {
844
+ "composite": {
845
+ "fields": [
846
+ {
847
+ "name": "time",
848
+ "type": 5,
849
+ "typeName": "Timestamp"
850
+ },
851
+ {
852
+ "name": "contract",
853
+ "type": 0,
854
+ "typeName": "AccountId"
855
+ }
856
+ ]
857
+ }
858
+ },
859
+ "path": [
860
+ "d9_burn_common",
861
+ "ActionRecord"
862
+ ]
863
+ }
864
+ },
865
+ {
866
+ "id": 14,
867
+ "type": {
868
+ "def": {
869
+ "variant": {
870
+ "variants": [
871
+ {
872
+ "index": 0,
873
+ "name": "BurnAmountInsufficient"
874
+ },
875
+ {
876
+ "index": 1,
877
+ "name": "NoAccountFound"
878
+ },
879
+ {
880
+ "index": 2,
881
+ "name": "EarlyWithdrawalAttempt"
882
+ },
883
+ {
884
+ "index": 3,
885
+ "name": "ContractBalanceTooLow"
886
+ },
887
+ {
888
+ "index": 4,
889
+ "name": "RestrictedFunction"
890
+ },
891
+ {
892
+ "index": 5,
893
+ "name": "UsePortfolioExecuteFunction"
894
+ },
895
+ {
896
+ "index": 6,
897
+ "name": "WithdrawalExceedsBalance"
898
+ },
899
+ {
900
+ "index": 7,
901
+ "name": "TransferFailed"
902
+ },
903
+ {
904
+ "index": 8,
905
+ "name": "InvalidCaller"
906
+ },
907
+ {
908
+ "index": 9,
909
+ "name": "InvalidBurnContract"
910
+ },
911
+ {
912
+ "index": 10,
913
+ "name": "BurnContractAlreadyAdded"
914
+ },
915
+ {
916
+ "index": 11,
917
+ "name": "CrossContractCallFailed"
918
+ },
919
+ {
920
+ "index": 12,
921
+ "name": "WithdrawalNotAllowed"
922
+ },
923
+ {
924
+ "index": 13,
925
+ "name": "RuntimeErrorGettingAncestors"
926
+ },
927
+ {
928
+ "index": 14,
929
+ "name": "NoAncestorsFound"
930
+ }
931
+ ]
932
+ }
933
+ },
934
+ "path": [
935
+ "d9_burn_common",
936
+ "Error"
937
+ ]
938
+ }
939
+ },
940
+ {
941
+ "id": 15,
942
+ "type": {
943
+ "def": {
944
+ "variant": {
945
+ "variants": [
946
+ {
947
+ "fields": [
948
+ {
949
+ "type": 16
950
+ }
951
+ ],
952
+ "index": 0,
953
+ "name": "Ok"
954
+ },
955
+ {
956
+ "fields": [
957
+ {
958
+ "type": 8
959
+ }
960
+ ],
961
+ "index": 1,
962
+ "name": "Err"
963
+ }
964
+ ]
965
+ }
966
+ },
967
+ "params": [
968
+ {
969
+ "name": "T",
970
+ "type": 16
971
+ },
972
+ {
973
+ "name": "E",
974
+ "type": 8
975
+ }
976
+ ],
977
+ "path": [
978
+ "Result"
979
+ ]
980
+ }
981
+ },
982
+ {
983
+ "id": 16,
984
+ "type": {
985
+ "def": {
986
+ "variant": {
987
+ "variants": [
988
+ {
989
+ "index": 0,
990
+ "name": "None"
991
+ },
992
+ {
993
+ "fields": [
994
+ {
995
+ "type": 3
996
+ }
997
+ ],
998
+ "index": 1,
999
+ "name": "Some"
1000
+ }
1001
+ ]
1002
+ }
1003
+ },
1004
+ "params": [
1005
+ {
1006
+ "name": "T",
1007
+ "type": 3
1008
+ }
1009
+ ],
1010
+ "path": [
1011
+ "Option"
1012
+ ]
1013
+ }
1014
+ },
1015
+ {
1016
+ "id": 17,
1017
+ "type": {
1018
+ "def": {
1019
+ "variant": {
1020
+ "variants": [
1021
+ {
1022
+ "fields": [
1023
+ {
1024
+ "type": 18
1025
+ }
1026
+ ],
1027
+ "index": 0,
1028
+ "name": "Ok"
1029
+ },
1030
+ {
1031
+ "fields": [
1032
+ {
1033
+ "type": 8
1034
+ }
1035
+ ],
1036
+ "index": 1,
1037
+ "name": "Err"
1038
+ }
1039
+ ]
1040
+ }
1041
+ },
1042
+ "params": [
1043
+ {
1044
+ "name": "T",
1045
+ "type": 18
1046
+ },
1047
+ {
1048
+ "name": "E",
1049
+ "type": 8
1050
+ }
1051
+ ],
1052
+ "path": [
1053
+ "Result"
1054
+ ]
1055
+ }
1056
+ },
1057
+ {
1058
+ "id": 18,
1059
+ "type": {
1060
+ "def": {
1061
+ "variant": {
1062
+ "variants": [
1063
+ {
1064
+ "fields": [
1065
+ {
1066
+ "type": 7
1067
+ }
1068
+ ],
1069
+ "index": 0,
1070
+ "name": "Ok"
1071
+ },
1072
+ {
1073
+ "fields": [
1074
+ {
1075
+ "type": 14
1076
+ }
1077
+ ],
1078
+ "index": 1,
1079
+ "name": "Err"
1080
+ }
1081
+ ]
1082
+ }
1083
+ },
1084
+ "params": [
1085
+ {
1086
+ "name": "T",
1087
+ "type": 7
1088
+ },
1089
+ {
1090
+ "name": "E",
1091
+ "type": 14
1092
+ }
1093
+ ],
1094
+ "path": [
1095
+ "Result"
1096
+ ]
1097
+ }
1098
+ },
1099
+ {
1100
+ "id": 19,
1101
+ "type": {
1102
+ "def": {
1103
+ "variant": {
1104
+ "variants": [
1105
+ {
1106
+ "fields": [
1107
+ {
1108
+ "type": 0
1109
+ }
1110
+ ],
1111
+ "index": 0,
1112
+ "name": "Ok"
1113
+ },
1114
+ {
1115
+ "fields": [
1116
+ {
1117
+ "type": 8
1118
+ }
1119
+ ],
1120
+ "index": 1,
1121
+ "name": "Err"
1122
+ }
1123
+ ]
1124
+ }
1125
+ },
1126
+ "params": [
1127
+ {
1128
+ "name": "T",
1129
+ "type": 0
1130
+ },
1131
+ {
1132
+ "name": "E",
1133
+ "type": 8
1134
+ }
1135
+ ],
1136
+ "path": [
1137
+ "Result"
1138
+ ]
1139
+ }
1140
+ },
1141
+ {
1142
+ "id": 20,
1143
+ "type": {
1144
+ "def": {
1145
+ "variant": {
1146
+ "variants": [
1147
+ {
1148
+ "fields": [
1149
+ {
1150
+ "type": 4
1151
+ }
1152
+ ],
1153
+ "index": 0,
1154
+ "name": "Ok"
1155
+ },
1156
+ {
1157
+ "fields": [
1158
+ {
1159
+ "type": 8
1160
+ }
1161
+ ],
1162
+ "index": 1,
1163
+ "name": "Err"
1164
+ }
1165
+ ]
1166
+ }
1167
+ },
1168
+ "params": [
1169
+ {
1170
+ "name": "T",
1171
+ "type": 4
1172
+ },
1173
+ {
1174
+ "name": "E",
1175
+ "type": 8
1176
+ }
1177
+ ],
1178
+ "path": [
1179
+ "Result"
1180
+ ]
1181
+ }
1182
+ },
1183
+ {
1184
+ "id": 21,
1185
+ "type": {
1186
+ "def": {
1187
+ "variant": {
1188
+ "variants": [
1189
+ {
1190
+ "fields": [
1191
+ {
1192
+ "type": 22
1193
+ }
1194
+ ],
1195
+ "index": 0,
1196
+ "name": "Ok"
1197
+ },
1198
+ {
1199
+ "fields": [
1200
+ {
1201
+ "type": 8
1202
+ }
1203
+ ],
1204
+ "index": 1,
1205
+ "name": "Err"
1206
+ }
1207
+ ]
1208
+ }
1209
+ },
1210
+ "params": [
1211
+ {
1212
+ "name": "T",
1213
+ "type": 22
1214
+ },
1215
+ {
1216
+ "name": "E",
1217
+ "type": 8
1218
+ }
1219
+ ],
1220
+ "path": [
1221
+ "Result"
1222
+ ]
1223
+ }
1224
+ },
1225
+ {
1226
+ "id": 22,
1227
+ "type": {
1228
+ "def": {
1229
+ "variant": {
1230
+ "variants": [
1231
+ {
1232
+ "index": 0,
1233
+ "name": "None"
1234
+ },
1235
+ {
1236
+ "fields": [
1237
+ {
1238
+ "type": 11
1239
+ }
1240
+ ],
1241
+ "index": 1,
1242
+ "name": "Some"
1243
+ }
1244
+ ]
1245
+ }
1246
+ },
1247
+ "params": [
1248
+ {
1249
+ "name": "T",
1250
+ "type": 11
1251
+ }
1252
+ ],
1253
+ "path": [
1254
+ "Option"
1255
+ ]
1256
+ }
1257
+ },
1258
+ {
1259
+ "id": 23,
1260
+ "type": {
1261
+ "def": {
1262
+ "composite": {
1263
+ "fields": [
1264
+ {
1265
+ "type": 1,
1266
+ "typeName": "[u8; 32]"
1267
+ }
1268
+ ]
1269
+ }
1270
+ },
1271
+ "path": [
1272
+ "ink_primitives",
1273
+ "types",
1274
+ "Hash"
1275
+ ]
1276
+ }
1277
+ },
1278
+ {
1279
+ "id": 24,
1280
+ "type": {
1281
+ "def": {
1282
+ "primitive": "u32"
1283
+ }
1284
+ }
1285
+ },
1286
+ {
1287
+ "id": 25,
1288
+ "type": {
1289
+ "def": {
1290
+ "variant": {}
1291
+ },
1292
+ "path": [
1293
+ "d9_chain_extension",
1294
+ "D9ChainExtension"
1295
+ ]
1296
+ }
1297
+ }
1298
+ ],
1299
+ "version": "4"
1300
+ }