@subwallet/extension-base 1.0.13-0 → 1.1.1-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/background/KoniTypes.d.ts +37 -0
  2. package/background/KoniTypes.js +8 -1
  3. package/background/handlers/Extension.js +17 -2
  4. package/background/types.d.ts +6 -1
  5. package/bundle-polkadot-extension-base.js +20 -0
  6. package/cjs/background/KoniTypes.js +10 -2
  7. package/cjs/background/handlers/Extension.js +22 -6
  8. package/cjs/constants/index.js +7 -1
  9. package/cjs/defaults.js +1 -1
  10. package/cjs/koni/api/dotsama/balance.js +5 -0
  11. package/cjs/koni/api/dotsama/transfer.js +6 -0
  12. package/cjs/koni/api/staking/bonding/astar.js +2 -2
  13. package/cjs/koni/api/staking/bonding/relayChain.js +12 -2
  14. package/cjs/koni/api/staking/bonding/utils.js +2 -2
  15. package/cjs/koni/background/cron.js +13 -37
  16. package/cjs/koni/background/handlers/Extension.js +324 -147
  17. package/cjs/koni/background/handlers/State.js +224 -51
  18. package/cjs/koni/background/subscription.js +9 -86
  19. package/cjs/packageInfo.js +1 -1
  20. package/cjs/services/chain-service/constants.js +10 -4
  21. package/cjs/services/chain-service/handler/SubstrateApi.js +2 -1
  22. package/cjs/services/chain-service/handler/SubstrateChainHandler.js +3 -1
  23. package/cjs/services/chain-service/handler/manta/MantaPrivateHandler.js +147 -0
  24. package/cjs/services/chain-service/helper/erc20_abi.json +224 -0
  25. package/cjs/services/chain-service/helper/erc721_abi.json +384 -0
  26. package/cjs/services/chain-service/helper/psp22_abi.json +1127 -0
  27. package/cjs/services/chain-service/helper/psp34_abi.json +3144 -0
  28. package/cjs/services/chain-service/helper/test_erc721_abi.json +393 -0
  29. package/cjs/services/chain-service/index.js +54 -5
  30. package/cjs/services/chain-service/utils.js +6 -1
  31. package/cjs/services/event-service/types.js +3 -1
  32. package/cjs/services/storage-service/DatabaseService.js +31 -1
  33. package/cjs/services/storage-service/databases/index.js +3 -0
  34. package/cjs/services/storage-service/db-stores/MantaPay.js +40 -0
  35. package/cjs/utils/index.js +12 -0
  36. package/cjs/utils/lazy.js +52 -0
  37. package/constants/index.d.ts +2 -0
  38. package/constants/index.js +2 -0
  39. package/defaults.d.ts +1 -1
  40. package/defaults.js +1 -1
  41. package/koni/api/dotsama/balance.js +6 -1
  42. package/koni/api/dotsama/transfer.js +7 -1
  43. package/koni/api/staking/bonding/astar.d.ts +1 -1
  44. package/koni/api/staking/bonding/astar.js +1 -1
  45. package/koni/api/staking/bonding/relayChain.js +12 -2
  46. package/koni/api/staking/bonding/utils.js +3 -3
  47. package/koni/background/cron.d.ts +1 -5
  48. package/koni/background/cron.js +15 -39
  49. package/koni/background/handlers/Extension.d.ts +5 -0
  50. package/koni/background/handlers/Extension.js +186 -11
  51. package/koni/background/handlers/State.d.ts +15 -3
  52. package/koni/background/handlers/State.js +226 -50
  53. package/koni/background/subscription.d.ts +1 -4
  54. package/koni/background/subscription.js +11 -87
  55. package/package.json +23 -6
  56. package/packageInfo.js +1 -1
  57. package/services/chain-service/constants.d.ts +3 -0
  58. package/services/chain-service/constants.js +5 -2
  59. package/services/chain-service/handler/SubstrateApi.d.ts +1 -1
  60. package/services/chain-service/handler/SubstrateApi.js +2 -1
  61. package/services/chain-service/handler/SubstrateChainHandler.d.ts +1 -1
  62. package/services/chain-service/handler/SubstrateChainHandler.js +3 -1
  63. package/services/chain-service/handler/manta/MantaPrivateHandler.d.ts +30 -0
  64. package/services/chain-service/handler/manta/MantaPrivateHandler.js +140 -0
  65. package/services/chain-service/handler/types.d.ts +2 -0
  66. package/services/chain-service/index.d.ts +7 -3
  67. package/services/chain-service/index.js +56 -7
  68. package/services/chain-service/utils.d.ts +1 -0
  69. package/services/chain-service/utils.js +5 -1
  70. package/services/event-service/types.d.ts +3 -0
  71. package/services/event-service/types.js +3 -1
  72. package/services/storage-service/DatabaseService.d.ts +10 -1
  73. package/services/storage-service/DatabaseService.js +31 -1
  74. package/services/storage-service/databases/index.d.ts +2 -0
  75. package/services/storage-service/databases/index.js +3 -0
  76. package/services/storage-service/db-stores/MantaPay.d.ts +9 -0
  77. package/services/storage-service/db-stores/MantaPay.js +32 -0
  78. package/utils/index.d.ts +1 -0
  79. package/utils/index.js +2 -1
  80. package/utils/lazy.d.ts +2 -0
  81. package/utils/lazy.js +43 -0
@@ -0,0 +1,1127 @@
1
+ {
2
+ "source": {
3
+ "hash": "0xdb433067f226daf1542d03cfb9fb40560381fee51ac41a1fe2344cef297f18e9",
4
+ "language": "ink! 4.0.0",
5
+ "compiler": "rustc 1.65.0",
6
+ "build_info": {
7
+ "build_mode": "Debug",
8
+ "cargo_contract_version": "2.0.0-beta",
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": "psp22",
18
+ "version": "0.9.6",
19
+ "authors": [
20
+ "Yonatan Hornstein <yonatan@panoramaswap.com>"
21
+ ]
22
+ },
23
+ "spec": {
24
+ "constructors": [
25
+ {
26
+ "args": [
27
+ {
28
+ "label": "total_supply",
29
+ "type": {
30
+ "displayName": [
31
+ "Balance"
32
+ ],
33
+ "type": 0
34
+ }
35
+ },
36
+ {
37
+ "label": "name",
38
+ "type": {
39
+ "displayName": [
40
+ "Option"
41
+ ],
42
+ "type": 4
43
+ }
44
+ },
45
+ {
46
+ "label": "symbol",
47
+ "type": {
48
+ "displayName": [
49
+ "Option"
50
+ ],
51
+ "type": 4
52
+ }
53
+ },
54
+ {
55
+ "label": "decimal",
56
+ "type": {
57
+ "displayName": [
58
+ "u8"
59
+ ],
60
+ "type": 3
61
+ }
62
+ }
63
+ ],
64
+ "docs": [],
65
+ "label": "new",
66
+ "payable": false,
67
+ "returnType": {
68
+ "displayName": [
69
+ "ink_primitives",
70
+ "ConstructorResult"
71
+ ],
72
+ "type": 5
73
+ },
74
+ "selector": "0x9bae9d5e"
75
+ }
76
+ ],
77
+ "docs": [],
78
+ "events": [],
79
+ "lang_error": {
80
+ "displayName": [
81
+ "ink",
82
+ "LangError"
83
+ ],
84
+ "type": 6
85
+ },
86
+ "messages": [
87
+ {
88
+ "args": [
89
+ {
90
+ "label": "owner",
91
+ "type": {
92
+ "displayName": [
93
+ "psp22_external",
94
+ "BalanceOfInput1"
95
+ ],
96
+ "type": 7
97
+ }
98
+ }
99
+ ],
100
+ "docs": [
101
+ " Returns the account Balance for the specified `owner`.",
102
+ "",
103
+ " Returns `0` if the account is non-existent."
104
+ ],
105
+ "label": "PSP22::balance_of",
106
+ "mutates": false,
107
+ "payable": false,
108
+ "returnType": {
109
+ "displayName": [
110
+ "ink",
111
+ "MessageResult"
112
+ ],
113
+ "type": 9
114
+ },
115
+ "selector": "0x6568382f"
116
+ },
117
+ {
118
+ "args": [
119
+ {
120
+ "label": "from",
121
+ "type": {
122
+ "displayName": [
123
+ "psp22_external",
124
+ "TransferFromInput1"
125
+ ],
126
+ "type": 7
127
+ }
128
+ },
129
+ {
130
+ "label": "to",
131
+ "type": {
132
+ "displayName": [
133
+ "psp22_external",
134
+ "TransferFromInput2"
135
+ ],
136
+ "type": 7
137
+ }
138
+ },
139
+ {
140
+ "label": "value",
141
+ "type": {
142
+ "displayName": [
143
+ "psp22_external",
144
+ "TransferFromInput3"
145
+ ],
146
+ "type": 0
147
+ }
148
+ },
149
+ {
150
+ "label": "data",
151
+ "type": {
152
+ "displayName": [
153
+ "psp22_external",
154
+ "TransferFromInput4"
155
+ ],
156
+ "type": 2
157
+ }
158
+ }
159
+ ],
160
+ "docs": [
161
+ " Transfers `value` tokens on the behalf of `from` to the account `to`",
162
+ " with additional `data` in unspecified format.",
163
+ "",
164
+ " This can be used to allow a contract to transfer tokens on ones behalf and/or",
165
+ " to charge fees in sub-currencies, for example.",
166
+ "",
167
+ " On success a `Transfer` and `Approval` events are emitted.",
168
+ "",
169
+ " # Errors",
170
+ "",
171
+ " Returns `InsufficientAllowance` error if there are not enough tokens allowed",
172
+ " for the caller to withdraw from `from`.",
173
+ "",
174
+ " Returns `InsufficientBalance` error if there are not enough tokens on",
175
+ " the the account Balance of `from`.",
176
+ "",
177
+ " Returns `ZeroSenderAddress` error if sender's address is zero.",
178
+ "",
179
+ " Returns `ZeroRecipientAddress` error if recipient's address is zero."
180
+ ],
181
+ "label": "PSP22::transfer_from",
182
+ "mutates": true,
183
+ "payable": false,
184
+ "returnType": {
185
+ "displayName": [
186
+ "ink",
187
+ "MessageResult"
188
+ ],
189
+ "type": 10
190
+ },
191
+ "selector": "0x54b3c76e"
192
+ },
193
+ {
194
+ "args": [
195
+ {
196
+ "label": "to",
197
+ "type": {
198
+ "displayName": [
199
+ "psp22_external",
200
+ "TransferInput1"
201
+ ],
202
+ "type": 7
203
+ }
204
+ },
205
+ {
206
+ "label": "value",
207
+ "type": {
208
+ "displayName": [
209
+ "psp22_external",
210
+ "TransferInput2"
211
+ ],
212
+ "type": 0
213
+ }
214
+ },
215
+ {
216
+ "label": "data",
217
+ "type": {
218
+ "displayName": [
219
+ "psp22_external",
220
+ "TransferInput3"
221
+ ],
222
+ "type": 2
223
+ }
224
+ }
225
+ ],
226
+ "docs": [
227
+ " Transfers `value` amount of tokens from the caller's account to account `to`",
228
+ " with additional `data` in unspecified format.",
229
+ "",
230
+ " On success a `Transfer` event is emitted.",
231
+ "",
232
+ " # Errors",
233
+ "",
234
+ " Returns `InsufficientBalance` error if there are not enough tokens on",
235
+ " the caller's account Balance.",
236
+ "",
237
+ " Returns `ZeroSenderAddress` error if sender's address is zero.",
238
+ "",
239
+ " Returns `ZeroRecipientAddress` error if recipient's address is zero."
240
+ ],
241
+ "label": "PSP22::transfer",
242
+ "mutates": true,
243
+ "payable": false,
244
+ "returnType": {
245
+ "displayName": [
246
+ "ink",
247
+ "MessageResult"
248
+ ],
249
+ "type": 10
250
+ },
251
+ "selector": "0xdb20f9f5"
252
+ },
253
+ {
254
+ "args": [
255
+ {
256
+ "label": "spender",
257
+ "type": {
258
+ "displayName": [
259
+ "psp22_external",
260
+ "ApproveInput1"
261
+ ],
262
+ "type": 7
263
+ }
264
+ },
265
+ {
266
+ "label": "value",
267
+ "type": {
268
+ "displayName": [
269
+ "psp22_external",
270
+ "ApproveInput2"
271
+ ],
272
+ "type": 0
273
+ }
274
+ }
275
+ ],
276
+ "docs": [
277
+ " Allows `spender` to withdraw from the caller's account multiple times, up to",
278
+ " the `value` amount.",
279
+ "",
280
+ " If this function is called again it overwrites the current allowance with `value`.",
281
+ "",
282
+ " An `Approval` event is emitted.",
283
+ "",
284
+ " # Errors",
285
+ "",
286
+ " Returns `ZeroSenderAddress` error if sender's address is zero.",
287
+ "",
288
+ " Returns `ZeroRecipientAddress` error if recipient's address is zero."
289
+ ],
290
+ "label": "PSP22::approve",
291
+ "mutates": true,
292
+ "payable": false,
293
+ "returnType": {
294
+ "displayName": [
295
+ "ink",
296
+ "MessageResult"
297
+ ],
298
+ "type": 10
299
+ },
300
+ "selector": "0xb20f1bbd"
301
+ },
302
+ {
303
+ "args": [],
304
+ "docs": [
305
+ " Returns the total token supply."
306
+ ],
307
+ "label": "PSP22::total_supply",
308
+ "mutates": false,
309
+ "payable": false,
310
+ "returnType": {
311
+ "displayName": [
312
+ "ink",
313
+ "MessageResult"
314
+ ],
315
+ "type": 9
316
+ },
317
+ "selector": "0x162df8c2"
318
+ },
319
+ {
320
+ "args": [
321
+ {
322
+ "label": "spender",
323
+ "type": {
324
+ "displayName": [
325
+ "psp22_external",
326
+ "IncreaseAllowanceInput1"
327
+ ],
328
+ "type": 7
329
+ }
330
+ },
331
+ {
332
+ "label": "delta_value",
333
+ "type": {
334
+ "displayName": [
335
+ "psp22_external",
336
+ "IncreaseAllowanceInput2"
337
+ ],
338
+ "type": 0
339
+ }
340
+ }
341
+ ],
342
+ "docs": [
343
+ " Atomically increases the allowance granted to `spender` by the caller.",
344
+ "",
345
+ " An `Approval` event is emitted.",
346
+ "",
347
+ " # Errors",
348
+ "",
349
+ " Returns `ZeroSenderAddress` error if sender's address is zero.",
350
+ "",
351
+ " Returns `ZeroRecipientAddress` error if recipient's address is zero."
352
+ ],
353
+ "label": "PSP22::increase_allowance",
354
+ "mutates": true,
355
+ "payable": false,
356
+ "returnType": {
357
+ "displayName": [
358
+ "ink",
359
+ "MessageResult"
360
+ ],
361
+ "type": 10
362
+ },
363
+ "selector": "0x96d6b57a"
364
+ },
365
+ {
366
+ "args": [
367
+ {
368
+ "label": "spender",
369
+ "type": {
370
+ "displayName": [
371
+ "psp22_external",
372
+ "DecreaseAllowanceInput1"
373
+ ],
374
+ "type": 7
375
+ }
376
+ },
377
+ {
378
+ "label": "delta_value",
379
+ "type": {
380
+ "displayName": [
381
+ "psp22_external",
382
+ "DecreaseAllowanceInput2"
383
+ ],
384
+ "type": 0
385
+ }
386
+ }
387
+ ],
388
+ "docs": [
389
+ " Atomically decreases the allowance granted to `spender` by the caller.",
390
+ "",
391
+ " An `Approval` event is emitted.",
392
+ "",
393
+ " # Errors",
394
+ "",
395
+ " Returns `InsufficientAllowance` error if there are not enough tokens allowed",
396
+ " by owner for `spender`.",
397
+ "",
398
+ " Returns `ZeroSenderAddress` error if sender's address is zero.",
399
+ "",
400
+ " Returns `ZeroRecipientAddress` error if recipient's address is zero."
401
+ ],
402
+ "label": "PSP22::decrease_allowance",
403
+ "mutates": true,
404
+ "payable": false,
405
+ "returnType": {
406
+ "displayName": [
407
+ "ink",
408
+ "MessageResult"
409
+ ],
410
+ "type": 10
411
+ },
412
+ "selector": "0xfecb57d5"
413
+ },
414
+ {
415
+ "args": [
416
+ {
417
+ "label": "owner",
418
+ "type": {
419
+ "displayName": [
420
+ "psp22_external",
421
+ "AllowanceInput1"
422
+ ],
423
+ "type": 7
424
+ }
425
+ },
426
+ {
427
+ "label": "spender",
428
+ "type": {
429
+ "displayName": [
430
+ "psp22_external",
431
+ "AllowanceInput2"
432
+ ],
433
+ "type": 7
434
+ }
435
+ }
436
+ ],
437
+ "docs": [
438
+ " Returns the amount which `spender` is still allowed to withdraw from `owner`.",
439
+ "",
440
+ " Returns `0` if no allowance has been set `0`."
441
+ ],
442
+ "label": "PSP22::allowance",
443
+ "mutates": false,
444
+ "payable": false,
445
+ "returnType": {
446
+ "displayName": [
447
+ "ink",
448
+ "MessageResult"
449
+ ],
450
+ "type": 9
451
+ },
452
+ "selector": "0x4d47d921"
453
+ },
454
+ {
455
+ "args": [],
456
+ "docs": [
457
+ " Returns the token decimals."
458
+ ],
459
+ "label": "PSP22Metadata::token_decimals",
460
+ "mutates": false,
461
+ "payable": false,
462
+ "returnType": {
463
+ "displayName": [
464
+ "ink",
465
+ "MessageResult"
466
+ ],
467
+ "type": 13
468
+ },
469
+ "selector": "0x7271b782"
470
+ },
471
+ {
472
+ "args": [],
473
+ "docs": [
474
+ " Returns the token name."
475
+ ],
476
+ "label": "PSP22Metadata::token_name",
477
+ "mutates": false,
478
+ "payable": false,
479
+ "returnType": {
480
+ "displayName": [
481
+ "ink",
482
+ "MessageResult"
483
+ ],
484
+ "type": 14
485
+ },
486
+ "selector": "0x3d261bd4"
487
+ },
488
+ {
489
+ "args": [],
490
+ "docs": [
491
+ " Returns the token symbol."
492
+ ],
493
+ "label": "PSP22Metadata::token_symbol",
494
+ "mutates": false,
495
+ "payable": false,
496
+ "returnType": {
497
+ "displayName": [
498
+ "ink",
499
+ "MessageResult"
500
+ ],
501
+ "type": 14
502
+ },
503
+ "selector": "0x34205be5"
504
+ }
505
+ ]
506
+ },
507
+ "storage": {
508
+ "root": {
509
+ "layout": {
510
+ "struct": {
511
+ "fields": [
512
+ {
513
+ "layout": {
514
+ "struct": {
515
+ "fields": [
516
+ {
517
+ "layout": {
518
+ "leaf": {
519
+ "key": "0x00000000",
520
+ "ty": 0
521
+ }
522
+ },
523
+ "name": "supply"
524
+ },
525
+ {
526
+ "layout": {
527
+ "root": {
528
+ "layout": {
529
+ "leaf": {
530
+ "key": "0x1d458d3b",
531
+ "ty": 0
532
+ }
533
+ },
534
+ "root_key": "0x1d458d3b"
535
+ }
536
+ },
537
+ "name": "balances"
538
+ },
539
+ {
540
+ "layout": {
541
+ "root": {
542
+ "layout": {
543
+ "leaf": {
544
+ "key": "0x0abd72fb",
545
+ "ty": 0
546
+ }
547
+ },
548
+ "root_key": "0x0abd72fb"
549
+ }
550
+ },
551
+ "name": "allowances"
552
+ },
553
+ {
554
+ "layout": {
555
+ "enum": {
556
+ "dispatchKey": "0x00000000",
557
+ "name": "Option",
558
+ "variants": {
559
+ "0": {
560
+ "fields": [],
561
+ "name": "None"
562
+ },
563
+ "1": {
564
+ "fields": [
565
+ {
566
+ "layout": {
567
+ "leaf": {
568
+ "key": "0x00000000",
569
+ "ty": 1
570
+ }
571
+ },
572
+ "name": "0"
573
+ }
574
+ ],
575
+ "name": "Some"
576
+ }
577
+ }
578
+ }
579
+ },
580
+ "name": "_reserved"
581
+ }
582
+ ],
583
+ "name": "Data"
584
+ }
585
+ },
586
+ "name": "psp22"
587
+ },
588
+ {
589
+ "layout": {
590
+ "struct": {
591
+ "fields": [
592
+ {
593
+ "layout": {
594
+ "enum": {
595
+ "dispatchKey": "0x00000000",
596
+ "name": "Option",
597
+ "variants": {
598
+ "0": {
599
+ "fields": [],
600
+ "name": "None"
601
+ },
602
+ "1": {
603
+ "fields": [
604
+ {
605
+ "layout": {
606
+ "leaf": {
607
+ "key": "0x00000000",
608
+ "ty": 2
609
+ }
610
+ },
611
+ "name": "0"
612
+ }
613
+ ],
614
+ "name": "Some"
615
+ }
616
+ }
617
+ }
618
+ },
619
+ "name": "name"
620
+ },
621
+ {
622
+ "layout": {
623
+ "enum": {
624
+ "dispatchKey": "0x00000000",
625
+ "name": "Option",
626
+ "variants": {
627
+ "0": {
628
+ "fields": [],
629
+ "name": "None"
630
+ },
631
+ "1": {
632
+ "fields": [
633
+ {
634
+ "layout": {
635
+ "leaf": {
636
+ "key": "0x00000000",
637
+ "ty": 2
638
+ }
639
+ },
640
+ "name": "0"
641
+ }
642
+ ],
643
+ "name": "Some"
644
+ }
645
+ }
646
+ }
647
+ },
648
+ "name": "symbol"
649
+ },
650
+ {
651
+ "layout": {
652
+ "leaf": {
653
+ "key": "0x00000000",
654
+ "ty": 3
655
+ }
656
+ },
657
+ "name": "decimals"
658
+ },
659
+ {
660
+ "layout": {
661
+ "enum": {
662
+ "dispatchKey": "0x00000000",
663
+ "name": "Option",
664
+ "variants": {
665
+ "0": {
666
+ "fields": [],
667
+ "name": "None"
668
+ },
669
+ "1": {
670
+ "fields": [
671
+ {
672
+ "layout": {
673
+ "leaf": {
674
+ "key": "0x00000000",
675
+ "ty": 1
676
+ }
677
+ },
678
+ "name": "0"
679
+ }
680
+ ],
681
+ "name": "Some"
682
+ }
683
+ }
684
+ }
685
+ },
686
+ "name": "_reserved"
687
+ }
688
+ ],
689
+ "name": "Data"
690
+ }
691
+ },
692
+ "name": "metadata"
693
+ }
694
+ ],
695
+ "name": "Contract"
696
+ }
697
+ },
698
+ "root_key": "0x00000000"
699
+ }
700
+ },
701
+ "types": [
702
+ {
703
+ "id": 0,
704
+ "type": {
705
+ "def": {
706
+ "primitive": "u128"
707
+ }
708
+ }
709
+ },
710
+ {
711
+ "id": 1,
712
+ "type": {
713
+ "def": {
714
+ "tuple": []
715
+ }
716
+ }
717
+ },
718
+ {
719
+ "id": 2,
720
+ "type": {
721
+ "def": {
722
+ "sequence": {
723
+ "type": 3
724
+ }
725
+ }
726
+ }
727
+ },
728
+ {
729
+ "id": 3,
730
+ "type": {
731
+ "def": {
732
+ "primitive": "u8"
733
+ }
734
+ }
735
+ },
736
+ {
737
+ "id": 4,
738
+ "type": {
739
+ "def": {
740
+ "variant": {
741
+ "variants": [
742
+ {
743
+ "index": 0,
744
+ "name": "None"
745
+ },
746
+ {
747
+ "fields": [
748
+ {
749
+ "type": 2
750
+ }
751
+ ],
752
+ "index": 1,
753
+ "name": "Some"
754
+ }
755
+ ]
756
+ }
757
+ },
758
+ "params": [
759
+ {
760
+ "name": "T",
761
+ "type": 2
762
+ }
763
+ ],
764
+ "path": [
765
+ "Option"
766
+ ]
767
+ }
768
+ },
769
+ {
770
+ "id": 5,
771
+ "type": {
772
+ "def": {
773
+ "variant": {
774
+ "variants": [
775
+ {
776
+ "fields": [
777
+ {
778
+ "type": 1
779
+ }
780
+ ],
781
+ "index": 0,
782
+ "name": "Ok"
783
+ },
784
+ {
785
+ "fields": [
786
+ {
787
+ "type": 6
788
+ }
789
+ ],
790
+ "index": 1,
791
+ "name": "Err"
792
+ }
793
+ ]
794
+ }
795
+ },
796
+ "params": [
797
+ {
798
+ "name": "T",
799
+ "type": 1
800
+ },
801
+ {
802
+ "name": "E",
803
+ "type": 6
804
+ }
805
+ ],
806
+ "path": [
807
+ "Result"
808
+ ]
809
+ }
810
+ },
811
+ {
812
+ "id": 6,
813
+ "type": {
814
+ "def": {
815
+ "variant": {
816
+ "variants": [
817
+ {
818
+ "index": 1,
819
+ "name": "CouldNotReadInput"
820
+ }
821
+ ]
822
+ }
823
+ },
824
+ "path": [
825
+ "ink_primitives",
826
+ "LangError"
827
+ ]
828
+ }
829
+ },
830
+ {
831
+ "id": 7,
832
+ "type": {
833
+ "def": {
834
+ "composite": {
835
+ "fields": [
836
+ {
837
+ "type": 8,
838
+ "typeName": "[u8; 32]"
839
+ }
840
+ ]
841
+ }
842
+ },
843
+ "path": [
844
+ "ink_primitives",
845
+ "types",
846
+ "AccountId"
847
+ ]
848
+ }
849
+ },
850
+ {
851
+ "id": 8,
852
+ "type": {
853
+ "def": {
854
+ "array": {
855
+ "len": 32,
856
+ "type": 3
857
+ }
858
+ }
859
+ }
860
+ },
861
+ {
862
+ "id": 9,
863
+ "type": {
864
+ "def": {
865
+ "variant": {
866
+ "variants": [
867
+ {
868
+ "fields": [
869
+ {
870
+ "type": 0
871
+ }
872
+ ],
873
+ "index": 0,
874
+ "name": "Ok"
875
+ },
876
+ {
877
+ "fields": [
878
+ {
879
+ "type": 6
880
+ }
881
+ ],
882
+ "index": 1,
883
+ "name": "Err"
884
+ }
885
+ ]
886
+ }
887
+ },
888
+ "params": [
889
+ {
890
+ "name": "T",
891
+ "type": 0
892
+ },
893
+ {
894
+ "name": "E",
895
+ "type": 6
896
+ }
897
+ ],
898
+ "path": [
899
+ "Result"
900
+ ]
901
+ }
902
+ },
903
+ {
904
+ "id": 10,
905
+ "type": {
906
+ "def": {
907
+ "variant": {
908
+ "variants": [
909
+ {
910
+ "fields": [
911
+ {
912
+ "type": 11
913
+ }
914
+ ],
915
+ "index": 0,
916
+ "name": "Ok"
917
+ },
918
+ {
919
+ "fields": [
920
+ {
921
+ "type": 6
922
+ }
923
+ ],
924
+ "index": 1,
925
+ "name": "Err"
926
+ }
927
+ ]
928
+ }
929
+ },
930
+ "params": [
931
+ {
932
+ "name": "T",
933
+ "type": 11
934
+ },
935
+ {
936
+ "name": "E",
937
+ "type": 6
938
+ }
939
+ ],
940
+ "path": [
941
+ "Result"
942
+ ]
943
+ }
944
+ },
945
+ {
946
+ "id": 11,
947
+ "type": {
948
+ "def": {
949
+ "variant": {
950
+ "variants": [
951
+ {
952
+ "fields": [
953
+ {
954
+ "type": 1
955
+ }
956
+ ],
957
+ "index": 0,
958
+ "name": "Ok"
959
+ },
960
+ {
961
+ "fields": [
962
+ {
963
+ "type": 12
964
+ }
965
+ ],
966
+ "index": 1,
967
+ "name": "Err"
968
+ }
969
+ ]
970
+ }
971
+ },
972
+ "params": [
973
+ {
974
+ "name": "T",
975
+ "type": 1
976
+ },
977
+ {
978
+ "name": "E",
979
+ "type": 12
980
+ }
981
+ ],
982
+ "path": [
983
+ "Result"
984
+ ]
985
+ }
986
+ },
987
+ {
988
+ "id": 12,
989
+ "type": {
990
+ "def": {
991
+ "variant": {
992
+ "variants": [
993
+ {
994
+ "fields": [
995
+ {
996
+ "type": 2,
997
+ "typeName": "String"
998
+ }
999
+ ],
1000
+ "index": 0,
1001
+ "name": "Custom"
1002
+ },
1003
+ {
1004
+ "index": 1,
1005
+ "name": "InsufficientBalance"
1006
+ },
1007
+ {
1008
+ "index": 2,
1009
+ "name": "InsufficientAllowance"
1010
+ },
1011
+ {
1012
+ "index": 3,
1013
+ "name": "ZeroRecipientAddress"
1014
+ },
1015
+ {
1016
+ "index": 4,
1017
+ "name": "ZeroSenderAddress"
1018
+ },
1019
+ {
1020
+ "fields": [
1021
+ {
1022
+ "type": 2,
1023
+ "typeName": "String"
1024
+ }
1025
+ ],
1026
+ "index": 5,
1027
+ "name": "SafeTransferCheckFailed"
1028
+ }
1029
+ ]
1030
+ }
1031
+ },
1032
+ "path": [
1033
+ "openbrush_contracts",
1034
+ "traits",
1035
+ "errors",
1036
+ "psp22",
1037
+ "PSP22Error"
1038
+ ]
1039
+ }
1040
+ },
1041
+ {
1042
+ "id": 13,
1043
+ "type": {
1044
+ "def": {
1045
+ "variant": {
1046
+ "variants": [
1047
+ {
1048
+ "fields": [
1049
+ {
1050
+ "type": 3
1051
+ }
1052
+ ],
1053
+ "index": 0,
1054
+ "name": "Ok"
1055
+ },
1056
+ {
1057
+ "fields": [
1058
+ {
1059
+ "type": 6
1060
+ }
1061
+ ],
1062
+ "index": 1,
1063
+ "name": "Err"
1064
+ }
1065
+ ]
1066
+ }
1067
+ },
1068
+ "params": [
1069
+ {
1070
+ "name": "T",
1071
+ "type": 3
1072
+ },
1073
+ {
1074
+ "name": "E",
1075
+ "type": 6
1076
+ }
1077
+ ],
1078
+ "path": [
1079
+ "Result"
1080
+ ]
1081
+ }
1082
+ },
1083
+ {
1084
+ "id": 14,
1085
+ "type": {
1086
+ "def": {
1087
+ "variant": {
1088
+ "variants": [
1089
+ {
1090
+ "fields": [
1091
+ {
1092
+ "type": 4
1093
+ }
1094
+ ],
1095
+ "index": 0,
1096
+ "name": "Ok"
1097
+ },
1098
+ {
1099
+ "fields": [
1100
+ {
1101
+ "type": 6
1102
+ }
1103
+ ],
1104
+ "index": 1,
1105
+ "name": "Err"
1106
+ }
1107
+ ]
1108
+ }
1109
+ },
1110
+ "params": [
1111
+ {
1112
+ "name": "T",
1113
+ "type": 4
1114
+ },
1115
+ {
1116
+ "name": "E",
1117
+ "type": 6
1118
+ }
1119
+ ],
1120
+ "path": [
1121
+ "Result"
1122
+ ]
1123
+ }
1124
+ }
1125
+ ],
1126
+ "version": "4"
1127
+ }