Compare commits

..
28 Commits
Author SHA1 Message Date
Github Actions 4ce7163bb1 [CI Skip] release/stable 6.5.1
skip-checks: true
2021-10-24 18:18:36 +00:00
Jaco 72fbd3f829 6.5.1 (#4102) 2021-10-24 20:58:36 +03:00
Github Actions f20fadb51c [CI Skip] release/beta 6.4.3-9
skip-checks: true
2021-10-23 12:36:20 +00:00
Jaco 0e0183dc99 Adjust raw toAscii output (#4097) 2021-10-23 15:16:07 +03:00
Github Actions fa71e129c2 [CI Skip] release/beta 6.4.3-8
skip-checks: true
2021-10-23 11:39:43 +00:00
Jaco cb68842da6 Bump metadata (& deps) (#4096)
* Bump metadata (& deps)

* Bump deps
2021-10-23 14:18:20 +03:00
Github Actions 44f348ecc5 [CI Skip] release/beta 6.4.3-7
skip-checks: true
2021-10-22 11:48:06 +00:00
Jaco 891a6106f0 Ensure rpcCore correctly decorates .raw (#4091)
* Ensure rpcCore correctly decorates .json/.raw

* .raw encoding changes + memoization
2021-10-22 14:25:46 +03:00
Github Actions 90fcc234a9 [CI Skip] release/beta 6.4.3-6
skip-checks: true
2021-10-22 05:55:01 +00:00
Jaco 72fcd97cdb Add typeName to TypeDef (#4089)
* Add typeName to TypeDef

* Sanitize typeName

* Export typeName inside fuction args meta

* Correct typeName extraction
2021-10-22 08:35:09 +03:00
Github Actions 2ded2052b7 [CI Skip] release/beta 6.4.3-5
skip-checks: true
2021-10-21 11:53:24 +00:00
Jaco a8da5707f2 Add palletVersion to queries (#4088)
* Add palletVersion to queries

* Re-use raw key creator

* types

* Re-adjust test
2021-10-21 14:36:54 +03:00
Github Actions f508668c46 [CI Skip] release/beta 6.4.3-4
skip-checks: true
2021-10-21 10:14:53 +00:00
Jaco 15ed0723f1 Adjust Node Websocket options (frame sizes) (#4087) 2021-10-21 12:54:25 +03:00
Github Actions c9b0502542 [CI Skip] release/beta 6.4.3-3
skip-checks: true
2021-10-21 04:55:24 +00:00
Jaco 0d5a841a81 Expose extracted type names in PortableRegistry 2021-10-21 07:33:10 +03:00
Github Actions e47b8c1e73 [CI Skip] release/beta 6.4.3-2
skip-checks: true
2021-10-21 03:28:36 +00:00
Nikos Kontakis 50fe50d1a8 Add auction in shared types (#4085) 2021-10-21 06:07:51 +03:00
Github Actions 9e4669b8b4 [CI Skip] release/beta 6.4.3-1
skip-checks: true
2021-10-19 06:09:04 +00:00
Jaco 1e383315e2 Adjust convertSiV0toV1 import location (#4082) 2021-10-19 08:47:06 +03:00
Github Actions 6f66eb2b66 [CI Skip] release/beta 6.4.3-0
skip-checks: true
2021-10-19 05:37:39 +00:00
Jaco 0864340ae2 Adjust xcm version mapping utility (#4081) 2021-10-19 08:21:07 +03:00
Github Actions a3f5c65b5d [CI Skip] release/stable 6.4.2
skip-checks: true
2021-10-18 16:53:12 +00:00
JacoandAlexander Popiak 7f94137b2d Ensure SignerPayload correctly serializes Option with None (#4079)
* Ensure `SignerPayload` correctly serializes `Option` with `None`

* patch

* Update CHANGELOG.md

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
2021-10-18 19:35:56 +03:00
Github Actions d65587f58d [CI Skip] release/beta 6.4.2-1
skip-checks: true
2021-10-18 14:24:15 +00:00
Jaco 8959455401 Add Eth Block{0, 1, 2} and TransactionV{0, 1, 2} (#4078)
* Add Eth Block{0, 1, 2} and TransactionV{0, 1, 2}

* CHANGELOG
2021-10-18 17:06:53 +03:00
Github Actions 8e40e38bd6 [CI Skip] release/beta 6.4.2-0
skip-checks: true
2021-10-18 11:49:20 +00:00
Jaco c646717576 Explicit tests for metadata re-serialization (#4077)
* Explicit tests for metadata re-serialization

* Skip re-serialized

* Add asCallsOnly tests
2021-10-18 14:25:45 +03:00
74 changed files with 1616 additions and 1167 deletions
+2
View File
@@ -39,3 +39,5 @@
6.0.4
6.0.5
6.1.2
6.4.2
+30
View File
@@ -1,5 +1,35 @@
# CHANGELOG
## 6.5.1 Oct 24, 2021
Contributed:
- Add `Auction` to Polkadot pre-0.9.11 `ProxyType` (Thnaks to https://github.com/wirednkod)
Changes:
- Ecah module now exposes the Substrate-added `palletVersion` storage item
- Adjust Websocket `maxReceivedFrameSize` under Node
- `TypeDef` structures now contain the `typeName` from metadata v14 on fields
- Fix browser bundle imports for xcm-mapping (move to `types-known`)
- Expose all extracted type names in `PortableRegistry`
- Adjust `toJSON` (Asicc) output detection on `Raw`
- Adjust `api.rpc.*.*.raw(..args)` return to the actual over-the-wire JSON result
- Remove `api.rpc.*.*.json(..args)` since it now overlaps with new `.raw`
- Bump static metadata for latest Substrate, Polkadot & Kusama
## 6.4.2 Oct 18, 2021
Upgrade priority: Low. Recommended for Westmint runtime 500+
Changes:
- Ensure `SignerPayload` correctly serializes `Option` with `None`
- Add Ethereum `BlockV{0, 1, 2}` types, aligning with latest Frontier
- Additional tests for metadata serialization/de-serialization
## 6.4.1 Oct 17, 2021
Upgrade priority: Low. Recommended for Kusama & Polkadot runtime 9110+
+3 -3
View File
@@ -29,12 +29,12 @@
"@babel/core": "^7.15.8",
"@babel/register": "^7.15.3",
"@babel/runtime": "^7.15.4",
"@polkadot/dev": "^0.63.3",
"@polkadot/ts": "^0.4.9",
"@polkadot/dev": "^0.63.6",
"@polkadot/ts": "^0.4.10",
"@polkadot/typegen": "workspace:packages/typegen",
"@types/jest": "^27.0.2",
"copyfiles": "^2.4.1"
},
"version": "6.4.1",
"version": "6.5.1",
"packageManager": "yarn@3.0.1"
}
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api-contract",
"version": "6.4.1",
"version": "6.5.1",
"type": "module",
"description": "Interfaces for interacting with contracts and contract ABIs",
"main": "index.js",
@@ -20,9 +20,9 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
"dependencies": {
"@babel/runtime": "^7.15.4",
"@polkadot/api": "6.4.1",
"@polkadot/types": "6.4.1",
"@polkadot/util": "^7.5.1",
"@polkadot/api": "6.5.1",
"@polkadot/types": "6.5.1",
"@polkadot/util": "^7.6.1",
"rxjs": "^7.4.0"
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
import type { ContractMetadataLatest, ContractMetadataV0 } from '@polkadot/types/interfaces';
import type { Registry } from '@polkadot/types/types';
import { convertSiV0toV1 } from '@polkadot/types/generic/PortableRegistry';
import { convertSiV0toV1 } from '@polkadot/types';
export function toLatest (registry: Registry, v0: ContractMetadataV0): ContractMetadataLatest {
return registry.createType('ContractMetadataLatest', {
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api-contract', version: '6.4.1' };
export const packageInfo = { name: '@polkadot/api-contract', version: '6.5.1' };
@@ -18,6 +18,7 @@
"lookupIndex": 1,
"lookupName": "RecursiveMyEnum",
"type": "Lookup1",
"typeName": "MyEnum",
"index": 1,
"name": "B"
}
+8 -8
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api-derive",
"version": "6.4.1",
"version": "6.5.1",
"type": "module",
"description": "Common functions used across Polkadot, derived from RPC calls and storage queries.",
"main": "index.js",
@@ -20,15 +20,15 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
"dependencies": {
"@babel/runtime": "^7.15.4",
"@polkadot/api": "6.4.1",
"@polkadot/rpc-core": "6.4.1",
"@polkadot/types": "6.4.1",
"@polkadot/util": "^7.5.1",
"@polkadot/util-crypto": "^7.5.1",
"@polkadot/api": "6.5.1",
"@polkadot/rpc-core": "6.5.1",
"@polkadot/types": "6.5.1",
"@polkadot/util": "^7.6.1",
"@polkadot/util-crypto": "^7.6.1",
"rxjs": "^7.4.0"
},
"devDependencies": {
"@polkadot/keyring": "^7.5.1",
"@polkadot/rpc-provider": "6.4.1"
"@polkadot/keyring": "^7.6.1",
"@polkadot/rpc-provider": "6.5.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api-derive', version: '6.4.1' };
export const packageInfo = { name: '@polkadot/api-derive', version: '6.5.1' };
+9 -9
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api",
"version": "6.4.1",
"version": "6.5.1",
"type": "module",
"description": "Promise and RxJS wrappers around the Polkadot JS RPC",
"main": "index.js",
@@ -20,14 +20,14 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
"dependencies": {
"@babel/runtime": "^7.15.4",
"@polkadot/api-derive": "6.4.1",
"@polkadot/keyring": "^7.5.1",
"@polkadot/rpc-core": "6.4.1",
"@polkadot/rpc-provider": "6.4.1",
"@polkadot/types": "6.4.1",
"@polkadot/types-known": "6.4.1",
"@polkadot/util": "^7.5.1",
"@polkadot/util-crypto": "^7.5.1",
"@polkadot/api-derive": "6.5.1",
"@polkadot/keyring": "^7.6.1",
"@polkadot/rpc-core": "6.5.1",
"@polkadot/rpc-provider": "6.5.1",
"@polkadot/types": "6.5.1",
"@polkadot/types-known": "6.5.1",
"@polkadot/util": "^7.6.1",
"@polkadot/util-crypto": "^7.6.1",
"eventemitter3": "^4.0.7",
"rxjs": "^7.4.0"
}
+11 -1
View File
@@ -108,7 +108,8 @@ declare module '@polkadot/api/types/events' {
**/
BalanceSet: AugmentedEvent<ApiType, [AccountId32, u128, u128]>;
/**
* Some amount was deposited (e.g. for transaction fees). \[who, deposit\]
* Some amount was deposited into the account (e.g. for transaction fees). \[who,
* deposit\]
**/
Deposit: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
@@ -130,6 +131,11 @@ declare module '@polkadot/api/types/events' {
* \[from, to, balance, destination_status\]
**/
ReserveRepatriated: AugmentedEvent<ApiType, [AccountId32, AccountId32, u128, FrameSupportTokensMiscBalanceStatus]>;
/**
* Some amount was removed from the account (e.g. for misbehavior). \[who,
* amount_slashed\]
**/
Slashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
* Transfer succeeded. \[from, to, value\]
**/
@@ -138,6 +144,10 @@ declare module '@polkadot/api/types/events' {
* Some balance was unreserved (moved from reserved to free). \[who, value\]
**/
Unreserved: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
* Some amount was withdrawn from the account (e.g. for transaction fees). \[who, value\]
**/
Withdraw: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
* Generic event
**/
+5 -1
View File
@@ -2567,9 +2567,13 @@ declare module '@polkadot/api/types/submittable' {
session: {
/**
* Removes any session key(s) of the function caller.
*
* This doesn't take effect until the next session.
*
* The dispatch origin of this function must be signed.
* The dispatch origin of this function must be Signed and the account must be either be
* convertible to a validator ID using the chain's typical addressing system (this usually
* means being a controller account) or directly convertible into a validator ID (which
* usually means being a stash account).
*
* # <weight>
* - Complexity: `O(1)` in number of key types. Actual cost depends on the number of length
+2 -4
View File
@@ -366,8 +366,6 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
if (this.hasSubscriptions || !(methodName.startsWith('subscribe') || methodName.startsWith('unsubscribe'))) {
(section as Record<string, unknown>)[methodName] = decorateMethod(method, { methodName }) as unknown;
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
(section as Record<string, { json: unknown }>)[methodName].json = decorateMethod(method.json, { methodName }) as unknown;
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
(section as Record<string, { raw: unknown }>)[methodName].raw = decorateMethod(method.raw, { methodName }) as unknown;
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
(section as Record<string, { meta: unknown }>)[methodName].meta = method.meta;
@@ -622,9 +620,9 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
return this._rpcCore.state
.queryStorage<[Option<Raw>]>([decorated.key(...args)], ...range)
.pipe(map((result: [Hash, [Option<Raw>]][]): [Hash, Codec][] =>
result.map(([blockHash, [value]]): [Hash, Codec] => [
result.map(([blockHash, [value]]) => [
blockHash,
this.createType(outputType, value.isSome ? value.unwrap().toHex() : undefined)
this.createType<Codec>(outputType, value.isSome ? value.unwrap().toHex() : undefined)
])
));
}
+4 -5
View File
@@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
import type { Observable, Subscription } from 'rxjs';
import type { RpcInterfaceMethod } from '@polkadot/rpc-core/types';
import type { Text } from '@polkadot/types';
import type { ChainProperties, Hash, RuntimeVersion } from '@polkadot/types/interfaces';
import type { Registry } from '@polkadot/types/types';
@@ -130,7 +129,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
const header = this.registry.createType('HeaderPartial',
this._genesisHash.eq(blockHash)
? { number: BN_ZERO, parentHash: this._genesisHash }
: await firstValueFrom((this._rpcCore.chain.getHeader as RpcInterfaceMethod).json(blockHash))
: await firstValueFrom(this._rpcCore.chain.getHeader.raw(blockHash))
);
assert(!header.parentHash.isEmpty, 'Unable to retrieve header and parent from supplied hash');
@@ -140,11 +139,11 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
const version = this.registry.createType('RuntimeVersionPartial',
(firstVersion && (lastVersion || firstVersion.specVersion.eq(this._runtimeVersion.specVersion)))
? { specName: this._runtimeVersion.specName, specVersion: firstVersion.specVersion }
: await firstValueFrom((this._rpcCore.state.getRuntimeVersion as RpcInterfaceMethod).json(header.parentHash))
: await firstValueFrom(this._rpcCore.state.getRuntimeVersion.raw(header.parentHash))
);
// check for pre-existing registries. We also check specName, e.g. it
// could be changed like in Westmint with upgrade from shell -> westmint
// could be changed like in Westmint with upgrade from shell -> westmint
const existingViaVersion = this.#registries.find(({ specName, specVersion }) =>
specName.eq(version.specName) &&
specVersion.eq(version.specVersion)
@@ -159,7 +158,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
// nothing has been found, construct new
const registry = new TypeRegistry(blockHash);
const metadata = new Metadata(registry,
await firstValueFrom((this._rpcCore.state.getMetadata as RpcInterfaceMethod).raw(header.parentHash))
await firstValueFrom(this._rpcCore.state.getMetadata.raw<string>(header.parentHash))
);
this._initRegistry(registry, this._runtimeChain as Text, version, metadata);
+1 -1
View File
@@ -182,7 +182,7 @@ export function detectedCapabilities (api: ApiInterfaceRx, blockHash?: Uint8Arra
},
extractResults<ExtractedC>(cResults, consts),
extractResults<ExtractedQ>(qResults, queries),
extractResults<ExtractedR>(rResults, raws)
extractResults<ExtractedR>(rResults.map((r) => api.registry.createType('Raw', r)), raws)
)
),
take(1),
+1 -3
View File
@@ -177,12 +177,10 @@ async function rpc (api: ApiPromise): Promise<void> {
});
// using json & raw
await api.rpc.chain.getBlock.json('0x123456');
await api.rpc.chain.getBlock.raw('0x123456');
// using raw subs
// eslint-disable-next-line @typescript-eslint/no-floating-promises
api.rpc.chain.subscribeNewHeads.raw((result: Uint8Array): void => {
await api.rpc.chain.subscribeNewHeads.raw((result: Uint8Array): void => {
console.log(result);
});
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api', version: '6.4.1' };
export const packageInfo = { name: '@polkadot/api', version: '6.5.1' };
+3 -7
View File
@@ -2,23 +2,19 @@
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { Json, Raw } from '@polkadot/types/codec';
import type { AnyFunction, Callback, DefinitionRpc } from '@polkadot/types/types';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { ApiTypes, PromiseResult, Push, RxResult, UnsubscribePromise } from './base';
export interface RpcRxResult<F extends AnyFunction> extends RxResult<F> {
json (...args: Parameters<F>): Observable<Json>;
raw (...args: Parameters<F>): Observable<Raw>;
raw <T> (...args: Parameters<F>): Observable<T>;
meta: DefinitionRpc;
}
export interface RpcPromiseResult<F extends AnyFunction> extends PromiseResult<F> {
json (...args: Parameters<F>): Promise<Json>;
json (...args: Push<Parameters<F>, Callback<Json>>): UnsubscribePromise;
raw (...args: Parameters<F>): Promise<Raw>;
raw (...args: Push<Parameters<F>, Callback<Raw>>): UnsubscribePromise;
raw <T> (...args: Parameters<F>): Promise<T>;
raw <T> (...args: Push<Parameters<F>, Callback<T>>): UnsubscribePromise;
meta: DefinitionRpc;
}
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/rpc-core",
"version": "6.4.1",
"version": "6.5.1",
"type": "module",
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
"main": "index.js",
@@ -20,12 +20,12 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
"dependencies": {
"@babel/runtime": "^7.15.4",
"@polkadot/rpc-provider": "6.4.1",
"@polkadot/types": "6.4.1",
"@polkadot/util": "^7.5.1",
"@polkadot/rpc-provider": "6.5.1",
"@polkadot/types": "6.5.1",
"@polkadot/util": "^7.6.1",
"rxjs": "^7.4.0"
},
"devDependencies": {
"@polkadot/keyring": "^7.5.1"
"@polkadot/keyring": "^7.6.1"
}
}
+21 -25
View File
@@ -24,8 +24,6 @@ interface StorageChangeSetJSON {
changes: [string, string | null][];
}
type OutputType = 'json' | 'raw' | 'scale';
const l = logger('rpc-core');
const EMPTY_META = {
@@ -183,44 +181,46 @@ export class RpcCore {
}, {} as RpcInterface[Section]);
}
private _memomize (creator: <T> (outputAs: OutputType) => (...values: unknown[]) => Observable<T>, def: DefinitionRpc): Memoized<RpcInterfaceMethod> {
const memoized = memoize(creator('scale') as RpcInterfaceMethod, {
getInstanceId: () => this.#instanceId
});
private _memomize (creator: <T> (isScale: boolean) => (...values: unknown[]) => Observable<T>, def: DefinitionRpc): Memoized<RpcInterfaceMethod> {
const memoOpts = { getInstanceId: () => this.#instanceId };
const memoized = memoize(creator(true) as RpcInterfaceMethod, memoOpts);
memoized.json = creator('json');
memoized.raw = creator('raw');
memoized.raw = memoize(creator(false), memoOpts);
memoized.meta = def;
return memoized;
}
private _formatResult <T> (isScale: boolean, registry: Registry, blockHash: string | Uint8Array | null | undefined, method: string, def: DefinitionRpc, params: Codec[], result: unknown): T {
return isScale
? this._formatOutput(registry, blockHash, method, def, params, result) as unknown as T
: result as T;
}
private _createMethodSend (section: string, method: string, def: DefinitionRpc): RpcInterfaceMethod {
const rpcName = def.endpoint || `${section}_${method}`;
const hashIndex = def.params.findIndex(({ isHistoric }) => isHistoric);
let memoized: null | Memoized<RpcInterfaceMethod> = null;
// execute the RPC call, doing a registry swap for historic as applicable
const callWithRegistry = async <T> (outputAs: OutputType, values: unknown[]): Promise<T> => {
const callWithRegistry = async <T> (isScale: boolean, values: unknown[]): Promise<T> => {
const blockHash = hashIndex === -1
? null
: values[hashIndex] as (Uint8Array | string | null | undefined);
const { registry } = outputAs === 'scale' && blockHash && this.#getBlockRegistry
const { registry } = isScale && blockHash && this.#getBlockRegistry
? await this.#getBlockRegistry(u8aToU8a(blockHash))
: { registry: this.#registryDefault };
const params = this._formatInputs(registry, null, def, values);
const data = await this.provider.send<AnyJson>(rpcName, params.map((param) => param.toJSON()));
const result = await this.provider.send<AnyJson>(rpcName, params.map((p) => p.toJSON()));
return outputAs === 'scale'
? this._formatOutput(registry, blockHash, method, def, params, data) as unknown as T
: registry.createType(outputAs === 'raw' ? 'Raw' : 'Json', data) as unknown as T;
return this._formatResult(isScale, registry, blockHash, method, def, params, result);
};
const creator = <T> (outputAs: OutputType) => (...values: unknown[]): Observable<T> => {
const isDelayed = outputAs === 'scale' && hashIndex !== -1 && !!values[hashIndex];
const creator = <T> (isScale: boolean) => (...values: unknown[]): Observable<T> => {
const isDelayed = isScale && hashIndex !== -1 && !!values[hashIndex];
return new Observable((observer: Observer<T>): VoidCallback => {
callWithRegistry<T>(outputAs, values)
callWithRegistry<T>(isScale, values)
.then((value): void => {
observer.next(value);
observer.complete();
@@ -269,7 +269,7 @@ export class RpcCore {
const subType = `${section}_${updateType}`;
let memoized: null | Memoized<RpcInterfaceMethod> = null;
const creator = <T> (outputAs: OutputType) => (...values: unknown[]): Observable<T> => {
const creator = <T> (isScale: boolean) => (...values: unknown[]): Observable<T> => {
return new Observable((observer: Observer<T>): VoidCallback => {
// Have at least an empty promise, as used in the unsubscribe
let subscriptionPromise: Promise<number | string | null> = Promise.resolve(null);
@@ -283,9 +283,9 @@ export class RpcCore {
try {
const params = this._formatInputs(registry, null, def, values);
const paramsJson = params.map((param) => param.toJSON());
const paramsJson = params.map((p) => p.toJSON());
const update = (error?: Error | null, result?: T): void => {
const update = (error?: Error | null, result?: unknown): void => {
if (error) {
logErrorMessage(method, def, error);
@@ -293,11 +293,7 @@ export class RpcCore {
}
try {
observer.next(
outputAs === 'scale'
? this._formatOutput(registry, null, method, def, params, result) as unknown as T
: registry.createType(outputAs === 'raw' ? 'Raw' : 'Json', result) as unknown as T
);
observer.next(this._formatResult(isScale, registry, null, method, def, params, result));
} catch (error) {
observer.error(error);
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/rpc-core', version: '6.4.1' };
export const packageInfo = { name: '@polkadot/rpc-core', version: '6.5.1' };
+4 -1
View File
@@ -3,9 +3,12 @@
// FIXME, this whole file needs to move to API
import type { Observable } from 'rxjs';
import type { AnyFunction } from '@polkadot/types/types';
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface RpcInterface {}
export type AugmentedRpc<F extends AnyFunction> = F;
export type AugmentedRpc<F extends AnyFunction> = F & {
raw: <T> (...params: Parameters<F>) => Observable<T>;
};
+1 -3
View File
@@ -2,14 +2,12 @@
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { Json, Raw } from '@polkadot/types';
import type { Codec, DefinitionRpc } from '@polkadot/types/types';
export * from './types.jsonrpc';
export interface RpcInterfaceMethod {
<T extends Codec> (...params: unknown[]): Observable<T>;
json (...params: unknown[]): Observable<Json>;
raw (...params: unknown[]): Observable<Raw>;
raw (...params: unknown[]): Observable<unknown>;
meta: DefinitionRpc;
}
+11 -11
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/rpc-provider",
"version": "6.4.1",
"version": "6.5.1",
"type": "module",
"description": "Transport providers for the API",
"main": "index.js",
@@ -20,18 +20,18 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
"dependencies": {
"@babel/runtime": "^7.15.4",
"@polkadot/types": "6.4.1",
"@polkadot/util": "^7.5.1",
"@polkadot/util-crypto": "^7.5.1",
"@polkadot/x-fetch": "^7.5.1",
"@polkadot/x-global": "^7.5.1",
"@polkadot/x-ws": "^7.5.1",
"@polkadot/types": "6.5.1",
"@polkadot/util": "^7.6.1",
"@polkadot/util-crypto": "^7.6.1",
"@polkadot/x-fetch": "^7.6.1",
"@polkadot/x-global": "^7.6.1",
"@polkadot/x-ws": "^7.6.1",
"eventemitter3": "^4.0.7"
},
"devDependencies": {
"@polkadot/keyring": "^7.5.1",
"@polkadot/types": "6.4.1",
"mock-socket": "^9.0.5",
"nock": "^13.1.3"
"@polkadot/keyring": "^7.6.1",
"@polkadot/types": "6.5.1",
"mock-socket": "^9.0.6",
"nock": "^13.1.4"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/rpc-provider', version: '6.4.1' };
export const packageInfo = { name: '@polkadot/rpc-provider', version: '6.5.1' };
+7 -3
View File
@@ -40,6 +40,8 @@ const ALIASES: { [index: string]: string } = {
const RETRY_DELAY = 2500;
const MEGABYTE = 1024 * 1024;
const l = logger('api-ws');
function eraseRecord<T> (record: Record<string, T>, cb?: (item: T) => void): void {
@@ -179,9 +181,11 @@ export class WsProvider implements ProviderInterface {
// default: true
fragmentOutgoingMessages: true,
// default: 16K (bump, the Node has issues with too many fragments, e.g. on setCode)
fragmentationThreshold: 256 * 1024,
// default: 8MB (however Polkadot api.query.staking.erasStakers.entries(356) is over that)
maxReceivedMessageSize: 16 * 1024 * 1024
fragmentationThreshold: 1 * MEGABYTE,
// default: 1MiB (also align with maxReceivedMessageSize)
maxReceivedFrameSize: 24 * MEGABYTE,
// default: 8MB (however Polkadot api.query.staking.erasStakers.entries(356) is over that, 16M is ok there)
maxReceivedMessageSize: 24 * MEGABYTE
});
this.#websocket.onclose = this.#onSocketClose;
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/typegen",
"version": "6.4.1",
"version": "6.5.1",
"type": "module",
"description": "Type generation scripts",
"main": "index.js",
@@ -29,11 +29,11 @@
"@babel/core": "^7.15.8",
"@babel/register": "^7.15.3",
"@babel/runtime": "^7.15.4",
"@polkadot/api": "6.4.1",
"@polkadot/rpc-provider": "6.4.1",
"@polkadot/types": "6.4.1",
"@polkadot/types-support": "6.4.1",
"@polkadot/util": "^7.5.1",
"@polkadot/api": "6.5.1",
"@polkadot/rpc-provider": "6.5.1",
"@polkadot/types": "6.5.1",
"@polkadot/types-support": "6.5.1",
"@polkadot/util": "^7.6.1",
"handlebars": "^4.7.7",
"websocket": "^1.0.34",
"yargs": "^17.2.1"
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/typegen', version: '6.4.1' };
export const packageInfo = { name: '@polkadot/typegen', version: '6.5.1' };
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/types-known",
"version": "6.4.1",
"version": "6.5.1",
"type": "module",
"description": "Known type definitions",
"main": "index.js",
@@ -20,8 +20,8 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-known#readme",
"dependencies": {
"@babel/runtime": "^7.15.4",
"@polkadot/networks": "^7.5.1",
"@polkadot/types": "6.4.1",
"@polkadot/util": "^7.5.1"
"@polkadot/networks": "^7.6.1",
"@polkadot/types": "6.5.1",
"@polkadot/util": "^7.6.1"
}
}
+2 -1
View File
@@ -16,6 +16,7 @@ import upgrades from './upgrades';
export { knownOrigins } from './knownOrigins';
export { packageInfo } from './packageInfo';
export { mapXcmTypes } from './xcm';
// flatten a VersionedType[] into a Record<string, string>
/** @internal */
@@ -120,7 +121,7 @@ export function getUpgradeVersion (genesisHash: Hash, blockNumber: BN): [ChainUp
return known
? [
known.versions.reduce((last: ChainUpgradeVersion | undefined, version): ChainUpgradeVersion | undefined => {
known.versions.reduce<ChainUpgradeVersion | undefined>((last, version) => {
return blockNumber.gt(version.blockNumber)
? version
: last;
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/types-known', version: '6.4.1' };
export const packageInfo = { name: '@polkadot/types-known', version: '6.5.1' };
+3 -3
View File
@@ -5,7 +5,7 @@
import type { OverrideVersionedType } from '@polkadot/types/types';
import { mapXcm } from '@polkadot/types/interfaces/xcm/definitions';
import { mapXcmTypes } from '../xcm';
const sharedTypes = {
CompactAssignments: 'CompactAssignmentsWith24',
@@ -196,7 +196,7 @@ const versioned: OverrideVersionedType[] = [
minmax: [9010, 9099],
types: {
...sharedTypes,
...mapXcm('V0')
...mapXcmTypes('V0')
}
},
{
@@ -204,7 +204,7 @@ const versioned: OverrideVersionedType[] = [
minmax: [9100, 9105],
types: {
...sharedTypes,
...mapXcm('V1')
...mapXcmTypes('V1')
}
},
{
+2 -1
View File
@@ -17,7 +17,8 @@ const sharedTypes = {
Staking: 3,
UnusedSudoBalances: 4,
IdentityJudgement: 5,
CancelProxy: 6
CancelProxy: 6,
Auction: 7
}
}
};
+3 -3
View File
@@ -5,7 +5,7 @@
import type { OverrideVersionedType } from '@polkadot/types/types';
import { mapXcm } from '@polkadot/types/interfaces/xcm/definitions';
import { mapXcmTypes } from '../xcm';
// structs need to be in order
/* eslint-disable sort-keys */
@@ -43,14 +43,14 @@ const versioned: OverrideVersionedType[] = [
minmax: [229, 9099],
types: {
...sharedTypes,
...mapXcm('V0')
...mapXcmTypes('V0')
}
},
{
minmax: [9100, 9105],
types: {
...sharedTypes,
...mapXcm('V1')
...mapXcmTypes('V1')
}
},
{
+3 -3
View File
@@ -5,7 +5,7 @@
import type { OverrideVersionedType } from '@polkadot/types/types';
import { mapXcm } from '@polkadot/types/interfaces/xcm/definitions';
import { mapXcmTypes } from '../xcm';
const sharedTypes = {
TAssetBalance: 'u128',
@@ -28,14 +28,14 @@ const versioned: OverrideVersionedType[] = [
minmax: [0, 3],
types: {
...sharedTypes,
...mapXcm('V0')
...mapXcmTypes('V0')
}
},
{
minmax: [4, 5],
types: {
...sharedTypes,
...mapXcm('V1')
...mapXcmTypes('V1')
}
},
{
+3 -3
View File
@@ -5,7 +5,7 @@
import type { OverrideVersionedType } from '@polkadot/types/types';
import { mapXcm } from '@polkadot/types/interfaces/xcm/definitions';
import { mapXcmTypes } from '../xcm';
const sharedTypes = {
// 16 validators
@@ -94,14 +94,14 @@ const versioned: OverrideVersionedType[] = [
minmax: [50, 9099],
types: {
...sharedTypes,
...mapXcm('V0')
...mapXcmTypes('V0')
}
},
{
minmax: [9100, 9105],
types: {
...sharedTypes,
...mapXcm('V1')
...mapXcmTypes('V1')
}
},
{
+11
View File
@@ -0,0 +1,11 @@
// Copyright 2017-2021 @polkadot/types-known authors & contributors
// SPDX-License-Identifier: Apache-2.0
export const XCM_MAPPINGS = ['AssetInstance', 'Fungibility', 'Junction', 'Junctions', 'MultiAsset', 'MultiAssetFilter', 'MultiLocation', 'Response', 'WildFungibility', 'WildMultiAsset', 'Xcm', 'XcmError', 'XcmOrder'];
export function mapXcmTypes (version: 'V0' | 'V1' | 'V2'): Record<string, string> {
return XCM_MAPPINGS.reduce<Record<string, string>>((all, key) => ({
...all,
[key]: `${key}${version}`
}), {});
}
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/types-support",
"version": "6.4.1",
"version": "6.5.1",
"type": "module",
"description": "Supporting files for types, mostly for testing",
"main": "index.js",
@@ -20,6 +20,6 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-support#readme",
"dependencies": {
"@babel/runtime": "^7.15.4",
"@polkadot/util": "^7.5.1"
"@polkadot/util": "^7.6.1"
}
}
File diff suppressed because one or more lines are too long
@@ -265,7 +265,7 @@
{
"name": "Version",
"type": 159,
"value": "0x186b7573616d61347061726974792d6b7573616d6102000000962300000000000038df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0100000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a80100000007000000",
"value": "0x186b7573616d61347061726974792d6b7573616d6102000000a02300000000000038df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0100000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a80100000007000000",
"docs": [
" Get the chain's current version."
]
@@ -1586,7 +1586,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -1708,27 +1708,6 @@
"A balance was set by root. \\[who, free, reserved\\]"
]
},
{
"name": "Deposit",
"fields": [
{
"name": null,
"type": 0,
"typeName": "T::AccountId",
"docs": []
},
{
"name": null,
"type": 6,
"typeName": "T::Balance",
"docs": []
}
],
"index": 4,
"docs": [
"Some amount was deposited (e.g. for transaction fees). \\[who, deposit\\]"
]
},
{
"name": "Reserved",
"fields": [
@@ -1745,7 +1724,7 @@
"docs": []
}
],
"index": 5,
"index": 4,
"docs": [
"Some balance was reserved (moved from free to reserved). \\[who, value\\]"
]
@@ -1766,7 +1745,7 @@
"docs": []
}
],
"index": 6,
"index": 5,
"docs": [
"Some balance was unreserved (moved from reserved to free). \\[who, value\\]"
]
@@ -1799,18 +1778,83 @@
"docs": []
}
],
"index": 7,
"index": 6,
"docs": [
"Some balance was moved from the reserve of the first account to the second account.",
"Final argument indicates the destination balance type.",
"\\[from, to, balance, destination_status\\]"
]
},
{
"name": "Deposit",
"fields": [
{
"name": null,
"type": 0,
"typeName": "T::AccountId",
"docs": []
},
{
"name": null,
"type": 6,
"typeName": "T::Balance",
"docs": []
}
],
"index": 7,
"docs": [
"Some amount was deposited into the account (e.g. for transaction fees). \\[who,",
"deposit\\]"
]
},
{
"name": "Withdraw",
"fields": [
{
"name": null,
"type": 0,
"typeName": "T::AccountId",
"docs": []
},
{
"name": null,
"type": 6,
"typeName": "T::Balance",
"docs": []
}
],
"index": 8,
"docs": [
"Some amount was withdrawn from the account (e.g. for transaction fees). \\[who, value\\]"
]
},
{
"name": "Slashed",
"fields": [
{
"name": null,
"type": 0,
"typeName": "T::AccountId",
"docs": []
},
{
"name": null,
"type": 6,
"typeName": "T::Balance",
"docs": []
}
],
"index": 9,
"docs": [
"Some amount was removed from the account (e.g. for misbehavior). \\[who,",
"amount_slashed\\]"
]
}
]
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -2097,7 +2141,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -2190,7 +2234,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -2241,7 +2285,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -2379,7 +2423,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -2943,7 +2987,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -3263,7 +3307,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -3483,7 +3527,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -3620,7 +3664,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -3724,7 +3768,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -3877,7 +3921,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -3930,7 +3974,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -4026,7 +4070,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -4269,7 +4313,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -4590,7 +4634,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -4802,7 +4846,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -5085,7 +5129,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -5313,7 +5357,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -5501,7 +5545,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -5625,7 +5669,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -5764,7 +5808,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -6000,7 +6044,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -6052,7 +6096,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -6171,7 +6215,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -6593,7 +6637,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -6688,7 +6732,7 @@
],
"index": 3,
"docs": [
"The weight limit for handling downward messages was reached.",
"The weight limit for handling upward messages was reached.",
"\\[ id, remaining, required \\]"
]
},
@@ -6716,7 +6760,7 @@
],
"index": 4,
"docs": [
"Some downward messages have been received and will be processed.",
"Some upward messages have been received and will be processed.",
"\\[ para, count, size \\]"
]
},
@@ -6750,7 +6794,7 @@
],
"index": 5,
"docs": [
"The weight budget was exceeded for an individual downward message.",
"The weight budget was exceeded for an individual upward message.",
"",
"This message can be later dispatched manually using `service_overweight` dispatchable",
"using the assigned `overweight_index`.",
@@ -6776,7 +6820,7 @@
],
"index": 6,
"docs": [
"Downward message from the overweight queue was executed with the given actual weight",
"Upward message from the overweight queue was executed with the given actual weight",
"used.",
"",
"\\[ overweight_index, used \\]"
@@ -6786,7 +6830,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -7163,7 +7207,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -7270,7 +7314,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -7359,7 +7403,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -7569,7 +7613,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -7788,7 +7832,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -8249,7 +8293,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -12410,7 +12454,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -12753,7 +12797,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -13431,7 +13475,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -13793,7 +13837,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -15557,7 +15601,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -15863,9 +15907,13 @@
"index": 1,
"docs": [
"Removes any session key(s) of the function caller.",
"",
"This doesn't take effect until the next session.",
"",
"The dispatch origin of this function must be signed.",
"The dispatch origin of this function must be Signed and the account must be either be",
"convertible to a validator ID using the chain's typical addressing system (this usually",
"means being a controller account) or directly convertible into a validator ID (which",
"usually means being a stash account).",
"",
"# <weight>",
"- Complexity: `O(1)` in number of key types. Actual cost depends on the number of length",
@@ -16639,7 +16687,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -17107,7 +17155,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -18716,7 +18764,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -29062,7 +29110,7 @@
"This cancels a pending open channel request. It can be canceled be either of the sender",
"or the recipient for that request. The origin must be either of those.",
"",
"The cancelling happens immediately. It is not possible to cancel the request if it is",
"The cancellation happens immediately. It is not possible to cancel the request if it is",
"already accepted."
]
}
@@ -33228,7 +33276,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -33371,7 +33419,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -33633,7 +33681,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -33678,7 +33726,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -33937,7 +33985,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -33970,7 +34018,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -34413,7 +34461,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -34820,7 +34868,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -35075,7 +35123,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -35782,7 +35830,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -36089,7 +36137,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -36309,7 +36357,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -36574,7 +36622,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -36723,7 +36771,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -37400,7 +37448,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -37792,7 +37840,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -38139,7 +38187,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -38285,7 +38333,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -38958,7 +39006,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -39110,7 +39158,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -39527,7 +39575,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -39798,7 +39846,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -39893,7 +39941,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -40058,7 +40106,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -40418,7 +40466,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -40885,7 +40933,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
File diff suppressed because one or more lines are too long
@@ -265,7 +265,7 @@
{
"name": "Version",
"type": 121,
"value": "0x20706f6c6b61646f743c7061726974792d706f6c6b61646f7400000000962300000000000038df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0100000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a80100000008000000",
"value": "0x20706f6c6b61646f743c7061726974792d706f6c6b61646f7400000000a02300000000000038df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0100000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a80100000008000000",
"docs": [
" Get the chain's current version."
]
@@ -1731,7 +1731,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -1853,27 +1853,6 @@
"A balance was set by root. \\[who, free, reserved\\]"
]
},
{
"name": "Deposit",
"fields": [
{
"name": null,
"type": 0,
"typeName": "T::AccountId",
"docs": []
},
{
"name": null,
"type": 6,
"typeName": "T::Balance",
"docs": []
}
],
"index": 4,
"docs": [
"Some amount was deposited (e.g. for transaction fees). \\[who, deposit\\]"
]
},
{
"name": "Reserved",
"fields": [
@@ -1890,7 +1869,7 @@
"docs": []
}
],
"index": 5,
"index": 4,
"docs": [
"Some balance was reserved (moved from free to reserved). \\[who, value\\]"
]
@@ -1911,7 +1890,7 @@
"docs": []
}
],
"index": 6,
"index": 5,
"docs": [
"Some balance was unreserved (moved from reserved to free). \\[who, value\\]"
]
@@ -1944,18 +1923,83 @@
"docs": []
}
],
"index": 7,
"index": 6,
"docs": [
"Some balance was moved from the reserve of the first account to the second account.",
"Final argument indicates the destination balance type.",
"\\[from, to, balance, destination_status\\]"
]
},
{
"name": "Deposit",
"fields": [
{
"name": null,
"type": 0,
"typeName": "T::AccountId",
"docs": []
},
{
"name": null,
"type": 6,
"typeName": "T::Balance",
"docs": []
}
],
"index": 7,
"docs": [
"Some amount was deposited into the account (e.g. for transaction fees). \\[who,",
"deposit\\]"
]
},
{
"name": "Withdraw",
"fields": [
{
"name": null,
"type": 0,
"typeName": "T::AccountId",
"docs": []
},
{
"name": null,
"type": 6,
"typeName": "T::Balance",
"docs": []
}
],
"index": 8,
"docs": [
"Some amount was withdrawn from the account (e.g. for transaction fees). \\[who, value\\]"
]
},
{
"name": "Slashed",
"fields": [
{
"name": null,
"type": 0,
"typeName": "T::AccountId",
"docs": []
},
{
"name": null,
"type": 6,
"typeName": "T::Balance",
"docs": []
}
],
"index": 9,
"docs": [
"Some amount was removed from the account (e.g. for misbehavior). \\[who,",
"amount_slashed\\]"
]
}
]
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -2242,7 +2286,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -2335,7 +2379,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -2386,7 +2430,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -2524,7 +2568,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -3088,7 +3132,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -3346,7 +3390,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -3566,7 +3610,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -3703,7 +3747,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -3807,7 +3851,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -3960,7 +4004,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -4013,7 +4057,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -4114,7 +4158,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -4172,7 +4216,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -4415,7 +4459,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -4550,7 +4594,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -4778,7 +4822,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -4966,7 +5010,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -5090,7 +5134,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -5229,7 +5273,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -5435,7 +5479,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -5857,7 +5901,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -5952,7 +5996,7 @@
],
"index": 3,
"docs": [
"The weight limit for handling downward messages was reached.",
"The weight limit for handling upward messages was reached.",
"\\[ id, remaining, required \\]"
]
},
@@ -5980,7 +6024,7 @@
],
"index": 4,
"docs": [
"Some downward messages have been received and will be processed.",
"Some upward messages have been received and will be processed.",
"\\[ para, count, size \\]"
]
},
@@ -6014,7 +6058,7 @@
],
"index": 5,
"docs": [
"The weight budget was exceeded for an individual downward message.",
"The weight budget was exceeded for an individual upward message.",
"",
"This message can be later dispatched manually using `service_overweight` dispatchable",
"using the assigned `overweight_index`.",
@@ -6040,7 +6084,7 @@
],
"index": 6,
"docs": [
"Downward message from the overweight queue was executed with the given actual weight",
"Upward message from the overweight queue was executed with the given actual weight",
"used.",
"",
"\\[ overweight_index, used \\]"
@@ -6050,7 +6094,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -6427,7 +6471,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -6534,7 +6578,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -6623,7 +6667,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -6833,7 +6877,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -7052,7 +7096,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -10975,9 +11019,13 @@
"index": 1,
"docs": [
"Removes any session key(s) of the function caller.",
"",
"This doesn't take effect until the next session.",
"",
"The dispatch origin of this function must be signed.",
"The dispatch origin of this function must be Signed and the account must be either be",
"convertible to a validator ID using the chain's typical addressing system (this usually",
"means being a controller account) or directly convertible into a validator ID (which",
"usually means being a stash account).",
"",
"# <weight>",
"- Complexity: `O(1)` in number of key types. Actual cost depends on the number of length",
@@ -20612,7 +20660,7 @@
"This cancels a pending open channel request. It can be canceled be either of the sender",
"or the recipient for that request. The origin must be either of those.",
"",
"The cancelling happens immediately. It is not possible to cancel the request if it is",
"The cancellation happens immediately. It is not possible to cancel the request if it is",
"already accepted."
]
}
@@ -21956,7 +22004,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -22182,7 +22230,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -22262,7 +22310,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -22591,7 +22639,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -22860,7 +22908,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -23643,7 +23691,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -24065,7 +24113,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -24312,7 +24360,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -25094,7 +25142,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -25293,7 +25341,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -25436,7 +25484,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -25698,7 +25746,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -25743,7 +25791,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -26002,7 +26050,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -26177,7 +26225,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -26620,7 +26668,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -26927,7 +26975,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -27147,7 +27195,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -27412,7 +27460,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -27561,7 +27609,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -28291,7 +28339,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -28638,7 +28686,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -28784,7 +28832,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -29457,7 +29505,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -29609,7 +29657,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -30026,7 +30074,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -30297,7 +30345,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -30392,7 +30440,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -30557,7 +30605,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -30917,7 +30965,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
File diff suppressed because one or more lines are too long
@@ -265,7 +265,7 @@
{
"name": "Version",
"type": 112,
"value": "0x106e6f6465387375627374726174652d6e6f64650a0000000b0100000100000034df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000bc9d89904f5b923f0100000068b66ba122c93fa70100000037c8bb1350a9a2a80100000091d5df18b0d2cf5801000000ab3c0572291feb8b0100000002000000",
"value": "0x106e6f6465387375627374726174652d6e6f64650a0000000c0100000000000034df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000bc9d89904f5b923f0100000068b66ba122c93fa70100000037c8bb1350a9a2a80100000091d5df18b0d2cf5801000000ab3c0572291feb8b0100000002000000",
"docs": [
" Get the chain's current version."
]
@@ -1510,7 +1510,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -1592,7 +1592,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -1714,27 +1714,6 @@
"A balance was set by root. \\[who, free, reserved\\]"
]
},
{
"name": "Deposit",
"fields": [
{
"name": null,
"type": 0,
"typeName": "T::AccountId",
"docs": []
},
{
"name": null,
"type": 6,
"typeName": "T::Balance",
"docs": []
}
],
"index": 4,
"docs": [
"Some amount was deposited (e.g. for transaction fees). \\[who, deposit\\]"
]
},
{
"name": "Reserved",
"fields": [
@@ -1751,7 +1730,7 @@
"docs": []
}
],
"index": 5,
"index": 4,
"docs": [
"Some balance was reserved (moved from free to reserved). \\[who, value\\]"
]
@@ -1772,7 +1751,7 @@
"docs": []
}
],
"index": 6,
"index": 5,
"docs": [
"Some balance was unreserved (moved from reserved to free). \\[who, value\\]"
]
@@ -1805,18 +1784,83 @@
"docs": []
}
],
"index": 7,
"index": 6,
"docs": [
"Some balance was moved from the reserve of the first account to the second account.",
"Final argument indicates the destination balance type.",
"\\[from, to, balance, destination_status\\]"
]
},
{
"name": "Deposit",
"fields": [
{
"name": null,
"type": 0,
"typeName": "T::AccountId",
"docs": []
},
{
"name": null,
"type": 6,
"typeName": "T::Balance",
"docs": []
}
],
"index": 7,
"docs": [
"Some amount was deposited into the account (e.g. for transaction fees). \\[who,",
"deposit\\]"
]
},
{
"name": "Withdraw",
"fields": [
{
"name": null,
"type": 0,
"typeName": "T::AccountId",
"docs": []
},
{
"name": null,
"type": 6,
"typeName": "T::Balance",
"docs": []
}
],
"index": 8,
"docs": [
"Some amount was withdrawn from the account (e.g. for transaction fees). \\[who, value\\]"
]
},
{
"name": "Slashed",
"fields": [
{
"name": null,
"type": 0,
"typeName": "T::AccountId",
"docs": []
},
{
"name": null,
"type": 6,
"typeName": "T::Balance",
"docs": []
}
],
"index": 9,
"docs": [
"Some amount was removed from the account (e.g. for misbehavior). \\[who,",
"amount_slashed\\]"
]
}
]
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -1987,7 +2031,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -2340,7 +2384,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -2376,7 +2420,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -2756,7 +2800,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -3076,7 +3120,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -3285,7 +3329,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -3422,7 +3466,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -3526,7 +3570,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -3577,7 +3621,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -3805,7 +3849,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -3956,7 +4000,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -4026,7 +4070,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -4089,7 +4133,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -4573,7 +4617,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -4894,7 +4938,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -5106,7 +5150,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -5389,7 +5433,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -5599,7 +5643,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -5787,7 +5831,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -5911,7 +5955,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -6389,7 +6433,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -6472,7 +6516,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -6635,7 +6679,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -7206,7 +7250,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -7424,7 +7468,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -7476,7 +7520,7 @@
}
},
"docs": [
"\n\t\t\tThe [event](https://substrate.dev/docs/en/knowledgebase/runtime/events) emitted\n\t\t\tby this pallet.\n\t\t\t"
"\n\t\t\tThe [event](https://docs.substrate.io/v3/runtime/events-and-errors) emitted\n\t\t\tby this pallet.\n\t\t\t"
]
}
},
@@ -12158,9 +12202,13 @@
"index": 1,
"docs": [
"Removes any session key(s) of the function caller.",
"",
"This doesn't take effect until the next session.",
"",
"The dispatch origin of this function must be signed.",
"The dispatch origin of this function must be Signed and the account must be either be",
"convertible to a validator ID using the chain's typical addressing system (this usually",
"means being a controller account) or directly convertible into a validator ID (which",
"usually means being a stash account).",
"",
"# <weight>",
"- Complexity: `O(1)` in number of key types. Actual cost depends on the number of length",
@@ -22124,7 +22172,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -22350,7 +22398,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -22506,7 +22554,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -22586,7 +22634,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -22915,7 +22963,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -24244,7 +24292,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -25156,7 +25204,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -25355,7 +25403,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -25498,7 +25546,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -25760,7 +25808,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -25805,7 +25853,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -26044,7 +26092,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -27410,7 +27458,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -27690,7 +27738,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -28186,7 +28234,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -28593,7 +28641,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -28848,7 +28896,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -29453,7 +29501,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -29760,7 +29808,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -29980,7 +30028,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -30245,7 +30293,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -30394,7 +30442,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -30785,7 +30833,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -30949,7 +30997,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -31193,7 +31241,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -31574,7 +31622,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
@@ -31757,7 +31805,7 @@
}
},
"docs": [
"\n\t\t\tCustom [dispatch errors](https://substrate.dev/docs/en/knowledgebase/runtime/errors)\n\t\t\tof this pallet.\n\t\t\t"
"\n\t\t\tCustom [dispatch errors](https://docs.substrate.io/v3/runtime/events-and-errors)\n\t\t\tof this pallet.\n\t\t\t"
]
}
},
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/types-support', version: '6.4.1' };
export const packageInfo = { name: '@polkadot/types-support', version: '6.5.1' };
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/types",
"version": "6.4.1",
"version": "6.5.1",
"type": "module",
"description": "Implementation of the Parity codec",
"main": "index.js",
@@ -20,13 +20,13 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
"dependencies": {
"@babel/runtime": "^7.15.4",
"@polkadot/util": "^7.5.1",
"@polkadot/util-crypto": "^7.5.1",
"@polkadot/util": "^7.6.1",
"@polkadot/util-crypto": "^7.6.1",
"rxjs": "^7.4.0"
},
"devDependencies": {
"@polkadot/keyring": "^7.5.1",
"@polkadot/types-support": "6.4.1",
"@polkadot/keyring": "^7.6.1",
"@polkadot/types-support": "6.5.1",
"@types/bn.js": "^4.11.6",
"bn.js": "^4.12.0"
}
+15 -2
View File
@@ -23,7 +23,7 @@ import type { ConfigData, MessageId, OverweightIndex, PageCounter, PageIndexData
import type { AccountVote, AccountVoteSplit, AccountVoteStandard, Conviction, Delegations, PreimageStatus, PreimageStatusAvailable, PriorLock, PropIndex, Proposal, ProxyState, ReferendumIndex, ReferendumInfo, ReferendumInfoFinished, ReferendumInfoTo239, ReferendumStatus, Tally, Voting, VotingDelegating, VotingDirect, VotingDirectVote } from '@polkadot/types/interfaces/democracy';
import type { ApprovalFlag, DefunctVoter, Renouncing, SetIndex, Vote, VoteIndex, VoteThreshold, VoterInfo } from '@polkadot/types/interfaces/elections';
import type { CreatedBlock, ImportedAux } from '@polkadot/types/interfaces/engine';
import type { EthAccount, EthBlock, EthBloom, EthCallRequest, EthFilter, EthFilterAddress, EthFilterChanges, EthFilterTopic, EthFilterTopicEntry, EthFilterTopicInner, EthHeader, EthLog, EthReceipt, EthRichBlock, EthRichHeader, EthStorageProof, EthSubKind, EthSubParams, EthSubResult, EthSyncInfo, EthSyncStatus, EthTransaction, EthTransactionAction, EthTransactionCondition, EthTransactionRequest, EthTransactionSignature, EthTransactionStatus, EthWork, EthereumAccountId, EthereumLookupSource, EthereumSignature } from '@polkadot/types/interfaces/eth';
import type { BlockV0, BlockV1, BlockV2, EIP1559Transaction, EIP2930Transaction, EthAccessList, EthAccessListItem, EthAccount, EthAddress, EthBlock, EthBloom, EthCallRequest, EthFilter, EthFilterAddress, EthFilterChanges, EthFilterTopic, EthFilterTopicEntry, EthFilterTopicInner, EthHeader, EthLog, EthReceipt, EthRichBlock, EthRichHeader, EthStorageProof, EthSubKind, EthSubParams, EthSubResult, EthSyncInfo, EthSyncStatus, EthTransaction, EthTransactionAction, EthTransactionCondition, EthTransactionRequest, EthTransactionSignature, EthTransactionStatus, EthWork, EthereumAccountId, EthereumLookupSource, EthereumSignature, LegacyTransaction, TransactionV0, TransactionV1, TransactionV2 } from '@polkadot/types/interfaces/eth';
import type { EvmAccount, EvmLog, EvmVicinity, ExitError, ExitFatal, ExitReason, ExitRevert, ExitSucceed } from '@polkadot/types/interfaces/evm';
import type { AnySignature, EcdsaSignature, Ed25519Signature, Era, Extrinsic, ExtrinsicEra, ExtrinsicPayload, ExtrinsicPayloadUnknown, ExtrinsicPayloadV4, ExtrinsicSignature, ExtrinsicSignatureV4, ExtrinsicUnknown, ExtrinsicV4, ImmortalEra, MortalEra, MultiSignature, Signature, SignerPayload, Sr25519Signature } from '@polkadot/types/interfaces/extrinsics';
import type { AssetOptions, Owner, PermissionLatest, PermissionVersions, PermissionsV1 } from '@polkadot/types/interfaces/genericAsset';
@@ -43,7 +43,7 @@ import type { ProxyAnnouncement, ProxyDefinition, ProxyType } from '@polkadot/ty
import type { AccountStatus, AccountValidity } from '@polkadot/types/interfaces/purchase';
import type { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';
import type { RpcMethods } from '@polkadot/types/interfaces/rpc';
import type { AccountId, AccountId20, AccountId32, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, BlockNumberFor, BlockNumberOf, Call, CallHash, CallHashOf, ChangesTrieConfiguration, ChangesTrieSignal, CodecHash, Consensus, ConsensusEngineId, Digest, DigestItem, EncodedJustification, ExtrinsicsWeight, Fixed128, Fixed64, FixedI128, FixedI64, FixedU128, FixedU64, H1024, H128, H160, H2048, H256, H32, H512, H64, Hash, Header, HeaderPartial, I32F32, Index, IndicesLookupSource, Justification, Justifications, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, MultiAddress, MultiSigner, OpaqueCall, Origin, OriginCaller, PalletId, PalletVersion, PalletsOrigin, Pays, PerU16, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Releases, RuntimeDbWeight, Seal, SealV0, SignedBlock, SignedBlockWithJustification, SignedBlockWithJustifications, Slot, StorageData, StorageProof, TransactionInfo, TransactionPriority, TransactionStorageProof, U32F32, ValidatorId, ValidatorIdOf, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
import type { AccountId, AccountId20, AccountId32, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, BlockNumberFor, BlockNumberOf, Call, CallHash, CallHashOf, ChangesTrieConfiguration, ChangesTrieSignal, CodecHash, Consensus, ConsensusEngineId, CrateVersion, Digest, DigestItem, EncodedJustification, ExtrinsicsWeight, Fixed128, Fixed64, FixedI128, FixedI64, FixedU128, FixedU64, H1024, H128, H160, H2048, H256, H32, H512, H64, Hash, Header, HeaderPartial, I32F32, Index, IndicesLookupSource, Justification, Justifications, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, MultiAddress, MultiSigner, OpaqueCall, Origin, OriginCaller, PalletId, PalletVersion, PalletsOrigin, Pays, PerU16, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Releases, RuntimeDbWeight, Seal, SealV0, SignedBlock, SignedBlockWithJustification, SignedBlockWithJustifications, Slot, StorageData, StorageProof, TransactionInfo, TransactionPriority, TransactionStorageProof, U32F32, ValidatorId, ValidatorIdOf, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
import type { Si0Field, Si0LookupTypeId, Si0Path, Si0Type, Si0TypeDef, Si0TypeDefArray, Si0TypeDefBitSequence, Si0TypeDefCompact, Si0TypeDefComposite, Si0TypeDefPhantom, Si0TypeDefPrimitive, Si0TypeDefSequence, Si0TypeDefTuple, Si0TypeDefVariant, Si0TypeParameter, Si0Variant, Si1Field, Si1LookupTypeId, Si1Path, Si1Type, Si1TypeDef, Si1TypeDefArray, Si1TypeDefBitSequence, Si1TypeDefCompact, Si1TypeDefComposite, Si1TypeDefPrimitive, Si1TypeDefSequence, Si1TypeDefTuple, Si1TypeDefVariant, Si1TypeParameter, Si1Variant, SiField, SiLookupTypeId, SiPath, SiType, SiTypeDef, SiTypeDefArray, SiTypeDefBitSequence, SiTypeDefCompact, SiTypeDefComposite, SiTypeDefPrimitive, SiTypeDefSequence, SiTypeDefTuple, SiTypeDefVariant, SiTypeParameter, SiVariant } from '@polkadot/types/interfaces/scaleInfo';
import type { Period, Priority, SchedulePeriod, SchedulePriority, Scheduled, ScheduledTo254, TaskAddress } from '@polkadot/types/interfaces/scheduler';
import type { BeefyKey, FullIdentification, IdentificationTuple, Keys, MembershipProof, SessionIndex, SessionKeys1, SessionKeys10, SessionKeys10B, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6, SessionKeys6B, SessionKeys7, SessionKeys7B, SessionKeys8, SessionKeys8B, SessionKeys9, SessionKeys9B, ValidatorCount } from '@polkadot/types/interfaces/session';
@@ -155,6 +155,9 @@ declare module '@polkadot/types/types/registry' {
BlockTraceEvent: BlockTraceEvent;
BlockTraceEventData: BlockTraceEventData;
BlockTraceSpan: BlockTraceSpan;
BlockV0: BlockV0;
BlockV1: BlockV1;
BlockV2: BlockV2;
BlockWeights: BlockWeights;
BodyId: BodyId;
BodyPart: BodyPart;
@@ -256,6 +259,7 @@ declare module '@polkadot/types/types/registry' {
CoreAssignment: CoreAssignment;
CoreIndex: CoreIndex;
CoreOccupied: CoreOccupied;
CrateVersion: CrateVersion;
CreatedBlock: CreatedBlock;
Data: Data;
DeferredOffenceOf: DeferredOffenceOf;
@@ -293,6 +297,8 @@ declare module '@polkadot/types/types/registry' {
DownwardMessage: DownwardMessage;
EcdsaSignature: EcdsaSignature;
Ed25519Signature: Ed25519Signature;
EIP1559Transaction: EIP1559Transaction;
EIP2930Transaction: EIP2930Transaction;
ElectionCompute: ElectionCompute;
ElectionPhase: ElectionPhase;
ElectionResult: ElectionResult;
@@ -314,7 +320,10 @@ declare module '@polkadot/types/types/registry' {
ErrorMetadataV13: ErrorMetadataV13;
ErrorMetadataV14: ErrorMetadataV14;
ErrorMetadataV9: ErrorMetadataV9;
EthAccessList: EthAccessList;
EthAccessListItem: EthAccessListItem;
EthAccount: EthAccount;
EthAddress: EthAddress;
EthBlock: EthBlock;
EthBloom: EthBloom;
EthCallRequest: EthCallRequest;
@@ -522,6 +531,7 @@ declare module '@polkadot/types/types/registry' {
LastRuntimeUpgradeInfo: LastRuntimeUpgradeInfo;
LeasePeriod: LeasePeriod;
LeasePeriodOf: LeasePeriodOf;
LegacyTransaction: LegacyTransaction;
Limits: Limits;
LimitsTo264: LimitsTo264;
LocalValidationData: LocalValidationData;
@@ -951,6 +961,9 @@ declare module '@polkadot/types/types/registry' {
TransactionInfo: TransactionInfo;
TransactionPriority: TransactionPriority;
TransactionStorageProof: TransactionStorageProof;
TransactionV0: TransactionV0;
TransactionV1: TransactionV1;
TransactionV2: TransactionV2;
TransactionValidityError: TransactionValidityError;
TransientValidationData: TransientValidationData;
TreasuryProposal: TreasuryProposal;
+1
View File
@@ -10,6 +10,7 @@ export * from './index.types';
export * from './metadata';
export { TypeDefInfo } from './create/types';
export { convertSiV0toV1 } from './generic/PortableRegistry';
export { packageInfo } from './packageInfo';
export { unwrapStorageType } from './primitive/StorageKey';
+1
View File
@@ -27,6 +27,7 @@ describe('Option', (): void => {
expect(new Option(registry, Text, undefined).isNone).toBe(true);
expect(new Option(registry, Text, null).isNone).toBe(true);
expect(new Option(registry, Text, 'test').isNone).toBe(false);
expect(new Option(registry, Text, '0x').isNone).toBe(true);
});
it('converts an option to an option', (): void => {
+1 -1
View File
@@ -18,7 +18,7 @@ function decodeOptionU8a (registry: Registry, Type: Constructor, value: Uint8Arr
/** @internal */
function decodeOption (registry: Registry, typeName: Constructor | string, value?: unknown): Codec {
if (isNull(value) || isUndefined(value) || value instanceof Null) {
if (isNull(value) || isUndefined(value) || value instanceof Null || value === '0x') {
return new Null(registry);
}
+12 -5
View File
@@ -51,7 +51,7 @@ export class Raw extends Uint8Array implements IU8a {
* @description Returns true if the type wraps an empty/default all-0 value
*/
public get isEmpty (): boolean {
return !this.length || isUndefined(this.find((value) => !!value));
return !this.length || isUndefined(this.find((b) => !!b));
}
/**
@@ -82,7 +82,7 @@ export class Raw extends Uint8Array implements IU8a {
public eq (other?: unknown): boolean {
if (other instanceof Uint8Array) {
return (this.length === other.length) &&
!this.some((value, index) => value !== other[index]);
!this.some((b, index) => b !== other[index]);
}
return this.eq(u8aToU8a(other as string));
@@ -119,9 +119,16 @@ export class Raw extends Uint8Array implements IU8a {
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/
public toHuman (): AnyJson {
return this.isAscii
? this.toUtf8()
: this.toJSON();
if (this.isAscii) {
const text = this.toUtf8();
// ensure we didn't end up with multibyte codepoints
if (isAscii(text)) {
return text;
}
}
return this.toJSON();
}
/**
+2 -2
View File
@@ -459,9 +459,9 @@ export class TypeRegistry implements Registry {
// setup the available extensions
this.setSignedExtensions(
signedExtensions || (
metadata.asLatest.extrinsic.version.gt(BN_ZERO)
this.#metadata.extrinsic.version.gt(BN_ZERO)
// FIXME Use the extension and their injected types
? metadata.asLatest.extrinsic.signedExtensions.map(({ identifier }) => identifier.toString())
? this.#metadata.extrinsic.signedExtensions.map(({ identifier }) => identifier.toString())
: fallbackExtensions
),
userExtensions
+1
View File
@@ -41,6 +41,7 @@ export interface TypeDef {
namespace?: string;
sub?: TypeDef | TypeDef[];
type: string;
typeName?: string;
}
export interface CreateOptions {
@@ -7,6 +7,7 @@ import type { Codec, ISignerPayload, Registry, SignerPayloadJSON, SignerPayloadR
import { u8aToHex } from '@polkadot/util';
import { Compact } from '../codec/Compact';
import { Option } from '../codec/Option';
import { Struct } from '../codec/Struct';
import { Vec } from '../codec/Vec';
import { Text } from '../primitive/Text';
@@ -120,7 +121,13 @@ export class GenericSignerPayload extends Struct implements ISignerPayload, Sign
return {
// add any explicit overrides we may have
...(Object.keys(this._extraTypes).reduce<Record<string, string>>((map, key) => {
map[key] = (this.get(key) as Codec).toHex();
const value = this.get(key) as Codec;
const isOption = value instanceof Option;
// Don't include Option.isNone
if (!isOption || value.isSome) {
map[key] = value.toHex();
}
return map;
}, {})),
@@ -12,6 +12,7 @@ import { assert, isNumber, isString, stringCamelCase, stringify, stringUpperFirs
import { Struct } from '../../codec/Struct';
import { withTypeString } from '../../create/encodeTypes';
import { getTypeDef } from '../../create/getTypeDef';
import { sanitize } from '../../create/sanitize';
import { TypeDefInfo } from '../../types';
// Just a placeholder for a type.unrwapOr()
@@ -252,6 +253,10 @@ export class GenericPortableRegistry extends Struct {
this.#types = extractTypeMap(this.types);
}
public get names (): string[] {
return Object.values(this.#names);
}
/**
* @description The types of the registry
*/
@@ -435,11 +440,15 @@ export class GenericPortableRegistry extends Struct {
} else if (['Range', 'RangeInclusive'].includes(specialVariant)) {
return withTypeString(this.registry, {
info: TypeDefInfo.Range,
sub: fields.map(({ name, type }, index) => ({
sub: fields.map(({ name, type, typeName }, index) => ({
name: name.isSome
? name.unwrap().toString()
: ['start', 'end'][index],
...this.#createSiDef(type)
...this.#createSiDef(type),
...(typeName.isSome
? { typeName: sanitize(typeName.unwrap()) }
: {}
)
}))
});
} else if (path.length && path[path.length - 1].toString() === 'WrapperOpaque') {
@@ -489,14 +498,17 @@ export class GenericPortableRegistry extends Struct {
return {
...typeDef,
...(
lookupIndex === -1
? {}
: {
lookupIndex,
lookupName: this.#names[lookupIndex],
lookupNameRoot: typeDef.lookupName
}
...(lookupIndex === -1
? {}
: {
lookupIndex,
lookupName: this.#names[lookupIndex],
lookupNameRoot: typeDef.lookupName
}
),
...(fields[0].typeName.isSome
? { typeName: sanitize(fields[0].typeName.unwrap()) }
: {}
)
};
}
@@ -526,7 +538,7 @@ export class GenericPortableRegistry extends Struct {
#extractFieldsAlias (fields: SiField[]): [TypeDef[], Map<string, string>] {
const alias = new Map<string, string>();
const sub = fields.map(({ docs, name, type }) => {
const sub = fields.map(({ docs, name, type, typeName }) => {
const typeDef = this.#createSiDef(type);
if (name.isNone) {
@@ -551,7 +563,11 @@ export class GenericPortableRegistry extends Struct {
return {
...typeDef,
docs: docs.map((d) => d.toString()),
name: nameField
name: nameField,
...(typeName.isSome
? { typeName: sanitize(typeName.unwrap()) }
: {}
)
};
});
+103 -28
View File
@@ -10,12 +10,94 @@ import type { DefinitionsTypes } from '../../types';
import { rpc } from './rpc';
const V0: DefinitionsTypes = {
BlockV0: {
header: 'EthHeader',
transactions: 'Vec<TransactionV0>',
ommers: 'Vec<EthHeader>'
},
LegacyTransaction: {
nonce: 'U256',
gasPrice: 'U256',
gasLimit: 'U256',
action: 'EthTransactionAction',
value: 'U256',
input: 'Bytes',
signature: 'EthTransactionSignature'
},
TransactionV0: 'LegacyTransaction'
};
const V1: DefinitionsTypes = {
BlockV1: {
header: 'EthHeader',
transactions: 'Vec<TransactionV1>',
ommers: 'Vec<EthHeader>'
},
EIP2930Transaction: {
chainId: 'u64',
nonce: 'U256',
gasPrice: 'U256',
gasLimit: 'U256',
action: 'EthTransactionAction',
value: 'U256',
input: 'Bytes',
accessList: 'EthAccessList',
oddYParity: 'bool',
r: 'H256',
s: 'H256'
},
TransactionV1: {
_enum: {
Legacy: 'LegacyTransaction',
EIP2930: 'EIP2930Transaction'
}
}
};
const V2: DefinitionsTypes = {
BlockV2: {
header: 'EthHeader',
transactions: 'Vec<TransactionV2>',
ommers: 'Vec<EthHeader>'
},
EIP1559Transaction: {
chainId: 'u64',
nonce: 'U256',
maxPriorityFeePerGas: 'U256',
maxFeePerGas: 'U256',
gasLimit: 'U256',
action: 'EthTransactionAction',
value: 'U256',
input: 'Bytes',
accessList: 'EthAccessList',
oddYParity: 'bool',
r: 'H256',
s: 'H256'
},
TransactionV2: {
_enum: {
Legacy: 'LegacyTransaction',
EIP2930: 'EIP2930Transaction',
EIP1559: 'EIP1559Transaction'
}
}
};
const types: DefinitionsTypes = {
...V0,
...V1,
...V2,
EthereumAccountId: 'GenericEthereumAccountId',
EthereumLookupSource: 'GenericEthereumLookupSource',
EthereumSignature: '[u8; 65]',
EthAccessListItem: {
address: 'EthAddress',
slots: 'Vec<H256>'
},
EthAccessList: 'Vec<EthAccessListItem>',
EthAccount: {
address: 'H160',
address: 'EthAddress',
balance: 'U256',
nonce: 'U256',
codeHash: 'H256',
@@ -23,6 +105,7 @@ const types: DefinitionsTypes = {
accountProof: 'Vec<Bytes>',
storageProof: 'Vec<EthStorageProof>'
},
EthAddress: 'H160',
EthBlock: {
header: 'EthHeader',
transactions: 'Vec<EthTransaction>',
@@ -31,7 +114,7 @@ const types: DefinitionsTypes = {
EthHeader: {
parentHash: 'H256',
ommersHash: 'H256',
beneficiary: 'H160',
beneficiary: 'EthAddress',
stateRoot: 'H256',
transactionsRoot: 'H256',
receiptsRoot: 'H256',
@@ -53,8 +136,8 @@ const types: DefinitionsTypes = {
blockHash: 'Option<H256>',
parentHash: 'H256',
sha3Uncles: 'H256',
author: 'H160',
miner: 'H160',
author: 'EthAddress',
miner: 'EthAddress',
stateRoot: 'H256',
transactionsRoot: 'H256',
receiptsRoot: 'H256',
@@ -73,8 +156,8 @@ const types: DefinitionsTypes = {
},
EthBloom: 'H2048',
EthCallRequest: {
from: 'Option<H160>',
to: 'Option<H160>',
from: 'Option<EthAddress>',
to: 'Option<EthAddress>',
gasPrice: 'Option<U256>',
gas: 'Option<U256>',
value: 'Option<U256>',
@@ -90,8 +173,8 @@ const types: DefinitionsTypes = {
},
EthFilterAddress: {
_enum: {
Single: 'H160',
Multiple: 'Vec<H160>',
Single: 'EthAddress',
Multiple: 'Vec<EthAddress>',
Null: 'Null'
}
},
@@ -125,8 +208,8 @@ const types: DefinitionsTypes = {
blockHash: 'Option<H256>',
parentHash: 'H256',
sha3Uncles: 'H256',
author: 'H160',
miner: 'H160',
author: 'EthAddress',
miner: 'EthAddress',
stateRoot: 'H256',
transactionsRoot: 'H256',
receiptsRoot: 'H256',
@@ -141,7 +224,7 @@ const types: DefinitionsTypes = {
blockSize: 'Option<U256>'
},
EthLog: {
address: 'H160',
address: 'EthAddress',
topics: 'Vec<H256>',
data: 'Bytes',
blockHash: 'Option<H256>',
@@ -156,12 +239,12 @@ const types: DefinitionsTypes = {
transactionHash: 'Option<H256>',
transactionIndex: 'Option<U256>',
blockHash: 'Option<H256>',
from: 'Option<H160>',
to: 'Option<H160>',
from: 'Option<EthAddress>',
to: 'Option<EthAddress>',
blockNumber: 'Option<U256>',
cumulativeGasUsed: 'U256',
gasUsed: 'Option<U256>',
contractAddress: 'Option<H160>',
contractAddress: 'Option<EthAddress>',
logs: 'Vec<EthLog>',
root: 'Option<H256>',
logsBloom: 'EthBloom',
@@ -202,15 +285,7 @@ const types: DefinitionsTypes = {
None: 'Null'
}
},
EthTransaction: {
nonce: 'U256',
gasPrice: 'U256',
gasLimit: 'U256',
action: 'EthTransactionAction',
value: 'U256',
input: 'Bytes',
signature: 'EthTransactionSignature'
},
EthTransaction: 'LegacyTransaction',
EthTransactionSignature: {
v: 'u64',
r: 'H256',
@@ -229,8 +304,8 @@ const types: DefinitionsTypes = {
}
},
EthTransactionRequest: {
from: 'Option<H160>',
to: 'Option<H160>',
from: 'Option<EthAddress>',
to: 'Option<EthAddress>',
gasPrice: 'Option<U256>',
gas: 'Option<U256>',
value: 'Option<U256>',
@@ -240,9 +315,9 @@ const types: DefinitionsTypes = {
EthTransactionStatus: {
transactionHash: 'H256',
transactionIndex: 'u32',
from: 'H160',
to: 'Option<H160>',
contractAddress: 'Option<H160>',
from: 'EthAddress',
to: 'Option<EthAddress>',
contractAddress: 'Option<EthAddress>',
logs: 'Vec<EthLog>',
logsBloom: 'EthBloom'
},
+116 -28
View File
@@ -4,9 +4,70 @@
import type { Bytes, Enum, GenericEthereumAccountId, GenericEthereumLookupSource, Option, Struct, U256, U64, U8aFixed, Vec, bool, u32, u64 } from '@polkadot/types';
import type { BlockNumber, H160, H2048, H256, H64 } from '@polkadot/types/interfaces/runtime';
/** @name BlockV0 */
export interface BlockV0 extends Struct {
readonly header: EthHeader;
readonly transactions: Vec<TransactionV0>;
readonly ommers: Vec<EthHeader>;
}
/** @name BlockV1 */
export interface BlockV1 extends Struct {
readonly header: EthHeader;
readonly transactions: Vec<TransactionV1>;
readonly ommers: Vec<EthHeader>;
}
/** @name BlockV2 */
export interface BlockV2 extends Struct {
readonly header: EthHeader;
readonly transactions: Vec<TransactionV2>;
readonly ommers: Vec<EthHeader>;
}
/** @name EIP1559Transaction */
export interface EIP1559Transaction extends Struct {
readonly chainId: u64;
readonly nonce: U256;
readonly maxPriorityFeePerGas: U256;
readonly maxFeePerGas: U256;
readonly gasLimit: U256;
readonly action: EthTransactionAction;
readonly value: U256;
readonly input: Bytes;
readonly accessList: EthAccessList;
readonly oddYParity: bool;
readonly r: H256;
readonly s: H256;
}
/** @name EIP2930Transaction */
export interface EIP2930Transaction extends Struct {
readonly chainId: u64;
readonly nonce: U256;
readonly gasPrice: U256;
readonly gasLimit: U256;
readonly action: EthTransactionAction;
readonly value: U256;
readonly input: Bytes;
readonly accessList: EthAccessList;
readonly oddYParity: bool;
readonly r: H256;
readonly s: H256;
}
/** @name EthAccessList */
export interface EthAccessList extends Vec<EthAccessListItem> {}
/** @name EthAccessListItem */
export interface EthAccessListItem extends Struct {
readonly address: EthAddress;
readonly slots: Vec<H256>;
}
/** @name EthAccount */
export interface EthAccount extends Struct {
readonly address: H160;
readonly address: EthAddress;
readonly balance: U256;
readonly nonce: U256;
readonly codeHash: H256;
@@ -15,6 +76,9 @@ export interface EthAccount extends Struct {
readonly storageProof: Vec<EthStorageProof>;
}
/** @name EthAddress */
export interface EthAddress extends H160 {}
/** @name EthBlock */
export interface EthBlock extends Struct {
readonly header: EthHeader;
@@ -27,8 +91,8 @@ export interface EthBloom extends H2048 {}
/** @name EthCallRequest */
export interface EthCallRequest extends Struct {
readonly from: Option<H160>;
readonly to: Option<H160>;
readonly from: Option<EthAddress>;
readonly to: Option<EthAddress>;
readonly gasPrice: Option<U256>;
readonly gas: Option<U256>;
readonly value: Option<U256>;
@@ -57,9 +121,9 @@ export interface EthFilter extends Struct {
/** @name EthFilterAddress */
export interface EthFilterAddress extends Enum {
readonly isSingle: boolean;
readonly asSingle: H160;
readonly asSingle: EthAddress;
readonly isMultiple: boolean;
readonly asMultiple: Vec<H160>;
readonly asMultiple: Vec<EthAddress>;
readonly isNull: boolean;
}
@@ -97,7 +161,7 @@ export interface EthFilterTopicInner extends Enum {
export interface EthHeader extends Struct {
readonly parentHash: H256;
readonly ommersHash: H256;
readonly beneficiary: H160;
readonly beneficiary: EthAddress;
readonly stateRoot: H256;
readonly transactionsRoot: H256;
readonly receiptsRoot: H256;
@@ -114,7 +178,7 @@ export interface EthHeader extends Struct {
/** @name EthLog */
export interface EthLog extends Struct {
readonly address: H160;
readonly address: EthAddress;
readonly topics: Vec<H256>;
readonly data: Bytes;
readonly blockHash: Option<H256>;
@@ -131,12 +195,12 @@ export interface EthReceipt extends Struct {
readonly transactionHash: Option<H256>;
readonly transactionIndex: Option<U256>;
readonly blockHash: Option<H256>;
readonly from: Option<H160>;
readonly to: Option<H160>;
readonly from: Option<EthAddress>;
readonly to: Option<EthAddress>;
readonly blockNumber: Option<U256>;
readonly cumulativeGasUsed: U256;
readonly gasUsed: Option<U256>;
readonly contractAddress: Option<H160>;
readonly contractAddress: Option<EthAddress>;
readonly logs: Vec<EthLog>;
readonly root: Option<H256>;
readonly logsBloom: EthBloom;
@@ -148,8 +212,8 @@ export interface EthRichBlock extends Struct {
readonly blockHash: Option<H256>;
readonly parentHash: H256;
readonly sha3Uncles: H256;
readonly author: H160;
readonly miner: H160;
readonly author: EthAddress;
readonly miner: EthAddress;
readonly stateRoot: H256;
readonly transactionsRoot: H256;
readonly receiptsRoot: H256;
@@ -172,8 +236,8 @@ export interface EthRichHeader extends Struct {
readonly blockHash: Option<H256>;
readonly parentHash: H256;
readonly sha3Uncles: H256;
readonly author: H160;
readonly miner: H160;
readonly author: EthAddress;
readonly miner: EthAddress;
readonly stateRoot: H256;
readonly transactionsRoot: H256;
readonly receiptsRoot: H256;
@@ -239,15 +303,7 @@ export interface EthSyncStatus extends Enum {
}
/** @name EthTransaction */
export interface EthTransaction extends Struct {
readonly nonce: U256;
readonly gasPrice: U256;
readonly gasLimit: U256;
readonly action: EthTransactionAction;
readonly value: U256;
readonly input: Bytes;
readonly signature: EthTransactionSignature;
}
export interface EthTransaction extends LegacyTransaction {}
/** @name EthTransactionAction */
export interface EthTransactionAction extends Enum {
@@ -266,8 +322,8 @@ export interface EthTransactionCondition extends Enum {
/** @name EthTransactionRequest */
export interface EthTransactionRequest extends Struct {
readonly from: Option<H160>;
readonly to: Option<H160>;
readonly from: Option<EthAddress>;
readonly to: Option<EthAddress>;
readonly gasPrice: Option<U256>;
readonly gas: Option<U256>;
readonly value: Option<U256>;
@@ -286,9 +342,9 @@ export interface EthTransactionSignature extends Struct {
export interface EthTransactionStatus extends Struct {
readonly transactionHash: H256;
readonly transactionIndex: u32;
readonly from: H160;
readonly to: Option<H160>;
readonly contractAddress: Option<H160>;
readonly from: EthAddress;
readonly to: Option<EthAddress>;
readonly contractAddress: Option<EthAddress>;
readonly logs: Vec<EthLog>;
readonly logsBloom: EthBloom;
}
@@ -301,4 +357,36 @@ export interface EthWork extends Struct {
readonly number: Option<u64>;
}
/** @name LegacyTransaction */
export interface LegacyTransaction extends Struct {
readonly nonce: U256;
readonly gasPrice: U256;
readonly gasLimit: U256;
readonly action: EthTransactionAction;
readonly value: U256;
readonly input: Bytes;
readonly signature: EthTransactionSignature;
}
/** @name TransactionV0 */
export interface TransactionV0 extends LegacyTransaction {}
/** @name TransactionV1 */
export interface TransactionV1 extends Enum {
readonly isLegacy: boolean;
readonly asLegacy: LegacyTransaction;
readonly isEip2930: boolean;
readonly asEip2930: EIP2930Transaction;
}
/** @name TransactionV2 */
export interface TransactionV2 extends Enum {
readonly isLegacy: boolean;
readonly asLegacy: LegacyTransaction;
readonly isEip2930: boolean;
readonly asEip2930: EIP2930Transaction;
readonly isEip1559: boolean;
readonly asEip1559: EIP1559Transaction;
}
export type PHANTOM_ETH = 'eth';
@@ -103,7 +103,11 @@ export interface FunctionArgumentMetadataV12 extends FunctionArgumentMetadataV11
export interface FunctionArgumentMetadataV13 extends FunctionArgumentMetadataV12 {}
/** @name FunctionArgumentMetadataV14 */
export interface FunctionArgumentMetadataV14 extends FunctionArgumentMetadataV13 {}
export interface FunctionArgumentMetadataV14 extends Struct {
readonly name: Text;
readonly type: Type;
readonly typeName: Option<Type>;
}
/** @name FunctionArgumentMetadataV9 */
export interface FunctionArgumentMetadataV9 extends Struct {
@@ -25,7 +25,11 @@ export const v14: DefinitionsTypes = {
...Si1Variant,
args: 'Vec<Type>'
},
FunctionArgumentMetadataV14: 'FunctionArgumentMetadataV13',
FunctionArgumentMetadataV14: {
name: 'Text',
type: 'Type',
typeName: 'Option<Type>'
},
FunctionMetadataV14: {
...Si1Variant,
args: 'Vec<FunctionArgumentMetadataV14>'
@@ -53,6 +53,11 @@ export default {
},
ConsensusEngineId: 'GenericConsensusEngineId',
CodecHash: 'Hash',
CrateVersion: {
major: 'u16',
minor: 'u8',
patch: 'u8'
},
Digest: {
logs: 'Vec<DigestItem>'
},
@@ -76,6 +76,13 @@ export interface Consensus extends ITuple<[ConsensusEngineId, Bytes]> {}
/** @name ConsensusEngineId */
export interface ConsensusEngineId extends GenericConsensusEngineId {}
/** @name CrateVersion */
export interface CrateVersion extends Struct {
readonly major: u16;
readonly minor: u8;
readonly patch: u8;
}
/** @name Digest */
export interface Digest extends Struct {
readonly logs: Vec<DigestItem>;
@@ -6,21 +6,14 @@
import type { Definitions } from '../../types';
import { mapXcmTypes } from '@polkadot/types-known';
import { v0 } from './v0';
import { v1 } from './v1';
import { v2 } from './v2';
export const XCM_MAPPINGS = ['AssetInstance', 'Fungibility', 'Junction', 'Junctions', 'MultiAsset', 'MultiAssetFilter', 'MultiLocation', 'Response', 'WildFungibility', 'WildMultiAsset', 'Xcm', 'XcmError', 'XcmOrder'];
const XCM_LATEST = 'V2';
export function mapXcm (version: 'V0' | 'V1' | 'V2'): Record<string, string> {
return XCM_MAPPINGS.reduce<Record<string, string>>((all, key) => ({
...all,
[key]: `${key}${version}`
}), {});
}
const xcm = {
XcmOrigin: {
_enum: {
@@ -94,7 +87,7 @@ export default {
...v0,
...v1,
...v2,
...mapXcm(XCM_LATEST),
...mapXcmTypes(XCM_LATEST),
DoubleEncodedCall: {
encoded: 'Vec<u8>'
},
@@ -24,9 +24,13 @@ export function decorateExtrinsics (registry: Registry, { lookup, pallets }: Met
.reduce((newModule: ModuleExtrinsics, variant): ModuleExtrinsics => {
const callMetadata = registry.createType('FunctionMetadataLatest', {
...variant,
args: variant.fields.map(({ name, type }, index) => ({
args: variant.fields.map(({ name, type, typeName }, index) => ({
name: stringCamelCase(name.unwrapOr(`param${index}`)),
type: getSiName(lookup, type)
type: getSiName(lookup, type),
...(typeName.isSome
? { typeName: typeName.unwrap() }
: {}
)
}))
});
@@ -14,14 +14,17 @@ import { StorageKey } from '../../../primitive';
import { getHasher } from './getHasher';
export interface CreateItemOptions {
key?: string;
key?: Uint8Array | string;
skipHashing?: boolean;
}
export interface CreateItemFn {
meta: StorageEntryMetadataLatest;
export interface CreateItemBase {
method: string;
prefix: string;
}
export interface CreateItemFn extends CreateItemBase {
meta: StorageEntryMetadataLatest;
section: string;
}
@@ -31,7 +34,7 @@ interface IterFn {
}
/** @internal */
function createKeyRaw (registry: Registry, itemFn: CreateItemFn, keys: SiLookupTypeId[], hashers: StorageHasher[], args: unknown[]): Uint8Array {
export function createKeyRaw (registry: Registry, itemFn: CreateItemBase, keys: SiLookupTypeId[], hashers: StorageHasher[], args: unknown[]): Uint8Array {
return u8aConcat(
xxhashAsU8a(itemFn.prefix, 128),
xxhashAsU8a(itemFn.method, 128),
@@ -4,6 +4,7 @@
import { createTestPairs } from '@polkadot/keyring/testingPairs';
import rpcMetadata from '@polkadot/types-support/metadata/static-substrate';
import { u8aToHex } from '@polkadot/util';
import { xxhashAsHex } from '@polkadot/util-crypto';
import { TypeRegistry } from '../../../create';
import { Metadata } from '../../';
@@ -37,11 +38,24 @@ describe('decorateStorage', (): void => {
it('should return the correct length-prefixed storage key', (): void => {
expect(
u8aToHex(
query.system.account(keyring.alice.address)
)
u8aToHex(query.system.account(keyring.alice.address))
).toEqual(
'0x410126aa394eea5630e07c48ae0c9558cef7b99d880ec681799c0cf30e8886371da9de1e86a9a8c739864cf3cc5ec2bea59fd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d'
'0x' +
'4101' + // length
'26aa394eea5630e07c48ae0c9558cef7' + // System
'b99d880ec681799c0cf30e8886371da9' + // account
'de1e86a9a8c739864cf3cc5ec2bea59fd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d'
);
});
it('should decorate the palletVersion entry', (): void => {
expect(
u8aToHex(query.system.palletVersion())
).toEqual(
'0x' +
'80' + // length
'26aa394eea5630e07c48ae0c9558cef7' + // System
xxhashAsHex(':__STORAGE_VERSION__:', 128).substr(2)
);
});
});
@@ -7,8 +7,9 @@ import type { ModuleStorage, Storage } from '../types';
import { stringCamelCase, stringLowerFirst } from '@polkadot/util';
import { createFunction } from './createFunction';
import { createFunction, createKeyRaw } from './createFunction';
import { getStorage } from './getStorage';
import { createRuntimeFunction } from './util';
/** @internal */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -35,7 +36,17 @@ export function decorateStorage (registry: Registry, { pallets }: MetadataLatest
}, {});
return newModule;
}, {} as ModuleStorage);
}, {
palletVersion: createRuntimeFunction(
name.toString(),
'palletVersion',
createKeyRaw(registry, { method: ':__STORAGE_VERSION__:', prefix: name.toString() }, [], [], []),
{
docs: 'Returns the current pallet version from storage',
type: 'u16'
}
)(registry)
} as ModuleStorage);
return result;
}, { ...getStorage(registry) });
@@ -1,97 +1,31 @@
// Copyright 2017-2021 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { PortableType } from '../../../interfaces';
import type { StorageEntry } from '../../../primitive/types';
import type { Registry } from '../../../types';
import { createFunction } from './createFunction';
interface SubstrateMetadata {
docs: string;
type: string;
}
import { createRuntimeFunction } from './util';
type Creator = (registry: Registry) => StorageEntry;
function findSiPrimitive (registry: Registry, _prim: string): PortableType | undefined {
const prim = _prim.toLowerCase();
const portable = registry.lookup.types.find((t) =>
(
t.type.def.isPrimitive &&
t.type.def.asPrimitive.toString().toLowerCase() === prim
) || (
t.type.def.isHistoricMetaCompat &&
t.type.def.asHistoricMetaCompat.toString().toLowerCase() === prim
)
);
return portable;
}
function findSiType (registry: Registry, orig: string): PortableType | undefined {
let portable = findSiPrimitive(registry, orig);
if (!portable && orig === 'Bytes') {
const u8 = findSiPrimitive(registry, 'u8');
if (u8) {
portable = registry.lookup.types.find((t) =>
(
t.type.def.isSequence &&
t.type.def.asSequence.type.eq(u8.id)
) || (
t.type.def.isHistoricMetaCompat &&
t.type.def.asHistoricMetaCompat.eq(orig)
)
);
}
}
if (!portable) {
console.warn(`Unable to map ${orig} to a lookup index`);
}
return portable;
}
// Small helper function to factorize code on this page.
/** @internal */
function createRuntimeFunction (method: string, key: string, { docs, type }: SubstrateMetadata): (registry: Registry) => StorageEntry {
return (registry: Registry): StorageEntry =>
createFunction(registry, {
meta: registry.createType('StorageEntryMetadataLatest', {
docs: registry.createType('Vec<Text>', [docs]),
modifier: registry.createType('StorageEntryModifierLatest', 'Required'),
name: registry.createType('Text', method),
toJSON: (): any => key,
type: registry.createType('StorageEntryTypeLatest', { Plain: findSiType(registry, type)?.id || 0 })
}),
method,
prefix: 'Substrate',
section: 'substrate'
}, { key, skipHashing: true });
}
export const substrate: Record<string, Creator> = {
changesTrieConfig: createRuntimeFunction('changesTrieConfig', ':changes_trie', {
changesTrieConfig: createRuntimeFunction('Substrate', 'changesTrieConfig', ':changes_trie', {
docs: ' Changes trie configuration is stored under this key.',
type: 'u32'
}),
childStorageKeyPrefix: createRuntimeFunction('childStorageKeyPrefix', ':child_storage:', {
childStorageKeyPrefix: createRuntimeFunction('Substrate', 'childStorageKeyPrefix', ':child_storage:', {
docs: ' Prefix of child storage keys.',
type: 'u32'
}),
code: createRuntimeFunction('code', ':code', {
code: createRuntimeFunction('Substrate', 'code', ':code', {
docs: ' Wasm code of the runtime.',
type: 'Bytes'
}),
extrinsicIndex: createRuntimeFunction('extrinsicIndex', ':extrinsic_index', {
extrinsicIndex: createRuntimeFunction('Substrate', 'extrinsicIndex', ':extrinsic_index', {
docs: ' Current extrinsic index (u32) is stored under this key.',
type: 'u32'
}),
heapPages: createRuntimeFunction('heapPages', ':heappages', {
heapPages: createRuntimeFunction('Substrate', 'heapPages', ':heappages', {
docs: ' Number of wasm linear memory pages required for execution of the runtime.',
type: 'u64'
})
@@ -0,0 +1,73 @@
// Copyright 2017-2021 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { PortableType } from '../../../interfaces';
import type { StorageEntry } from '../../../primitive/types';
import type { Registry } from '../../../types';
import { createFunction } from './createFunction';
interface ManualMetadata {
docs: string;
type: string;
}
function findSiPrimitive (registry: Registry, _prim: string): PortableType | undefined {
const prim = _prim.toLowerCase();
const portable = registry.lookup.types.find((t) =>
(
t.type.def.isPrimitive &&
t.type.def.asPrimitive.toString().toLowerCase() === prim
) || (
t.type.def.isHistoricMetaCompat &&
t.type.def.asHistoricMetaCompat.toString().toLowerCase() === prim
)
);
return portable;
}
function findSiType (registry: Registry, orig: string): PortableType | undefined {
let portable = findSiPrimitive(registry, orig);
if (!portable && orig === 'Bytes') {
const u8 = findSiPrimitive(registry, 'u8');
if (u8) {
portable = registry.lookup.types.find((t) =>
(
t.type.def.isSequence &&
t.type.def.asSequence.type.eq(u8.id)
) || (
t.type.def.isHistoricMetaCompat &&
t.type.def.asHistoricMetaCompat.eq(orig)
)
);
}
}
if (!portable) {
console.warn(`Unable to map ${orig} to a lookup index`);
}
return portable;
}
// Small helper function to factorize code on this page.
/** @internal */
export function createRuntimeFunction (prefix: string, method: string, key: Uint8Array | string, { docs, type }: ManualMetadata): (registry: Registry) => StorageEntry {
return (registry: Registry): StorageEntry =>
createFunction(registry, {
meta: registry.createType('StorageEntryMetadataLatest', {
docs: registry.createType('Vec<Text>', [docs]),
modifier: registry.createType('StorageEntryModifierLatest', 'Required'),
name: registry.createType('Text', method),
toJSON: (): any => key,
type: registry.createType('StorageEntryTypeLatest', { Plain: findSiType(registry, type)?.id || 0 })
}),
method,
prefix,
section: prefix.toLowerCase()
}, { key, skipHashing: true });
}
+25 -2
View File
@@ -125,16 +125,39 @@ export function defaultValues (registry: Registry, { data, fails = [] }: Check,
});
}
function serialize (registry: Registry, { data }: Check): void {
const metadata = new Metadata(registry, data);
it('serializes to hex in the same form as retrieved', (): void => {
expect(metadata.toHex()).toEqual(data);
});
// NOTE Assuming the first passes this is actually something that doesn't test
// anything new. If the first line in this function passed and the above values
// are equivalent, this would be as well.
it.skip('can construct from a re-serialized form', (): void => {
expect(
() => new Metadata(registry, metadata.toHex())
).not.toThrow();
});
// as used in the extension
it('can construct from asCallsOnly.toHex()', (): void => {
expect(
() => new Metadata(registry, metadata.asCallsOnly.toHex())
).not.toThrow();
});
}
export function testMeta (version: number, matchers: Record<string, Check>, withFallback = true): void {
describe(`MetadataV${version}`, (): void => {
describe.each(Object.keys(matchers))('%s', (type): void => {
const matcher = matchers[type];
const registry = new TypeRegistry();
serialize(registry, matcher);
decodeLatestMeta(registry, type, version, matcher);
toLatest(registry, version, matcher);
defaultValues(registry, matcher, true, withFallback);
});
});
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/types', version: '6.4.1' };
export const packageInfo = { name: '@polkadot/types', version: '6.5.1' };
+551 -582
View File
File diff suppressed because it is too large Load Diff