@subwallet/extension-base 1.0.2-2 → 1.0.2-3

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