scale.rb 0.2.18 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,6 +13,7 @@
13
13
  "Fixed64": "u64",
14
14
  "Fixed128": "u128",
15
15
  "AccountIdOf": "AccountId",
16
+ "MultiAddress": "GenericMultiAddress",
16
17
  "AccountVoteSplit": {
17
18
  "type": "struct",
18
19
  "type_mapping": [
@@ -3,57 +3,120 @@
3
3
  "BalanceLock": {
4
4
  "type": "struct",
5
5
  "type_mapping": [
6
- ["id", "LockIdentifier"],
7
- ["lock_for", "LockFor"],
8
- ["lock_reasons", "LockReasons"],
9
- ["amount", "Balance"],
10
- ["reasons", "Reasons"]
6
+ [
7
+ "id",
8
+ "LockIdentifier"
9
+ ],
10
+ [
11
+ "lock_for",
12
+ "LockFor"
13
+ ],
14
+ [
15
+ "lock_reasons",
16
+ "LockReasons"
17
+ ],
18
+ [
19
+ "amount",
20
+ "Balance"
21
+ ],
22
+ [
23
+ "reasons",
24
+ "Reasons"
25
+ ]
11
26
  ]
12
27
  },
13
28
  "LockFor": {
14
29
  "type": "enum",
15
30
  "type_mapping": [
16
- ["Common", "Common"],
17
- ["Staking", "StakingLock"]
31
+ [
32
+ "Common",
33
+ "Common"
34
+ ],
35
+ [
36
+ "Staking",
37
+ "StakingLock"
38
+ ]
18
39
  ]
19
40
  },
20
41
  "Common": {
21
42
  "type": "struct",
22
43
  "type_mapping": [
23
- ["amount", "Balance"]
44
+ [
45
+ "amount",
46
+ "Balance"
47
+ ]
24
48
  ]
25
49
  },
26
50
  "StakingLock": {
27
51
  "type": "struct",
28
52
  "type_mapping": [
29
- ["staking_amount", "Balance"],
30
- ["unbondings", "Vec<Unbonding>"]
53
+ [
54
+ "staking_amount",
55
+ "Balance"
56
+ ],
57
+ [
58
+ "unbondings",
59
+ "Vec<Unbonding>"
60
+ ]
31
61
  ]
32
62
  },
33
63
  "LockReasons": {
34
64
  "type": "enum",
35
65
  "type_mapping": [
36
- ["Fee", "Null"],
37
- ["Misc", "Null"],
38
- ["All", "Null"]
66
+ [
67
+ "Fee",
68
+ "Null"
69
+ ],
70
+ [
71
+ "Misc",
72
+ "Null"
73
+ ],
74
+ [
75
+ "All",
76
+ "Null"
77
+ ]
39
78
  ]
40
79
  },
41
80
  "Unbonding": {
42
81
  "type": "struct",
43
82
  "type_mapping": [
44
- ["amount", "Balance"],
45
- ["until", "BlockNumber"]
83
+ [
84
+ "amount",
85
+ "Balance"
86
+ ],
87
+ [
88
+ "until",
89
+ "BlockNumber"
90
+ ]
46
91
  ]
47
92
  },
48
93
  "AccountData": {
49
94
  "type": "struct",
50
95
  "type_mapping": [
51
- ["free", "Balance"],
52
- ["reserved", "Balance"],
53
- ["free_kton", "Balance"],
54
- ["reserved_kton", "Balance"],
55
- ["misc_frozen", "Balance"],
56
- ["fee_frozen", "Balance"]
96
+ [
97
+ "free",
98
+ "Balance"
99
+ ],
100
+ [
101
+ "reserved",
102
+ "Balance"
103
+ ],
104
+ [
105
+ "free_kton",
106
+ "Balance"
107
+ ],
108
+ [
109
+ "reserved_kton",
110
+ "Balance"
111
+ ],
112
+ [
113
+ "misc_frozen",
114
+ "Balance"
115
+ ],
116
+ [
117
+ "fee_frozen",
118
+ "Balance"
119
+ ]
57
120
  ]
58
121
  },
59
122
  "RingBalance": "Balance",
@@ -64,95 +127,210 @@
64
127
  "StakingBalanceT": {
65
128
  "type": "enum",
66
129
  "type_mapping": [
67
- ["RingBalance", "Balance"],
68
- ["KtonBalance", "Balance"]
130
+ [
131
+ "RingBalance",
132
+ "Balance"
133
+ ],
134
+ [
135
+ "KtonBalance",
136
+ "Balance"
137
+ ]
69
138
  ]
70
139
  },
71
140
  "StakingLedgerT": {
72
141
  "type": "struct",
73
142
  "type_mapping": [
74
- ["stash", "AccountId"],
75
- ["active_ring", "Compact<Balance>"],
76
- ["active_deposit_ring", "Compact<Balance>"],
77
- ["active_kton", "Compact<Balance>"],
78
- ["deposit_items", "Vec<TimeDepositItem>"],
79
- ["ring_staking_lock", "StakingLock"],
80
- ["kton_staking_lock", "StakingLock"],
81
- ["claimed_rewards", "Vec<EraIndex>"],
82
- ["total", "Compact<Balance>"],
83
- ["active", "Compact<Balance>"],
84
- ["unlocking", "Vec<UnlockChunk>"]
143
+ [
144
+ "stash",
145
+ "AccountId"
146
+ ],
147
+ [
148
+ "active_ring",
149
+ "Compact<Balance>"
150
+ ],
151
+ [
152
+ "active_deposit_ring",
153
+ "Compact<Balance>"
154
+ ],
155
+ [
156
+ "active_kton",
157
+ "Compact<Balance>"
158
+ ],
159
+ [
160
+ "deposit_items",
161
+ "Vec<TimeDepositItem>"
162
+ ],
163
+ [
164
+ "ring_staking_lock",
165
+ "StakingLock"
166
+ ],
167
+ [
168
+ "kton_staking_lock",
169
+ "StakingLock"
170
+ ],
171
+ [
172
+ "claimed_rewards",
173
+ "Vec<EraIndex>"
174
+ ],
175
+ [
176
+ "total",
177
+ "Compact<Balance>"
178
+ ],
179
+ [
180
+ "active",
181
+ "Compact<Balance>"
182
+ ],
183
+ [
184
+ "unlocking",
185
+ "Vec<UnlockChunk>"
186
+ ]
85
187
  ]
86
188
  },
87
189
  "TimeDepositItem": {
88
190
  "type": "struct",
89
191
  "type_mapping": [
90
- ["value", "Compact<Balance>"],
91
- ["start_time", "Compact<TsInMs>"],
92
- ["expire_time", "Compact<TsInMs>"]
192
+ [
193
+ "value",
194
+ "Compact<Balance>"
195
+ ],
196
+ [
197
+ "start_time",
198
+ "Compact<TsInMs>"
199
+ ],
200
+ [
201
+ "expire_time",
202
+ "Compact<TsInMs>"
203
+ ]
93
204
  ]
94
205
  },
95
206
  "ExposureT": {
96
207
  "type": "struct",
97
208
  "type_mapping": [
98
- ["own_ring_balance", "Compact<Balance>"],
99
- ["own_kton_balance", "Compact<Balance>"],
100
- ["own_power", "Power"],
101
- ["total_power", "Power"],
102
- ["others", "Vec<IndividualExposure>"]
209
+ [
210
+ "own_ring_balance",
211
+ "Compact<Balance>"
212
+ ],
213
+ [
214
+ "own_kton_balance",
215
+ "Compact<Balance>"
216
+ ],
217
+ [
218
+ "own_power",
219
+ "Power"
220
+ ],
221
+ [
222
+ "total_power",
223
+ "Power"
224
+ ],
225
+ [
226
+ "others",
227
+ "Vec<IndividualExposure>"
228
+ ]
103
229
  ]
104
230
  },
105
231
  "IndividualExposure": {
106
232
  "type": "struct",
107
233
  "type_mapping": [
108
- ["who", "AccountId"],
109
- ["ring_balance", "Compact<Balance>"],
110
- ["kton_balance", "Compact<Balance>"],
111
- ["power", "Power"],
112
- ["value", "Compact<Balance>"]
113
- ]
114
- },
115
- "ElectionResultT": {
116
- "type": "struct",
117
- "type_mapping": [
118
- ["elected_stashes", "Vec<AccountId>"],
119
- ["exposures", "Vec<(AccountId, ExposureT)>"],
120
- ["compute", "ElectionCompute"]
234
+ [
235
+ "who",
236
+ "AccountId"
237
+ ],
238
+ [
239
+ "ring_balance",
240
+ "Compact<Balance>"
241
+ ],
242
+ [
243
+ "kton_balance",
244
+ "Compact<Balance>"
245
+ ],
246
+ [
247
+ "power",
248
+ "Power"
249
+ ],
250
+ [
251
+ "value",
252
+ "Compact<Balance>"
253
+ ]
121
254
  ]
122
255
  },
123
256
  "RKT": {
124
257
  "type": "struct",
125
258
  "type_mapping": [
126
- ["r", "Balance"],
127
- ["k", "Balance"]
259
+ [
260
+ "r",
261
+ "Balance"
262
+ ],
263
+ [
264
+ "k",
265
+ "Balance"
266
+ ]
128
267
  ]
129
268
  },
130
269
  "SpanRecord": {
131
270
  "type": "struct",
132
271
  "type_mapping": [
133
- ["slashed", "RKT"],
134
- ["paid_out", "RKT"]
272
+ [
273
+ "slashed",
274
+ "RKT"
275
+ ],
276
+ [
277
+ "paid_out",
278
+ "RKT"
279
+ ]
135
280
  ]
136
281
  },
137
282
  "UnappliedSlash": {
138
283
  "type": "struct",
139
284
  "type_mapping": [
140
- ["validator", "AccountId"],
141
- ["own", "RKT"],
142
- ["others", "Vec<(AccountId, RKT)>"],
143
- ["reporters", "Vec<AccountId>"],
144
- ["payout", "RKT"]
285
+ [
286
+ "validator",
287
+ "AccountId"
288
+ ],
289
+ [
290
+ "own",
291
+ "RKT"
292
+ ],
293
+ [
294
+ "others",
295
+ "Vec<(AccountId, RKT)>"
296
+ ],
297
+ [
298
+ "reporters",
299
+ "Vec<AccountId>"
300
+ ],
301
+ [
302
+ "payout",
303
+ "RKT"
304
+ ]
145
305
  ]
146
306
  },
147
307
  "TreasuryProposal": {
148
308
  "type": "struct",
149
309
  "type_mapping": [
150
- ["proposer", "AccountId"],
151
- ["beneficiary", "AccountId"],
152
- ["ring_value", "Balance"],
153
- ["kton_value", "Balance"],
154
- ["ring_bond", "Balance"],
155
- ["kton_bond", "Balance"]
310
+ [
311
+ "proposer",
312
+ "AccountId"
313
+ ],
314
+ [
315
+ "beneficiary",
316
+ "AccountId"
317
+ ],
318
+ [
319
+ "ring_value",
320
+ "Balance"
321
+ ],
322
+ [
323
+ "kton_value",
324
+ "Balance"
325
+ ],
326
+ [
327
+ "ring_bond",
328
+ "Balance"
329
+ ],
330
+ [
331
+ "kton_bond",
332
+ "Balance"
333
+ ]
156
334
  ]
157
335
  },
158
336
  "MappedRing": "u128",
@@ -161,21 +339,70 @@
161
339
  "EthereumHeader": {
162
340
  "type": "struct",
163
341
  "type_mapping": [
164
- ["parent_hash", "H256"],
165
- ["timestamp", "u64"],
166
- ["number", "EthereumBlockNumber"],
167
- ["author", "EthereumAddress"],
168
- ["transactions_root", "H256"],
169
- ["uncles_hash", "H256"],
170
- ["extra_data", "Bytes"],
171
- ["state_root", "H256"],
172
- ["receipts_root", "H256"],
173
- ["log_bloom", "Bloom"],
174
- ["gas_used", "U256"],
175
- ["gas_limit", "U256"],
176
- ["difficulty", "U256"],
177
- ["seal", "Vec<Bytes>"],
178
- ["hash", "Option<H256>"]
342
+ [
343
+ "parent_hash",
344
+ "H256"
345
+ ],
346
+ [
347
+ "timestamp",
348
+ "u64"
349
+ ],
350
+ [
351
+ "number",
352
+ "EthereumBlockNumber"
353
+ ],
354
+ [
355
+ "author",
356
+ "EthereumAddress"
357
+ ],
358
+ [
359
+ "transactions_root",
360
+ "H256"
361
+ ],
362
+ [
363
+ "uncles_hash",
364
+ "H256"
365
+ ],
366
+ [
367
+ "extra_data",
368
+ "Bytes"
369
+ ],
370
+ [
371
+ "state_root",
372
+ "H256"
373
+ ],
374
+ [
375
+ "receipts_root",
376
+ "H256"
377
+ ],
378
+ [
379
+ "log_bloom",
380
+ "Bloom"
381
+ ],
382
+ [
383
+ "gas_used",
384
+ "U256"
385
+ ],
386
+ [
387
+ "gas_limit",
388
+ "U256"
389
+ ],
390
+ [
391
+ "difficulty",
392
+ "U256"
393
+ ],
394
+ [
395
+ "seal",
396
+ "Vec<Bytes>"
397
+ ],
398
+ [
399
+ "base_fee_per_gas",
400
+ "Option<U256>"
401
+ ],
402
+ [
403
+ "hash",
404
+ "Option<H256>"
405
+ ]
179
406
  ]
180
407
  },
181
408
  "EthereumAddress": "H160",
@@ -185,62 +412,122 @@
185
412
  "EthashProof": {
186
413
  "type": "struct",
187
414
  "type_mapping": [
188
- ["dag_nodes", "(H512, H512)"],
189
- ["proof", "Vec<H128>"]
415
+ [
416
+ "dag_nodes",
417
+ "(H512, H512)"
418
+ ],
419
+ [
420
+ "proof",
421
+ "Vec<H128>"
422
+ ]
190
423
  ]
191
424
  },
192
425
  "EthereumReceipt": {
193
426
  "type": "struct",
194
427
  "type_mapping": [
195
- ["gas_used", "U256"],
196
- ["log_bloom", "Bloom"],
197
- ["logs", "Vec<LogEntry>"],
198
- ["outcome", "TransactionOutcome"]
199
- ]
200
- },
201
- "EthereumNetworkType": {
428
+ [
429
+ "gas_used",
430
+ "U256"
431
+ ],
432
+ [
433
+ "log_bloom",
434
+ "Bloom"
435
+ ],
436
+ [
437
+ "logs",
438
+ "Vec<LogEntry>"
439
+ ],
440
+ [
441
+ "outcome",
442
+ "TransactionOutcome"
443
+ ]
444
+ ]
445
+ },
446
+ "EthereumNetwork": {
202
447
  "type": "enum",
203
448
  "type_mapping": [
204
- ["Mainnet", "Null"],
205
- ["Ropsten", "Null"]
449
+ [
450
+ "Mainnet",
451
+ "Null"
452
+ ],
453
+ [
454
+ "Ropsten",
455
+ "Null"
456
+ ]
206
457
  ]
207
458
  },
208
459
  "RedeemFor": {
209
460
  "type": "enum",
210
461
  "type_mapping": [
211
- ["Token", "Null"],
212
- ["Deposit", "Null"]
462
+ [
463
+ "Token",
464
+ "Null"
465
+ ],
466
+ [
467
+ "Deposit",
468
+ "Null"
469
+ ]
213
470
  ]
214
471
  },
215
472
  "EthereumReceiptProof": {
216
473
  "type": "struct",
217
474
  "type_mapping": [
218
- ["index", "u64"],
219
- ["proof", "Bytes"],
220
- ["header_hash", "H256"]
475
+ [
476
+ "index",
477
+ "u64"
478
+ ],
479
+ [
480
+ "proof",
481
+ "Bytes"
482
+ ],
483
+ [
484
+ "header_hash",
485
+ "H256"
486
+ ]
221
487
  ]
222
488
  },
223
489
  "EthereumReceiptProofThing": "(EthereumHeader, EthereumReceiptProof, MMRProof)",
224
490
  "MMRProof": {
225
491
  "type": "struct",
226
492
  "type_mapping": [
227
- ["member_leaf_index", "u64"],
228
- ["last_leaf_index", "u64"],
229
- ["proof", "Vec<H256>"]
493
+ [
494
+ "member_leaf_index",
495
+ "u64"
496
+ ],
497
+ [
498
+ "last_leaf_index",
499
+ "u64"
500
+ ],
501
+ [
502
+ "proof",
503
+ "Vec<H256>"
504
+ ]
230
505
  ]
231
506
  },
232
507
  "EthereumRelayHeaderParcel": {
233
508
  "type": "struct",
234
509
  "type_mapping": [
235
- ["header", "EthereumHeader"],
236
- ["parent_mmr_root", "H256"]
510
+ [
511
+ "header",
512
+ "EthereumHeader"
513
+ ],
514
+ [
515
+ "parent_mmr_root",
516
+ "H256"
517
+ ]
237
518
  ]
238
519
  },
239
520
  "EthereumRelayProofs": {
240
521
  "type": "struct",
241
522
  "type_mapping": [
242
- ["ethash_proof", "Vec<EthashProof>"],
243
- ["mmr_proof", "Vec<H256>"]
523
+ [
524
+ "ethash_proof",
525
+ "Vec<EthashProof>"
526
+ ],
527
+ [
528
+ "mmr_proof",
529
+ "Vec<H256>"
530
+ ]
244
531
  ]
245
532
  },
246
533
  "RelayAuthoritySigner": "EthereumAddress",
@@ -249,24 +536,43 @@
249
536
  "OtherSignature": {
250
537
  "type": "enum",
251
538
  "type_mapping": [
252
- ["Eth", "EcdsaSignature"],
253
- ["Tron", "EcdsaSignature"]
539
+ [
540
+ "Eth",
541
+ "EcdsaSignature"
542
+ ],
543
+ [
544
+ "Tron",
545
+ "EcdsaSignature"
546
+ ]
254
547
  ]
255
548
  },
256
549
  "EcdsaSignature": "[u8; 65]",
257
550
  "OtherAddress": {
258
551
  "type": "enum",
259
552
  "type_mapping": [
260
- ["Eth", "[u8; 20]"],
261
- ["Tron", "[u8; 20]"]
553
+ [
554
+ "Eth",
555
+ "[u8; 20]"
556
+ ],
557
+ [
558
+ "Tron",
559
+ "[u8; 20]"
560
+ ]
262
561
  ]
263
562
  },
264
563
  "AddressT": "[u8; 20]",
564
+ "NodeIndex": "u64",
265
565
  "MerkleMountainRangeRootLog": {
266
566
  "type": "struct",
267
567
  "type_mapping": [
268
- ["prefix", "[u8; 4]"],
269
- ["parent_mmr_root", "Hash"]
568
+ [
569
+ "prefix",
570
+ "[u8; 4]"
571
+ ],
572
+ [
573
+ "parent_mmr_root",
574
+ "Hash"
575
+ ]
270
576
  ]
271
577
  },
272
578
  "OpCode": "[u8; 4]",
@@ -277,56 +583,189 @@
277
583
  "RelayAffirmationId": {
278
584
  "type": "struct",
279
585
  "type_mapping": [
280
- ["game_id", "EthereumBlockNumber"],
281
- ["round", "u32"],
282
- ["index", "u32"]
586
+ [
587
+ "game_id",
588
+ "EthereumBlockNumber"
589
+ ],
590
+ [
591
+ "round",
592
+ "u32"
593
+ ],
594
+ [
595
+ "index",
596
+ "u32"
597
+ ]
283
598
  ]
284
599
  },
285
600
  "RelayAffirmationT": {
286
601
  "type": "struct",
287
602
  "type_mapping": [
288
- ["relayer", "AccountId"],
289
- ["relay_header_parcels", "EthereumRelayHeaderParcel"],
290
- ["bond", "Balance"],
291
- ["maybe_extended_relay_affirmation_id", "Option<RelayAffirmationId>"],
292
- ["verified", "bool"]
603
+ [
604
+ "relayer",
605
+ "AccountId"
606
+ ],
607
+ [
608
+ "relay_header_parcels",
609
+ "EthereumRelayHeaderParcel"
610
+ ],
611
+ [
612
+ "bond",
613
+ "Balance"
614
+ ],
615
+ [
616
+ "maybe_extended_relay_affirmation_id",
617
+ "Option<RelayAffirmationId>"
618
+ ],
619
+ [
620
+ "verified",
621
+ "bool"
622
+ ]
293
623
  ]
294
624
  },
295
625
  "RelayVotingState": {
296
626
  "type": "struct",
297
627
  "type_mapping": [
298
- ["ayes", "Vec<AccountId>"],
299
- ["nays", "Vec<AccountId>"]
628
+ [
629
+ "ayes",
630
+ "Vec<AccountId>"
631
+ ],
632
+ [
633
+ "nays",
634
+ "Vec<AccountId>"
635
+ ]
300
636
  ]
301
637
  },
302
638
  "RelayAuthorityT": {
303
639
  "type": "struct",
304
640
  "type_mapping": [
305
- ["account_id", "AccountId"],
306
- ["signer", "Signer"],
307
- ["stake", "Balance"],
308
- ["term", "BlockNumber"]
641
+ [
642
+ "account_id",
643
+ "AccountId"
644
+ ],
645
+ [
646
+ "signer",
647
+ "EthereumAddress"
648
+ ],
649
+ [
650
+ "stake",
651
+ "Balance"
652
+ ],
653
+ [
654
+ "term",
655
+ "BlockNumber"
656
+ ]
309
657
  ]
310
658
  },
311
659
  "ScheduledAuthoritiesChangeT": {
312
660
  "type": "struct",
313
661
  "type_mapping": [
314
- ["next_authorities", "Vec<RelayAuthorityT>"],
315
- ["deadline", "BlockNumber"]
662
+ [
663
+ "next_authorities",
664
+ "Vec<RelayAuthorityT>"
665
+ ],
666
+ [
667
+ "deadline",
668
+ "BlockNumber"
669
+ ]
670
+ ]
671
+ },
672
+ "MmrRootToSign": {
673
+ "type": "struct",
674
+ "type_mapping": [
675
+ [
676
+ "mmr_root",
677
+ "Hash"
678
+ ],
679
+ [
680
+ "signatures",
681
+ "Vec<(EthereumAddress, EcdsaSignature)>"
682
+ ]
316
683
  ]
317
684
  },
318
685
  "MMRRoot": "Hash",
686
+ "BSCHeader": {
687
+ "type": "struct",
688
+ "type_mapping": [
689
+ [
690
+ "parent_hash",
691
+ "H256"
692
+ ],
693
+ [
694
+ "uncle_hash",
695
+ "H256"
696
+ ],
697
+ [
698
+ "coinbase",
699
+ "EthereumAddress"
700
+ ],
701
+ [
702
+ "state_root",
703
+ "H256"
704
+ ],
705
+ [
706
+ "transactions_root",
707
+ "H256"
708
+ ],
709
+ [
710
+ "receipts_root",
711
+ "H256"
712
+ ],
713
+ [
714
+ "log_bloom",
715
+ "Bloom"
716
+ ],
717
+ [
718
+ "difficulty",
719
+ "U256"
720
+ ],
721
+ [
722
+ "number",
723
+ "u64"
724
+ ],
725
+ [
726
+ "gas_limit",
727
+ "U256"
728
+ ],
729
+ [
730
+ "gas_used",
731
+ "U256"
732
+ ],
733
+ [
734
+ "timestamp",
735
+ "u64"
736
+ ],
737
+ [
738
+ "extra_data",
739
+ "Bytes"
740
+ ],
741
+ [
742
+ "mix_digest",
743
+ "H256"
744
+ ],
745
+ [
746
+ "nonce",
747
+ "Bytes"
748
+ ]
749
+ ]
750
+ },
319
751
  "BalancesRuntimeDispatchInfo": {
320
752
  "type": "struct",
321
753
  "type_mapping": [
322
- ["usable_balance", "Balance"]
754
+ [
755
+ "usable_balance",
756
+ "Balance"
757
+ ]
323
758
  ]
324
759
  },
325
760
  "StakingRuntimeDispatchInfo": {
326
761
  "type": "struct",
327
762
  "type_mapping": [
328
- ["power", "Power"]
763
+ [
764
+ "power",
765
+ "Power"
766
+ ]
329
767
  ]
330
768
  }
331
769
  }
770
+
332
771
  }