diff --git a/packages/metadata/src/Metadata/util/getUniqTypes.ts b/packages/metadata/src/Metadata/util/getUniqTypes.ts index 695bb74f07..2416e6a0c2 100644 --- a/packages/metadata/src/Metadata/util/getUniqTypes.ts +++ b/packages/metadata/src/Metadata/util/getUniqTypes.ts @@ -16,6 +16,7 @@ type Item = { type: { isDoubleMap?: boolean; isMap: boolean; + isPlain: boolean; asDoubleMap?: { key1: Text; key2: Text; @@ -25,7 +26,7 @@ type Item = { key: Text; value: Text; }; - asType: Text; + asPlain: Text; }; } & Codec; @@ -152,7 +153,7 @@ function getStorageNames ({ modules }: ExtractionMetadata): string[][][] { ]; } else { return [ - type.asType.toString() + type.asPlain.toString() ]; } }) diff --git a/packages/metadata/src/Metadata/util/testUtil.ts b/packages/metadata/src/Metadata/util/testUtil.ts index 6a5304a240..33c1e32b00 100644 --- a/packages/metadata/src/Metadata/util/testUtil.ts +++ b/packages/metadata/src/Metadata/util/testUtil.ts @@ -6,6 +6,7 @@ import { Codec, Registry } from '@polkadot/types/types'; import { MetadataInterface } from '../types'; import { createTypeUnsafe } from '@polkadot/types/codec/create'; +import { unwrapStorageType } from '@polkadot/types/primitive/StorageKey'; import getUniqTypes from './getUniqTypes'; import Metadata from '../Metadata'; @@ -18,11 +19,15 @@ export function decodeLatestSubstrate (registry: Registry it('decodes latest substrate properly', (): void => { const metadata = new Metadata(registry, rpcData); - console.error(JSON.stringify(metadata.toJSON())); + try { + expect(metadata.version).toBe(version); + expect((metadata[`asV${version}` as keyof Metadata] as unknown as MetadataInterface).modules.length).not.toBe(0); + expect(metadata.toJSON()).toEqual(staticSubstrate); + } catch (error) { + console.error(JSON.stringify(metadata.toJSON())); - expect(metadata.version).toBe(version); - expect((metadata[`asV${version}` as keyof Metadata] as unknown as MetadataInterface).modules.length).not.toBe(0); - expect(metadata.toJSON()).toEqual(staticSubstrate); + throw error; + } }); } @@ -54,9 +59,18 @@ export function defaultValues (registry: Registry, rpcData: string): void { .filter(({ storage }): boolean => storage.isSome) .forEach((mod): void => { mod.storage.unwrap().items.forEach(({ fallback, name, type }): void => { - it(`creates default types for ${mod.name}.${name}, type ${type}`, (): void => { + const inner = unwrapStorageType(type); + const location = `${mod.name}.${name}: type ${inner}`; + + it(`creates default types for ${location}`, (): void => { expect( - (): Codec => createTypeUnsafe(registry, type.toString(), [fallback]) + (): Codec => { + try { + return createTypeUnsafe(registry, inner, [fallback]); + } catch (error) { + throw new Error(`${location}:: ${error.message}`); + } + } ).not.toThrow(); }); }); diff --git a/packages/metadata/src/Metadata/util/toCallsOnly.spec.ts b/packages/metadata/src/Metadata/util/toCallsOnly.spec.ts index 176045b16c..e2df34a6f0 100644 --- a/packages/metadata/src/Metadata/util/toCallsOnly.spec.ts +++ b/packages/metadata/src/Metadata/util/toCallsOnly.spec.ts @@ -13,9 +13,13 @@ describe('toCallsOnly', (): void => { it('creates a calls-only version of the metadata', (): void => { const stripped = new Metadata(registry, staticData).asCallsOnly; - console.error(JSON.stringify(stripped)); + try { + expect(stripped).toBeDefined(); + } catch (error) { + console.error(JSON.stringify(stripped)); - expect(stripped).toBeDefined(); + throw error; + } }); it('can serialize from the input', (): void => { diff --git a/packages/metadata/src/Metadata/v0/Metadata.spec.ts b/packages/metadata/src/Metadata/v0/Metadata.spec.ts index 1adeb02277..3896b2f321 100644 --- a/packages/metadata/src/Metadata/v0/Metadata.spec.ts +++ b/packages/metadata/src/Metadata/v0/Metadata.spec.ts @@ -23,11 +23,15 @@ describe('Metadata', (): void => { const metadata = new Metadata(registry, rpcData); const json = metadata.asV0.toJSON(); - console.error(JSON.stringify(json)); + try { + expect(metadata.version).toBe(0); + expect(metadata.asV0.modules.length).not.toBe(0); + expect(json).toEqual(latestSubstrateV0); + } catch (error) { + console.error(JSON.stringify(json)); - expect(metadata.version).toBe(0); - expect(metadata.asV0.modules.length).not.toBe(0); - expect(json).toEqual(latestSubstrateV0); + throw error; + } }); toLatest(registry, 0, rpcData); diff --git a/packages/metadata/src/Metadata/v0/static-polkadot.json b/packages/metadata/src/Metadata/v0/static-polkadot.json deleted file mode 100644 index a48a62f659..0000000000 --- a/packages/metadata/src/Metadata/v0/static-polkadot.json +++ /dev/null @@ -1,2429 +0,0 @@ -{ - "outerEvent": { - "name": "Event", - "events": [ - [ - "system", - [ - { - "name": "ExtrinsicSuccess", - "args": [], - "documentation": [ - " An extrinsic completed successfully." - ] - }, - { - "name": "ExtrinsicFailed", - "args": [], - "documentation": [ - " An extrinsic failed." - ] - } - ] - ], - [ - "balances", - [ - { - "name": "NewAccount", - "args": [ - "AccountId", - "AccountIndex", - "NewAccountOutcome" - ], - "documentation": [ - " A new account was created." - ] - }, - { - "name": "ReapedAccount", - "args": [ - "AccountId" - ], - "documentation": [ - " An account was reaped." - ] - }, - { - "name": "Transfer", - "args": [ - "AccountId", - "AccountId", - "Balance", - "Balance" - ], - "documentation": [ - " Transfer succeeded (from, to, value, fees)." - ] - } - ] - ], - [ - "session", - [ - { - "name": "NewSession", - "args": [ - "BlockNumber" - ], - "documentation": [ - " New session has happened. Note that the argument is the session index, not the block", - " number as the type might suggest." - ] - } - ] - ], - [ - "staking", - [ - { - "name": "Reward", - "args": [ - "Balance" - ], - "documentation": [ - " All validators have been rewarded by the given balance." - ] - }, - { - "name": "OfflineWarning", - "args": [ - "AccountId", - "u32" - ], - "documentation": [ - " One validator (and their nominators) has been given a offline-warning (they're still", - " within their grace). The accrued number of slashes is recorded, too." - ] - }, - { - "name": "OfflineSlash", - "args": [ - "AccountId", - "Balance" - ], - "documentation": [ - " One validator (and their nominators) has been slashed by the given amount." - ] - } - ] - ], - [ - "democracy", - [ - { - "name": "Tabled", - "args": [ - "PropIndex", - "Balance", - "Vec" - ], - "documentation": [] - }, - { - "name": "Started", - "args": [ - "ReferendumIndex", - "VoteThreshold" - ], - "documentation": [] - }, - { - "name": "Passed", - "args": [ - "ReferendumIndex" - ], - "documentation": [] - }, - { - "name": "NotPassed", - "args": [ - "ReferendumIndex" - ], - "documentation": [] - }, - { - "name": "Cancelled", - "args": [ - "ReferendumIndex" - ], - "documentation": [] - }, - { - "name": "Executed", - "args": [ - "ReferendumIndex", - "bool" - ], - "documentation": [] - } - ] - ], - [ - "grandpa", - [ - { - "name": "NewAuthorities", - "args": [ - "Vec<(SessionKey,u64)>" - ], - "documentation": [ - " New authority set has been applied." - ] - } - ] - ], - [ - "council", - [ - { - "name": "VoterReaped", - "args": [ - "AccountId", - "AccountId" - ], - "documentation": [ - " reaped voter, reaper" - ] - }, - { - "name": "BadReaperSlashed", - "args": [ - "AccountId" - ], - "documentation": [ - " slashed reaper" - ] - }, - { - "name": "TallyStarted", - "args": [ - "u32" - ], - "documentation": [ - " A tally (for approval votes of council seat(s)) has started." - ] - }, - { - "name": "TallyFinalised", - "args": [ - "Vec", - "Vec" - ], - "documentation": [ - " A tally (for approval votes of council seat(s)) has ended (with one or more new members)." - ] - } - ] - ], - [ - "council_voting", - [ - { - "name": "TallyCancelation", - "args": [ - "Hash", - "u32", - "u32", - "u32" - ], - "documentation": [ - " A voting tally has happened for a referendum cancellation vote.", - " Last three are yes, no, abstain counts." - ] - }, - { - "name": "TallyReferendum", - "args": [ - "Hash", - "u32", - "u32", - "u32" - ], - "documentation": [ - " A voting tally has happened for a referendum vote.", - " Last three are yes, no, abstain counts." - ] - } - ] - ], - [ - "council_motions", - [ - { - "name": "Proposed", - "args": [ - "AccountId", - "ProposalIndex", - "Hash", - "u32" - ], - "documentation": [ - " A motion (given hash) has been proposed (by given account) with a threshold (given u32)." - ] - }, - { - "name": "Voted", - "args": [ - "AccountId", - "Hash", - "bool", - "u32", - "u32" - ], - "documentation": [ - " A motion (given hash) has been voted on by given account, leaving", - " a tally (yes votes and no votes given as u32s respectively)." - ] - }, - { - "name": "Approved", - "args": [ - "Hash" - ], - "documentation": [ - " A motion was approved by the required threshold." - ] - }, - { - "name": "Disapproved", - "args": [ - "Hash" - ], - "documentation": [ - " A motion was not approved by the required threshold." - ] - }, - { - "name": "Executed", - "args": [ - "Hash", - "bool" - ], - "documentation": [ - " A motion was executed; `bool` is true if returned without error." - ] - } - ] - ], - [ - "treasury", - [ - { - "name": "Proposed", - "args": [ - "ProposalIndex" - ], - "documentation": [ - " New proposal." - ] - }, - { - "name": "Spending", - "args": [ - "Balance" - ], - "documentation": [ - " We have ended a spend period and will now allocate funds." - ] - }, - { - "name": "Awarded", - "args": [ - "ProposalIndex", - "Balance", - "AccountId" - ], - "documentation": [ - " Some funds have been allocated." - ] - }, - { - "name": "Burnt", - "args": [ - "Balance" - ], - "documentation": [ - " Some of our funds have been burnt." - ] - }, - { - "name": "Rollover", - "args": [ - "Balance" - ], - "documentation": [ - " Spending has finished; this is the amount that rolls over until next spend." - ] - } - ] - ] - ] - }, - "modules": [ - { - "prefix": "system", - "module": { - "name": "Module", - "call": { - "name": "Call", - "functions": [] - } - }, - "storage": { - "prefix": "System", - "functions": [ - { - "name": "AccountNonce", - "modifier": 1, - "type": { - "key": "AccountId", - "value": "Index" - }, - "documentation": [] - }, - { - "name": "ExtrinsicCount", - "modifier": 0, - "type": "u32", - "documentation": [] - }, - { - "name": "BlockHash", - "modifier": 1, - "type": { - "key": "BlockNumber", - "value": "Hash" - }, - "documentation": [] - }, - { - "name": "ExtrinsicData", - "modifier": 1, - "type": { - "key": "u32", - "value": "Bytes" - }, - "documentation": [] - }, - { - "name": "RandomSeed", - "modifier": 1, - "type": "Hash", - "documentation": [] - }, - { - "name": "Number", - "modifier": 1, - "type": "BlockNumber", - "documentation": [ - " The current block number being processed. Set by `execute_block`." - ] - }, - { - "name": "ParentHash", - "modifier": 1, - "type": "Hash", - "documentation": [] - }, - { - "name": "ExtrinsicsRoot", - "modifier": 1, - "type": "Hash", - "documentation": [] - }, - { - "name": "Digest", - "modifier": 1, - "type": "Digest", - "documentation": [] - }, - { - "name": "Events", - "modifier": 1, - "type": "Vec", - "documentation": [] - } - ] - } - }, - { - "prefix": "aura", - "module": { - "name": "Module", - "call": { - "name": "Call", - "functions": [] - } - }, - "storage": null - }, - { - "prefix": "timestamp", - "module": { - "name": "Module", - "call": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "set", - "args": [ - { - "name": "now", - "type": "Compact" - } - ], - "documentation": [ - " Set the current time.", - "", - " Extrinsic with this call should be placed at the specific position in the each block", - " (specified by the Trait::TIMESTAMP_SET_POSITION) typically at the start of the each block.", - " This call should be invoked exactly once per block. It will panic at the finalization phase,", - " if this call hasn't been invoked by that time.", - "", - " The timestamp should be greater than the previous one by the amount specified by `block_period`." - ] - } - ] - } - }, - "storage": { - "prefix": "Timestamp", - "functions": [ - { - "name": "Now", - "modifier": 1, - "type": "Moment", - "documentation": [ - " Current time for the current block." - ] - }, - { - "name": "BlockPeriod", - "modifier": 1, - "type": "Moment", - "documentation": [ - " The minimum (and advised) period between blocks." - ] - }, - { - "name": "DidUpdate", - "modifier": 1, - "type": "bool", - "documentation": [ - " Did the timestamp get updated in this block?" - ] - } - ] - } - }, - { - "prefix": "consensus", - "module": { - "name": "Module", - "call": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "report_misbehavior", - "args": [ - { - "name": "_report", - "type": "Bytes" - } - ], - "documentation": [ - " Report some misbehaviour." - ] - }, - { - "id": 1, - "name": "note_offline", - "args": [ - { - "name": "offline", - "type": "InherentOfflineReport" - } - ], - "documentation": [ - " Note the previous block's validator missed their opportunity to propose a block." - ] - }, - { - "id": 2, - "name": "remark", - "args": [ - { - "name": "_remark", - "type": "Bytes" - } - ], - "documentation": [ - " Make some on-chain remark." - ] - }, - { - "id": 3, - "name": "set_heap_pages", - "args": [ - { - "name": "pages", - "type": "u64" - } - ], - "documentation": [ - " Set the number of pages in the WebAssembly environment's heap." - ] - }, - { - "id": 4, - "name": "set_code", - "args": [ - { - "name": "new", - "type": "Bytes" - } - ], - "documentation": [ - " Set the new code." - ] - }, - { - "id": 5, - "name": "set_storage", - "args": [ - { - "name": "items", - "type": "Vec" - } - ], - "documentation": [ - " Set some items of storage." - ] - } - ] - } - }, - "storage": { - "prefix": "Consensus", - "functions": [ - { - "name": "OriginalAuthorities", - "modifier": 0, - "type": "Vec", - "documentation": [] - } - ] - } - }, - { - "prefix": "balances", - "module": { - "name": "Module", - "call": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "transfer", - "args": [ - { - "name": "dest", - "type": "Address" - }, - { - "name": "value", - "type": "Compact" - } - ], - "documentation": [ - " Transfer some liquid free balance to another staker." - ] - }, - { - "id": 1, - "name": "set_balance", - "args": [ - { - "name": "who", - "type": "Address" - }, - { - "name": "free", - "type": "Compact" - }, - { - "name": "reserved", - "type": "Compact" - } - ], - "documentation": [ - " Set the balances of a given account." - ] - } - ] - } - }, - "storage": { - "prefix": "Balances", - "functions": [ - { - "name": "TotalIssuance", - "modifier": 1, - "type": "Balance", - "documentation": [ - " The total amount of stake on the system." - ] - }, - { - "name": "ExistentialDeposit", - "modifier": 1, - "type": "Balance", - "documentation": [ - " The minimum amount allowed to keep an account open." - ] - }, - { - "name": "ReclaimRebate", - "modifier": 1, - "type": "Balance", - "documentation": [ - " The amount credited to a destination's account whose index was reclaimed." - ] - }, - { - "name": "TransferFee", - "modifier": 1, - "type": "Balance", - "documentation": [ - " The fee required to make a transfer." - ] - }, - { - "name": "CreationFee", - "modifier": 1, - "type": "Balance", - "documentation": [ - " The fee required to create an account. At least as big as ReclaimRebate." - ] - }, - { - "name": "NextEnumSet", - "modifier": 1, - "type": "AccountIndex", - "documentation": [ - " The next free enumeration set." - ] - }, - { - "name": "EnumSet", - "modifier": 1, - "type": { - "key": "AccountIndex", - "value": "Vec" - }, - "documentation": [ - " The enumeration sets." - ] - }, - { - "name": "FreeBalance", - "modifier": 1, - "type": { - "key": "AccountId", - "value": "Balance" - }, - "documentation": [ - " The 'free' balance of a given account.", - "", - " This is the only balance that matters in terms of most operations on tokens. It is", - " alone used to determine the balance when in the contract execution environment. When this", - " balance falls below the value of `ExistentialDeposit`, then the 'current account' is", - " deleted: specifically `FreeBalance`. Furthermore, `OnFreeBalanceZero` callback", - " is invoked, giving a chance to external modules to cleanup data associated with", - " the deleted account.", - "", - " `system::AccountNonce` is also deleted if `ReservedBalance` is also zero (it also gets", - " collapsed to zero if it ever becomes less than `ExistentialDeposit`." - ] - }, - { - "name": "ReservedBalance", - "modifier": 1, - "type": { - "key": "AccountId", - "value": "Balance" - }, - "documentation": [ - " The amount of the balance of a given account that is externally reserved; this can still get", - " slashed, but gets slashed last of all.", - "", - " This balance is a 'reserve' balance that other subsystems use in order to set aside tokens", - " that are still 'owned' by the account holder, but which are suspendable. (This is different", - " and wholly unrelated to the `Bondage` system used in the staking module.)", - "", - " When this balance falls below the value of `ExistentialDeposit`, then this 'reserve account'", - " is deleted: specifically, `ReservedBalance`.", - "", - " `system::AccountNonce` is also deleted if `FreeBalance` is also zero (it also gets", - " collapsed to zero if it ever becomes less than `ExistentialDeposit`." - ] - }, - { - "name": "TransactionBaseFee", - "modifier": 1, - "type": "Balance", - "documentation": [ - " The fee to be paid for making a transaction; the base." - ] - }, - { - "name": "TransactionByteFee", - "modifier": 1, - "type": "Balance", - "documentation": [ - " The fee to be paid for making a transaction; the per-byte portion." - ] - } - ] - } - }, - { - "prefix": "session", - "module": { - "name": "Module", - "call": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "set_key", - "args": [ - { - "name": "key", - "type": "SessionKey" - } - ], - "documentation": [ - " Sets the session key of `_validator` to `_key`. This doesn't take effect until the next", - " session." - ] - }, - { - "id": 1, - "name": "set_length", - "args": [ - { - "name": "new", - "type": "Compact" - } - ], - "documentation": [ - " Set a new session length. Won't kick in until the next session change (at current length)." - ] - }, - { - "id": 2, - "name": "force_new_session", - "args": [ - { - "name": "apply_rewards", - "type": "bool" - } - ], - "documentation": [ - " Forces a new session." - ] - } - ] - } - }, - "storage": { - "prefix": "Session", - "functions": [ - { - "name": "Validators", - "modifier": 1, - "type": "Vec", - "documentation": [ - " The current set of validators." - ] - }, - { - "name": "SessionLength", - "modifier": 1, - "type": "BlockNumber", - "documentation": [ - " Current length of the session." - ] - }, - { - "name": "CurrentIndex", - "modifier": 1, - "type": "BlockNumber", - "documentation": [ - " Current index of the session." - ] - }, - { - "name": "CurrentStart", - "modifier": 1, - "type": "Moment", - "documentation": [ - " Timestamp when current session started." - ] - }, - { - "name": "ForcingNewSession", - "modifier": 0, - "type": "bool", - "documentation": [ - " New session is being forced is this entry exists; in which case, the boolean value is whether", - " the new session should be considered a normal rotation (rewardable) or exceptional (slashable)." - ] - }, - { - "name": "LastLengthChange", - "modifier": 0, - "type": "BlockNumber", - "documentation": [ - " Block at which the session length last changed." - ] - }, - { - "name": "NextKeyFor", - "modifier": 0, - "type": { - "key": "AccountId", - "value": "SessionKey" - }, - "documentation": [ - " The next key for a given validator." - ] - }, - { - "name": "NextSessionLength", - "modifier": 0, - "type": "BlockNumber", - "documentation": [ - " The next session length." - ] - } - ] - } - }, - { - "prefix": "staking", - "module": { - "name": "Module", - "call": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "stake", - "args": [], - "documentation": [ - " Declare the desire to stake for the transactor.", - "", - " Effects will be felt at the beginning of the next era." - ] - }, - { - "id": 1, - "name": "unstake", - "args": [ - { - "name": "intentions_index", - "type": "Compact" - } - ], - "documentation": [ - " Retract the desire to stake for the transactor.", - "", - " Effects will be felt at the beginning of the next era." - ] - }, - { - "id": 2, - "name": "nominate", - "args": [ - { - "name": "target", - "type": "Address" - } - ], - "documentation": [] - }, - { - "id": 3, - "name": "unnominate", - "args": [ - { - "name": "target_index", - "type": "Compact" - } - ], - "documentation": [ - " Will panic if called when source isn't currently nominating target.", - " Updates Nominating, NominatorsFor and NominationBalance." - ] - }, - { - "id": 4, - "name": "register_preferences", - "args": [ - { - "name": "intentions_index", - "type": "Compact" - }, - { - "name": "prefs", - "type": "ValidatorPrefs" - } - ], - "documentation": [ - " Set the given account's preference for slashing behaviour should they be a validator.", - "", - " An error (no-op) if `Self::intentions()[intentions_index] != origin`." - ] - }, - { - "id": 5, - "name": "set_sessions_per_era", - "args": [ - { - "name": "new", - "type": "Compact" - } - ], - "documentation": [ - " Set the number of sessions in an era." - ] - }, - { - "id": 6, - "name": "set_bonding_duration", - "args": [ - { - "name": "new", - "type": "Compact" - } - ], - "documentation": [ - " The length of the bonding duration in eras." - ] - }, - { - "id": 7, - "name": "set_validator_count", - "args": [ - { - "name": "new", - "type": "Compact" - } - ], - "documentation": [ - " The ideal number of validators." - ] - }, - { - "id": 8, - "name": "force_new_era", - "args": [ - { - "name": "apply_rewards", - "type": "bool" - } - ], - "documentation": [ - " Force there to be a new era. This also forces a new session immediately after.", - " `apply_rewards` should be true for validators to get the session reward." - ] - }, - { - "id": 9, - "name": "set_offline_slash_grace", - "args": [ - { - "name": "new", - "type": "Compact" - } - ], - "documentation": [ - " Set the offline slash grace period." - ] - } - ] - } - }, - "storage": { - "prefix": "Staking", - "functions": [ - { - "name": "ValidatorCount", - "modifier": 1, - "type": "u32", - "documentation": [ - " The ideal number of staking participants." - ] - }, - { - "name": "MinimumValidatorCount", - "modifier": 1, - "type": "u32", - "documentation": [ - " Minimum number of staking participants before emergency conditions are imposed." - ] - }, - { - "name": "SessionsPerEra", - "modifier": 1, - "type": "BlockNumber", - "documentation": [ - " The length of a staking era in sessions." - ] - }, - { - "name": "SessionReward", - "modifier": 1, - "type": "Perbill", - "documentation": [ - " Maximum reward, per validator, that is provided per acceptable session." - ] - }, - { - "name": "OfflineSlash", - "modifier": 1, - "type": "Perbill", - "documentation": [ - " Slash, per validator that is taken for the first time they are found to be offline." - ] - }, - { - "name": "OfflineSlashGrace", - "modifier": 1, - "type": "u32", - "documentation": [ - " Number of instances of offline reports before slashing begins for validators." - ] - }, - { - "name": "BondingDuration", - "modifier": 1, - "type": "BlockNumber", - "documentation": [ - " The length of the bonding duration in blocks." - ] - }, - { - "name": "CurrentEra", - "modifier": 1, - "type": "BlockNumber", - "documentation": [ - " The current era index." - ] - }, - { - "name": "ValidatorPreferences", - "modifier": 1, - "type": { - "key": "AccountId", - "value": "ValidatorPrefs" - }, - "documentation": [ - " Preferences that a validator has." - ] - }, - { - "name": "Intentions", - "modifier": 1, - "type": "Vec", - "documentation": [ - " All the accounts with a desire to stake." - ] - }, - { - "name": "Nominating", - "modifier": 0, - "type": { - "key": "AccountId", - "value": "AccountId" - }, - "documentation": [ - " All nominator -> nominee relationships." - ] - }, - { - "name": "NominatorsFor", - "modifier": 1, - "type": { - "key": "AccountId", - "value": "Vec" - }, - "documentation": [ - " Nominators for a particular account." - ] - }, - { - "name": "CurrentNominatorsFor", - "modifier": 1, - "type": { - "key": "AccountId", - "value": "Vec" - }, - "documentation": [ - " Nominators for a particular account that is in action right now." - ] - }, - { - "name": "CurrentSessionReward", - "modifier": 1, - "type": "Balance", - "documentation": [ - " Maximum reward, per validator, that is provided per acceptable session." - ] - }, - { - "name": "CurrentOfflineSlash", - "modifier": 1, - "type": "Balance", - "documentation": [ - " Slash, per validator that is taken for the first time they are found to be offline." - ] - }, - { - "name": "NextSessionsPerEra", - "modifier": 0, - "type": "BlockNumber", - "documentation": [ - " The next value of sessions per era." - ] - }, - { - "name": "LastEraLengthChange", - "modifier": 1, - "type": "BlockNumber", - "documentation": [ - " The session index at which the era length last changed." - ] - }, - { - "name": "StakeRange", - "modifier": 1, - "type": "(Balance,Balance)", - "documentation": [ - " The highest and lowest staked validator slashable balances." - ] - }, - { - "name": "Bondage", - "modifier": 1, - "type": { - "key": "AccountId", - "value": "BlockNumber" - }, - "documentation": [ - " The block at which the `who`'s funds become entirely liquid." - ] - }, - { - "name": "SlashCount", - "modifier": 1, - "type": { - "key": "AccountId", - "value": "u32" - }, - "documentation": [ - " The number of times a given validator has been reported offline. This gets decremented by one each era that passes." - ] - }, - { - "name": "ForcingNewEra", - "modifier": 0, - "type": "()", - "documentation": [ - " We are forcing a new era." - ] - } - ] - } - }, - { - "prefix": "democracy", - "module": { - "name": "Module", - "call": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "propose", - "args": [ - { - "name": "proposal", - "type": "Proposal" - }, - { - "name": "value", - "type": "Compact" - } - ], - "documentation": [ - " Propose a sensitive action to be taken." - ] - }, - { - "id": 1, - "name": "second", - "args": [ - { - "name": "proposal", - "type": "Compact" - } - ], - "documentation": [ - " Propose a sensitive action to be taken." - ] - }, - { - "id": 2, - "name": "vote", - "args": [ - { - "name": "ref_index", - "type": "Compact" - }, - { - "name": "approve_proposal", - "type": "bool" - } - ], - "documentation": [ - " Vote in a referendum. If `approve_proposal` is true, the vote is to enact the proposal;", - " false would be a vote to keep the status quo." - ] - }, - { - "id": 3, - "name": "start_referendum", - "args": [ - { - "name": "proposal", - "type": "Proposal" - }, - { - "name": "threshold", - "type": "VoteThreshold" - }, - { - "name": "delay", - "type": "BlockNumber" - } - ], - "documentation": [ - " Start a referendum." - ] - }, - { - "id": 4, - "name": "cancel_referendum", - "args": [ - { - "name": "ref_index", - "type": "Compact" - } - ], - "documentation": [ - " Remove a referendum." - ] - }, - { - "id": 5, - "name": "cancel_queued", - "args": [ - { - "name": "when", - "type": "BlockNumber" - }, - { - "name": "which", - "type": "u32" - } - ], - "documentation": [ - " Cancel a proposal queued for enactment." - ] - } - ] - } - }, - "storage": { - "prefix": "Democracy", - "functions": [ - { - "name": "PublicPropCount", - "modifier": 1, - "type": "PropIndex", - "documentation": [ - " The number of (public) proposals that have been made so far." - ] - }, - { - "name": "PublicProps", - "modifier": 1, - "type": "Vec<(PropIndex,Proposal,AccountId)>", - "documentation": [ - " The public proposals. Unsorted." - ] - }, - { - "name": "DepositOf", - "modifier": 0, - "type": { - "key": "PropIndex", - "value": "(Balance,Vec)" - }, - "documentation": [ - " Those who have locked a deposit." - ] - }, - { - "name": "LaunchPeriod", - "modifier": 1, - "type": "BlockNumber", - "documentation": [ - " How often (in blocks) new public referenda are launched." - ] - }, - { - "name": "MinimumDeposit", - "modifier": 1, - "type": "Balance", - "documentation": [ - " The minimum amount to be used as a deposit for a public referendum proposal." - ] - }, - { - "name": "PublicDelay", - "modifier": 1, - "type": "BlockNumber", - "documentation": [ - " The delay before enactment for all public referenda." - ] - }, - { - "name": "VotingPeriod", - "modifier": 1, - "type": "BlockNumber", - "documentation": [ - " How often (in blocks) to check for new votes." - ] - }, - { - "name": "ReferendumCount", - "modifier": 1, - "type": "ReferendumIndex", - "documentation": [ - " The next free referendum index, aka the number of referendums started so far." - ] - }, - { - "name": "NextTally", - "modifier": 1, - "type": "ReferendumIndex", - "documentation": [ - " The next referendum index that should be tallied." - ] - }, - { - "name": "ReferendumInfoOf", - "modifier": 0, - "type": { - "key": "ReferendumIndex", - "value": "(ReferendumInfo)" - }, - "documentation": [ - " Information concerning any given referendum." - ] - }, - { - "name": "DispatchQueue", - "modifier": 1, - "type": { - "key": "BlockNumber", - "value": "Vec>" - }, - "documentation": [ - " Queue of successful referenda to be dispatched." - ] - }, - { - "name": "Bondage", - "modifier": 1, - "type": { - "key": "AccountId", - "value": "BlockNumber" - }, - "documentation": [ - " The block at which the `who`'s funds become liquid." - ] - }, - { - "name": "VotersFor", - "modifier": 1, - "type": { - "key": "ReferendumIndex", - "value": "Vec" - }, - "documentation": [ - " Get the voters for the current proposal." - ] - }, - { - "name": "VoteOf", - "modifier": 0, - "type": { - "key": "(ReferendumIndex,AccountId)", - "value": "bool" - }, - "documentation": [ - " Get the vote, if Some, of `who`." - ] - } - ] - } - }, - { - "prefix": "grandpa", - "module": { - "name": "Module", - "call": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "report_misbehavior", - "args": [ - { - "name": "_report", - "type": "Bytes" - } - ], - "documentation": [ - " Report some misbehaviour." - ] - } - ] - } - }, - "storage": { - "prefix": "GrandpaFinality", - "functions": [ - { - "name": "PendingChange", - "modifier": 0, - "type": "StoredPendingChange", - "documentation": [] - } - ] - } - }, - { - "prefix": "council", - "module": { - "name": "Module", - "call": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "set_approvals", - "args": [ - { - "name": "votes", - "type": "Vec" - }, - { - "name": "index", - "type": "Compact" - } - ], - "documentation": [ - " Set candidate approvals. Approval slots stay valid as long as candidates in those slots", - " are registered." - ] - }, - { - "id": 1, - "name": "reap_inactive_voter", - "args": [ - { - "name": "reporter_index", - "type": "Compact" - }, - { - "name": "who", - "type": "Address" - }, - { - "name": "who_index", - "type": "Compact" - }, - { - "name": "assumed_vote_index", - "type": "Compact" - } - ], - "documentation": [ - " Remove a voter. For it not to be a bond-consuming no-op, all approved candidate indices", - " must now be either unregistered or registered to a candidate that registered the slot after", - " the voter gave their last approval set.", - "", - " May be called by anyone. Returns the voter deposit to `signed`." - ] - }, - { - "id": 2, - "name": "retract_voter", - "args": [ - { - "name": "index", - "type": "Compact" - } - ], - "documentation": [ - " Remove a voter. All votes are cancelled and the voter deposit is returned." - ] - }, - { - "id": 3, - "name": "submit_candidacy", - "args": [ - { - "name": "slot", - "type": "Compact" - } - ], - "documentation": [ - " Submit oneself for candidacy.", - "", - " Account must have enough transferrable funds in it to pay the bond." - ] - }, - { - "id": 4, - "name": "present_winner", - "args": [ - { - "name": "candidate", - "type": "Address" - }, - { - "name": "total", - "type": "Compact" - }, - { - "name": "index", - "type": "Compact" - } - ], - "documentation": [ - " Claim that `signed` is one of the top Self::carry_count() + current_vote().1 candidates.", - " Only works if the `block_number >= current_vote().0` and `< current_vote().0 + presentation_duration()``", - " `signed` should have at least" - ] - }, - { - "id": 5, - "name": "set_desired_seats", - "args": [ - { - "name": "count", - "type": "Compact" - } - ], - "documentation": [ - " Set the desired member count; if lower than the current count, then seats will not be up", - " election when they expire. If more, then a new vote will be started if one is not already", - " in progress." - ] - }, - { - "id": 6, - "name": "remove_member", - "args": [ - { - "name": "who", - "type": "Address" - } - ], - "documentation": [ - " Remove a particular member. A tally will happen instantly (if not already in a presentation", - " period) to fill the seat if removal means that the desired members are not met.", - " This is effective immediately." - ] - }, - { - "id": 7, - "name": "set_presentation_duration", - "args": [ - { - "name": "count", - "type": "Compact" - } - ], - "documentation": [ - " Set the presentation duration. If there is currently a vote being presented for, will", - " invoke `finalise_vote`." - ] - }, - { - "id": 8, - "name": "set_term_duration", - "args": [ - { - "name": "count", - "type": "Compact" - } - ], - "documentation": [ - " Set the presentation duration. If there is current a vote being presented for, will", - " invoke `finalise_vote`." - ] - } - ] - } - }, - "storage": { - "prefix": "Council", - "functions": [ - { - "name": "CandidacyBond", - "modifier": 1, - "type": "Balance", - "documentation": [ - " How much should be locked up in order to submit one's candidacy." - ] - }, - { - "name": "VotingBond", - "modifier": 1, - "type": "Balance", - "documentation": [ - " How much should be locked up in order to be able to submit votes." - ] - }, - { - "name": "PresentSlashPerVoter", - "modifier": 1, - "type": "Balance", - "documentation": [ - " The punishment, per voter, if you provide an invalid presentation." - ] - }, - { - "name": "CarryCount", - "modifier": 1, - "type": "u32", - "documentation": [ - " How many runners-up should have their approvals persist until the next vote." - ] - }, - { - "name": "PresentationDuration", - "modifier": 1, - "type": "BlockNumber", - "documentation": [ - " How long to give each top candidate to present themselves after the vote ends." - ] - }, - { - "name": "InactiveGracePeriod", - "modifier": 1, - "type": "VoteIndex", - "documentation": [ - " How many votes need to go by after a voter's last vote before they can be reaped if their", - " approvals are moot." - ] - }, - { - "name": "VotingPeriod", - "modifier": 1, - "type": "BlockNumber", - "documentation": [ - " How often (in blocks) to check for new votes." - ] - }, - { - "name": "TermDuration", - "modifier": 1, - "type": "BlockNumber", - "documentation": [ - " How long each position is active for." - ] - }, - { - "name": "DesiredSeats", - "modifier": 1, - "type": "u32", - "documentation": [ - " Number of accounts that should be sitting on the council." - ] - }, - { - "name": "ActiveCouncil", - "modifier": 1, - "type": "Vec<(AccountId,BlockNumber)>", - "documentation": [ - " The current council. When there's a vote going on, this should still be used for executive", - " matters." - ] - }, - { - "name": "VoteCount", - "modifier": 1, - "type": "VoteIndex", - "documentation": [ - " The total number of votes that have happened or are in progress." - ] - }, - { - "name": "ApprovalsOf", - "modifier": 1, - "type": { - "key": "AccountId", - "value": "Vec" - }, - "documentation": [ - " The last cleared vote index that this voter was last active at." - ] - }, - { - "name": "RegisterInfoOf", - "modifier": 0, - "type": { - "key": "AccountId", - "value": "(VoteIndex,u32)" - }, - "documentation": [ - " The vote index and list slot that the candidate `who` was registered or `None` if they are not", - " currently registered." - ] - }, - { - "name": "LastActiveOf", - "modifier": 0, - "type": { - "key": "AccountId", - "value": "VoteIndex" - }, - "documentation": [ - " The last cleared vote index that this voter was last active at." - ] - }, - { - "name": "Voters", - "modifier": 1, - "type": "Vec", - "documentation": [ - " The present voter list." - ] - }, - { - "name": "Candidates", - "modifier": 1, - "type": "Vec", - "documentation": [ - " The present candidate list." - ] - }, - { - "name": "CandidateCount", - "modifier": 1, - "type": "u32", - "documentation": [] - }, - { - "name": "NextFinalise", - "modifier": 0, - "type": "(BlockNumber,u32,Vec)", - "documentation": [ - " The accounts holding the seats that will become free on the next tally." - ] - }, - { - "name": "SnapshotedStakes", - "modifier": 1, - "type": "Vec", - "documentation": [ - " The stakes as they were at the point that the vote ended." - ] - }, - { - "name": "Leaderboard", - "modifier": 0, - "type": "Vec<(Balance,AccountId)>", - "documentation": [ - " Get the leaderboard if we;re in the presentation phase." - ] - } - ] - } - }, - { - "prefix": "council_voting", - "module": { - "name": "Module", - "call": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "propose", - "args": [ - { - "name": "proposal", - "type": "Proposal" - } - ], - "documentation": [] - }, - { - "id": 1, - "name": "vote", - "args": [ - { - "name": "proposal", - "type": "Hash" - }, - { - "name": "approve", - "type": "bool" - } - ], - "documentation": [] - }, - { - "id": 2, - "name": "veto", - "args": [ - { - "name": "proposal_hash", - "type": "Hash" - } - ], - "documentation": [] - }, - { - "id": 3, - "name": "set_cooloff_period", - "args": [ - { - "name": "blocks", - "type": "Compact" - } - ], - "documentation": [] - }, - { - "id": 4, - "name": "set_voting_period", - "args": [ - { - "name": "blocks", - "type": "Compact" - } - ], - "documentation": [] - } - ] - } - }, - "storage": { - "prefix": "CouncilVoting", - "functions": [ - { - "name": "CooloffPeriod", - "modifier": 1, - "type": "BlockNumber", - "documentation": [] - }, - { - "name": "VotingPeriod", - "modifier": 1, - "type": "BlockNumber", - "documentation": [] - }, - { - "name": "EnactDelayPeriod", - "modifier": 1, - "type": "BlockNumber", - "documentation": [ - " Number of blocks by which to delay enactment of successful, non-unanimous-council-instigated referendum proposals." - ] - }, - { - "name": "Proposals", - "modifier": 1, - "type": "Vec<(BlockNumber,Hash)>", - "documentation": [] - }, - { - "name": "ProposalOf", - "modifier": 0, - "type": { - "key": "Hash", - "value": "Proposal" - }, - "documentation": [] - }, - { - "name": "ProposalVoters", - "modifier": 1, - "type": { - "key": "Hash", - "value": "Vec" - }, - "documentation": [] - }, - { - "name": "CouncilVoteOf", - "modifier": 0, - "type": { - "key": "(Hash,AccountId)", - "value": "bool" - }, - "documentation": [] - }, - { - "name": "VetoedProposal", - "modifier": 0, - "type": { - "key": "Hash", - "value": "(BlockNumber,Vec)" - }, - "documentation": [] - } - ] - } - }, - { - "prefix": "council_motions", - "module": { - "name": "Module", - "call": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "propose", - "args": [ - { - "name": "threshold", - "type": "Compact" - }, - { - "name": "proposal", - "type": "Proposal" - } - ], - "documentation": [] - }, - { - "id": 1, - "name": "vote", - "args": [ - { - "name": "proposal", - "type": "Hash" - }, - { - "name": "index", - "type": "Compact" - }, - { - "name": "approve", - "type": "bool" - } - ], - "documentation": [] - } - ] - } - }, - "storage": { - "prefix": "CouncilMotions", - "functions": [ - { - "name": "Proposals", - "modifier": 1, - "type": "Vec", - "documentation": [ - " The (hashes of) the active proposals." - ] - }, - { - "name": "ProposalOf", - "modifier": 0, - "type": { - "key": "Hash", - "value": "Proposal" - }, - "documentation": [ - " Actual proposal for a given hash, if it's current." - ] - }, - { - "name": "Voting", - "modifier": 0, - "type": { - "key": "Hash", - "value": "(ProposalIndex,u32,Vec,Vec)" - }, - "documentation": [ - " Votes for a given proposal: (required_yes_votes, yes_voters, no_voters)." - ] - }, - { - "name": "ProposalCount", - "modifier": 1, - "type": "u32", - "documentation": [ - " Proposals so far." - ] - } - ] - } - }, - { - "prefix": "treasury", - "module": { - "name": "Module", - "call": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "propose_spend", - "args": [ - { - "name": "value", - "type": "Compact" - }, - { - "name": "beneficiary", - "type": "Address" - } - ], - "documentation": [ - " Put forward a suggestion for spending. A deposit proportional to the value", - " is reserved and slashed if the proposal is rejected. It is returned once the", - " proposal is awarded." - ] - }, - { - "id": 1, - "name": "set_pot", - "args": [ - { - "name": "new_pot", - "type": "Compact" - } - ], - "documentation": [ - " Set the balance of funds available to spend." - ] - }, - { - "id": 2, - "name": "configure", - "args": [ - { - "name": "proposal_bond", - "type": "Permill" - }, - { - "name": "proposal_bond_minimum", - "type": "Compact" - }, - { - "name": "spend_period", - "type": "Compact" - }, - { - "name": "burn", - "type": "Permill" - } - ], - "documentation": [ - " (Re-)configure this module." - ] - }, - { - "id": 3, - "name": "reject_proposal", - "args": [ - { - "name": "proposal_id", - "type": "Compact" - } - ], - "documentation": [ - " Reject a proposed spend. The original deposit will be slashed." - ] - }, - { - "id": 4, - "name": "approve_proposal", - "args": [ - { - "name": "proposal_id", - "type": "Compact" - } - ], - "documentation": [ - " Approve a proposal. At a later time, the proposal will be allocated to the beneficiary", - " and the original deposit will be returned." - ] - } - ] - } - }, - "storage": { - "prefix": "Treasury", - "functions": [ - { - "name": "ProposalBond", - "modifier": 1, - "type": "Permill", - "documentation": [ - " Proportion of funds that should be bonded in order to place a proposal. An accepted", - " proposal gets these back. A rejected proposal doesn't." - ] - }, - { - "name": "ProposalBondMinimum", - "modifier": 1, - "type": "Balance", - "documentation": [ - " Minimum amount of funds that should be placed in a deposit for making a proposal." - ] - }, - { - "name": "SpendPeriod", - "modifier": 1, - "type": "BlockNumber", - "documentation": [ - " Period between successive spends." - ] - }, - { - "name": "Burn", - "modifier": 1, - "type": "Permill", - "documentation": [ - " Percentage of spare funds (if any) that are burnt per spend period." - ] - }, - { - "name": "Pot", - "modifier": 1, - "type": "Balance", - "documentation": [ - " Total funds available to this module for spending." - ] - }, - { - "name": "ProposalCount", - "modifier": 1, - "type": "ProposalIndex", - "documentation": [ - " Number of proposals that have been made." - ] - }, - { - "name": "Proposals", - "modifier": 0, - "type": { - "key": "ProposalIndex", - "value": "Proposal" - }, - "documentation": [ - " Proposals that have been made." - ] - }, - { - "name": "Approvals", - "modifier": 1, - "type": "Vec", - "documentation": [ - " Proposal indices that have been approved but not yet awarded." - ] - } - ] - } - }, - { - "prefix": "parachains", - "module": { - "name": "Module", - "call": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "set_heads", - "args": [ - { - "name": "heads", - "type": "Vec" - } - ], - "documentation": [ - " Provide candidate receipts for parachains, in ascending order by id." - ] - }, - { - "id": 1, - "name": "register_parachain", - "args": [ - { - "name": "id", - "type": "Id" - }, - { - "name": "code", - "type": "Bytes" - }, - { - "name": "initial_head_data", - "type": "Bytes" - } - ], - "documentation": [ - " Register a parachain with given code.", - " Fails if given ID is already used." - ] - }, - { - "id": 2, - "name": "deregister_parachain", - "args": [ - { - "name": "id", - "type": "Id" - } - ], - "documentation": [ - " Deregister a parachain with given id" - ] - } - ] - } - }, - "storage": { - "prefix": "Parachains", - "functions": [ - { - "name": "Parachains", - "modifier": 1, - "type": "Vec", - "documentation": [] - }, - { - "name": "Code", - "modifier": 0, - "type": { - "key": "Id", - "value": "Bytes" - }, - "documentation": [] - }, - { - "name": "Heads", - "modifier": 0, - "type": { - "key": "Id", - "value": "Bytes" - }, - "documentation": [] - }, - { - "name": "DidUpdate", - "modifier": 1, - "type": "bool", - "documentation": [] - } - ] - } - } - ], - "outerDispatch": { - "name": "Call", - "calls": [ - { - "name": "Timestamp", - "prefix": "timestamp", - "index": 0 - }, - { - "name": "Consensus", - "prefix": "consensus", - "index": 1 - }, - { - "name": "Balances", - "prefix": "balances", - "index": 2 - }, - { - "name": "Session", - "prefix": "session", - "index": 3 - }, - { - "name": "Staking", - "prefix": "staking", - "index": 4 - }, - { - "name": "Democracy", - "prefix": "democracy", - "index": 5 - }, - { - "name": "Grandpa", - "prefix": "grandpa", - "index": 6 - }, - { - "name": "Council", - "prefix": "council", - "index": 7 - }, - { - "name": "CouncilVoting", - "prefix": "council_voting", - "index": 8 - }, - { - "name": "CouncilMotions", - "prefix": "council_motions", - "index": 9 - }, - { - "name": "Treasury", - "prefix": "treasury", - "index": 10 - }, - { - "name": "Parachains", - "prefix": "parachains", - "index": 11 - } - ] - } -} diff --git a/packages/metadata/src/Metadata/v0/static-substrate.json b/packages/metadata/src/Metadata/v0/static-substrate.json index e95e399550..f83ce4e0e1 100644 --- a/packages/metadata/src/Metadata/v0/static-substrate.json +++ b/packages/metadata/src/Metadata/v0/static-substrate.json @@ -452,7 +452,7 @@ "name": "ExtrinsicCount", "modifier": 0, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00", "documentation": [] @@ -485,7 +485,7 @@ "name": "RandomSeed", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [] @@ -494,7 +494,7 @@ "name": "Number", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -505,7 +505,7 @@ "name": "ParentHash", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [] @@ -514,7 +514,7 @@ "name": "ExtrinsicsRoot", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [] @@ -523,7 +523,7 @@ "name": "Digest", "modifier": 1, "type": { - "Type": "Digest" + "Plain": "Digest" }, "fallback": "0x00", "documentation": [] @@ -532,7 +532,7 @@ "name": "Events", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [] @@ -588,7 +588,7 @@ "name": "Now", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0000000000000000", "documentation": [ @@ -599,7 +599,7 @@ "name": "BlockPeriod", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0500000000000000", "documentation": [ @@ -610,7 +610,7 @@ "name": "DidUpdate", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -715,7 +715,7 @@ "name": "OriginalAuthorities", "modifier": 0, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [] @@ -739,7 +739,7 @@ "name": "NextEnumSet", "modifier": 1, "type": { - "Type": "AccountIndex" + "Plain": "AccountIndex" }, "fallback": "0x00000000", "documentation": [ @@ -818,7 +818,7 @@ "name": "TotalIssuance", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -829,7 +829,7 @@ "name": "ExistentialDeposit", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -840,7 +840,7 @@ "name": "TransferFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -851,7 +851,7 @@ "name": "CreationFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -911,7 +911,7 @@ "name": "TransactionBaseFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -922,7 +922,7 @@ "name": "TransactionByteFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -989,7 +989,7 @@ "name": "Validators", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1000,7 +1000,7 @@ "name": "SessionLength", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -1011,7 +1011,7 @@ "name": "CurrentIndex", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -1022,7 +1022,7 @@ "name": "CurrentStart", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0000000000000000", "documentation": [ @@ -1033,7 +1033,7 @@ "name": "ForcingNewSession", "modifier": 0, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -1045,7 +1045,7 @@ "name": "LastLengthChange", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [ @@ -1070,7 +1070,7 @@ "name": "NextSessionLength", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [ @@ -1245,7 +1245,7 @@ "name": "ValidatorCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -1256,7 +1256,7 @@ "name": "MinimumValidatorCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x04000000", "documentation": [ @@ -1267,7 +1267,7 @@ "name": "SessionsPerEra", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -1278,7 +1278,7 @@ "name": "SessionReward", "modifier": 1, "type": { - "Type": "Perbill" + "Plain": "Perbill" }, "fallback": "0x3c000000", "documentation": [ @@ -1289,7 +1289,7 @@ "name": "OfflineSlash", "modifier": 1, "type": { - "Type": "Perbill" + "Plain": "Perbill" }, "fallback": "0x40420f00", "documentation": [ @@ -1300,7 +1300,7 @@ "name": "OfflineSlashGrace", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -1311,7 +1311,7 @@ "name": "BondingDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -1322,7 +1322,7 @@ "name": "Invulerables", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1334,7 +1334,7 @@ "name": "CurrentEra", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -1359,7 +1359,7 @@ "name": "Intentions", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1412,7 +1412,7 @@ "name": "CurrentSessionReward", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1423,7 +1423,7 @@ "name": "CurrentOfflineSlash", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1434,7 +1434,7 @@ "name": "NextSessionsPerEra", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [ @@ -1445,7 +1445,7 @@ "name": "LastEraLengthChange", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -1456,7 +1456,7 @@ "name": "StakeRange", "modifier": 1, "type": { - "Type": "(Balance,Balance)" + "Plain": "(Balance,Balance)" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ @@ -1495,7 +1495,7 @@ "name": "ForcingNewEra", "modifier": 0, "type": { - "Type": "Null" + "Plain": "Null" }, "fallback": "0x00", "documentation": [ @@ -1621,7 +1621,7 @@ "name": "PublicPropCount", "modifier": 1, "type": { - "Type": "PropIndex" + "Plain": "PropIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1632,7 +1632,7 @@ "name": "PublicProps", "modifier": 1, "type": { - "Type": "Vec<(PropIndex,Proposal,AccountId)>" + "Plain": "Vec<(PropIndex,Proposal,AccountId)>" }, "fallback": "0x00", "documentation": [ @@ -1657,7 +1657,7 @@ "name": "LaunchPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -1668,7 +1668,7 @@ "name": "MinimumDeposit", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1679,7 +1679,7 @@ "name": "PublicDelay", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -1690,7 +1690,7 @@ "name": "MaxLockPeriods", "modifier": 1, "type": { - "Type": "LockPeriods" + "Plain": "LockPeriods" }, "fallback": "0x00", "documentation": [ @@ -1701,7 +1701,7 @@ "name": "VotingPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -1712,7 +1712,7 @@ "name": "ReferendumCount", "modifier": 1, "type": { - "Type": "ReferendumIndex" + "Plain": "ReferendumIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1723,7 +1723,7 @@ "name": "NextTally", "modifier": 1, "type": { - "Type": "ReferendumIndex" + "Plain": "ReferendumIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1978,7 +1978,7 @@ "name": "CandidacyBond", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x09000000000000000000000000000000", "documentation": [ @@ -1989,7 +1989,7 @@ "name": "VotingBond", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2000,7 +2000,7 @@ "name": "PresentSlashPerVoter", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x01000000000000000000000000000000", "documentation": [ @@ -2011,7 +2011,7 @@ "name": "CarryCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x02000000", "documentation": [ @@ -2022,7 +2022,7 @@ "name": "PresentationDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -2033,7 +2033,7 @@ "name": "InactiveGracePeriod", "modifier": 1, "type": { - "Type": "VoteIndex" + "Plain": "VoteIndex" }, "fallback": "0x01000000", "documentation": [ @@ -2045,7 +2045,7 @@ "name": "VotingPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -2056,7 +2056,7 @@ "name": "TermDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0500000000000000", "documentation": [ @@ -2067,7 +2067,7 @@ "name": "DesiredSeats", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2078,7 +2078,7 @@ "name": "ActiveCouncil", "modifier": 1, "type": { - "Type": "Vec<(AccountId,BlockNumber)>" + "Plain": "Vec<(AccountId,BlockNumber)>" }, "fallback": "0x00", "documentation": [ @@ -2092,7 +2092,7 @@ "name": "VoteCount", "modifier": 1, "type": { - "Type": "VoteIndex" + "Plain": "VoteIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2147,7 +2147,7 @@ "name": "Voters", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2158,7 +2158,7 @@ "name": "Candidates", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2169,7 +2169,7 @@ "name": "CandidateCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [] @@ -2178,7 +2178,7 @@ "name": "NextFinalise", "modifier": 0, "type": { - "Type": "(BlockNumber,u32,Vec)" + "Plain": "(BlockNumber,u32,Vec)" }, "fallback": "0x00", "documentation": [ @@ -2189,7 +2189,7 @@ "name": "SnapshotedStakes", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2200,7 +2200,7 @@ "name": "Leaderboard", "modifier": 0, "type": { - "Type": "Vec<(Balance,AccountId)>" + "Plain": "Vec<(Balance,AccountId)>" }, "fallback": "0x00", "documentation": [ @@ -2286,7 +2286,7 @@ "name": "CooloffPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [] @@ -2295,7 +2295,7 @@ "name": "VotingPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0300000000000000", "documentation": [] @@ -2304,7 +2304,7 @@ "name": "EnactDelayPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -2315,7 +2315,7 @@ "name": "Proposals", "modifier": 1, "type": { - "Type": "Vec<(BlockNumber,Hash)>" + "Plain": "Vec<(BlockNumber,Hash)>" }, "fallback": "0x00", "documentation": [] @@ -2422,7 +2422,7 @@ "name": "Proposals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2461,7 +2461,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2501,7 +2501,7 @@ "name": "PendingChange", "modifier": 0, "type": { - "Type": "StoredPendingChange" + "Plain": "StoredPendingChange" }, "fallback": "0x00", "documentation": [] @@ -2610,7 +2610,7 @@ "name": "ProposalBond", "modifier": 1, "type": { - "Type": "Permill" + "Plain": "Permill" }, "fallback": "0x00000000", "documentation": [ @@ -2622,7 +2622,7 @@ "name": "ProposalBondMinimum", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2633,7 +2633,7 @@ "name": "SpendPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0100000000000000", "documentation": [ @@ -2644,7 +2644,7 @@ "name": "Burn", "modifier": 1, "type": { - "Type": "Permill" + "Plain": "Permill" }, "fallback": "0x00000000", "documentation": [ @@ -2655,7 +2655,7 @@ "name": "Pot", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2666,7 +2666,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "ProposalIndex" + "Plain": "ProposalIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2691,7 +2691,7 @@ "name": "Approvals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2811,7 +2811,7 @@ "name": "Key", "modifier": 1, "type": { - "Type": "AccountId" + "Plain": "AccountId" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [] diff --git a/packages/metadata/src/Metadata/v1/static-substrate.json b/packages/metadata/src/Metadata/v1/static-substrate.json index 43ee22d505..83a7b30868 100644 --- a/packages/metadata/src/Metadata/v1/static-substrate.json +++ b/packages/metadata/src/Metadata/v1/static-substrate.json @@ -23,7 +23,7 @@ "name": "ExtrinsicCount", "modifier": 0, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00", "documentation": [] @@ -32,7 +32,7 @@ "name": "AllExtrinsicsLen", "modifier": 0, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00", "documentation": [] @@ -65,7 +65,7 @@ "name": "RandomSeed", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [] @@ -74,7 +74,7 @@ "name": "Number", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -85,7 +85,7 @@ "name": "ParentHash", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [] @@ -94,7 +94,7 @@ "name": "ExtrinsicsRoot", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [] @@ -103,7 +103,7 @@ "name": "Digest", "modifier": 1, "type": { - "Type": "Digest" + "Plain": "Digest" }, "fallback": "0x00", "documentation": [] @@ -112,7 +112,7 @@ "name": "Events", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [] @@ -151,7 +151,7 @@ "name": "Now", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0000000000000000", "documentation": [ @@ -162,7 +162,7 @@ "name": "BlockPeriod", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0500000000000000", "documentation": [ @@ -173,7 +173,7 @@ "name": "DidUpdate", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -212,7 +212,7 @@ "name": "OriginalAuthorities", "modifier": 0, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [] @@ -302,7 +302,7 @@ "name": "NextEnumSet", "modifier": 1, "type": { - "Type": "AccountIndex" + "Plain": "AccountIndex" }, "fallback": "0x00000000", "documentation": [ @@ -349,7 +349,7 @@ "name": "TotalIssuance", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -360,7 +360,7 @@ "name": "ExistentialDeposit", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -371,7 +371,7 @@ "name": "TransferFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -382,7 +382,7 @@ "name": "CreationFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -547,7 +547,7 @@ "name": "Validators", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -558,7 +558,7 @@ "name": "SessionLength", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -569,7 +569,7 @@ "name": "CurrentIndex", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -580,7 +580,7 @@ "name": "CurrentStart", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0000000000000000", "documentation": [ @@ -591,7 +591,7 @@ "name": "ForcingNewSession", "modifier": 0, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -603,7 +603,7 @@ "name": "LastLengthChange", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [ @@ -628,7 +628,7 @@ "name": "NextSessionLength", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [ @@ -696,7 +696,7 @@ "name": "ValidatorCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -707,7 +707,7 @@ "name": "MinimumValidatorCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x04000000", "documentation": [ @@ -718,7 +718,7 @@ "name": "SessionsPerEra", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -729,7 +729,7 @@ "name": "SessionReward", "modifier": 1, "type": { - "Type": "Perbill" + "Plain": "Perbill" }, "fallback": "0x3c000000", "documentation": [ @@ -740,7 +740,7 @@ "name": "OfflineSlash", "modifier": 1, "type": { - "Type": "Perbill" + "Plain": "Perbill" }, "fallback": "0x40420f00", "documentation": [ @@ -751,7 +751,7 @@ "name": "OfflineSlashGrace", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -762,7 +762,7 @@ "name": "BondingDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -773,7 +773,7 @@ "name": "Invulerables", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [] @@ -782,7 +782,7 @@ "name": "Invulnerables", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -883,7 +883,7 @@ "name": "CurrentEra", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -894,7 +894,7 @@ "name": "CurrentSessionReward", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -905,7 +905,7 @@ "name": "CurrentOfflineSlash", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -916,7 +916,7 @@ "name": "CurrentEraReward", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -928,7 +928,7 @@ "name": "NextSessionsPerEra", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [ @@ -939,7 +939,7 @@ "name": "LastEraLengthChange", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -950,7 +950,7 @@ "name": "SlotStake", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -977,7 +977,7 @@ "name": "ForcingNewEra", "modifier": 0, "type": { - "Type": "Null" + "Plain": "Null" }, "fallback": "0x00", "documentation": [ @@ -988,7 +988,7 @@ "name": "RecentlyOffline", "modifier": 1, "type": { - "Type": "Vec<(AccountId,BlockNumber,u32)>" + "Plain": "Vec<(AccountId,BlockNumber,u32)>" }, "fallback": "0x00", "documentation": [ @@ -1244,7 +1244,7 @@ "name": "PublicPropCount", "modifier": 1, "type": { - "Type": "PropIndex" + "Plain": "PropIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1255,7 +1255,7 @@ "name": "PublicProps", "modifier": 1, "type": { - "Type": "Vec<(PropIndex,Proposal,AccountId)>" + "Plain": "Vec<(PropIndex,Proposal,AccountId)>" }, "fallback": "0x00", "documentation": [ @@ -1280,7 +1280,7 @@ "name": "LaunchPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -1291,7 +1291,7 @@ "name": "MinimumDeposit", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1302,7 +1302,7 @@ "name": "PublicDelay", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -1313,7 +1313,7 @@ "name": "MaxLockPeriods", "modifier": 1, "type": { - "Type": "LockPeriods" + "Plain": "LockPeriods" }, "fallback": "0x00", "documentation": [ @@ -1324,7 +1324,7 @@ "name": "VotingPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -1335,7 +1335,7 @@ "name": "ReferendumCount", "modifier": 1, "type": { - "Type": "ReferendumIndex" + "Plain": "ReferendumIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1346,7 +1346,7 @@ "name": "NextTally", "modifier": 1, "type": { - "Type": "ReferendumIndex" + "Plain": "ReferendumIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1572,7 +1572,7 @@ "name": "CandidacyBond", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x09000000000000000000000000000000", "documentation": [ @@ -1583,7 +1583,7 @@ "name": "VotingBond", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1594,7 +1594,7 @@ "name": "PresentSlashPerVoter", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x01000000000000000000000000000000", "documentation": [ @@ -1605,7 +1605,7 @@ "name": "CarryCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x02000000", "documentation": [ @@ -1616,7 +1616,7 @@ "name": "PresentationDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -1627,7 +1627,7 @@ "name": "InactiveGracePeriod", "modifier": 1, "type": { - "Type": "VoteIndex" + "Plain": "VoteIndex" }, "fallback": "0x01000000", "documentation": [ @@ -1639,7 +1639,7 @@ "name": "VotingPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -1650,7 +1650,7 @@ "name": "TermDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0500000000000000", "documentation": [ @@ -1661,7 +1661,7 @@ "name": "DesiredSeats", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -1672,7 +1672,7 @@ "name": "ActiveCouncil", "modifier": 1, "type": { - "Type": "Vec<(AccountId,BlockNumber)>" + "Plain": "Vec<(AccountId,BlockNumber)>" }, "fallback": "0x00", "documentation": [ @@ -1686,7 +1686,7 @@ "name": "VoteCount", "modifier": 1, "type": { - "Type": "VoteIndex" + "Plain": "VoteIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1741,7 +1741,7 @@ "name": "Voters", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1752,7 +1752,7 @@ "name": "Candidates", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1763,7 +1763,7 @@ "name": "CandidateCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [] @@ -1772,7 +1772,7 @@ "name": "NextFinalise", "modifier": 0, "type": { - "Type": "(BlockNumber,u32,Vec)" + "Plain": "(BlockNumber,u32,Vec)" }, "fallback": "0x00", "documentation": [ @@ -1783,7 +1783,7 @@ "name": "SnapshotedStakes", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1794,7 +1794,7 @@ "name": "Leaderboard", "modifier": 0, "type": { - "Type": "Vec<(BalanceOf,AccountId)>" + "Plain": "Vec<(BalanceOf,AccountId)>" }, "fallback": "0x00", "documentation": [ @@ -2000,7 +2000,7 @@ "name": "CooloffPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [] @@ -2009,7 +2009,7 @@ "name": "VotingPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0300000000000000", "documentation": [] @@ -2018,7 +2018,7 @@ "name": "EnactDelayPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -2029,7 +2029,7 @@ "name": "Proposals", "modifier": 1, "type": { - "Type": "Vec<(BlockNumber,Hash)>" + "Plain": "Vec<(BlockNumber,Hash)>" }, "fallback": "0x00", "documentation": [] @@ -2176,7 +2176,7 @@ "name": "Proposals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2215,7 +2215,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2343,7 +2343,7 @@ "name": "PendingChange", "modifier": 0, "type": { - "Type": "StoredPendingChange" + "Plain": "StoredPendingChange" }, "fallback": "0x00", "documentation": [] @@ -2352,7 +2352,7 @@ "name": "NextForced", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [] @@ -2392,7 +2392,7 @@ "name": "ProposalBond", "modifier": 1, "type": { - "Type": "Permill" + "Plain": "Permill" }, "fallback": "0x00000000", "documentation": [ @@ -2404,7 +2404,7 @@ "name": "ProposalBondMinimum", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2415,7 +2415,7 @@ "name": "SpendPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0100000000000000", "documentation": [ @@ -2426,7 +2426,7 @@ "name": "Burn", "modifier": 1, "type": { - "Type": "Permill" + "Plain": "Permill" }, "fallback": "0x00000000", "documentation": [ @@ -2437,7 +2437,7 @@ "name": "Pot", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2448,7 +2448,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "ProposalIndex" + "Plain": "ProposalIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2473,7 +2473,7 @@ "name": "Approvals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2620,7 +2620,7 @@ "name": "ContractFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x15000000000000000000000000000000", "documentation": [ @@ -2631,7 +2631,7 @@ "name": "CallBaseFee", "modifier": 1, "type": { - "Type": "Gas" + "Plain": "Gas" }, "fallback": "0x8700000000000000", "documentation": [ @@ -2642,7 +2642,7 @@ "name": "CreateBaseFee", "modifier": 1, "type": { - "Type": "Gas" + "Plain": "Gas" }, "fallback": "0xaf00000000000000", "documentation": [ @@ -2653,7 +2653,7 @@ "name": "GasPrice", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x01000000000000000000000000000000", "documentation": [ @@ -2664,7 +2664,7 @@ "name": "MaxDepth", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x64000000", "documentation": [ @@ -2675,7 +2675,7 @@ "name": "BlockGasLimit", "modifier": 1, "type": { - "Type": "Gas" + "Plain": "Gas" }, "fallback": "0x40420f0000000000", "documentation": [ @@ -2686,7 +2686,7 @@ "name": "GasSpent", "modifier": 1, "type": { - "Type": "Gas" + "Plain": "Gas" }, "fallback": "0x0000000000000000", "documentation": [ @@ -2697,7 +2697,7 @@ "name": "CurrentSchedule", "modifier": 1, "type": { - "Type": "Schedule" + "Plain": "Schedule" }, "fallback": "0x000000000100000000000000010000000000000001000000000000000100000000000000010000000000000001000000000000000000010010000000", "documentation": [ @@ -2896,7 +2896,7 @@ "name": "Key", "modifier": 1, "type": { - "Type": "AccountId" + "Plain": "AccountId" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [] @@ -2953,7 +2953,7 @@ "name": "TransactionBaseFee", "modifier": 1, "type": { - "Type": "AssetOf" + "Plain": "AssetOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2964,7 +2964,7 @@ "name": "TransactionByteFee", "modifier": 1, "type": { - "Type": "AssetOf" + "Plain": "AssetOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ diff --git a/packages/metadata/src/Metadata/v2/Storage.ts b/packages/metadata/src/Metadata/v2/Storage.ts index c8883082e2..a9f0289046 100644 --- a/packages/metadata/src/Metadata/v2/Storage.ts +++ b/packages/metadata/src/Metadata/v2/Storage.ts @@ -16,7 +16,7 @@ import Text from '@polkadot/types/primitive/Text'; export class StorageFunctionType extends Enum { constructor (registry: Registry, value?: any, index?: number) { super(registry, { - Type: 'PlainTypeV2', + Plain: 'PlainTypeV2', Map: 'MapTypeV2' }, value, index); } @@ -33,8 +33,8 @@ export class StorageFunctionType extends Enum { /** * @description The value as a [[Type]] value */ - public get asType (): PlainTypeV2 { - assert(this.isPlainType, `Cannot convert '${this.type}' via asType`); + public get asPlain (): PlainTypeV2 { + assert(this.isPlain, `Cannot convert '${this.type}' via asPlain`); return this.value as PlainTypeV2; } @@ -49,24 +49,9 @@ export class StorageFunctionType extends Enum { /** * @description `true` if the storage entry is a plain type */ - public get isPlainType (): boolean { + public get isPlain (): boolean { return this.toNumber() === 0; } - - /** - * @description Returns the string representation of the value - */ - public toString (): string { - if (this.isMap) { - if (this.asMap.linked.isTrue) { - return `(${this.asMap.value.toString()}, Linkage<${this.asMap.key.toString()}>)`; - } - - return this.asMap.value.toString(); - } - - return this.asType.toString(); - } } export interface StorageFunctionMetadataValue { diff --git a/packages/metadata/src/Metadata/v2/static-substrate.json b/packages/metadata/src/Metadata/v2/static-substrate.json index 313f6be5b4..11f7e82b79 100644 --- a/packages/metadata/src/Metadata/v2/static-substrate.json +++ b/packages/metadata/src/Metadata/v2/static-substrate.json @@ -24,7 +24,7 @@ "name": "ExtrinsicCount", "modifier": 0, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00", "documentation": [] @@ -33,7 +33,7 @@ "name": "AllExtrinsicsLen", "modifier": 0, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00", "documentation": [] @@ -68,7 +68,7 @@ "name": "RandomSeed", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [] @@ -77,7 +77,7 @@ "name": "Number", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -88,7 +88,7 @@ "name": "ParentHash", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [] @@ -97,7 +97,7 @@ "name": "ExtrinsicsRoot", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [] @@ -106,7 +106,7 @@ "name": "Digest", "modifier": 1, "type": { - "Type": "Digest" + "Plain": "Digest" }, "fallback": "0x00", "documentation": [] @@ -115,7 +115,7 @@ "name": "Events", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [] @@ -154,7 +154,7 @@ "name": "Now", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0000000000000000", "documentation": [ @@ -165,7 +165,7 @@ "name": "BlockPeriod", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0500000000000000", "documentation": [ @@ -176,7 +176,7 @@ "name": "DidUpdate", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -215,7 +215,7 @@ "name": "OriginalAuthorities", "modifier": 0, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [] @@ -305,7 +305,7 @@ "name": "NextEnumSet", "modifier": 1, "type": { - "Type": "AccountIndex" + "Plain": "AccountIndex" }, "fallback": "0x00000000", "documentation": [ @@ -353,7 +353,7 @@ "name": "TotalIssuance", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -364,7 +364,7 @@ "name": "ExistentialDeposit", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -375,7 +375,7 @@ "name": "TransferFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -386,7 +386,7 @@ "name": "CreationFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -397,7 +397,7 @@ "name": "TransactionBaseFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -408,7 +408,7 @@ "name": "TransactionByteFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -577,7 +577,7 @@ "name": "Validators", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -588,7 +588,7 @@ "name": "SessionLength", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -599,7 +599,7 @@ "name": "CurrentIndex", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -610,7 +610,7 @@ "name": "CurrentStart", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0000000000000000", "documentation": [ @@ -621,7 +621,7 @@ "name": "ForcingNewSession", "modifier": 0, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -633,7 +633,7 @@ "name": "LastLengthChange", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [ @@ -659,7 +659,7 @@ "name": "NextSessionLength", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [ @@ -727,7 +727,7 @@ "name": "ValidatorCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -738,7 +738,7 @@ "name": "MinimumValidatorCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x04000000", "documentation": [ @@ -749,7 +749,7 @@ "name": "SessionsPerEra", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -760,7 +760,7 @@ "name": "SessionReward", "modifier": 1, "type": { - "Type": "Perbill" + "Plain": "Perbill" }, "fallback": "0x3c000000", "documentation": [ @@ -771,7 +771,7 @@ "name": "OfflineSlash", "modifier": 1, "type": { - "Type": "Perbill" + "Plain": "Perbill" }, "fallback": "0x40420f00", "documentation": [ @@ -782,7 +782,7 @@ "name": "OfflineSlashGrace", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -793,7 +793,7 @@ "name": "BondingDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -804,7 +804,7 @@ "name": "Invulnerables", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -909,7 +909,7 @@ "name": "CurrentElected", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -920,7 +920,7 @@ "name": "CurrentEra", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -931,7 +931,7 @@ "name": "CurrentSessionReward", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -942,7 +942,7 @@ "name": "CurrentEraReward", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -954,7 +954,7 @@ "name": "NextSessionsPerEra", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [ @@ -965,7 +965,7 @@ "name": "LastEraLengthChange", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -976,7 +976,7 @@ "name": "SlotStake", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1004,7 +1004,7 @@ "name": "ForcingNewEra", "modifier": 0, "type": { - "Type": "Null" + "Plain": "Null" }, "fallback": "0x00", "documentation": [ @@ -1015,7 +1015,7 @@ "name": "RecentlyOffline", "modifier": 1, "type": { - "Type": "Vec<(AccountId,BlockNumber,u32)>" + "Plain": "Vec<(AccountId,BlockNumber,u32)>" }, "fallback": "0x00", "documentation": [ @@ -1289,7 +1289,7 @@ "name": "PublicPropCount", "modifier": 1, "type": { - "Type": "PropIndex" + "Plain": "PropIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1300,7 +1300,7 @@ "name": "PublicProps", "modifier": 1, "type": { - "Type": "Vec<(PropIndex,Proposal,AccountId)>" + "Plain": "Vec<(PropIndex,Proposal,AccountId)>" }, "fallback": "0x00", "documentation": [ @@ -1326,7 +1326,7 @@ "name": "LaunchPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -1337,7 +1337,7 @@ "name": "MinimumDeposit", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1348,7 +1348,7 @@ "name": "PublicDelay", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -1359,7 +1359,7 @@ "name": "MaxLockPeriods", "modifier": 1, "type": { - "Type": "LockPeriods" + "Plain": "LockPeriods" }, "fallback": "0x00", "documentation": [ @@ -1370,7 +1370,7 @@ "name": "VotingPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -1381,7 +1381,7 @@ "name": "ReferendumCount", "modifier": 1, "type": { - "Type": "ReferendumIndex" + "Plain": "ReferendumIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1392,7 +1392,7 @@ "name": "NextTally", "modifier": 1, "type": { - "Type": "ReferendumIndex" + "Plain": "ReferendumIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1675,7 +1675,7 @@ "name": "CandidacyBond", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x09000000000000000000000000000000", "documentation": [ @@ -1686,7 +1686,7 @@ "name": "VotingBond", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1697,7 +1697,7 @@ "name": "PresentSlashPerVoter", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x01000000000000000000000000000000", "documentation": [ @@ -1708,7 +1708,7 @@ "name": "CarryCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x02000000", "documentation": [ @@ -1719,7 +1719,7 @@ "name": "PresentationDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -1730,7 +1730,7 @@ "name": "InactiveGracePeriod", "modifier": 1, "type": { - "Type": "VoteIndex" + "Plain": "VoteIndex" }, "fallback": "0x01000000", "documentation": [ @@ -1742,7 +1742,7 @@ "name": "VotingPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -1753,7 +1753,7 @@ "name": "TermDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0500000000000000", "documentation": [ @@ -1764,7 +1764,7 @@ "name": "DesiredSeats", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -1775,7 +1775,7 @@ "name": "ActiveCouncil", "modifier": 1, "type": { - "Type": "Vec<(AccountId,BlockNumber)>" + "Plain": "Vec<(AccountId,BlockNumber)>" }, "fallback": "0x00", "documentation": [ @@ -1789,7 +1789,7 @@ "name": "VoteCount", "modifier": 1, "type": { - "Type": "VoteIndex" + "Plain": "VoteIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1847,7 +1847,7 @@ "name": "Voters", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1858,7 +1858,7 @@ "name": "Candidates", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1869,7 +1869,7 @@ "name": "CandidateCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [] @@ -1878,7 +1878,7 @@ "name": "NextFinalise", "modifier": 0, "type": { - "Type": "(BlockNumber,u32,Vec)" + "Plain": "(BlockNumber,u32,Vec)" }, "fallback": "0x00", "documentation": [ @@ -1889,7 +1889,7 @@ "name": "SnapshotedStakes", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1900,7 +1900,7 @@ "name": "Leaderboard", "modifier": 0, "type": { - "Type": "Vec<(BalanceOf,AccountId)>" + "Plain": "Vec<(BalanceOf,AccountId)>" }, "fallback": "0x00", "documentation": [ @@ -2106,7 +2106,7 @@ "name": "CooloffPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [] @@ -2115,7 +2115,7 @@ "name": "VotingPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0300000000000000", "documentation": [] @@ -2124,7 +2124,7 @@ "name": "EnactDelayPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -2135,7 +2135,7 @@ "name": "Proposals", "modifier": 1, "type": { - "Type": "Vec<(BlockNumber,Hash)>" + "Plain": "Vec<(BlockNumber,Hash)>" }, "fallback": "0x00", "documentation": [] @@ -2286,7 +2286,7 @@ "name": "Proposals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2327,7 +2327,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2455,7 +2455,7 @@ "name": "PendingChange", "modifier": 0, "type": { - "Type": "StoredPendingChange" + "Plain": "StoredPendingChange" }, "fallback": "0x00", "documentation": [] @@ -2464,7 +2464,7 @@ "name": "NextForced", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [] @@ -2504,7 +2504,7 @@ "name": "ProposalBond", "modifier": 1, "type": { - "Type": "Permill" + "Plain": "Permill" }, "fallback": "0x00000000", "documentation": [ @@ -2516,7 +2516,7 @@ "name": "ProposalBondMinimum", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2527,7 +2527,7 @@ "name": "SpendPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0100000000000000", "documentation": [ @@ -2538,7 +2538,7 @@ "name": "Burn", "modifier": 1, "type": { - "Type": "Permill" + "Plain": "Permill" }, "fallback": "0x00000000", "documentation": [ @@ -2549,7 +2549,7 @@ "name": "Pot", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2560,7 +2560,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "ProposalIndex" + "Plain": "ProposalIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2586,7 +2586,7 @@ "name": "Approvals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2733,7 +2733,7 @@ "name": "ContractFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x15000000000000000000000000000000", "documentation": [ @@ -2744,7 +2744,7 @@ "name": "CallBaseFee", "modifier": 1, "type": { - "Type": "Gas" + "Plain": "Gas" }, "fallback": "0x8700000000000000", "documentation": [ @@ -2755,7 +2755,7 @@ "name": "CreateBaseFee", "modifier": 1, "type": { - "Type": "Gas" + "Plain": "Gas" }, "fallback": "0xaf00000000000000", "documentation": [ @@ -2766,7 +2766,7 @@ "name": "GasPrice", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x01000000000000000000000000000000", "documentation": [ @@ -2777,7 +2777,7 @@ "name": "MaxDepth", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x64000000", "documentation": [ @@ -2788,7 +2788,7 @@ "name": "BlockGasLimit", "modifier": 1, "type": { - "Type": "Gas" + "Plain": "Gas" }, "fallback": "0x40420f0000000000", "documentation": [ @@ -2799,7 +2799,7 @@ "name": "GasSpent", "modifier": 1, "type": { - "Type": "Gas" + "Plain": "Gas" }, "fallback": "0x0000000000000000", "documentation": [ @@ -2810,7 +2810,7 @@ "name": "CurrentSchedule", "modifier": 1, "type": { - "Type": "Schedule" + "Plain": "Schedule" }, "fallback": "0x000000000100000000000000010000000000000001000000000000000100000000000000010000000000000001000000000000000000010010000000", "documentation": [ @@ -2866,7 +2866,7 @@ "name": "AccountCounter", "modifier": 1, "type": { - "Type": "u64" + "Plain": "u64" }, "fallback": "0x0000000000000000", "documentation": [ @@ -3038,7 +3038,7 @@ "name": "Key", "modifier": 1, "type": { - "Type": "AccountId" + "Plain": "AccountId" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [] diff --git a/packages/metadata/src/Metadata/v3/Storage.ts b/packages/metadata/src/Metadata/v3/Storage.ts index d1fec3adcb..039f870659 100644 --- a/packages/metadata/src/Metadata/v3/Storage.ts +++ b/packages/metadata/src/Metadata/v3/Storage.ts @@ -16,7 +16,7 @@ import Text from '@polkadot/types/primitive/Text'; export class StorageFunctionType extends Enum { constructor (registry: Registry, value?: any, index?: number) { super(registry, { - Type: 'PlainTypeV3', + Plain: 'PlainTypeV3', Map: 'MapTypeV3', DoubleMap: 'DoubleMapTypeV3' }, value, index); @@ -43,8 +43,8 @@ export class StorageFunctionType extends Enum { /** * @description The value as a [[Type]] value */ - public get asType (): PlainTypeV3 { - assert(this.isPlainType, `Cannot convert '${this.type}' via asType`); + public get asPlain (): PlainTypeV3 { + assert(this.isPlain, `Cannot convert '${this.type}' via asPlain`); return this.value as PlainTypeV3; } @@ -66,28 +66,9 @@ export class StorageFunctionType extends Enum { /** * @description `true` if the storage entry is a plain type */ - public get isPlainType (): boolean { + public get isPlain (): boolean { return this.toNumber() === 0; } - - /** - * @description Returns the string representation of the value - */ - public toString (): string { - if (this.isDoubleMap) { - return `DoubleMap<${this.asDoubleMap.toString()}>`; - } - - if (this.isMap) { - if (this.asMap.linked.isTrue) { - return `(${this.asMap.value.toString()}, Linkage<${this.asMap.key.toString()}>)`; - } - - return this.asMap.value.toString(); - } - - return this.asType.toString(); - } } export interface StorageFunctionMetadataValue { diff --git a/packages/metadata/src/Metadata/v3/static-substrate.json b/packages/metadata/src/Metadata/v3/static-substrate.json index e729afc278..33d3cfd157 100644 --- a/packages/metadata/src/Metadata/v3/static-substrate.json +++ b/packages/metadata/src/Metadata/v3/static-substrate.json @@ -26,7 +26,7 @@ "name": "ExtrinsicCount", "modifier": 0, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00", "documentation": [ @@ -37,7 +37,7 @@ "name": "AllExtrinsicsLen", "modifier": 0, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00", "documentation": [ @@ -78,7 +78,7 @@ "name": "RandomSeed", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ @@ -89,7 +89,7 @@ "name": "Number", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -100,7 +100,7 @@ "name": "ParentHash", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ @@ -111,7 +111,7 @@ "name": "ExtrinsicsRoot", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ @@ -122,7 +122,7 @@ "name": "Digest", "modifier": 1, "type": { - "Type": "Digest" + "Plain": "Digest" }, "fallback": "0x00", "documentation": [ @@ -133,7 +133,7 @@ "name": "Events", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -174,7 +174,7 @@ "name": "Now", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0000000000000000", "documentation": [ @@ -185,7 +185,7 @@ "name": "BlockPeriod", "modifier": 0, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x00", "documentation": [ @@ -196,7 +196,7 @@ "name": "MinimumPeriod", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0300000000000000", "documentation": [ @@ -210,7 +210,7 @@ "name": "DidUpdate", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -249,7 +249,7 @@ "name": "OriginalAuthorities", "modifier": 0, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [] @@ -351,7 +351,7 @@ "name": "NextEnumSet", "modifier": 1, "type": { - "Type": "AccountIndex" + "Plain": "AccountIndex" }, "fallback": "0x00000000", "documentation": [ @@ -399,7 +399,7 @@ "name": "TotalIssuance", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -410,7 +410,7 @@ "name": "ExistentialDeposit", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -421,7 +421,7 @@ "name": "TransferFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -432,7 +432,7 @@ "name": "CreationFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -443,7 +443,7 @@ "name": "TransactionBaseFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -454,7 +454,7 @@ "name": "TransactionByteFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -636,7 +636,7 @@ "name": "Validators", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -647,7 +647,7 @@ "name": "SessionLength", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -658,7 +658,7 @@ "name": "CurrentIndex", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -669,7 +669,7 @@ "name": "CurrentStart", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0000000000000000", "documentation": [ @@ -680,7 +680,7 @@ "name": "ForcingNewSession", "modifier": 0, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -692,7 +692,7 @@ "name": "LastLengthChange", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [ @@ -718,7 +718,7 @@ "name": "NextSessionLength", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [ @@ -786,7 +786,7 @@ "name": "ValidatorCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -797,7 +797,7 @@ "name": "MinimumValidatorCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x04000000", "documentation": [ @@ -808,7 +808,7 @@ "name": "SessionsPerEra", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -819,7 +819,7 @@ "name": "SessionReward", "modifier": 1, "type": { - "Type": "Perbill" + "Plain": "Perbill" }, "fallback": "0x3c000000", "documentation": [ @@ -830,7 +830,7 @@ "name": "OfflineSlash", "modifier": 1, "type": { - "Type": "Perbill" + "Plain": "Perbill" }, "fallback": "0x40420f00", "documentation": [ @@ -841,7 +841,7 @@ "name": "OfflineSlashGrace", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -852,7 +852,7 @@ "name": "BondingDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -863,7 +863,7 @@ "name": "Invulnerables", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -968,7 +968,7 @@ "name": "CurrentElected", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -979,7 +979,7 @@ "name": "CurrentEra", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -990,7 +990,7 @@ "name": "CurrentSessionReward", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1001,7 +1001,7 @@ "name": "CurrentEraReward", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1013,7 +1013,7 @@ "name": "NextSessionsPerEra", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [ @@ -1024,7 +1024,7 @@ "name": "LastEraLengthChange", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -1035,7 +1035,7 @@ "name": "SlotStake", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1063,7 +1063,7 @@ "name": "ForcingNewEra", "modifier": 0, "type": { - "Type": "Null" + "Plain": "Null" }, "fallback": "0x00", "documentation": [ @@ -1074,7 +1074,7 @@ "name": "RecentlyOffline", "modifier": 1, "type": { - "Type": "Vec<(AccountId,BlockNumber,u32)>" + "Plain": "Vec<(AccountId,BlockNumber,u32)>" }, "fallback": "0x00", "documentation": [ @@ -1348,7 +1348,7 @@ "name": "PublicPropCount", "modifier": 1, "type": { - "Type": "PropIndex" + "Plain": "PropIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1359,7 +1359,7 @@ "name": "PublicProps", "modifier": 1, "type": { - "Type": "Vec<(PropIndex,Proposal,AccountId)>" + "Plain": "Vec<(PropIndex,Proposal,AccountId)>" }, "fallback": "0x00", "documentation": [ @@ -1385,7 +1385,7 @@ "name": "LaunchPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -1396,7 +1396,7 @@ "name": "MinimumDeposit", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1407,7 +1407,7 @@ "name": "PublicDelay", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -1418,7 +1418,7 @@ "name": "MaxLockPeriods", "modifier": 1, "type": { - "Type": "LockPeriods" + "Plain": "LockPeriods" }, "fallback": "0x00", "documentation": [ @@ -1429,7 +1429,7 @@ "name": "VotingPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -1440,7 +1440,7 @@ "name": "ReferendumCount", "modifier": 1, "type": { - "Type": "ReferendumIndex" + "Plain": "ReferendumIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1451,7 +1451,7 @@ "name": "NextTally", "modifier": 1, "type": { - "Type": "ReferendumIndex" + "Plain": "ReferendumIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1734,7 +1734,7 @@ "name": "CandidacyBond", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x09000000000000000000000000000000", "documentation": [ @@ -1745,7 +1745,7 @@ "name": "VotingBond", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1756,7 +1756,7 @@ "name": "PresentSlashPerVoter", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x01000000000000000000000000000000", "documentation": [ @@ -1767,7 +1767,7 @@ "name": "CarryCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x02000000", "documentation": [ @@ -1778,7 +1778,7 @@ "name": "PresentationDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -1789,7 +1789,7 @@ "name": "InactiveGracePeriod", "modifier": 1, "type": { - "Type": "VoteIndex" + "Plain": "VoteIndex" }, "fallback": "0x01000000", "documentation": [ @@ -1801,7 +1801,7 @@ "name": "VotingPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -1812,7 +1812,7 @@ "name": "TermDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0500000000000000", "documentation": [ @@ -1823,7 +1823,7 @@ "name": "DesiredSeats", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -1834,7 +1834,7 @@ "name": "ActiveCouncil", "modifier": 1, "type": { - "Type": "Vec<(AccountId,BlockNumber)>" + "Plain": "Vec<(AccountId,BlockNumber)>" }, "fallback": "0x00", "documentation": [ @@ -1848,7 +1848,7 @@ "name": "VoteCount", "modifier": 1, "type": { - "Type": "VoteIndex" + "Plain": "VoteIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1906,7 +1906,7 @@ "name": "Voters", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1917,7 +1917,7 @@ "name": "Candidates", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1928,7 +1928,7 @@ "name": "CandidateCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [] @@ -1937,7 +1937,7 @@ "name": "NextFinalize", "modifier": 0, "type": { - "Type": "(BlockNumber,u32,Vec)" + "Plain": "(BlockNumber,u32,Vec)" }, "fallback": "0x00", "documentation": [ @@ -1948,7 +1948,7 @@ "name": "SnapshotedStakes", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1959,7 +1959,7 @@ "name": "Leaderboard", "modifier": 0, "type": { - "Type": "Vec<(BalanceOf,AccountId)>" + "Plain": "Vec<(BalanceOf,AccountId)>" }, "fallback": "0x00", "documentation": [ @@ -2165,7 +2165,7 @@ "name": "CooloffPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [] @@ -2174,7 +2174,7 @@ "name": "VotingPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0300000000000000", "documentation": [] @@ -2183,7 +2183,7 @@ "name": "EnactDelayPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -2194,7 +2194,7 @@ "name": "Proposals", "modifier": 1, "type": { - "Type": "Vec<(BlockNumber,Hash)>" + "Plain": "Vec<(BlockNumber,Hash)>" }, "fallback": "0x00", "documentation": [] @@ -2345,7 +2345,7 @@ "name": "Proposals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2386,7 +2386,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2514,7 +2514,7 @@ "name": "PendingChange", "modifier": 0, "type": { - "Type": "StoredPendingChange" + "Plain": "StoredPendingChange" }, "fallback": "0x00", "documentation": [] @@ -2523,7 +2523,7 @@ "name": "NextForced", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [] @@ -2563,7 +2563,7 @@ "name": "ProposalBond", "modifier": 1, "type": { - "Type": "Permill" + "Plain": "Permill" }, "fallback": "0x00000000", "documentation": [ @@ -2575,7 +2575,7 @@ "name": "ProposalBondMinimum", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2586,7 +2586,7 @@ "name": "SpendPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0100000000000000", "documentation": [ @@ -2597,7 +2597,7 @@ "name": "Burn", "modifier": 1, "type": { - "Type": "Permill" + "Plain": "Permill" }, "fallback": "0x00000000", "documentation": [ @@ -2608,7 +2608,7 @@ "name": "Pot", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2619,7 +2619,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "ProposalIndex" + "Plain": "ProposalIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2645,7 +2645,7 @@ "name": "Approvals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2792,7 +2792,7 @@ "name": "TransferFee", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2803,7 +2803,7 @@ "name": "CreationFee", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2814,7 +2814,7 @@ "name": "TransactionBaseFee", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2825,7 +2825,7 @@ "name": "TransactionByteFee", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2836,7 +2836,7 @@ "name": "ContractFee", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x15000000000000000000000000000000", "documentation": [ @@ -2847,7 +2847,7 @@ "name": "CallBaseFee", "modifier": 1, "type": { - "Type": "Gas" + "Plain": "Gas" }, "fallback": "0x8700000000000000", "documentation": [ @@ -2858,7 +2858,7 @@ "name": "CreateBaseFee", "modifier": 1, "type": { - "Type": "Gas" + "Plain": "Gas" }, "fallback": "0xaf00000000000000", "documentation": [ @@ -2869,7 +2869,7 @@ "name": "GasPrice", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x01000000000000000000000000000000", "documentation": [ @@ -2880,7 +2880,7 @@ "name": "MaxDepth", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x64000000", "documentation": [ @@ -2891,7 +2891,7 @@ "name": "BlockGasLimit", "modifier": 1, "type": { - "Type": "Gas" + "Plain": "Gas" }, "fallback": "0x40420f0000000000", "documentation": [ @@ -2902,7 +2902,7 @@ "name": "GasSpent", "modifier": 1, "type": { - "Type": "Gas" + "Plain": "Gas" }, "fallback": "0x0000000000000000", "documentation": [ @@ -2913,7 +2913,7 @@ "name": "CurrentSchedule", "modifier": 1, "type": { - "Type": "Schedule" + "Plain": "Schedule" }, "fallback": "0x000000000100000000000000010000000000000001000000000000000100000000000000010000000000000001000000000000000000010010000000", "documentation": [ @@ -2969,7 +2969,7 @@ "name": "AccountCounter", "modifier": 1, "type": { - "Type": "u64" + "Plain": "u64" }, "fallback": "0x0000000000000000", "documentation": [ @@ -3149,7 +3149,7 @@ "name": "Key", "modifier": 1, "type": { - "Type": "AccountId" + "Plain": "AccountId" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [] diff --git a/packages/metadata/src/Metadata/v3/toV4.ts b/packages/metadata/src/Metadata/v3/toV4.ts index 2648e695b5..6eb8eb69ea 100644 --- a/packages/metadata/src/Metadata/v3/toV4.ts +++ b/packages/metadata/src/Metadata/v3/toV4.ts @@ -22,8 +22,8 @@ function toV4StorageFunction (registry: Registry, storageFn: StorageFunctionMeta // Convert the old type to the new type: there is one new field // called `hasher`, which we initialize to xxHash (the default in // v3). - const [newType, index] = type.isPlainType - ? [type, 0] + const [newType, index] = type.isPlain + ? [type.asPlain, 0] : type.isMap ? [createType(registry, 'MapTypeV4', { hasher: new StorageHasher(registry, 'Twox128'), diff --git a/packages/metadata/src/Metadata/v4/Storage.ts b/packages/metadata/src/Metadata/v4/Storage.ts index fd162aee06..4f7e5fc69b 100644 --- a/packages/metadata/src/Metadata/v4/Storage.ts +++ b/packages/metadata/src/Metadata/v4/Storage.ts @@ -16,7 +16,7 @@ import Text from '@polkadot/types/primitive/Text'; export class StorageFunctionType extends Enum { constructor (registry: Registry, value?: any, index?: number) { super(registry, { - Type: 'PlainTypeV4', + Plain: 'PlainTypeV4', Map: 'MapTypeV4', DoubleMap: 'DoubleMapTypeV4' }, value, index); @@ -43,8 +43,8 @@ export class StorageFunctionType extends Enum { /** * @description The value as a [[Type]] value */ - public get asType (): PlainTypeV4 { - assert(this.isPlainType, `Cannot convert '${this.type}' via asType`); + public get asPlain (): PlainTypeV4 { + assert(this.isPlain, `Cannot convert '${this.type}' via asPlain`); return this.value as PlainTypeV4; } @@ -66,28 +66,9 @@ export class StorageFunctionType extends Enum { /** * @description `true` if the storage entry is a plain type */ - public get isPlainType (): boolean { + public get isPlain (): boolean { return this.toNumber() === 0; } - - /** - * @description Returns the string representation of the value - */ - public toString (): string { - if (this.isDoubleMap) { - return `DoubleMap<${this.asDoubleMap.value.toString()}>`; - } - - if (this.isMap) { - if (this.asMap.linked.isTrue) { - return `(${this.asMap.value.toString()}, Linkage<${this.asMap.key.toString()}>)`; - } - - return this.asMap.value.toString(); - } - - return this.asType.toString(); - } } export interface StorageFunctionMetadataValue { diff --git a/packages/metadata/src/Metadata/v4/static-substrate.json b/packages/metadata/src/Metadata/v4/static-substrate.json index d313b3cc36..cd6e2cf792 100644 --- a/packages/metadata/src/Metadata/v4/static-substrate.json +++ b/packages/metadata/src/Metadata/v4/static-substrate.json @@ -27,7 +27,7 @@ "name": "ExtrinsicCount", "modifier": 0, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00", "documentation": [ @@ -38,7 +38,7 @@ "name": "AllExtrinsicsLen", "modifier": 0, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00", "documentation": [ @@ -81,7 +81,7 @@ "name": "RandomMaterial", "modifier": 1, "type": { - "Type": "(i8,Vec)" + "Plain": "(i8,Vec)" }, "fallback": "0x0000", "documentation": [ @@ -93,7 +93,7 @@ "name": "Number", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -104,7 +104,7 @@ "name": "ParentHash", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ @@ -115,7 +115,7 @@ "name": "ExtrinsicsRoot", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ @@ -126,7 +126,7 @@ "name": "Digest", "modifier": 1, "type": { - "Type": "Digest" + "Plain": "Digest" }, "fallback": "0x00", "documentation": [ @@ -137,7 +137,7 @@ "name": "Events", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -148,7 +148,7 @@ "name": "EventCount", "modifier": 1, "type": { - "Type": "EventIndex" + "Plain": "EventIndex" }, "fallback": "0x00000000", "documentation": [ @@ -218,7 +218,7 @@ "name": "Now", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0000000000000000", "documentation": [ @@ -229,7 +229,7 @@ "name": "BlockPeriod", "modifier": 0, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x00", "documentation": [ @@ -240,7 +240,7 @@ "name": "MinimumPeriod", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0300000000000000", "documentation": [ @@ -254,7 +254,7 @@ "name": "DidUpdate", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -293,7 +293,7 @@ "name": "OriginalAuthorities", "modifier": 0, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [] @@ -395,7 +395,7 @@ "name": "NextEnumSet", "modifier": 1, "type": { - "Type": "AccountIndex" + "Plain": "AccountIndex" }, "fallback": "0x00000000", "documentation": [ @@ -444,7 +444,7 @@ "name": "TotalIssuance", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -455,7 +455,7 @@ "name": "ExistentialDeposit", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -466,7 +466,7 @@ "name": "TransferFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -477,7 +477,7 @@ "name": "CreationFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -488,7 +488,7 @@ "name": "TransactionBaseFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -499,7 +499,7 @@ "name": "TransactionByteFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -685,7 +685,7 @@ "name": "Validators", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -696,7 +696,7 @@ "name": "SessionLength", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -707,7 +707,7 @@ "name": "CurrentIndex", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -718,7 +718,7 @@ "name": "CurrentStart", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0000000000000000", "documentation": [ @@ -729,7 +729,7 @@ "name": "ForcingNewSession", "modifier": 0, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -742,7 +742,7 @@ "name": "LastLengthChange", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [ @@ -769,7 +769,7 @@ "name": "NextSessionLength", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [ @@ -837,7 +837,7 @@ "name": "ValidatorCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -848,7 +848,7 @@ "name": "MinimumValidatorCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x04000000", "documentation": [ @@ -859,7 +859,7 @@ "name": "SessionsPerEra", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -870,7 +870,7 @@ "name": "SessionReward", "modifier": 1, "type": { - "Type": "Perbill" + "Plain": "Perbill" }, "fallback": "0x3c000000", "documentation": [ @@ -881,7 +881,7 @@ "name": "OfflineSlash", "modifier": 1, "type": { - "Type": "Perbill" + "Plain": "Perbill" }, "fallback": "0x40420f00", "documentation": [ @@ -892,7 +892,7 @@ "name": "OfflineSlashGrace", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -903,7 +903,7 @@ "name": "BondingDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0c00000000000000", "documentation": [ @@ -914,7 +914,7 @@ "name": "Invulnerables", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1025,7 +1025,7 @@ "name": "CurrentElected", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1036,7 +1036,7 @@ "name": "CurrentEra", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -1047,7 +1047,7 @@ "name": "CurrentSessionReward", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1058,7 +1058,7 @@ "name": "CurrentEraReward", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1070,7 +1070,7 @@ "name": "NextSessionsPerEra", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [ @@ -1081,7 +1081,7 @@ "name": "LastEraLengthChange", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -1092,7 +1092,7 @@ "name": "SlotStake", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1121,7 +1121,7 @@ "name": "ForcingNewEra", "modifier": 0, "type": { - "Type": "Null" + "Plain": "Null" }, "fallback": "0x00", "documentation": [ @@ -1132,7 +1132,7 @@ "name": "RecentlyOffline", "modifier": 1, "type": { - "Type": "Vec<(AccountId,BlockNumber,u32)>" + "Plain": "Vec<(AccountId,BlockNumber,u32)>" }, "fallback": "0x00", "documentation": [ @@ -1410,7 +1410,7 @@ "name": "PublicPropCount", "modifier": 1, "type": { - "Type": "PropIndex" + "Plain": "PropIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1421,7 +1421,7 @@ "name": "PublicProps", "modifier": 1, "type": { - "Type": "Vec<(PropIndex,Proposal,AccountId)>" + "Plain": "Vec<(PropIndex,Proposal,AccountId)>" }, "fallback": "0x00", "documentation": [ @@ -1448,7 +1448,7 @@ "name": "ReferendumCount", "modifier": 1, "type": { - "Type": "ReferendumIndex" + "Plain": "ReferendumIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1459,7 +1459,7 @@ "name": "NextTally", "modifier": 1, "type": { - "Type": "ReferendumIndex" + "Plain": "ReferendumIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1570,7 +1570,7 @@ "name": "LastTabledWasExternal", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -1582,7 +1582,7 @@ "name": "NextExternal", "modifier": 0, "type": { - "Type": "(Proposal,VoteThreshold)" + "Plain": "(Proposal,VoteThreshold)" }, "fallback": "0x00", "documentation": [ @@ -1950,7 +1950,7 @@ "name": "CandidacyBond", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x09000000000000000000000000000000", "documentation": [ @@ -1961,7 +1961,7 @@ "name": "VotingBond", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1972,7 +1972,7 @@ "name": "PresentSlashPerVoter", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x01000000000000000000000000000000", "documentation": [ @@ -1983,7 +1983,7 @@ "name": "CarryCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x02000000", "documentation": [ @@ -1994,7 +1994,7 @@ "name": "PresentationDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -2005,7 +2005,7 @@ "name": "InactiveGracePeriod", "modifier": 1, "type": { - "Type": "VoteIndex" + "Plain": "VoteIndex" }, "fallback": "0x01000000", "documentation": [ @@ -2017,7 +2017,7 @@ "name": "VotingPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -2028,7 +2028,7 @@ "name": "TermDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0500000000000000", "documentation": [ @@ -2039,7 +2039,7 @@ "name": "DesiredSeats", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2050,7 +2050,7 @@ "name": "ActiveCouncil", "modifier": 1, "type": { - "Type": "Vec<(AccountId,BlockNumber)>" + "Plain": "Vec<(AccountId,BlockNumber)>" }, "fallback": "0x00", "documentation": [ @@ -2064,7 +2064,7 @@ "name": "VoteCount", "modifier": 1, "type": { - "Type": "VoteIndex" + "Plain": "VoteIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2125,7 +2125,7 @@ "name": "Voters", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2136,7 +2136,7 @@ "name": "Candidates", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2147,7 +2147,7 @@ "name": "CandidateCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [] @@ -2156,7 +2156,7 @@ "name": "NextFinalize", "modifier": 0, "type": { - "Type": "(BlockNumber,u32,Vec)" + "Plain": "(BlockNumber,u32,Vec)" }, "fallback": "0x00", "documentation": [ @@ -2167,7 +2167,7 @@ "name": "SnapshotedStakes", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2178,7 +2178,7 @@ "name": "Leaderboard", "modifier": 0, "type": { - "Type": "Vec<(BalanceOf,AccountId)>" + "Plain": "Vec<(BalanceOf,AccountId)>" }, "fallback": "0x00", "documentation": [ @@ -2402,7 +2402,7 @@ "name": "Proposals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2445,7 +2445,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2598,7 +2598,7 @@ "name": "PendingChange", "modifier": 0, "type": { - "Type": "StoredPendingChange" + "Plain": "StoredPendingChange" }, "fallback": "0x00", "documentation": [] @@ -2607,7 +2607,7 @@ "name": "NextForced", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [] @@ -2647,7 +2647,7 @@ "name": "ProposalBond", "modifier": 1, "type": { - "Type": "Permill" + "Plain": "Permill" }, "fallback": "0x00000000", "documentation": [ @@ -2659,7 +2659,7 @@ "name": "ProposalBondMinimum", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2670,7 +2670,7 @@ "name": "SpendPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0100000000000000", "documentation": [ @@ -2681,7 +2681,7 @@ "name": "Burn", "modifier": 1, "type": { - "Type": "Permill" + "Plain": "Permill" }, "fallback": "0x00000000", "documentation": [ @@ -2692,7 +2692,7 @@ "name": "Pot", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2703,7 +2703,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "ProposalIndex" + "Plain": "ProposalIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2730,7 +2730,7 @@ "name": "Approvals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2877,7 +2877,7 @@ "name": "SignedClaimHandicap", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -2891,7 +2891,7 @@ "name": "TombstoneDeposit", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2902,7 +2902,7 @@ "name": "StorageSizeOffset", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2914,7 +2914,7 @@ "name": "RentByteFee", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2925,7 +2925,7 @@ "name": "RentDepositOffset", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2942,7 +2942,7 @@ "name": "SurchargeReward", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2954,7 +2954,7 @@ "name": "TransferFee", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2965,7 +2965,7 @@ "name": "CreationFee", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2976,7 +2976,7 @@ "name": "TransactionBaseFee", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2987,7 +2987,7 @@ "name": "TransactionByteFee", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2998,7 +2998,7 @@ "name": "ContractFee", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x15000000000000000000000000000000", "documentation": [ @@ -3009,7 +3009,7 @@ "name": "CallBaseFee", "modifier": 1, "type": { - "Type": "Gas" + "Plain": "Gas" }, "fallback": "0x8700000000000000", "documentation": [ @@ -3020,7 +3020,7 @@ "name": "CreateBaseFee", "modifier": 1, "type": { - "Type": "Gas" + "Plain": "Gas" }, "fallback": "0xaf00000000000000", "documentation": [ @@ -3031,7 +3031,7 @@ "name": "GasPrice", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x01000000000000000000000000000000", "documentation": [ @@ -3042,7 +3042,7 @@ "name": "MaxDepth", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x64000000", "documentation": [ @@ -3053,7 +3053,7 @@ "name": "BlockGasLimit", "modifier": 1, "type": { - "Type": "Gas" + "Plain": "Gas" }, "fallback": "0x8096980000000000", "documentation": [ @@ -3064,7 +3064,7 @@ "name": "GasSpent", "modifier": 1, "type": { - "Type": "Gas" + "Plain": "Gas" }, "fallback": "0x0000000000000000", "documentation": [ @@ -3075,7 +3075,7 @@ "name": "CurrentSchedule", "modifier": 1, "type": { - "Type": "Schedule" + "Plain": "Schedule" }, "fallback": "0x000000000100000000000000010000000000000001000000000000000100000000000000010000000000000001000000000000000100000000000000010000000000000001000000000000000400000000000100100000000020000000", "documentation": [ @@ -3118,7 +3118,7 @@ "name": "AccountCounter", "modifier": 1, "type": { - "Type": "u64" + "Plain": "u64" }, "fallback": "0x0000000000000000", "documentation": [ @@ -3358,7 +3358,7 @@ "name": "Key", "modifier": 1, "type": { - "Type": "AccountId" + "Plain": "AccountId" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ diff --git a/packages/metadata/src/Metadata/v4/toV5.ts b/packages/metadata/src/Metadata/v4/toV5.ts index 6b30d930c0..0ce789601d 100644 --- a/packages/metadata/src/Metadata/v4/toV5.ts +++ b/packages/metadata/src/Metadata/v4/toV5.ts @@ -36,8 +36,8 @@ function toStorageHasher (registry: Registry, text: Text): StorageHasher { */ function toV5StorageFunction (registry: Registry, storageFn: StorageFunctionMetadataV4): StorageFunctionMetadata { const { documentation, fallback, modifier, name, type } = storageFn; - const [newType, index] = type.isPlainType - ? [type, 0] + const [newType, index] = type.isPlain + ? [type.asPlain, 0] : type.isMap ? [type.asMap, 1] : [createType(registry, 'DoubleMapTypeV5', { diff --git a/packages/metadata/src/Metadata/v5/Storage.ts b/packages/metadata/src/Metadata/v5/Storage.ts index 4ca0908aa0..fe016a0401 100644 --- a/packages/metadata/src/Metadata/v5/Storage.ts +++ b/packages/metadata/src/Metadata/v5/Storage.ts @@ -16,7 +16,7 @@ import Text from '@polkadot/types/primitive/Text'; export class StorageFunctionType extends Enum { constructor (registry: Registry, value?: any, index?: number) { super(registry, { - Type: 'PlainTypeV5', + Plain: 'PlainTypeV5', Map: 'MapTypeV5', DoubleMap: 'DoubleMapTypeV5' }, value, index); @@ -43,8 +43,8 @@ export class StorageFunctionType extends Enum { /** * @description The value as a [[Type]] value */ - public get asType (): PlainTypeV5 { - assert(this.isPlainType, `Cannot convert '${this.type}' via asType`); + public get asPlain (): PlainTypeV5 { + assert(this.isPlain, `Cannot convert '${this.type}' via asPlain`); return this.value as PlainTypeV5; } @@ -66,28 +66,9 @@ export class StorageFunctionType extends Enum { /** * @description `true` if the storage entry is a plain type */ - public get isPlainType (): boolean { + public get isPlain (): boolean { return this.toNumber() === 0; } - - /** - * @description Returns the string representation of the value - */ - public toString (): string { - if (this.isDoubleMap) { - return `DoubleMap<${this.asDoubleMap.value.toString()}>`; - } - - if (this.isMap) { - if (this.asMap.linked.isTrue) { - return `(${this.asMap.value.toString()}, Linkage<${this.asMap.key.toString()}>)`; - } - - return this.asMap.value.toString(); - } - - return this.asType.toString(); - } } export interface StorageFunctionMetadataValue { diff --git a/packages/metadata/src/Metadata/v5/static-polkadot.json b/packages/metadata/src/Metadata/v5/static-polkadot.json index 7af1295a2c..1a5f49f875 100644 --- a/packages/metadata/src/Metadata/v5/static-polkadot.json +++ b/packages/metadata/src/Metadata/v5/static-polkadot.json @@ -27,7 +27,7 @@ "name": "ExtrinsicCount", "modifier": 0, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00", "documentation": [ @@ -38,7 +38,7 @@ "name": "AllExtrinsicsWeight", "modifier": 0, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00", "documentation": [ @@ -81,7 +81,7 @@ "name": "RandomMaterial", "modifier": 1, "type": { - "Type": "(i8,Vec)" + "Plain": "(i8,Vec)" }, "fallback": "0x0000", "documentation": [ @@ -93,7 +93,7 @@ "name": "Number", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -104,7 +104,7 @@ "name": "ParentHash", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ @@ -115,7 +115,7 @@ "name": "ExtrinsicsRoot", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ @@ -126,7 +126,7 @@ "name": "Digest", "modifier": 1, "type": { - "Type": "DigestOf" + "Plain": "DigestOf" }, "fallback": "0x00", "documentation": [ @@ -137,7 +137,7 @@ "name": "Events", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -148,7 +148,7 @@ "name": "EventCount", "modifier": 1, "type": { - "Type": "EventIndex" + "Plain": "EventIndex" }, "fallback": "0x00000000", "documentation": [ @@ -218,7 +218,7 @@ "name": "Now", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0000000000000000", "documentation": [ @@ -229,7 +229,7 @@ "name": "BlockPeriod", "modifier": 0, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x00", "documentation": [ @@ -240,7 +240,7 @@ "name": "MinimumPeriod", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0300000000000000", "documentation": [ @@ -254,7 +254,7 @@ "name": "DidUpdate", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -293,7 +293,7 @@ "name": "NextEnumSet", "modifier": 1, "type": { - "Type": "AccountIndex" + "Plain": "AccountIndex" }, "fallback": "0x00000000", "documentation": [ @@ -342,7 +342,7 @@ "name": "TotalIssuance", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -353,7 +353,7 @@ "name": "ExistentialDeposit", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -364,7 +364,7 @@ "name": "TransferFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -375,7 +375,7 @@ "name": "CreationFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -386,7 +386,7 @@ "name": "TransactionBaseFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -397,7 +397,7 @@ "name": "TransactionByteFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -603,7 +603,7 @@ "name": "Validators", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -614,7 +614,7 @@ "name": "CurrentIndex", "modifier": 1, "type": { - "Type": "SessionIndex" + "Plain": "SessionIndex" }, "fallback": "0x00000000", "documentation": [ @@ -625,7 +625,7 @@ "name": "Changed", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -713,7 +713,7 @@ "name": "ValidatorCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -724,7 +724,7 @@ "name": "MinimumValidatorCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x04000000", "documentation": [ @@ -735,7 +735,7 @@ "name": "SessionReward", "modifier": 1, "type": { - "Type": "Perbill" + "Plain": "Perbill" }, "fallback": "0x3c000000", "documentation": [ @@ -746,7 +746,7 @@ "name": "OfflineSlash", "modifier": 1, "type": { - "Type": "Perbill" + "Plain": "Perbill" }, "fallback": "0x40420f00", "documentation": [ @@ -757,7 +757,7 @@ "name": "OfflineSlashGrace", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -768,7 +768,7 @@ "name": "Invulnerables", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -880,7 +880,7 @@ "name": "CurrentElected", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -891,7 +891,7 @@ "name": "CurrentEra", "modifier": 1, "type": { - "Type": "EraIndex" + "Plain": "EraIndex" }, "fallback": "0x00000000", "documentation": [ @@ -902,7 +902,7 @@ "name": "CurrentSessionReward", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -913,7 +913,7 @@ "name": "CurrentEraReward", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -925,7 +925,7 @@ "name": "SlotStake", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -955,7 +955,7 @@ "name": "RecentlyOffline", "modifier": 1, "type": { - "Type": "Vec<(AccountId,BlockNumber,u32)>" + "Plain": "Vec<(AccountId,BlockNumber,u32)>" }, "fallback": "0x00", "documentation": [ @@ -967,7 +967,7 @@ "name": "ForceNewEra", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -1288,7 +1288,7 @@ "name": "PublicPropCount", "modifier": 1, "type": { - "Type": "PropIndex" + "Plain": "PropIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1299,7 +1299,7 @@ "name": "PublicProps", "modifier": 1, "type": { - "Type": "Vec<(PropIndex,Proposal,AccountId)>" + "Plain": "Vec<(PropIndex,Proposal,AccountId)>" }, "fallback": "0x00", "documentation": [ @@ -1326,7 +1326,7 @@ "name": "ReferendumCount", "modifier": 1, "type": { - "Type": "ReferendumIndex" + "Plain": "ReferendumIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1337,7 +1337,7 @@ "name": "NextTally", "modifier": 1, "type": { - "Type": "ReferendumIndex" + "Plain": "ReferendumIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1448,7 +1448,7 @@ "name": "LastTabledWasExternal", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -1460,7 +1460,7 @@ "name": "NextExternal", "modifier": 0, "type": { - "Type": "(Proposal,VoteThreshold)" + "Plain": "(Proposal,VoteThreshold)" }, "fallback": "0x00", "documentation": [ @@ -1868,7 +1868,7 @@ "name": "Authorities", "modifier": 1, "type": { - "Type": "Vec<(AuthorityId,AuthorityWeight)>" + "Plain": "Vec<(AuthorityId,AuthorityWeight)>" }, "fallback": "0x00", "documentation": [ @@ -1879,7 +1879,7 @@ "name": "PendingChange", "modifier": 0, "type": { - "Type": "StoredPendingChange" + "Plain": "StoredPendingChange" }, "fallback": "0x00", "documentation": [ @@ -1890,7 +1890,7 @@ "name": "NextForced", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [ @@ -1901,7 +1901,7 @@ "name": "Stalled", "modifier": 0, "type": { - "Type": "(BlockNumber,BlockNumber)" + "Plain": "(BlockNumber,BlockNumber)" }, "fallback": "0x00", "documentation": [ @@ -1943,7 +1943,7 @@ "name": "ShufflePeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -1977,7 +1977,7 @@ "name": "CandidacyBond", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x09000000000000000000000000000000", "documentation": [ @@ -1988,7 +1988,7 @@ "name": "VotingBond", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1999,7 +1999,7 @@ "name": "VotingFee", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2010,7 +2010,7 @@ "name": "PresentSlashPerVoter", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x01000000000000000000000000000000", "documentation": [ @@ -2021,7 +2021,7 @@ "name": "CarryCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x02000000", "documentation": [ @@ -2032,7 +2032,7 @@ "name": "PresentationDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -2043,7 +2043,7 @@ "name": "InactiveGracePeriod", "modifier": 1, "type": { - "Type": "VoteIndex" + "Plain": "VoteIndex" }, "fallback": "0x01000000", "documentation": [ @@ -2055,7 +2055,7 @@ "name": "VotingPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -2066,7 +2066,7 @@ "name": "TermDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0500000000000000", "documentation": [ @@ -2077,7 +2077,7 @@ "name": "DesiredSeats", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2088,7 +2088,7 @@ "name": "DecayRatio", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x18000000", "documentation": [ @@ -2102,7 +2102,7 @@ "name": "ActiveCouncil", "modifier": 1, "type": { - "Type": "Vec<(AccountId,BlockNumber)>" + "Plain": "Vec<(AccountId,BlockNumber)>" }, "fallback": "0x00", "documentation": [ @@ -2116,7 +2116,7 @@ "name": "VoteCount", "modifier": 1, "type": { - "Type": "VoteIndex" + "Plain": "VoteIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2196,7 +2196,7 @@ "name": "NextVoterSet", "modifier": 1, "type": { - "Type": "SetIndex" + "Plain": "SetIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2207,7 +2207,7 @@ "name": "VoterCount", "modifier": 1, "type": { - "Type": "SetIndex" + "Plain": "SetIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2218,7 +2218,7 @@ "name": "Candidates", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2229,7 +2229,7 @@ "name": "CandidateCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2240,7 +2240,7 @@ "name": "NextFinalize", "modifier": 0, "type": { - "Type": "(BlockNumber,u32,Vec)" + "Plain": "(BlockNumber,u32,Vec)" }, "fallback": "0x00", "documentation": [ @@ -2251,7 +2251,7 @@ "name": "Leaderboard", "modifier": 0, "type": { - "Type": "Vec<(BalanceOf,AccountId)>" + "Plain": "Vec<(BalanceOf,AccountId)>" }, "fallback": "0x00", "documentation": [ @@ -2541,7 +2541,7 @@ "name": "Proposals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2584,7 +2584,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2726,7 +2726,7 @@ "name": "ProposalBond", "modifier": 1, "type": { - "Type": "Permill" + "Plain": "Permill" }, "fallback": "0x00000000", "documentation": [ @@ -2738,7 +2738,7 @@ "name": "ProposalBondMinimum", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2749,7 +2749,7 @@ "name": "SpendPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0100000000000000", "documentation": [ @@ -2760,7 +2760,7 @@ "name": "Burn", "modifier": 1, "type": { - "Type": "Permill" + "Plain": "Permill" }, "fallback": "0x00000000", "documentation": [ @@ -2771,7 +2771,7 @@ "name": "Pot", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2782,7 +2782,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "ProposalIndex" + "Plain": "ProposalIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2809,7 +2809,7 @@ "name": "Approvals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2974,7 +2974,7 @@ "name": "Parachains", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [] @@ -3078,7 +3078,7 @@ "name": "DidUpdate", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [] @@ -3087,7 +3087,7 @@ "name": "NextFreeId", "modifier": 1, "type": { - "Type": "ParaId" + "Plain": "ParaId" }, "fallback": "0x00000000", "documentation": [ @@ -3152,7 +3152,7 @@ "name": "AuctionCounter", "modifier": 1, "type": { - "Type": "AuctionIndex" + "Plain": "AuctionIndex" }, "fallback": "0x00000000", "documentation": [ @@ -3163,7 +3163,7 @@ "name": "ManagedIds", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -3203,7 +3203,7 @@ "name": "AuctionInfo", "modifier": 0, "type": { - "Type": "(LeasePeriodOf,BlockNumber)" + "Plain": "(LeasePeriodOf,BlockNumber)" }, "fallback": "0x00", "documentation": [ @@ -3566,7 +3566,7 @@ "name": "Key", "modifier": 1, "type": { - "Type": "AccountId" + "Plain": "AccountId" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ diff --git a/packages/metadata/src/Metadata/v5/static-substrate.json b/packages/metadata/src/Metadata/v5/static-substrate.json index d0c353c695..da07d60b06 100644 --- a/packages/metadata/src/Metadata/v5/static-substrate.json +++ b/packages/metadata/src/Metadata/v5/static-substrate.json @@ -27,7 +27,7 @@ "name": "ExtrinsicCount", "modifier": 0, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00", "documentation": [ @@ -38,7 +38,7 @@ "name": "AllExtrinsicsWeight", "modifier": 0, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00", "documentation": [ @@ -81,7 +81,7 @@ "name": "RandomMaterial", "modifier": 1, "type": { - "Type": "(i8,Vec)" + "Plain": "(i8,Vec)" }, "fallback": "0x0000", "documentation": [ @@ -93,7 +93,7 @@ "name": "Number", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -104,7 +104,7 @@ "name": "ParentHash", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ @@ -115,7 +115,7 @@ "name": "ExtrinsicsRoot", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ @@ -126,7 +126,7 @@ "name": "Digest", "modifier": 1, "type": { - "Type": "DigestOf" + "Plain": "DigestOf" }, "fallback": "0x00", "documentation": [ @@ -137,7 +137,7 @@ "name": "Events", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -148,7 +148,7 @@ "name": "EventCount", "modifier": 1, "type": { - "Type": "EventIndex" + "Plain": "EventIndex" }, "fallback": "0x00000000", "documentation": [ @@ -279,7 +279,7 @@ "name": "Now", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0000000000000000", "documentation": [ @@ -290,7 +290,7 @@ "name": "BlockPeriod", "modifier": 0, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x00", "documentation": [ @@ -301,7 +301,7 @@ "name": "MinimumPeriod", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0300000000000000", "documentation": [ @@ -315,7 +315,7 @@ "name": "DidUpdate", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -354,7 +354,7 @@ "name": "NextEnumSet", "modifier": 1, "type": { - "Type": "AccountIndex" + "Plain": "AccountIndex" }, "fallback": "0x00000000", "documentation": [ @@ -403,7 +403,7 @@ "name": "TotalIssuance", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -414,7 +414,7 @@ "name": "ExistentialDeposit", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -425,7 +425,7 @@ "name": "TransferFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -436,7 +436,7 @@ "name": "CreationFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -447,7 +447,7 @@ "name": "TransactionBaseFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -458,7 +458,7 @@ "name": "TransactionByteFee", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -664,7 +664,7 @@ "name": "Validators", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -675,7 +675,7 @@ "name": "CurrentIndex", "modifier": 1, "type": { - "Type": "SessionIndex" + "Plain": "SessionIndex" }, "fallback": "0x00000000", "documentation": [ @@ -686,7 +686,7 @@ "name": "Changed", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -774,7 +774,7 @@ "name": "ValidatorCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -785,7 +785,7 @@ "name": "MinimumValidatorCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x04000000", "documentation": [ @@ -796,7 +796,7 @@ "name": "SessionReward", "modifier": 1, "type": { - "Type": "Perbill" + "Plain": "Perbill" }, "fallback": "0x3c000000", "documentation": [ @@ -807,7 +807,7 @@ "name": "OfflineSlash", "modifier": 1, "type": { - "Type": "Perbill" + "Plain": "Perbill" }, "fallback": "0x40420f00", "documentation": [ @@ -818,7 +818,7 @@ "name": "OfflineSlashGrace", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -829,7 +829,7 @@ "name": "Invulnerables", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -941,7 +941,7 @@ "name": "CurrentElected", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -952,7 +952,7 @@ "name": "CurrentEra", "modifier": 1, "type": { - "Type": "EraIndex" + "Plain": "EraIndex" }, "fallback": "0x00000000", "documentation": [ @@ -963,7 +963,7 @@ "name": "CurrentSessionReward", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -974,7 +974,7 @@ "name": "CurrentEraReward", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -986,7 +986,7 @@ "name": "SlotStake", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1016,7 +1016,7 @@ "name": "RecentlyOffline", "modifier": 1, "type": { - "Type": "Vec<(AccountId,BlockNumber,u32)>" + "Plain": "Vec<(AccountId,BlockNumber,u32)>" }, "fallback": "0x00", "documentation": [ @@ -1028,7 +1028,7 @@ "name": "ForceNewEra", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -1349,7 +1349,7 @@ "name": "PublicPropCount", "modifier": 1, "type": { - "Type": "PropIndex" + "Plain": "PropIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1360,7 +1360,7 @@ "name": "PublicProps", "modifier": 1, "type": { - "Type": "Vec<(PropIndex,Proposal,AccountId)>" + "Plain": "Vec<(PropIndex,Proposal,AccountId)>" }, "fallback": "0x00", "documentation": [ @@ -1387,7 +1387,7 @@ "name": "ReferendumCount", "modifier": 1, "type": { - "Type": "ReferendumIndex" + "Plain": "ReferendumIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1398,7 +1398,7 @@ "name": "NextTally", "modifier": 1, "type": { - "Type": "ReferendumIndex" + "Plain": "ReferendumIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1509,7 +1509,7 @@ "name": "LastTabledWasExternal", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -1521,7 +1521,7 @@ "name": "NextExternal", "modifier": 0, "type": { - "Type": "(Proposal,VoteThreshold)" + "Plain": "(Proposal,VoteThreshold)" }, "fallback": "0x00", "documentation": [ @@ -1929,7 +1929,7 @@ "name": "CandidacyBond", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x09000000000000000000000000000000", "documentation": [ @@ -1940,7 +1940,7 @@ "name": "VotingBond", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1951,7 +1951,7 @@ "name": "VotingFee", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1962,7 +1962,7 @@ "name": "PresentSlashPerVoter", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x01000000000000000000000000000000", "documentation": [ @@ -1973,7 +1973,7 @@ "name": "CarryCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x02000000", "documentation": [ @@ -1984,7 +1984,7 @@ "name": "PresentationDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -1995,7 +1995,7 @@ "name": "InactiveGracePeriod", "modifier": 1, "type": { - "Type": "VoteIndex" + "Plain": "VoteIndex" }, "fallback": "0x01000000", "documentation": [ @@ -2007,7 +2007,7 @@ "name": "VotingPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0xe803000000000000", "documentation": [ @@ -2018,7 +2018,7 @@ "name": "TermDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0500000000000000", "documentation": [ @@ -2029,7 +2029,7 @@ "name": "DesiredSeats", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2040,7 +2040,7 @@ "name": "DecayRatio", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x18000000", "documentation": [ @@ -2054,7 +2054,7 @@ "name": "ActiveCouncil", "modifier": 1, "type": { - "Type": "Vec<(AccountId,BlockNumber)>" + "Plain": "Vec<(AccountId,BlockNumber)>" }, "fallback": "0x00", "documentation": [ @@ -2068,7 +2068,7 @@ "name": "VoteCount", "modifier": 1, "type": { - "Type": "VoteIndex" + "Plain": "VoteIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2148,7 +2148,7 @@ "name": "NextVoterSet", "modifier": 1, "type": { - "Type": "SetIndex" + "Plain": "SetIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2159,7 +2159,7 @@ "name": "VoterCount", "modifier": 1, "type": { - "Type": "SetIndex" + "Plain": "SetIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2170,7 +2170,7 @@ "name": "Candidates", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2181,7 +2181,7 @@ "name": "CandidateCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2192,7 +2192,7 @@ "name": "NextFinalize", "modifier": 0, "type": { - "Type": "(BlockNumber,u32,Vec)" + "Plain": "(BlockNumber,u32,Vec)" }, "fallback": "0x00", "documentation": [ @@ -2203,7 +2203,7 @@ "name": "Leaderboard", "modifier": 0, "type": { - "Type": "Vec<(BalanceOf,AccountId)>" + "Plain": "Vec<(BalanceOf,AccountId)>" }, "fallback": "0x00", "documentation": [ @@ -2493,7 +2493,7 @@ "name": "Proposals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2536,7 +2536,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2699,7 +2699,7 @@ "name": "Authorities", "modifier": 1, "type": { - "Type": "Vec<(AuthorityId,AuthorityWeight)>" + "Plain": "Vec<(AuthorityId,AuthorityWeight)>" }, "fallback": "0x00", "documentation": [ @@ -2710,7 +2710,7 @@ "name": "PendingChange", "modifier": 0, "type": { - "Type": "StoredPendingChange" + "Plain": "StoredPendingChange" }, "fallback": "0x00", "documentation": [ @@ -2721,7 +2721,7 @@ "name": "NextForced", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [ @@ -2732,7 +2732,7 @@ "name": "Stalled", "modifier": 0, "type": { - "Type": "(BlockNumber,BlockNumber)" + "Plain": "(BlockNumber,BlockNumber)" }, "fallback": "0x00", "documentation": [ @@ -2774,7 +2774,7 @@ "name": "ProposalBond", "modifier": 1, "type": { - "Type": "Permill" + "Plain": "Permill" }, "fallback": "0x00000000", "documentation": [ @@ -2786,7 +2786,7 @@ "name": "ProposalBondMinimum", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2797,7 +2797,7 @@ "name": "SpendPeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0100000000000000", "documentation": [ @@ -2808,7 +2808,7 @@ "name": "Burn", "modifier": 1, "type": { - "Type": "Permill" + "Plain": "Permill" }, "fallback": "0x00000000", "documentation": [ @@ -2819,7 +2819,7 @@ "name": "Pot", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -2830,7 +2830,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "ProposalIndex" + "Plain": "ProposalIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2857,7 +2857,7 @@ "name": "Approvals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -3022,7 +3022,7 @@ "name": "SignedClaimHandicap", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -3036,7 +3036,7 @@ "name": "TombstoneDeposit", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -3047,7 +3047,7 @@ "name": "StorageSizeOffset", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -3059,7 +3059,7 @@ "name": "RentByteFee", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -3070,7 +3070,7 @@ "name": "RentDepositOffset", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -3087,7 +3087,7 @@ "name": "SurchargeReward", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -3099,7 +3099,7 @@ "name": "TransferFee", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -3110,7 +3110,7 @@ "name": "CreationFee", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -3121,7 +3121,7 @@ "name": "TransactionBaseFee", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -3132,7 +3132,7 @@ "name": "TransactionByteFee", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -3143,7 +3143,7 @@ "name": "ContractFee", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x15000000000000000000000000000000", "documentation": [ @@ -3154,7 +3154,7 @@ "name": "CallBaseFee", "modifier": 1, "type": { - "Type": "Gas" + "Plain": "Gas" }, "fallback": "0x8700000000000000", "documentation": [ @@ -3165,7 +3165,7 @@ "name": "CreateBaseFee", "modifier": 1, "type": { - "Type": "Gas" + "Plain": "Gas" }, "fallback": "0xaf00000000000000", "documentation": [ @@ -3176,7 +3176,7 @@ "name": "GasPrice", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x01000000000000000000000000000000", "documentation": [ @@ -3187,7 +3187,7 @@ "name": "MaxDepth", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x64000000", "documentation": [ @@ -3198,7 +3198,7 @@ "name": "BlockGasLimit", "modifier": 1, "type": { - "Type": "Gas" + "Plain": "Gas" }, "fallback": "0x8096980000000000", "documentation": [ @@ -3209,7 +3209,7 @@ "name": "GasSpent", "modifier": 1, "type": { - "Type": "Gas" + "Plain": "Gas" }, "fallback": "0x0000000000000000", "documentation": [ @@ -3220,7 +3220,7 @@ "name": "CurrentSchedule", "modifier": 1, "type": { - "Type": "Schedule" + "Plain": "Schedule" }, "fallback": "0x000000000100000000000000010000000000000001000000000000000100000000000000010000000000000001000000000000000100000000000000010000000000000001000000000000000400000000000100100000000020000000", "documentation": [ @@ -3263,7 +3263,7 @@ "name": "AccountCounter", "modifier": 1, "type": { - "Type": "u64" + "Plain": "u64" }, "fallback": "0x0000000000000000", "documentation": [ @@ -3503,7 +3503,7 @@ "name": "Key", "modifier": 1, "type": { - "Type": "AccountId" + "Plain": "AccountId" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ diff --git a/packages/metadata/src/Metadata/v6/static-polkadot.json b/packages/metadata/src/Metadata/v6/static-polkadot.json index 475d7d555c..4da4e28b82 100644 --- a/packages/metadata/src/Metadata/v6/static-polkadot.json +++ b/packages/metadata/src/Metadata/v6/static-polkadot.json @@ -27,7 +27,7 @@ "name": "ExtrinsicCount", "modifier": 0, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00", "documentation": [ @@ -38,7 +38,7 @@ "name": "AllExtrinsicsWeight", "modifier": 0, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00", "documentation": [ @@ -81,7 +81,7 @@ "name": "RandomMaterial", "modifier": 1, "type": { - "Type": "(i8,Vec)" + "Plain": "(i8,Vec)" }, "fallback": "0x0000", "documentation": [ @@ -93,7 +93,7 @@ "name": "Number", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -104,7 +104,7 @@ "name": "ParentHash", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ @@ -115,7 +115,7 @@ "name": "ExtrinsicsRoot", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ @@ -126,7 +126,7 @@ "name": "Digest", "modifier": 1, "type": { - "Type": "DigestOf" + "Plain": "DigestOf" }, "fallback": "0x00", "documentation": [ @@ -137,7 +137,7 @@ "name": "Events", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -148,7 +148,7 @@ "name": "EventCount", "modifier": 1, "type": { - "Type": "EventIndex" + "Plain": "EventIndex" }, "fallback": "0x00000000", "documentation": [ @@ -281,7 +281,7 @@ "name": "Now", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0000000000000000", "documentation": [ @@ -292,7 +292,7 @@ "name": "DidUpdate", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -345,7 +345,7 @@ "name": "Uncles", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -356,7 +356,7 @@ "name": "Author", "modifier": 0, "type": { - "Type": "AccountId" + "Plain": "AccountId" }, "fallback": "0x00", "documentation": [ @@ -367,7 +367,7 @@ "name": "DidSetUncles", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -400,7 +400,7 @@ "name": "NextEnumSet", "modifier": 1, "type": { - "Type": "AccountIndex" + "Plain": "AccountIndex" }, "fallback": "0x00000000", "documentation": [ @@ -450,7 +450,7 @@ "name": "TotalIssuance", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -698,7 +698,7 @@ "name": "ValidatorCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -709,7 +709,7 @@ "name": "MinimumValidatorCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x04000000", "documentation": [ @@ -720,7 +720,7 @@ "name": "SessionReward", "modifier": 1, "type": { - "Type": "Perbill" + "Plain": "Perbill" }, "fallback": "0x3c000000", "documentation": [ @@ -731,7 +731,7 @@ "name": "OfflineSlash", "modifier": 1, "type": { - "Type": "Perbill" + "Plain": "Perbill" }, "fallback": "0x40420f00", "documentation": [ @@ -742,7 +742,7 @@ "name": "OfflineSlashGrace", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -753,7 +753,7 @@ "name": "Invulnerables", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -865,7 +865,7 @@ "name": "CurrentElected", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -876,7 +876,7 @@ "name": "CurrentEra", "modifier": 1, "type": { - "Type": "EraIndex" + "Plain": "EraIndex" }, "fallback": "0x00000000", "documentation": [ @@ -887,7 +887,7 @@ "name": "CurrentSessionReward", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -898,7 +898,7 @@ "name": "CurrentEraReward", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -910,7 +910,7 @@ "name": "SlotStake", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -940,7 +940,7 @@ "name": "RecentlyOffline", "modifier": 1, "type": { - "Type": "Vec<(AccountId,BlockNumber,u32)>" + "Plain": "Vec<(AccountId,BlockNumber,u32)>" }, "fallback": "0x00", "documentation": [ @@ -952,7 +952,7 @@ "name": "ForceNewEra", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -963,7 +963,7 @@ "name": "BondedEras", "modifier": 1, "type": { - "Type": "Vec<(EraIndex,SessionIndex)>" + "Plain": "Vec<(EraIndex,SessionIndex)>" }, "fallback": "0x00", "documentation": [ @@ -1302,7 +1302,7 @@ "name": "Validators", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1313,7 +1313,7 @@ "name": "CurrentIndex", "modifier": 1, "type": { - "Type": "SessionIndex" + "Plain": "SessionIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1324,7 +1324,7 @@ "name": "Changed", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -1335,7 +1335,7 @@ "name": "QueuedChanged", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -1346,7 +1346,7 @@ "name": "QueuedKeys", "modifier": 1, "type": { - "Type": "Vec<(ValidatorId,Keys)>" + "Plain": "Vec<(ValidatorId,Keys)>" }, "fallback": "0x00", "documentation": [ @@ -1404,7 +1404,7 @@ "name": "PublicPropCount", "modifier": 1, "type": { - "Type": "PropIndex" + "Plain": "PropIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1415,7 +1415,7 @@ "name": "PublicProps", "modifier": 1, "type": { - "Type": "Vec<(PropIndex,Proposal,AccountId)>" + "Plain": "Vec<(PropIndex,Proposal,AccountId)>" }, "fallback": "0x00", "documentation": [ @@ -1442,7 +1442,7 @@ "name": "ReferendumCount", "modifier": 1, "type": { - "Type": "ReferendumIndex" + "Plain": "ReferendumIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1453,7 +1453,7 @@ "name": "NextTally", "modifier": 1, "type": { - "Type": "ReferendumIndex" + "Plain": "ReferendumIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1564,7 +1564,7 @@ "name": "LastTabledWasExternal", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -1576,7 +1576,7 @@ "name": "NextExternal", "modifier": 0, "type": { - "Type": "(Proposal,VoteThreshold)" + "Plain": "(Proposal,VoteThreshold)" }, "fallback": "0x00", "documentation": [ @@ -2065,7 +2065,7 @@ "name": "Proposals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2108,7 +2108,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2119,7 +2119,7 @@ "name": "Members", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2286,7 +2286,7 @@ "name": "Proposals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2329,7 +2329,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2340,7 +2340,7 @@ "name": "Members", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2507,7 +2507,7 @@ "name": "PresentationDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -2518,7 +2518,7 @@ "name": "TermDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -2529,7 +2529,7 @@ "name": "DesiredSeats", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2540,7 +2540,7 @@ "name": "Members", "modifier": 1, "type": { - "Type": "Vec<(AccountId,BlockNumber)>" + "Plain": "Vec<(AccountId,BlockNumber)>" }, "fallback": "0x00", "documentation": [ @@ -2554,7 +2554,7 @@ "name": "VoteCount", "modifier": 1, "type": { - "Type": "VoteIndex" + "Plain": "VoteIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2634,7 +2634,7 @@ "name": "NextVoterSet", "modifier": 1, "type": { - "Type": "SetIndex" + "Plain": "SetIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2645,7 +2645,7 @@ "name": "VoterCount", "modifier": 1, "type": { - "Type": "SetIndex" + "Plain": "SetIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2656,7 +2656,7 @@ "name": "Candidates", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2667,7 +2667,7 @@ "name": "CandidateCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2678,7 +2678,7 @@ "name": "NextFinalize", "modifier": 0, "type": { - "Type": "(BlockNumber,u32,Vec)" + "Plain": "(BlockNumber,u32,Vec)" }, "fallback": "0x00", "documentation": [ @@ -2689,7 +2689,7 @@ "name": "Leaderboard", "modifier": 0, "type": { - "Type": "Vec<(BalanceOf,AccountId)>" + "Plain": "Vec<(BalanceOf,AccountId)>" }, "fallback": "0x00", "documentation": [ @@ -3112,7 +3112,7 @@ "name": "Authorities", "modifier": 1, "type": { - "Type": "Vec<(AuthorityId,AuthorityWeight)>" + "Plain": "Vec<(AuthorityId,AuthorityWeight)>" }, "fallback": "0x00", "documentation": [ @@ -3123,7 +3123,7 @@ "name": "PendingChange", "modifier": 0, "type": { - "Type": "StoredPendingChange" + "Plain": "StoredPendingChange" }, "fallback": "0x00", "documentation": [ @@ -3134,7 +3134,7 @@ "name": "NextForced", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [ @@ -3145,7 +3145,7 @@ "name": "Stalled", "modifier": 0, "type": { - "Type": "(BlockNumber,BlockNumber)" + "Plain": "(BlockNumber,BlockNumber)" }, "fallback": "0x00", "documentation": [ @@ -3188,7 +3188,7 @@ "name": "ShufflePeriod", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -3223,7 +3223,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "ProposalIndex" + "Plain": "ProposalIndex" }, "fallback": "0x00000000", "documentation": [ @@ -3250,7 +3250,7 @@ "name": "Approvals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -3414,7 +3414,7 @@ "name": "Parachains", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [] @@ -3518,7 +3518,7 @@ "name": "DidUpdate", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [] @@ -3527,7 +3527,7 @@ "name": "NextFreeId", "modifier": 1, "type": { - "Type": "ParaId" + "Plain": "ParaId" }, "fallback": "0x00000000", "documentation": [ @@ -3593,7 +3593,7 @@ "name": "AuctionCounter", "modifier": 1, "type": { - "Type": "AuctionIndex" + "Plain": "AuctionIndex" }, "fallback": "0x00000000", "documentation": [ @@ -3604,7 +3604,7 @@ "name": "ManagedIds", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -3644,7 +3644,7 @@ "name": "AuctionInfo", "modifier": 0, "type": { - "Type": "(LeasePeriodOf,BlockNumber)" + "Plain": "(LeasePeriodOf,BlockNumber)" }, "fallback": "0x00", "documentation": [ @@ -4008,7 +4008,7 @@ "name": "Key", "modifier": 1, "type": { - "Type": "AccountId" + "Plain": "AccountId" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ diff --git a/packages/metadata/src/Metadata/v6/static-substrate.json b/packages/metadata/src/Metadata/v6/static-substrate.json index f95eee2901..ca7cfb4a26 100644 --- a/packages/metadata/src/Metadata/v6/static-substrate.json +++ b/packages/metadata/src/Metadata/v6/static-substrate.json @@ -27,7 +27,7 @@ "name": "ExtrinsicCount", "modifier": 0, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00", "documentation": [ @@ -38,7 +38,7 @@ "name": "AllExtrinsicsWeight", "modifier": 0, "type": { - "Type": "Weight" + "Plain": "Weight" }, "fallback": "0x00", "documentation": [ @@ -49,7 +49,7 @@ "name": "AllExtrinsicsLen", "modifier": 0, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00", "documentation": [ @@ -60,7 +60,7 @@ "name": "NextWeightMultiplier", "modifier": 1, "type": { - "Type": "WeightMultiplier" + "Plain": "WeightMultiplier" }, "fallback": "0x0000000000000000", "documentation": [ @@ -104,7 +104,7 @@ "name": "RandomMaterial", "modifier": 1, "type": { - "Type": "(i8,Vec)" + "Plain": "(i8,Vec)" }, "fallback": "0x0000", "documentation": [ @@ -116,7 +116,7 @@ "name": "Number", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -127,7 +127,7 @@ "name": "ParentHash", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ @@ -138,7 +138,7 @@ "name": "ExtrinsicsRoot", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ @@ -149,7 +149,7 @@ "name": "Digest", "modifier": 1, "type": { - "Type": "DigestOf" + "Plain": "DigestOf" }, "fallback": "0x00", "documentation": [ @@ -160,7 +160,7 @@ "name": "Events", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -171,7 +171,7 @@ "name": "EventCount", "modifier": 1, "type": { - "Type": "EventIndex" + "Plain": "EventIndex" }, "fallback": "0x00000000", "documentation": [ @@ -296,7 +296,7 @@ "name": "LastTimestamp", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0000000000000000", "documentation": [ @@ -307,7 +307,7 @@ "name": "Authorities", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -327,7 +327,7 @@ "name": "Now", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0000000000000000", "documentation": [ @@ -338,7 +338,7 @@ "name": "DidUpdate", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -391,7 +391,7 @@ "name": "Uncles", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -402,7 +402,7 @@ "name": "Author", "modifier": 0, "type": { - "Type": "AccountId" + "Plain": "AccountId" }, "fallback": "0x00", "documentation": [ @@ -413,7 +413,7 @@ "name": "DidSetUncles", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -446,7 +446,7 @@ "name": "NextEnumSet", "modifier": 1, "type": { - "Type": "AccountIndex" + "Plain": "AccountIndex" }, "fallback": "0x00000000", "documentation": [ @@ -496,7 +496,7 @@ "name": "TotalIssuance", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -744,7 +744,7 @@ "name": "ValidatorCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -755,7 +755,7 @@ "name": "MinimumValidatorCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x04000000", "documentation": [ @@ -766,7 +766,7 @@ "name": "SessionReward", "modifier": 1, "type": { - "Type": "Perbill" + "Plain": "Perbill" }, "fallback": "0x3c000000", "documentation": [ @@ -777,7 +777,7 @@ "name": "OfflineSlash", "modifier": 1, "type": { - "Type": "Perbill" + "Plain": "Perbill" }, "fallback": "0x40420f00", "documentation": [ @@ -788,7 +788,7 @@ "name": "OfflineSlashGrace", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -799,7 +799,7 @@ "name": "Invulnerables", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -911,7 +911,7 @@ "name": "CurrentElected", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -922,7 +922,7 @@ "name": "CurrentEra", "modifier": 1, "type": { - "Type": "EraIndex" + "Plain": "EraIndex" }, "fallback": "0x00000000", "documentation": [ @@ -933,7 +933,7 @@ "name": "CurrentSessionReward", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -944,7 +944,7 @@ "name": "CurrentEraReward", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -956,7 +956,7 @@ "name": "SlotStake", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -986,7 +986,7 @@ "name": "RecentlyOffline", "modifier": 1, "type": { - "Type": "Vec<(AccountId,BlockNumber,u32)>" + "Plain": "Vec<(AccountId,BlockNumber,u32)>" }, "fallback": "0x00", "documentation": [ @@ -998,7 +998,7 @@ "name": "ForceNewEra", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -1009,7 +1009,7 @@ "name": "BondedEras", "modifier": 1, "type": { - "Type": "Vec<(EraIndex,SessionIndex)>" + "Plain": "Vec<(EraIndex,SessionIndex)>" }, "fallback": "0x00", "documentation": [ @@ -1348,7 +1348,7 @@ "name": "Validators", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1359,7 +1359,7 @@ "name": "CurrentIndex", "modifier": 1, "type": { - "Type": "SessionIndex" + "Plain": "SessionIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1370,7 +1370,7 @@ "name": "Changed", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -1381,7 +1381,7 @@ "name": "QueuedChanged", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -1392,7 +1392,7 @@ "name": "QueuedKeys", "modifier": 1, "type": { - "Type": "Vec<(ValidatorId,Keys)>" + "Plain": "Vec<(ValidatorId,Keys)>" }, "fallback": "0x00", "documentation": [ @@ -1500,7 +1500,7 @@ "name": "PublicPropCount", "modifier": 1, "type": { - "Type": "PropIndex" + "Plain": "PropIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1511,7 +1511,7 @@ "name": "PublicProps", "modifier": 1, "type": { - "Type": "Vec<(PropIndex,Proposal,AccountId)>" + "Plain": "Vec<(PropIndex,Proposal,AccountId)>" }, "fallback": "0x00", "documentation": [ @@ -1538,7 +1538,7 @@ "name": "ReferendumCount", "modifier": 1, "type": { - "Type": "ReferendumIndex" + "Plain": "ReferendumIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1549,7 +1549,7 @@ "name": "NextTally", "modifier": 1, "type": { - "Type": "ReferendumIndex" + "Plain": "ReferendumIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1660,7 +1660,7 @@ "name": "LastTabledWasExternal", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -1672,7 +1672,7 @@ "name": "NextExternal", "modifier": 0, "type": { - "Type": "(Proposal,VoteThreshold)" + "Plain": "(Proposal,VoteThreshold)" }, "fallback": "0x00", "documentation": [ @@ -2161,7 +2161,7 @@ "name": "Proposals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2204,7 +2204,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2215,7 +2215,7 @@ "name": "Members", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2373,7 +2373,7 @@ "name": "Proposals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2416,7 +2416,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2427,7 +2427,7 @@ "name": "Members", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2585,7 +2585,7 @@ "name": "PresentationDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -2596,7 +2596,7 @@ "name": "TermDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [ @@ -2607,7 +2607,7 @@ "name": "DesiredSeats", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2618,7 +2618,7 @@ "name": "Members", "modifier": 1, "type": { - "Type": "Vec<(AccountId,BlockNumber)>" + "Plain": "Vec<(AccountId,BlockNumber)>" }, "fallback": "0x00", "documentation": [ @@ -2632,7 +2632,7 @@ "name": "VoteCount", "modifier": 1, "type": { - "Type": "VoteIndex" + "Plain": "VoteIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2712,7 +2712,7 @@ "name": "NextVoterSet", "modifier": 1, "type": { - "Type": "SetIndex" + "Plain": "SetIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2723,7 +2723,7 @@ "name": "VoterCount", "modifier": 1, "type": { - "Type": "SetIndex" + "Plain": "SetIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2734,7 +2734,7 @@ "name": "Candidates", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2745,7 +2745,7 @@ "name": "CandidateCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2756,7 +2756,7 @@ "name": "NextFinalize", "modifier": 0, "type": { - "Type": "(BlockNumber,u32,Vec)" + "Plain": "(BlockNumber,u32,Vec)" }, "fallback": "0x00", "documentation": [ @@ -2767,7 +2767,7 @@ "name": "Leaderboard", "modifier": 0, "type": { - "Type": "Vec<(BalanceOf,AccountId)>" + "Plain": "Vec<(BalanceOf,AccountId)>" }, "fallback": "0x00", "documentation": [ @@ -3206,7 +3206,7 @@ "name": "Authorities", "modifier": 1, "type": { - "Type": "Vec<(AuthorityId,AuthorityWeight)>" + "Plain": "Vec<(AuthorityId,AuthorityWeight)>" }, "fallback": "0x00", "documentation": [ @@ -3217,7 +3217,7 @@ "name": "State", "modifier": 1, "type": { - "Type": "StoredState" + "Plain": "StoredState" }, "fallback": "0x00", "documentation": [ @@ -3228,7 +3228,7 @@ "name": "PendingChange", "modifier": 0, "type": { - "Type": "StoredPendingChange" + "Plain": "StoredPendingChange" }, "fallback": "0x00", "documentation": [ @@ -3239,7 +3239,7 @@ "name": "NextForced", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [ @@ -3250,7 +3250,7 @@ "name": "Stalled", "modifier": 0, "type": { - "Type": "(BlockNumber,BlockNumber)" + "Plain": "(BlockNumber,BlockNumber)" }, "fallback": "0x00", "documentation": [ @@ -3307,7 +3307,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "ProposalIndex" + "Plain": "ProposalIndex" }, "fallback": "0x00000000", "documentation": [ @@ -3334,7 +3334,7 @@ "name": "Approvals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -3498,7 +3498,7 @@ "name": "GasSpent", "modifier": 1, "type": { - "Type": "Gas" + "Plain": "Gas" }, "fallback": "0x0000000000000000", "documentation": [ @@ -3509,7 +3509,7 @@ "name": "CurrentSchedule", "modifier": 1, "type": { - "Type": "Schedule" + "Plain": "Schedule" }, "fallback": "0x0000000001000000000000000100000000000000010000000000000001000000000000000100000000000000010000000000000001000000000000008700000000000000af0000000000000001000000000000000100000000000000040000000000010010000000004000000020000000", "documentation": [ @@ -3552,7 +3552,7 @@ "name": "AccountCounter", "modifier": 1, "type": { - "Type": "u64" + "Plain": "u64" }, "fallback": "0x0000000000000000", "documentation": [ @@ -3579,7 +3579,7 @@ "name": "GasPrice", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x01000000000000000000000000000000", "documentation": [ @@ -3949,7 +3949,7 @@ "name": "Key", "modifier": 1, "type": { - "Type": "AccountId" + "Plain": "AccountId" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ @@ -4029,7 +4029,7 @@ "name": "GossipAt", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x0000000000000000", "documentation": [] @@ -4038,7 +4038,7 @@ "name": "LastNewEraStart", "modifier": 0, "type": { - "Type": "SessionIndex" + "Plain": "SessionIndex" }, "fallback": "0x00", "documentation": [] diff --git a/packages/metadata/src/Metadata/v7/static-polkadot.json b/packages/metadata/src/Metadata/v7/static-polkadot.json index 89a87e201a..af552a9ef8 100644 --- a/packages/metadata/src/Metadata/v7/static-polkadot.json +++ b/packages/metadata/src/Metadata/v7/static-polkadot.json @@ -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)" + "Plain": "(i8,Vec)" }, "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" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -172,7 +172,7 @@ "name": "EventCount", "modifier": 1, "type": { - "Type": "EventIndex" + "Plain": "EventIndex" }, "fallback": "0x00000000", "documentation": [ @@ -308,7 +308,7 @@ "name": "EpochIndex", "modifier": 1, "type": { - "Type": "u64" + "Plain": "u64" }, "fallback": "0x0000000000000000", "documentation": [ @@ -319,7 +319,7 @@ "name": "Authorities", "modifier": 1, "type": { - "Type": "Vec<(AuthorityId,BabeAuthorityWeight)>" + "Plain": "Vec<(AuthorityId,BabeAuthorityWeight)>" }, "fallback": "0x00", "documentation": [ @@ -330,7 +330,7 @@ "name": "GenesisSlot", "modifier": 1, "type": { - "Type": "u64" + "Plain": "u64" }, "fallback": "0x0000000000000000", "documentation": [ @@ -342,7 +342,7 @@ "name": "CurrentSlot", "modifier": 1, "type": { - "Type": "u64" + "Plain": "u64" }, "fallback": "0x0000000000000000", "documentation": [ @@ -353,7 +353,7 @@ "name": "Randomness", "modifier": 1, "type": { - "Type": "[u8;32]" + "Plain": "[u8;32]" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ @@ -373,7 +373,7 @@ "name": "NextRandomness", "modifier": 1, "type": { - "Type": "[u8;32]" + "Plain": "[u8;32]" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ @@ -384,7 +384,7 @@ "name": "SegmentIndex", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -417,7 +417,7 @@ "name": "Initialized", "modifier": 0, "type": { - "Type": "MaybeVrf" + "Plain": "MaybeVrf" }, "fallback": "0x00", "documentation": [ @@ -462,7 +462,7 @@ "name": "Now", "modifier": 1, "type": { - "Type": "Moment" + "Plain": "Moment" }, "fallback": "0x0000000000000000", "documentation": [ @@ -473,7 +473,7 @@ "name": "DidUpdate", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -528,7 +528,7 @@ "name": "NextEnumSet", "modifier": 1, "type": { - "Type": "AccountIndex" + "Plain": "AccountIndex" }, "fallback": "0x00000000", "documentation": [ @@ -580,7 +580,7 @@ "name": "TotalIssuance", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -851,7 +851,7 @@ "name": "Uncles", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -862,7 +862,7 @@ "name": "Author", "modifier": 0, "type": { - "Type": "AccountId" + "Plain": "AccountId" }, "fallback": "0x00", "documentation": [ @@ -873,7 +873,7 @@ "name": "DidSetUncles", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -908,7 +908,7 @@ "name": "ValidatorCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -919,7 +919,7 @@ "name": "MinimumValidatorCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x04000000", "documentation": [ @@ -930,7 +930,7 @@ "name": "Invulnerables", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1042,7 +1042,7 @@ "name": "CurrentElected", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1053,7 +1053,7 @@ "name": "CurrentEra", "modifier": 1, "type": { - "Type": "EraIndex" + "Plain": "EraIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1064,7 +1064,7 @@ "name": "CurrentEraStart", "modifier": 1, "type": { - "Type": "MomentOf" + "Plain": "MomentOf" }, "fallback": "0x0000000000000000", "documentation": [ @@ -1075,7 +1075,7 @@ "name": "CurrentEraStartSessionIndex", "modifier": 1, "type": { - "Type": "SessionIndex" + "Plain": "SessionIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1086,7 +1086,7 @@ "name": "CurrentEraPointsEarned", "modifier": 1, "type": { - "Type": "EraPoints" + "Plain": "EraPoints" }, "fallback": "0x0000000000", "documentation": [ @@ -1097,7 +1097,7 @@ "name": "SlotStake", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1110,7 +1110,7 @@ "name": "ForceEra", "modifier": 1, "type": { - "Type": "Forcing" + "Plain": "Forcing" }, "fallback": "0x00", "documentation": [ @@ -1121,7 +1121,7 @@ "name": "SlashRewardFraction", "modifier": 1, "type": { - "Type": "Perbill" + "Plain": "Perbill" }, "fallback": "0x00000000", "documentation": [ @@ -1134,7 +1134,7 @@ "name": "BondedEras", "modifier": 1, "type": { - "Type": "Vec<(EraIndex,SessionIndex)>" + "Plain": "Vec<(EraIndex,SessionIndex)>" }, "fallback": "0x00", "documentation": [ @@ -1564,7 +1564,7 @@ "name": "Validators", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1575,7 +1575,7 @@ "name": "CurrentIndex", "modifier": 1, "type": { - "Type": "SessionIndex" + "Plain": "SessionIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1586,7 +1586,7 @@ "name": "QueuedChanged", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -1598,7 +1598,7 @@ "name": "QueuedKeys", "modifier": 1, "type": { - "Type": "Vec<(ValidatorId,Keys)>" + "Plain": "Vec<(ValidatorId,Keys)>" }, "fallback": "0x00", "documentation": [ @@ -1610,7 +1610,7 @@ "name": "DisabledValidators", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1759,7 +1759,7 @@ "name": "Authorities", "modifier": 1, "type": { - "Type": "Vec<(AuthorityId,AuthorityWeight)>" + "Plain": "Vec<(AuthorityId,AuthorityWeight)>" }, "fallback": "0x00", "documentation": [ @@ -1770,7 +1770,7 @@ "name": "State", "modifier": 1, "type": { - "Type": "StoredState" + "Plain": "StoredState" }, "fallback": "0x00", "documentation": [ @@ -1781,7 +1781,7 @@ "name": "PendingChange", "modifier": 0, "type": { - "Type": "StoredPendingChange" + "Plain": "StoredPendingChange" }, "fallback": "0x00", "documentation": [ @@ -1792,7 +1792,7 @@ "name": "NextForced", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [ @@ -1803,7 +1803,7 @@ "name": "Stalled", "modifier": 0, "type": { - "Type": "(BlockNumber,BlockNumber)" + "Plain": "(BlockNumber,BlockNumber)" }, "fallback": "0x00", "documentation": [ @@ -1814,7 +1814,7 @@ "name": "CurrentSetId", "modifier": 1, "type": { - "Type": "SetId" + "Plain": "SetId" }, "fallback": "0x0000000000000000", "documentation": [ @@ -1890,7 +1890,7 @@ "name": "GossipAt", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00000000", "documentation": [ @@ -1901,7 +1901,7 @@ "name": "Keys", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1973,7 +1973,7 @@ "name": "PublicPropCount", "modifier": 1, "type": { - "Type": "PropIndex" + "Plain": "PropIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1984,7 +1984,7 @@ "name": "PublicProps", "modifier": 1, "type": { - "Type": "Vec<(PropIndex,Proposal,AccountId)>" + "Plain": "Vec<(PropIndex,Proposal,AccountId)>" }, "fallback": "0x00", "documentation": [ @@ -2011,7 +2011,7 @@ "name": "ReferendumCount", "modifier": 1, "type": { - "Type": "ReferendumIndex" + "Plain": "ReferendumIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2022,7 +2022,7 @@ "name": "NextTally", "modifier": 1, "type": { - "Type": "ReferendumIndex" + "Plain": "ReferendumIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2133,7 +2133,7 @@ "name": "LastTabledWasExternal", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -2145,7 +2145,7 @@ "name": "NextExternal", "modifier": 0, "type": { - "Type": "(Proposal,VoteThreshold)" + "Plain": "(Proposal,VoteThreshold)" }, "fallback": "0x00", "documentation": [ @@ -2626,7 +2626,7 @@ "name": "Proposals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2669,7 +2669,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2680,7 +2680,7 @@ "name": "Members", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2840,7 +2840,7 @@ "name": "Proposals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2883,7 +2883,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2894,7 +2894,7 @@ "name": "Members", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -3054,7 +3054,7 @@ "name": "PresentationDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00000000", "documentation": [ @@ -3065,7 +3065,7 @@ "name": "TermDuration", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00000000", "documentation": [ @@ -3076,7 +3076,7 @@ "name": "DesiredSeats", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -3087,7 +3087,7 @@ "name": "Members", "modifier": 1, "type": { - "Type": "Vec<(AccountId,BlockNumber)>" + "Plain": "Vec<(AccountId,BlockNumber)>" }, "fallback": "0x00", "documentation": [ @@ -3101,7 +3101,7 @@ "name": "VoteCount", "modifier": 1, "type": { - "Type": "VoteIndex" + "Plain": "VoteIndex" }, "fallback": "0x00000000", "documentation": [ @@ -3175,7 +3175,7 @@ "name": "NextVoterSet", "modifier": 1, "type": { - "Type": "SetIndex" + "Plain": "SetIndex" }, "fallback": "0x00000000", "documentation": [ @@ -3186,7 +3186,7 @@ "name": "VoterCount", "modifier": 1, "type": { - "Type": "SetIndex" + "Plain": "SetIndex" }, "fallback": "0x00000000", "documentation": [ @@ -3197,7 +3197,7 @@ "name": "Candidates", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -3208,7 +3208,7 @@ "name": "CandidateCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -3219,7 +3219,7 @@ "name": "NextFinalize", "modifier": 0, "type": { - "Type": "(BlockNumber,u32,Vec)" + "Plain": "(BlockNumber,u32,Vec)" }, "fallback": "0x00", "documentation": [ @@ -3230,7 +3230,7 @@ "name": "Leaderboard", "modifier": 0, "type": { - "Type": "Vec<(BalanceOf,AccountId)>" + "Plain": "Vec<(BalanceOf,AccountId)>" }, "fallback": "0x00", "documentation": [ @@ -3650,7 +3650,7 @@ "name": "Members", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -3772,7 +3772,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "ProposalIndex" + "Plain": "ProposalIndex" }, "fallback": "0x00000000", "documentation": [ @@ -3799,7 +3799,7 @@ "name": "Approvals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -3979,7 +3979,7 @@ "name": "Total", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [] @@ -4037,7 +4037,7 @@ "name": "Authorities", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -4048,7 +4048,7 @@ "name": "Parachains", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -4163,7 +4163,7 @@ "name": "DidUpdate", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -4174,7 +4174,7 @@ "name": "NextFreeId", "modifier": 1, "type": { - "Type": "ParaId" + "Plain": "ParaId" }, "fallback": "0x00000000", "documentation": [ @@ -4276,7 +4276,7 @@ "name": "DidUpdate", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [] @@ -4309,7 +4309,7 @@ "name": "AuctionCounter", "modifier": 1, "type": { - "Type": "AuctionIndex" + "Plain": "AuctionIndex" }, "fallback": "0x00000000", "documentation": [ @@ -4320,7 +4320,7 @@ "name": "ManagedIds", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -4360,7 +4360,7 @@ "name": "AuctionInfo", "modifier": 0, "type": { - "Type": "(LeasePeriodOf,BlockNumber)" + "Plain": "(LeasePeriodOf,BlockNumber)" }, "fallback": "0x00", "documentation": [ @@ -4726,7 +4726,7 @@ "name": "Key", "modifier": 1, "type": { - "Type": "AccountId" + "Plain": "AccountId" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ diff --git a/packages/metadata/src/Metadata/v7/static-substrate.json b/packages/metadata/src/Metadata/v7/static-substrate.json index d4129a2088..16d4f17ee0 100644 --- a/packages/metadata/src/Metadata/v7/static-substrate.json +++ b/packages/metadata/src/Metadata/v7/static-substrate.json @@ -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)" + "Plain": "(i8,Vec)" }, "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" + "Plain": "Vec" }, "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" + "Plain": "Vec" }, "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" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1082,7 +1082,7 @@ "name": "CurrentElected", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "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" + "Plain": "Vec" }, "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" + "Plain": "Vec" }, "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" + "Plain": "Vec" }, "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" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2551,7 +2551,7 @@ "name": "Proposals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "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" + "Plain": "Vec" }, "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" + "Plain": "Vec" }, "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)" + "Plain": "(BlockNumber,u32,Vec)" }, "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" + "Plain": "Vec" }, "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" + "Plain": "Vec" }, "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" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ diff --git a/packages/metadata/src/Metadata/v8/static-substrate.json b/packages/metadata/src/Metadata/v8/static-substrate.json index bf4f0e5d89..5baffdba1a 100644 --- a/packages/metadata/src/Metadata/v8/static-substrate.json +++ b/packages/metadata/src/Metadata/v8/static-substrate.json @@ -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": [ @@ -93,7 +93,7 @@ "name": "Number", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00000000", "documentation": [ @@ -104,7 +104,7 @@ "name": "ParentHash", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ @@ -115,7 +115,7 @@ "name": "ExtrinsicsRoot", "modifier": 1, "type": { - "Type": "Hash" + "Plain": "Hash" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ @@ -126,7 +126,7 @@ "name": "Digest", "modifier": 1, "type": { - "Type": "DigestOf" + "Plain": "DigestOf" }, "fallback": "0x00", "documentation": [ @@ -137,7 +137,7 @@ "name": "Events", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -148,7 +148,7 @@ "name": "EventCount", "modifier": 1, "type": { - "Type": "EventIndex" + "Plain": "EventIndex" }, "fallback": "0x00000000", "documentation": [ @@ -347,7 +347,7 @@ "name": "EpochIndex", "modifier": 1, "type": { - "Type": "u64" + "Plain": "u64" }, "fallback": "0x0000000000000000", "documentation": [ @@ -358,7 +358,7 @@ "name": "Authorities", "modifier": 1, "type": { - "Type": "Vec<(AuthorityId,BabeAuthorityWeight)>" + "Plain": "Vec<(AuthorityId,BabeAuthorityWeight)>" }, "fallback": "0x00", "documentation": [ @@ -369,7 +369,7 @@ "name": "GenesisSlot", "modifier": 1, "type": { - "Type": "u64" + "Plain": "u64" }, "fallback": "0x0000000000000000", "documentation": [ @@ -381,7 +381,7 @@ "name": "CurrentSlot", "modifier": 1, "type": { - "Type": "u64" + "Plain": "u64" }, "fallback": "0x0000000000000000", "documentation": [ @@ -392,7 +392,7 @@ "name": "Randomness", "modifier": 1, "type": { - "Type": "[u8;32]" + "Plain": "[u8;32]" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ @@ -412,7 +412,7 @@ "name": "NextRandomness", "modifier": 1, "type": { - "Type": "[u8;32]" + "Plain": "[u8;32]" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ @@ -423,7 +423,7 @@ "name": "SegmentIndex", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -456,7 +456,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": [ @@ -569,7 +569,7 @@ "name": "Uncles", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -580,7 +580,7 @@ "name": "Author", "modifier": 0, "type": { - "Type": "AccountId" + "Plain": "AccountId" }, "fallback": "0x00", "documentation": [ @@ -591,7 +591,7 @@ "name": "DidSetUncles", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -627,7 +627,7 @@ "name": "NextEnumSet", "modifier": 1, "type": { - "Type": "AccountIndex" + "Plain": "AccountIndex" }, "fallback": "0x00000000", "documentation": [ @@ -680,7 +680,7 @@ "name": "TotalIssuance", "modifier": 1, "type": { - "Type": "Balance" + "Plain": "Balance" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -959,7 +959,7 @@ "name": "NextFeeMultiplier", "modifier": 1, "type": { - "Type": "Multiplier" + "Plain": "Multiplier" }, "fallback": "0x0000000000000000", "documentation": [] @@ -997,7 +997,7 @@ "name": "ValidatorCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -1008,7 +1008,7 @@ "name": "MinimumValidatorCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x04000000", "documentation": [ @@ -1019,7 +1019,7 @@ "name": "Invulnerables", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1134,7 +1134,7 @@ "name": "CurrentElected", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1145,7 +1145,7 @@ "name": "CurrentEra", "modifier": 1, "type": { - "Type": "EraIndex" + "Plain": "EraIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1156,7 +1156,7 @@ "name": "CurrentEraStart", "modifier": 1, "type": { - "Type": "MomentOf" + "Plain": "MomentOf" }, "fallback": "0x0000000000000000", "documentation": [ @@ -1167,7 +1167,7 @@ "name": "CurrentEraStartSessionIndex", "modifier": 1, "type": { - "Type": "SessionIndex" + "Plain": "SessionIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1178,7 +1178,7 @@ "name": "CurrentEraPointsEarned", "modifier": 1, "type": { - "Type": "EraPoints" + "Plain": "EraPoints" }, "fallback": "0x0000000000", "documentation": [ @@ -1189,7 +1189,7 @@ "name": "SlotStake", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1202,7 +1202,7 @@ "name": "ForceEra", "modifier": 1, "type": { - "Type": "Forcing" + "Plain": "Forcing" }, "fallback": "0x00", "documentation": [ @@ -1213,7 +1213,7 @@ "name": "SlashRewardFraction", "modifier": 1, "type": { - "Type": "Perbill" + "Plain": "Perbill" }, "fallback": "0x00000000", "documentation": [ @@ -1226,7 +1226,7 @@ "name": "CanceledSlashPayout", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x00000000000000000000000000000000", "documentation": [ @@ -1254,7 +1254,7 @@ "name": "BondedEras", "modifier": 1, "type": { - "Type": "Vec<(EraIndex,SessionIndex)>" + "Plain": "Vec<(EraIndex,SessionIndex)>" }, "fallback": "0x00", "documentation": [ @@ -1333,7 +1333,7 @@ "name": "EarliestUnappliedSlash", "modifier": 0, "type": { - "Type": "EraIndex" + "Plain": "EraIndex" }, "fallback": "0x00", "documentation": [ @@ -1344,7 +1344,7 @@ "name": "StorageVersion", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -1728,7 +1728,7 @@ "name": "Validators", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1739,7 +1739,7 @@ "name": "CurrentIndex", "modifier": 1, "type": { - "Type": "SessionIndex" + "Plain": "SessionIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1750,7 +1750,7 @@ "name": "QueuedChanged", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -1762,7 +1762,7 @@ "name": "QueuedKeys", "modifier": 1, "type": { - "Type": "Vec<(ValidatorId,Keys)>" + "Plain": "Vec<(ValidatorId,Keys)>" }, "fallback": "0x00", "documentation": [ @@ -1774,7 +1774,7 @@ "name": "DisabledValidators", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -1886,7 +1886,7 @@ "name": "PublicPropCount", "modifier": 1, "type": { - "Type": "PropIndex" + "Plain": "PropIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1897,7 +1897,7 @@ "name": "PublicProps", "modifier": 1, "type": { - "Type": "Vec<(PropIndex,Proposal,AccountId)>" + "Plain": "Vec<(PropIndex,Proposal,AccountId)>" }, "fallback": "0x00", "documentation": [ @@ -1924,7 +1924,7 @@ "name": "ReferendumCount", "modifier": 1, "type": { - "Type": "ReferendumIndex" + "Plain": "ReferendumIndex" }, "fallback": "0x00000000", "documentation": [ @@ -1935,7 +1935,7 @@ "name": "NextTally", "modifier": 1, "type": { - "Type": "ReferendumIndex" + "Plain": "ReferendumIndex" }, "fallback": "0x00000000", "documentation": [ @@ -2046,7 +2046,7 @@ "name": "LastTabledWasExternal", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -2058,7 +2058,7 @@ "name": "NextExternal", "modifier": 0, "type": { - "Type": "(Proposal,VoteThreshold)" + "Plain": "(Proposal,VoteThreshold)" }, "fallback": "0x00", "documentation": [ @@ -2541,7 +2541,7 @@ "name": "Proposals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2584,7 +2584,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2595,7 +2595,7 @@ "name": "Members", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2756,7 +2756,7 @@ "name": "Proposals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2799,7 +2799,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -2810,7 +2810,7 @@ "name": "Members", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -2971,7 +2971,7 @@ "name": "Members", "modifier": 1, "type": { - "Type": "Vec<(AccountId,BalanceOf)>" + "Plain": "Vec<(AccountId,BalanceOf)>" }, "fallback": "0x00", "documentation": [ @@ -2982,7 +2982,7 @@ "name": "RunnersUp", "modifier": 1, "type": { - "Type": "Vec<(AccountId,BalanceOf)>" + "Plain": "Vec<(AccountId,BalanceOf)>" }, "fallback": "0x00", "documentation": [ @@ -2993,7 +2993,7 @@ "name": "ElectionRounds", "modifier": 1, "type": { - "Type": "u32" + "Plain": "u32" }, "fallback": "0x00000000", "documentation": [ @@ -3036,7 +3036,7 @@ "name": "Candidates", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -3048,7 +3048,7 @@ "name": "DidMigrate", "modifier": 1, "type": { - "Type": "bool" + "Plain": "bool" }, "fallback": "0x00", "documentation": [ @@ -3254,7 +3254,7 @@ "name": "Members", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -3416,7 +3416,7 @@ "name": "Authorities", "modifier": 1, "type": { - "Type": "AuthorityList" + "Plain": "AuthorityList" }, "fallback": "0x00", "documentation": [ @@ -3430,7 +3430,7 @@ "name": "State", "modifier": 1, "type": { - "Type": "StoredState" + "Plain": "StoredState" }, "fallback": "0x00", "documentation": [ @@ -3441,7 +3441,7 @@ "name": "PendingChange", "modifier": 0, "type": { - "Type": "StoredPendingChange" + "Plain": "StoredPendingChange" }, "fallback": "0x00", "documentation": [ @@ -3452,7 +3452,7 @@ "name": "NextForced", "modifier": 0, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00", "documentation": [ @@ -3463,7 +3463,7 @@ "name": "Stalled", "modifier": 0, "type": { - "Type": "(BlockNumber,BlockNumber)" + "Plain": "(BlockNumber,BlockNumber)" }, "fallback": "0x00", "documentation": [ @@ -3474,7 +3474,7 @@ "name": "CurrentSetId", "modifier": 1, "type": { - "Type": "SetId" + "Plain": "SetId" }, "fallback": "0x0000000000000000", "documentation": [ @@ -3551,7 +3551,7 @@ "name": "ProposalCount", "modifier": 1, "type": { - "Type": "ProposalIndex" + "Plain": "ProposalIndex" }, "fallback": "0x00000000", "documentation": [ @@ -3578,7 +3578,7 @@ "name": "Approvals", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -3754,7 +3754,7 @@ "name": "GasSpent", "modifier": 1, "type": { - "Type": "Gas" + "Plain": "Gas" }, "fallback": "0x0000000000000000", "documentation": [ @@ -3765,7 +3765,7 @@ "name": "CurrentSchedule", "modifier": 1, "type": { - "Type": "Schedule" + "Plain": "Schedule" }, "fallback": "0x0000000001000000000000000100000000000000010000000000000001000000000000000100000000000000010000000000000001000000000000008700000000000000af0000000000000001000000000000000100000000000000040000000000010010000000004000000020000000", "documentation": [ @@ -3808,7 +3808,7 @@ "name": "AccountCounter", "modifier": 1, "type": { - "Type": "u64" + "Plain": "u64" }, "fallback": "0x0000000000000000", "documentation": [ @@ -3835,7 +3835,7 @@ "name": "GasPrice", "modifier": 1, "type": { - "Type": "BalanceOf" + "Plain": "BalanceOf" }, "fallback": "0x01000000000000000000000000000000", "documentation": [ @@ -4179,7 +4179,7 @@ "name": "Key", "modifier": 1, "type": { - "Type": "AccountId" + "Plain": "AccountId" }, "fallback": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ @@ -4298,7 +4298,7 @@ "name": "GossipAt", "modifier": 1, "type": { - "Type": "BlockNumber" + "Plain": "BlockNumber" }, "fallback": "0x00000000", "documentation": [ @@ -4309,7 +4309,7 @@ "name": "Keys", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ @@ -4495,7 +4495,7 @@ "name": "RandomMaterial", "modifier": 1, "type": { - "Type": "Vec" + "Plain": "Vec" }, "fallback": "0x00", "documentation": [ diff --git a/packages/types/src/interfaces/metadata/definitions.ts b/packages/types/src/interfaces/metadata/definitions.ts index e97bb581f4..3ee0a229c1 100644 --- a/packages/types/src/interfaces/metadata/definitions.ts +++ b/packages/types/src/interfaces/metadata/definitions.ts @@ -70,7 +70,7 @@ export default { }, StorageFunctionTypeV0: { _enum: { - Type: 'PlainTypeV0', + Plain: 'PlainTypeV0', Map: 'MapTypeV0' } }, diff --git a/packages/types/src/interfaces/metadata/types.ts b/packages/types/src/interfaces/metadata/types.ts index 9cec71cc4a..ea3e6b60de 100644 --- a/packages/types/src/interfaces/metadata/types.ts +++ b/packages/types/src/interfaces/metadata/types.ts @@ -417,10 +417,10 @@ export interface StorageFunctionModifierV5 extends StorageFunctionModifierV4 {} /** Enum */ export interface StorageFunctionTypeV0 extends Enum { - /** 0:: Type(PlainTypeV0) */ - readonly isType: boolean; + /** 0:: Plain(PlainTypeV0) */ + readonly isPlain: boolean; /** PlainTypeV0 */ - readonly asType: PlainTypeV0; + readonly asPlain: PlainTypeV0; /** 1:: Map(MapTypeV0) */ readonly isMap: boolean; /** MapTypeV0 */ diff --git a/packages/types/src/primitive/StorageKey.ts b/packages/types/src/primitive/StorageKey.ts index 7496c01f4e..aeb9520960 100644 --- a/packages/types/src/primitive/StorageKey.ts +++ b/packages/types/src/primitive/StorageKey.ts @@ -2,7 +2,7 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { AnyU8a, Registry } from '../types'; +import { AnyU8a, Codec, Registry } from '../types'; import { StorageEntryMetadata as MetaV8 } from '@polkadot/metadata/Metadata/v8/Storage'; import { assert, isFunction, isString, isU8a } from '@polkadot/util'; @@ -30,6 +30,41 @@ interface StorageKeyExtra { section: string; } +// eslint-disable-next-line @typescript-eslint/ban-types +type Text = String & Codec; + +interface StorageType { + asDoubleMap: { + value: Text; + }; + asMap: { + linked: { isTrue: boolean }; + key: Text; + value: Text; + }; + asPlain: Text; + isDoubleMap: boolean; + isMap: boolean; + isPlain: boolean; +} + +// we unwrap the type here, turning into an output usable for createType +export function unwrapStorageType (type: StorageType): string { + if (type.isDoubleMap) { + return `DoubleMap<${type.asDoubleMap.value.toString()}>`; + } + + if (type.isMap) { + if (type.asMap.linked.isTrue) { + return `(${type.asMap.value.toString()}, Linkage<${type.asMap.key.toString()}>)`; + } + + return type.asMap.value.toString(); + } + + return type.asPlain.toString(); +} + /** * @name StorageKey * @description @@ -105,11 +140,11 @@ export default class StorageKey extends Bytes { if (value instanceof StorageKey) { return value.outputType; } else if (isFunction(value)) { - return value.meta.type.toString(); + return unwrapStorageType(value.meta.type); } else if (Array.isArray(value)) { const [fn] = value; - return fn.meta.type.toString(); + return unwrapStorageType(fn.meta.type); } return undefined; diff --git a/packages/types/src/scripts/generateTypes/query.ts b/packages/types/src/scripts/generateTypes/query.ts index ca5a77b37b..30f5564005 100644 --- a/packages/types/src/scripts/generateTypes/query.ts +++ b/packages/types/src/scripts/generateTypes/query.ts @@ -16,10 +16,10 @@ import { TypeRegistry } from '@polkadot/types/codec'; // From a storage entry metadata, we return [args, returnType] function entrySignature (registry: Registry, storageEntry: StorageEntryMetadata, imports: TypeImports): [string, string] { - if (storageEntry.type.isPlainType) { - setImports(imports, [storageEntry.type.asType.toString()]); + if (storageEntry.type.isPlain) { + setImports(imports, [storageEntry.type.asPlain.toString()]); - return ['', formatType(storageEntry.type.asType.toString(), imports)]; + return ['', formatType(storageEntry.type.asPlain.toString(), imports)]; } else if (storageEntry.type.isMap) { // Find similar types of the `key` type const similarTypes = getSimilarTypes(registry, storageEntry.type.asMap.key.toString(), imports);