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,124 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"runtime_id": 27,
|
3
|
-
"types": {
|
4
|
-
"Keys": {
|
5
|
-
"type": "struct",
|
6
|
-
"type_mapping": [
|
7
|
-
["grandpa", "AccountId"],
|
8
|
-
["babe", "AccountId"],
|
9
|
-
["im_online", "AccountId"],
|
10
|
-
["authority_discovery", "AccountId"]
|
11
|
-
]
|
12
|
-
},
|
13
|
-
"BlockNumber": "U32",
|
14
|
-
"SessionIndex": "U32",
|
15
|
-
"AuctionIndex": "U32",
|
16
|
-
"AuthIndex": "U32",
|
17
|
-
"BalanceUpload": "(AccountId, u64)",
|
18
|
-
"EgressQueueRoot": "(ParaId, Hash)",
|
19
|
-
"EventIndex": "u32",
|
20
|
-
"LeasePeriodOf": "LeasePeriod",
|
21
|
-
"LeasePeriod": "BlockNumber",
|
22
|
-
"MemberCount": "u32",
|
23
|
-
"MomentOf": "Moment",
|
24
|
-
"Offender": "(ValidatorId, Exposure)",
|
25
|
-
"ReportIdOf": "Hash",
|
26
|
-
"SubId": "u32",
|
27
|
-
"Weight": "u32",
|
28
|
-
"WeightMultiplier": "u64",
|
29
|
-
"WinningData": "Vec<WinningDataEntry>",
|
30
|
-
"Index": "U32",
|
31
|
-
"Kind": "[u8; 16]",
|
32
|
-
"OpaqueTimeSlot": "Bytes",
|
33
|
-
"Box<<T as Trait<I>>::Proposal>": "BoxProposal",
|
34
|
-
"Forcing": {
|
35
|
-
"type": "enum",
|
36
|
-
"value_list": [
|
37
|
-
"NotForcing",
|
38
|
-
"ForceNew",
|
39
|
-
"ForceNone"
|
40
|
-
]
|
41
|
-
},
|
42
|
-
"VoteData": {
|
43
|
-
"type": "struct",
|
44
|
-
"type_mapping": [
|
45
|
-
["initiator", "AccountId"],
|
46
|
-
["stage", "VoteStage"],
|
47
|
-
["vote_type", "VoteType"],
|
48
|
-
["tally_type", "TallyType"],
|
49
|
-
["is_commit_reveal", "Bool"]
|
50
|
-
]
|
51
|
-
},
|
52
|
-
"VoteRecord": {
|
53
|
-
"type": "struct",
|
54
|
-
"type_mapping": [
|
55
|
-
["id", "u64"],
|
56
|
-
["commitments", "Vec<(AccountId, VoteOutcome)>"],
|
57
|
-
["reveals", "Vec<(AccountId, VoteOutcome)>"],
|
58
|
-
["data", "VoteData"],
|
59
|
-
["outcomes", "Vec<(VoteOutcome)>"]
|
60
|
-
]
|
61
|
-
},
|
62
|
-
"VoteType": {
|
63
|
-
"type": "enum",
|
64
|
-
"value_list": ["Binary", "MultiOption"]
|
65
|
-
},
|
66
|
-
"IdentityStage": {
|
67
|
-
"type": "enum",
|
68
|
-
"value_list": ["Registered", "Attested", "Verified"]
|
69
|
-
},
|
70
|
-
"IdentityRecord": {
|
71
|
-
"type": "struct",
|
72
|
-
"type_mapping": [
|
73
|
-
["account", "AccountId"],
|
74
|
-
["identity_type", "String"],
|
75
|
-
["identity", "Bytes"],
|
76
|
-
["stage", "IdentityStage"],
|
77
|
-
["expiration_time", "BlockNumber"],
|
78
|
-
["proof", "Bytes"],
|
79
|
-
["metadata", "Bytes"]
|
80
|
-
]
|
81
|
-
},
|
82
|
-
"MetadataRecord": {
|
83
|
-
"type": "struct",
|
84
|
-
"type_mapping": [
|
85
|
-
["avatar", "String"],
|
86
|
-
["display_name", "String"],
|
87
|
-
["tagline", "String"]
|
88
|
-
]
|
89
|
-
},
|
90
|
-
"ProposalCategory": {
|
91
|
-
"type": "enum",
|
92
|
-
"value_list": ["Signaling"]
|
93
|
-
},
|
94
|
-
"ProposalStage": {
|
95
|
-
"type": "enum",
|
96
|
-
"value_list": ["PreVoting", "Voting", "Completed"]
|
97
|
-
},
|
98
|
-
"ProposalRecord": {
|
99
|
-
"type": "struct",
|
100
|
-
"type_mapping": [
|
101
|
-
["index", "u32"],
|
102
|
-
["author", "AccountId"],
|
103
|
-
["stage", "ProposalStage"],
|
104
|
-
["transition_time", "BlockNumber"],
|
105
|
-
["category", "ProposalCategory"],
|
106
|
-
["title", "Vec<u8>"],
|
107
|
-
["contents", "Vec<u8>"],
|
108
|
-
["vote_id", "u64"],
|
109
|
-
["ProposalTitle", "Vec<u8>"],
|
110
|
-
["ProposalContents", "Vec<u8>"]
|
111
|
-
]
|
112
|
-
},
|
113
|
-
"Balance2": "Balance",
|
114
|
-
"ReferendumInfo<BlockNumber, Proposal>": {
|
115
|
-
"type": "struct",
|
116
|
-
"type_mapping": [
|
117
|
-
["end", "BlockNumber"],
|
118
|
-
["proposal", "Proposal"],
|
119
|
-
["threshold", "VoteThreshold"],
|
120
|
-
["delay", "BlockNumber"]
|
121
|
-
]
|
122
|
-
}
|
123
|
-
}
|
124
|
-
}
|
@@ -1,49 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"runtime_id": 4,
|
3
|
-
"types": {
|
4
|
-
"ValidatorPrefs": "ValidatorPrefsLegacy",
|
5
|
-
"Index": "U64",
|
6
|
-
"<T as DDTrait>::ContentId": "ContentId",
|
7
|
-
"RoleParameters": {
|
8
|
-
"type": "struct",
|
9
|
-
"type_mapping": [
|
10
|
-
["min_stake", "BalanceOf"],
|
11
|
-
["min_actors", "u32"],
|
12
|
-
["max_actors", "u32"],
|
13
|
-
["reward", "BalanceOf"],
|
14
|
-
["reward_period", "BlockNumber"],
|
15
|
-
["bonding_period", "BlockNumber"],
|
16
|
-
["unbonding_period", "BlockNumber"],
|
17
|
-
["min_service_period", "BlockNumber"],
|
18
|
-
["startup_grace_period", "BlockNumber"],
|
19
|
-
["entry_request_fee", "BalanceOf"]
|
20
|
-
]
|
21
|
-
},
|
22
|
-
"Actor": {
|
23
|
-
"type": "struct",
|
24
|
-
"type_mapping": [
|
25
|
-
["member_id", "MemberId"],
|
26
|
-
["role", "Role"],
|
27
|
-
["account", "AccountId"],
|
28
|
-
["joined_at", "BlockNumber"]
|
29
|
-
]
|
30
|
-
},
|
31
|
-
"DataObjectStorageRelationship": {
|
32
|
-
"type": "struct",
|
33
|
-
"type_mapping": [
|
34
|
-
["content_id", "ContentId"],
|
35
|
-
["storage_provider", "AccountId"],
|
36
|
-
["ready", "bool"]
|
37
|
-
]
|
38
|
-
},
|
39
|
-
"DataObjectType": {
|
40
|
-
"type": "struct",
|
41
|
-
"type_mapping": [
|
42
|
-
["description", "Vec<u8>"],
|
43
|
-
["active", "bool"]
|
44
|
-
]
|
45
|
-
},
|
46
|
-
"DataObjectTypeId": "u64",
|
47
|
-
"<T as DOTRTrait>::DataObjectTypeId": "u64"
|
48
|
-
}
|
49
|
-
}
|
@@ -1,89 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"types": {
|
3
|
-
"Keys": {
|
4
|
-
"type": "struct",
|
5
|
-
"type_mapping": [
|
6
|
-
["grandpa", "AccountId"],
|
7
|
-
["babe", "AccountId"]
|
8
|
-
]
|
9
|
-
},
|
10
|
-
"Balance": "u128",
|
11
|
-
"Index": "U32",
|
12
|
-
"Era": "[u8; 2]",
|
13
|
-
"BlockNumber": "U32",
|
14
|
-
"Range": {
|
15
|
-
"type": "struct",
|
16
|
-
"type_mapping": [
|
17
|
-
["start", "u128"],
|
18
|
-
["end", "u128"]
|
19
|
-
]
|
20
|
-
},
|
21
|
-
"StateObject": {
|
22
|
-
"type": "struct",
|
23
|
-
"type_mapping": [
|
24
|
-
["predicate", "AccountId"],
|
25
|
-
["data", "Vec<u8>"]
|
26
|
-
]
|
27
|
-
},
|
28
|
-
"StateUpdate": {
|
29
|
-
"type": "struct",
|
30
|
-
"type_mapping": [
|
31
|
-
["range", "Range"],
|
32
|
-
["state_object", "StateObject"],
|
33
|
-
["plasma_block_number", "BlockNumber"]
|
34
|
-
]
|
35
|
-
},
|
36
|
-
"Checkpoint": {
|
37
|
-
"type": "struct",
|
38
|
-
"type_mapping": [
|
39
|
-
["state_update", "StateUpdate"],
|
40
|
-
["sub_range", "Range"]
|
41
|
-
]
|
42
|
-
},
|
43
|
-
"Transaction": {
|
44
|
-
"type": "struct",
|
45
|
-
"type_mapping": [
|
46
|
-
["predicate", "AccountId"],
|
47
|
-
["range", "Range"],
|
48
|
-
["body", "Range"]
|
49
|
-
]
|
50
|
-
},
|
51
|
-
"TransactionBody": {
|
52
|
-
"type": "struct",
|
53
|
-
"type_mapping": [
|
54
|
-
["new_state", "StateObject"],
|
55
|
-
["origin_block", "BlockNumber"],
|
56
|
-
["max_block", "BlockNumber"]
|
57
|
-
]
|
58
|
-
},
|
59
|
-
"Challenge": {
|
60
|
-
"type": "struct",
|
61
|
-
"type_mapping": [
|
62
|
-
["challenged_checkpoint", "Checkpoint"],
|
63
|
-
["challenging_checkpoint", "Checkpoint"]
|
64
|
-
]
|
65
|
-
},
|
66
|
-
"MerkleIntervalTreeInternalNode": {
|
67
|
-
"type": "struct",
|
68
|
-
"type_mapping": [
|
69
|
-
["index", "Index"],
|
70
|
-
["hash", "Hash"]
|
71
|
-
]
|
72
|
-
},
|
73
|
-
"InclusionProof": {
|
74
|
-
"type": "struct",
|
75
|
-
"type_mapping": [
|
76
|
-
["proofs", "Vec<MerkleIntervalTreeInternalNode>"],
|
77
|
-
["idx", "u128"]
|
78
|
-
]
|
79
|
-
},
|
80
|
-
"Parameters": {
|
81
|
-
"type": "struct",
|
82
|
-
"type_mapping": [
|
83
|
-
["can_be_nominated", "bool"],
|
84
|
-
["option_expired", "u128"],
|
85
|
-
["option_p", "u32"]
|
86
|
-
]
|
87
|
-
}
|
88
|
-
}
|
89
|
-
}
|
@@ -1,39 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"types": {
|
3
|
-
"Keys": "SessionKeysSubstrate",
|
4
|
-
"Index": "U64",
|
5
|
-
"LiabilityIndex": "U64",
|
6
|
-
"Order": {
|
7
|
-
"type": "struct",
|
8
|
-
"type_mapping": [
|
9
|
-
["models", "Vec<u8>"],
|
10
|
-
["objective", "Vec<u8>"],
|
11
|
-
["cost", "Balance"],
|
12
|
-
["custodian", "Option<AccountId>"]
|
13
|
-
]
|
14
|
-
},
|
15
|
-
"Offer": {
|
16
|
-
"type": "struct",
|
17
|
-
"type_mapping": [
|
18
|
-
["order", "Order"],
|
19
|
-
["sender", "AccountId"]
|
20
|
-
]
|
21
|
-
},
|
22
|
-
"Demand": {
|
23
|
-
"type": "struct",
|
24
|
-
"type_mapping": [
|
25
|
-
["order", "Order"],
|
26
|
-
["sender", "AccountId"]
|
27
|
-
]
|
28
|
-
},
|
29
|
-
"Liability": {
|
30
|
-
"type": "struct",
|
31
|
-
"type_mapping": [
|
32
|
-
["order", "Order"],
|
33
|
-
["promisee", "AccountId"],
|
34
|
-
["promisor", "AccountId"],
|
35
|
-
["result", "Option<Vec<u8>>"]
|
36
|
-
]
|
37
|
-
}
|
38
|
-
}
|
39
|
-
}
|
@@ -1,63 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"runtime_id": 23,
|
3
|
-
"types": {
|
4
|
-
"Address": "AccountIdAddress",
|
5
|
-
"BlockNumber": "U32",
|
6
|
-
"LeasePeriod": "BlockNumber",
|
7
|
-
"SessionKeysPolkadot": {
|
8
|
-
"type": "struct",
|
9
|
-
"type_mapping": [
|
10
|
-
["grandpa", "AccountId"],
|
11
|
-
["babe", "AccountId"],
|
12
|
-
["im_online", "AccountId"],
|
13
|
-
["authority_discovery", "AccountId"],
|
14
|
-
["parachains", "AccountId"]
|
15
|
-
]
|
16
|
-
},
|
17
|
-
"Keys": "SessionKeysPolkadot",
|
18
|
-
"ProxyType": {
|
19
|
-
"type": "enum",
|
20
|
-
"value_list": [
|
21
|
-
"Any",
|
22
|
-
"NonTransfer",
|
23
|
-
"Staking",
|
24
|
-
"SudoBalances",
|
25
|
-
"IdentityJudgement"
|
26
|
-
]
|
27
|
-
}
|
28
|
-
},
|
29
|
-
"versioning": [
|
30
|
-
{
|
31
|
-
"runtime_range": [3, 22],
|
32
|
-
"types": {
|
33
|
-
"OpenTip": {
|
34
|
-
"type": "struct",
|
35
|
-
"type_mapping": [
|
36
|
-
["reason", "Hash"],
|
37
|
-
["who", "AccountId"],
|
38
|
-
["finder", "Option<OpenTipFinder>"],
|
39
|
-
["closes", "Option<BlockNumber>"],
|
40
|
-
["tips", "Vec<OpenTipTip>"]
|
41
|
-
]
|
42
|
-
}
|
43
|
-
}
|
44
|
-
},
|
45
|
-
{
|
46
|
-
"runtime_range": [23, null],
|
47
|
-
"types": {
|
48
|
-
"OpenTip": {
|
49
|
-
"type": "struct",
|
50
|
-
"type_mapping": [
|
51
|
-
["reason", "Hash"],
|
52
|
-
["who", "AccountId"],
|
53
|
-
["finder", "AccountId"],
|
54
|
-
["deposit", "Balance"],
|
55
|
-
["closes", "Option<BlockNumber>"],
|
56
|
-
["tips", "Vec<OpenTipTip>"],
|
57
|
-
["findersFee", "bool"]
|
58
|
-
]
|
59
|
-
}
|
60
|
-
}
|
61
|
-
}
|
62
|
-
]
|
63
|
-
}
|