Compare commits

...
39 Commits
Author SHA1 Message Date
Github Actions 23d50248de [CI Skip] release/stable 4.9.1
skip-checks: true
2021-05-06 10:07:39 +00:00
Jaco ad4e54a2f6 4.9 (#3497) 2021-05-06 11:57:51 +02:00
Github Actions e659df27ae [CI Skip] release/beta 4.8.2-17
skip-checks: true
2021-05-06 09:09:11 +00:00
Jaco 6dc3c06fe8 Metadata bump for latest Substrate (#3496) 2021-05-06 11:01:00 +02:00
Github Actions 776956f166 [CI Skip] release/beta 4.8.2-16
skip-checks: true
2021-05-06 09:00:25 +00:00
Jaco 4c5203acba Optimize historic metadata retrieval from rpc core (#3495)
* Optimize historic metadata retrieval from rpc core

* Bump deps
2021-05-06 10:50:46 +02:00
Github Actions d80070a041 [CI Skip] release/beta 4.8.2-15
skip-checks: true
2021-05-05 19:44:34 +00:00
Jaco 1c00cb4c4e Align RPCs with Substrate master (#3493)
* Align RPCs with Substrate master

* Build interfaces, apply fixes

* Metadata v13 changes
2021-05-05 21:35:28 +02:00
Github Actions 736505603e [CI Skip] release/beta 4.8.2-14
skip-checks: true
2021-05-05 19:23:44 +00:00
Jaco c243da79e1 Prepare for auto-capability detection for historic queries (#3474)
* Add auto-capability detection for historic queries

* Detect

* Detection via storage length

* Capabilities via storage sizes

* Update CHANGELOG.md

* Explicit

* CHANGELOG

* Westend upgrade block

* Pass registry explcitly

* Updates

* Adjust

* .at remove capabilities call
2021-05-05 21:12:50 +02:00
Github Actions 2677f38090 [CI Skip] release/beta 4.8.2-13
skip-checks: true
2021-05-05 18:45:37 +00:00
Jaco 41d05d2402 Westend 9000 upgrade block (#3491)
* Westend 9000 upgrade block

* Upgrade block for Westend 9000

* Correct block
2021-05-05 20:37:13 +02:00
Github Actions 0f38584566 [CI Skip] release/beta 4.8.2-12
skip-checks: true
2021-05-05 16:38:02 +00:00
André Silva 2b7fb8667e parachains: update HostConfiguration type (#3492) 2021-05-05 19:27:39 +03:00
Github Actions ca18846bfb [CI Skip] release/beta 4.8.2-11
skip-checks: true
2021-05-05 10:04:57 +00:00
Jaco 4ba372d29b Remove deprecated api-contract methods (#3486)
* Remove deprectaed api-contract methods

* Remove deprecated read/exec from checkTypes
2021-05-05 11:54:25 +02:00
Github Actions bdc2d24366 [CI Skip] release/beta 4.8.2-10
skip-checks: true
2021-05-05 07:06:39 +00:00
Jaco 3de06c1d4c Support for metadata v13 (#3465)
* Support for metadata v13

* Lint fixes

* Lastest tag as string

* Documentation

* MagicNumber opt

* NMap enum entry

* NMapTypeLatest

* Adjust for NMap type overrides

* Static from v13

* Basic NMap support

* lint

* Test expectations
2021-05-05 08:55:49 +02:00
Github Actions b51149d895 [CI Skip] release/beta 4.8.2-9
skip-checks: true
2021-05-04 15:09:01 +00:00
Jaco Greeff e0fef55366 Adjust aliasses for paras* 2021-05-04 17:59:18 +03:00
Github Actions e2aac5f94a [CI Skip] release/beta 4.8.2-8
skip-checks: true
2021-05-04 09:45:59 +00:00
Jaco 8f44f84c7f Update ChangesTrieSignal (#3485) 2021-05-04 11:36:02 +02:00
Jaco d53a61ec86 ConsensusEngineId implements [u8; 4] (#3482)
* ConsensusEngineId implements [u8; 4]

* Adjust tests

* isLE
2021-05-04 11:27:01 +02:00
Github Actions cf18f79c14 [CI Skip] release/beta 4.8.2-7
skip-checks: true
2021-05-04 09:26:08 +00:00
Jaco beb8011b4c Adjust ContractInfo types (#3484) 2021-05-04 11:15:38 +02:00
Github Actions 38a601b665 [CI Skip] release/beta 4.8.2-6
skip-checks: true
2021-05-04 08:18:36 +00:00
Jaco 11a3483ce5 Adjust error logs on create (#3480) 2021-05-04 10:08:44 +02:00
Github Actions 1db133b741 [CI Skip] release/beta 4.8.2-5
skip-checks: true
2021-05-03 19:40:32 +00:00
Jaco 716dce0093 Westend 900 upgrade block (#3478) 2021-05-03 21:30:49 +02:00
Github Actions 3b53442172 [CI Skip] release/beta 4.8.2-4
skip-checks: true
2021-05-03 18:21:51 +00:00
Jaco 253d94a47d Adjust re-encoding of BitVec based on decoded length (#3476) 2021-05-03 20:12:37 +02:00
Github Actions fb1129a49b [CI Skip] release/beta 4.8.2-3
skip-checks: true
2021-05-03 17:23:51 +00:00
Jaco 1cc56d6e44 Adjust para types (#3475) 2021-05-03 19:14:15 +02:00
Github Actions 9e2983a735 [CI Skip] release/beta 4.8.2-2
skip-checks: true
2021-05-03 13:33:19 +00:00
Jaco a6fcba95de Adjust capability detection (#3473)
* Adjust capability detection

* Adjust types

* Fully known isU32
2021-05-03 15:24:31 +02:00
Github Actions c8c535834e [CI Skip] release/beta 4.8.2-1
skip-checks: true
2021-05-03 11:55:00 +00:00
Jaco b8d7c2e3e3 Re-add isPedantic check on storage decoding (#3471)
* Re-add isPedantic check on storage decoding

* Additional length log

* Check for existing system

* Adjust output length
2021-05-03 13:45:37 +02:00
Github Actions 0283d4727b [CI Skip] release/beta 4.8.2-0
skip-checks: true
2021-05-03 11:25:48 +00:00
Jaco a4ab732478 Additional Xcm types (#3472) 2021-05-03 13:16:18 +02:00
79 changed files with 15645 additions and 571 deletions
+26
View File
@@ -1,5 +1,31 @@
# CHANGELOG
## 4.9.1 May 6, 2021
Upgrade priority: Medium. Required for the next v0.9.0 Polkadot/Kusama chain upgrades where parachains are used.
- **Breaking change** The previously deprecated contracts interfaces, has been removed. Update to `<myContract>.query.*`, `<myContract>.tx.*` and `<myCode>.tx.*` interfaces as per the previous code usage hints.
- **Important** By default the `isPedantic` mode is now switched on for storage queries. This means that the API will fail on any types where the input/output decoding doesn't match 100%
Changes:
- Re-add isPedantic check on storage decoding
- `ConsensusEngineId` now implements `[u8;4]` (mapping closer to Rust source)
- Additional Xcm types
- Adjust parachain types
- Remove error logging on createType (details passed in error)
- Adjust `ContractInfo` type as per latest Substrate
- Adjust `DigestItem` type as per latest Substrate
- Adjust re-encoding of `BitVec` based on decoded length
- Added `contracts_instantiate`, `state_traceBlock` & `system_reservedPeers` RPCs
- Prepare for auto-capability detection with historic `.at` queries
- Add known upgrade block for Westend 900 & 9000
- Remove all deprecated interfaces inside `@polkadot/api-contracts`
- Initial support for NMap storage keys
- Support metadata v13 from Substrate (upcoming upgrade)
- Optimize historic metadata retrieval from rpc core
## 4.8.1 May 2, 2021
Upgrade priority: Low. Recommended when using or developing for parachains.
+2 -2
View File
@@ -28,11 +28,11 @@
"@babel/core": "^7.14.0",
"@babel/register": "^7.13.16",
"@babel/runtime": "^7.14.0",
"@polkadot/dev": "^0.62.11",
"@polkadot/dev": "^0.62.12",
"@polkadot/ts": "^0.3.64",
"@polkadot/typegen": "workspace:packages/typegen",
"@types/jest": "^26.0.23",
"copyfiles": "^2.4.1"
},
"version": "4.8.1"
"version": "4.9.1"
}
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api-contract",
"version": "4.8.1",
"version": "4.9.1",
"type": "module",
"description": "Interfaces for interacting with contracts and contract ABIs",
"main": "index.js",
@@ -20,8 +20,8 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
"dependencies": {
"@babel/runtime": "^7.14.0",
"@polkadot/api": "4.8.1",
"@polkadot/types": "4.8.1",
"@polkadot/api": "4.9.1",
"@polkadot/types": "4.9.1",
"@polkadot/util": "^6.3.1",
"@polkadot/x-rxjs": "^6.3.1",
"bn.js": "^4.11.9"
+2 -9
View File
@@ -6,7 +6,7 @@ import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
import type { AccountId, EventRecord, Hash } from '@polkadot/types/interfaces';
import type { AnyJson, CodecArg, ISubmittableResult } from '@polkadot/types/types';
import type { AbiConstructor, BlueprintOptions } from '../types';
import type { ContractGeneric, MapConstructorExec } from './types';
import type { MapConstructorExec } from './types';
import { SubmittableResult } from '@polkadot/api';
import { ApiBase } from '@polkadot/api/base';
@@ -16,7 +16,7 @@ import { Abi } from '../Abi';
import { applyOnEvent } from '../util';
import { Base } from './Base';
import { Contract } from './Contract';
import { createBluePrintTx, createBluePrintWithId, EMPTY_SALT, encodeSalt } from './util';
import { createBluePrintTx, EMPTY_SALT, encodeSalt } from './util';
export class BlueprintSubmittableResult<ApiType extends ApiTypes> extends SubmittableResult {
public readonly contract?: Contract<ApiType>;
@@ -34,19 +34,12 @@ export class Blueprint<ApiType extends ApiTypes> extends Base<ApiType> {
*/
public readonly codeHash: Hash;
/**
* @deprecated
* @description Deprecated. Use `.tx.<constructorName>`. Creates a contract in a non-deterministic way.
*/
public readonly createContract: ContractGeneric<BlueprintOptions, SubmittableExtrinsic<ApiType, BlueprintSubmittableResult<ApiType>>>;
readonly #tx: MapConstructorExec<ApiType> = {};
constructor (api: ApiBase<ApiType>, abi: AnyJson | Abi, codeHash: string | Hash | Uint8Array, decorateMethod: DecorateMethod<ApiType>) {
super(api, abi, decorateMethod);
this.codeHash = this.registry.createType('Hash', codeHash);
this.createContract = createBluePrintWithId(this.#deploy);
this.abi.constructors.forEach((c): void => {
if (isUndefined(this.#tx[c.method])) {
+1 -13
View File
@@ -10,7 +10,7 @@ import type { MapConstructorExec } from './types';
import { SubmittableResult } from '@polkadot/api';
import { ApiBase } from '@polkadot/api/base';
import { assert, compactAddLength, isFunction, isUndefined, isWasm, logger, u8aToU8a } from '@polkadot/util';
import { assert, compactAddLength, isFunction, isUndefined, isWasm, u8aToU8a } from '@polkadot/util';
import { blake2AsU8a } from '@polkadot/util-crypto';
import { Abi } from '../Abi';
@@ -20,8 +20,6 @@ import { Blueprint } from './Blueprint';
import { Contract } from './Contract';
import { createBluePrintTx, EMPTY_SALT, encodeSalt } from './util';
const l = logger('Code');
export class CodeSubmittableResult<ApiType extends ApiTypes> extends SubmittableResult {
public readonly blueprint?: Blueprint<ApiType>;
public readonly contract?: Contract<ApiType>;
@@ -59,16 +57,6 @@ export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
return this.#tx;
}
/**
* @description Deploy the code bundle and the contract, creating a Blueprint.
* @deprecated Use the `code.tx.<constructor>(...) format to put code and deploy
*/
public createContract (constructorOrId: AbiConstructor | string | number, options: BlueprintOptions, params: CodecArg[]): SubmittableExtrinsic<ApiType, CodeSubmittableResult<ApiType>> {
l.warn('.createContract is deprecated, use code.tx.<constructorName>(...) instead (where code refers to this instance)');
return this.#instantiate(constructorOrId, options, params);
}
#instantiate = (constructorOrId: AbiConstructor | string | number, options: BlueprintOptions, params: CodecArg[]): SubmittableExtrinsic<ApiType, CodeSubmittableResult<ApiType>> => {
return isFunction(this.api.tx.contracts.instantiateWithCode)
? this.#instantiateCurrent(constructorOrId, options, params)
+1 -25
View File
@@ -7,7 +7,7 @@ import type { Bytes } from '@polkadot/types';
import type { AccountId, ContractExecResult, EventRecord, Weight } from '@polkadot/types/interfaces';
import type { AnyJson, CodecArg, ISubmittableResult, Registry } from '@polkadot/types/types';
import type { AbiMessage, ContractCallOutcome, ContractOptions, DecodedEvent } from '../types';
import type { ContractCallResult, ContractCallSend, ContractGeneric, ContractQuery, ContractTx, MapMessageQuery, MapMessageTx } from './types';
import type { ContractCallResult, ContractCallSend, ContractQuery, ContractTx, MapMessageQuery, MapMessageTx } from './types';
import BN from 'bn.js';
@@ -40,16 +40,6 @@ function createTx <ApiType extends ApiTypes> (fn: (options: ContractOptions, par
: fn(...extractOptions(options, params));
}
function createWithId <T> (fn: (messageOrId: AbiMessage | string | number, options: ContractOptions, params: CodecArg[]) => T, warn?: string): ContractGeneric<ContractOptions, T> {
return (messageOrId: AbiMessage | string | number, options: BigInt | string | number | BN | ContractOptions, ...params: CodecArg[]): T => {
warn && l.warn(warn);
return isOptions(options)
? fn(messageOrId, options, params)
: fn(messageOrId, ...extractOptions(options, params));
};
}
export class ContractSubmittableResult extends SubmittableResult {
public readonly contractEvents?: DecodedEvent[];
@@ -93,18 +83,6 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
*/
public readonly address: AccountId;
/**
* @deprecated
* @description Deprecated. Use `.tx.<messageName>` to send a transaction.
*/
public readonly exec: ContractGeneric<ContractOptions, SubmittableExtrinsic<ApiType>>;
/**
* @deprecated
* @description Deprecated. Use `.tx.<messageName>` to send a transaction.
*/
public readonly read: ContractGeneric<ContractOptions, ContractCallSend<ApiType>>;
readonly #query: MapMessageQuery<ApiType> = {};
readonly #tx: MapMessageTx<ApiType> = {};
@@ -113,8 +91,6 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
super(api, abi, decorateMethod);
this.address = this.registry.createType('AccountId', address);
this.exec = createWithId(this.#exec, '.exec is deprecated, use contract.tx.<messageName>(...) instead (where contract refers to this instance)');
this.read = createWithId(this.#read, '.read is deprecated, use contract.query.<messageName>(...) instead (where contract refers to this instance)');
this.abi.messages.forEach((m): void => {
if (isUndefined(this.#tx[m.method])) {
@@ -30,10 +30,6 @@ async function checkContract (api: ApiPromise, pairs: TestKeyringMap): Promise<v
// execute
await contract.tx.inc({ gasLimit: 1234 }, 123).signAndSend(pairs.eve);
await contract.tx.inc(123, 456, 69).signAndSend(pairs.eve);
// deprecated
await contract.read('get', {}).send(pairs.eve.address);
await contract.exec('inc', {}, 123).signAndSend(pairs.dave);
}
async function main (): Promise<void> {
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api-contract', version: '4.8.1' };
export const packageInfo = { name: '@polkadot/api-contract', version: '4.9.1' };
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api-derive",
"version": "4.8.1",
"version": "4.9.1",
"type": "module",
"description": "Common functions used across Polkadot, derived from RPC calls and storage queries.",
"main": "index.js",
@@ -20,9 +20,9 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
"dependencies": {
"@babel/runtime": "^7.14.0",
"@polkadot/api": "4.8.1",
"@polkadot/rpc-core": "4.8.1",
"@polkadot/types": "4.8.1",
"@polkadot/api": "4.9.1",
"@polkadot/rpc-core": "4.9.1",
"@polkadot/types": "4.9.1",
"@polkadot/util": "^6.3.1",
"@polkadot/util-crypto": "^6.3.1",
"@polkadot/x-rxjs": "^6.3.1",
@@ -30,6 +30,6 @@
},
"devDependencies": {
"@polkadot/keyring": "^6.3.1",
"@polkadot/rpc-provider": "4.8.1"
"@polkadot/rpc-provider": "4.9.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api-derive', version: '4.8.1' };
export const packageInfo = { name: '@polkadot/api-derive', version: '4.9.1' };
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api",
"version": "4.8.1",
"version": "4.9.1",
"type": "module",
"description": "Promise and RxJS wrappers around the Polkadot JS RPC",
"main": "index.js",
@@ -20,13 +20,13 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
"dependencies": {
"@babel/runtime": "^7.14.0",
"@polkadot/api-derive": "4.8.1",
"@polkadot/api-derive": "4.9.1",
"@polkadot/keyring": "^6.3.1",
"@polkadot/metadata": "4.8.1",
"@polkadot/rpc-core": "4.8.1",
"@polkadot/rpc-provider": "4.8.1",
"@polkadot/types": "4.8.1",
"@polkadot/types-known": "4.8.1",
"@polkadot/metadata": "4.9.1",
"@polkadot/rpc-core": "4.9.1",
"@polkadot/rpc-provider": "4.9.1",
"@polkadot/types": "4.9.1",
"@polkadot/types-known": "4.9.1",
"@polkadot/util": "^6.3.1",
"@polkadot/util-crypto": "^6.3.1",
"@polkadot/x-rxjs": "^6.3.1",
+8 -1
View File
@@ -184,6 +184,13 @@ declare module '@polkadot/api/types/consts' {
};
electionProviderMultiPhase: {
[key: string]: Codec;
/**
* The repeat threshold of the offchain worker.
*
* For example, if it is 5, that means that at least 5 blocks will elapse between attempts
* to submit the worker's solution.
**/
offchainRepeat: BlockNumber & AugmentedConst<ApiType>;
/**
* Duration of the signed phase.
**/
@@ -283,7 +290,7 @@ declare module '@polkadot/api/types/consts' {
identity: {
[key: string]: Codec;
/**
* The amount held on deposit for a registered identity.
* The amount held on deposit for a registered identity
**/
basicDeposit: BalanceOf & AugmentedConst<ApiType>;
/**
+4
View File
@@ -512,6 +512,10 @@ declare module '@polkadot/api/types/errors' {
};
electionProviderMultiPhase: {
[key: string]: AugmentedError<ApiType>;
/**
* OCW submitted solution for wrong round
**/
OcwCallWrongEra: AugmentedError<ApiType>;
/**
* Submission was too early.
**/
+3 -4
View File
@@ -590,11 +590,10 @@ declare module '@polkadot/api/types/events' {
[key: string]: AugmentedEvent<ApiType>;
/**
* There is an offence reported of the given `kind` happened at the `session_index` and
* (kind-specific) time slot. This event is not deposited for duplicate slashes. last
* element indicates of the offence was applied (true) or queued (false)
* \[kind, timeslot, applied\].
* (kind-specific) time slot. This event is not deposited for duplicate slashes.
* \[kind, timeslot\].
**/
Offence: AugmentedEvent<ApiType, [Kind, OpaqueTimeSlot, bool]>;
Offence: AugmentedEvent<ApiType, [Kind, OpaqueTimeSlot]>;
};
proxy: {
[key: string]: AugmentedEvent<ApiType>;
+1 -6
View File
@@ -17,7 +17,7 @@ import type { SetId, StoredPendingChange, StoredState } from '@polkadot/types/in
import type { RegistrarInfo, Registration } from '@polkadot/types/interfaces/identity';
import type { AuthIndex } from '@polkadot/types/interfaces/imOnline';
import type { CallIndex, LotteryConfig } from '@polkadot/types/interfaces/lottery';
import type { DeferredOffenceOf, Kind, OffenceDetails, OpaqueTimeSlot, ReportIdOf } from '@polkadot/types/interfaces/offences';
import type { Kind, OffenceDetails, OpaqueTimeSlot, ReportIdOf } from '@polkadot/types/interfaces/offences';
import type { ProxyAnnouncement, ProxyDefinition } from '@polkadot/types/interfaces/proxy';
import type { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';
import type { AccountId, AccountIndex, AssetId, Balance, BalanceOf, BlockNumber, Hash, KeyTypeId, Moment, OpaqueCall, Perbill, Releases, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
@@ -600,11 +600,6 @@ declare module '@polkadot/api/types/storage' {
* A vector of reports of the same kind that happened at the same time slot.
**/
concurrentReportsIndex: AugmentedQueryDoubleMap<ApiType, (key1: Kind | string | Uint8Array, key2: OpaqueTimeSlot | string | Uint8Array) => Observable<Vec<ReportIdOf>>, [Kind, OpaqueTimeSlot]> & QueryableStorageEntry<ApiType, [Kind, OpaqueTimeSlot]>;
/**
* Deferred reports that have been rejected by the offence handler and need to be submitted
* at a later time.
**/
deferredOffences: AugmentedQuery<ApiType, () => Observable<Vec<DeferredOffenceOf>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The primary structure that holds all offence records keyed by report identifiers.
**/
+14 -2
View File
@@ -10,7 +10,7 @@ import type { BeefySignedCommitment } from '@polkadot/types/interfaces/beefy';
import type { BlockHash } from '@polkadot/types/interfaces/chain';
import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
import type { ContractCallRequest, ContractExecResult } from '@polkadot/types/interfaces/contracts';
import type { ContractCallRequest, ContractExecResult, ContractInstantiateResult, InstantiateRequest } from '@polkadot/types/interfaces/contracts';
import type { CreatedBlock } from '@polkadot/types/interfaces/engine';
import type { EthAccount, EthCallRequest, EthFilter, EthFilterChanges, EthLog, EthReceipt, EthRichBlock, EthSubKind, EthSubParams, EthSyncStatus, EthTransaction, EthTransactionRequest, EthWork } from '@polkadot/types/interfaces/eth';
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
@@ -20,7 +20,7 @@ import type { StorageKind } from '@polkadot/types/interfaces/offchain';
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
import type { RpcMethods } from '@polkadot/types/interfaces/rpc';
import type { AccountId, BlockNumber, H160, H256, H64, Hash, Header, Index, Justification, KeyValue, SignedBlock, StorageData } from '@polkadot/types/interfaces/runtime';
import type { ReadProof, RuntimeVersion } from '@polkadot/types/interfaces/state';
import type { ReadProof, RuntimeVersion, TraceBlockResponse } from '@polkadot/types/interfaces/state';
import type { ApplyExtrinsicResult, ChainProperties, ChainType, Health, NetworkState, NodeRole, PeerInfo, SyncState } from '@polkadot/types/interfaces/system';
declare module '@polkadot/rpc-core/types.jsonrpc' {
@@ -128,6 +128,10 @@ declare module '@polkadot/rpc-core/types.jsonrpc' {
* Returns the value under a specified storage key in a contract
**/
getStorage: AugmentedRpc<(address: AccountId | string | Uint8Array, key: H256 | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Option<Bytes>>>;
/**
* Instantiate a new contract
**/
instantiate: AugmentedRpc<(request: InstantiateRequest | { origin?: any; endowment?: any; gasLimit?: any; code?: any; data?: any; salt?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractInstantiateResult>>;
/**
* Returns the projected time a given contract will be able to sustain paying its rent
**/
@@ -442,6 +446,10 @@ declare module '@polkadot/rpc-core/types.jsonrpc' {
* Subscribes to storage changes for the provided keys
**/
subscribeStorage: AugmentedRpc<<T = Codec[]>(keys?: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[]) => Observable<T>>;
/**
* Provides a way to trace the re-execution of a single block
**/
traceBlock: AugmentedRpc<(block: Hash | string | Uint8Array, targets: Option<Text> | null | object | string | Uint8Array, storageKeys: Option<Text> | null | object | string | Uint8Array) => Observable<TraceBlockResponse>>;
};
syncstate: {
/**
@@ -510,6 +518,10 @@ declare module '@polkadot/rpc-core/types.jsonrpc' {
* Remove a reserved peer
**/
removeReservedPeer: AugmentedRpc<(peerId: Text | string) => Observable<Text>>;
/**
* Returns the list of reserved peers
**/
reservedPeers: AugmentedRpc<() => Observable<Vec<Text>>>;
/**
* Resets the log filter to Substrate defaults
**/
+17 -14
View File
@@ -262,7 +262,8 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
return allKeys;
}, []);
const unknown = exposed.filter((key) => !allKeys.includes(key));
const unknown = exposed.filter((k) => !allKeys.includes(k));
const deletion = allKnown.filter(([k]) => hasResults && !exposed.includes(k) && k !== 'rpc_methods');
if (unknown.length) {
l.warn(`RPC methods not decorated: ${unknown.join(', ')}`);
@@ -270,17 +271,10 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
// loop through all entries we have (populated in decorate) and filter as required
// only remove when we have results and method missing, or with no results if optional
allKnown
.filter(([key]): boolean => hasResults
? !exposed.includes(key) && key !== 'rpc_methods' // rpc_methods doesn't appear, v1
: key === 'rpc_methods' // we didn't find this one, remove
)
// eslint-disable-next-line @typescript-eslint/no-unused-vars
.forEach(([_, { method, section }]): void => {
delete (this._rpc as Record<string, Record<string, unknown>>)[section][method];
delete (this._rpcCore as unknown as Record<string, Record<string, unknown>>)[section][method];
delete (this._rx.rpc as Record<string, Record<string, unknown>>)[section][method];
});
deletion.forEach(([, { method, section }]): void => {
delete (this._rpc as Record<string, Record<string, unknown>>)[section][method];
delete (this._rx.rpc as Record<string, Record<string, unknown>>)[section][method];
});
}
protected _decorateRpc<ApiType extends ApiTypes> (rpc: RpcCore & RpcInterface, decorateMethod: DecorateMethod<ApiType>, input: Partial<DecoratedRpc<ApiType, RpcInterface>> = {}): DecoratedRpc<ApiType, RpcInterface> {
@@ -378,8 +372,16 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
decorated.is = <A extends AnyTuple> (key: IStorageKey<AnyTuple>): key is IStorageKey<A> =>
key.section === creator.section && key.method === creator.method;
decorated.key = (arg1?: Arg, arg2?: Arg): string =>
u8aToHex(compactStripLength(creator(creator.meta.type.isDoubleMap ? [arg1, arg2] : arg1))[1]);
decorated.key = (...args: Arg[]): string =>
u8aToHex(compactStripLength(creator(
creator.meta.type.isPlain
? undefined
: creator.meta.type.isMap
? args[0]
: creator.meta.type.isDoubleMap
? [args[0], args[1]]
: args
))[1]);
decorated.keyPrefix = (key1?: Arg): string =>
u8aToHex(creator.keyPrefix(key1));
@@ -393,6 +395,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
decorated.sizeAt = decorateMethod((hash: Hash | Uint8Array | string, arg1?: Arg, arg2?: Arg): Observable<u64> =>
this._rpcCore.state.getStorageSize(getArgs(arg1, arg2), hash));
// FIXME NMap support
// .keys() & .entries() only available on map types
if (creator.iterKey && (creator.meta.type.isMap || creator.meta.type.isDoubleMap)) {
decorated.entries = decorateMethod(
+20 -17
View File
@@ -58,7 +58,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
this._rx.signer = options.signer;
this._rpcCore.setRegistrySwap((hash: string | Uint8Array) => this.getBlockRegistry(hash));
this._rpcCore.setRegistrySwap((blockHash: Uint8Array) => this.getBlockRegistry(blockHash));
if (this.hasSubscriptions) {
this._rpcCore.provider.on('disconnected', this.#onProviderDisconnect);
@@ -102,10 +102,10 @@ 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: string | Uint8Array): Promise<VersionedRegistry> {
// shortcut in the case where we have an immediate-same request
const lastBlockHash = u8aToU8a(blockHash);
const existingViaHash = this.#registries.find((r) => r.lastBlockHash && u8aEq(lastBlockHash, r.lastBlockHash));
public async getBlockRegistry (blockHash: Uint8Array): Promise<VersionedRegistry> {
const existingViaHash = this.#registries.find(({ lastBlockHash }) =>
lastBlockHash && u8aEq(lastBlockHash, blockHash)
);
if (existingViaHash) {
return existingViaHash;
@@ -129,10 +129,10 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
: await this._rpcCore.state.getRuntimeVersion(header.parentHash).toPromise();
// check for pre-existing registries
const existingViaVersion = this.#registries.find((r) => r.specVersion.eq(version.specVersion));
const existingViaVersion = this.#registries.find(({ specVersion }) => specVersion.eq(version.specVersion));
if (existingViaVersion) {
existingViaVersion.lastBlockHash = lastBlockHash;
existingViaVersion.lastBlockHash = blockHash;
return existingViaVersion;
}
@@ -141,14 +141,14 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
const metadata = await this._rpcCore.state.getMetadata(header.parentHash).toPromise();
const registry = this._initRegistry(new TypeRegistry(blockHash), this._runtimeChain as Text, version, metadata);
// For now, since this is new we ignore the capability lookups (this could be useful once proven)
// this._detectCapabilities(registry, blockHash);
// add our new registry
const result = { isDefault: false, lastBlockHash, metadata, metadataConsts: null, registry, specVersion: version.specVersion };
const result = { isDefault: false, lastBlockHash: blockHash, metadata, metadataConsts: null, registry, specVersion: version.specVersion };
this.#registries.push(result);
// TODO This could be useful for historic, disabled due to cross-looping, i.e. .at queries
// this._detectCapabilities(registry, blockHash);
return result;
}
@@ -190,17 +190,19 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
return [source.genesisHash, source.runtimeMetadata];
}
private _detectCapabilities (registry?: Registry, blockHash?: string | Uint8Array): void {
private _detectCapabilities (registry: Registry, blockHash?: string | Uint8Array): boolean {
detectedCapabilities(this._rx, blockHash)
.toPromise()
.then((types): void => {
if (Object.keys(types).length) {
(registry || this.registry).register(types as Record<string, string>);
registry.register(types as Record<string, string>);
l.debug(() => `Capabilities detected${blockHash ? ` (${u8aToHex(u8aToU8a(blockHash))})` : ''}: ${stringify(types)}`);
}
})
.catch(l.error);
.catch(undefined);
return true;
}
// subscribe to metadata updates, inject the types on changes
@@ -235,9 +237,8 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
// clear the registry types to ensure that we override correctly
this._initRegistry(thisRegistry.registry.init(), this._runtimeChain as Text, version, metadata);
this.injectMetadata(metadata, false, thisRegistry.registry);
this._detectCapabilities(thisRegistry.registry);
return true;
return this._detectCapabilities(thisRegistry.registry);
})
)
)
@@ -293,12 +294,14 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
// inject metadata and adjust the types as detected
this.injectMetadata(metadata, true);
this._detectCapabilities();
// derive is last, since it uses the decorated rx
this._rx.derive = this._decorateDeriveRx(this._rxDecorateMethod);
this._derive = this._decorateDerive(this._decorateMethod);
// detect the on-chain capabilities
this._detectCapabilities(this.registry);
return true;
}
+34 -25
View File
@@ -2,18 +2,18 @@
// SPDX-License-Identifier: Apache-2.0
import type { ApiInterfaceRx } from '@polkadot/api/types';
import type { bool, Raw, u32 } from '@polkadot/types';
import type { Raw, u32 } from '@polkadot/types';
import type { Releases } from '@polkadot/types/interfaces';
import type { InterfaceTypes } from '@polkadot/types/types';
import { assert, compactFromU8a } from '@polkadot/util';
import { combineLatest, Observable, of } from '@polkadot/x-rxjs';
import { map, take } from '@polkadot/x-rxjs/operators';
import { catchError, map, take } from '@polkadot/x-rxjs/operators';
// the order and types needs to map with the all array setup below
type ExtractedQ = [bool | null, bool | null, bool | null, Releases | null];
type ExtractedQ = [Releases | null];
type ExtractedR = [Raw | null];
type ExtractedR = [Raw | null, Raw | null];
type ExtractedC = [u32 | null, u32 | null];
@@ -38,23 +38,26 @@ interface AvailableMap<T> {
interface Constants {
accountIdLength: number;
refcount1Length: number;
refcount2Length: number;
refcount3Length: number;
}
const NumberMap = ['Zero', 'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten'];
function mapCapabilities ({ accountIdLength }: Constants, [leasePeriodsPerSlot, slotRangeCount]: ExtractedC, [systemRefcount32, systemRefcountDual, systemRefcountTriple, stakingVersion]: ExtractedQ, [keys]: ExtractedR): Partial<DetectedTypes> {
function mapCapabilities ({ accountIdLength, refcount1Length, refcount2Length, refcount3Length }: Constants, [leasePeriodsPerSlot, slotRangeCount]: ExtractedC, [stakingVersion]: ExtractedQ, [keys, accountInfo]: ExtractedR): Partial<DetectedTypes> {
const types: Partial<DetectedTypes> = {};
// AccountInfo
if (systemRefcountTriple && systemRefcountTriple.isTrue) {
types.AccountInfo = 'AccountInfoWithTripleRefCount';
} else if (systemRefcountDual && systemRefcountDual.isTrue) {
types.AccountInfo = 'AccountInfoWithDualRefCount';
} else {
types.AccountInfo = 'AccountInfoWithRefCount';
if (accountInfo) {
const length = accountInfo.length;
if (!systemRefcount32 || systemRefcount32.isFalse) {
types.RefCount = 'u8';
if (length === refcount1Length) {
types.AccountInfo = 'AccountInfoWithRefCount';
} else if (length === refcount2Length) {
types.AccountInfo = 'AccountInfoWithDualRefCount';
} else if (length === refcount3Length) {
types.AccountInfo = 'AccountInfoWithTripleRefCount';
}
}
@@ -91,8 +94,8 @@ function mapCapabilities ({ accountIdLength }: Constants, [leasePeriodsPerSlot,
// @ts-ignore
types.Keys = `SessionKeys${numIds - 1}`;
}
} catch (error) {
console.error(error);
} catch {
// ignore
}
}
@@ -115,9 +118,12 @@ function mapCapabilities ({ accountIdLength }: Constants, [leasePeriodsPerSlot,
function filterEntries <T> (original: T[]): AvailableMap<T> {
const included = original.map((c) => !!c);
const filtered = original.filter((_, index) => included[index]);
return { filtered, included, original };
return {
filtered: original.filter((_, index) => included[index]),
included,
original
};
}
function extractResults <R, T = unknown> (results: unknown[], map: AvailableMap<T>): R {
@@ -134,18 +140,17 @@ function extractResults <R, T = unknown> (results: unknown[], map: AvailableMap<
* @description Query the chain for the specific capabilities
*/
export function detectedCapabilities (api: ApiInterfaceRx, blockHash?: Uint8Array | string | undefined): Observable<Partial<DetectedTypes>> {
const emptyAccountId = api.registry.createType('AccountId');
const consts = filterEntries([
api.consts.auctions?.leasePeriodsPerSlot,
api.consts.auctions?.slotRangeCount
]);
const queries = filterEntries([
api.query.system?.upgradedToU32RefCount,
api.query.system?.upgradedToDualRefCount,
api.query.system?.upgradedToTripleRefCount,
api.query.staking?.storageVersion
]);
const raws = filterEntries([
api.query.session?.queuedKeys
api.query.session?.queuedKeys.key(),
api.query.system?.account.key(emptyAccountId)
]);
return combineLatest([
@@ -162,20 +167,24 @@ export function detectedCapabilities (api: ApiInterfaceRx, blockHash?: Uint8Arra
: of([]),
raws.filtered.length
? blockHash
? combineLatest(raws.filtered.map((k) => api.rpc.state.getStorage.raw(k.key(), blockHash)))
: combineLatest(raws.filtered.map((k) => api.rpc.state.getStorage.raw(k.key())))
? combineLatest(raws.filtered.map((k) => api.rpc.state.getStorage.raw(k, blockHash)))
: combineLatest(raws.filtered.map((k) => api.rpc.state.getStorage.raw(k)))
: of([])
]).pipe(
map(([cResults, qResults, rResults]): Partial<DetectedTypes> =>
mapCapabilities(
{
accountIdLength: api.registry.createType('AccountId').encodedLength
accountIdLength: emptyAccountId.encodedLength,
refcount1Length: api.registry.createType('AccountInfoWithRefCount').encodedLength,
refcount2Length: api.registry.createType('AccountInfoWithDualRefCount').encodedLength,
refcount3Length: api.registry.createType('AccountInfoWithTripleRefCount').encodedLength
},
extractResults<ExtractedC>(cResults, consts),
extractResults<ExtractedQ>(qResults, queries),
extractResults<ExtractedR>(rResults, raws)
)
),
take(1)
take(1),
catchError(() => of({}))
);
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api', version: '4.8.1' };
export const packageInfo = { name: '@polkadot/api', version: '4.9.1' };
+4 -8
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2021 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ApiOptions, SubmittableExtrinsic } from '../types';
import type { SubmittableExtrinsic } from '../types';
import { createPair } from '@polkadot/keyring/pair';
import { createTestKeyring } from '@polkadot/keyring/testing';
@@ -44,7 +44,7 @@ describe('ApiPromise', (): void => {
}
beforeEach((): void => {
jest.setTimeout(3000000);
jest.setTimeout(10000);
provider = new MockProvider(registry);
});
@@ -53,14 +53,10 @@ describe('ApiPromise', (): void => {
const rpcData = await provider.send('state_getMetadata', []);
const genesisHash = registry.createType('Hash', await provider.send('chain_getBlockHash', [])).toHex();
const specVersion = 0;
const metadata: any = {};
const key = `${genesisHash}-${specVersion}`;
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
metadata[key] = rpcData;
const metadata = { [`${genesisHash}-${specVersion}`]: rpcData as string };
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const api = await ApiPromise.create({ metadata, provider, registry } as ApiOptions);
const api = await ApiPromise.create({ metadata, provider, registry });
expect(api.genesisHash).toBeDefined();
expect(api.runtimeMetadata).toBeDefined();
+2 -2
View File
@@ -66,14 +66,14 @@ describe('extractStorageArgs', (): void => {
expect(
(): any =>
extractStorageArgs(storage.staking.erasStakers, [])
).toThrow('staking.erasStakers(EraIndex, AccountId) is a doublemap, requiring 2 arguments, 0 found');
).toThrow('staking.erasStakers(EraIndex, AccountId) is a double map, requiring 2 arguments, 0 found');
});
it('validates doublemap, 2 args (failing with 1 arg)', (): void => {
expect(
(): any =>
extractStorageArgs(storage.staking.erasStakers, [123])
).toThrow('staking.erasStakers(EraIndex, AccountId) is a doublemap, requiring 2 arguments, 1 found');
).toThrow('staking.erasStakers(EraIndex, AccountId) is a double map, requiring 2 arguments, 1 found');
});
// Linked maps have been removed
+16 -5
View File
@@ -6,14 +6,14 @@ import type { StorageEntry } from '@polkadot/types/primitive/types';
import { assert, isUndefined } from '@polkadot/util';
function sig ({ method, section }: StorageEntry, ...args: Type[]): string {
function sig ({ method, section }: StorageEntry, args: Type[]): string {
return `${section}.${method}(${args.join(', ')})`;
}
function doDoubleMap (creator: StorageEntry, args: unknown[]): [StorageEntry, [any, any]] {
const { key1, key2 } = creator.meta.type.asDoubleMap;
assert(args.length === 2, () => `${sig(creator, key1, key2)} is a doublemap, requiring 2 arguments, ${args.length} found`);
assert(args.length === 2, () => `${sig(creator, [key1, key2])} is a double map, requiring 2 arguments, ${args.length} found`);
// pass as tuple
return [creator, args as [any, any]];
@@ -22,7 +22,7 @@ function doDoubleMap (creator: StorageEntry, args: unknown[]): [StorageEntry, [a
function doMap (creator: StorageEntry, args: unknown[]): [StorageEntry] | [StorageEntry, any] {
const { key } = creator.meta.type.asMap;
assert(args.length === 1, () => `${sig(creator, key)} is a map, requiring 1 argument, ${args.length} found`);
assert(args.length === 1, () => `${sig(creator, [key])} is a map, requiring 1 argument, ${args.length} found`);
// expand
return args.length
@@ -30,18 +30,29 @@ function doMap (creator: StorageEntry, args: unknown[]): [StorageEntry] | [Stora
: [creator];
}
function doNMap (creator: StorageEntry, args: unknown[]): [StorageEntry, any[]] {
const { keyVec } = creator.meta.type.asNMap;
assert(args.length === keyVec.length, () => `${sig(creator, keyVec)} is a multi map, requiring ${keyVec.length} arguments, ${args.length} found`);
// pass as tuple
return [creator, args];
}
// sets up the arguments in the form of [creator, args] ready to be used in a storage
// call. Additionally, it verifies that the correct number of arguments have been passed
export function extractStorageArgs (creator: StorageEntry, _args: unknown[]): [StorageEntry, [any, any]] | [StorageEntry] | [StorageEntry, any] {
export function extractStorageArgs (creator: StorageEntry, _args: unknown[]): [StorageEntry, any[]] | [StorageEntry] | [StorageEntry, any] {
const args = _args.filter((arg) => !isUndefined(arg));
if (creator.meta.type.isDoubleMap) {
return doDoubleMap(creator, args);
} else if (creator.meta.type.isMap) {
return doMap(creator, args);
} else if (creator.meta.type.isNMap) {
return doNMap(creator, args);
}
assert(args.length === 0, () => `${sig(creator)} does not take any arguments, ${args.length} found`);
assert(args.length === 0, () => `${sig(creator, [])} does not take any arguments, ${args.length} found`);
// no args
return [creator];
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/metadata",
"version": "4.8.1",
"version": "4.9.1",
"type": "module",
"description": "Helpers to extract information from runtime metadata",
"main": "index.js",
@@ -20,8 +20,8 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-metadata#readme",
"dependencies": {
"@babel/runtime": "^7.14.0",
"@polkadot/types": "4.8.1",
"@polkadot/types-known": "4.8.1",
"@polkadot/types": "4.9.1",
"@polkadot/types-known": "4.9.1",
"@polkadot/util": "^6.3.1",
"@polkadot/util-crypto": "^6.3.1",
"bn.js": "^4.11.9"
+12 -2
View File
@@ -9,10 +9,20 @@ describe('MagicNumber', (): void => {
const registry = new TypeRegistry();
it('succeeds when the magic number matches', (): void => {
expect((): MagicNumber => new MagicNumber(registry, MAGIC_NUMBER)).not.toThrow();
expect(
() => new MagicNumber(registry, MAGIC_NUMBER)
).not.toThrow();
});
it('succeeds when the magic number is empty', (): void => {
expect(
() => new MagicNumber(registry)
).not.toThrow();
});
it('fails when the magic number mismatches', (): void => {
expect((): MagicNumber => new MagicNumber(registry, 0x12345)).toThrow(/MagicNumber/);
expect(
() => new MagicNumber(registry, 0x12345678)
).toThrow(/MagicNumber mismatch/);
});
});
+1 -3
View File
@@ -13,9 +13,7 @@ export class MagicNumber extends U32 {
super(registry, value);
if (!this.isEmpty) {
const magic = registry.createType('u32', MAGIC_NUMBER);
assert(this.eq(magic), () => `MagicNumber mismatch: expected ${magic.toHex()}, found ${this.toHex()}`);
assert(this.eq(MAGIC_NUMBER), () => `MagicNumber mismatch: expected ${registry.createType('u32', MAGIC_NUMBER).toHex()}, found ${this.toHex()}`);
}
}
}
+25 -13
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2021 @polkadot/metadata authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { MetadataAll, MetadataLatest, MetadataV9, MetadataV10, MetadataV11, MetadataV12 } from '@polkadot/types/interfaces/metadata';
import type { MetadataAll, MetadataLatest, MetadataV9, MetadataV10, MetadataV11, MetadataV12, MetadataV13 } from '@polkadot/types/interfaces/metadata';
import type { AnyJson, Registry } from '@polkadot/types/types';
import { Struct } from '@polkadot/types/codec';
@@ -10,13 +10,16 @@ import { assert } from '@polkadot/util';
import { toV10 } from './v9/toV10';
import { toV11 } from './v10/toV11';
import { toV12 } from './v11/toV12';
import { toLatest } from './v12/toLatest';
import { toV13 } from './v12/toV13';
import { toLatest } from './v13/toLatest';
import { MagicNumber } from './MagicNumber';
import { getUniqTypes, toCallsOnly } from './util';
type MetaMapped = MetadataV9 | MetadataV10 | MetadataV11 | MetadataV12;
type MetaVersions = 9 | 10 | 11 | 12 | 13;
type MetaAsX = 'asV9' | 'asV10' | 'asV11' | 'asV12';
type MetaMapped = MetadataV9 | MetadataV10 | MetadataV11 | MetadataV12 | MetadataV13;
type MetaAsX = 'asV9' | 'asV10' | 'asV11' | 'asV12' | 'asV13';
type MetaVersions = 'latest' | 9 | 10 | 11 | 12 | 13;
const LATEST_VERSION = 13;
/**
* @name MetadataVersioned
@@ -24,7 +27,7 @@ type MetaAsX = 'asV9' | 'asV10' | 'asV11' | 'asV12';
* The versioned runtime metadata as a decoded structure
*/
export class MetadataVersioned extends Struct {
readonly #converted = new Map<number, MetaMapped>();
readonly #converted = new Map<MetaVersions, MetaMapped>();
constructor (registry: Registry, value?: unknown) {
super(registry, {
@@ -34,16 +37,18 @@ export class MetadataVersioned extends Struct {
}
#assertVersion = (version: number): boolean => {
assert(this.version <= version, () => `Cannot convert metadata from v${this.version} to v${version}`);
assert(this.version <= version, () => `Cannot convert metadata from version ${this.version} to ${version}`);
return this.version === version;
};
#getVersion = <T extends MetaMapped, F extends MetaMapped>(version: MetaVersions, fromPrev: (registry: Registry, input: F, metaVersion: number) => T): T => {
const asCurr = `asV${version}` as MetaAsX;
const asPrev = `asV${version - 1}` as MetaAsX;
const asPrev = version === 'latest'
? `asV${LATEST_VERSION}` as MetaAsX
: `asV${version - 1}` as MetaAsX;
if (this.#assertVersion(version)) {
if (version !== 'latest' && this.#assertVersion(version)) {
return this.#metadata()[asCurr] as T;
}
@@ -101,16 +106,23 @@ export class MetadataVersioned extends Struct {
return this.#getVersion(12, toV12);
}
/**
* @description Returns the wrapped values as a V13 object
*/
public get asV13 (): MetadataV13 {
return this.#getVersion(13, toV13);
}
/**
* @description Returns the wrapped values as a latest version object
*/
public get asLatest (): MetadataLatest {
// This is non-existent & latest - applied here to do the module-specific type conversions
return this.#getVersion(13, toLatest);
return this.#getVersion('latest', toLatest);
}
/**
* @description
* @description The magicNumber for the Metadata (known constant)
*/
public get magicNumber (): MagicNumber {
return this.get('magicNumber') as MagicNumber;
@@ -131,8 +143,8 @@ export class MetadataVersioned extends Struct {
* @description Converts the Object to JSON, typically used for RPC transfers
*/
public toJSON (): Record<string, AnyJson> {
// HACK(y): ensure that we apply the aliasses if we have not done so already, this is
// needed to ensure we have the overrides as intended (only applied in toLatest)
// HACK(y): ensure that we apply the aliases if we have not done so already, this is
// needed to ensure we have the correct overrides (which is only applied in toLatest)
// eslint-disable-next-line no-unused-expressions
this.asLatest;
@@ -49,4 +49,52 @@ describe('createFunction', (): void => {
'5eb36b60f0fc4b9177116eba3e5cd57fea6289a57f5f5b9ffeb0475c66e7a521' // blake2
);
});
it('allows creating of NMap keys (with Bytes)', (): void => {
const storageFn = createFunction(registry, {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
meta: {
type: {
asNMap: {
hashers: [
registry.createType('StorageHasher', 'Twox64Concat'),
registry.createType('StorageHasher', 'Blake2_256'),
registry.createType('StorageHasher', 'Blake2_256')
],
keyVec: [
new Text(registry, 'Bytes'),
new Text(registry, 'AccountId'),
new Text(registry, 'AccountId')
],
value: new Text(registry, 'SessionKeys5')
},
isNMap: true
}
} as any,
method: 'NextKeys',
prefix: 'Session',
section: 'session'
}, {});
expect(
u8aToHex(
storageFn([
// hex, without length prefix
'0x3a73657373696f6e3a6b657973',
// addresses
'DB2mp5nNhbFN86J9hxoAog8JALMhDXgwvWMxrRMLNUFMEY4',
'DB2mp5nNhbFN86J9hxoAog8JALMhDXgwvWMxrRMLNUFMEY4'
])
)
).toEqual(
'0x' +
'd901' + // length
'cec5070d609dd3497f72bde07fc96ba0' + // twox 128
'4c014e6bf8b8c2c011e7290b85696bb3' + // twox 128
'9fe6329cc0b39e09' + // twox 64
'343a73657373696f6e3a6b657973' + // twox 64 (concat, with length)
'5eb36b60f0fc4b9177116eba3e5cd57fea6289a57f5f5b9ffeb0475c66e7a521' + // blake2
'5eb36b60f0fc4b9177116eba3e5cd57fea6289a57f5f5b9ffeb0475c66e7a521' // blake2
);
});
});
@@ -108,6 +108,7 @@ function extendHeadMeta (registry: Registry, { meta: { documentation, name, type
function extendPrefixedMap (registry: Registry, itemFn: CreateItemFn, storageFn: StorageEntry): StorageEntry {
const { meta: { type } } = itemFn;
// FIXME NMap support
storageFn.iterKey = extendHeadMeta(registry, itemFn, storageFn, (arg?: any): Raw => {
assert(type.isDoubleMap || isUndefined(arg), 'Filtering arguments for keys/entries are only valid on double maps');
@@ -136,15 +137,18 @@ export function createFunction (registry: Registry, itemFn: CreateItemFn, option
// - storage.timestamp.blockPeriod()
// For higher-map queries the params are passed in as an tuple, [key1, key2]
const storageFn = expandWithMeta(itemFn, (arg?: CreateArgType | CreateArgType[]) =>
type.isDoubleMap
? createKey(registry, itemFn, [type.asDoubleMap.key1, type.asDoubleMap.key2], [getHasher(type.asDoubleMap.hasher), getHasher(type.asDoubleMap.key2Hasher)], arg as CreateArgType[])
type.isPlain
? options.skipHashing
? compactAddLength(u8aToU8a(options.key))
: createKey(registry, itemFn, [], [], [])
: type.isMap
? createKey(registry, itemFn, [type.asMap.key], [getHasher(type.asMap.hasher)], [arg as CreateArgType])
: options.skipHashing
? compactAddLength(u8aToU8a(options.key))
: createKey(registry, itemFn, [], [], [])
: type.isDoubleMap
? createKey(registry, itemFn, [type.asDoubleMap.key1, type.asDoubleMap.key2], [getHasher(type.asDoubleMap.hasher), getHasher(type.asDoubleMap.key2Hasher)], arg as CreateArgType[])
: createKey(registry, itemFn, type.asNMap.keyVec, type.asNMap.hashers.map((h) => getHasher(h)), arg as CreateArgType[])
);
// FIXME NMap support
if (type.isMap || type.isDoubleMap) {
extendPrefixedMap(registry, itemFn, storageFn);
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/metadata', version: '4.8.1' };
export const packageInfo = { name: '@polkadot/metadata', version: '4.9.1' };
+1 -1
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2021 @polkadot/metadata authors & contributors
// SPDX-License-Identifier: Apache-2.0
import metadata from './v12/static';
import metadata from './v13/static';
export default metadata;
+21 -11
View File
@@ -12,10 +12,11 @@ type Arg = { type: Type } & Codec;
type Item = {
type: {
isDoubleMap?: boolean;
isDoubleMap: boolean;
isMap: boolean;
isNMap: boolean;
isPlain: boolean;
asDoubleMap?: {
asDoubleMap: {
key1: Text;
key2: Text;
value: Text;
@@ -24,6 +25,10 @@ type Item = {
key: Text;
value: Text;
};
asNMap: {
keyVec: Text[];
value: Text;
},
asPlain: Text;
};
} & Codec;
@@ -106,20 +111,25 @@ function unwrapStorage (storage?: Storage): Item[] {
function getStorageNames ({ modules }: ExtractionMetadata): string[][][] {
return modules.map(({ storage }): string[][] =>
unwrapStorage(storage).map(({ type }) =>
type.isDoubleMap && type.asDoubleMap
type.isPlain
? [
type.asDoubleMap.key1.toString(),
type.asDoubleMap.key2.toString(),
type.asDoubleMap.value.toString()
type.asPlain.toString()
]
: type.isMap
? [
type.asMap.key.toString(),
type.asMap.value.toString()
]
: [
type.asPlain.toString()
type.asMap.value.toString(),
type.asMap.key.toString()
]
: type.isDoubleMap
? [
type.asDoubleMap.value.toString(),
type.asDoubleMap.key1.toString(),
type.asDoubleMap.key2.toString()
]
: [
type.asNMap.value.toString(),
...type.asNMap.keyVec.map((k) => k.toString())
]
)
);
}
+12
View File
@@ -0,0 +1,12 @@
// Copyright 2017-2021 @polkadot/metadata authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { MetadataV12, MetadataV13 } from '@polkadot/types/interfaces/metadata';
import type { Registry } from '@polkadot/types/types';
/**
* @internal
**/
export function toV13 (registry: Registry, metadata: MetadataV12): MetadataV13 {
return registry.createType('MetadataV13', metadata);
}
@@ -0,0 +1,18 @@
// Copyright 2017-2021 @polkadot/metadata authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { TypeRegistry } from '@polkadot/types/create';
import { decodeLatestSubstrate, defaultValues, toLatest } from '../util/testUtil';
import substrateData from './static';
import substrateJson from './static-substrate.json';
describe('MetadataV13 (substrate)', (): void => {
const registry = new TypeRegistry();
decodeLatestSubstrate(registry, 13, substrateData, substrateJson);
toLatest(registry, 13, substrateData);
defaultValues(registry, substrateData, true, true);
});
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
// Copyright 2017-2021 @polkadot/metadata authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { EventMetadataLatest, EventMetadataV12, FunctionMetadataLatest, FunctionMetadataV12, MetadataLatest, MetadataV12, ModuleConstantMetadataLatest, ModuleConstantMetadataV12, ModuleMetadataLatest, ModuleMetadataV12, StorageEntryMetadataLatest, StorageMetadataLatest, StorageMetadataV12 } from '@polkadot/types/interfaces/metadata';
import type { EventMetadataLatest, EventMetadataV13, FunctionMetadataLatest, FunctionMetadataV13, MetadataLatest, MetadataV13, ModuleConstantMetadataLatest, ModuleConstantMetadataV13, ModuleMetadataLatest, ModuleMetadataV13, StorageEntryMetadataLatest, StorageMetadataLatest, StorageMetadataV13 } from '@polkadot/types/interfaces/metadata';
import type { OverrideModuleType, Registry } from '@polkadot/types/types';
import { Type } from '@polkadot/types/primitive';
@@ -16,11 +16,13 @@ const KNOWN_ORIGINS: Record<string, string> = {
TechnicalCommittee: 'CollectiveOrigin'
};
const BOXES = [['<', '>'], ['<', ','], [',', '>'], ['(', ')'], ['(', ','], [',', ','], [',', ')']];
/**
* Find and apply the correct type override
* @internal
**/
function setTypeOverride (sectionTypes: OverrideModuleType, ...types: Type[]): void {
function setTypeOverride (sectionTypes: OverrideModuleType, types: Type[]): void {
types.forEach((type): void => {
const override = Object.keys(sectionTypes).find((aliased) => type.eq(aliased));
@@ -29,9 +31,11 @@ function setTypeOverride (sectionTypes: OverrideModuleType, ...types: Type[]): v
} else {
// FIXME: NOT happy with this approach, but gets over the initial hump cased by (Vec<Announcement>,BalanceOf)
const orig = type.toString();
const alias = Object.entries(sectionTypes).reduce((result: string, [from, to]): string =>
[['<', '>'], ['<', ','], [',', '>'], ['(', ')'], ['(', ','], [',', ','], [',', ')']].reduce((result, [one, two]): string =>
result.replace(`${one}${from}${two}`, `${one}${to}${two}`), result), orig);
const alias = Object
.entries(sectionTypes)
.reduce((result: string, [from, to]) =>
BOXES.reduce((result, [one, two]) =>
result.replace(`${one}${from}${two}`, `${one}${to}${two}`), result), orig);
if (orig !== alias) {
type.setOverride(alias);
@@ -44,9 +48,9 @@ function setTypeOverride (sectionTypes: OverrideModuleType, ...types: Type[]): v
* Apply module-specific type overrides (always be done as part of toLatest)
* @internal
**/
function convertCalls (registry: Registry, calls: FunctionMetadataV12[], sectionTypes: OverrideModuleType): FunctionMetadataLatest[] {
function convertCalls (registry: Registry, calls: FunctionMetadataV13[], sectionTypes: OverrideModuleType): FunctionMetadataLatest[] {
return calls.map((c): FunctionMetadataLatest => {
c.args.forEach(({ type }) => setTypeOverride(sectionTypes, type));
setTypeOverride(sectionTypes, c.args.map(({ type }) => type));
return registry.createType('FunctionMetadataLatest', c);
});
@@ -56,9 +60,9 @@ function convertCalls (registry: Registry, calls: FunctionMetadataV12[], section
* Apply module-specific type overrides (always be done as part of toLatest)
* @internal
*/
function convertConstants (registry: Registry, constants: ModuleConstantMetadataV12[], sectionTypes: OverrideModuleType): ModuleConstantMetadataLatest[] {
function convertConstants (registry: Registry, constants: ModuleConstantMetadataV13[], sectionTypes: OverrideModuleType): ModuleConstantMetadataLatest[] {
return constants.map((c): ModuleConstantMetadataLatest => {
setTypeOverride(sectionTypes, c.type);
setTypeOverride(sectionTypes, [c.type]);
return registry.createType('ModuleConstantMetadataLatest', c);
});
@@ -68,9 +72,9 @@ function convertConstants (registry: Registry, constants: ModuleConstantMetadata
* Apply module-specific type overrides (always be done as part of toLatest)
* @internal
**/
function convertEvents (registry: Registry, events: EventMetadataV12[], sectionTypes: OverrideModuleType): EventMetadataLatest[] {
function convertEvents (registry: Registry, events: EventMetadataV13[], sectionTypes: OverrideModuleType): EventMetadataLatest[] {
return events.map((e): EventMetadataLatest => {
e.args.forEach((type) => setTypeOverride(sectionTypes, type));
setTypeOverride(sectionTypes, e.args.map((type) => type));
return registry.createType('EventMetadataLatest', e);
});
@@ -80,16 +84,18 @@ function convertEvents (registry: Registry, events: EventMetadataV12[], sectionT
* Apply module-specific storage type overrides (always part of toLatest)
* @internal
**/
function convertStorage (registry: Registry, { items, prefix }: StorageMetadataV12, sectionTypes: OverrideModuleType): StorageMetadataLatest {
function convertStorage (registry: Registry, { items, prefix }: StorageMetadataV13, sectionTypes: OverrideModuleType): StorageMetadataLatest {
return registry.createType('StorageMetadataLatest', {
items: items.map((s): StorageEntryMetadataLatest => {
if (s.type.isDoubleMap) {
setTypeOverride(sectionTypes, s.type.asDoubleMap.value, s.type.asDoubleMap.key1, s.type.asDoubleMap.key2);
} else if (s.type.isMap) {
setTypeOverride(sectionTypes, s.type.asMap.value, s.type.asMap.key);
} else {
setTypeOverride(sectionTypes, s.type.asPlain);
}
setTypeOverride(sectionTypes,
s.type.isPlain
? [s.type.asPlain]
: s.type.isMap
? [s.type.asMap.value, s.type.asMap.key]
: s.type.isDoubleMap
? [s.type.asDoubleMap.value, s.type.asDoubleMap.key1, s.type.asDoubleMap.key2]
: [s.type.asNMap.value, ...s.type.asNMap.keyVec]
);
return registry.createType('StorageEntryMetadataLatest', s);
}),
@@ -98,13 +104,15 @@ function convertStorage (registry: Registry, { items, prefix }: StorageMetadataV
}
// generate & register the OriginCaller type
function registerOriginCaller (registry: Registry, modules: ModuleMetadataV12[], metaVersion: number): void {
function registerOriginCaller (registry: Registry, modules: ModuleMetadataV13[], metaVersion: number): void {
registry.register({
OriginCaller: {
_enum: modules
.map((mod, index): [string, number] => [
mod.name.toString(),
metaVersion >= 12 ? mod.index.toNumber() : index
metaVersion >= 12
? mod.index.toNumber()
: index
])
.sort((a, b) => a[1] - b[1])
.reduce((result: Record<string, string>, [name, index]): Record<string, string> => {
@@ -121,7 +129,7 @@ function registerOriginCaller (registry: Registry, modules: ModuleMetadataV12[],
}
/** @internal */
function createModule (registry: Registry, mod: ModuleMetadataV12, { calls, constants, events, storage }: { calls: FunctionMetadataV12[] | null, constants: ModuleConstantMetadataV12[], events: EventMetadataV12[] | null, storage: StorageMetadataV12 | null }): ModuleMetadataLatest {
function createModule (registry: Registry, mod: ModuleMetadataV13, { calls, constants, events, storage }: { calls: FunctionMetadataV13[] | null, constants: ModuleConstantMetadataV13[], events: EventMetadataV13[] | null, storage: StorageMetadataV13 | null }): ModuleMetadataLatest {
const sectionTypes = getModuleTypes(registry, stringCamelCase(mod.name));
return registry.createType('ModuleMetadataLatest', {
@@ -138,7 +146,7 @@ function createModule (registry: Registry, mod: ModuleMetadataV12, { calls, cons
* most-recent metadata, since it allows us a chance to actually apply call and storage specific type aliasses
* @internal
**/
export function toLatest (registry: Registry, { extrinsic, modules }: MetadataV12, metaVersion: number): MetadataLatest {
export function toLatest (registry: Registry, { extrinsic, modules }: MetadataV13, metaVersion: number): MetadataLatest {
registerOriginCaller(registry, modules, metaVersion);
return registry.createType('MetadataLatest', {
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/rpc-core",
"version": "4.8.1",
"version": "4.9.1",
"type": "module",
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
"main": "index.js",
@@ -20,9 +20,9 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
"dependencies": {
"@babel/runtime": "^7.14.0",
"@polkadot/metadata": "4.8.1",
"@polkadot/rpc-provider": "4.8.1",
"@polkadot/types": "4.8.1",
"@polkadot/metadata": "4.9.1",
"@polkadot/rpc-provider": "4.9.1",
"@polkadot/types": "4.9.1",
"@polkadot/util": "^6.3.1",
"@polkadot/x-rxjs": "^6.3.1"
},
+24 -28
View File
@@ -84,7 +84,7 @@ export class RpcCore {
#registryDefault: Registry;
#getBlockRegistry?: (blockHash: string | Uint8Array) => Promise<{ registry: Registry }>;
#getBlockRegistry?: (blockHash: Uint8Array) => Promise<{ registry: Registry }>;
readonly #storageCache = new Map<string, string | null>();
@@ -140,8 +140,10 @@ export class RpcCore {
/**
* @description Sets a registry swap (typically from Api)
*/
public setRegistrySwap (registrySwap: (blockHash: string | Uint8Array) => Promise<{ registry: Registry }>): void {
this.#getBlockRegistry = registrySwap;
public setRegistrySwap (registrySwap: (blockHash: Uint8Array) => Promise<{ registry: Registry }>): void {
this.#getBlockRegistry = memoize(registrySwap, {
getInstanceId: () => this.#instanceId
});
}
public addUserInterfaces<Section extends keyof RpcInterface> (userRpc: Record<string, Record<string, DefinitionRpc | DefinitionRpcSub>>): void {
@@ -211,9 +213,9 @@ export class RpcCore {
const callWithRegistry = async (outputAs: OutputType, values: any[]): Promise<Codec | Codec[]> => {
const blockHash = hashIndex === -1
? null
: values[hashIndex] as Uint8Array;
: values[hashIndex] as (Uint8Array | string | null | undefined);
const { registry } = blockHash && this.#getBlockRegistry
? await this.#getBlockRegistry(blockHash)
? await this.#getBlockRegistry(u8aToU8a(blockHash))
: { registry: this.#registryDefault };
const params = this._formatInputs(registry, null, def, values);
const data = await this.provider.send(rpcName, params.map((param): AnyJson => param.toJSON())) as AnyJson;
@@ -438,27 +440,23 @@ export class RpcCore {
? ''
: ` entry ${entryIndex}:`;
if (meta.modifier.isOptional) {
let inner = null;
if (!isEmpty) {
try {
inner = createTypeUnsafe(registry, type, [input], { blockHash, isPedantic: true });
} catch (error) {
l.error(`Unable to decode storage ${key.section || 'unknown'}.${key.method || 'unknown'}:${entryNum}`, (error as Error).message);
}
}
const option = new Option(registry, createClass(registry, type), inner);
if (blockHash) {
option.createdAtHash = registry.createType('Hash', blockHash);
}
return option;
}
try {
if (meta.modifier.isOptional) {
let inner = null;
if (!isEmpty) {
inner = createTypeUnsafe(registry, type, [input], { blockHash, isPedantic: true });
}
const option = new Option(registry, createClass(registry, type), inner);
if (blockHash) {
option.createdAtHash = registry.createType('Hash', blockHash);
}
return option;
}
return createTypeUnsafe(registry, type, [
isEmpty
? meta.fallback
@@ -467,9 +465,7 @@ export class RpcCore {
: input
], { blockHash, isPedantic: true });
} catch (error) {
l.error(`Unable to decode storage ${key.section || 'unknown'}.${key.method || 'unknown'}:${entryNum}`, (error as Error).message);
return createTypeUnsafe(registry, 'Raw', [input], { blockHash });
throw new Error(`Unable to decode storage ${key.section || 'unknown'}.${key.method || 'unknown'}:${entryNum}: ${(error as Error).message}`);
}
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/rpc-core', version: '4.8.1' };
export const packageInfo = { name: '@polkadot/rpc-core', version: '4.9.1' };
+1 -1
View File
@@ -22,7 +22,7 @@ const CMP = (a: unknown, b: unknown): boolean =>
stringify({ t: a }) === stringify({ t: b });
const ERR = (error: Error): Observable<never> => {
l.error(error);
l.error(error.message);
throw error;
};
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/rpc-provider",
"version": "4.8.1",
"version": "4.9.1",
"type": "module",
"description": "Transport providers for the API",
"main": "index.js",
@@ -20,7 +20,7 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
"dependencies": {
"@babel/runtime": "^7.14.0",
"@polkadot/types": "4.8.1",
"@polkadot/types": "4.9.1",
"@polkadot/util": "^6.3.1",
"@polkadot/util-crypto": "^6.3.1",
"@polkadot/x-fetch": "^6.3.1",
@@ -31,7 +31,7 @@
},
"devDependencies": {
"@polkadot/keyring": "^6.3.1",
"@polkadot/metadata": "4.8.1",
"@polkadot/metadata": "4.9.1",
"mock-socket": "^9.0.3",
"nock": "^13.0.11"
}
+4 -1
View File
@@ -69,6 +69,7 @@ export class MockProvider implements ProviderInterface {
system_chain: (): string => 'mockChain',
system_name: (): string => 'mockClient',
system_properties: (): Record<string, number | string> => ({ ss58Format: 42 }),
system_upgradedToTripleRefCount: () => this.registry.createType('bool', true),
system_version: (): string => '9.8.7'
};
@@ -121,6 +122,8 @@ export class MockProvider implements ProviderInterface {
// eslint-disable-next-line @typescript-eslint/require-await
public async send (method: string, params: any[]): Promise<unknown> {
l.debug(() => ['send', method, params]);
assert(this.requests[method], () => `provider.send: Invalid method '${method}'`);
return this.requests[method](this.db, params);
@@ -128,7 +131,7 @@ export class MockProvider implements ProviderInterface {
// eslint-disable-next-line @typescript-eslint/require-await
public async subscribe (type: string, method: string, ...params: unknown[]): Promise<number> {
l.debug((): any => ['subscribe', method, params]);
l.debug(() => ['subscribe', method, params]);
assert(this.subscriptions[method], () => `provider.subscribe: Invalid method '${method}'`);
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/rpc-provider', version: '4.8.1' };
export const packageInfo = { name: '@polkadot/rpc-provider', version: '4.9.1' };
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/typegen",
"version": "4.8.1",
"version": "4.9.1",
"type": "module",
"description": "Type generation scripts",
"main": "index.js",
@@ -29,14 +29,14 @@
"@babel/core": "^7.14.0",
"@babel/register": "^7.13.16",
"@babel/runtime": "^7.14.0",
"@polkadot/api": "4.8.1",
"@polkadot/metadata": "4.8.1",
"@polkadot/rpc-provider": "4.8.1",
"@polkadot/types": "4.8.1",
"@polkadot/api": "4.9.1",
"@polkadot/metadata": "4.9.1",
"@polkadot/rpc-provider": "4.9.1",
"@polkadot/types": "4.9.1",
"@polkadot/util": "^6.3.1",
"handlebars": "^4.7.7",
"websocket": "^1.0.34",
"yargs": "^16.2.0"
"yargs": "^17.0.1"
},
"devDependencies": {
"@types/websocket": "^1.0.2",
+29 -7
View File
@@ -25,38 +25,60 @@ function entrySignature (allDefs: Record<string, ModuleTypes>, registry: Registr
return ['', '', formatType(allDefs, outputType, imports)];
} else if (storageEntry.type.isMap) {
const map = storageEntry.type.asMap;
// Find similar types of the `key` type
const similarTypes = getSimilarTypes(registry, allDefs, storageEntry.type.asMap.key.toString(), imports);
const similarTypes = getSimilarTypes(registry, allDefs, map.key.toString(), imports);
setImports(allDefs, imports, [
...similarTypes,
storageEntry.type.asMap.value.toString()
map.value.toString()
]);
return [
formatType(allDefs, storageEntry.type.asMap.key.toString(), imports),
formatType(allDefs, map.key.toString(), imports),
`arg: ${similarTypes.join(' | ')}`,
formatType(allDefs, outputType, imports)
];
} else if (storageEntry.type.isDoubleMap) {
const dm = storageEntry.type.asDoubleMap;
// Find similar types of `key1` and `key2` types
const similarTypes1 = getSimilarTypes(registry, allDefs, storageEntry.type.asDoubleMap.key1.toString(), imports);
const similarTypes2 = getSimilarTypes(registry, allDefs, storageEntry.type.asDoubleMap.key2.toString(), imports);
const similarTypes1 = getSimilarTypes(registry, allDefs, dm.key1.toString(), imports);
const similarTypes2 = getSimilarTypes(registry, allDefs, dm.key2.toString(), imports);
setImports(allDefs, imports, [
...similarTypes1,
...similarTypes2,
storageEntry.type.asDoubleMap.value.toString()
dm.value.toString()
]);
const key1Types = similarTypes1.join(' | ');
const key2Types = similarTypes2.join(' | ');
return [
[formatType(allDefs, storageEntry.type.asDoubleMap.key1.toString(), imports), formatType(allDefs, storageEntry.type.asDoubleMap.key2.toString(), imports)].join(', '),
[formatType(allDefs, dm.key1.toString(), imports), formatType(allDefs, dm.key2.toString(), imports)].join(', '),
`key1: ${key1Types}, key2: ${key2Types}`,
formatType(allDefs, outputType, imports)
];
} else if (storageEntry.type.isNMap) {
const nmap = storageEntry.type.asNMap;
// Find similar types for all keys
const similarTypes = nmap.keyVec.map((k) => getSimilarTypes(registry, allDefs, k.toString(), imports));
setImports(allDefs, imports, [
...similarTypes.reduce<string[]>((all, t) => all.concat(t), []),
nmap.value.toString()
]);
const keyTypes = similarTypes.map((t) => t.join(' | '));
return [
nmap.keyVec.map((k) => formatType(allDefs, k.toString(), imports)).join(', '),
keyTypes.map((t, i) => `key${i + 1}: ${t}`).join(', '),
formatType(allDefs, outputType, imports)
];
}
throw new Error(`entryArgs: Cannot parse args of entry ${storageEntry.name.toString()}`);
+3 -1
View File
@@ -210,7 +210,9 @@ function addStorage (metadata: MetadataLatest): string {
? ('`' + func.type.asMap.key.toString() + '`')
: func.type.isDoubleMap
? ('`' + func.type.asDoubleMap.key1.toString() + ', ' + func.type.asDoubleMap.key2.toString() + '`')
: '';
: func.type.isNMap
? ('`' + func.type.asNMap.keyVec.map((k) => k.toString()).join(', ') + '`')
: '';
const methodName = stringLowerFirst(func.name);
const outputType = unwrapStorageType(func.type, func.modifier.isOptional);
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/typegen', version: '4.8.1' };
export const packageInfo = { name: '@polkadot/typegen', version: '4.9.1' };
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/types-known",
"version": "4.8.1",
"version": "4.9.1",
"type": "module",
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
"main": "index.js",
@@ -21,7 +21,7 @@
"dependencies": {
"@babel/runtime": "^7.14.0",
"@polkadot/networks": "^6.3.1",
"@polkadot/types": "4.8.1",
"@polkadot/types": "4.9.1",
"@polkadot/util": "^6.3.1",
"bn.js": "^4.11.9"
},
+6
View File
@@ -48,9 +48,15 @@ const typesModules: Record<string, OverrideModuleType> = {
parachains: {
Id: 'ParaId'
},
parasInclusion: {
ValidatorIndex: 'ParaValidatorIndex'
},
parasScheduler: {
ValidatorIndex: 'ParaValidatorIndex'
},
parasShared: {
ValidatorIndex: 'ParaValidatorIndex'
},
proposeParachain: {
Proposal: 'ParachainProposal'
},
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/types-known', version: '4.8.1' };
export const packageInfo = { name: '@polkadot/types-known', version: '4.9.1' };
+1 -1
View File
@@ -9,7 +9,7 @@ const upgrades: ChainUpgradesRaw = [
[1030162, 31], [1119657, 32], [1199282, 33], [1342534, 34], [1392263, 35],
[1431703, 36], [1433369, 37], [1490972, 41], [2087397, 43], [2316688, 44],
[2549864, 45], [3925782, 46], [3925843, 47], [4207800, 48], [4627944, 49],
[5124076, 50]
[5124076, 50], [5478664, 900], [5482450, 9000]
];
export default upgrades;
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/types",
"version": "4.8.1",
"version": "4.9.1",
"type": "module",
"description": "Implementation of the Parity codec",
"main": "index.js",
@@ -20,7 +20,7 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
"dependencies": {
"@babel/runtime": "^7.14.0",
"@polkadot/metadata": "4.8.1",
"@polkadot/metadata": "4.9.1",
"@polkadot/util": "^6.3.1",
"@polkadot/util-crypto": "^6.3.1",
"@polkadot/x-rxjs": "^6.3.1",
+112 -7
View File
@@ -15,7 +15,7 @@ import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
import type { EthereumAddress, StatementKind } from '@polkadot/types/interfaces/claims';
import type { CollectiveOrigin, MemberCount, ProposalIndex, Votes, VotesTo230 } from '@polkadot/types/interfaces/collective';
import type { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/consensus';
import type { AliveContractInfo, CodeHash, ContractCallRequest, ContractExecResult, ContractExecResultErr, ContractExecResultErrModule, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractInfo, ContractStorageKey, DeletedContract, Gas, HostFnWeights, HostFnWeightsTo264, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
import type { AliveContractInfo, CodeHash, ContractCallRequest, ContractExecResult, ContractExecResultErr, ContractExecResultErrModule, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractInfo, ContractInstantiateResult, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateReturnValue, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
import type { ContractConstructorSpec, ContractContractSpec, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEventParamSpec, ContractEventSpec, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpec, ContractMessageSpec, ContractProject, ContractProjectContract, ContractProjectSource, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi';
import type { FundIndex, FundInfo, LastContribution, TrieIndex } from '@polkadot/types/interfaces/crowdloan';
import type { AccountVote, AccountVoteSplit, AccountVoteStandard, Conviction, Delegations, PreimageStatus, PreimageStatusAvailable, PriorLock, PropIndex, Proposal, ProxyState, ReferendumIndex, ReferendumInfo, ReferendumInfoFinished, ReferendumInfoTo239, ReferendumStatus, Tally, Voting, VotingDelegating, VotingDirect, VotingDirectVote } from '@polkadot/types/interfaces/democracy';
@@ -30,31 +30,31 @@ import type { AuthorityIndex, AuthorityList, AuthorityWeight, EncodedFinalityPro
import type { IdentityFields, IdentityInfo, IdentityInfoAdditional, IdentityJudgement, RegistrarIndex, RegistrarInfo, Registration, RegistrationJudgement } from '@polkadot/types/interfaces/identity';
import type { AuthIndex, AuthoritySignature, Heartbeat, HeartbeatTo244, OpaqueMultiaddr, OpaqueNetworkState, OpaquePeerId } from '@polkadot/types/interfaces/imOnline';
import type { CallIndex, LotteryConfig } from '@polkadot/types/interfaces/lottery';
import type { DoubleMapTypeLatest, DoubleMapTypeV10, DoubleMapTypeV11, DoubleMapTypeV12, DoubleMapTypeV9, ErrorMetadataLatest, ErrorMetadataV10, ErrorMetadataV11, ErrorMetadataV12, ErrorMetadataV9, EventMetadataLatest, EventMetadataV10, EventMetadataV11, EventMetadataV12, EventMetadataV9, ExtrinsicMetadataLatest, ExtrinsicMetadataV11, ExtrinsicMetadataV12, FunctionArgumentMetadataLatest, FunctionArgumentMetadataV10, FunctionArgumentMetadataV11, FunctionArgumentMetadataV12, FunctionArgumentMetadataV9, FunctionMetadataLatest, FunctionMetadataV10, FunctionMetadataV11, FunctionMetadataV12, FunctionMetadataV9, MapTypeLatest, MapTypeV10, MapTypeV11, MapTypeV12, MapTypeV9, MetadataAll, MetadataLatest, MetadataV10, MetadataV11, MetadataV12, MetadataV9, ModuleConstantMetadataLatest, ModuleConstantMetadataV10, ModuleConstantMetadataV11, ModuleConstantMetadataV12, ModuleConstantMetadataV9, ModuleMetadataLatest, ModuleMetadataV10, ModuleMetadataV11, ModuleMetadataV12, ModuleMetadataV9, StorageEntryMetadataLatest, StorageEntryMetadataV10, StorageEntryMetadataV11, StorageEntryMetadataV12, StorageEntryMetadataV9, StorageEntryModifierLatest, StorageEntryModifierV10, StorageEntryModifierV11, StorageEntryModifierV12, StorageEntryModifierV9, StorageEntryTypeLatest, StorageEntryTypeV10, StorageEntryTypeV11, StorageEntryTypeV12, StorageEntryTypeV9, StorageHasher, StorageHasherV10, StorageHasherV11, StorageHasherV12, StorageHasherV9, StorageMetadataLatest, StorageMetadataV10, StorageMetadataV11, StorageMetadataV12, StorageMetadataV9 } from '@polkadot/types/interfaces/metadata';
import type { DoubleMapTypeLatest, DoubleMapTypeV10, DoubleMapTypeV11, DoubleMapTypeV12, DoubleMapTypeV13, DoubleMapTypeV9, ErrorMetadataLatest, ErrorMetadataV10, ErrorMetadataV11, ErrorMetadataV12, ErrorMetadataV13, ErrorMetadataV9, EventMetadataLatest, EventMetadataV10, EventMetadataV11, EventMetadataV12, EventMetadataV13, EventMetadataV9, ExtrinsicMetadataLatest, ExtrinsicMetadataV11, ExtrinsicMetadataV12, ExtrinsicMetadataV13, FunctionArgumentMetadataLatest, FunctionArgumentMetadataV10, FunctionArgumentMetadataV11, FunctionArgumentMetadataV12, FunctionArgumentMetadataV13, FunctionArgumentMetadataV9, FunctionMetadataLatest, FunctionMetadataV10, FunctionMetadataV11, FunctionMetadataV12, FunctionMetadataV13, FunctionMetadataV9, MapTypeLatest, MapTypeV10, MapTypeV11, MapTypeV12, MapTypeV13, MapTypeV9, MetadataAll, MetadataLatest, MetadataV10, MetadataV11, MetadataV12, MetadataV13, MetadataV9, ModuleConstantMetadataLatest, ModuleConstantMetadataV10, ModuleConstantMetadataV11, ModuleConstantMetadataV12, ModuleConstantMetadataV13, ModuleConstantMetadataV9, ModuleMetadataLatest, ModuleMetadataV10, ModuleMetadataV11, ModuleMetadataV12, ModuleMetadataV13, ModuleMetadataV9, NMapTypeLatest, NMapTypeV13, StorageEntryMetadataLatest, StorageEntryMetadataV10, StorageEntryMetadataV11, StorageEntryMetadataV12, StorageEntryMetadataV13, StorageEntryMetadataV9, StorageEntryModifierLatest, StorageEntryModifierV10, StorageEntryModifierV11, StorageEntryModifierV12, StorageEntryModifierV13, StorageEntryModifierV9, StorageEntryTypeLatest, StorageEntryTypeV10, StorageEntryTypeV11, StorageEntryTypeV12, StorageEntryTypeV13, StorageEntryTypeV9, StorageHasher, StorageHasherV10, StorageHasherV11, StorageHasherV12, StorageHasherV13, StorageHasherV9, StorageMetadataLatest, StorageMetadataV10, StorageMetadataV11, StorageMetadataV12, StorageMetadataV13, StorageMetadataV9 } from '@polkadot/types/interfaces/metadata';
import type { MmrLeafProof } from '@polkadot/types/interfaces/mmr';
import type { StorageKind } from '@polkadot/types/interfaces/offchain';
import type { DeferredOffenceOf, Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences';
import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, CoreAssignment, CoreIndex, CoreOccupied, DisputeStatement, DisputeStatementSet, DoubleVoteReport, DownwardMessage, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InvalidDisputeStatementKind, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiDisputeStatementSet, NewBidder, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, QueuedParathread, RegisteredParachainInfo, RelayChainBlockNumber, RelayChainHash, Remark, Retriable, Scheduling, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, Statement, SubId, SystemInherentData, TransientValidationData, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, WinnersData, WinnersDataTuple, WinningData, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, CoreAssignment, CoreIndex, CoreOccupied, DisputeStatement, DisputeStatementSet, DoubleVoteReport, DownwardMessage, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InvalidDisputeStatementKind, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiDisputeStatementSet, NewBidder, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, QueuedParathread, RegisteredParachainInfo, RelayBlockNumber, RelayChainBlockNumber, RelayChainHash, RelayHash, Remark, Retriable, Scheduling, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, Statement, SubId, SystemInherentData, TransientValidationData, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, WinnersData, WinnersDataTuple, WinningData, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
import type { FeeDetails, InclusionFee, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
import type { Approvals } from '@polkadot/types/interfaces/poll';
import type { ProxyAnnouncement, ProxyDefinition, ProxyType } from '@polkadot/types/interfaces/proxy';
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, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, Call, CallHash, CallHashOf, ChangesTrieConfiguration, CodecHash, Consensus, ConsensusEngineId, Digest, DigestItem, EncodedJustification, ExtrinsicsWeight, Fixed128, Fixed64, FixedI128, FixedI64, FixedU128, FixedU64, H1024, H128, H160, H2048, H256, H32, H512, H64, Hash, Header, 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, TransactionPriority, U32F32, ValidatorId, ValidatorIdOf, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
import type { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, 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, 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, TransactionPriority, U32F32, ValidatorId, ValidatorIdOf, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
import type { SiField, SiLookupTypeId, SiPath, SiType, SiTypeDef, SiTypeDefArray, SiTypeDefComposite, SiTypeDefPrimitive, SiTypeDefSequence, SiTypeDefTuple, SiTypeDefVariant, 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';
import type { Bid, BidKind, SocietyJudgement, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
import type { ActiveEraInfo, CompactAssignments, CompactAssignmentsTo257, CompactScore, CompactScoreCompact, ElectionCompute, ElectionPhase, ElectionResult, ElectionScore, ElectionSize, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, ExtendedBalance, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, NominatorIndex, NominatorIndexCompact, OffchainAccuracy, OffchainAccuracyCompact, PhragmenScore, Points, RawSolution, ReadySolution, RewardDestination, RewardPoint, RoundSnapshot, SeatHolder, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SolutionOrSnapshotSize, SolutionSupport, SolutionSupports, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, StakingLedgerTo240, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorIndexCompact, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196, ValidatorPrefsWithBlocked, ValidatorPrefsWithCommission, VoteWeight, Voter } from '@polkadot/types/interfaces/staking';
import type { ApiId, KeyValueOption, ReadProof, RuntimeVersion, RuntimeVersionApi, StorageChangeSet } from '@polkadot/types/interfaces/state';
import type { ApiId, BlockTrace, BlockTraceEvent, BlockTraceEventData, BlockTraceSpan, KeyValueOption, ReadProof, RuntimeVersion, RuntimeVersionApi, StorageChangeSet, TraceBlockResponse, TraceError } from '@polkadot/types/interfaces/state';
import type { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';
import type { AccountInfo, AccountInfoWithDualRefCount, AccountInfoWithProviders, AccountInfoWithRefCount, AccountInfoWithTripleRefCount, ApplyExtrinsicResult, BlockLength, BlockWeights, ChainProperties, ChainType, ConsumedWeight, DigestOf, DispatchClass, DispatchError, DispatchErrorModule, DispatchErrorTo198, DispatchInfo, DispatchInfoTo190, DispatchInfoTo244, DispatchOutcome, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, Health, InvalidTransaction, Key, LastRuntimeUpgradeInfo, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NodeRole, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, PerDispatchClassU32, PerDispatchClassWeight, PerDispatchClassWeightsPerClass, Phase, RawOrigin, RefCount, RefCountTo259, SyncState, SystemOrigin, TokenError, TransactionValidityError, UnknownTransaction, WeightPerClass } from '@polkadot/types/interfaces/system';
import type { Bounty, BountyIndex, BountyStatus, BountyStatusActive, BountyStatusCuratorProposed, BountyStatusPendingPayout, OpenTip, OpenTipFinderTo225, OpenTipTip, OpenTipTo225, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
import type { Multiplier } from '@polkadot/types/interfaces/txpayment';
import type { Multisig, Timepoint } from '@polkadot/types/interfaces/utility';
import type { VestingInfo } from '@polkadot/types/interfaces/vesting';
import type { AccountId32Junction, AccountIndex64Junction, AccountKey20Junction, AssetInstance, BodyId, BodyPart, BodyPartAtLeastProportion, BodyPartFraction, BodyPartMoreThanProportion, DoubleEncodedCall, Junction, MultiAsset, MultiAssetAbstractFungible, MultiAssetAbstractNonFungible, MultiAssetConcreteFungible, MultiAssetConcreteNonFungible, MultiLocation, NetworkId, Outcome, PluralityJunction, VersionedMultiAsset, VersionedMultiLocation, VersionedXcm, Xcm, XcmAssetEffects, XcmError, XcmHrmpChannelAccepted, XcmHrmpChannelClosing, XcmHrmpNewChannelOpenRequest, XcmOrder, XcmOrderBuyExecution, XcmOrderDepositAsset, XcmOrderDepositReserveAsset, XcmOrderExchangeAsset, XcmOrderInitiateReserveWithdraw, XcmOrderInitiateTeleport, XcmOrderQueryHolding, XcmOriginKind, XcmQueryResponse, XcmRelayedFrom, XcmReserveAssetDeposit, XcmResponse, XcmTeleportAsset, XcmTransact, XcmTransferAsset, XcmTransferReserveAsset, XcmWithdrawAsset } from '@polkadot/types/interfaces/xcm';
import type { AccountId32Junction, AccountIndex64Junction, AccountKey20Junction, AssetInstance, BodyId, BodyPart, BodyPartAtLeastProportion, BodyPartFraction, BodyPartMoreThanProportion, DoubleEncodedCall, InboundStatus, Junction, MultiAsset, MultiAssetAbstractFungible, MultiAssetAbstractNonFungible, MultiAssetConcreteFungible, MultiAssetConcreteNonFungible, MultiLocation, NetworkId, OutboundStatus, Outcome, PluralityJunction, QueueConfigData, VersionedMultiAsset, VersionedMultiLocation, VersionedXcm, Xcm, XcmAssetEffects, XcmError, XcmHrmpChannelAccepted, XcmHrmpChannelClosing, XcmHrmpNewChannelOpenRequest, XcmOrder, XcmOrderBuyExecution, XcmOrderDepositAsset, XcmOrderDepositReserveAsset, XcmOrderExchangeAsset, XcmOrderInitiateReserveWithdraw, XcmOrderInitiateTeleport, XcmOrderQueryHolding, XcmOriginKind, XcmQueryResponse, XcmRelayedFrom, XcmReserveAssetDeposit, XcmResponse, XcmTeleportAsset, XcmTransact, XcmTransferAsset, XcmTransferReserveAsset, XcmWithdrawAsset, XcmpMessageFormat } from '@polkadot/types/interfaces/xcm';
declare module '@polkadot/types/types/registry' {
export interface InterfaceTypes {
@@ -73,7 +73,6 @@ declare module '@polkadot/types/types/registry' {
'Compact<BalanceOf>': Compact<BalanceOf>;
'Compact<BlockNumber>': Compact<BlockNumber>;
'Compact<BountyIndex>': Compact<BountyIndex>;
'Compact<ConsensusEngineId>': Compact<ConsensusEngineId>;
'Compact<ContractDiscriminant>': Compact<ContractDiscriminant>;
'Compact<CoreIndex>': Compact<CoreIndex>;
'Compact<EraIndex>': Compact<EraIndex>;
@@ -108,6 +107,7 @@ declare module '@polkadot/types/types/registry' {
'Compact<RefCountTo259>': Compact<RefCountTo259>;
'Compact<ReferendumIndex>': Compact<ReferendumIndex>;
'Compact<RegistrarIndex>': Compact<RegistrarIndex>;
'Compact<RelayBlockNumber>': Compact<RelayBlockNumber>;
'Compact<RelayChainBlockNumber>': Compact<RelayChainBlockNumber>;
'Compact<RewardPoint>': Compact<RewardPoint>;
'Compact<SchedulePriority>': Compact<SchedulePriority>;
@@ -225,6 +225,10 @@ declare module '@polkadot/types/types/registry' {
'Option<BlockHash>': Option<BlockHash>;
'Option<BlockLength>': Option<BlockLength>;
'Option<BlockNumber>': Option<BlockNumber>;
'Option<BlockTrace>': Option<BlockTrace>;
'Option<BlockTraceEvent>': Option<BlockTraceEvent>;
'Option<BlockTraceEventData>': Option<BlockTraceEventData>;
'Option<BlockTraceSpan>': Option<BlockTraceSpan>;
'Option<BlockWeights>': Option<BlockWeights>;
'Option<BodyId>': Option<BodyId>;
'Option<BodyPart>': Option<BodyPart>;
@@ -253,6 +257,7 @@ declare module '@polkadot/types/types/registry' {
'Option<ChainProperties>': Option<ChainProperties>;
'Option<ChainType>': Option<ChainType>;
'Option<ChangesTrieConfiguration>': Option<ChangesTrieConfiguration>;
'Option<ChangesTrieSignal>': Option<ChangesTrieSignal>;
'Option<CodecHash>': Option<CodecHash>;
'Option<CodeHash>': Option<CodeHash>;
'Option<CollatorId>': Option<CollatorId>;
@@ -284,6 +289,7 @@ declare module '@polkadot/types/types/registry' {
'Option<ContractExecResultTo255>': Option<ContractExecResultTo255>;
'Option<ContractExecResultTo260>': Option<ContractExecResultTo260>;
'Option<ContractInfo>': Option<ContractInfo>;
'Option<ContractInstantiateResult>': Option<ContractInstantiateResult>;
'Option<ContractLayoutArray>': Option<ContractLayoutArray>;
'Option<ContractLayoutCell>': Option<ContractLayoutCell>;
'Option<ContractLayoutEnum>': Option<ContractLayoutEnum>;
@@ -333,6 +339,7 @@ declare module '@polkadot/types/types/registry' {
'Option<DoubleMapTypeV10>': Option<DoubleMapTypeV10>;
'Option<DoubleMapTypeV11>': Option<DoubleMapTypeV11>;
'Option<DoubleMapTypeV12>': Option<DoubleMapTypeV12>;
'Option<DoubleMapTypeV13>': Option<DoubleMapTypeV13>;
'Option<DoubleMapTypeV9>': Option<DoubleMapTypeV9>;
'Option<DoubleVoteReport>': Option<DoubleVoteReport>;
'Option<DownwardMessage>': Option<DownwardMessage>;
@@ -355,6 +362,7 @@ declare module '@polkadot/types/types/registry' {
'Option<ErrorMetadataV10>': Option<ErrorMetadataV10>;
'Option<ErrorMetadataV11>': Option<ErrorMetadataV11>;
'Option<ErrorMetadataV12>': Option<ErrorMetadataV12>;
'Option<ErrorMetadataV13>': Option<ErrorMetadataV13>;
'Option<ErrorMetadataV9>': Option<ErrorMetadataV9>;
'Option<EthAccount>': Option<EthAccount>;
'Option<EthBlock>': Option<EthBlock>;
@@ -395,11 +403,13 @@ declare module '@polkadot/types/types/registry' {
'Option<EventMetadataV10>': Option<EventMetadataV10>;
'Option<EventMetadataV11>': Option<EventMetadataV11>;
'Option<EventMetadataV12>': Option<EventMetadataV12>;
'Option<EventMetadataV13>': Option<EventMetadataV13>;
'Option<EventMetadataV9>': Option<EventMetadataV9>;
'Option<EventRecord>': Option<EventRecord>;
'Option<EvmAccount>': Option<EvmAccount>;
'Option<EvmLog>': Option<EvmLog>;
'Option<EvmVicinity>': Option<EvmVicinity>;
'Option<ExecReturnValue>': Option<ExecReturnValue>;
'Option<ExitError>': Option<ExitError>;
'Option<ExitFatal>': Option<ExitFatal>;
'Option<ExitReason>': Option<ExitReason>;
@@ -413,6 +423,7 @@ declare module '@polkadot/types/types/registry' {
'Option<ExtrinsicMetadataLatest>': Option<ExtrinsicMetadataLatest>;
'Option<ExtrinsicMetadataV11>': Option<ExtrinsicMetadataV11>;
'Option<ExtrinsicMetadataV12>': Option<ExtrinsicMetadataV12>;
'Option<ExtrinsicMetadataV13>': Option<ExtrinsicMetadataV13>;
'Option<ExtrinsicOrHash>': Option<ExtrinsicOrHash>;
'Option<ExtrinsicPayload>': Option<ExtrinsicPayload>;
'Option<ExtrinsicPayloadUnknown>': Option<ExtrinsicPayloadUnknown>;
@@ -436,11 +447,13 @@ declare module '@polkadot/types/types/registry' {
'Option<FunctionArgumentMetadataV10>': Option<FunctionArgumentMetadataV10>;
'Option<FunctionArgumentMetadataV11>': Option<FunctionArgumentMetadataV11>;
'Option<FunctionArgumentMetadataV12>': Option<FunctionArgumentMetadataV12>;
'Option<FunctionArgumentMetadataV13>': Option<FunctionArgumentMetadataV13>;
'Option<FunctionArgumentMetadataV9>': Option<FunctionArgumentMetadataV9>;
'Option<FunctionMetadataLatest>': Option<FunctionMetadataLatest>;
'Option<FunctionMetadataV10>': Option<FunctionMetadataV10>;
'Option<FunctionMetadataV11>': Option<FunctionMetadataV11>;
'Option<FunctionMetadataV12>': Option<FunctionMetadataV12>;
'Option<FunctionMetadataV13>': Option<FunctionMetadataV13>;
'Option<FunctionMetadataV9>': Option<FunctionMetadataV9>;
'Option<FundIndex>': Option<FundIndex>;
'Option<FundInfo>': Option<FundInfo>;
@@ -496,6 +509,7 @@ declare module '@polkadot/types/types/registry' {
'Option<InboundDownwardMessage>': Option<InboundDownwardMessage>;
'Option<InboundHrmpMessage>': Option<InboundHrmpMessage>;
'Option<InboundHrmpMessages>': Option<InboundHrmpMessages>;
'Option<InboundStatus>': Option<InboundStatus>;
'Option<IncludedBlocks>': Option<IncludedBlocks>;
'Option<InclusionFee>': Option<InclusionFee>;
'Option<IncomingParachain>': Option<IncomingParachain>;
@@ -504,6 +518,8 @@ declare module '@polkadot/types/types/registry' {
'Option<Index>': Option<Index>;
'Option<IndicesLookupSource>': Option<IndicesLookupSource>;
'Option<IndividualExposure>': Option<IndividualExposure>;
'Option<InstantiateRequest>': Option<InstantiateRequest>;
'Option<InstantiateReturnValue>': Option<InstantiateReturnValue>;
'Option<InstructionWeights>': Option<InstructionWeights>;
'Option<InvalidDisputeStatementKind>': Option<InvalidDisputeStatementKind>;
'Option<InvalidTransaction>': Option<InvalidTransaction>;
@@ -535,6 +551,7 @@ declare module '@polkadot/types/types/registry' {
'Option<MapTypeV10>': Option<MapTypeV10>;
'Option<MapTypeV11>': Option<MapTypeV11>;
'Option<MapTypeV12>': Option<MapTypeV12>;
'Option<MapTypeV13>': Option<MapTypeV13>;
'Option<MapTypeV9>': Option<MapTypeV9>;
'Option<MaybeRandomness>': Option<MaybeRandomness>;
'Option<MaybeVrf>': Option<MaybeVrf>;
@@ -549,6 +566,7 @@ declare module '@polkadot/types/types/registry' {
'Option<MetadataV10>': Option<MetadataV10>;
'Option<MetadataV11>': Option<MetadataV11>;
'Option<MetadataV12>': Option<MetadataV12>;
'Option<MetadataV13>': Option<MetadataV13>;
'Option<MetadataV9>': Option<MetadataV9>;
'Option<MmrLeafProof>': Option<MmrLeafProof>;
'Option<MmrRootHash>': Option<MmrRootHash>;
@@ -556,12 +574,14 @@ declare module '@polkadot/types/types/registry' {
'Option<ModuleConstantMetadataV10>': Option<ModuleConstantMetadataV10>;
'Option<ModuleConstantMetadataV11>': Option<ModuleConstantMetadataV11>;
'Option<ModuleConstantMetadataV12>': Option<ModuleConstantMetadataV12>;
'Option<ModuleConstantMetadataV13>': Option<ModuleConstantMetadataV13>;
'Option<ModuleConstantMetadataV9>': Option<ModuleConstantMetadataV9>;
'Option<ModuleId>': Option<ModuleId>;
'Option<ModuleMetadataLatest>': Option<ModuleMetadataLatest>;
'Option<ModuleMetadataV10>': Option<ModuleMetadataV10>;
'Option<ModuleMetadataV11>': Option<ModuleMetadataV11>;
'Option<ModuleMetadataV12>': Option<ModuleMetadataV12>;
'Option<ModuleMetadataV13>': Option<ModuleMetadataV13>;
'Option<ModuleMetadataV9>': Option<ModuleMetadataV9>;
'Option<Moment>': Option<Moment>;
'Option<MomentOf>': Option<MomentOf>;
@@ -587,6 +607,8 @@ declare module '@polkadot/types/types/registry' {
'Option<NextAuthority>': Option<NextAuthority>;
'Option<NextConfigDescriptor>': Option<NextConfigDescriptor>;
'Option<NextConfigDescriptorV1>': Option<NextConfigDescriptorV1>;
'Option<NMapTypeLatest>': Option<NMapTypeLatest>;
'Option<NMapTypeV13>': Option<NMapTypeV13>;
'Option<NodeRole>': Option<NodeRole>;
'Option<Nominations>': Option<Nominations>;
'Option<NominatorIndex>': Option<NominatorIndex>;
@@ -609,6 +631,7 @@ declare module '@polkadot/types/types/registry' {
'Option<Origin>': Option<Origin>;
'Option<OriginCaller>': Option<OriginCaller>;
'Option<OutboundHrmpMessage>': Option<OutboundHrmpMessage>;
'Option<OutboundStatus>': Option<OutboundStatus>;
'Option<Outcome>': Option<Outcome>;
'Option<Owner>': Option<Owner>;
'Option<PalletId>': Option<PalletId>;
@@ -671,6 +694,7 @@ declare module '@polkadot/types/types/registry' {
'Option<ProxyDefinition>': Option<ProxyDefinition>;
'Option<ProxyState>': Option<ProxyState>;
'Option<ProxyType>': Option<ProxyType>;
'Option<QueueConfigData>': Option<QueueConfigData>;
'Option<QueuedParathread>': Option<QueuedParathread>;
'Option<Randomness>': Option<Randomness>;
'Option<Raw>': Option<Raw>;
@@ -702,11 +726,14 @@ declare module '@polkadot/types/types/registry' {
'Option<RegistrarInfo>': Option<RegistrarInfo>;
'Option<Registration>': Option<Registration>;
'Option<RegistrationJudgement>': Option<RegistrationJudgement>;
'Option<RelayBlockNumber>': Option<RelayBlockNumber>;
'Option<RelayChainBlockNumber>': Option<RelayChainBlockNumber>;
'Option<RelayChainHash>': Option<RelayChainHash>;
'Option<RelayHash>': Option<RelayHash>;
'Option<Releases>': Option<Releases>;
'Option<Remark>': Option<Remark>;
'Option<Renouncing>': Option<Renouncing>;
'Option<RentProjection>': Option<RentProjection>;
'Option<ReportedRoundStates>': Option<ReportedRoundStates>;
'Option<Reporter>': Option<Reporter>;
'Option<ReportIdOf>': Option<ReportIdOf>;
@@ -799,21 +826,25 @@ declare module '@polkadot/types/types/registry' {
'Option<StorageEntryMetadataV10>': Option<StorageEntryMetadataV10>;
'Option<StorageEntryMetadataV11>': Option<StorageEntryMetadataV11>;
'Option<StorageEntryMetadataV12>': Option<StorageEntryMetadataV12>;
'Option<StorageEntryMetadataV13>': Option<StorageEntryMetadataV13>;
'Option<StorageEntryMetadataV9>': Option<StorageEntryMetadataV9>;
'Option<StorageEntryModifierLatest>': Option<StorageEntryModifierLatest>;
'Option<StorageEntryModifierV10>': Option<StorageEntryModifierV10>;
'Option<StorageEntryModifierV11>': Option<StorageEntryModifierV11>;
'Option<StorageEntryModifierV12>': Option<StorageEntryModifierV12>;
'Option<StorageEntryModifierV13>': Option<StorageEntryModifierV13>;
'Option<StorageEntryModifierV9>': Option<StorageEntryModifierV9>;
'Option<StorageEntryTypeLatest>': Option<StorageEntryTypeLatest>;
'Option<StorageEntryTypeV10>': Option<StorageEntryTypeV10>;
'Option<StorageEntryTypeV11>': Option<StorageEntryTypeV11>;
'Option<StorageEntryTypeV12>': Option<StorageEntryTypeV12>;
'Option<StorageEntryTypeV13>': Option<StorageEntryTypeV13>;
'Option<StorageEntryTypeV9>': Option<StorageEntryTypeV9>;
'Option<StorageHasher>': Option<StorageHasher>;
'Option<StorageHasherV10>': Option<StorageHasherV10>;
'Option<StorageHasherV11>': Option<StorageHasherV11>;
'Option<StorageHasherV12>': Option<StorageHasherV12>;
'Option<StorageHasherV13>': Option<StorageHasherV13>;
'Option<StorageHasherV9>': Option<StorageHasherV9>;
'Option<StorageKey>': Option<StorageKey>;
'Option<StorageKind>': Option<StorageKind>;
@@ -821,6 +852,7 @@ declare module '@polkadot/types/types/registry' {
'Option<StorageMetadataV10>': Option<StorageMetadataV10>;
'Option<StorageMetadataV11>': Option<StorageMetadataV11>;
'Option<StorageMetadataV12>': Option<StorageMetadataV12>;
'Option<StorageMetadataV13>': Option<StorageMetadataV13>;
'Option<StorageMetadataV9>': Option<StorageMetadataV9>;
'Option<StorageProof>': Option<StorageProof>;
'Option<StoredPendingChange>': Option<StoredPendingChange>;
@@ -838,6 +870,8 @@ declare module '@polkadot/types/types/registry' {
'Option<Timepoint>': Option<Timepoint>;
'Option<TokenError>': Option<TokenError>;
'Option<TombstoneContractInfo>': Option<TombstoneContractInfo>;
'Option<TraceBlockResponse>': Option<TraceBlockResponse>;
'Option<TraceError>': Option<TraceError>;
'Option<TransactionPriority>': Option<TransactionPriority>;
'Option<TransactionValidityError>': Option<TransactionValidityError>;
'Option<TransientValidationData>': Option<TransientValidationData>;
@@ -930,6 +964,7 @@ declare module '@polkadot/types/types/registry' {
'Option<XcmOrderInitiateTeleport>': Option<XcmOrderInitiateTeleport>;
'Option<XcmOrderQueryHolding>': Option<XcmOrderQueryHolding>;
'Option<XcmOriginKind>': Option<XcmOriginKind>;
'Option<XcmpMessageFormat>': Option<XcmpMessageFormat>;
'Option<XcmQueryResponse>': Option<XcmQueryResponse>;
'Option<XcmRelayedFrom>': Option<XcmRelayedFrom>;
'Option<XcmReserveAssetDeposit>': Option<XcmReserveAssetDeposit>;
@@ -1019,6 +1054,10 @@ declare module '@polkadot/types/types/registry' {
'Vec<BlockHash>': Vec<BlockHash>;
'Vec<BlockLength>': Vec<BlockLength>;
'Vec<BlockNumber>': Vec<BlockNumber>;
'Vec<BlockTrace>': Vec<BlockTrace>;
'Vec<BlockTraceEvent>': Vec<BlockTraceEvent>;
'Vec<BlockTraceEventData>': Vec<BlockTraceEventData>;
'Vec<BlockTraceSpan>': Vec<BlockTraceSpan>;
'Vec<BlockWeights>': Vec<BlockWeights>;
'Vec<BodyId>': Vec<BodyId>;
'Vec<BodyPart>': Vec<BodyPart>;
@@ -1047,6 +1086,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<ChainProperties>': Vec<ChainProperties>;
'Vec<ChainType>': Vec<ChainType>;
'Vec<ChangesTrieConfiguration>': Vec<ChangesTrieConfiguration>;
'Vec<ChangesTrieSignal>': Vec<ChangesTrieSignal>;
'Vec<CodecHash>': Vec<CodecHash>;
'Vec<CodeHash>': Vec<CodeHash>;
'Vec<CollatorId>': Vec<CollatorId>;
@@ -1078,6 +1118,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<ContractExecResultTo255>': Vec<ContractExecResultTo255>;
'Vec<ContractExecResultTo260>': Vec<ContractExecResultTo260>;
'Vec<ContractInfo>': Vec<ContractInfo>;
'Vec<ContractInstantiateResult>': Vec<ContractInstantiateResult>;
'Vec<ContractLayoutArray>': Vec<ContractLayoutArray>;
'Vec<ContractLayoutCell>': Vec<ContractLayoutCell>;
'Vec<ContractLayoutEnum>': Vec<ContractLayoutEnum>;
@@ -1127,6 +1168,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<DoubleMapTypeV10>': Vec<DoubleMapTypeV10>;
'Vec<DoubleMapTypeV11>': Vec<DoubleMapTypeV11>;
'Vec<DoubleMapTypeV12>': Vec<DoubleMapTypeV12>;
'Vec<DoubleMapTypeV13>': Vec<DoubleMapTypeV13>;
'Vec<DoubleMapTypeV9>': Vec<DoubleMapTypeV9>;
'Vec<DoubleVoteReport>': Vec<DoubleVoteReport>;
'Vec<DownwardMessage>': Vec<DownwardMessage>;
@@ -1149,6 +1191,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<ErrorMetadataV10>': Vec<ErrorMetadataV10>;
'Vec<ErrorMetadataV11>': Vec<ErrorMetadataV11>;
'Vec<ErrorMetadataV12>': Vec<ErrorMetadataV12>;
'Vec<ErrorMetadataV13>': Vec<ErrorMetadataV13>;
'Vec<ErrorMetadataV9>': Vec<ErrorMetadataV9>;
'Vec<EthAccount>': Vec<EthAccount>;
'Vec<EthBlock>': Vec<EthBlock>;
@@ -1189,11 +1232,13 @@ declare module '@polkadot/types/types/registry' {
'Vec<EventMetadataV10>': Vec<EventMetadataV10>;
'Vec<EventMetadataV11>': Vec<EventMetadataV11>;
'Vec<EventMetadataV12>': Vec<EventMetadataV12>;
'Vec<EventMetadataV13>': Vec<EventMetadataV13>;
'Vec<EventMetadataV9>': Vec<EventMetadataV9>;
'Vec<EventRecord>': Vec<EventRecord>;
'Vec<EvmAccount>': Vec<EvmAccount>;
'Vec<EvmLog>': Vec<EvmLog>;
'Vec<EvmVicinity>': Vec<EvmVicinity>;
'Vec<ExecReturnValue>': Vec<ExecReturnValue>;
'Vec<ExitError>': Vec<ExitError>;
'Vec<ExitFatal>': Vec<ExitFatal>;
'Vec<ExitReason>': Vec<ExitReason>;
@@ -1207,6 +1252,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<ExtrinsicMetadataLatest>': Vec<ExtrinsicMetadataLatest>;
'Vec<ExtrinsicMetadataV11>': Vec<ExtrinsicMetadataV11>;
'Vec<ExtrinsicMetadataV12>': Vec<ExtrinsicMetadataV12>;
'Vec<ExtrinsicMetadataV13>': Vec<ExtrinsicMetadataV13>;
'Vec<ExtrinsicOrHash>': Vec<ExtrinsicOrHash>;
'Vec<ExtrinsicPayload>': Vec<ExtrinsicPayload>;
'Vec<ExtrinsicPayloadUnknown>': Vec<ExtrinsicPayloadUnknown>;
@@ -1230,11 +1276,13 @@ declare module '@polkadot/types/types/registry' {
'Vec<FunctionArgumentMetadataV10>': Vec<FunctionArgumentMetadataV10>;
'Vec<FunctionArgumentMetadataV11>': Vec<FunctionArgumentMetadataV11>;
'Vec<FunctionArgumentMetadataV12>': Vec<FunctionArgumentMetadataV12>;
'Vec<FunctionArgumentMetadataV13>': Vec<FunctionArgumentMetadataV13>;
'Vec<FunctionArgumentMetadataV9>': Vec<FunctionArgumentMetadataV9>;
'Vec<FunctionMetadataLatest>': Vec<FunctionMetadataLatest>;
'Vec<FunctionMetadataV10>': Vec<FunctionMetadataV10>;
'Vec<FunctionMetadataV11>': Vec<FunctionMetadataV11>;
'Vec<FunctionMetadataV12>': Vec<FunctionMetadataV12>;
'Vec<FunctionMetadataV13>': Vec<FunctionMetadataV13>;
'Vec<FunctionMetadataV9>': Vec<FunctionMetadataV9>;
'Vec<FundIndex>': Vec<FundIndex>;
'Vec<FundInfo>': Vec<FundInfo>;
@@ -1290,6 +1338,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<InboundDownwardMessage>': Vec<InboundDownwardMessage>;
'Vec<InboundHrmpMessage>': Vec<InboundHrmpMessage>;
'Vec<InboundHrmpMessages>': Vec<InboundHrmpMessages>;
'Vec<InboundStatus>': Vec<InboundStatus>;
'Vec<IncludedBlocks>': Vec<IncludedBlocks>;
'Vec<InclusionFee>': Vec<InclusionFee>;
'Vec<IncomingParachain>': Vec<IncomingParachain>;
@@ -1298,6 +1347,8 @@ declare module '@polkadot/types/types/registry' {
'Vec<Index>': Vec<Index>;
'Vec<IndicesLookupSource>': Vec<IndicesLookupSource>;
'Vec<IndividualExposure>': Vec<IndividualExposure>;
'Vec<InstantiateRequest>': Vec<InstantiateRequest>;
'Vec<InstantiateReturnValue>': Vec<InstantiateReturnValue>;
'Vec<InstructionWeights>': Vec<InstructionWeights>;
'Vec<InvalidDisputeStatementKind>': Vec<InvalidDisputeStatementKind>;
'Vec<InvalidTransaction>': Vec<InvalidTransaction>;
@@ -1329,6 +1380,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<MapTypeV10>': Vec<MapTypeV10>;
'Vec<MapTypeV11>': Vec<MapTypeV11>;
'Vec<MapTypeV12>': Vec<MapTypeV12>;
'Vec<MapTypeV13>': Vec<MapTypeV13>;
'Vec<MapTypeV9>': Vec<MapTypeV9>;
'Vec<MaybeRandomness>': Vec<MaybeRandomness>;
'Vec<MaybeVrf>': Vec<MaybeVrf>;
@@ -1343,6 +1395,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<MetadataV10>': Vec<MetadataV10>;
'Vec<MetadataV11>': Vec<MetadataV11>;
'Vec<MetadataV12>': Vec<MetadataV12>;
'Vec<MetadataV13>': Vec<MetadataV13>;
'Vec<MetadataV9>': Vec<MetadataV9>;
'Vec<MmrLeafProof>': Vec<MmrLeafProof>;
'Vec<MmrRootHash>': Vec<MmrRootHash>;
@@ -1350,12 +1403,14 @@ declare module '@polkadot/types/types/registry' {
'Vec<ModuleConstantMetadataV10>': Vec<ModuleConstantMetadataV10>;
'Vec<ModuleConstantMetadataV11>': Vec<ModuleConstantMetadataV11>;
'Vec<ModuleConstantMetadataV12>': Vec<ModuleConstantMetadataV12>;
'Vec<ModuleConstantMetadataV13>': Vec<ModuleConstantMetadataV13>;
'Vec<ModuleConstantMetadataV9>': Vec<ModuleConstantMetadataV9>;
'Vec<ModuleId>': Vec<ModuleId>;
'Vec<ModuleMetadataLatest>': Vec<ModuleMetadataLatest>;
'Vec<ModuleMetadataV10>': Vec<ModuleMetadataV10>;
'Vec<ModuleMetadataV11>': Vec<ModuleMetadataV11>;
'Vec<ModuleMetadataV12>': Vec<ModuleMetadataV12>;
'Vec<ModuleMetadataV13>': Vec<ModuleMetadataV13>;
'Vec<ModuleMetadataV9>': Vec<ModuleMetadataV9>;
'Vec<Moment>': Vec<Moment>;
'Vec<MomentOf>': Vec<MomentOf>;
@@ -1381,6 +1436,8 @@ declare module '@polkadot/types/types/registry' {
'Vec<NextAuthority>': Vec<NextAuthority>;
'Vec<NextConfigDescriptor>': Vec<NextConfigDescriptor>;
'Vec<NextConfigDescriptorV1>': Vec<NextConfigDescriptorV1>;
'Vec<NMapTypeLatest>': Vec<NMapTypeLatest>;
'Vec<NMapTypeV13>': Vec<NMapTypeV13>;
'Vec<NodeRole>': Vec<NodeRole>;
'Vec<Nominations>': Vec<Nominations>;
'Vec<NominatorIndex>': Vec<NominatorIndex>;
@@ -1403,6 +1460,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<Origin>': Vec<Origin>;
'Vec<OriginCaller>': Vec<OriginCaller>;
'Vec<OutboundHrmpMessage>': Vec<OutboundHrmpMessage>;
'Vec<OutboundStatus>': Vec<OutboundStatus>;
'Vec<Outcome>': Vec<Outcome>;
'Vec<Owner>': Vec<Owner>;
'Vec<PalletId>': Vec<PalletId>;
@@ -1465,6 +1523,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<ProxyDefinition>': Vec<ProxyDefinition>;
'Vec<ProxyState>': Vec<ProxyState>;
'Vec<ProxyType>': Vec<ProxyType>;
'Vec<QueueConfigData>': Vec<QueueConfigData>;
'Vec<QueuedParathread>': Vec<QueuedParathread>;
'Vec<Randomness>': Vec<Randomness>;
'Vec<Raw>': Vec<Raw>;
@@ -1496,11 +1555,14 @@ declare module '@polkadot/types/types/registry' {
'Vec<RegistrarInfo>': Vec<RegistrarInfo>;
'Vec<Registration>': Vec<Registration>;
'Vec<RegistrationJudgement>': Vec<RegistrationJudgement>;
'Vec<RelayBlockNumber>': Vec<RelayBlockNumber>;
'Vec<RelayChainBlockNumber>': Vec<RelayChainBlockNumber>;
'Vec<RelayChainHash>': Vec<RelayChainHash>;
'Vec<RelayHash>': Vec<RelayHash>;
'Vec<Releases>': Vec<Releases>;
'Vec<Remark>': Vec<Remark>;
'Vec<Renouncing>': Vec<Renouncing>;
'Vec<RentProjection>': Vec<RentProjection>;
'Vec<ReportedRoundStates>': Vec<ReportedRoundStates>;
'Vec<Reporter>': Vec<Reporter>;
'Vec<ReportIdOf>': Vec<ReportIdOf>;
@@ -1593,21 +1655,25 @@ declare module '@polkadot/types/types/registry' {
'Vec<StorageEntryMetadataV10>': Vec<StorageEntryMetadataV10>;
'Vec<StorageEntryMetadataV11>': Vec<StorageEntryMetadataV11>;
'Vec<StorageEntryMetadataV12>': Vec<StorageEntryMetadataV12>;
'Vec<StorageEntryMetadataV13>': Vec<StorageEntryMetadataV13>;
'Vec<StorageEntryMetadataV9>': Vec<StorageEntryMetadataV9>;
'Vec<StorageEntryModifierLatest>': Vec<StorageEntryModifierLatest>;
'Vec<StorageEntryModifierV10>': Vec<StorageEntryModifierV10>;
'Vec<StorageEntryModifierV11>': Vec<StorageEntryModifierV11>;
'Vec<StorageEntryModifierV12>': Vec<StorageEntryModifierV12>;
'Vec<StorageEntryModifierV13>': Vec<StorageEntryModifierV13>;
'Vec<StorageEntryModifierV9>': Vec<StorageEntryModifierV9>;
'Vec<StorageEntryTypeLatest>': Vec<StorageEntryTypeLatest>;
'Vec<StorageEntryTypeV10>': Vec<StorageEntryTypeV10>;
'Vec<StorageEntryTypeV11>': Vec<StorageEntryTypeV11>;
'Vec<StorageEntryTypeV12>': Vec<StorageEntryTypeV12>;
'Vec<StorageEntryTypeV13>': Vec<StorageEntryTypeV13>;
'Vec<StorageEntryTypeV9>': Vec<StorageEntryTypeV9>;
'Vec<StorageHasher>': Vec<StorageHasher>;
'Vec<StorageHasherV10>': Vec<StorageHasherV10>;
'Vec<StorageHasherV11>': Vec<StorageHasherV11>;
'Vec<StorageHasherV12>': Vec<StorageHasherV12>;
'Vec<StorageHasherV13>': Vec<StorageHasherV13>;
'Vec<StorageHasherV9>': Vec<StorageHasherV9>;
'Vec<StorageKey>': Vec<StorageKey>;
'Vec<StorageKind>': Vec<StorageKind>;
@@ -1615,6 +1681,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<StorageMetadataV10>': Vec<StorageMetadataV10>;
'Vec<StorageMetadataV11>': Vec<StorageMetadataV11>;
'Vec<StorageMetadataV12>': Vec<StorageMetadataV12>;
'Vec<StorageMetadataV13>': Vec<StorageMetadataV13>;
'Vec<StorageMetadataV9>': Vec<StorageMetadataV9>;
'Vec<StorageProof>': Vec<StorageProof>;
'Vec<StoredPendingChange>': Vec<StoredPendingChange>;
@@ -1632,6 +1699,8 @@ declare module '@polkadot/types/types/registry' {
'Vec<Timepoint>': Vec<Timepoint>;
'Vec<TokenError>': Vec<TokenError>;
'Vec<TombstoneContractInfo>': Vec<TombstoneContractInfo>;
'Vec<TraceBlockResponse>': Vec<TraceBlockResponse>;
'Vec<TraceError>': Vec<TraceError>;
'Vec<TransactionPriority>': Vec<TransactionPriority>;
'Vec<TransactionValidityError>': Vec<TransactionValidityError>;
'Vec<TransientValidationData>': Vec<TransientValidationData>;
@@ -1724,6 +1793,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<XcmOrderInitiateTeleport>': Vec<XcmOrderInitiateTeleport>;
'Vec<XcmOrderQueryHolding>': Vec<XcmOrderQueryHolding>;
'Vec<XcmOriginKind>': Vec<XcmOriginKind>;
'Vec<XcmpMessageFormat>': Vec<XcmpMessageFormat>;
'Vec<XcmQueryResponse>': Vec<XcmQueryResponse>;
'Vec<XcmRelayedFrom>': Vec<XcmRelayedFrom>;
'Vec<XcmReserveAssetDeposit>': Vec<XcmReserveAssetDeposit>;
@@ -1813,6 +1883,10 @@ declare module '@polkadot/types/types/registry' {
BlockHash: BlockHash;
BlockLength: BlockLength;
BlockNumber: BlockNumber;
BlockTrace: BlockTrace;
BlockTraceEvent: BlockTraceEvent;
BlockTraceEventData: BlockTraceEventData;
BlockTraceSpan: BlockTraceSpan;
BlockWeights: BlockWeights;
BodyId: BodyId;
BodyPart: BodyPart;
@@ -1841,6 +1915,7 @@ declare module '@polkadot/types/types/registry' {
ChainProperties: ChainProperties;
ChainType: ChainType;
ChangesTrieConfiguration: ChangesTrieConfiguration;
ChangesTrieSignal: ChangesTrieSignal;
CodecHash: CodecHash;
CodeHash: CodeHash;
CollatorId: CollatorId;
@@ -1872,6 +1947,7 @@ declare module '@polkadot/types/types/registry' {
ContractExecResultTo255: ContractExecResultTo255;
ContractExecResultTo260: ContractExecResultTo260;
ContractInfo: ContractInfo;
ContractInstantiateResult: ContractInstantiateResult;
ContractLayoutArray: ContractLayoutArray;
ContractLayoutCell: ContractLayoutCell;
ContractLayoutEnum: ContractLayoutEnum;
@@ -1921,6 +1997,7 @@ declare module '@polkadot/types/types/registry' {
DoubleMapTypeV10: DoubleMapTypeV10;
DoubleMapTypeV11: DoubleMapTypeV11;
DoubleMapTypeV12: DoubleMapTypeV12;
DoubleMapTypeV13: DoubleMapTypeV13;
DoubleMapTypeV9: DoubleMapTypeV9;
DoubleVoteReport: DoubleVoteReport;
DownwardMessage: DownwardMessage;
@@ -1943,6 +2020,7 @@ declare module '@polkadot/types/types/registry' {
ErrorMetadataV10: ErrorMetadataV10;
ErrorMetadataV11: ErrorMetadataV11;
ErrorMetadataV12: ErrorMetadataV12;
ErrorMetadataV13: ErrorMetadataV13;
ErrorMetadataV9: ErrorMetadataV9;
EthAccount: EthAccount;
EthBlock: EthBlock;
@@ -1983,11 +2061,13 @@ declare module '@polkadot/types/types/registry' {
EventMetadataV10: EventMetadataV10;
EventMetadataV11: EventMetadataV11;
EventMetadataV12: EventMetadataV12;
EventMetadataV13: EventMetadataV13;
EventMetadataV9: EventMetadataV9;
EventRecord: EventRecord;
EvmAccount: EvmAccount;
EvmLog: EvmLog;
EvmVicinity: EvmVicinity;
ExecReturnValue: ExecReturnValue;
ExitError: ExitError;
ExitFatal: ExitFatal;
ExitReason: ExitReason;
@@ -2001,6 +2081,7 @@ declare module '@polkadot/types/types/registry' {
ExtrinsicMetadataLatest: ExtrinsicMetadataLatest;
ExtrinsicMetadataV11: ExtrinsicMetadataV11;
ExtrinsicMetadataV12: ExtrinsicMetadataV12;
ExtrinsicMetadataV13: ExtrinsicMetadataV13;
ExtrinsicOrHash: ExtrinsicOrHash;
ExtrinsicPayload: ExtrinsicPayload;
ExtrinsicPayloadUnknown: ExtrinsicPayloadUnknown;
@@ -2024,11 +2105,13 @@ declare module '@polkadot/types/types/registry' {
FunctionArgumentMetadataV10: FunctionArgumentMetadataV10;
FunctionArgumentMetadataV11: FunctionArgumentMetadataV11;
FunctionArgumentMetadataV12: FunctionArgumentMetadataV12;
FunctionArgumentMetadataV13: FunctionArgumentMetadataV13;
FunctionArgumentMetadataV9: FunctionArgumentMetadataV9;
FunctionMetadataLatest: FunctionMetadataLatest;
FunctionMetadataV10: FunctionMetadataV10;
FunctionMetadataV11: FunctionMetadataV11;
FunctionMetadataV12: FunctionMetadataV12;
FunctionMetadataV13: FunctionMetadataV13;
FunctionMetadataV9: FunctionMetadataV9;
FundIndex: FundIndex;
FundInfo: FundInfo;
@@ -2084,6 +2167,7 @@ declare module '@polkadot/types/types/registry' {
InboundDownwardMessage: InboundDownwardMessage;
InboundHrmpMessage: InboundHrmpMessage;
InboundHrmpMessages: InboundHrmpMessages;
InboundStatus: InboundStatus;
IncludedBlocks: IncludedBlocks;
InclusionFee: InclusionFee;
IncomingParachain: IncomingParachain;
@@ -2092,6 +2176,8 @@ declare module '@polkadot/types/types/registry' {
Index: Index;
IndicesLookupSource: IndicesLookupSource;
IndividualExposure: IndividualExposure;
InstantiateRequest: InstantiateRequest;
InstantiateReturnValue: InstantiateReturnValue;
InstructionWeights: InstructionWeights;
InvalidDisputeStatementKind: InvalidDisputeStatementKind;
InvalidTransaction: InvalidTransaction;
@@ -2123,6 +2209,7 @@ declare module '@polkadot/types/types/registry' {
MapTypeV10: MapTypeV10;
MapTypeV11: MapTypeV11;
MapTypeV12: MapTypeV12;
MapTypeV13: MapTypeV13;
MapTypeV9: MapTypeV9;
MaybeRandomness: MaybeRandomness;
MaybeVrf: MaybeVrf;
@@ -2137,6 +2224,7 @@ declare module '@polkadot/types/types/registry' {
MetadataV10: MetadataV10;
MetadataV11: MetadataV11;
MetadataV12: MetadataV12;
MetadataV13: MetadataV13;
MetadataV9: MetadataV9;
MmrLeafProof: MmrLeafProof;
MmrRootHash: MmrRootHash;
@@ -2144,12 +2232,14 @@ declare module '@polkadot/types/types/registry' {
ModuleConstantMetadataV10: ModuleConstantMetadataV10;
ModuleConstantMetadataV11: ModuleConstantMetadataV11;
ModuleConstantMetadataV12: ModuleConstantMetadataV12;
ModuleConstantMetadataV13: ModuleConstantMetadataV13;
ModuleConstantMetadataV9: ModuleConstantMetadataV9;
ModuleId: ModuleId;
ModuleMetadataLatest: ModuleMetadataLatest;
ModuleMetadataV10: ModuleMetadataV10;
ModuleMetadataV11: ModuleMetadataV11;
ModuleMetadataV12: ModuleMetadataV12;
ModuleMetadataV13: ModuleMetadataV13;
ModuleMetadataV9: ModuleMetadataV9;
Moment: Moment;
MomentOf: MomentOf;
@@ -2175,6 +2265,8 @@ declare module '@polkadot/types/types/registry' {
NextAuthority: NextAuthority;
NextConfigDescriptor: NextConfigDescriptor;
NextConfigDescriptorV1: NextConfigDescriptorV1;
NMapTypeLatest: NMapTypeLatest;
NMapTypeV13: NMapTypeV13;
NodeRole: NodeRole;
Nominations: Nominations;
NominatorIndex: NominatorIndex;
@@ -2197,6 +2289,7 @@ declare module '@polkadot/types/types/registry' {
Origin: Origin;
OriginCaller: OriginCaller;
OutboundHrmpMessage: OutboundHrmpMessage;
OutboundStatus: OutboundStatus;
Outcome: Outcome;
Owner: Owner;
PalletId: PalletId;
@@ -2259,6 +2352,7 @@ declare module '@polkadot/types/types/registry' {
ProxyDefinition: ProxyDefinition;
ProxyState: ProxyState;
ProxyType: ProxyType;
QueueConfigData: QueueConfigData;
QueuedParathread: QueuedParathread;
Randomness: Randomness;
Raw: Raw;
@@ -2290,11 +2384,14 @@ declare module '@polkadot/types/types/registry' {
RegistrarInfo: RegistrarInfo;
Registration: Registration;
RegistrationJudgement: RegistrationJudgement;
RelayBlockNumber: RelayBlockNumber;
RelayChainBlockNumber: RelayChainBlockNumber;
RelayChainHash: RelayChainHash;
RelayHash: RelayHash;
Releases: Releases;
Remark: Remark;
Renouncing: Renouncing;
RentProjection: RentProjection;
ReportedRoundStates: ReportedRoundStates;
Reporter: Reporter;
ReportIdOf: ReportIdOf;
@@ -2387,21 +2484,25 @@ declare module '@polkadot/types/types/registry' {
StorageEntryMetadataV10: StorageEntryMetadataV10;
StorageEntryMetadataV11: StorageEntryMetadataV11;
StorageEntryMetadataV12: StorageEntryMetadataV12;
StorageEntryMetadataV13: StorageEntryMetadataV13;
StorageEntryMetadataV9: StorageEntryMetadataV9;
StorageEntryModifierLatest: StorageEntryModifierLatest;
StorageEntryModifierV10: StorageEntryModifierV10;
StorageEntryModifierV11: StorageEntryModifierV11;
StorageEntryModifierV12: StorageEntryModifierV12;
StorageEntryModifierV13: StorageEntryModifierV13;
StorageEntryModifierV9: StorageEntryModifierV9;
StorageEntryTypeLatest: StorageEntryTypeLatest;
StorageEntryTypeV10: StorageEntryTypeV10;
StorageEntryTypeV11: StorageEntryTypeV11;
StorageEntryTypeV12: StorageEntryTypeV12;
StorageEntryTypeV13: StorageEntryTypeV13;
StorageEntryTypeV9: StorageEntryTypeV9;
StorageHasher: StorageHasher;
StorageHasherV10: StorageHasherV10;
StorageHasherV11: StorageHasherV11;
StorageHasherV12: StorageHasherV12;
StorageHasherV13: StorageHasherV13;
StorageHasherV9: StorageHasherV9;
StorageKey: StorageKey;
StorageKind: StorageKind;
@@ -2409,6 +2510,7 @@ declare module '@polkadot/types/types/registry' {
StorageMetadataV10: StorageMetadataV10;
StorageMetadataV11: StorageMetadataV11;
StorageMetadataV12: StorageMetadataV12;
StorageMetadataV13: StorageMetadataV13;
StorageMetadataV9: StorageMetadataV9;
StorageProof: StorageProof;
StoredPendingChange: StoredPendingChange;
@@ -2426,6 +2528,8 @@ declare module '@polkadot/types/types/registry' {
Timepoint: Timepoint;
TokenError: TokenError;
TombstoneContractInfo: TombstoneContractInfo;
TraceBlockResponse: TraceBlockResponse;
TraceError: TraceError;
TransactionPriority: TransactionPriority;
TransactionValidityError: TransactionValidityError;
TransientValidationData: TransientValidationData;
@@ -2518,6 +2622,7 @@ declare module '@polkadot/types/types/registry' {
XcmOrderInitiateTeleport: XcmOrderInitiateTeleport;
XcmOrderQueryHolding: XcmOrderQueryHolding;
XcmOriginKind: XcmOriginKind;
XcmpMessageFormat: XcmpMessageFormat;
XcmQueryResponse: XcmQueryResponse;
XcmRelayedFrom: XcmRelayedFrom;
XcmReserveAssetDeposit: XcmReserveAssetDeposit;
+4 -6
View File
@@ -52,7 +52,7 @@ function getSubType (value: TypeDef): keyof InterfaceTypes {
function getTypeClassMap (value: TypeDef): Record<string, keyof InterfaceTypes> {
const result: Record<string, keyof InterfaceTypes> = {};
return getSubDefArray(value).reduce((result, sub): Record<string, keyof InterfaceTypes> => {
return getSubDefArray(value).reduce<Record<string, keyof InterfaceTypes>>((result, sub) => {
result[sub.name as string] = sub.type as keyof InterfaceTypes;
return result;
@@ -61,9 +61,7 @@ function getTypeClassMap (value: TypeDef): Record<string, keyof InterfaceTypes>
// create an array of type string constructors from the input
function getTypeClassArray (value: TypeDef): (keyof InterfaceTypes)[] {
return getSubDefArray(value).map(({ type }): keyof InterfaceTypes =>
type as keyof InterfaceTypes
);
return getSubDefArray(value).map(({ type }) => type as keyof InterfaceTypes);
}
function createInt ({ displayName, length }: TypeDef, Clazz: typeof Int | typeof UInt): Constructor {
@@ -92,7 +90,7 @@ const infoMapping: Record<TypeDefInfo, (registry: Registry, value: TypeDef) => C
return Enum.with(
subs.every(({ type }) => type === 'Null')
? subs.reduce((out: Record<string, number>, { index, name }, count): Record<string, number> => {
? subs.reduce<Record<string, number>>((out, { index, name }, count) => {
out[name as string] = index || count;
return out;
@@ -139,7 +137,7 @@ const infoMapping: Record<TypeDefInfo, (registry: Registry, value: TypeDef) => C
const result: Record<string, number> = {};
return CodecSet.with(
getSubDefArray(value).reduce((result, { index, name }): Record<string, number> => {
getSubDefArray(value).reduce<Record<string, number>>((result, { index, name }) => {
result[name as string] = index as number;
return result;
+20 -35
View File
@@ -4,59 +4,46 @@
import type { Codec, Constructor, InterfaceTypes, Registry } from '../types';
import type { FromReg } from './types';
import { logger } from '@polkadot/util';
import { assert, isHex, isU8a, u8aEq, u8aToHex, u8aToU8a } from '@polkadot/util';
import { createClass } from './createClass';
interface CreateOptions {
blockHash?: Uint8Array | string | null;
isPedantic?: boolean;
withoutLog?: boolean;
}
const l = logger('registry');
// TODO: Fix and re-enable
// With isPedantic, actually check that the encoding matches that supplied. This
// is much slower, but verifies that we have the correct types defined
// function checkInstance<T extends Codec = Codec, K extends string = string> (value: Uint8Array, created: FromReg<T, K>): void {
// // the underlying type created.toRawType()
// const rawType = created.toRawType();
// eslint-disable-next-line @typescript-eslint/ban-types
function checkInstance<T extends Codec = Codec, K extends string = string> (value: Uint8Array, created: FromReg<T, K>): void {
const u8a = created.toU8a();
const rawType = created.toRawType();
const isEqual = rawType === 'Bytes'
? value.length === u8a.length
: u8aEq(value, u8a);
// // ignore bytes completely - this is probably a FIXME, since these are somewhat
// // breaking for at least online queries - not quite sure wtf is going wrong here
// if (rawType === 'Bytes') {
// return;
// }
// // the hex values for what we have
// const inHex = u8aToHex(value);
// const crHex = created.toHex();
// // Check equality, based on some different approaches (as decoded)
// const isEqual = inHex === crHex || // raw hex values, quick path
// inHex === created.toHex(true) || // wrapped options
// u8aToHex(value.reverse()) === crHex; // reverse (for numbers, which are BE)
// // if the hex doesn't match and the value for both is non-empty, complain... bitterly
// if (!isEqual && (u8aHasValue(value) || u8aHasValue(created.toU8a(true)))) {
// l.warn(`${rawType}:: Input doesn't match output, received ${u8aToHex(value)}, created ${crHex}`);
// }
// }
assert(isEqual, () => `${rawType}:: Decoded input doesn't match input, received ${u8aToHex(value, 512)} (${value.length} bytes), created ${u8aToHex(u8a, 512)} (${u8a.length} bytes)`);
}
// Initializes a type with a value. This also checks for fallbacks and in the cases
// where isPedantic is specified (storage decoding), also check the format/structure
function initType<T extends Codec = Codec, K extends string = string> (registry: Registry, Type: Constructor<FromReg<T, K>>, params: any[] = [], { blockHash }: CreateOptions = {}): FromReg<T, K> {
function initType<T extends Codec = Codec, K extends string = string> (registry: Registry, Type: Constructor<FromReg<T, K>>, params: unknown[] = [], { blockHash, isPedantic }: CreateOptions = {}): FromReg<T, K> {
const created = new Type(registry, ...params);
const value = params[0];
if (isPedantic) {
if (isU8a(value)) {
checkInstance(value, created);
} else if (isHex(value)) {
checkInstance(u8aToU8a(value.toString()), created);
}
}
if (blockHash) {
created.createdAtHash = createType(registry, 'Hash', blockHash);
}
// if (isPedantic && isU8a(value)) {
// checkInstance(value, created);
// }
return created;
}
@@ -69,8 +56,6 @@ export function createTypeUnsafe<T extends Codec = Codec, K extends string = str
// it provides false warning which is more hinderance than help
return initType(registry, createClass<T, K>(registry, type), params, options);
} catch (error) {
!options.withoutLog && l.error(error);
throw new Error(`createType(${type}):: ${(error as Error).message}`);
}
}
+1 -1
View File
@@ -46,7 +46,7 @@ function encodeSubTypes (sub: TypeDef[], asEnum?: boolean): string {
assert(names.every((n) => !!n), () => `Subtypes does not have consistent names, ${names.join(', ')}`);
const inner = sub.reduce((result: Record<string, string>, type): Record<string, string> => ({
const inner = sub.reduce< Record<string, string>>((result, type) => ({
...result,
[type.name as string]: encodeTypeDef(type)
}), {});
+1 -1
View File
@@ -209,7 +209,7 @@ export function removeWrap (check: string): Mapper {
// eslint-disable-next-line @typescript-eslint/ban-types
export function sanitize (value: String | string, options?: SanitizeOptions): string {
return mappings.reduce((result, fn): string =>
return mappings.reduce<string>((result, fn) =>
fn(result, options), value.toString()
).trim();
}
@@ -1,22 +1,17 @@
// Copyright 2017-2021 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { hexToBn } from '@polkadot/util';
import { CID_AURA, CID_BABE, CID_GRPA, GenericConsensusEngineId as ConsensusEngineId } from './ConsensusEngineId';
import { TypeRegistry } from '../create';
import { CID_AURA, GenericConsensusEngineId as ConsensusEngineId } from './ConsensusEngineId';
describe('ConsensusEngineId', (): void => {
const registry = new TypeRegistry();
it('creates a valid id for aura', (): void => {
expect(ConsensusEngineId.stringToId('FRNK')).toEqual(CID_GRPA);
expect(ConsensusEngineId.stringToId('aura')).toEqual(CID_AURA);
expect(new ConsensusEngineId(registry, 'aura').toU8a()).toEqual(CID_AURA);
});
it('reverses an id to string for babe', (): void => {
expect(ConsensusEngineId.idToString(CID_BABE)).toEqual('BABE');
});
it('reverses a non-ASCII id to a hex string', (): void => {
expect(ConsensusEngineId.idToString(hexToBn('0x01020304', { isLe: true }))).toEqual('0x01020304');
expect(ConsensusEngineId.idToString(0x04030201)).toEqual('0x01020304');
expect(new ConsensusEngineId(registry, 'BABE').toString()).toEqual('BABE');
});
});
+38 -35
View File
@@ -2,40 +2,35 @@
// SPDX-License-Identifier: Apache-2.0
import type { AccountId } from '../interfaces/runtime';
import type { AnyU8a, Registry } from '../types';
import BN from 'bn.js';
import { bnToU8a, isAscii, u8aToHex, u8aToString } from '@polkadot/util';
import { bnToU8a, isNumber, stringToU8a, u8aToHex, u8aToString } from '@polkadot/util';
import { U8aFixed } from '../codec/U8aFixed';
import { Bytes } from '../primitive/Bytes';
import { u32 } from '../primitive/U32';
// there are all reversed since it is actually encoded as u32, LE,
// this means that FRNK has the bytes as KNRF
export const CID_AURA = 0x61727561; // 'aura'
export const CID_BABE = 0x45424142; // 'BABE'
export const CID_GRPA = 0x4b4e5246; // 'FRNK' (don't ask, used to be afg1)
export const CID_POW = 0x5f776f70; // 'pow_'
export const CID_AURA = stringToU8a('aura');
export const CID_BABE = stringToU8a('BABE');
export const CID_GRPA = stringToU8a('FRNK');
export const CID_POW = stringToU8a('pow_');
/**
* @name GenericConsensusEngineId
* @description
* A 4-byte identifier (actually a [u8; 4]) identifying the engine, e.g. for Aura it would be [b'a', b'u', b'r', b'a']
* A 4-byte identifier identifying the engine
*/
export class GenericConsensusEngineId extends u32 {
public static idToString (input: number | BN): string {
const u8a = bnToU8a(input);
return isAscii(u8a)
? u8aToString(u8a)
: u8aToHex(u8a);
}
public static stringToId (input: string): number {
return input
.split('')
.reverse()
.reduce((result, char): number => (result * 256) + char.charCodeAt(0), 0);
export class GenericConsensusEngineId extends U8aFixed {
constructor (registry: Registry, value?: AnyU8a) {
super(
registry,
isNumber(value)
? bnToU8a(value, { isLe: false })
: value,
32
);
}
/**
@@ -83,11 +78,7 @@ export class GenericConsensusEngineId extends u32 {
];
}
private _getPowAuthor (bytes: Bytes): AccountId {
return this.registry.createType('AccountId', bytes);
}
private _getH160Author (bytes: Bytes): AccountId {
private _getBytesAsAuthor (bytes: Bytes): AccountId {
return this.registry.createType('AccountId', bytes);
}
@@ -103,22 +94,34 @@ export class GenericConsensusEngineId extends u32 {
}
}
if (this.isPow) {
return this._getPowAuthor(bytes);
}
// Moonbeam is neither Aura nor Babe nor Pow and uses h160 addresses
if (bytes.length === 20) {
return this._getH160Author(bytes);
// For pow & Moonbeam, the bytes are the actual author
if (this.isPow || bytes.length === 20) {
return this._getBytesAsAuthor(bytes);
}
return undefined;
}
/**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/
public toHuman (): string {
return this.toString();
}
/**
* @description Returns the base runtime type name for this instance
*/
public toRawType (): string {
return 'ConsensusEngineId';
}
/**
* @description Override the default toString to return a 4-byte string
*/
public toString (): string {
return GenericConsensusEngineId.idToString(this as BN);
return this.isAscii
? u8aToString(this)
: u8aToHex(this);
}
}
@@ -24,6 +24,22 @@ export default {
],
type: 'ContractExecResult'
},
instantiate: {
description: 'Instantiate a new contract',
params: [
{
name: 'request',
type: 'InstantiateRequest'
},
{
name: 'at',
type: 'BlockHash',
isHstoric: true,
isOptional: true
}
],
type: 'ContractInstantiateResult'
},
getStorage: {
description: 'Returns the value under a specified storage key in a contract',
params: [
@@ -65,10 +81,10 @@ export default {
AliveContractInfo: {
trieId: 'TrieId',
storageSize: 'u32',
emptyPairCount: 'u32',
totalPairCount: 'u32',
pairCount: 'u32',
codeHash: 'CodeHash',
rentAllowance: 'Balance',
rentPaid: 'Balance',
deductBlock: 'BlockNumber',
lastWrite: 'Option<BlockNumber>',
_reserved: 'Option<Null>'
@@ -141,6 +157,10 @@ export default {
pairCount: 'u32',
trieId: 'TrieId'
},
ExecReturnValue: {
flags: 'u32',
data: 'Bytes'
},
Gas: 'u64',
HostFnWeightsTo264: {
caller: 'Weight',
@@ -243,6 +263,25 @@ export default {
hashBlake2128PerByte: 'Weight',
rentParams: 'Weight'
},
InstantiateRequest: {
origin: 'AccountId',
endowment: 'Balance',
gasLimit: 'Gas',
code: 'Bytes',
data: 'Bytes',
salt: 'Bytes'
},
ContractInstantiateResult: {
_enum: {
Ok: 'InstantiateReturnValue',
Err: 'Null'
}
},
InstantiateReturnValue: {
result: 'ExecReturnValue',
accountId: 'AccountId',
rentProjection: 'Option<RentProjection>'
},
InstructionWeights: {
i64const: 'u32',
i64load: 'u32',
@@ -326,6 +365,12 @@ export default {
code: 'Bytes',
originalCodeLen: 'u32'
},
RentProjection: {
_enum: {
EvictionAt: 'BlockNumber',
NoEviction: 'Null'
}
},
ScheduleTo212: {
version: 'u32',
putCodePerByteCost: 'Gas',
@@ -8,10 +8,10 @@ import type { AccountId, Balance, BlockNumber, Hash, Weight } from '@polkadot/ty
export interface AliveContractInfo extends Struct {
readonly trieId: TrieId;
readonly storageSize: u32;
readonly emptyPairCount: u32;
readonly totalPairCount: u32;
readonly pairCount: u32;
readonly codeHash: CodeHash;
readonly rentAllowance: Balance;
readonly rentPaid: Balance;
readonly deductBlock: BlockNumber;
readonly lastWrite: Option<BlockNumber>;
readonly _reserved: Option<Null>;
@@ -102,6 +102,13 @@ export interface ContractInfo extends Enum {
readonly asTombstone: TombstoneContractInfo;
}
/** @name ContractInstantiateResult */
export interface ContractInstantiateResult extends Enum {
readonly isOk: boolean;
readonly asOk: InstantiateReturnValue;
readonly isErr: boolean;
}
/** @name ContractStorageKey */
export interface ContractStorageKey extends U8aFixed {}
@@ -111,6 +118,12 @@ export interface DeletedContract extends Struct {
readonly trieId: TrieId;
}
/** @name ExecReturnValue */
export interface ExecReturnValue extends Struct {
readonly flags: u32;
readonly data: Bytes;
}
/** @name Gas */
export interface Gas extends u64 {}
@@ -219,6 +232,23 @@ export interface HostFnWeightsTo264 extends Struct {
readonly hashBlake2128PerByte: Weight;
}
/** @name InstantiateRequest */
export interface InstantiateRequest extends Struct {
readonly origin: AccountId;
readonly endowment: Balance;
readonly gasLimit: Gas;
readonly code: Bytes;
readonly data: Bytes;
readonly salt: Bytes;
}
/** @name InstantiateReturnValue */
export interface InstantiateReturnValue extends Struct {
readonly result: ExecReturnValue;
readonly accountId: AccountId;
readonly rentProjection: Option<RentProjection>;
}
/** @name InstructionWeights */
export interface InstructionWeights extends Struct {
readonly i64const: u32;
@@ -310,6 +340,13 @@ export interface PrefabWasmModule extends Struct {
readonly originalCodeLen: u32;
}
/** @name RentProjection */
export interface RentProjection extends Enum {
readonly isEvictionAt: boolean;
readonly asEvictionAt: BlockNumber;
readonly isNoEviction: boolean;
}
/** @name Schedule */
export interface Schedule extends Struct {
readonly version: u32;
@@ -246,22 +246,72 @@ export default {
StorageMetadataV12: 'StorageMetadataV11',
StorageHasherV12: 'StorageHasherV11',
// v13
DoubleMapTypeV13: 'DoubleMapTypeV12',
ErrorMetadataV13: 'ErrorMetadataV12',
EventMetadataV13: 'EventMetadataV12',
ExtrinsicMetadataV13: 'ExtrinsicMetadataV12',
FunctionArgumentMetadataV13: 'FunctionArgumentMetadataV12',
FunctionMetadataV13: 'FunctionMetadataV12',
MapTypeV13: 'MapTypeV12',
MetadataV13: {
modules: 'Vec<ModuleMetadataV13>',
extrinsic: 'ExtrinsicMetadataV13'
},
ModuleConstantMetadataV13: 'ModuleConstantMetadataV12',
ModuleMetadataV13: {
name: 'Text',
storage: 'Option<StorageMetadataV13>',
calls: 'Option<Vec<FunctionMetadataV13>>',
events: 'Option<Vec<EventMetadataV13>>',
constants: 'Vec<ModuleConstantMetadataV13>',
errors: 'Vec<ErrorMetadataV13>',
index: 'u8'
},
NMapTypeV13: {
hashers: 'Vec<StorageHasherV13>',
keyVec: 'Vec<Type>',
value: 'Type'
},
StorageEntryModifierV13: 'StorageEntryModifierV12',
StorageEntryMetadataV13: {
name: 'Text',
modifier: 'StorageEntryModifierV13',
type: 'StorageEntryTypeV13',
fallback: 'Bytes',
documentation: 'Vec<Text>'
},
StorageEntryTypeV13: {
_enum: {
Plain: 'Type',
Map: 'MapTypeV13',
DoubleMap: 'DoubleMapTypeV13',
NMap: 'NMapTypeV13'
}
},
StorageMetadataV13: {
prefix: 'Text',
items: 'Vec<StorageEntryMetadataV13>'
},
StorageHasherV13: 'StorageHasherV12',
// This always maps to the latest
DoubleMapTypeLatest: 'DoubleMapTypeV12',
ErrorMetadataLatest: 'ErrorMetadataV12',
EventMetadataLatest: 'EventMetadataV12',
ExtrinsicMetadataLatest: 'ExtrinsicMetadataV12',
FunctionArgumentMetadataLatest: 'FunctionArgumentMetadataV12',
FunctionMetadataLatest: 'FunctionMetadataV12',
MapTypeLatest: 'MapTypeV12',
MetadataLatest: 'MetadataV12',
ModuleConstantMetadataLatest: 'ModuleConstantMetadataV12',
ModuleMetadataLatest: 'ModuleMetadataV12',
StorageEntryMetadataLatest: 'StorageEntryMetadataV12',
StorageEntryModifierLatest: 'StorageEntryModifierV12',
StorageEntryTypeLatest: 'StorageEntryTypeV12',
StorageMetadataLatest: 'StorageMetadataV12',
StorageHasher: 'StorageHasherV12',
DoubleMapTypeLatest: 'DoubleMapTypeV13',
ErrorMetadataLatest: 'ErrorMetadataV13',
EventMetadataLatest: 'EventMetadataV13',
ExtrinsicMetadataLatest: 'ExtrinsicMetadataV13',
FunctionArgumentMetadataLatest: 'FunctionArgumentMetadataV13',
FunctionMetadataLatest: 'FunctionMetadataV13',
MapTypeLatest: 'MapTypeV13',
MetadataLatest: 'MetadataV13',
ModuleConstantMetadataLatest: 'ModuleConstantMetadataV13',
ModuleMetadataLatest: 'ModuleMetadataV13',
NMapTypeLatest: 'NMapTypeV13',
StorageEntryMetadataLatest: 'StorageEntryMetadataV13',
StorageEntryModifierLatest: 'StorageEntryModifierV13',
StorageEntryTypeLatest: 'StorageEntryTypeV13',
StorageMetadataLatest: 'StorageMetadataV13',
StorageHasher: 'StorageHasherV13',
// the enum containing all the mappings
MetadataAll: {
@@ -279,7 +329,8 @@ export default {
V9: 'MetadataV9',
V10: 'MetadataV10',
V11: 'MetadataV11',
V12: 'MetadataV12'
V12: 'MetadataV12',
V13: 'MetadataV13'
}
}
}
+101 -15
View File
@@ -4,7 +4,7 @@
import type { Bytes, Enum, Option, Struct, Text, Type, Vec, bool, u8 } from '@polkadot/types';
/** @name DoubleMapTypeLatest */
export interface DoubleMapTypeLatest extends DoubleMapTypeV12 {}
export interface DoubleMapTypeLatest extends DoubleMapTypeV13 {}
/** @name DoubleMapTypeV10 */
export interface DoubleMapTypeV10 extends Struct {
@@ -27,6 +27,9 @@ export interface DoubleMapTypeV11 extends Struct {
/** @name DoubleMapTypeV12 */
export interface DoubleMapTypeV12 extends DoubleMapTypeV11 {}
/** @name DoubleMapTypeV13 */
export interface DoubleMapTypeV13 extends DoubleMapTypeV12 {}
/** @name DoubleMapTypeV9 */
export interface DoubleMapTypeV9 extends Struct {
readonly hasher: StorageHasherV9;
@@ -37,7 +40,7 @@ export interface DoubleMapTypeV9 extends Struct {
}
/** @name ErrorMetadataLatest */
export interface ErrorMetadataLatest extends ErrorMetadataV12 {}
export interface ErrorMetadataLatest extends ErrorMetadataV13 {}
/** @name ErrorMetadataV10 */
export interface ErrorMetadataV10 extends ErrorMetadataV9 {}
@@ -48,6 +51,9 @@ export interface ErrorMetadataV11 extends ErrorMetadataV10 {}
/** @name ErrorMetadataV12 */
export interface ErrorMetadataV12 extends ErrorMetadataV11 {}
/** @name ErrorMetadataV13 */
export interface ErrorMetadataV13 extends ErrorMetadataV12 {}
/** @name ErrorMetadataV9 */
export interface ErrorMetadataV9 extends Struct {
readonly name: Text;
@@ -55,7 +61,7 @@ export interface ErrorMetadataV9 extends Struct {
}
/** @name EventMetadataLatest */
export interface EventMetadataLatest extends EventMetadataV12 {}
export interface EventMetadataLatest extends EventMetadataV13 {}
/** @name EventMetadataV10 */
export interface EventMetadataV10 extends EventMetadataV9 {}
@@ -66,6 +72,9 @@ export interface EventMetadataV11 extends EventMetadataV10 {}
/** @name EventMetadataV12 */
export interface EventMetadataV12 extends EventMetadataV11 {}
/** @name EventMetadataV13 */
export interface EventMetadataV13 extends EventMetadataV12 {}
/** @name EventMetadataV9 */
export interface EventMetadataV9 extends Struct {
readonly name: Text;
@@ -74,7 +83,7 @@ export interface EventMetadataV9 extends Struct {
}
/** @name ExtrinsicMetadataLatest */
export interface ExtrinsicMetadataLatest extends ExtrinsicMetadataV12 {}
export interface ExtrinsicMetadataLatest extends ExtrinsicMetadataV13 {}
/** @name ExtrinsicMetadataV11 */
export interface ExtrinsicMetadataV11 extends Struct {
@@ -85,8 +94,11 @@ export interface ExtrinsicMetadataV11 extends Struct {
/** @name ExtrinsicMetadataV12 */
export interface ExtrinsicMetadataV12 extends ExtrinsicMetadataV11 {}
/** @name ExtrinsicMetadataV13 */
export interface ExtrinsicMetadataV13 extends ExtrinsicMetadataV12 {}
/** @name FunctionArgumentMetadataLatest */
export interface FunctionArgumentMetadataLatest extends FunctionArgumentMetadataV12 {}
export interface FunctionArgumentMetadataLatest extends FunctionArgumentMetadataV13 {}
/** @name FunctionArgumentMetadataV10 */
export interface FunctionArgumentMetadataV10 extends FunctionArgumentMetadataV9 {}
@@ -97,6 +109,9 @@ export interface FunctionArgumentMetadataV11 extends FunctionArgumentMetadataV10
/** @name FunctionArgumentMetadataV12 */
export interface FunctionArgumentMetadataV12 extends FunctionArgumentMetadataV11 {}
/** @name FunctionArgumentMetadataV13 */
export interface FunctionArgumentMetadataV13 extends FunctionArgumentMetadataV12 {}
/** @name FunctionArgumentMetadataV9 */
export interface FunctionArgumentMetadataV9 extends Struct {
readonly name: Text;
@@ -104,7 +119,7 @@ export interface FunctionArgumentMetadataV9 extends Struct {
}
/** @name FunctionMetadataLatest */
export interface FunctionMetadataLatest extends FunctionMetadataV12 {}
export interface FunctionMetadataLatest extends FunctionMetadataV13 {}
/** @name FunctionMetadataV10 */
export interface FunctionMetadataV10 extends FunctionMetadataV9 {}
@@ -115,6 +130,9 @@ export interface FunctionMetadataV11 extends FunctionMetadataV10 {}
/** @name FunctionMetadataV12 */
export interface FunctionMetadataV12 extends FunctionMetadataV11 {}
/** @name FunctionMetadataV13 */
export interface FunctionMetadataV13 extends FunctionMetadataV12 {}
/** @name FunctionMetadataV9 */
export interface FunctionMetadataV9 extends Struct {
readonly name: Text;
@@ -123,7 +141,7 @@ export interface FunctionMetadataV9 extends Struct {
}
/** @name MapTypeLatest */
export interface MapTypeLatest extends MapTypeV12 {}
export interface MapTypeLatest extends MapTypeV13 {}
/** @name MapTypeV10 */
export interface MapTypeV10 extends Struct {
@@ -144,6 +162,9 @@ export interface MapTypeV11 extends Struct {
/** @name MapTypeV12 */
export interface MapTypeV12 extends MapTypeV11 {}
/** @name MapTypeV13 */
export interface MapTypeV13 extends MapTypeV12 {}
/** @name MapTypeV9 */
export interface MapTypeV9 extends Struct {
readonly hasher: StorageHasherV9;
@@ -162,10 +183,12 @@ export interface MetadataAll extends Enum {
readonly asV11: MetadataV11;
readonly isV12: boolean;
readonly asV12: MetadataV12;
readonly isV13: boolean;
readonly asV13: MetadataV13;
}
/** @name MetadataLatest */
export interface MetadataLatest extends MetadataV12 {}
export interface MetadataLatest extends MetadataV13 {}
/** @name MetadataV10 */
export interface MetadataV10 extends Struct {
@@ -184,13 +207,19 @@ export interface MetadataV12 extends Struct {
readonly extrinsic: ExtrinsicMetadataV12;
}
/** @name MetadataV13 */
export interface MetadataV13 extends Struct {
readonly modules: Vec<ModuleMetadataV13>;
readonly extrinsic: ExtrinsicMetadataV13;
}
/** @name MetadataV9 */
export interface MetadataV9 extends Struct {
readonly modules: Vec<ModuleMetadataV9>;
}
/** @name ModuleConstantMetadataLatest */
export interface ModuleConstantMetadataLatest extends ModuleConstantMetadataV12 {}
export interface ModuleConstantMetadataLatest extends ModuleConstantMetadataV13 {}
/** @name ModuleConstantMetadataV10 */
export interface ModuleConstantMetadataV10 extends ModuleConstantMetadataV9 {}
@@ -201,6 +230,9 @@ export interface ModuleConstantMetadataV11 extends ModuleConstantMetadataV10 {}
/** @name ModuleConstantMetadataV12 */
export interface ModuleConstantMetadataV12 extends ModuleConstantMetadataV11 {}
/** @name ModuleConstantMetadataV13 */
export interface ModuleConstantMetadataV13 extends ModuleConstantMetadataV12 {}
/** @name ModuleConstantMetadataV9 */
export interface ModuleConstantMetadataV9 extends Struct {
readonly name: Text;
@@ -210,7 +242,7 @@ export interface ModuleConstantMetadataV9 extends Struct {
}
/** @name ModuleMetadataLatest */
export interface ModuleMetadataLatest extends ModuleMetadataV12 {}
export interface ModuleMetadataLatest extends ModuleMetadataV13 {}
/** @name ModuleMetadataV10 */
export interface ModuleMetadataV10 extends Struct {
@@ -243,6 +275,17 @@ export interface ModuleMetadataV12 extends Struct {
readonly index: u8;
}
/** @name ModuleMetadataV13 */
export interface ModuleMetadataV13 extends Struct {
readonly name: Text;
readonly storage: Option<StorageMetadataV13>;
readonly calls: Option<Vec<FunctionMetadataV13>>;
readonly events: Option<Vec<EventMetadataV13>>;
readonly constants: Vec<ModuleConstantMetadataV13>;
readonly errors: Vec<ErrorMetadataV13>;
readonly index: u8;
}
/** @name ModuleMetadataV9 */
export interface ModuleMetadataV9 extends Struct {
readonly name: Text;
@@ -253,8 +296,18 @@ export interface ModuleMetadataV9 extends Struct {
readonly errors: Vec<ErrorMetadataV9>;
}
/** @name NMapTypeLatest */
export interface NMapTypeLatest extends NMapTypeV13 {}
/** @name NMapTypeV13 */
export interface NMapTypeV13 extends Struct {
readonly hashers: Vec<StorageHasherV13>;
readonly keyVec: Vec<Type>;
readonly value: Type;
}
/** @name StorageEntryMetadataLatest */
export interface StorageEntryMetadataLatest extends StorageEntryMetadataV12 {}
export interface StorageEntryMetadataLatest extends StorageEntryMetadataV13 {}
/** @name StorageEntryMetadataV10 */
export interface StorageEntryMetadataV10 extends Struct {
@@ -277,6 +330,15 @@ export interface StorageEntryMetadataV11 extends Struct {
/** @name StorageEntryMetadataV12 */
export interface StorageEntryMetadataV12 extends StorageEntryMetadataV11 {}
/** @name StorageEntryMetadataV13 */
export interface StorageEntryMetadataV13 extends Struct {
readonly name: Text;
readonly modifier: StorageEntryModifierV13;
readonly type: StorageEntryTypeV13;
readonly fallback: Bytes;
readonly documentation: Vec<Text>;
}
/** @name StorageEntryMetadataV9 */
export interface StorageEntryMetadataV9 extends Struct {
readonly name: Text;
@@ -287,7 +349,7 @@ export interface StorageEntryMetadataV9 extends Struct {
}
/** @name StorageEntryModifierLatest */
export interface StorageEntryModifierLatest extends StorageEntryModifierV12 {}
export interface StorageEntryModifierLatest extends StorageEntryModifierV13 {}
/** @name StorageEntryModifierV10 */
export interface StorageEntryModifierV10 extends StorageEntryModifierV9 {}
@@ -298,6 +360,9 @@ export interface StorageEntryModifierV11 extends StorageEntryModifierV10 {}
/** @name StorageEntryModifierV12 */
export interface StorageEntryModifierV12 extends StorageEntryModifierV11 {}
/** @name StorageEntryModifierV13 */
export interface StorageEntryModifierV13 extends StorageEntryModifierV12 {}
/** @name StorageEntryModifierV9 */
export interface StorageEntryModifierV9 extends Enum {
readonly isOptional: boolean;
@@ -306,7 +371,7 @@ export interface StorageEntryModifierV9 extends Enum {
}
/** @name StorageEntryTypeLatest */
export interface StorageEntryTypeLatest extends StorageEntryTypeV12 {}
export interface StorageEntryTypeLatest extends StorageEntryTypeV13 {}
/** @name StorageEntryTypeV10 */
export interface StorageEntryTypeV10 extends Enum {
@@ -331,6 +396,18 @@ export interface StorageEntryTypeV11 extends Enum {
/** @name StorageEntryTypeV12 */
export interface StorageEntryTypeV12 extends StorageEntryTypeV11 {}
/** @name StorageEntryTypeV13 */
export interface StorageEntryTypeV13 extends Enum {
readonly isPlain: boolean;
readonly asPlain: Type;
readonly isMap: boolean;
readonly asMap: MapTypeV13;
readonly isDoubleMap: boolean;
readonly asDoubleMap: DoubleMapTypeV13;
readonly isNMap: boolean;
readonly asNMap: NMapTypeV13;
}
/** @name StorageEntryTypeV9 */
export interface StorageEntryTypeV9 extends Enum {
readonly isPlain: boolean;
@@ -342,7 +419,7 @@ export interface StorageEntryTypeV9 extends Enum {
}
/** @name StorageHasher */
export interface StorageHasher extends StorageHasherV12 {}
export interface StorageHasher extends StorageHasherV13 {}
/** @name StorageHasherV10 */
export interface StorageHasherV10 extends Enum {
@@ -368,6 +445,9 @@ export interface StorageHasherV11 extends Enum {
/** @name StorageHasherV12 */
export interface StorageHasherV12 extends StorageHasherV11 {}
/** @name StorageHasherV13 */
export interface StorageHasherV13 extends StorageHasherV12 {}
/** @name StorageHasherV9 */
export interface StorageHasherV9 extends Enum {
readonly isBlake2128: boolean;
@@ -378,7 +458,7 @@ export interface StorageHasherV9 extends Enum {
}
/** @name StorageMetadataLatest */
export interface StorageMetadataLatest extends StorageMetadataV12 {}
export interface StorageMetadataLatest extends StorageMetadataV13 {}
/** @name StorageMetadataV10 */
export interface StorageMetadataV10 extends Struct {
@@ -395,6 +475,12 @@ export interface StorageMetadataV11 extends Struct {
/** @name StorageMetadataV12 */
export interface StorageMetadataV12 extends StorageMetadataV11 {}
/** @name StorageMetadataV13 */
export interface StorageMetadataV13 extends Struct {
readonly prefix: Text;
readonly items: Vec<StorageEntryMetadataV13>;
}
/** @name StorageMetadataV9 */
export interface StorageMetadataV9 extends Struct {
readonly prefix: Text;
@@ -121,7 +121,8 @@ export default {
availabilityVotes: 'BitVec',
backers: 'BitVec',
relayParentNumber: 'BlockNumber',
backedInNumber: 'BlockNumber'
backedInNumber: 'BlockNumber',
backingGroup: 'GroupIndex'
},
CandidateReceipt: {
descriptor: 'CandidateDescriptor',
@@ -219,7 +220,7 @@ export default {
hrmpMaxParachainInboundChannels: 'u32',
hrmpMaxParathreadInboundChannels: 'u32',
hrmpChannelMaxMessageSize: 'u32',
acceptancePeriod: 'BlockNumber',
codeRetentionPeriod: 'BlockNumber',
parathreadCores: 'u32',
parathreadRetries: 'u32',
groupRotationFrequency: 'BlockNumber',
@@ -229,6 +230,9 @@ export default {
maxValidatorsPerCore: 'Option<u32>',
maxValidators: 'Option<u32>',
disputePeriod: 'SessionIndex',
disputePostConclusionAcceptancePeriod: 'BlockNumber',
disputeMaxSpamSlots: 'u32',
disputeConclusionByTimeOutPeriod: 'BlockNumber',
noShowSlots: 'u32',
nDelayTranches: 'u32',
zerothDelayTrancheWidth: 'u32',
@@ -310,8 +314,10 @@ export default {
relayParentStorageRoot: 'Hash',
maxPovSize: 'u32'
},
RelayChainBlockNumber: 'u32',
RelayChainHash: 'Hash',
RelayBlockNumber: 'u32',
RelayChainBlockNumber: 'RelayBlockNumber',
RelayHash: 'Hash',
RelayChainHash: 'RelayHash',
QueuedParathread: {
claim: 'ParathreadEntry',
coreOffset: 'u32'
@@ -132,6 +132,7 @@ export interface CandidatePendingAvailability extends Struct {
readonly backers: BitVec;
readonly relayParentNumber: BlockNumber;
readonly backedInNumber: BlockNumber;
readonly backingGroup: GroupIndex;
}
/** @name CandidateReceipt */
@@ -248,7 +249,7 @@ export interface HostConfiguration extends Struct {
readonly hrmpMaxParachainInboundChannels: u32;
readonly hrmpMaxParathreadInboundChannels: u32;
readonly hrmpChannelMaxMessageSize: u32;
readonly acceptancePeriod: BlockNumber;
readonly codeRetentionPeriod: BlockNumber;
readonly parathreadCores: u32;
readonly parathreadRetries: u32;
readonly groupRotationFrequency: BlockNumber;
@@ -258,6 +259,9 @@ export interface HostConfiguration extends Struct {
readonly maxValidatorsPerCore: Option<u32>;
readonly maxValidators: Option<u32>;
readonly disputePeriod: SessionIndex;
readonly disputePostConclusionAcceptancePeriod: BlockNumber;
readonly disputeMaxSpamSlots: u32;
readonly disputeConclusionByTimeOutPeriod: BlockNumber;
readonly noShowSlots: u32;
readonly nDelayTranches: u32;
readonly zerothDelayTrancheWidth: u32;
@@ -492,11 +496,17 @@ export interface RegisteredParachainInfo extends Struct {
readonly proposer: AccountId;
}
/** @name RelayBlockNumber */
export interface RelayBlockNumber extends u32 {}
/** @name RelayChainBlockNumber */
export interface RelayChainBlockNumber extends u32 {}
export interface RelayChainBlockNumber extends RelayBlockNumber {}
/** @name RelayChainHash */
export interface RelayChainHash extends Hash {}
export interface RelayChainHash extends RelayHash {}
/** @name RelayHash */
export interface RelayHash extends Hash {}
/** @name Remark */
export interface Remark extends U8aFixed {}
@@ -24,7 +24,7 @@ describe('Digest', (): void => {
expect(log.type).toBe('Consensus');
expect(log.value.toJSON()).toEqual([
1634891105,
'0x61757261',
'0x69c97e0f00000000479c09f7ace12ed3e1af2dba6cca6831e257e80feef56c7474d6c69bae6f4e8a6e0045a87afe14296992c38b7d55abcbe617c441cd35e8667abbcb1678f31802'
]);
});
@@ -42,6 +42,11 @@ export default {
digestInterval: 'u32',
digestLevels: 'u32'
},
ChangesTrieSignal: {
_enum: {
NewConfiguration: 'Option<ChangesTrieConfiguration>'
}
},
ConsensusEngineId: 'GenericConsensusEngineId',
CodecHash: 'Hash',
Digest: {
@@ -55,7 +60,8 @@ export default {
SealV0: 'SealV0', // 3
Consensus: 'Consensus', // 4
Seal: 'Seal', // 5
PreRuntime: 'PreRuntime' // 6
PreRuntime: 'PreRuntime', // 6
ChangesTrieSignal: 'ChangesTrieSignal' // 7
}
},
ExtrinsicsWeight: {
@@ -49,6 +49,12 @@ export interface ChangesTrieConfiguration extends Struct {
readonly digestLevels: u32;
}
/** @name ChangesTrieSignal */
export interface ChangesTrieSignal extends Enum {
readonly isNewConfiguration: boolean;
readonly asNewConfiguration: Option<ChangesTrieConfiguration>;
}
/** @name CodecHash */
export interface CodecHash extends Hash {}
@@ -79,6 +85,8 @@ export interface DigestItem extends Enum {
readonly asSeal: Seal;
readonly isPreRuntime: boolean;
readonly asPreRuntime: PreRuntime;
readonly isChangesTrieSignal: boolean;
readonly asChangesTrieSignal: ChangesTrieSignal;
}
/** @name EncodedJustification */
@@ -352,10 +352,51 @@ export default {
'unsubscribeStorage'
],
type: 'StorageChangeSet'
},
traceBlock: {
description: 'Provides a way to trace the re-execution of a single block',
params: [
{
name: 'block',
type: 'Hash'
},
{
name: 'targets',
type: 'Option<Text>'
},
{
name: 'storageKeys',
type: 'Option<Text>'
}
],
type: 'TraceBlockResponse'
}
},
types: {
ApiId: '[u8; 8]',
BlockTrace: {
blockHash: 'Text',
parentHash: 'Text',
tracingTargets: 'Text',
storageKeys: 'Text',
spans: 'Vec<BlockTraceSpan>',
events: 'Vec<BlockTraceEvent>'
},
BlockTraceEvent: {
target: 'Text',
data: 'BlockTraceEventData',
parentId: 'Option<u64>'
},
BlockTraceEventData: {
stringValues: 'HashMap<Text, Text>'
},
BlockTraceSpan: {
id: 'u64',
parentId: 'Option<u64>',
name: 'Text',
target: 'Text',
wasm: 'bool'
},
KeyValueOption: '(StorageKey, Option<StorageData>)',
ReadProof: {
at: 'Hash',
@@ -374,6 +415,15 @@ export default {
StorageChangeSet: {
block: 'Hash',
changes: 'Vec<KeyValueOption>'
},
TraceBlockResponse: {
_enum: {
TraceError: 'TraceError',
BlockTrace: 'BlockTrace'
}
},
TraceError: {
error: 'Text'
}
}
} as Definitions;
+45 -1
View File
@@ -1,13 +1,44 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
import type { Bytes, Option, StorageKey, Struct, Text, U8aFixed, Vec, u32 } from '@polkadot/types';
import type { Bytes, Enum, HashMap, Option, StorageKey, Struct, Text, U8aFixed, Vec, bool, u32, u64 } from '@polkadot/types';
import type { ITuple } from '@polkadot/types/types';
import type { Hash, StorageData } from '@polkadot/types/interfaces/runtime';
/** @name ApiId */
export interface ApiId extends U8aFixed {}
/** @name BlockTrace */
export interface BlockTrace extends Struct {
readonly blockHash: Text;
readonly parentHash: Text;
readonly tracingTargets: Text;
readonly storageKeys: Text;
readonly spans: Vec<BlockTraceSpan>;
readonly events: Vec<BlockTraceEvent>;
}
/** @name BlockTraceEvent */
export interface BlockTraceEvent extends Struct {
readonly target: Text;
readonly data: BlockTraceEventData;
readonly parentId: Option<u64>;
}
/** @name BlockTraceEventData */
export interface BlockTraceEventData extends Struct {
readonly stringValues: HashMap<Text, Text>;
}
/** @name BlockTraceSpan */
export interface BlockTraceSpan extends Struct {
readonly id: u64;
readonly parentId: Option<u64>;
readonly name: Text;
readonly target: Text;
readonly wasm: bool;
}
/** @name KeyValueOption */
export interface KeyValueOption extends ITuple<[StorageKey, Option<StorageData>]> {}
@@ -37,4 +68,17 @@ export interface StorageChangeSet extends Struct {
readonly changes: Vec<KeyValueOption>;
}
/** @name TraceBlockResponse */
export interface TraceBlockResponse extends Enum {
readonly isTraceError: boolean;
readonly asTraceError: TraceError;
readonly isBlockTrace: boolean;
readonly asBlockTrace: BlockTrace;
}
/** @name TraceError */
export interface TraceError extends Struct {
readonly error: Text;
}
export type PHANTOM_STATE = 'state';
@@ -107,6 +107,11 @@ export default {
],
type: 'Text'
},
reservedPeers: {
description: 'Returns the list of reserved peers',
params: [],
type: 'Vec<Text>'
},
nodeRoles: {
description: 'Returns the roles the node is running as',
params: [],
@@ -37,6 +37,9 @@ const xcm = {
RelayedFrom: 'XcmRelayedFrom'
}
},
XcmpMessageFormat: {
_enum: ['ConcatenatedVersionedXcm', 'ConcatenatedEncodedBlob', 'Signals']
},
VersionedXcm: {
_enum: {
V0: 'Xcm'
@@ -67,6 +70,12 @@ const xmcOrder = {
};
const multiAsset = {
InboundStatus: {
_enum: ['Ok', 'Suspended']
},
OutboundStatus: {
_enum: ['Ok', 'Suspended']
},
MultiAssetAbstractFungible: {
id: 'Vec<u8>',
instance: 'Compact<u128>'
@@ -236,6 +245,13 @@ export default {
Error: 'XcmError'
}
},
QueueConfigData: {
suspendThreshold: 'u32',
dropThreshold: 'u32',
resumeThreshold: 'u32',
thresholdWeight: 'Weight',
weightRestrictDecay: 'Weight'
},
VersionedMultiLocation: {
_enum: {
V0: 'MultiLocation'
@@ -97,6 +97,12 @@ export interface DoubleEncodedCall extends Struct {
readonly encoded: Bytes;
}
/** @name InboundStatus */
export interface InboundStatus extends Enum {
readonly isOk: boolean;
readonly isSuspended: boolean;
}
/** @name Junction */
export interface Junction extends Enum {
readonly isParent: boolean;
@@ -197,6 +203,12 @@ export interface NetworkId extends Enum {
readonly isKusama: boolean;
}
/** @name OutboundStatus */
export interface OutboundStatus extends Enum {
readonly isOk: boolean;
readonly isSuspended: boolean;
}
/** @name Outcome */
export interface Outcome extends Enum {
readonly isComplete: boolean;
@@ -213,6 +225,15 @@ export interface PluralityJunction extends Struct {
readonly part: BodyPart;
}
/** @name QueueConfigData */
export interface QueueConfigData extends Struct {
readonly suspendThreshold: u32;
readonly dropThreshold: u32;
readonly resumeThreshold: u32;
readonly thresholdWeight: Weight;
readonly weightRestrictDecay: Weight;
}
/** @name VersionedMultiAsset */
export interface VersionedMultiAsset extends Enum {
readonly isV0: boolean;
@@ -390,6 +411,13 @@ export interface XcmOriginKind extends Enum {
readonly isXcm: boolean;
}
/** @name XcmpMessageFormat */
export interface XcmpMessageFormat extends Enum {
readonly isConcatenatedVersionedXcm: boolean;
readonly isConcatenatedEncodedBlob: boolean;
readonly isSignals: boolean;
}
/** @name XcmQueryResponse */
export interface XcmQueryResponse extends Struct {
readonly queryId: Compact<u64>;
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/types', version: '4.8.1' };
export const packageInfo = { name: '@polkadot/types', version: '4.9.1' };
+16 -8
View File
@@ -8,9 +8,9 @@ import { assert, compactFromU8a, compactToU8a, isString, u8aConcat, u8aToU8a } f
import { Raw } from '../codec/Raw';
/** @internal */
function decodeBitVecU8a (value?: Uint8Array): Uint8Array {
function decodeBitVecU8a (value?: Uint8Array): [number, Uint8Array] {
if (!value || !value.length) {
return new Uint8Array();
return [0, new Uint8Array()];
}
// handle all other Uint8Array inputs, these do have a length prefix which is the number of bits encoded
@@ -19,13 +19,15 @@ function decodeBitVecU8a (value?: Uint8Array): Uint8Array {
assert(total <= value.length, () => `BitVec: required length less than remainder, expected at least ${total}, found ${value.length}`);
return value.subarray(offset, total);
return [length.toNumber(), value.subarray(offset, total)];
}
/** @internal */
function decodeBitVec (value?: AnyU8a): Uint8Array | undefined {
function decodeBitVec (value?: AnyU8a): [number, Uint8Array] {
if (Array.isArray(value) || isString(value)) {
return u8aToU8a(value);
const u8a = u8aToU8a(value);
return [u8a.length / 8, u8a];
}
return decodeBitVecU8a(value);
@@ -38,15 +40,21 @@ function decodeBitVec (value?: AnyU8a): Uint8Array | undefined {
* and a normal Bytes would be that the length prefix indicates the number of bits encoded, not the bytes
*/
export class BitVec extends Raw {
private readonly _decodedLength: number;
constructor (registry: Registry, value?: AnyU8a) {
super(registry, decodeBitVec(value));
const [decodedLength, u8a] = decodeBitVec(value);
super(registry, u8a);
this._decodedLength = decodedLength;
}
/**
* @description The length of the value when encoded as a Uint8Array
*/
public get encodedLength (): number {
return this.length + compactToU8a(this.bitLength()).length;
return this.length + compactToU8a(this._decodedLength).length;
}
public toHuman (): string {
@@ -69,6 +77,6 @@ export class BitVec extends Raw {
return isBare
? bitVec
: u8aConcat(compactToU8a(this.bitLength()), bitVec);
: u8aConcat(compactToU8a(this._decodedLength), bitVec);
}
}
+17 -9
View File
@@ -33,13 +33,15 @@ const HASHER_MAP: Record<keyof typeof AllHashers, [number, boolean]> = {
};
function getStorageType (type: StorageEntryTypeLatest): [boolean, string] {
if (type.isPlain) {
return [false, type.asPlain.toString()];
if (type.isMap) {
return [false, type.asMap.value.toString()];
} else if (type.isDoubleMap) {
return [false, type.asDoubleMap.value.toString()];
} else if (type.isNMap) {
return [false, type.asNMap.value.toString()];
}
return [false, type.asMap.value.toString()];
return [false, type.asPlain.toString()];
}
// we unwrap the type here, turning into an output usable for createType
@@ -105,7 +107,7 @@ function decodeHashers <A extends AnyTuple> (registry: Registry, value: Uint8Arr
/** @internal */
function decodeArgsFromMeta <A extends AnyTuple> (registry: Registry, value: Uint8Array, meta?: StorageEntryMetadataLatest): A {
if (!meta || !(meta.type.isDoubleMap || meta.type.isMap)) {
if (!meta || !(meta.type.isMap || meta.type.isDoubleMap || meta.type.isNMap)) {
return [] as unknown as A;
}
@@ -115,14 +117,20 @@ function decodeArgsFromMeta <A extends AnyTuple> (registry: Registry, value: Uin
return decodeHashers(registry, value, [
[mapInfo.hasher, mapInfo.key.toString()]
]);
} else if (meta.type.isDoubleMap) {
const mapInfo = meta.type.asDoubleMap;
return decodeHashers(registry, value, [
[mapInfo.hasher, mapInfo.key1.toString()],
[mapInfo.key2Hasher, mapInfo.key2.toString()]
]);
}
const mapInfo = meta.type.asDoubleMap;
const mapInfo = meta.type.asNMap;
return decodeHashers(registry, value, [
[mapInfo.hasher, mapInfo.key1.toString()],
[mapInfo.key2Hasher, mapInfo.key2.toString()]
]);
return decodeHashers(registry, value, mapInfo.hashers.map((h, i) =>
[h, mapInfo.keyVec[i].toString()]
));
}
/** @internal */
+2 -2
View File
@@ -9,8 +9,8 @@ import { Text } from './Text';
/**
* @name Type
* @description
* This is a extended version of String, specifically to handle types. Here we rely fully
* on what string provides us, however we also adjust the types received from the runtime,
* This is a extended version of Text, specifically to handle types. Here we rely fully
* on what Text provides us, however we also adjust the types received from the runtime,
* i.e. we remove the `T::` prefixes found in some types for consistency across implementation.
*/
export class Type extends Text {
+140 -133
View File
@@ -799,14 +799,14 @@ __metadata:
languageName: node
linkType: hard
"@babel/plugin-transform-block-scoping@npm:^7.13.16":
version: 7.13.16
resolution: "@babel/plugin-transform-block-scoping@npm:7.13.16"
"@babel/plugin-transform-block-scoping@npm:^7.14.1":
version: 7.14.1
resolution: "@babel/plugin-transform-block-scoping@npm:7.14.1"
dependencies:
"@babel/helper-plugin-utils": ^7.13.0
peerDependencies:
"@babel/core": ^7.0.0-0
checksum: 4ada80ee426255e0ab75e6bf816477ecbcbef225d9110ba07b09addeae9addad1765541c405d711678f3ea7a926e26e2e6796c7f5d1d7ca7ef8b5e25080cfe58
checksum: 33b12be483e61dbadf604f5dca3437d5a1742696afe2088eb4f72f0d911906274c345e7bedbc28b1ba00a573b04d363cf86407f46e352487252089499801c4b6
languageName: node
linkType: hard
@@ -1218,9 +1218,9 @@ __metadata:
languageName: node
linkType: hard
"@babel/preset-env@npm:^7.14.0":
version: 7.14.0
resolution: "@babel/preset-env@npm:7.14.0"
"@babel/preset-env@npm:^7.14.1":
version: 7.14.1
resolution: "@babel/preset-env@npm:7.14.1"
dependencies:
"@babel/compat-data": ^7.14.0
"@babel/helper-compilation-targets": ^7.13.16
@@ -1259,7 +1259,7 @@ __metadata:
"@babel/plugin-transform-arrow-functions": ^7.13.0
"@babel/plugin-transform-async-to-generator": ^7.13.0
"@babel/plugin-transform-block-scoped-functions": ^7.12.13
"@babel/plugin-transform-block-scoping": ^7.13.16
"@babel/plugin-transform-block-scoping": ^7.14.1
"@babel/plugin-transform-classes": ^7.13.0
"@babel/plugin-transform-computed-properties": ^7.13.0
"@babel/plugin-transform-destructuring": ^7.13.17
@@ -1289,7 +1289,7 @@ __metadata:
"@babel/plugin-transform-unicode-escapes": ^7.12.13
"@babel/plugin-transform-unicode-regex": ^7.12.13
"@babel/preset-modules": ^0.1.4
"@babel/types": ^7.14.0
"@babel/types": ^7.14.1
babel-plugin-polyfill-corejs2: ^0.2.0
babel-plugin-polyfill-corejs3: ^0.2.0
babel-plugin-polyfill-regenerator: ^0.2.0
@@ -1297,7 +1297,7 @@ __metadata:
semver: ^6.3.0
peerDependencies:
"@babel/core": ^7.0.0-0
checksum: 4bfbcbf9f5c8a632554f72d55071ab906d915c5eada2d079fbc3a521078d1f3c003fab4aa350af913e9260fdf3bacab3ab9f8bcb3d4add604868a211f5469c32
checksum: 0fbef490fdd5435727268c729e0371ec8ec95349e5a00f919ba0c142e06d95c48512fec10d6404c89c297c597ae1c45a687fa40eec33e70b97131b0c4b5355c0
languageName: node
linkType: hard
@@ -1396,13 +1396,13 @@ __metadata:
languageName: node
linkType: hard
"@babel/types@npm:^7.0.0, @babel/types@npm:^7.12.1, @babel/types@npm:^7.12.13, @babel/types@npm:^7.13.0, @babel/types@npm:^7.13.12, @babel/types@npm:^7.14.0, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3":
version: 7.14.0
resolution: "@babel/types@npm:7.14.0"
"@babel/types@npm:^7.0.0, @babel/types@npm:^7.12.1, @babel/types@npm:^7.12.13, @babel/types@npm:^7.13.0, @babel/types@npm:^7.13.12, @babel/types@npm:^7.14.0, @babel/types@npm:^7.14.1, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3":
version: 7.14.1
resolution: "@babel/types@npm:7.14.1"
dependencies:
"@babel/helper-validator-identifier": ^7.14.0
to-fast-properties: ^2.0.0
checksum: 145b37e3779e8462e3b234b47f539cf2fcb29cf85bc21a96997969f75798dd8144cb8c14973fbfdf9a30410607dee19d4e240f2c4b8691867f9fe59cf708859f
checksum: 27965ef192ded329d8ae28ccd5e5addd02dc477ec46e54145e5cf0d054ad65b2fc760736865295c1819d502ec9598883c17f25efdbe896ad77b400136a1aa971
languageName: node
linkType: hard
@@ -1841,24 +1841,24 @@ __metadata:
resolution: "@polkadot/api-contract@workspace:packages/api-contract"
dependencies:
"@babel/runtime": ^7.14.0
"@polkadot/api": 4.8.1
"@polkadot/types": 4.8.1
"@polkadot/api": 4.9.1
"@polkadot/types": 4.9.1
"@polkadot/util": ^6.3.1
"@polkadot/x-rxjs": ^6.3.1
bn.js: ^4.11.9
languageName: unknown
linkType: soft
"@polkadot/api-derive@4.8.1, @polkadot/api-derive@workspace:packages/api-derive":
"@polkadot/api-derive@4.9.1, @polkadot/api-derive@workspace:packages/api-derive":
version: 0.0.0-use.local
resolution: "@polkadot/api-derive@workspace:packages/api-derive"
dependencies:
"@babel/runtime": ^7.14.0
"@polkadot/api": 4.8.1
"@polkadot/api": 4.9.1
"@polkadot/keyring": ^6.3.1
"@polkadot/rpc-core": 4.8.1
"@polkadot/rpc-provider": 4.8.1
"@polkadot/types": 4.8.1
"@polkadot/rpc-core": 4.9.1
"@polkadot/rpc-provider": 4.9.1
"@polkadot/types": 4.9.1
"@polkadot/util": ^6.3.1
"@polkadot/util-crypto": ^6.3.1
"@polkadot/x-rxjs": ^6.3.1
@@ -1866,18 +1866,18 @@ __metadata:
languageName: unknown
linkType: soft
"@polkadot/api@4.8.1, @polkadot/api@workspace:packages/api":
"@polkadot/api@4.9.1, @polkadot/api@workspace:packages/api":
version: 0.0.0-use.local
resolution: "@polkadot/api@workspace:packages/api"
dependencies:
"@babel/runtime": ^7.14.0
"@polkadot/api-derive": 4.8.1
"@polkadot/api-derive": 4.9.1
"@polkadot/keyring": ^6.3.1
"@polkadot/metadata": 4.8.1
"@polkadot/rpc-core": 4.8.1
"@polkadot/rpc-provider": 4.8.1
"@polkadot/types": 4.8.1
"@polkadot/types-known": 4.8.1
"@polkadot/metadata": 4.9.1
"@polkadot/rpc-core": 4.9.1
"@polkadot/rpc-provider": 4.9.1
"@polkadot/types": 4.9.1
"@polkadot/types-known": 4.9.1
"@polkadot/util": ^6.3.1
"@polkadot/util-crypto": ^6.3.1
"@polkadot/x-rxjs": ^6.3.1
@@ -1886,9 +1886,9 @@ __metadata:
languageName: unknown
linkType: soft
"@polkadot/dev@npm:^0.62.11":
version: 0.62.11
resolution: "@polkadot/dev@npm:0.62.11"
"@polkadot/dev@npm:^0.62.12":
version: 0.62.12
resolution: "@polkadot/dev@npm:0.62.12"
dependencies:
"@babel/cli": ^7.13.16
"@babel/core": ^7.14.0
@@ -1904,20 +1904,20 @@ __metadata:
"@babel/plugin-syntax-top-level-await": ^7.12.13
"@babel/plugin-transform-regenerator": ^7.13.15
"@babel/plugin-transform-runtime": ^7.13.15
"@babel/preset-env": ^7.14.0
"@babel/preset-env": ^7.14.1
"@babel/preset-react": ^7.13.13
"@babel/preset-typescript": ^7.13.0
"@babel/register": ^7.13.16
"@babel/runtime": ^7.14.0
"@rushstack/eslint-patch": ^1.0.6
"@typescript-eslint/eslint-plugin": 4.22.0
"@typescript-eslint/parser": 4.22.0
"@typescript-eslint/eslint-plugin": 4.22.1
"@typescript-eslint/parser": 4.22.1
"@vue/component-compiler-utils": ^3.2.0
babel-jest: ^26.6.3
babel-plugin-module-extension-resolver: ^1.0.0-rc.2
babel-plugin-module-resolver: ^4.1.0
babel-plugin-styled-components: ^1.12.0
browserslist: ^4.16.5
browserslist: ^4.16.6
chalk: ^4.1.1
coveralls: ^3.1.0
eslint: ^7.25.0
@@ -1931,7 +1931,7 @@ __metadata:
eslint-plugin-react-hooks: ^4.2.0
eslint-plugin-simple-import-sort: ^7.0.0
eslint-plugin-sort-destructure-keys: ^1.3.5
fs-extra: ^9.1.0
fs-extra: ^10.0.0
gh-pages: ^3.1.0
gh-release: ^5.0.0
glob: ^7.1.6
@@ -1947,7 +1947,7 @@ __metadata:
prettier: ^2.2.1
rimraf: ^3.0.2
typescript: ^4.2.4
yargs: ^16.2.0
yargs: ^17.0.1
bin:
polkadot-ci-ghact-build: scripts/polkadot-ci-ghact-build.cjs
polkadot-ci-ghact-docs: scripts/polkadot-ci-ghact-docs.cjs
@@ -1968,7 +1968,7 @@ __metadata:
polkadot-exec-prettier: scripts/polkadot-exec-prettier.cjs
polkadot-exec-tsc: scripts/polkadot-exec-tsc.cjs
polkadot-exec-webpack: scripts/polkadot-exec-webpack.cjs
checksum: a6c735c3ad62d4b4cd0fccc27ffe692a39f6b920f667f0e6819964ebc2679a245cc6b7d0b9aabc3157bc9c376bf3fc5cf10deeea6ada952af96dc6a982819fa7
checksum: a2cb11fadb41e2419a099886b211a28a986da7c239f50174f5211d71d44d07b7269ea334dddc8fd6066603a405955e2e2f0c438b32507764fea6f9d9d5d1688b
languageName: node
linkType: hard
@@ -1986,14 +1986,14 @@ __metadata:
languageName: node
linkType: hard
"@polkadot/metadata@4.8.1, @polkadot/metadata@workspace:packages/metadata":
"@polkadot/metadata@4.9.1, @polkadot/metadata@workspace:packages/metadata":
version: 0.0.0-use.local
resolution: "@polkadot/metadata@workspace:packages/metadata"
dependencies:
"@babel/runtime": ^7.14.0
"@polkadot/keyring": ^6.3.1
"@polkadot/types": 4.8.1
"@polkadot/types-known": 4.8.1
"@polkadot/types": 4.9.1
"@polkadot/types-known": 4.9.1
"@polkadot/util": ^6.3.1
"@polkadot/util-crypto": ^6.3.1
bn.js: ^4.11.9
@@ -2009,28 +2009,28 @@ __metadata:
languageName: node
linkType: hard
"@polkadot/rpc-core@4.8.1, @polkadot/rpc-core@workspace:packages/rpc-core":
"@polkadot/rpc-core@4.9.1, @polkadot/rpc-core@workspace:packages/rpc-core":
version: 0.0.0-use.local
resolution: "@polkadot/rpc-core@workspace:packages/rpc-core"
dependencies:
"@babel/runtime": ^7.14.0
"@polkadot/keyring": ^6.3.1
"@polkadot/metadata": 4.8.1
"@polkadot/rpc-provider": 4.8.1
"@polkadot/types": 4.8.1
"@polkadot/metadata": 4.9.1
"@polkadot/rpc-provider": 4.9.1
"@polkadot/types": 4.9.1
"@polkadot/util": ^6.3.1
"@polkadot/x-rxjs": ^6.3.1
languageName: unknown
linkType: soft
"@polkadot/rpc-provider@4.8.1, @polkadot/rpc-provider@workspace:packages/rpc-provider":
"@polkadot/rpc-provider@4.9.1, @polkadot/rpc-provider@workspace:packages/rpc-provider":
version: 0.0.0-use.local
resolution: "@polkadot/rpc-provider@workspace:packages/rpc-provider"
dependencies:
"@babel/runtime": ^7.14.0
"@polkadot/keyring": ^6.3.1
"@polkadot/metadata": 4.8.1
"@polkadot/types": 4.8.1
"@polkadot/metadata": 4.9.1
"@polkadot/types": 4.9.1
"@polkadot/util": ^6.3.1
"@polkadot/util-crypto": ^6.3.1
"@polkadot/x-fetch": ^6.3.1
@@ -2059,16 +2059,16 @@ __metadata:
"@babel/core": ^7.14.0
"@babel/register": ^7.13.16
"@babel/runtime": ^7.14.0
"@polkadot/api": 4.8.1
"@polkadot/metadata": 4.8.1
"@polkadot/rpc-provider": 4.8.1
"@polkadot/types": 4.8.1
"@polkadot/api": 4.9.1
"@polkadot/metadata": 4.9.1
"@polkadot/rpc-provider": 4.9.1
"@polkadot/types": 4.9.1
"@polkadot/util": ^6.3.1
"@types/websocket": ^1.0.2
"@types/yargs": ^16.0.1
handlebars: ^4.7.7
websocket: ^1.0.34
yargs: ^16.2.0
yargs: ^17.0.1
bin:
polkadot-types-chain-info: ./scripts/polkadot-types-chain-info.cjs
polkadot-types-from-chain: ./scripts/polkadot-types-from-chain.cjs
@@ -2078,26 +2078,26 @@ __metadata:
languageName: unknown
linkType: soft
"@polkadot/types-known@4.8.1, @polkadot/types-known@workspace:packages/types-known":
"@polkadot/types-known@4.9.1, @polkadot/types-known@workspace:packages/types-known":
version: 0.0.0-use.local
resolution: "@polkadot/types-known@workspace:packages/types-known"
dependencies:
"@babel/runtime": ^7.14.0
"@polkadot/networks": ^6.3.1
"@polkadot/types": 4.8.1
"@polkadot/types": 4.9.1
"@polkadot/util": ^6.3.1
"@types/bn.js": ^4.11.6
bn.js: ^4.11.9
languageName: unknown
linkType: soft
"@polkadot/types@4.8.1, @polkadot/types@workspace:packages/types":
"@polkadot/types@4.9.1, @polkadot/types@workspace:packages/types":
version: 0.0.0-use.local
resolution: "@polkadot/types@workspace:packages/types"
dependencies:
"@babel/runtime": ^7.14.0
"@polkadot/keyring": ^6.3.1
"@polkadot/metadata": 4.8.1
"@polkadot/metadata": 4.9.1
"@polkadot/util": ^6.3.1
"@polkadot/util-crypto": ^6.3.1
"@polkadot/x-rxjs": ^6.3.1
@@ -2526,12 +2526,12 @@ __metadata:
languageName: node
linkType: hard
"@typescript-eslint/eslint-plugin@npm:4.22.0":
version: 4.22.0
resolution: "@typescript-eslint/eslint-plugin@npm:4.22.0"
"@typescript-eslint/eslint-plugin@npm:4.22.1":
version: 4.22.1
resolution: "@typescript-eslint/eslint-plugin@npm:4.22.1"
dependencies:
"@typescript-eslint/experimental-utils": 4.22.0
"@typescript-eslint/scope-manager": 4.22.0
"@typescript-eslint/experimental-utils": 4.22.1
"@typescript-eslint/scope-manager": 4.22.1
debug: ^4.1.1
functional-red-black-tree: ^1.0.1
lodash: ^4.17.15
@@ -2544,66 +2544,66 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
checksum: 40485bbf51283616b5098b33fa5285104a80419c4dcf75659442ae780352289bc238a64591939012ebc47823485497ae6ba8a35e653b0e33ff7f58743b46c34e
checksum: 6b3384e155583779285089e83b85a38f6c6965e6529b7b6bdcf630122164981c30139468d19fade482b7b45f007f9cd83b9c8c54eca385c8f0d6269bac2138be
languageName: node
linkType: hard
"@typescript-eslint/experimental-utils@npm:4.22.0":
version: 4.22.0
resolution: "@typescript-eslint/experimental-utils@npm:4.22.0"
"@typescript-eslint/experimental-utils@npm:4.22.1":
version: 4.22.1
resolution: "@typescript-eslint/experimental-utils@npm:4.22.1"
dependencies:
"@types/json-schema": ^7.0.3
"@typescript-eslint/scope-manager": 4.22.0
"@typescript-eslint/types": 4.22.0
"@typescript-eslint/typescript-estree": 4.22.0
"@typescript-eslint/scope-manager": 4.22.1
"@typescript-eslint/types": 4.22.1
"@typescript-eslint/typescript-estree": 4.22.1
eslint-scope: ^5.0.0
eslint-utils: ^2.0.0
peerDependencies:
eslint: "*"
checksum: afabf0d6f9e70b910575d8bc2e8ccd3416e8d05ed968296fc56379f71f8cf3a27107598b98f7c76a91e6b0be796dc102c866381a3af5bf24799a333532d1e997
checksum: ddea7a1af501e0ba2a551de68e436c6f65e8ec5d68bff4f00a71ffeba8b73160f30f92de5dbdf01dcfd3f3bf5ab1ea18fe00dbd6401a256b2960c60cf475aa29
languageName: node
linkType: hard
"@typescript-eslint/parser@npm:4.22.0":
version: 4.22.0
resolution: "@typescript-eslint/parser@npm:4.22.0"
"@typescript-eslint/parser@npm:4.22.1":
version: 4.22.1
resolution: "@typescript-eslint/parser@npm:4.22.1"
dependencies:
"@typescript-eslint/scope-manager": 4.22.0
"@typescript-eslint/types": 4.22.0
"@typescript-eslint/typescript-estree": 4.22.0
"@typescript-eslint/scope-manager": 4.22.1
"@typescript-eslint/types": 4.22.1
"@typescript-eslint/typescript-estree": 4.22.1
debug: ^4.1.1
peerDependencies:
eslint: ^5.0.0 || ^6.0.0 || ^7.0.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 679e14a5cec5bae3b392b1736f5d919897fd1a269a9d25366babfd12c1d275b320ae36a0b8be215ba14780cb1feec2b386001b4e0225ef82bd0040bf5dbaf99f
checksum: ff57b68f83c984d146a00ad122f2e4bdf53649380e125f1764b66dce3bb7418c96729499987301c3daad2856c1a3a04f897c33cf36a9d7e48ddb8848ee608d74
languageName: node
linkType: hard
"@typescript-eslint/scope-manager@npm:4.22.0":
version: 4.22.0
resolution: "@typescript-eslint/scope-manager@npm:4.22.0"
"@typescript-eslint/scope-manager@npm:4.22.1":
version: 4.22.1
resolution: "@typescript-eslint/scope-manager@npm:4.22.1"
dependencies:
"@typescript-eslint/types": 4.22.0
"@typescript-eslint/visitor-keys": 4.22.0
checksum: c6f5565f517373cba61d29be919c69ad0e178f2a007eed6f1d8f80518853c3c4e6a3a059e492920b71675f0828e093eb36ec9eef318b9e2b4e9e65b0e93f03b6
"@typescript-eslint/types": 4.22.1
"@typescript-eslint/visitor-keys": 4.22.1
checksum: 3309e33e8d8ad2ac5531a12055553817123346e63b64a77a67e429a3574c13334576dc9f11c632d9f01aa2ba07dfdc5d0840f90130fa9a764e10e0125c4f662b
languageName: node
linkType: hard
"@typescript-eslint/types@npm:4.22.0":
version: 4.22.0
resolution: "@typescript-eslint/types@npm:4.22.0"
checksum: db2717132540feba39b002cdb2483aa822e0b50c17f9deff918a52609178df071444188a1e76c07c51018c353b01509dd741272b6d482edf7d9e7d60adc6c70e
"@typescript-eslint/types@npm:4.22.1":
version: 4.22.1
resolution: "@typescript-eslint/types@npm:4.22.1"
checksum: ce4e0673bff31ac2b75319aeaa9feffd4dd0a6cce7f335c50bcd654aa96774d168c14903990e905c7515b0df0974b050edc328d7866d329f8379b552f525cac5
languageName: node
linkType: hard
"@typescript-eslint/typescript-estree@npm:4.22.0, @typescript-eslint/typescript-estree@npm:^4.8.2":
version: 4.22.0
resolution: "@typescript-eslint/typescript-estree@npm:4.22.0"
"@typescript-eslint/typescript-estree@npm:4.22.1, @typescript-eslint/typescript-estree@npm:^4.8.2":
version: 4.22.1
resolution: "@typescript-eslint/typescript-estree@npm:4.22.1"
dependencies:
"@typescript-eslint/types": 4.22.0
"@typescript-eslint/visitor-keys": 4.22.0
"@typescript-eslint/types": 4.22.1
"@typescript-eslint/visitor-keys": 4.22.1
debug: ^4.1.1
globby: ^11.0.1
is-glob: ^4.0.1
@@ -2612,17 +2612,17 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
checksum: 538d932361d1463c9450c155fc5696f4cc1a07db2bfd4ca9079e1f919e5062fd95d8dc128fc2fa8368c9582787cfc97ee6284083b94fe8d580cd1a9fca688efa
checksum: 7de4827b870324e668ec84fc2b40c76465e72bdec6b8eb47ca493378d9c81e0d76bb3c5d4396400c70254c6fd2d57c81bde1236fe760d698d20ead80a295ffc4
languageName: node
linkType: hard
"@typescript-eslint/visitor-keys@npm:4.22.0":
version: 4.22.0
resolution: "@typescript-eslint/visitor-keys@npm:4.22.0"
"@typescript-eslint/visitor-keys@npm:4.22.1":
version: 4.22.1
resolution: "@typescript-eslint/visitor-keys@npm:4.22.1"
dependencies:
"@typescript-eslint/types": 4.22.0
"@typescript-eslint/types": 4.22.1
eslint-visitor-keys: ^2.0.0
checksum: 645896d05aa757fac02d952574ecda0eecd0be120162e28533c4528bb70d2162e9df62c3547217c69f18a72ceecaf212ea585afd20f976db64b59ac6de0d1ec8
checksum: b696851b5b7383368c29136374119ba53b39ca6f239899b00cd914c301c6c223c2e99541a6bb94f039511c160cc737b2773a2dc4fb8c817e2b079d0df12a0b94
languageName: node
linkType: hard
@@ -3015,13 +3015,6 @@ __metadata:
languageName: node
linkType: hard
"at-least-node@npm:^1.0.0":
version: 1.0.0
resolution: "at-least-node@npm:1.0.0"
checksum: 8f33efc16287ed39766065c718a2d36a469f702c66c6eb41fa460c0c62bca395301a6a02946e315ae4a84c9cc7f44c94ec73a556bc2a1049350da98d0b013afe
languageName: node
linkType: hard
"atob@npm:^2.1.2":
version: 2.1.2
resolution: "atob@npm:2.1.2"
@@ -3375,18 +3368,18 @@ __metadata:
languageName: node
linkType: hard
"browserslist@npm:^4.14.5, browserslist@npm:^4.16.3, browserslist@npm:^4.16.5":
version: 4.16.5
resolution: "browserslist@npm:4.16.5"
"browserslist@npm:^4.14.5, browserslist@npm:^4.16.3, browserslist@npm:^4.16.6":
version: 4.16.6
resolution: "browserslist@npm:4.16.6"
dependencies:
caniuse-lite: ^1.0.30001214
caniuse-lite: ^1.0.30001219
colorette: ^1.2.2
electron-to-chromium: ^1.3.719
electron-to-chromium: ^1.3.723
escalade: ^3.1.1
node-releases: ^1.1.71
bin:
browserslist: cli.js
checksum: ea06cb8262a69d1479ab2c288eb939250ea0a6b172a181ce7ce9410f1ee29701095c8c13bd575b70baead87743866471814f8c0247c9785b229b04bef399e4c8
checksum: ebb0ab279c5e61f882467f7ccd7d22c0edfcc01201eba06e85e835ca4d355e682f9aa3310bfa18c3a23bb244f0b8e498b3113dae3e9b0fa4908c5ffb4a26b3a2
languageName: node
linkType: hard
@@ -3489,10 +3482,10 @@ __metadata:
languageName: node
linkType: hard
"caniuse-lite@npm:^1.0.30001214":
version: 1.0.30001214
resolution: "caniuse-lite@npm:1.0.30001214"
checksum: 96c09af8989fe03e6aa0cc0130be3392c4a871093f0ae7190cb1185862a63b54de14483561578564d034cf993c315d4939727badee39ed76144e94ae4ab2a0f7
"caniuse-lite@npm:^1.0.30001219":
version: 1.0.30001223
resolution: "caniuse-lite@npm:1.0.30001223"
checksum: 0a19e4c3689048cf7f6a47d348cc6dc849a141ae814634cc2c9b37a91dc5ba019c08d67ddf3549323ae4b13c84cb2a796204128bcd19f0dbbe844dab0058b25e
languageName: node
linkType: hard
@@ -4440,10 +4433,10 @@ __metadata:
languageName: node
linkType: hard
"electron-to-chromium@npm:^1.3.719":
version: 1.3.720
resolution: "electron-to-chromium@npm:1.3.720"
checksum: 51bb3720af1ffe2ac04e0760f4cdcf319c2e371625e7ed9e433ee962c1c7ae09e65b44afbe7ddf5c71dc9a01583c8e0015ff04b86f0222ed7cc5b5871494078d
"electron-to-chromium@npm:^1.3.723":
version: 1.3.727
resolution: "electron-to-chromium@npm:1.3.727"
checksum: a090f19d382d78a5e22d1ccd656336c341ddd878fe0675613b53c24c12d0edbb8fe07e41ab5c42d49584617f3ece1650c20b2dceaaa3a1b583922fdf2b132b6b
languageName: node
linkType: hard
@@ -5377,6 +5370,17 @@ __metadata:
languageName: node
linkType: hard
"fs-extra@npm:^10.0.0":
version: 10.0.0
resolution: "fs-extra@npm:10.0.0"
dependencies:
graceful-fs: ^4.2.0
jsonfile: ^6.0.1
universalify: ^2.0.0
checksum: 84632d143fe3125b8c3c2b1fedbbdfcfb84fc3e087522b4e138cc07edf574619925713a6609f6d5e53ede2e31ab319c7d528ea4a4a770ba6622a16bf4447cd8b
languageName: node
linkType: hard
"fs-extra@npm:^8.1.0":
version: 8.1.0
resolution: "fs-extra@npm:8.1.0"
@@ -5388,18 +5392,6 @@ __metadata:
languageName: node
linkType: hard
"fs-extra@npm:^9.1.0":
version: 9.1.0
resolution: "fs-extra@npm:9.1.0"
dependencies:
at-least-node: ^1.0.0
graceful-fs: ^4.2.0
jsonfile: ^6.0.1
universalify: ^2.0.0
checksum: e667d8df54113b527bf5830dd9db8f142618db488894b329fe07724c7020dfacf8a372b144a74e683ae44e66f56117adca9cac165950dda7d83537c46c10dc4b
languageName: node
linkType: hard
"fs-minipass@npm:^2.0.0":
version: 2.1.0
resolution: "fs-minipass@npm:2.1.0"
@@ -9495,7 +9487,7 @@ resolve@^2.0.0-next.3:
"@babel/core": ^7.14.0
"@babel/register": ^7.13.16
"@babel/runtime": ^7.14.0
"@polkadot/dev": ^0.62.11
"@polkadot/dev": ^0.62.12
"@polkadot/ts": ^0.3.64
"@polkadot/typegen": "workspace:packages/typegen"
"@types/jest": ^26.0.23
@@ -11297,7 +11289,7 @@ resolve@^2.0.0-next.3:
languageName: node
linkType: hard
"yargs@npm:^16.0.3, yargs@npm:^16.1.0, yargs@npm:^16.2.0":
"yargs@npm:^16.0.3, yargs@npm:^16.1.0":
version: 16.2.0
resolution: "yargs@npm:16.2.0"
dependencies:
@@ -11311,3 +11303,18 @@ resolve@^2.0.0-next.3:
checksum: a79ce1f043021cd645de1ffebb6149541d382ba68f4a6b5eca5d2ad65af51893371bbd78e240dc3b6cf0cbb419511ba5bda715dec992e4266e6863ea49f14feb
languageName: node
linkType: hard
"yargs@npm:^17.0.1":
version: 17.0.1
resolution: "yargs@npm:17.0.1"
dependencies:
cliui: ^7.0.2
escalade: ^3.1.1
get-caller-file: ^2.0.5
require-directory: ^2.1.1
string-width: ^4.2.0
y18n: ^5.0.5
yargs-parser: ^20.2.2
checksum: a7969b48d2dea129a7d4fcc3f13e88d4f94bacbd24f720b2ce19946fa9facc42cfed89c059d953091241f4e9e9000ed9dbf86e4bb4b6ceb3a26af10ddebdd0b2
languageName: node
linkType: hard