Remove custom toString() from metadata storage (#1597)

* Convert asType -> asPlain, isPlainType -> isPlain

* Make tests pass

* Move unwrapStorageType to StorageKey
This commit is contained in:
Jaco Greeff
2019-11-22 10:47:21 +01:00
committed by GitHub
parent ea2c320f33
commit 3b758a0d64
27 changed files with 1142 additions and 3585 deletions
@@ -28,7 +28,7 @@
"name": "ExtrinsicCount",
"modifier": 0,
"type": {
"Type": "u32"
"Plain": "u32"
},
"fallback": "0x00",
"documentation": [
@@ -39,7 +39,7 @@
"name": "AllExtrinsicsWeight",
"modifier": 0,
"type": {
"Type": "Weight"
"Plain": "Weight"
},
"fallback": "0x00",
"documentation": [
@@ -50,7 +50,7 @@
"name": "AllExtrinsicsLen",
"modifier": 0,
"type": {
"Type": "u32"
"Plain": "u32"
},
"fallback": "0x00",
"documentation": [
@@ -61,7 +61,7 @@
"name": "NextWeightMultiplier",
"modifier": 1,
"type": {
"Type": "WeightMultiplier"
"Plain": "WeightMultiplier"
},
"fallback": "0x0000000000000000",
"documentation": [
@@ -105,7 +105,7 @@
"name": "RandomMaterial",
"modifier": 1,
"type": {
"Type": "(i8,Vec<Hash>)"
"Plain": "(i8,Vec<Hash>)"
},
"fallback": "0x0000",
"documentation": [
@@ -117,7 +117,7 @@
"name": "Number",
"modifier": 1,
"type": {
"Type": "BlockNumber"
"Plain": "BlockNumber"
},
"fallback": "0x00000000",
"documentation": [
@@ -128,7 +128,7 @@
"name": "ParentHash",
"modifier": 1,
"type": {
"Type": "Hash"
"Plain": "Hash"
},
"fallback": "0x0000000000000000000000000000000000000000000000000000000000000000",
"documentation": [
@@ -139,7 +139,7 @@
"name": "ExtrinsicsRoot",
"modifier": 1,
"type": {
"Type": "Hash"
"Plain": "Hash"
},
"fallback": "0x0000000000000000000000000000000000000000000000000000000000000000",
"documentation": [
@@ -150,7 +150,7 @@
"name": "Digest",
"modifier": 1,
"type": {
"Type": "DigestOf"
"Plain": "DigestOf"
},
"fallback": "0x00",
"documentation": [
@@ -161,7 +161,7 @@
"name": "Events",
"modifier": 1,
"type": {
"Type": "Vec<EventRecord>"
"Plain": "Vec<EventRecord>"
},
"fallback": "0x00",
"documentation": [
@@ -172,7 +172,7 @@
"name": "EventCount",
"modifier": 1,
"type": {
"Type": "EventIndex"
"Plain": "EventIndex"
},
"fallback": "0x00000000",
"documentation": [
@@ -348,7 +348,7 @@
"name": "EpochIndex",
"modifier": 1,
"type": {
"Type": "u64"
"Plain": "u64"
},
"fallback": "0x0000000000000000",
"documentation": [
@@ -359,7 +359,7 @@
"name": "Authorities",
"modifier": 1,
"type": {
"Type": "Vec<(AuthorityId,BabeAuthorityWeight)>"
"Plain": "Vec<(AuthorityId,BabeAuthorityWeight)>"
},
"fallback": "0x00",
"documentation": [
@@ -370,7 +370,7 @@
"name": "GenesisSlot",
"modifier": 1,
"type": {
"Type": "u64"
"Plain": "u64"
},
"fallback": "0x0000000000000000",
"documentation": [
@@ -382,7 +382,7 @@
"name": "CurrentSlot",
"modifier": 1,
"type": {
"Type": "u64"
"Plain": "u64"
},
"fallback": "0x0000000000000000",
"documentation": [
@@ -393,7 +393,7 @@
"name": "Randomness",
"modifier": 1,
"type": {
"Type": "[u8;32]"
"Plain": "[u8;32]"
},
"fallback": "0x0000000000000000000000000000000000000000000000000000000000000000",
"documentation": [
@@ -413,7 +413,7 @@
"name": "NextRandomness",
"modifier": 1,
"type": {
"Type": "[u8;32]"
"Plain": "[u8;32]"
},
"fallback": "0x0000000000000000000000000000000000000000000000000000000000000000",
"documentation": [
@@ -424,7 +424,7 @@
"name": "SegmentIndex",
"modifier": 1,
"type": {
"Type": "u32"
"Plain": "u32"
},
"fallback": "0x00000000",
"documentation": [
@@ -457,7 +457,7 @@
"name": "Initialized",
"modifier": 0,
"type": {
"Type": "MaybeVrf"
"Plain": "MaybeVrf"
},
"fallback": "0x00",
"documentation": [
@@ -502,7 +502,7 @@
"name": "Now",
"modifier": 1,
"type": {
"Type": "Moment"
"Plain": "Moment"
},
"fallback": "0x0000000000000000",
"documentation": [
@@ -513,7 +513,7 @@
"name": "DidUpdate",
"modifier": 1,
"type": {
"Type": "bool"
"Plain": "bool"
},
"fallback": "0x00",
"documentation": [
@@ -568,7 +568,7 @@
"name": "Uncles",
"modifier": 1,
"type": {
"Type": "Vec<UncleEntryItem>"
"Plain": "Vec<UncleEntryItem>"
},
"fallback": "0x00",
"documentation": [
@@ -579,7 +579,7 @@
"name": "Author",
"modifier": 0,
"type": {
"Type": "AccountId"
"Plain": "AccountId"
},
"fallback": "0x00",
"documentation": [
@@ -590,7 +590,7 @@
"name": "DidSetUncles",
"modifier": 1,
"type": {
"Type": "bool"
"Plain": "bool"
},
"fallback": "0x00",
"documentation": [
@@ -625,7 +625,7 @@
"name": "NextEnumSet",
"modifier": 1,
"type": {
"Type": "AccountIndex"
"Plain": "AccountIndex"
},
"fallback": "0x00000000",
"documentation": [
@@ -677,7 +677,7 @@
"name": "TotalIssuance",
"modifier": 1,
"type": {
"Type": "Balance"
"Plain": "Balance"
},
"fallback": "0x00000000000000000000000000000000",
"documentation": [
@@ -948,7 +948,7 @@
"name": "ValidatorCount",
"modifier": 1,
"type": {
"Type": "u32"
"Plain": "u32"
},
"fallback": "0x00000000",
"documentation": [
@@ -959,7 +959,7 @@
"name": "MinimumValidatorCount",
"modifier": 1,
"type": {
"Type": "u32"
"Plain": "u32"
},
"fallback": "0x04000000",
"documentation": [
@@ -970,7 +970,7 @@
"name": "Invulnerables",
"modifier": 1,
"type": {
"Type": "Vec<AccountId>"
"Plain": "Vec<AccountId>"
},
"fallback": "0x00",
"documentation": [
@@ -1082,7 +1082,7 @@
"name": "CurrentElected",
"modifier": 1,
"type": {
"Type": "Vec<AccountId>"
"Plain": "Vec<AccountId>"
},
"fallback": "0x00",
"documentation": [
@@ -1093,7 +1093,7 @@
"name": "CurrentEra",
"modifier": 1,
"type": {
"Type": "EraIndex"
"Plain": "EraIndex"
},
"fallback": "0x00000000",
"documentation": [
@@ -1104,7 +1104,7 @@
"name": "CurrentEraStart",
"modifier": 1,
"type": {
"Type": "MomentOf"
"Plain": "MomentOf"
},
"fallback": "0x0000000000000000",
"documentation": [
@@ -1115,7 +1115,7 @@
"name": "CurrentEraStartSessionIndex",
"modifier": 1,
"type": {
"Type": "SessionIndex"
"Plain": "SessionIndex"
},
"fallback": "0x00000000",
"documentation": [
@@ -1126,7 +1126,7 @@
"name": "CurrentEraPointsEarned",
"modifier": 1,
"type": {
"Type": "EraPoints"
"Plain": "EraPoints"
},
"fallback": "0x0000000000",
"documentation": [
@@ -1137,7 +1137,7 @@
"name": "SlotStake",
"modifier": 1,
"type": {
"Type": "BalanceOf"
"Plain": "BalanceOf"
},
"fallback": "0x00000000000000000000000000000000",
"documentation": [
@@ -1150,7 +1150,7 @@
"name": "ForceEra",
"modifier": 1,
"type": {
"Type": "Forcing"
"Plain": "Forcing"
},
"fallback": "0x00",
"documentation": [
@@ -1161,7 +1161,7 @@
"name": "SlashRewardFraction",
"modifier": 1,
"type": {
"Type": "Perbill"
"Plain": "Perbill"
},
"fallback": "0x00000000",
"documentation": [
@@ -1174,7 +1174,7 @@
"name": "BondedEras",
"modifier": 1,
"type": {
"Type": "Vec<(EraIndex,SessionIndex)>"
"Plain": "Vec<(EraIndex,SessionIndex)>"
},
"fallback": "0x00",
"documentation": [
@@ -1527,7 +1527,7 @@
"name": "Validators",
"modifier": 1,
"type": {
"Type": "Vec<ValidatorId>"
"Plain": "Vec<ValidatorId>"
},
"fallback": "0x00",
"documentation": [
@@ -1538,7 +1538,7 @@
"name": "CurrentIndex",
"modifier": 1,
"type": {
"Type": "SessionIndex"
"Plain": "SessionIndex"
},
"fallback": "0x00000000",
"documentation": [
@@ -1549,7 +1549,7 @@
"name": "QueuedChanged",
"modifier": 1,
"type": {
"Type": "bool"
"Plain": "bool"
},
"fallback": "0x00",
"documentation": [
@@ -1561,7 +1561,7 @@
"name": "QueuedKeys",
"modifier": 1,
"type": {
"Type": "Vec<(ValidatorId,Keys)>"
"Plain": "Vec<(ValidatorId,Keys)>"
},
"fallback": "0x00",
"documentation": [
@@ -1573,7 +1573,7 @@
"name": "DisabledValidators",
"modifier": 1,
"type": {
"Type": "Vec<u32>"
"Plain": "Vec<u32>"
},
"fallback": "0x00",
"documentation": [
@@ -1684,7 +1684,7 @@
"name": "PublicPropCount",
"modifier": 1,
"type": {
"Type": "PropIndex"
"Plain": "PropIndex"
},
"fallback": "0x00000000",
"documentation": [
@@ -1695,7 +1695,7 @@
"name": "PublicProps",
"modifier": 1,
"type": {
"Type": "Vec<(PropIndex,Proposal,AccountId)>"
"Plain": "Vec<(PropIndex,Proposal,AccountId)>"
},
"fallback": "0x00",
"documentation": [
@@ -1722,7 +1722,7 @@
"name": "ReferendumCount",
"modifier": 1,
"type": {
"Type": "ReferendumIndex"
"Plain": "ReferendumIndex"
},
"fallback": "0x00000000",
"documentation": [
@@ -1733,7 +1733,7 @@
"name": "NextTally",
"modifier": 1,
"type": {
"Type": "ReferendumIndex"
"Plain": "ReferendumIndex"
},
"fallback": "0x00000000",
"documentation": [
@@ -1844,7 +1844,7 @@
"name": "LastTabledWasExternal",
"modifier": 1,
"type": {
"Type": "bool"
"Plain": "bool"
},
"fallback": "0x00",
"documentation": [
@@ -1856,7 +1856,7 @@
"name": "NextExternal",
"modifier": 0,
"type": {
"Type": "(Proposal,VoteThreshold)"
"Plain": "(Proposal,VoteThreshold)"
},
"fallback": "0x00",
"documentation": [
@@ -2337,7 +2337,7 @@
"name": "Proposals",
"modifier": 1,
"type": {
"Type": "Vec<Hash>"
"Plain": "Vec<Hash>"
},
"fallback": "0x00",
"documentation": [
@@ -2380,7 +2380,7 @@
"name": "ProposalCount",
"modifier": 1,
"type": {
"Type": "u32"
"Plain": "u32"
},
"fallback": "0x00000000",
"documentation": [
@@ -2391,7 +2391,7 @@
"name": "Members",
"modifier": 1,
"type": {
"Type": "Vec<AccountId>"
"Plain": "Vec<AccountId>"
},
"fallback": "0x00",
"documentation": [
@@ -2551,7 +2551,7 @@
"name": "Proposals",
"modifier": 1,
"type": {
"Type": "Vec<Hash>"
"Plain": "Vec<Hash>"
},
"fallback": "0x00",
"documentation": [
@@ -2594,7 +2594,7 @@
"name": "ProposalCount",
"modifier": 1,
"type": {
"Type": "u32"
"Plain": "u32"
},
"fallback": "0x00000000",
"documentation": [
@@ -2605,7 +2605,7 @@
"name": "Members",
"modifier": 1,
"type": {
"Type": "Vec<AccountId>"
"Plain": "Vec<AccountId>"
},
"fallback": "0x00",
"documentation": [
@@ -2765,7 +2765,7 @@
"name": "PresentationDuration",
"modifier": 1,
"type": {
"Type": "BlockNumber"
"Plain": "BlockNumber"
},
"fallback": "0x00000000",
"documentation": [
@@ -2776,7 +2776,7 @@
"name": "TermDuration",
"modifier": 1,
"type": {
"Type": "BlockNumber"
"Plain": "BlockNumber"
},
"fallback": "0x00000000",
"documentation": [
@@ -2787,7 +2787,7 @@
"name": "DesiredSeats",
"modifier": 1,
"type": {
"Type": "u32"
"Plain": "u32"
},
"fallback": "0x00000000",
"documentation": [
@@ -2798,7 +2798,7 @@
"name": "Members",
"modifier": 1,
"type": {
"Type": "Vec<(AccountId,BlockNumber)>"
"Plain": "Vec<(AccountId,BlockNumber)>"
},
"fallback": "0x00",
"documentation": [
@@ -2812,7 +2812,7 @@
"name": "VoteCount",
"modifier": 1,
"type": {
"Type": "VoteIndex"
"Plain": "VoteIndex"
},
"fallback": "0x00000000",
"documentation": [
@@ -2886,7 +2886,7 @@
"name": "NextVoterSet",
"modifier": 1,
"type": {
"Type": "SetIndex"
"Plain": "SetIndex"
},
"fallback": "0x00000000",
"documentation": [
@@ -2897,7 +2897,7 @@
"name": "VoterCount",
"modifier": 1,
"type": {
"Type": "SetIndex"
"Plain": "SetIndex"
},
"fallback": "0x00000000",
"documentation": [
@@ -2908,7 +2908,7 @@
"name": "Candidates",
"modifier": 1,
"type": {
"Type": "Vec<AccountId>"
"Plain": "Vec<AccountId>"
},
"fallback": "0x00",
"documentation": [
@@ -2919,7 +2919,7 @@
"name": "CandidateCount",
"modifier": 1,
"type": {
"Type": "u32"
"Plain": "u32"
},
"fallback": "0x00000000",
"documentation": [
@@ -2930,7 +2930,7 @@
"name": "NextFinalize",
"modifier": 0,
"type": {
"Type": "(BlockNumber,u32,Vec<AccountId>)"
"Plain": "(BlockNumber,u32,Vec<AccountId>)"
},
"fallback": "0x00",
"documentation": [
@@ -2941,7 +2941,7 @@
"name": "Leaderboard",
"modifier": 0,
"type": {
"Type": "Vec<(BalanceOf,AccountId)>"
"Plain": "Vec<(BalanceOf,AccountId)>"
},
"fallback": "0x00",
"documentation": [
@@ -3361,7 +3361,7 @@
"name": "Members",
"modifier": 1,
"type": {
"Type": "Vec<AccountId>"
"Plain": "Vec<AccountId>"
},
"fallback": "0x00",
"documentation": [
@@ -3521,7 +3521,7 @@
"name": "Authorities",
"modifier": 1,
"type": {
"Type": "Vec<(AuthorityId,AuthorityWeight)>"
"Plain": "Vec<(AuthorityId,AuthorityWeight)>"
},
"fallback": "0x00",
"documentation": [
@@ -3532,7 +3532,7 @@
"name": "State",
"modifier": 1,
"type": {
"Type": "StoredState"
"Plain": "StoredState"
},
"fallback": "0x00",
"documentation": [
@@ -3543,7 +3543,7 @@
"name": "PendingChange",
"modifier": 0,
"type": {
"Type": "StoredPendingChange"
"Plain": "StoredPendingChange"
},
"fallback": "0x00",
"documentation": [
@@ -3554,7 +3554,7 @@
"name": "NextForced",
"modifier": 0,
"type": {
"Type": "BlockNumber"
"Plain": "BlockNumber"
},
"fallback": "0x00",
"documentation": [
@@ -3565,7 +3565,7 @@
"name": "Stalled",
"modifier": 0,
"type": {
"Type": "(BlockNumber,BlockNumber)"
"Plain": "(BlockNumber,BlockNumber)"
},
"fallback": "0x00",
"documentation": [
@@ -3576,7 +3576,7 @@
"name": "CurrentSetId",
"modifier": 1,
"type": {
"Type": "SetId"
"Plain": "SetId"
},
"fallback": "0x0000000000000000",
"documentation": [
@@ -3652,7 +3652,7 @@
"name": "ProposalCount",
"modifier": 1,
"type": {
"Type": "ProposalIndex"
"Plain": "ProposalIndex"
},
"fallback": "0x00000000",
"documentation": [
@@ -3679,7 +3679,7 @@
"name": "Approvals",
"modifier": 1,
"type": {
"Type": "Vec<ProposalIndex>"
"Plain": "Vec<ProposalIndex>"
},
"fallback": "0x00",
"documentation": [
@@ -3845,7 +3845,7 @@
"name": "GasSpent",
"modifier": 1,
"type": {
"Type": "Gas"
"Plain": "Gas"
},
"fallback": "0x0000000000000000",
"documentation": [
@@ -3856,7 +3856,7 @@
"name": "CurrentSchedule",
"modifier": 1,
"type": {
"Type": "Schedule"
"Plain": "Schedule"
},
"fallback": "0x0000000001000000000000000100000000000000010000000000000001000000000000000100000000000000010000000000000001000000000000008700000000000000af0000000000000001000000000000000100000000000000040000000000010010000000004000000020000000",
"documentation": [
@@ -3899,7 +3899,7 @@
"name": "AccountCounter",
"modifier": 1,
"type": {
"Type": "u64"
"Plain": "u64"
},
"fallback": "0x0000000000000000",
"documentation": [
@@ -3926,7 +3926,7 @@
"name": "GasPrice",
"modifier": 1,
"type": {
"Type": "BalanceOf"
"Plain": "BalanceOf"
},
"fallback": "0x01000000000000000000000000000000",
"documentation": [
@@ -4269,7 +4269,7 @@
"name": "Key",
"modifier": 1,
"type": {
"Type": "AccountId"
"Plain": "AccountId"
},
"fallback": "0x0000000000000000000000000000000000000000000000000000000000000000",
"documentation": [
@@ -4387,7 +4387,7 @@
"name": "GossipAt",
"modifier": 1,
"type": {
"Type": "BlockNumber"
"Plain": "BlockNumber"
},
"fallback": "0x00000000",
"documentation": [
@@ -4398,7 +4398,7 @@
"name": "Keys",
"modifier": 1,
"type": {
"Type": "Vec<AuthorityId>"
"Plain": "Vec<AuthorityId>"
},
"fallback": "0x00",
"documentation": [