scale.rb 0.2.8 → 0.2.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,119 +1,300 @@
1
1
  {
2
2
  "types": {
3
- "EpochDuration": "u64",
4
- "EraIndex": "u32",
5
- "Index": "U64",
6
- "RingBalanceOf": "u128",
7
- "KtonBalanceOf": "u128",
8
- "ExtendedBalance": "u128",
9
- "Keys": {
3
+ "Address": "AccountId",
4
+ "LookupSource": "AccountId",
5
+ "BalanceLock": {
10
6
  "type": "struct",
11
7
  "type_mapping": [
12
- ["grandpa", "AccountId"],
13
- ["babe", "AccountId"]
8
+ ["id", "LockIdentifier"],
9
+ ["lock_for", "LockFor"],
10
+ ["lock_reasons", "LockReasons"]
14
11
  ]
15
12
  },
16
- "ValidatorPrefs": "ValidatorPrefsLegacy",
17
- "StakingBalance": {
13
+ "LockFor": {
18
14
  "type": "enum",
19
15
  "type_mapping": [
20
- ["Ring", "RingBalanceOf"],
21
- ["Kton", "KtonBalanceOf"]
16
+ ["Common", "Common"],
17
+ ["Staking", "StakingLock"]
18
+ ]
19
+ },
20
+ "Common": {
21
+ "type": "struct",
22
+ "type_mapping": [
23
+ ["amount", "Balance"]
24
+ ]
25
+ },
26
+ "StakingLock": {
27
+ "type": "struct",
28
+ "type_mapping": [
29
+ ["staking_amount", "Balance"],
30
+ ["unbondings", "Vec<Unbonding>"]
31
+ ]
32
+ },
33
+ "LockReasons": {
34
+ "type": "enum",
35
+ "type_mapping": [
36
+ ["Fee", "Null"],
37
+ ["Misc", "Null"],
38
+ ["All", "Null"]
39
+ ]
40
+ },
41
+ "Unbonding": {
42
+ "type": "struct",
43
+ "type_mapping": [
44
+ ["amount", "Balance"],
45
+ ["until", "BlockNumber"]
46
+ ]
47
+ },
48
+ "AccountData": {
49
+ "type": "struct",
50
+ "type_mapping": [
51
+ ["free", "Balance"],
52
+ ["reserved", "Balance"],
53
+ ["free_kton", "Balance"],
54
+ ["reserved_kton", "Balance"]
55
+ ]
56
+ },
57
+ "RingBalance": "Balance",
58
+ "KtonBalance": "Balance",
59
+ "TsInMs": "u64",
60
+ "Power": "u32",
61
+ "DepositId": "U256",
62
+ "StakingBalanceT": {
63
+ "type": "enum",
64
+ "type_mapping": [
65
+ ["RingBalance", "Balance"],
66
+ ["KtonBalance", "Balance"]
67
+ ]
68
+ },
69
+ "StakingLedgerT": {
70
+ "type": "struct",
71
+ "type_mapping": [
72
+ ["stash", "AccountId"],
73
+ ["active_ring", "Compact<Balance>"],
74
+ ["active_deposit_ring", "Compact<Balance>"],
75
+ ["active_kton", "Compact<Balance>"],
76
+ ["deposit_items", "Vec<TimeDepositItem>"],
77
+ ["ring_staking_lock", "StakingLock"],
78
+ ["kton_staking_lock", "StakingLock"],
79
+ ["claimed_rewards", "Vec<EraIndex>"]
22
80
  ]
23
81
  },
24
82
  "TimeDepositItem": {
25
83
  "type": "struct",
26
84
  "type_mapping": [
27
- ["value", "Compact<RingBalanceOf>"],
28
- ["start_time", "Compact<Moment>"],
29
- ["expire_time", "Compact<Moment>"]
85
+ ["value", "Compact<Balance>"],
86
+ ["start_time", "Compact<TsInMs>"],
87
+ ["expire_time", "Compact<TsInMs>"]
88
+ ]
89
+ },
90
+ "ExposureT": {
91
+ "type": "struct",
92
+ "type_mapping": [
93
+ ["own_ring_balance", "Compact<Balance>"],
94
+ ["own_kton_balance", "Compact<Balance>"],
95
+ ["own_power", "Power"],
96
+ ["total_power", "Power"],
97
+ ["others", "Vec<IndividualExposure>"]
30
98
  ]
31
99
  },
32
- "UnlockChunk": {
100
+ "IndividualExposure": {
33
101
  "type": "struct",
34
102
  "type_mapping": [
35
- ["value", "StakingBalance"],
36
- ["era", "Compact<EraIndex>"],
37
- ["is_time_deposit", "bool"]
103
+ ["who", "AccountId"],
104
+ ["ring_balance", "Compact<Balance>"],
105
+ ["kton_balance", "Compact<Balance>"],
106
+ ["power", "Power"]
38
107
  ]
39
108
  },
40
- "StakingLedgers": {
109
+ "ElectionResultT": {
41
110
  "type": "struct",
42
111
  "type_mapping": [
43
- ["stash", "AccountId"],
44
- ["total_ring", "Compact<RingBalanceOf>"],
45
- ["total_deposit_ring", "Compact<RingBalanceOf>"],
46
- ["active_ring", "Compact<RingBalanceOf>"],
47
- ["active_deposit_ring", "Compact<RingBalanceOf>"],
48
- ["total_kton", "Compact<KtonBalanceOf>"],
49
- ["active_kton", "Compact<KtonBalanceOf>"],
50
- ["deposit_items", "Vec<TimeDepositItem>"],
51
- ["unlocking", "Vec<UnlockChunk>"]
112
+ ["elected_stashes", "Vec<AccountId>"],
113
+ ["exposures", "Vec<(AccountId, ExposureT)>"],
114
+ ["compute", "ElectionCompute"]
52
115
  ]
53
116
  },
54
- "IndividualExpo": {
117
+ "RKT": {
55
118
  "type": "struct",
56
119
  "type_mapping": [
57
- ["who", "AccountId"],
58
- ["value", "ExtendedBalance"]
120
+ ["r", "Balance"],
121
+ ["k", "Balance"]
59
122
  ]
60
123
  },
61
- "Exposures": {
124
+ "SpanRecord": {
62
125
  "type": "struct",
63
126
  "type_mapping": [
64
- ["total", "ExtendedBalance"],
65
- ["own", "ExtendedBalance"],
66
- ["others", "Vec<IndividualExpo>"]
127
+ ["slashed", "RKT"],
128
+ ["paid_out", "RKT"]
67
129
  ]
68
130
  },
69
- "TokenBalance": "u128",
70
- "Currency": "u128",
71
- "CurrencyOf": "u128",
72
- "Auction": {
131
+ "UnappliedSlash": {
73
132
  "type": "struct",
74
133
  "type_mapping": [
75
- ["seller", "AccountId"],
76
- ["startAt", "Moment"],
77
- ["duration", "u64"],
78
- ["startingPrice", "TokenBalance"],
79
- ["endingPrice", "TokenBalance"],
80
- ["lastRecord", "TokenBalance"],
81
- ["lastBidder", "AccountId"],
82
- ["lastBidStartAt", "Moment"]
134
+ ["validator", "AccountId"],
135
+ ["own", "RKT"],
136
+ ["others", "Vec<(AccountId, RKT)>"],
137
+ ["reporters", "Vec<AccountId>"],
138
+ ["payout", "RKT"]
83
139
  ]
84
140
  },
85
- "DepositInfo": {
141
+ "TreasuryProposal": {
86
142
  "type": "struct",
87
143
  "type_mapping": [
88
- ["month", "Moment"],
89
- ["start_at", "Moment"],
90
- ["value", "CurrencyOf"],
91
- ["unit_interest", "u64"],
92
- ["claimed", "bool"]
144
+ ["proposer", "AccountId"],
145
+ ["beneficiary", "AccountId"],
146
+ ["ring_value", "Balance"],
147
+ ["kton_value", "Balance"],
148
+ ["ring_bond", "Balance"],
149
+ ["kton_bond", "Balance"]
93
150
  ]
94
151
  },
95
- "Deposit": {
152
+ "MappedRing": "u128",
153
+ "EthereumTransactionIndex": "(H256, u64)",
154
+ "EthereumHeaderBrief": {
96
155
  "type": "struct",
97
156
  "type_mapping": [
98
- ["total_deposit", "CurrencyOf"],
99
- ["deposit_list", "Vec<DepositInfo>"]
157
+ ["total_difficulty", "U256"],
158
+ ["parent_hash", "H256"],
159
+ ["number", "EthereumBlockNumber"],
160
+ ["relayer", "AccountId"]
100
161
  ]
101
162
  },
102
- "Revenue": {
163
+ "EthereumBlockNumber": "u64",
164
+ "EthereumHeaderThingWithProof": {
103
165
  "type": "struct",
104
166
  "type_mapping": [
105
- ["team", "TokenBalance"],
106
- ["contribution", "TokenBalance"],
107
- ["ktoner", "TokenBalance"],
108
- ["lottery", "TokenBalance"]
167
+ ["header", "EthereumHeader"],
168
+ ["ethash_proof", "Vec<EthashProof>"],
169
+ ["mmr_root", "H256"],
170
+ ["mmr_proof", "Vec<H256>"]
109
171
  ]
110
172
  },
111
- "DoubleNodeWithMerkleProof": {
173
+ "EthereumHeaderThing": {
112
174
  "type": "struct",
113
175
  "type_mapping": [
114
- ["dag_nodes", "VecH512Length2"],
176
+ ["header", "EthereumHeader"],
177
+ ["mmr_root", "H256"]
178
+ ]
179
+ },
180
+ "EthereumHeader": {
181
+ "type": "struct",
182
+ "type_mapping": [
183
+ ["parent_hash", "H256"],
184
+ ["timestamp", "u64"],
185
+ ["number", "EthereumBlockNumber"],
186
+ ["author", "EthereumAddress"],
187
+ ["transactions_root", "H256"],
188
+ ["uncles_hash", "H256"],
189
+ ["extra_data", "Bytes"],
190
+ ["state_root", "H256"],
191
+ ["receipts_root", "H256"],
192
+ ["log_bloom", "Bloom"],
193
+ ["gas_used", "U256"],
194
+ ["gas_limit", "U256"],
195
+ ["difficulty", "U256"],
196
+ ["seal", "Vec<Bytes>"],
197
+ ["hash", "Option<H256>"]
198
+ ]
199
+ },
200
+ "EthereumAddress": "H160",
201
+ "Bloom": "[u8; 256]",
202
+ "H128": "[u8; 16]",
203
+ "EthashProof": {
204
+ "type": "struct",
205
+ "type_mapping": [
206
+ ["dag_nodes", "(H512, H512)"],
115
207
  ["proof", "Vec<H128>"]
116
208
  ]
209
+ },
210
+ "EthereumReceipt": {
211
+ "type": "struct",
212
+ "type_mapping": [
213
+ ["gas_used", "U256"],
214
+ ["log_bloom", "Bloom"],
215
+ ["logs", "Vec<LogEntry>"],
216
+ ["outcome", "TransactionOutcome"]
217
+ ]
218
+ },
219
+ "EthereumNetworkType": {
220
+ "type": "enum",
221
+ "type_mapping": [
222
+ ["Mainnet", "Null"],
223
+ ["Ropsten", "Null"]
224
+ ]
225
+ },
226
+ "RedeemFor": {
227
+ "type": "enum",
228
+ "type_mapping": [
229
+ ["Token", "Null"],
230
+ ["Deposit", "Null"]
231
+ ]
232
+ },
233
+ "EthereumReceiptProof": {
234
+ "type": "struct",
235
+ "type_mapping": [
236
+ ["index", "u64"],
237
+ ["proof", "Bytes"],
238
+ ["header_hash", "H256"]
239
+ ]
240
+ },
241
+ "EthereumReceiptProofThing": "(EthereumHeader, EthereumReceiptProof, MMRProof)",
242
+ "MMRProof": {
243
+ "type": "struct",
244
+ "type_mapping": [
245
+ ["member_leaf_index", "u64"],
246
+ ["last_leaf_index", "u64"],
247
+ ["proof", "Vec<H256>"]
248
+ ]
249
+ },
250
+ "OtherSignature": {
251
+ "type": "enum",
252
+ "type_mapping": [
253
+ ["Eth", "EcdsaSignature"],
254
+ ["Tron", "EcdsaSignature"]
255
+ ]
256
+ },
257
+ "EcdsaSignature": "[u8; 65]",
258
+ "OtherAddress": {
259
+ "type": "enum",
260
+ "type_mapping": [
261
+ ["Eth", "[u8; 20]"],
262
+ ["Tron", "[u8; 20]"]
263
+ ]
264
+ },
265
+ "AddressT": "[u8; 20]",
266
+ "MerkleMountainRangeRootLog": {
267
+ "type": "struct",
268
+ "type_mapping": [
269
+ ["prefix", "[u8; 4]"],
270
+ ["mmr_root", "Hash"]
271
+ ]
272
+ },
273
+ "Round": "u64",
274
+ "TcHeaderThingWithProof": "EthereumHeaderThingWithProof",
275
+ "TcHeaderThing": "EthereumHeaderThing",
276
+ "TcBlockNumber": "u64",
277
+ "TcHeaderHash": "H256",
278
+ "GameId": "TcBlockNumber",
279
+ "RelayProposalT": {
280
+ "type": "struct",
281
+ "type_mapping": [
282
+ ["relayer", "AccountId"],
283
+ ["bonded_proposal", "Vec<(Balance, TcHeaderThing)>"],
284
+ ["extend_from_header_hash", "Option<TcHeaderHash>"]
285
+ ]
286
+ },
287
+ "BalancesRuntimeDispatchInfo": {
288
+ "type": "struct",
289
+ "type_mapping": [
290
+ ["usable_balance", "Balance"]
291
+ ]
292
+ },
293
+ "StakingRuntimeDispatchInfo": {
294
+ "type": "struct",
295
+ "type_mapping": [
296
+ ["power", "Power"]
297
+ ]
117
298
  }
118
299
  }
119
300
  }
@@ -12,7 +12,6 @@
12
12
  "CallHashOf": "CallHash",
13
13
  "Fixed64": "u64",
14
14
  "Fixed128": "u128",
15
- "AccountId": "GenericAccountId",
16
15
  "AccountIdOf": "AccountId",
17
16
  "AccountVoteSplit": {
18
17
  "type": "struct",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scale.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wu Minzhe
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-14 00:00:00.000000000 Z
11
+ date: 2020-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: substrate_common.rb
@@ -177,9 +177,11 @@ files:
177
177
  - lib/scale.rb
178
178
  - lib/scale/base.rb
179
179
  - lib/scale/block.rb
180
+ - lib/scale/trie.rb
180
181
  - lib/scale/types.rb
181
182
  - lib/scale/version.rb
182
- - lib/type_registry/certifybook-chain.json
183
+ - lib/type_registry/crab-28.json
184
+ - lib/type_registry/darwinia-8.json
183
185
  - lib/type_registry/darwinia.json
184
186
  - lib/type_registry/default.json
185
187
  - lib/type_registry/edgeware.json
@@ -1,10 +0,0 @@
1
- {
2
- "types": {
3
- "Address": "AccountId",
4
- "LookupSource": "AccountId",
5
- "Entity": {
6
- "id": "H256",
7
- "status": "u8"
8
- }
9
- }
10
- }