Compare commits

...
32 Commits
Author SHA1 Message Date
Github Actions d917861a77 [CI Skip] release/stable 6.5.2
skip-checks: true
2021-10-26 06:02:42 +00:00
Jaco 12a54efde5 Fix Struct decoding for null (#4112)
* Fix Struct decoding for null

* CHANGELOG

* 6.5.2
2021-10-26 08:46:03 +03:00
Github Actions 9ae87bed78 [CI Skip] release/beta 6.5.2-3
skip-checks: true
2021-10-25 14:27:40 +00:00
Jaco 7f5a52258c Adjust toHuman on Call (#4109) 2021-10-25 17:10:26 +03:00
Github Actions 2c212e6b4d [CI Skip] release/beta 6.5.2-2
skip-checks: true
2021-10-25 14:07:57 +00:00
Jaco 3d75744a20 Bump dev deps (#4108) 2021-10-25 16:51:05 +03:00
Github Actions d2ff259989 [CI Skip] release/beta 6.5.2-1
skip-checks: true
2021-10-25 12:08:53 +00:00
Jaco cac2ef30a1 Bump dev (#4106) 2021-10-25 14:44:47 +03:00
Github Actions ea38dedcc1 [CI Skip] release/beta 6.5.2-0
skip-checks: true
2021-10-25 06:15:30 +00:00
Jaco 0bd632e612 Allow for optional known RuntimeVersion on api.at (#4103)
* Allow for optional known RuntimeVersion on api.at

* CHANGELOG typo
2021-10-25 08:57:26 +03:00
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
70 changed files with 1589 additions and 1272 deletions
+2 -1
View File
@@ -40,4 +40,5 @@
6.0.5
6.1.2
6.4.2
6.4.2
6.5.2
+32
View File
@@ -1,5 +1,37 @@
# CHANGELOG
## 6.5.2 Oct 26, 2021
Upgrade priority: Low. Recommended for users with `.at` queries on unknown blocks.
Changes:
- Adjust `toHuman` on `Call` to return names & (not only) values
- Allow for optional known `RuntimeVersion` to short-circuit `api.at`
- Ensure `Struct` decodes fully on `null` input (equivalent to `undefined` & `{}`)
## 6.5.1 Oct 24, 2021
Upgrade priority: Low. Internal maintenance upgrades.
Contributed:
- Add `Auction` to Polkadot pre-0.9.11 `ProxyType` (Thanks 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` (Ascii) 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+
+18 -11
View File
@@ -1,25 +1,31 @@
{
"repository": "https://github.com/polkadot-js/api",
"author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/api/issues",
"engines": {},
"homepage": "https://github.com/polkadot-js/api#readme",
"license": "Apache-2",
"packageManager": "yarn@3.0.1",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/polkadot-js/api.git"
},
"sideEffects": false,
"type": "commonjs",
"version": "6.5.2",
"workspaces": [
"packages/*"
],
"resolutions": {
"typescript": "^4.4.4"
},
"scripts": {
"build": "yarn build:interfaces && polkadot-dev-build-ts",
"build:extra": "(cd packages/typegen && copyfiles scripts/* build)",
"build:interfaces": "polkadot-types-internal-interfaces",
"build:release": "polkadot-ci-ghact-build",
"build:rollup": "polkadot-exec-rollup --config",
"docs:metadata": "polkadot-types-internal-metadata",
"chain:info": "polkadot-types-chain-info",
"lint": "polkadot-dev-run-lint",
"clean": "polkadot-dev-clean-build",
"docs:metadata": "polkadot-types-internal-metadata",
"lint": "polkadot-dev-run-lint",
"postinstall": "polkadot-dev-yarn-only",
"test": "polkadot-dev-run-test --coverage --forceExit --runInBand --testPathIgnorePatterns e2e",
"test:one": "polkadot-dev-run-test --detectOpenHandles --forceExit",
@@ -29,12 +35,13 @@
"@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.9",
"@polkadot/ts": "^0.4.12",
"@polkadot/typegen": "workspace:packages/typegen",
"@types/jest": "^27.0.2",
"copyfiles": "^2.4.1"
},
"version": "6.4.2",
"packageManager": "yarn@3.0.1"
}
"resolutions": {
"typescript": "^4.4.4"
}
}
+23 -18
View File
@@ -1,28 +1,33 @@
{
"name": "@polkadot/api-contract",
"version": "6.4.2",
"type": "module",
"author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/api/issues",
"contributors": [],
"description": "Interfaces for interacting with contracts and contract ABIs",
"main": "index.js",
"engines": {
"node": ">=14.0.0"
},
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
"license": "Apache-2.0",
"maintainers": [],
"name": "@polkadot/api-contract",
"private": false,
"repository": {
"directory": "packages/api-contract",
"type": "git",
"url": "https://github.com/polkadot-js/api.git"
},
"sideEffects": [
"./detectPackage.js",
"./detectPackage.cjs"
],
"engines": {
"node": ">=14.0.0"
},
"author": "Jaco Greeff <jacogr@gmail.com>",
"maintainers": [],
"contributors": [],
"license": "Apache-2.0",
"repository": "github:polkadot-js/api",
"bugs": "https://github.com/polkadot-js/api/issues",
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
"type": "module",
"version": "6.5.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.15.4",
"@polkadot/api": "6.4.2",
"@polkadot/types": "6.4.2",
"@polkadot/util": "^7.5.1",
"@polkadot/api": "6.5.2",
"@polkadot/types": "6.5.2",
"@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.2' };
export const packageInfo = { name: '@polkadot/api-contract', version: '6.5.2' };
@@ -18,6 +18,7 @@
"lookupIndex": 1,
"lookupName": "RecursiveMyEnum",
"type": "Lookup1",
"typeName": "MyEnum",
"index": 1,
"name": "B"
}
+27 -22
View File
@@ -1,34 +1,39 @@
{
"name": "@polkadot/api-derive",
"version": "6.4.2",
"type": "module",
"author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/api/issues",
"contributors": [],
"description": "Common functions used across Polkadot, derived from RPC calls and storage queries.",
"main": "index.js",
"engines": {
"node": ">=14.0.0"
},
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
"license": "Apache-2.0",
"maintainers": [],
"name": "@polkadot/api-derive",
"private": false,
"repository": {
"directory": "packages/api-derive",
"type": "git",
"url": "https://github.com/polkadot-js/api.git"
},
"sideEffects": [
"./detectPackage.js",
"./detectPackage.cjs"
],
"engines": {
"node": ">=14.0.0"
},
"author": "Jaco Greeff <jacogr@gmail.com>",
"maintainers": [],
"contributors": [],
"license": "Apache-2.0",
"repository": "github:polkadot-js/api",
"bugs": "https://github.com/polkadot-js/api/issues",
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
"type": "module",
"version": "6.5.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.15.4",
"@polkadot/api": "6.4.2",
"@polkadot/rpc-core": "6.4.2",
"@polkadot/types": "6.4.2",
"@polkadot/util": "^7.5.1",
"@polkadot/util-crypto": "^7.5.1",
"@polkadot/api": "6.5.2",
"@polkadot/rpc-core": "6.5.2",
"@polkadot/types": "6.5.2",
"@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.2"
"@polkadot/keyring": "^7.6.1",
"@polkadot/rpc-provider": "6.5.2"
}
}
}
+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.2' };
export const packageInfo = { name: '@polkadot/api-derive', version: '6.5.2' };
+28 -23
View File
@@ -1,34 +1,39 @@
{
"name": "@polkadot/api",
"version": "6.4.2",
"type": "module",
"author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/api/issues",
"contributors": [],
"description": "Promise and RxJS wrappers around the Polkadot JS RPC",
"main": "index.js",
"engines": {
"node": ">=14.0.0"
},
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
"license": "Apache-2.0",
"maintainers": [],
"name": "@polkadot/api",
"private": false,
"repository": {
"directory": "packages/api",
"type": "git",
"url": "https://github.com/polkadot-js/api.git"
},
"sideEffects": [
"./detectPackage.js",
"./detectPackage.cjs"
],
"engines": {
"node": ">=14.0.0"
},
"author": "Jaco Greeff <jacogr@gmail.com>",
"maintainers": [],
"contributors": [],
"license": "Apache-2.0",
"repository": "github:polkadot-js/api",
"bugs": "https://github.com/polkadot-js/api/issues",
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
"type": "module",
"version": "6.5.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.15.4",
"@polkadot/api-derive": "6.4.2",
"@polkadot/keyring": "^7.5.1",
"@polkadot/rpc-core": "6.4.2",
"@polkadot/rpc-provider": "6.4.2",
"@polkadot/types": "6.4.2",
"@polkadot/types-known": "6.4.2",
"@polkadot/util": "^7.5.1",
"@polkadot/util-crypto": "^7.5.1",
"@polkadot/api-derive": "6.5.2",
"@polkadot/keyring": "^7.6.1",
"@polkadot/rpc-core": "6.5.2",
"@polkadot/rpc-provider": "6.5.2",
"@polkadot/types": "6.5.2",
"@polkadot/types-known": "6.5.2",
"@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
+3 -5
View File
@@ -163,7 +163,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
this._rx.hasSubscriptions = this._rpcCore.provider.hasSubscriptions;
}
public abstract at (blockHash: Uint8Array | string): Promise<ApiDecoration<ApiType>>;
public abstract at (blockHash: Uint8Array | string, knownVersion?: RuntimeVersion): Promise<ApiDecoration<ApiType>>;
/**
* @description Return the current used registry
@@ -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)
])
));
}
+33 -16
View File
@@ -2,9 +2,8 @@
// 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 { ChainProperties, Hash, RuntimeVersion, RuntimeVersionPartial } from '@polkadot/types/interfaces';
import type { Registry } from '@polkadot/types/types';
import type { BN } from '@polkadot/util';
import type { ApiBase, ApiDecoration, ApiOptions, ApiTypes, DecorateMethod } from '../types';
@@ -112,15 +111,34 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
/**
* @description Returns a decorated API instance at a specific point in time
*/
public async at (blockHash: Uint8Array | string): Promise<ApiDecoration<ApiType>> {
public async at (blockHash: Uint8Array | string, knownVersion?: RuntimeVersion): Promise<ApiDecoration<ApiType>> {
const u8aHash = u8aToU8a(blockHash);
const registry = await this.getBlockRegistry(u8aHash);
const registry = await this.getBlockRegistry(u8aHash, knownVersion);
// always create a new decoration - since we are pointing to a specific hash, this
// means that all queries needs to use that hash (not a previous one already existing)
return this._createDecorated(registry, true, u8aHash).decoratedApi;
}
private _getBlockRegistryViaVersion (blockHash: Uint8Array, version?: RuntimeVersionPartial): VersionedRegistry<ApiType> | null {
if (version) {
// check for pre-existing registries. We also check specName, e.g. it
// 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)
);
if (existingViaVersion) {
existingViaVersion.lastBlockHash = blockHash;
return existingViaVersion;
}
}
return null;
}
private async _getBlockRegistry (blockHash: Uint8Array): Promise<VersionedRegistry<ApiType>> {
// ensure we have everything required
assert(this._genesisHash && this._runtimeVersion, 'Cannot retrieve data on an uninitialized chain');
@@ -130,7 +148,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,26 +158,19 @@ 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
const existingViaVersion = this.#registries.find(({ specName, specVersion }) =>
specName.eq(version.specName) &&
specVersion.eq(version.specVersion)
);
const existingViaVersion = this._getBlockRegistryViaVersion(blockHash, version);
if (existingViaVersion) {
existingViaVersion.lastBlockHash = blockHash;
return existingViaVersion;
}
// 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);
@@ -175,7 +186,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
/**
* @description Sets up a registry based on the block hash defined
*/
public async getBlockRegistry (blockHash: Uint8Array): Promise<VersionedRegistry<ApiType>> {
public async getBlockRegistry (blockHash: Uint8Array, knownVersion?: RuntimeVersion): Promise<VersionedRegistry<ApiType>> {
const existingViaHash = this.#registries.find(({ lastBlockHash }) =>
lastBlockHash && u8aEq(lastBlockHash, blockHash)
);
@@ -184,6 +195,12 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
return existingViaHash;
}
const existingViaVersion = this._getBlockRegistryViaVersion(blockHash, knownVersion);
if (existingViaVersion) {
return existingViaVersion;
}
const blockHashHex = u8aToHex(blockHash);
let waiting = this.#waitingRegistries[blockHashHex];
+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.2' };
export const packageInfo = { name: '@polkadot/api', version: '6.5.2' };
+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;
}
+24 -19
View File
@@ -1,31 +1,36 @@
{
"name": "@polkadot/rpc-core",
"version": "6.4.2",
"type": "module",
"author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/api/issues",
"contributors": [],
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
"main": "index.js",
"engines": {
"node": ">=14.0.0"
},
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
"license": "Apache-2.0",
"maintainers": [],
"name": "@polkadot/rpc-core",
"private": false,
"repository": {
"directory": "packages/rpc-core",
"type": "git",
"url": "https://github.com/polkadot-js/api.git"
},
"sideEffects": [
"./detectPackage.js",
"./detectPackage.cjs"
],
"engines": {
"node": ">=14.0.0"
},
"author": "Jaco Greeff <jacogr@gmail.com>",
"maintainers": [],
"contributors": [],
"license": "Apache-2.0",
"repository": "github:polkadot-js/api",
"bugs": "https://github.com/polkadot-js/api/issues",
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
"type": "module",
"version": "6.5.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.15.4",
"@polkadot/rpc-provider": "6.4.2",
"@polkadot/types": "6.4.2",
"@polkadot/util": "^7.5.1",
"@polkadot/rpc-provider": "6.5.2",
"@polkadot/types": "6.5.2",
"@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.2' };
export const packageInfo = { name: '@polkadot/rpc-core', version: '6.5.2' };
+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;
}
+30 -25
View File
@@ -1,37 +1,42 @@
{
"name": "@polkadot/rpc-provider",
"version": "6.4.2",
"type": "module",
"author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/api/issues",
"contributors": [],
"description": "Transport providers for the API",
"main": "index.js",
"engines": {
"node": ">=14.0.0"
},
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
"license": "Apache-2.0",
"maintainers": [],
"name": "@polkadot/rpc-provider",
"private": false,
"repository": {
"directory": "packages/rpc-provider",
"type": "git",
"url": "https://github.com/polkadot-js/api.git"
},
"sideEffects": [
"./detectPackage.js",
"./detectPackage.cjs"
],
"engines": {
"node": ">=14.0.0"
},
"author": "Jaco Greeff <jacogr@gmail.com>",
"maintainers": [],
"contributors": [],
"license": "Apache-2.0",
"repository": "github:polkadot-js/api",
"bugs": "https://github.com/polkadot-js/api/issues",
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
"type": "module",
"version": "6.5.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.15.4",
"@polkadot/types": "6.4.2",
"@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.2",
"@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.2",
"mock-socket": "^9.0.5",
"nock": "^13.1.3"
"@polkadot/keyring": "^7.6.1",
"@polkadot/types": "6.5.2",
"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.2' };
export const packageInfo = { name: '@polkadot/rpc-provider', version: '6.5.2' };
+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;
+25 -20
View File
@@ -1,16 +1,28 @@
{
"name": "@polkadot/typegen",
"version": "6.4.2",
"type": "module",
"author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/api/issues",
"contributors": [],
"description": "Type generation scripts",
"main": "index.js",
"engines": {
"node": ">=14.0.0"
},
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/typegen#readme",
"license": "Apache-2.0",
"maintainers": [],
"name": "@polkadot/typegen",
"private": false,
"repository": {
"directory": "packages/typegen",
"type": "git",
"url": "https://github.com/polkadot-js/api.git"
},
"sideEffects": [
"./detectPackage.js",
"./detectPackage.cjs"
],
"engines": {
"node": ">=14.0.0"
},
"type": "module",
"version": "6.5.2",
"main": "index.js",
"bin": {
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.cjs",
"polkadot-types-from-chain": "./scripts/polkadot-types-from-chain.cjs",
@@ -18,22 +30,15 @@
"polkadot-types-internal-interfaces": "./scripts/polkadot-types-internal-interfaces.cjs",
"polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.cjs"
},
"repository": "github:polkadot-js/api",
"author": "Jaco Greeff <jacogr@gmail.com>",
"maintainers": [],
"contributors": [],
"license": "Apache-2.0",
"bugs": "https://github.com/polkadot-js/api/issues",
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/typegen#readme",
"dependencies": {
"@babel/core": "^7.15.8",
"@babel/register": "^7.15.3",
"@babel/runtime": "^7.15.4",
"@polkadot/api": "6.4.2",
"@polkadot/rpc-provider": "6.4.2",
"@polkadot/types": "6.4.2",
"@polkadot/types-support": "6.4.2",
"@polkadot/util": "^7.5.1",
"@polkadot/api": "6.5.2",
"@polkadot/rpc-provider": "6.5.2",
"@polkadot/types": "6.5.2",
"@polkadot/types-support": "6.5.2",
"@polkadot/util": "^7.6.1",
"handlebars": "^4.7.7",
"websocket": "^1.0.34",
"yargs": "^17.2.1"
@@ -42,4 +47,4 @@
"@types/websocket": "^1.0.4",
"@types/yargs": "^17.0.4"
}
}
}
+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.2' };
export const packageInfo = { name: '@polkadot/typegen', version: '6.5.2' };
+23 -18
View File
@@ -1,27 +1,32 @@
{
"name": "@polkadot/types-known",
"version": "6.4.2",
"type": "module",
"author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/api/issues",
"contributors": [],
"description": "Known type definitions",
"main": "index.js",
"engines": {
"node": ">=14.0.0"
},
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-known#readme",
"license": "Apache-2.0",
"maintainers": [],
"name": "@polkadot/types-known",
"private": false,
"repository": {
"directory": "packages/types-known",
"type": "git",
"url": "https://github.com/polkadot-js/api.git"
},
"sideEffects": [
"./detectPackage.js",
"./detectPackage.cjs"
],
"engines": {
"node": ">=14.0.0"
},
"author": "Jaco Greeff <jacogr@gmail.com>",
"maintainers": [],
"contributors": [],
"license": "Apache-2.0",
"repository": "github:polkadot-js/api",
"bugs": "https://github.com/polkadot-js/api/issues",
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-known#readme",
"type": "module",
"version": "6.5.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.15.4",
"@polkadot/networks": "^7.5.1",
"@polkadot/types": "6.4.2",
"@polkadot/util": "^7.5.1"
"@polkadot/networks": "^7.6.1",
"@polkadot/types": "6.5.2",
"@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.2' };
export const packageInfo = { name: '@polkadot/types-known', version: '6.5.2' };
+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}`
}), {});
}
+21 -16
View File
@@ -1,25 +1,30 @@
{
"name": "@polkadot/types-support",
"version": "6.4.2",
"type": "module",
"author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/api/issues",
"contributors": [],
"description": "Supporting files for types, mostly for testing",
"main": "index.js",
"engines": {
"node": ">=14.0.0"
},
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-support#readme",
"license": "Apache-2.0",
"maintainers": [],
"name": "@polkadot/types-support",
"private": false,
"repository": {
"directory": "packages/types-support",
"type": "git",
"url": "https://github.com/polkadot-js/api.git"
},
"sideEffects": [
"./detectPackage.js",
"./detectPackage.cjs"
],
"engines": {
"node": ">=14.0.0"
},
"author": "Jaco Greeff <jacogr@gmail.com>",
"maintainers": [],
"contributors": [],
"license": "Apache-2.0",
"repository": "github:polkadot-js/api",
"bugs": "https://github.com/polkadot-js/api/issues",
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-support#readme",
"type": "module",
"version": "6.5.2",
"main": "index.js",
"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.2' };
export const packageInfo = { name: '@polkadot/types-support', version: '6.5.2' };
+24 -19
View File
@@ -1,33 +1,38 @@
{
"name": "@polkadot/types",
"version": "6.4.2",
"type": "module",
"author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/api/issues",
"contributors": [],
"description": "Implementation of the Parity codec",
"main": "index.js",
"engines": {
"node": ">=14.0.0"
},
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
"license": "Apache-2.0",
"maintainers": [],
"name": "@polkadot/types",
"private": false,
"repository": {
"directory": "packages/types",
"type": "git",
"url": "https://github.com/polkadot-js/api.git"
},
"sideEffects": [
"./detectPackage.js",
"./detectPackage.cjs"
],
"engines": {
"node": ">=14.0.0"
},
"author": "Jaco Greeff <jacogr@gmail.com>",
"maintainers": [],
"contributors": [],
"license": "Apache-2.0",
"repository": "github:polkadot-js/api",
"bugs": "https://github.com/polkadot-js/api/issues",
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
"type": "module",
"version": "6.5.2",
"main": "index.js",
"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.2",
"@polkadot/keyring": "^7.6.1",
"@polkadot/types-support": "6.5.2",
"@types/bn.js": "^4.11.6",
"bn.js": "^4.12.0"
}
}
}
+2 -1
View File
@@ -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';
@@ -259,6 +259,7 @@ declare module '@polkadot/types/types/registry' {
CoreAssignment: CoreAssignment;
CoreIndex: CoreIndex;
CoreOccupied: CoreOccupied;
CrateVersion: CrateVersion;
CreatedBlock: CreatedBlock;
Data: Data;
DeferredOffenceOf: DeferredOffenceOf;
+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';
+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();
}
/**
+10 -9
View File
@@ -52,15 +52,16 @@ describe('Struct', (): void => {
testEncode('toString', '{"foo":"bazzing","bar":69}');
});
it('decodes null', (): void => {
expect(
new (
Struct.with({
txt: Text,
u32: U32
})
)(registry, null).toString()
).toEqual('{}');
it('decodes null/undefined/empty correctly (& equivalently)', (): void => {
const Clazz = Struct.with({
txt: Text,
u32: U32
});
const expected = { txt: '', u32: '0' };
expect(new Clazz(registry, {}).toHuman()).toEqual(expected);
expect(new Clazz(registry, null).toHuman()).toEqual(expected);
expect(new Clazz(registry, undefined).toHuman()).toEqual(expected);
});
it('decodes reusing instantiated inputs', (): void => {
+2 -4
View File
@@ -113,12 +113,10 @@ function decodeStruct <T> (registry: Registry, Types: ConstructorDef, value: unk
return raw;
}, {} as T);
} else if (!value) {
return {} as T;
}
// We assume from here that value is a JS object (Array, Map, Object)
return decodeStructFromObject(registry, Types, value, jsonMap);
return decodeStructFromObject(registry, Types, value || {}, jsonMap);
}
/**
@@ -147,7 +145,7 @@ export class Struct<
readonly #Types: ConstructorDef;
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
constructor (registry: Registry, Types: S, value: V | Map<unknown, unknown> | unknown[] | string = {} as V, jsonMap: Map<keyof S, string> = new Map()) {
constructor (registry: Registry, Types: S, value?: V | Map<unknown, unknown> | unknown[] | string | null, jsonMap: Map<keyof S, string> = new Map()) {
super(Object.entries(decodeStruct(registry, mapToTypeMap(registry, Types), value, jsonMap)));
this.registry = registry;
+1
View File
@@ -41,6 +41,7 @@ export interface TypeDef {
namespace?: string;
sub?: TypeDef | TypeDef[];
type: string;
typeName?: string;
}
export interface CreateOptions {
+12 -8
View File
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { FunctionMetadataLatest } from '../interfaces/metadata';
import type { AnyJson, AnyTuple, AnyU8a, ArgsDef, CallBase, CallFunction, IMethod, InterfaceTypes, Registry } from '../types';
import type { AnyJson, AnyTuple, AnyU8a, ArgsDef, CallBase, CallFunction, Codec, IMethod, InterfaceTypes, Registry } from '../types';
import { isHex, isObject, isU8a, u8aToU8a } from '@polkadot/util';
@@ -145,7 +145,6 @@ export class GenericCall<A extends AnyTuple = AnyTuple> extends Struct implement
* @description The arguments for the function call
*/
public get args (): A {
// FIXME This should return a Struct instead of an Array
return [...(this.get('args') as Struct).values()] as A;
}
@@ -156,6 +155,13 @@ export class GenericCall<A extends AnyTuple = AnyTuple> extends Struct implement
return getArgsDef(this.registry, this.meta);
}
/**
* @description The argument entries
*/
public get argsEntries (): [string, Codec][] {
return [...(this.get('args') as Struct).entries()];
}
/**
* @description The encoded `[sectionIndex, methodIndex]` identifier
*/
@@ -211,12 +217,10 @@ export class GenericCall<A extends AnyTuple = AnyTuple> extends Struct implement
}
return {
args: this.args.map((arg) => arg.toHuman(isExpanded)),
// args: this.args.map((arg, index) => call
// ? { [call.meta.args[index].name.toString()]: arg.toHuman(isExpanded) }
// : arg.toHuman(isExpanded)
// ),
// callIndex: u8aToHex(this.callIndex),
args: this.argsEntries.reduce<Record<string, AnyJson>>((args, [n, a]) => ({
...args,
[n]: a.toHuman(isExpanded)
}), {}),
method: call?.method,
section: call?.section,
...(isExpanded && call
@@ -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,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 });
}
+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.2' };
export const packageInfo = { name: '@polkadot/types', version: '6.5.2' };
+551 -582
View File
File diff suppressed because it is too large Load Diff