scale.rb 0.2.14 → 0.2.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Cargo.lock +2007 -11
- data/Cargo.toml +9 -2
- data/Dockerfile +4 -1
- data/Gemfile.lock +45 -46
- data/README.md +28 -1
- data/exe/scale +39 -70
- data/lib/address.rb +3 -0
- data/lib/common.rb +163 -0
- data/lib/helper.rb +128 -0
- data/lib/metadata/metadata.rb +15 -1
- data/lib/scale.rb +105 -33
- data/lib/scale/base.rb +52 -13
- data/lib/scale/block.rb +17 -27
- data/lib/scale/types.rb +71 -4
- data/lib/scale/version.rb +1 -1
- data/lib/substrate_client.rb +170 -0
- data/lib/type_registry/{crab-28.json → crab.json} +474 -126
- data/lib/type_registry/darwinia.json +701 -136
- data/lib/type_registry/default.json +2 -2
- data/lib/type_registry/pangolin.json +332 -0
- data/scale.gemspec +7 -5
- data/scripts/block_events.rb +2 -3
- data/src/lib.rs +42 -1
- data/src/storage_key.rs +41 -0
- metadata +52 -26
- data/.DS_Store +0 -0
- data/lib/type_registry/darwinia-8.json +0 -662
- data/lib/type_registry/edgeware.json +0 -124
- data/lib/type_registry/joystream.json +0 -49
- data/lib/type_registry/kulupu.json +0 -15
- data/lib/type_registry/plasm.json +0 -89
- data/lib/type_registry/robonomics.json +0 -39
- data/lib/type_registry/westend.json +0 -63
@@ -1,5 +1,447 @@
|
|
1
1
|
{
|
2
|
+
"versioning": [
|
3
|
+
{
|
4
|
+
"runtime_range": [
|
5
|
+
35,
|
6
|
+
41
|
7
|
+
],
|
8
|
+
"types": {
|
9
|
+
"ScheduledAuthoritiesChangeT": {
|
10
|
+
"type": "struct",
|
11
|
+
"type_mapping": [
|
12
|
+
[
|
13
|
+
"next_authorities",
|
14
|
+
"Vec<RelayAuthorityT>"
|
15
|
+
],
|
16
|
+
[
|
17
|
+
"deadline",
|
18
|
+
"BlockNumber"
|
19
|
+
]
|
20
|
+
]
|
21
|
+
}
|
22
|
+
}
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"runtime_range": [
|
26
|
+
34,
|
27
|
+
41
|
28
|
+
],
|
29
|
+
"types": {
|
30
|
+
"OpCode": "[u8; 4]",
|
31
|
+
"Term": "u32"
|
32
|
+
}
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"runtime_range": [
|
36
|
+
34,
|
37
|
+
34
|
38
|
+
],
|
39
|
+
"types": {
|
40
|
+
"ScheduledAuthoritiesChange": {
|
41
|
+
"type": "struct",
|
42
|
+
"type_mapping": [
|
43
|
+
[
|
44
|
+
"next_authorities",
|
45
|
+
"Vec<RelayAuthorityT>"
|
46
|
+
],
|
47
|
+
[
|
48
|
+
"deadline",
|
49
|
+
"BlockNumber"
|
50
|
+
]
|
51
|
+
]
|
52
|
+
}
|
53
|
+
}
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"runtime_range": [
|
57
|
+
20,
|
58
|
+
28
|
59
|
+
],
|
60
|
+
"types": {
|
61
|
+
"MerkleMountainRangeRootLog": {
|
62
|
+
"type": "struct",
|
63
|
+
"type_mapping": [
|
64
|
+
[
|
65
|
+
"prefix",
|
66
|
+
"[u8; 4]"
|
67
|
+
],
|
68
|
+
[
|
69
|
+
"mmr_root",
|
70
|
+
"Hash"
|
71
|
+
]
|
72
|
+
]
|
73
|
+
}
|
74
|
+
}
|
75
|
+
},
|
76
|
+
{
|
77
|
+
"runtime_range": [
|
78
|
+
29,
|
79
|
+
41
|
80
|
+
],
|
81
|
+
"types": {
|
82
|
+
"EcdsaMessage": "[u8; 32]",
|
83
|
+
"RelayAuthoritySigner": "EcdsaAddress",
|
84
|
+
"RelayAuthorityMessage": "EcdsaMessage",
|
85
|
+
"RelayAuthoritySignature": "EcdsaSignature",
|
86
|
+
"RelayAuthorityT": {
|
87
|
+
"type": "struct",
|
88
|
+
"type_mapping": [
|
89
|
+
[
|
90
|
+
"account_id",
|
91
|
+
"AccountId"
|
92
|
+
],
|
93
|
+
[
|
94
|
+
"signer",
|
95
|
+
"Signer"
|
96
|
+
],
|
97
|
+
[
|
98
|
+
"stake",
|
99
|
+
"Balance"
|
100
|
+
],
|
101
|
+
[
|
102
|
+
"term",
|
103
|
+
"BlockNumber"
|
104
|
+
]
|
105
|
+
]
|
106
|
+
},
|
107
|
+
"MMRRoot": "Hash",
|
108
|
+
"MerkleMountainRangeRootLog": {
|
109
|
+
"type": "struct",
|
110
|
+
"type_mapping": [
|
111
|
+
[
|
112
|
+
"prefix",
|
113
|
+
"[u8; 4]"
|
114
|
+
],
|
115
|
+
[
|
116
|
+
"parent_mmr_root",
|
117
|
+
"Hash"
|
118
|
+
]
|
119
|
+
]
|
120
|
+
},
|
121
|
+
"EthereumRelayHeaderParcel": {
|
122
|
+
"type": "struct",
|
123
|
+
"type_mapping": [
|
124
|
+
[
|
125
|
+
"header",
|
126
|
+
"EthereumHeader"
|
127
|
+
],
|
128
|
+
[
|
129
|
+
"parent_mmr_root",
|
130
|
+
"H256"
|
131
|
+
]
|
132
|
+
]
|
133
|
+
}
|
134
|
+
}
|
135
|
+
},
|
136
|
+
{
|
137
|
+
"runtime_range": [
|
138
|
+
25,
|
139
|
+
41
|
140
|
+
],
|
141
|
+
"types": {
|
142
|
+
"RelayProofs": "EthereumRelayProofs"
|
143
|
+
}
|
144
|
+
},
|
145
|
+
{
|
146
|
+
"runtime_range": [
|
147
|
+
24,
|
148
|
+
41
|
149
|
+
],
|
150
|
+
"types": {
|
151
|
+
"RelayVotingState": {
|
152
|
+
"type": "struct",
|
153
|
+
"type_mapping": [
|
154
|
+
[
|
155
|
+
"ayes",
|
156
|
+
"Vec<AccountId>"
|
157
|
+
],
|
158
|
+
[
|
159
|
+
"nays",
|
160
|
+
"Vec<AccountId>"
|
161
|
+
]
|
162
|
+
]
|
163
|
+
},
|
164
|
+
"ProxyType": {
|
165
|
+
"type": "enum",
|
166
|
+
"type_mapping": [
|
167
|
+
[
|
168
|
+
"Any",
|
169
|
+
"Null"
|
170
|
+
],
|
171
|
+
[
|
172
|
+
"NonTransfer",
|
173
|
+
"Null"
|
174
|
+
],
|
175
|
+
[
|
176
|
+
"Governance",
|
177
|
+
"Null"
|
178
|
+
],
|
179
|
+
[
|
180
|
+
"Staking",
|
181
|
+
"Null"
|
182
|
+
],
|
183
|
+
[
|
184
|
+
"IdentityJudgement",
|
185
|
+
"Null"
|
186
|
+
],
|
187
|
+
[
|
188
|
+
"EthereumBridge",
|
189
|
+
"Null"
|
190
|
+
]
|
191
|
+
]
|
192
|
+
},
|
193
|
+
"RelayHeaderId": "EthereumBlockNumber",
|
194
|
+
"RelayHeaderParcel": "EthereumRelayHeaderParcel",
|
195
|
+
"RelayAffirmationId": {
|
196
|
+
"type": "struct",
|
197
|
+
"type_mapping": [
|
198
|
+
[
|
199
|
+
"game_id",
|
200
|
+
"EthereumBlockNumber"
|
201
|
+
],
|
202
|
+
[
|
203
|
+
"round",
|
204
|
+
"u32"
|
205
|
+
],
|
206
|
+
[
|
207
|
+
"index",
|
208
|
+
"u32"
|
209
|
+
]
|
210
|
+
]
|
211
|
+
},
|
212
|
+
"RelayAffirmationT": {
|
213
|
+
"type": "struct",
|
214
|
+
"type_mapping": [
|
215
|
+
[
|
216
|
+
"relayer",
|
217
|
+
"AccountId"
|
218
|
+
],
|
219
|
+
[
|
220
|
+
"relay_header_parcels",
|
221
|
+
"EthereumRelayHeaderParcel"
|
222
|
+
],
|
223
|
+
[
|
224
|
+
"bond",
|
225
|
+
"Balance"
|
226
|
+
],
|
227
|
+
[
|
228
|
+
"maybe_extended_relay_affirmation_id",
|
229
|
+
"Option<RelayAffirmationId>"
|
230
|
+
],
|
231
|
+
[
|
232
|
+
"verified",
|
233
|
+
"bool"
|
234
|
+
]
|
235
|
+
]
|
236
|
+
}
|
237
|
+
}
|
238
|
+
},
|
239
|
+
{
|
240
|
+
"runtime_range": [
|
241
|
+
24,
|
242
|
+
24
|
243
|
+
],
|
244
|
+
"types": {
|
245
|
+
"RelayProofs": "EthereumRelayProof"
|
246
|
+
}
|
247
|
+
},
|
248
|
+
{
|
249
|
+
"runtime_range": [
|
250
|
+
20,
|
251
|
+
22
|
252
|
+
],
|
253
|
+
"types": {
|
254
|
+
"EthereumHeaderBrief": {
|
255
|
+
"type": "struct",
|
256
|
+
"type_mapping": [
|
257
|
+
[
|
258
|
+
"total_difficulty",
|
259
|
+
"U256"
|
260
|
+
],
|
261
|
+
[
|
262
|
+
"parent_hash",
|
263
|
+
"H256"
|
264
|
+
],
|
265
|
+
[
|
266
|
+
"number",
|
267
|
+
"EthereumBlockNumber"
|
268
|
+
],
|
269
|
+
[
|
270
|
+
"relayer",
|
271
|
+
"AccountId"
|
272
|
+
]
|
273
|
+
]
|
274
|
+
},
|
275
|
+
"EthereumHeaderThingWithProof": {
|
276
|
+
"type": "struct",
|
277
|
+
"type_mapping": [
|
278
|
+
[
|
279
|
+
"header",
|
280
|
+
"EthereumHeader"
|
281
|
+
],
|
282
|
+
[
|
283
|
+
"ethash_proof",
|
284
|
+
"Vec<EthashProof>"
|
285
|
+
],
|
286
|
+
[
|
287
|
+
"mmr_root",
|
288
|
+
"H256"
|
289
|
+
],
|
290
|
+
[
|
291
|
+
"mmr_proof",
|
292
|
+
"Vec<H256>"
|
293
|
+
]
|
294
|
+
]
|
295
|
+
},
|
296
|
+
"ConfirmedEthereumHeaderInfo": {
|
297
|
+
"type": "struct",
|
298
|
+
"type_mapping": [
|
299
|
+
[
|
300
|
+
"header",
|
301
|
+
"EthereumHeader"
|
302
|
+
],
|
303
|
+
[
|
304
|
+
"mmr_root",
|
305
|
+
"H256"
|
306
|
+
]
|
307
|
+
]
|
308
|
+
},
|
309
|
+
"EthereumHeaderThing": {
|
310
|
+
"type": "struct",
|
311
|
+
"type_mapping": [
|
312
|
+
[
|
313
|
+
"header",
|
314
|
+
"EthereumHeader"
|
315
|
+
],
|
316
|
+
[
|
317
|
+
"mmr_root",
|
318
|
+
"H256"
|
319
|
+
]
|
320
|
+
]
|
321
|
+
},
|
322
|
+
"Round": "u64",
|
323
|
+
"TcHeaderThingWithProof": "EthereumHeaderThingWithProof",
|
324
|
+
"TcHeaderThing": "EthereumHeaderThing",
|
325
|
+
"TcBlockNumber": "u64",
|
326
|
+
"TcHeaderHash": "H256",
|
327
|
+
"GameId": "TcBlockNumber",
|
328
|
+
"RelayProposalT": {
|
329
|
+
"type": "struct",
|
330
|
+
"type_mapping": [
|
331
|
+
[
|
332
|
+
"relayer",
|
333
|
+
"AccountId"
|
334
|
+
],
|
335
|
+
[
|
336
|
+
"bonded_proposal",
|
337
|
+
"Vec<(Balance, TcHeaderThing)>"
|
338
|
+
],
|
339
|
+
[
|
340
|
+
"extend_from_header_hash",
|
341
|
+
"Option<TcHeaderHash>"
|
342
|
+
]
|
343
|
+
]
|
344
|
+
}
|
345
|
+
}
|
346
|
+
},
|
347
|
+
{
|
348
|
+
"runtime_range": [
|
349
|
+
23,
|
350
|
+
41
|
351
|
+
],
|
352
|
+
"types": {
|
353
|
+
"EthereumRelayProofs": {
|
354
|
+
"type": "struct",
|
355
|
+
"type_mapping": [
|
356
|
+
[
|
357
|
+
"ethash_proof",
|
358
|
+
"Vec<EthashProof>"
|
359
|
+
],
|
360
|
+
[
|
361
|
+
"mmr_proof",
|
362
|
+
"Vec<H256>"
|
363
|
+
]
|
364
|
+
]
|
365
|
+
}
|
366
|
+
}
|
367
|
+
},
|
368
|
+
{
|
369
|
+
"runtime_range": [
|
370
|
+
23,
|
371
|
+
28
|
372
|
+
],
|
373
|
+
"types": {
|
374
|
+
"EthereumRelayHeaderParcel": {
|
375
|
+
"type": "struct",
|
376
|
+
"type_mapping": [
|
377
|
+
[
|
378
|
+
"header",
|
379
|
+
"EthereumHeader"
|
380
|
+
],
|
381
|
+
[
|
382
|
+
"mmr_root",
|
383
|
+
"H256"
|
384
|
+
]
|
385
|
+
]
|
386
|
+
}
|
387
|
+
}
|
388
|
+
},
|
389
|
+
{
|
390
|
+
"runtime_range": [
|
391
|
+
23,
|
392
|
+
23
|
393
|
+
],
|
394
|
+
"types": {
|
395
|
+
"RelayHeaderId": "Vec<u8>",
|
396
|
+
"RelayHeaderParcel": "Vec<u8>",
|
397
|
+
"RelayAffirmationId": {
|
398
|
+
"type": "struct",
|
399
|
+
"type_mapping": [
|
400
|
+
[
|
401
|
+
"relay_header_id",
|
402
|
+
"Vec<u8>"
|
403
|
+
],
|
404
|
+
[
|
405
|
+
"round",
|
406
|
+
"u32"
|
407
|
+
],
|
408
|
+
[
|
409
|
+
"index",
|
410
|
+
"u32"
|
411
|
+
]
|
412
|
+
]
|
413
|
+
},
|
414
|
+
"RelayAffirmationT": {
|
415
|
+
"type": "struct",
|
416
|
+
"type_mapping": [
|
417
|
+
[
|
418
|
+
"relayer",
|
419
|
+
"AccountId"
|
420
|
+
],
|
421
|
+
[
|
422
|
+
"relay_header_parcels",
|
423
|
+
"Vec<u8>"
|
424
|
+
],
|
425
|
+
[
|
426
|
+
"bond",
|
427
|
+
"Balance"
|
428
|
+
],
|
429
|
+
[
|
430
|
+
"maybe_extended_relay_affirmation_id",
|
431
|
+
"Option<Vec<u8>>"
|
432
|
+
],
|
433
|
+
[
|
434
|
+
"verified",
|
435
|
+
"bool"
|
436
|
+
]
|
437
|
+
]
|
438
|
+
},
|
439
|
+
"RelayProofs": "Vec<u8>"
|
440
|
+
}
|
441
|
+
}
|
442
|
+
],
|
2
443
|
"types": {
|
444
|
+
"Balance": "u64",
|
3
445
|
"Address": "AccountId",
|
4
446
|
"LookupSource": "AccountId",
|
5
447
|
"BalanceLock": {
|
@@ -16,6 +458,14 @@
|
|
16
458
|
[
|
17
459
|
"lock_reasons",
|
18
460
|
"LockReasons"
|
461
|
+
],
|
462
|
+
[
|
463
|
+
"amount",
|
464
|
+
"Balance"
|
465
|
+
],
|
466
|
+
[
|
467
|
+
"reasons",
|
468
|
+
"Reasons"
|
19
469
|
]
|
20
470
|
]
|
21
471
|
},
|
@@ -102,6 +552,14 @@
|
|
102
552
|
[
|
103
553
|
"reserved_kton",
|
104
554
|
"Balance"
|
555
|
+
],
|
556
|
+
[
|
557
|
+
"misc_frozen",
|
558
|
+
"Balance"
|
559
|
+
],
|
560
|
+
[
|
561
|
+
"fee_frozen",
|
562
|
+
"Balance"
|
105
563
|
]
|
106
564
|
]
|
107
565
|
},
|
@@ -157,6 +615,18 @@
|
|
157
615
|
[
|
158
616
|
"claimed_rewards",
|
159
617
|
"Vec<EraIndex>"
|
618
|
+
],
|
619
|
+
[
|
620
|
+
"total",
|
621
|
+
"Compact<Balance>"
|
622
|
+
],
|
623
|
+
[
|
624
|
+
"active",
|
625
|
+
"Compact<Balance>"
|
626
|
+
],
|
627
|
+
[
|
628
|
+
"unlocking",
|
629
|
+
"Vec<UnlockChunk>"
|
160
630
|
]
|
161
631
|
]
|
162
632
|
},
|
@@ -220,6 +690,10 @@
|
|
220
690
|
[
|
221
691
|
"power",
|
222
692
|
"Power"
|
693
|
+
],
|
694
|
+
[
|
695
|
+
"value",
|
696
|
+
"Compact<Balance>"
|
223
697
|
]
|
224
698
|
]
|
225
699
|
},
|
@@ -486,32 +960,6 @@
|
|
486
960
|
]
|
487
961
|
]
|
488
962
|
},
|
489
|
-
"EthereumRelayHeaderParcel": {
|
490
|
-
"type": "struct",
|
491
|
-
"type_mapping": [
|
492
|
-
[
|
493
|
-
"header",
|
494
|
-
"EthereumHeader"
|
495
|
-
],
|
496
|
-
[
|
497
|
-
"mmr_root",
|
498
|
-
"H256"
|
499
|
-
]
|
500
|
-
]
|
501
|
-
},
|
502
|
-
"EthereumRelayProofs": {
|
503
|
-
"type": "struct",
|
504
|
-
"type_mapping": [
|
505
|
-
[
|
506
|
-
"ethash_proof",
|
507
|
-
"Vec<EthashProof>"
|
508
|
-
],
|
509
|
-
[
|
510
|
-
"mmr_proof",
|
511
|
-
"Vec<H256>"
|
512
|
-
]
|
513
|
-
]
|
514
|
-
},
|
515
963
|
"OtherSignature": {
|
516
964
|
"type": "enum",
|
517
965
|
"type_mapping": [
|
@@ -540,106 +988,6 @@
|
|
540
988
|
]
|
541
989
|
},
|
542
990
|
"AddressT": "[u8; 20]",
|
543
|
-
"MerkleMountainRangeRootLog": {
|
544
|
-
"type": "struct",
|
545
|
-
"type_mapping": [
|
546
|
-
[
|
547
|
-
"prefix",
|
548
|
-
"[u8; 4]"
|
549
|
-
],
|
550
|
-
[
|
551
|
-
"mmr_root",
|
552
|
-
"Hash"
|
553
|
-
]
|
554
|
-
]
|
555
|
-
},
|
556
|
-
"RelayHeaderId": "EthereumBlockNumber",
|
557
|
-
"RelayHeaderParcel": "EthereumRelayHeaderParcel",
|
558
|
-
"RelayProofs": "EthereumRelayProofs",
|
559
|
-
"RelayAffirmationId": {
|
560
|
-
"type": "struct",
|
561
|
-
"type_mapping": [
|
562
|
-
[
|
563
|
-
"game_id",
|
564
|
-
"EthereumBlockNumber"
|
565
|
-
],
|
566
|
-
[
|
567
|
-
"round",
|
568
|
-
"u32"
|
569
|
-
],
|
570
|
-
[
|
571
|
-
"index",
|
572
|
-
"u32"
|
573
|
-
]
|
574
|
-
]
|
575
|
-
},
|
576
|
-
"RelayAffirmationT": {
|
577
|
-
"type": "struct",
|
578
|
-
"type_mapping": [
|
579
|
-
[
|
580
|
-
"relayer",
|
581
|
-
"AccountId"
|
582
|
-
],
|
583
|
-
[
|
584
|
-
"relay_header_parcels",
|
585
|
-
"EthereumRelayHeaderParcel"
|
586
|
-
],
|
587
|
-
[
|
588
|
-
"bond",
|
589
|
-
"Balance"
|
590
|
-
],
|
591
|
-
[
|
592
|
-
"maybe_extended_relay_affirmation_id",
|
593
|
-
"Option<RelayAffirmationId>"
|
594
|
-
],
|
595
|
-
[
|
596
|
-
"verified",
|
597
|
-
"bool"
|
598
|
-
]
|
599
|
-
]
|
600
|
-
},
|
601
|
-
"RelayVotingState": {
|
602
|
-
"type": "struct",
|
603
|
-
"type_mapping": [
|
604
|
-
[
|
605
|
-
"ayes",
|
606
|
-
"Vec<AccountId>"
|
607
|
-
],
|
608
|
-
[
|
609
|
-
"nays",
|
610
|
-
"Vec<AccountId>"
|
611
|
-
]
|
612
|
-
]
|
613
|
-
},
|
614
|
-
"ProxyType": {
|
615
|
-
"type": "enum",
|
616
|
-
"type_mapping": [
|
617
|
-
[
|
618
|
-
"Any",
|
619
|
-
"Null"
|
620
|
-
],
|
621
|
-
[
|
622
|
-
"NonTransfer",
|
623
|
-
"Null"
|
624
|
-
],
|
625
|
-
[
|
626
|
-
"Governance",
|
627
|
-
"Null"
|
628
|
-
],
|
629
|
-
[
|
630
|
-
"Staking",
|
631
|
-
"Null"
|
632
|
-
],
|
633
|
-
[
|
634
|
-
"IdentityJudgement",
|
635
|
-
"Null"
|
636
|
-
],
|
637
|
-
[
|
638
|
-
"EthereumBridge",
|
639
|
-
"Null"
|
640
|
-
]
|
641
|
-
]
|
642
|
-
},
|
643
991
|
"BalancesRuntimeDispatchInfo": {
|
644
992
|
"type": "struct",
|
645
993
|
"type_mapping": [
|