Update kusama static from 1032 to 1033 (#1696)

* Update kusama static from 1032 to 1033

* Update comment

* Rename variables

* Test 1032 and 1033

* Got exact metadata from kusama
This commit is contained in:
Amaury Martiny
2020-01-03 17:38:32 +01:00
committed by GitHub
parent 53401e29ea
commit 51a866fd35
3 changed files with 134 additions and 6 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ import { Registry } from '@polkadot/types/types';
import { bnToU8a, isHex, hexToU8a, u8aConcat } from '@polkadot/util';
import hackKusama1032 from './v10/static.polkadot';
import hackKusama1033 from './v10/static.polkadot';
import { MAGIC_NUMBER } from './MagicNumber';
import MetadataVersioned from './MetadataVersioned';
@@ -31,7 +31,7 @@ export default class Metadata extends MetadataVersioned {
* stayed at v9. Then v10 was merged in Substrate but not Kusama. Here,
* we're just saying that if it's Kusama's metadata, decode as v10.
*/
if (isHex(_value) && _value === hackKusama1032) {
if (isHex(_value) && _value === hackKusama1033) {
return Metadata.decodeMetadata(registry, _value.replace('0x6d65746109', '0x6d6574610a'));
}
@@ -1035,7 +1035,50 @@
],
"events": null,
"constants": [],
"errors": []
"errors": [
{
"name": "InvalidUncleParent",
"documentation": [
" The uncle parent not in the chain."
]
},
{
"name": "UnclesAlreadySet",
"documentation": [
" Uncles already set in the block."
]
},
{
"name": "TooManyUncles",
"documentation": [
" Too many uncles."
]
},
{
"name": "GenesisUncle",
"documentation": [
" The uncle is genesis."
]
},
{
"name": "TooHighUncle",
"documentation": [
" The uncle is too high in chain."
]
},
{
"name": "UncleAlreadyIncluded",
"documentation": [
" The uncle is already included."
]
},
{
"name": "OldUncle",
"documentation": [
" The uncle isn't recent enough to be included."
]
}
]
},
{
"name": "Staking",
@@ -4148,7 +4191,92 @@
"documentation": []
}
],
"errors": []
"errors": [
{
"name": "UnableToVote",
"documentation": [
" Cannot vote when no candidates or members exist."
]
},
{
"name": "NoVotes",
"documentation": [
" Must vote for at least one candidate."
]
},
{
"name": "TooManyVotes",
"documentation": [
" Cannot vote more than candidates."
]
},
{
"name": "MaximumVotesExceeded",
"documentation": [
" Cannot vote more than maximum allowed."
]
},
{
"name": "LowBalance",
"documentation": [
" Cannot vote with stake less than minimum balance."
]
},
{
"name": "UnableToPayBond",
"documentation": [
" Voter can not pay voting bond."
]
},
{
"name": "MustBeVoter",
"documentation": [
" Must be a voter."
]
},
{
"name": "ReportSelf",
"documentation": [
" Cannot report self."
]
},
{
"name": "DuplicatedCandidate",
"documentation": [
" Duplicated candidate submission."
]
},
{
"name": "MemberSubmit",
"documentation": [
" Member cannot re-submit candidacy."
]
},
{
"name": "RunnerSubmit",
"documentation": [
" Runner cannot re-submit candidacy."
]
},
{
"name": "InsufficientCandidateFunds",
"documentation": [
" Candidate does not have enough funds."
]
},
{
"name": "InvalidOrigin",
"documentation": [
" Origin is not a candidate, member or a runner up."
]
},
{
"name": "NotMember",
"documentation": [
" Not a member."
]
}
]
},
{
"name": "TechnicalMembership",
File diff suppressed because one or more lines are too long