Compare commits

...
28 Commits
Author SHA1 Message Date
github-actions[bot] 17357f6b99 [CI Skip] release/stable 7.10.1
skip-checks: true
2022-02-27 08:04:03 +00:00
Jaco c596a8cb51 7.10.1 (#4609) 2022-02-27 09:42:16 +02:00
github-actions[bot] bdf13b10e5 [CI Skip] release/beta 7.9.2-12
skip-checks: true
2022-02-27 07:15:02 +00:00
coolcorexixandphat.itern 519a12f19a Investigate 4559 v2 (#4608)
* first build

* second build, area of defect found

* third build, fixed the problem successfully

* cleaning up after receving maintainer's response

Co-authored-by: phat.itern <phatNfqAsia>
2022-02-27 08:50:54 +02:00
github-actions[bot] beffc7b754 [CI Skip] release/beta 7.9.2-11
skip-checks: true
2022-02-26 08:51:00 +00:00
Jaco d5ae7031cd Metadata bump (#4606)
* Metadata bump

* Detect BitSequence order

* Adjust
2022-02-26 10:29:41 +02:00
github-actions[bot] 8aff13b827 [CI Skip] release/beta 7.9.2-10
skip-checks: true
2022-02-25 11:03:13 +00:00
Jaco a23b3f953b Retrieve named reserves (#4602) 2022-02-25 12:40:35 +02:00
github-actions[bot] 1249c46019 [CI Skip] release/beta 7.9.2-9
skip-checks: true
2022-02-24 18:44:58 +00:00
Jaco 2aaf52bb92 Use assertUnreachable from @polkadot/util (#4600) 2022-02-24 18:28:34 +00:00
github-actions[bot] 3372898f82 [CI Skip] release/beta 7.9.2-8
skip-checks: true
2022-02-24 06:38:41 +00:00
Jacoandmergify[bot] ed2f512cfc Don't auto-attach lookup to registry (#4599)
* Don't auto-attach lookup to registry

* CHANGELOG

* Add base u* types

* s/compatTypes/specs/

* CHANGELOG

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-24 06:31:06 +00:00
github-actions[bot] 00147df500 [CI Skip] release/beta 7.9.2-7
skip-checks: true
2022-02-24 05:52:26 +00:00
Jacoandmergify[bot] 3b0c8887d7 Add chain.getBlockByNumber (#4598)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-24 05:42:58 +00:00
github-actions[bot] 16452233b2 [CI Skip] release/beta 7.9.2-6
skip-checks: true
2022-02-23 10:43:52 +00:00
Jaco 5bf87262bc Skip job on non-local repo 2022-02-23 12:33:41 +02:00
github-actions[bot] b8e01fd674 [CI Skip] release/beta 7.9.2-5
skip-checks: true
2022-02-23 10:09:24 +00:00
Jaco f8378ba0f7 Use jacogr/action-approve (#4595) 2022-02-23 12:00:15 +02:00
github-actions[bot] afc105400c [CI Skip] release/beta 7.9.2-4
skip-checks: true
2022-02-22 17:27:21 +00:00
Jaco cca1f10563 XcmV2TraitsOutcome test (#4593)
* XcmV2TraitsOutcome test

* Cleanup build with correct references
2022-02-22 17:19:28 +00:00
github-actions[bot] 6cdbbf5372 [CI Skip] release/beta 7.9.2-3
skip-checks: true
2022-02-22 10:06:24 +00:00
Jaco 8c89732eb7 Decoded storage hashers with primary lookup (#4591) 2022-02-22 09:58:36 +00:00
github-actions[bot] ab3ad6b2ca [CI Skip] release/beta 7.9.2-2
skip-checks: true
2022-02-22 09:01:10 +00:00
Jaco 72f427a250 Map initialU8aLength test (#4590) 2022-02-22 08:51:40 +00:00
github-actions[bot] 5b0bd9d4b7 [CI Skip] release/beta 7.9.2-1
skip-checks: true
2022-02-21 18:14:49 +00:00
Jacoandmergify[bot] cd9662ab4c Ensure BTreeSet has the correct decoded length (#4588)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-21 18:07:11 +00:00
github-actions[bot] 13751b6fdf [CI Skip] release/beta 7.9.2-0
skip-checks: true
2022-02-21 10:38:39 +00:00
Jaco 652f8c28a4 Bump dev (#4585) 2022-02-21 10:30:49 +00:00
70 changed files with 711 additions and 482 deletions
-9
View File
@@ -23,12 +23,3 @@ pull_request_rules:
queue:
name: default
method: squash
- name: auto approval
conditions:
- author~=^jacogr$
- label=automerge
actions:
review:
type: APPROVE
message: This auto-approval rule should be removed once more JS maintainers are active.
+15
View File
@@ -0,0 +1,15 @@
name: PR
on: pull_request
jobs:
auto-approve:
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && (!github.event.pull_request || github.event.pull_request.head.repo.full_name == github.repository)"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: jacogr/action-approve@master
with:
authors: jacogr
labels: automerge
token: ${{ secrets.GH_PAT_BOT }}
+16
View File
@@ -1,5 +1,21 @@
# CHANGELOG
## 7.10.1 Feb 27, 2022
Contributed:
- Ensure `updateId` is correct in signer callbacks (Thanks to https://github.com/coolcorexix)
Changes:
- Ensure `BTreeSet` has the correct decoded length
- Attach `PortableRegistry` at point of metadata set
- Add `derive.chain.getBlockByNumber`
- Retrieve named reserves in `derive.balances.all`
- Ensure `v13 -> v14` metadata conversion attaches primitives
- Update to latest Substrate, Kusama & Polkadot static metadata
## 7.9.1 Feb 20, 2022
Contributed:
+2 -1
View File
@@ -1,4 +1,4 @@
2830 Jaco 7.9.1 (#4580)
2843 Jaco 7.10.1 (#4609)
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
37 Keith Ingram Update contract types and rpc (#4541)
35 Stefanie Doll Updated child storage parameters (#1709)
@@ -43,6 +43,7 @@
1 Brad Larson [NEW] Support for custom headers with providers (#2423)
1 chriswmercer little readme tweak (#279)
1 codingsh #2182 - add: search for docs (#2232)
1 coolcorexix Investigate 4559 v2 (#4608)
1 Dan Forbes Add WeightToFeeCoefficient type (#2296)
1 Daniel Maricic Fixed typo in README (#2402)
1 Daniel Savu fix: Generate custom type definitions (#4224)
+4 -4
View File
@@ -11,7 +11,7 @@
},
"sideEffects": false,
"type": "commonjs",
"version": "7.9.1",
"version": "7.10.1",
"workspaces": [
"packages/*"
],
@@ -31,12 +31,12 @@
"test:watch": "polkadot-dev-run-test --watch"
},
"devDependencies": {
"@babel/core": "^7.17.4",
"@babel/core": "^7.17.5",
"@babel/register": "^7.17.0",
"@babel/runtime": "^7.17.2",
"@polkadot/dev": "^0.65.60",
"@polkadot/dev": "^0.65.73",
"@polkadot/typegen": "workspace:packages/typegen",
"@types/jest": "^27.4.0",
"@types/jest": "^27.4.1",
"copyfiles": "^2.4.1"
},
"resolutions": {
+9 -6
View File
@@ -20,15 +20,18 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.9.1",
"version": "7.10.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/api-base": "7.9.1",
"@polkadot/rpc-augment": "7.9.1",
"@polkadot/types": "7.9.1",
"@polkadot/types-augment": "7.9.1",
"@polkadot/types-codec": "7.9.1",
"@polkadot/api-base": "7.10.1",
"@polkadot/rpc-augment": "7.10.1",
"@polkadot/types": "7.10.1",
"@polkadot/types-augment": "7.10.1",
"@polkadot/types-codec": "7.10.1",
"@polkadot/util": "^8.4.1"
},
"devDependencies": {
"@polkadot/types-support": "7.10.1"
}
}
@@ -0,0 +1,43 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@polkadot/api-augment/kusama';
import type { PolkadotRuntimeParachainsUmpPalletEvent, XcmV2TraitsOutcome } from '@polkadot/types/lookup';
import { Metadata, TypeRegistry } from '@polkadot/types';
import metadataStatic from '@polkadot/types-support/metadata/static-kusama';
const registry = new TypeRegistry();
const metadata = new Metadata(registry, metadataStatic);
registry.setMetadata(metadata);
describe('correct types', (): void => {
it('correctly creates XcmV2TraitsOutcome', (): void => {
const test = registry.createType<XcmV2TraitsOutcome>('XcmV2TraitsOutcome', {
Incomplete: [3_000_000_000, 'BadOrigin']
});
expect(test.toHuman()).toEqual({
Incomplete: [
'3,000,000,000',
'BadOrigin'
]
});
expect(test.isIncomplete).toEqual(true);
expect(test.asIncomplete.toHuman()).toEqual([
'3,000,000,000',
'BadOrigin'
]);
});
it('correctly creates PolkadotRuntimeParachainsUmpPalletEvent', (): void => {
const test = registry.createType<PolkadotRuntimeParachainsUmpPalletEvent>('PolkadotRuntimeParachainsUmpPalletEvent', '0x02112233445566778811223344556677881122334455667788112233445566778801005ed0b20000000006');
expect(test.asExecutedUpward[1].asIncomplete.toHuman()).toEqual([
'3,000,000,000',
'BadOrigin'
]);
});
});
+2
View File
@@ -893,6 +893,8 @@ declare module '@polkadot/api-base/types/storage' {
heads: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* All parachains. Ordered ascending by `ParaId`. Parathreads are not included.
*
* Consider using the [`ParachainsCache`] type of modifying.
**/
parachains: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '7.9.1' };
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '7.10.1' };
@@ -867,6 +867,8 @@ declare module '@polkadot/api-base/types/storage' {
heads: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* All parachains. Ordered ascending by `ParaId`. Parathreads are not included.
*
* Consider using the [`ParachainsCache`] type of modifying.
**/
parachains: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
+1 -1
View File
@@ -1680,7 +1680,7 @@ declare module '@polkadot/api-base/types/errors' {
/**
* The given asset ID is unknown.
**/
Unknown: AugmentedError<ApiType>;
UnknownClass: AugmentedError<ApiType>;
/**
* The delegate turned out to be different to what was expected.
**/
+3 -1
View File
@@ -6,6 +6,7 @@
"rootDir": "./src"
},
"exclude": [
"**/*.spec.ts",
"**/kusama/*.ts",
"**/polkadot/*.ts"
],
@@ -14,6 +15,7 @@
{ "path": "../rpc-augment/tsconfig.build.json" },
{ "path": "../types/tsconfig.build.json" },
{ "path": "../types-codec/tsconfig.build.json" },
{ "path": "../types-augment/tsconfig.build.json" }
{ "path": "../types-augment/tsconfig.build.json" },
{ "path": "../types-support/tsconfig.build.json" }
]
}
@@ -9,6 +9,9 @@
"**/base.ts",
"**/kusama/*.ts"
],
"exclude": [
"**/kusama/*.spec.ts"
],
"references": [
{ "path": "../api-base/tsconfig.build.json" },
{ "path": "../rpc-augment/tsconfig.build.json" },
@@ -0,0 +1,22 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src",
"emitDeclarationOnly": false,
"noEmit": true
},
"include": [
"**/kusama/*.spec.ts"
],
"references": [
{ "path": "../api-augment/tsconfig.build.json" },
{ "path": "../api-augment/tsconfig.kusama.json" },
{ "path": "../api-base/tsconfig.build.json" },
{ "path": "../rpc-augment/tsconfig.build.json" },
{ "path": "../types/tsconfig.build.json" },
{ "path": "../types-augment/tsconfig.build.json" },
{ "path": "../types-support/tsconfig.build.json" }
]
}
@@ -9,6 +9,9 @@
"**/base.ts",
"**/polkadot/*.ts"
],
"exclude": [
"**/polkadot/*.spec.ts"
],
"references": [
{ "path": "../api-base/tsconfig.build.json" },
{ "path": "../rpc-augment/tsconfig.build.json" },
+3 -3
View File
@@ -20,12 +20,12 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.9.1",
"version": "7.10.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/rpc-core": "7.9.1",
"@polkadot/types": "7.9.1",
"@polkadot/rpc-core": "7.10.1",
"@polkadot/types": "7.10.1",
"@polkadot/util": "^8.4.1",
"rxjs": "^7.5.4"
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '7.9.1' };
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '7.10.1' };
+6 -6
View File
@@ -20,20 +20,20 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.9.1",
"version": "7.10.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/api": "7.9.1",
"@polkadot/types": "7.9.1",
"@polkadot/types-codec": "7.9.1",
"@polkadot/types-create": "7.9.1",
"@polkadot/api": "7.10.1",
"@polkadot/types": "7.10.1",
"@polkadot/types-codec": "7.10.1",
"@polkadot/types-create": "7.10.1",
"@polkadot/util": "^8.4.1",
"@polkadot/util-crypto": "^8.4.1",
"rxjs": "^7.5.4"
},
"devDependencies": {
"@polkadot/api-augment": "7.9.1",
"@polkadot/api-augment": "7.10.1",
"@polkadot/keyring": "^8.4.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '7.9.1' };
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '7.10.1' };
+12 -12
View File
@@ -20,25 +20,25 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.9.1",
"version": "7.10.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/api": "7.9.1",
"@polkadot/api-augment": "7.9.1",
"@polkadot/api-base": "7.9.1",
"@polkadot/rpc-core": "7.9.1",
"@polkadot/types": "7.9.1",
"@polkadot/types-codec": "7.9.1",
"@polkadot/api": "7.10.1",
"@polkadot/api-augment": "7.10.1",
"@polkadot/api-base": "7.10.1",
"@polkadot/rpc-core": "7.10.1",
"@polkadot/types": "7.10.1",
"@polkadot/types-codec": "7.10.1",
"@polkadot/util": "^8.4.1",
"@polkadot/util-crypto": "^8.4.1",
"rxjs": "^7.5.4"
},
"devDependencies": {
"@polkadot/api": "7.9.1",
"@polkadot/api-augment": "7.9.1",
"@polkadot/rpc-augment": "7.9.1",
"@polkadot/rpc-provider": "7.9.1",
"@polkadot/types-support": "7.9.1"
"@polkadot/api": "7.10.1",
"@polkadot/api-augment": "7.10.1",
"@polkadot/rpc-augment": "7.10.1",
"@polkadot/rpc-provider": "7.10.1",
"@polkadot/types-support": "7.10.1"
}
}
+53 -26
View File
@@ -5,7 +5,7 @@ import type { Observable } from 'rxjs';
import type { QueryableStorageMultiArg } from '@polkadot/api-base/types';
import type { Option, Vec } from '@polkadot/types';
import type { AccountId, AccountIndex, Address, Balance, BalanceLockTo212, BlockNumber, VestingSchedule } from '@polkadot/types/interfaces';
import type { PalletBalancesBalanceLock, PalletVestingVestingInfo } from '@polkadot/types/lookup';
import type { PalletBalancesBalanceLock, PalletBalancesReserveData, PalletVestingVestingInfo } from '@polkadot/types/lookup';
import type { DeriveApi, DeriveBalancesAccount, DeriveBalancesAccountData, DeriveBalancesAll, DeriveBalancesAllAccountData, DeriveBalancesAllVesting } from '../types';
import { combineLatest, map, of, switchMap } from 'rxjs';
@@ -14,9 +14,7 @@ import { BN, BN_ZERO, bnMax, bnMin, isFunction } from '@polkadot/util';
import { memo } from '../util';
type BalanceLocksEntry = Vec<PalletBalancesBalanceLock | BalanceLockTo212>;
type BalanceLocks = BalanceLocksEntry[];
type ResultBalance = [PalletVestingVestingInfo[] | null, ((PalletBalancesBalanceLock | BalanceLockTo212)[])[]];
type ResultBalance = [PalletVestingVestingInfo[] | null, ((PalletBalancesBalanceLock | BalanceLockTo212)[])[], PalletBalancesReserveData[][]];
type Result = [DeriveBalancesAccount, BlockNumber, ResultBalance];
interface AllLocked {
@@ -86,7 +84,9 @@ function calcVesting (bestNumber: BlockNumber, shared: DeriveBalancesAllAccountD
return {
isVesting,
vestedBalance,
vestedClaimable: isVesting ? shared.vestingLocked.sub(vestingTotal.sub(vestedBalance)) : BN_ZERO,
vestedClaimable: isVesting
? shared.vestingLocked.sub(vestingTotal.sub(vestedBalance))
: BN_ZERO,
vesting: vesting
.map(({ locked, perBlock, startingBlock }, index) => ({
endBlock: locked.div(perBlock).iadd(startingBlock),
@@ -100,7 +100,7 @@ function calcVesting (bestNumber: BlockNumber, shared: DeriveBalancesAllAccountD
};
}
function calcBalances (api: DeriveApi, [data, bestNumber, [vesting, allLocks]]: Result): DeriveBalancesAll {
function calcBalances (api: DeriveApi, [data, bestNumber, [vesting, allLocks, namedReserves]]: Result): DeriveBalancesAll {
const shared = calcShared(api, bestNumber, data, allLocks[0]);
return {
@@ -110,7 +110,8 @@ function calcBalances (api: DeriveApi, [data, bestNumber, [vesting, allLocks]]:
accountNonce: data.accountNonce,
additional: allLocks
.filter((_, index) => index !== 0)
.map((l, index) => calcShared(api, bestNumber, data.additional[index], l))
.map((l, index) => calcShared(api, bestNumber, data.additional[index], l)),
namedReserves
};
}
@@ -133,7 +134,8 @@ function queryOld (api: DeriveApi, accountId: AccountId): Observable<ResultBalan
vestingNew
? [vestingNew]
: null,
[locks]
[locks],
[]
];
})
);
@@ -141,33 +143,58 @@ function queryOld (api: DeriveApi, accountId: AccountId): Observable<ResultBalan
const isNonNullable = <T>(nullable: T): nullable is NonNullable<T> => !!nullable;
function createCalls (accountId: AccountId, calls: unknown[]): [boolean[], QueryableStorageMultiArg<'rxjs'>[]] {
return [
calls.map((c) => !c),
calls
.filter(isNonNullable)
.map((c) => [c, accountId] as unknown as QueryableStorageMultiArg<'rxjs'>)
];
}
// current (balances, vesting)
function queryCurrent (api: DeriveApi, accountId: AccountId, balanceInstances: string[] = ['balances']): Observable<ResultBalance> {
const calls = balanceInstances.map((m): DeriveApi['query']['balances']['locks'] | undefined =>
(api.derive as DeriveCustomLocks)[m]?.customLocks || api.query[m as 'balances']?.locks
const [lockEmpty, lockQueries] = createCalls(
accountId,
balanceInstances.map((m): DeriveApi['query']['balances']['locks'] | undefined =>
(api.derive as DeriveCustomLocks)[m]?.customLocks || api.query[m as 'balances']?.locks
)
);
const [reserveEmpty, reserveQueries] = createCalls(
accountId,
balanceInstances.map((m): DeriveApi['query']['balances']['reserves'] | undefined =>
api.query[m as 'balances']?.reserves
)
);
const lockEmpty = calls.map((c) => !c);
const queries = calls.filter(isNonNullable).map((c): QueryableStorageMultiArg<'rxjs'> => [c, accountId]);
return (
return combineLatest([
api.query.vesting?.vesting
? api.queryMulti<[Option<PalletVestingVestingInfo> | Option<Vec<PalletVestingVestingInfo>>, ...BalanceLocks]>([[api.query.vesting.vesting, accountId], ...queries])
// TODO We need to check module instances here as well, not only the balances module
: queries.length
? api.queryMulti<[...(Vec<PalletBalancesBalanceLock>)[]]>(queries).pipe(
map((r): [Option<PalletVestingVestingInfo>, ...BalanceLocks] => [api.registry.createType('Option<VestingInfo>'), ...r])
)
: of([api.registry.createType('Option<VestingInfo>')] as [Option<PalletVestingVestingInfo>])
).pipe(
map(([opt, ...locks]): ResultBalance => {
let offset = -1;
? api.query.vesting.vesting(accountId)
: of(api.registry.createType('Option<VestingInfo>')),
lockQueries.length
? api.queryMulti<[...(Vec<PalletBalancesBalanceLock>)[]]>(lockQueries)
: of([] as Vec<PalletBalancesBalanceLock>[]),
reserveQueries.length
? api.queryMulti<[...(Vec<PalletBalancesReserveData>)[]]>(reserveQueries)
: of([] as Vec<PalletBalancesReserveData>[])
]).pipe(
map(([opt, locks, reserves]): ResultBalance => {
let offsetLock = -1;
let offsetReserve = -1;
const vesting = opt.unwrapOr(null);
return [
vesting
? Array.isArray(vesting) ? vesting : [vesting]
? Array.isArray(vesting)
? vesting
: [vesting as PalletVestingVestingInfo]
: null,
lockEmpty.map((e) => e ? api.registry.createType<Vec<PalletBalancesBalanceLock>>('Vec<BalanceLock>') : locks[++offset])
lockEmpty.map((e) =>
e ? api.registry.createType<Vec<PalletBalancesBalanceLock>>('Vec<BalanceLock>') : locks[++offsetLock]
),
reserveEmpty.map((e) =>
e ? api.registry.createType<Vec<PalletBalancesReserveData>>('Vec<PalletBalancesReserveData>') : reserves[++offsetReserve]
)
];
})
);
@@ -202,7 +229,7 @@ export function all (instanceId: string, api: DeriveApi): (address: AccountIndex
? queryCurrent(api, account.accountId, balanceInstances)
: queryOld(api, account.accountId)
])
: of([account, api.registry.createType('BlockNumber'), [null, []]])
: of([account, api.registry.createType('BlockNumber'), [null, [], []]])
)
),
map((result): DeriveBalancesAll => calcBalances(api, result))
+2 -1
View File
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { AccountId, Balance, BalanceLockTo212, Index } from '@polkadot/types/interfaces';
import type { PalletBalancesBalanceLock } from '@polkadot/types/lookup';
import type { PalletBalancesBalanceLock, PalletBalancesReserveData } from '@polkadot/types/lookup';
import type { BN } from '@polkadot/util';
export interface DeriveBalancesAccountData {
@@ -44,6 +44,7 @@ export interface DeriveBalancesAllVesting {
export interface DeriveBalancesAll extends DeriveBalancesAccount, DeriveBalancesAllAccountData, DeriveBalancesAllVesting {
additional: DeriveBalancesAllAccountData[];
namedReserves: PalletBalancesReserveData[][];
}
export type DeriveBalancesMap = Record<string, DeriveBalancesAll>;
@@ -0,0 +1,19 @@
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { AnyNumber } from '@polkadot/types/types';
import type { SignedBlockExtended } from '../type/types';
import type { DeriveApi } from '../types';
import { switchMap } from 'rxjs';
import { memo } from '../util';
export function getBlockByNumber (instanceId: string, api: DeriveApi): (blockNumber: AnyNumber) => Observable<SignedBlockExtended | undefined> {
return memo(instanceId, (blockNumber: AnyNumber): Observable<SignedBlockExtended | undefined> =>
api.rpc.chain.getBlockHash(blockNumber).pipe(
switchMap((h) => api.derive.chain.getBlock(h))
)
);
}
+1
View File
@@ -6,5 +6,6 @@ export * from './bestNumberFinalized';
export * from './bestNumberLag';
export * from './getHeader';
export * from './getBlock';
export * from './getBlockByNumber';
export * from './subscribeNewBlocks';
export * from './subscribeNewHeads';
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '7.9.1' };
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '7.10.1' };
+14 -14
View File
@@ -20,29 +20,29 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.9.1",
"version": "7.10.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/api-augment": "7.9.1",
"@polkadot/api-base": "7.9.1",
"@polkadot/api-derive": "7.9.1",
"@polkadot/api-augment": "7.10.1",
"@polkadot/api-base": "7.10.1",
"@polkadot/api-derive": "7.10.1",
"@polkadot/keyring": "^8.4.1",
"@polkadot/rpc-augment": "7.9.1",
"@polkadot/rpc-core": "7.9.1",
"@polkadot/rpc-provider": "7.9.1",
"@polkadot/types": "7.9.1",
"@polkadot/types-augment": "7.9.1",
"@polkadot/types-codec": "7.9.1",
"@polkadot/types-create": "7.9.1",
"@polkadot/types-known": "7.9.1",
"@polkadot/rpc-augment": "7.10.1",
"@polkadot/rpc-core": "7.10.1",
"@polkadot/rpc-provider": "7.10.1",
"@polkadot/types": "7.10.1",
"@polkadot/types-augment": "7.10.1",
"@polkadot/types-codec": "7.10.1",
"@polkadot/types-create": "7.10.1",
"@polkadot/types-known": "7.10.1",
"@polkadot/util": "^8.4.1",
"@polkadot/util-crypto": "^8.4.1",
"eventemitter3": "^4.0.7",
"rxjs": "^7.5.4"
},
"devDependencies": {
"@polkadot/api-augment": "7.9.1",
"@polkadot/types-support": "7.9.1"
"@polkadot/api-augment": "7.10.1",
"@polkadot/types-support": "7.10.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '7.9.1' };
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '7.10.1' };
+12 -7
View File
@@ -174,7 +174,7 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
return decorateMethod(
(): Observable<this> =>
this.#observeSign(account, partialOptions).pipe(
mapTo<number | undefined, this>(this)
mapTo<() => number | undefined, this>(this)
)
)();
}
@@ -197,10 +197,11 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
return decorateMethod(
(): Observable<Codec> => (
this.#observeSign(account, options).pipe(
switchMap((updateId: number | undefined): Observable<ISubmittableResult> | Observable<Hash> =>
isSubscription
? this.#observeSubscribe(updateId)
: this.#observeSend(updateId)
switchMap((getUpdateId): Observable<ISubmittableResult> | Observable<Hash> => {
return isSubscription
? this.#observeSubscribe(getUpdateId())
: this.#observeSend(getUpdateId());
}
)
) as Observable<Codec>) // FIXME This is wrong, SubmittableResult is _not_ a codec
)(statusCb);
@@ -213,11 +214,15 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
return this;
}
#observeSign = (account: AddressOrPair, partialOptions?: Partial<SignerOptions>): Observable<number | undefined> => {
#observeSign = (account: AddressOrPair, partialOptions?: Partial<SignerOptions>): Observable<() => number | undefined> => {
const address = isKeyringPair(account) ? account.address : account.toString();
const options = optionsOrNonce(partialOptions);
let updateId: number | undefined;
function getUpdateId () {
return updateId;
}
return api.derive.tx.signingInfo(address, options.nonce, options.era).pipe(
first(),
mergeMap(async (signingInfo): Promise<void> => {
@@ -229,7 +234,7 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
updateId = await this.#signViaSigner(address, eraOptions, signingInfo.header);
}
}),
mapTo(updateId) as OperatorFunction<void, number | undefined>
mapTo(getUpdateId) as OperatorFunction<void, () => number | undefined>
);
};
+4 -4
View File
@@ -20,13 +20,13 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.9.1",
"version": "7.10.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/rpc-core": "7.9.1",
"@polkadot/types": "7.9.1",
"@polkadot/types-codec": "7.9.1",
"@polkadot/rpc-core": "7.10.1",
"@polkadot/types": "7.10.1",
"@polkadot/types-codec": "7.10.1",
"@polkadot/util": "^8.4.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '7.9.1' };
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '7.10.1' };
+5 -5
View File
@@ -20,18 +20,18 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.9.1",
"version": "7.10.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/rpc-augment": "7.9.1",
"@polkadot/rpc-provider": "7.9.1",
"@polkadot/types": "7.9.1",
"@polkadot/rpc-augment": "7.10.1",
"@polkadot/rpc-provider": "7.10.1",
"@polkadot/types": "7.10.1",
"@polkadot/util": "^8.4.1",
"rxjs": "^7.5.4"
},
"devDependencies": {
"@polkadot/keyring": "^8.4.1",
"@polkadot/rpc-augment": "7.9.1"
"@polkadot/rpc-augment": "7.10.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '7.9.1' };
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '7.10.1' };
+3 -3
View File
@@ -20,13 +20,13 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.9.1",
"version": "7.10.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/keyring": "^8.4.1",
"@polkadot/types": "7.9.1",
"@polkadot/types-support": "7.9.1",
"@polkadot/types": "7.10.1",
"@polkadot/types-support": "7.10.1",
"@polkadot/util": "^8.4.1",
"@polkadot/util-crypto": "^8.4.1",
"@polkadot/x-fetch": "^8.4.1",
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '7.9.1' };
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '7.10.1' };
+11 -11
View File
@@ -20,7 +20,7 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.9.1",
"version": "7.10.1",
"main": "index.js",
"bin": {
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.cjs",
@@ -30,18 +30,18 @@
"polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.cjs"
},
"dependencies": {
"@babel/core": "^7.17.4",
"@babel/core": "^7.17.5",
"@babel/register": "^7.17.0",
"@babel/runtime": "^7.17.2",
"@polkadot/api": "7.9.1",
"@polkadot/api-augment": "7.9.1",
"@polkadot/rpc-augment": "7.9.1",
"@polkadot/rpc-provider": "7.9.1",
"@polkadot/types": "7.9.1",
"@polkadot/types-augment": "7.9.1",
"@polkadot/types-codec": "7.9.1",
"@polkadot/types-create": "7.9.1",
"@polkadot/types-support": "7.9.1",
"@polkadot/api": "7.10.1",
"@polkadot/api-augment": "7.10.1",
"@polkadot/rpc-augment": "7.10.1",
"@polkadot/rpc-provider": "7.10.1",
"@polkadot/types": "7.10.1",
"@polkadot/types-augment": "7.10.1",
"@polkadot/types-codec": "7.10.1",
"@polkadot/types-create": "7.10.1",
"@polkadot/types-support": "7.10.1",
"@polkadot/util": "^8.4.1",
"@polkadot/x-ws": "^8.4.1",
"handlebars": "^4.7.7",
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '7.9.1' };
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '7.10.1' };
+3 -3
View File
@@ -20,12 +20,12 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.9.1",
"version": "7.10.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/types": "7.9.1",
"@polkadot/types-codec": "7.9.1",
"@polkadot/types": "7.10.1",
"@polkadot/types-codec": "7.10.1",
"@polkadot/util": "^8.4.1"
}
}
@@ -3655,7 +3655,7 @@ export default {
**/
PalletContractsScheduleLimits: {
eventTopics: 'u32',
stackHeight: 'u32',
stackHeight: 'Option<u32>',
globals: 'u32',
parameters: 'u32',
memoryPages: 'u32',
@@ -4185,7 +4185,7 @@ export default {
* Lookup534: pallet_uniques::pallet::Error<T, I>
**/
PalletUniquesError: {
_enum: ['NoPermission', 'Unknown', 'AlreadyExists', 'WrongOwner', 'BadWitness', 'InUse', 'Frozen', 'WrongDelegate', 'NoDelegate', 'Unapproved']
_enum: ['NoPermission', 'UnknownClass', 'AlreadyExists', 'WrongOwner', 'BadWitness', 'InUse', 'Frozen', 'WrongDelegate', 'NoDelegate', 'Unapproved']
},
/**
* Lookup536: pallet_transaction_storage::TransactionInfo
@@ -4018,7 +4018,7 @@ declare module '@polkadot/types/lookup' {
/** @name PalletContractsScheduleLimits (434) */
export interface PalletContractsScheduleLimits extends Struct {
readonly eventTopics: u32;
readonly stackHeight: u32;
readonly stackHeight: Option<u32>;
readonly globals: u32;
readonly parameters: u32;
readonly memoryPages: u32;
@@ -4669,7 +4669,7 @@ declare module '@polkadot/types/lookup' {
/** @name PalletUniquesError (534) */
export interface PalletUniquesError extends Enum {
readonly isNoPermission: boolean;
readonly isUnknown: boolean;
readonly isUnknownClass: boolean;
readonly isAlreadyExists: boolean;
readonly isWrongOwner: boolean;
readonly isBadWitness: boolean;
@@ -4678,7 +4678,7 @@ declare module '@polkadot/types/lookup' {
readonly isWrongDelegate: boolean;
readonly isNoDelegate: boolean;
readonly isUnapproved: boolean;
readonly type: 'NoPermission' | 'Unknown' | 'AlreadyExists' | 'WrongOwner' | 'BadWitness' | 'InUse' | 'Frozen' | 'WrongDelegate' | 'NoDelegate' | 'Unapproved';
readonly type: 'NoPermission' | 'UnknownClass' | 'AlreadyExists' | 'WrongOwner' | 'BadWitness' | 'InUse' | 'Frozen' | 'WrongDelegate' | 'NoDelegate' | 'Unapproved';
}
/** @name PalletTransactionStorageTransactionInfo (536) */
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '7.9.1' };
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '7.10.1' };
+4 -4
View File
@@ -20,16 +20,16 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.9.1",
"version": "7.10.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/util": "^8.4.1"
},
"devDependencies": {
"@polkadot/types": "7.9.1",
"@polkadot/types-augment": "7.9.1",
"@polkadot/types-support": "7.9.1",
"@polkadot/types": "7.10.1",
"@polkadot/types-augment": "7.10.1",
"@polkadot/types-support": "7.10.1",
"@polkadot/util-crypto": "^8.4.1"
}
}
@@ -126,52 +126,78 @@ describe('BTreeSet', (): void => {
).toThrowError(/BTreeSet: cannot decode type/);
});
it('correctly encodes length', (): void => {
expect(
new (
BTreeSet.with(U32))(registry, mockU32Set).encodedLength
).toEqual(17);
describe('enocodedLength & initialU8aLength', (): void => {
it('correctly encodes length', (): void => {
expect(
new (
BTreeSet.with(U32))(registry, mockU32Set).encodedLength
).toEqual(17);
});
it('correctly encodes/decodes empty', (): void => {
const none = new (BTreeSet.with(U32))(registry, []);
// only the length byte
expect(none.toHex()).toEqual('0x00');
expect(none.encodedLength).toEqual(1);
expect(
(new (BTreeSet.with(U32))(registry, none.toHex())).initialU8aLength
).toEqual(none.encodedLength);
});
it('correctly encodes/decodes filled', (): void => {
const some = new (BTreeSet.with(U32))(registry, [1, 2]);
// length byte + 2 values, 2 << 2 with u32 values
expect(some.toHex()).toEqual('0x080100000002000000');
expect(some.encodedLength).toEqual(1 + (4 * 2));
expect(
(new (BTreeSet.with(U32))(registry, some.toHex())).initialU8aLength
).toEqual(some.encodedLength);
});
});
it('correctly sorts numeric values', (): void => {
expect(
Array.from(new (BTreeSet.with(I32))(registry, mockI32SetObj)).map((k) => k.toNumber())
).toEqual([-1000, -255, 0, 255, 1000]);
});
describe('sorting', (): void => {
it('correctly sorts numeric values', (): void => {
expect(
Array.from(new (BTreeSet.with(I32))(registry, mockI32SetObj)).map((k) => k.toNumber())
).toEqual([-1000, -255, 0, 255, 1000]);
});
it('correctly sorts text values', (): void => {
expect(
Array.from(new (BTreeSet.with(Text))(registry, mockTextSetObj)).map((k) => k.toString())
).toEqual(['b', 'ba', 'baz', 'bb', 'c']);
});
it('correctly sorts text values', (): void => {
expect(
Array.from(new (BTreeSet.with(Text))(registry, mockTextSetObj)).map((k) => k.toString())
).toEqual(['b', 'ba', 'baz', 'bb', 'c']);
});
it('correctly sorts complex tuple values', (): void => {
expect(
Array.from(new (BTreeSet.with(U32TextTuple))(registry, mockTupleSetObj)).map((k) => k.toJSON())
).toEqual([[1, 'baz'], [2, 'b'], [2, 'ba'], [2, 'bb']]);
});
it('correctly sorts complex tuple values', (): void => {
expect(
Array.from(new (BTreeSet.with(U32TextTuple))(registry, mockTupleSetObj)).map((k) => k.toJSON())
).toEqual([[1, 'baz'], [2, 'b'], [2, 'ba'], [2, 'bb']]);
});
it('correctly sorts complex struct values', (): void => {
expect(
Array.from(new (BTreeSet.with(MockStruct))(registry, mockStructSetObj)).map((k) => k.toJSON())
).toEqual([
{ int: -1, text: 'b' },
{ int: 1, text: 'b' },
{ int: -1, text: 'ba' },
{ int: -2, text: 'baz' }
]);
});
it('correctly sorts complex struct values', (): void => {
expect(
Array.from(new (BTreeSet.with(MockStruct))(registry, mockStructSetObj)).map((k) => k.toJSON())
).toEqual([
{ int: -1, text: 'b' },
{ int: 1, text: 'b' },
{ int: -1, text: 'ba' },
{ int: -2, text: 'baz' }
]);
});
it('correctly sorts complex enum values', (): void => {
expect(
Array.from(new (BTreeSet.with(MockEnum))(registry, mockEnumSetObj)).map((k) => k.toJSON())
).toEqual([
{ key1: { int: -1, text: 'b' } },
{ key1: { int: 1, text: 'b' } },
{ key2: { int: -1, text: 'b' } },
{ key3: [2, 'b'] },
{ key3: [2, 'ba'] }
]);
it('correctly sorts complex enum values', (): void => {
expect(
Array.from(new (BTreeSet.with(MockEnum))(registry, mockEnumSetObj)).map((k) => k.toJSON())
).toEqual([
{ key1: { int: -1, text: 'b' } },
{ key1: { int: 1, text: 'b' } },
{ key2: { int: -1, text: 'b' } },
{ key3: [2, 'b'] },
{ key3: [2, 'ba'] }
]);
});
});
it('generates sane toRawTypes', (): void => {
@@ -20,7 +20,7 @@ function decodeSetFromU8a<V extends Codec> (registry: Registry, ValClass: CodecC
output.add(values[i]);
}
return [output, decodedLength + offset];
return [output, decodedLength];
}
/** @internal */
@@ -75,6 +75,33 @@ describe('CodecMap', (): void => {
testEncode('toString', mockU32U32MapString);
});
describe('enocodedLength & initialU8aLength', (): void => {
it('correctly encodes/decodes empty', (): void => {
const none = new CodecMap(registry, Text, Text, new Map([]));
// only the length byte
expect(none.toHex()).toEqual('0x00');
expect(none.encodedLength).toEqual(1);
expect(
new CodecMap(registry, Text, Text, none.toHex()).initialU8aLength
).toEqual(none.encodedLength);
});
it('correctly encodes/decodes filled', (): void => {
const some = new CodecMap(registry, Text, Text, new Map([
[new Text(registry, '1'), new Text(registry, 'foo')],
[new Text(registry, '2'), new Text(registry, 'bar')]
]));
// length byte + 2 values, 2 << 2 with Text values
expect(some.toHex()).toEqual('0x0804310c666f6f04320c626172');
expect(some.encodedLength).toEqual(1 + ((1 + 1) * 2) + ((1 + 3) * 2));
expect(
new CodecMap(registry, Text, Text, some.toHex()).initialU8aLength
).toEqual(some.encodedLength);
});
});
it('has a sane inspect', (): void => {
expect(
new CodecMap(registry, Text, Text, new Map([
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-codec', path: 'auto', type: 'auto', version: '7.9.1' };
export const packageInfo = { name: '@polkadot/types-codec', path: 'auto', type: 'auto', version: '7.10.1' };
+3 -3
View File
@@ -20,14 +20,14 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.9.1",
"version": "7.10.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/types-codec": "7.9.1",
"@polkadot/types-codec": "7.10.1",
"@polkadot/util": "^8.4.1"
},
"devDependencies": {
"@polkadot/types": "7.9.1"
"@polkadot/types": "7.10.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-create', path: 'auto', type: 'auto', version: '7.9.1' };
export const packageInfo = { name: '@polkadot/types-create', path: 'auto', type: 'auto', version: '7.10.1' };
+4 -4
View File
@@ -20,14 +20,14 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.9.1",
"version": "7.10.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/networks": "^8.4.1",
"@polkadot/types": "7.9.1",
"@polkadot/types-codec": "7.9.1",
"@polkadot/types-create": "7.9.1",
"@polkadot/types": "7.10.1",
"@polkadot/types-codec": "7.10.1",
"@polkadot/types-create": "7.10.1",
"@polkadot/util": "^8.4.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-known', path: 'auto', type: 'auto', version: '7.9.1' };
export const packageInfo = { name: '@polkadot/types-known', path: 'auto', type: 'auto', version: '7.10.1' };
+1 -1
View File
@@ -20,7 +20,7 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.9.1",
"version": "7.10.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
File diff suppressed because one or more lines are too long
@@ -265,7 +265,7 @@
{
"name": "Version",
"type": 165,
"value": "0x186b7573616d61347061726974792d6b7573616d6102000000d22300000000000038df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0200000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a8010000000900000000",
"value": "0x186b7573616d61347061726974792d6b7573616d6102000000d22300000000000038df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0200000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a8010000000a00000000",
"docs": [
" Get the chain's current version."
]
@@ -5144,7 +5144,9 @@
},
"fallback": "0x00",
"docs": [
" All parachains. Ordered ascending by `ParaId`. Parathreads are not included."
" All parachains. Ordered ascending by `ParaId`. Parathreads are not included.",
"",
" Consider using the [`ParachainsCache`] type of modifying."
]
},
{
@@ -29103,7 +29103,7 @@
{
"name": null,
"type": 479,
"typeName": "BitVec<bitvec::order::Lsb0, u8>",
"typeName": "BitVec<u8, bitvec::order::Lsb0>",
"docs": []
}
]
@@ -29237,7 +29237,7 @@
{
"name": "validator_indices",
"type": 479,
"typeName": "BitVec<bitvec::order::Lsb0, u8>",
"typeName": "BitVec<u8, bitvec::order::Lsb0>",
"docs": []
}
]
@@ -39631,13 +39631,13 @@
{
"name": "availability_votes",
"type": 479,
"typeName": "BitVec<BitOrderLsb0, u8>",
"typeName": "BitVec<u8, BitOrderLsb0>",
"docs": []
},
{
"name": "backers",
"type": 479,
"typeName": "BitVec<BitOrderLsb0, u8>",
"typeName": "BitVec<u8, BitOrderLsb0>",
"docs": []
},
{
@@ -40462,13 +40462,13 @@
{
"name": "votes_accept",
"type": 479,
"typeName": "BitVec<BitOrderLsb0, u8>",
"typeName": "BitVec<u8, BitOrderLsb0>",
"docs": []
},
{
"name": "votes_reject",
"type": 479,
"typeName": "BitVec<BitOrderLsb0, u8>",
"typeName": "BitVec<u8, BitOrderLsb0>",
"docs": []
},
{
@@ -41692,13 +41692,13 @@
{
"name": "validators_for",
"type": 479,
"typeName": "BitVec<bitvec::order::Lsb0, u8>",
"typeName": "BitVec<u8, bitvec::order::Lsb0>",
"docs": []
},
{
"name": "validators_against",
"type": 479,
"typeName": "BitVec<bitvec::order::Lsb0, u8>",
"typeName": "BitVec<u8, bitvec::order::Lsb0>",
"docs": []
},
{
File diff suppressed because one or more lines are too long
@@ -265,7 +265,7 @@
{
"name": "Version",
"type": 158,
"value": "0x20706f6c6b61646f743c7061726974792d706f6c6b61646f7400000000d22300000000000038df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0200000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a8010000000a00000000",
"value": "0x20706f6c6b61646f743c7061726974792d706f6c6b61646f7400000000d22300000000000038df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0200000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a8010000000b00000000",
"docs": [
" Get the chain's current version."
]
@@ -4552,7 +4552,9 @@
},
"fallback": "0x00",
"docs": [
" All parachains. Ordered ascending by `ParaId`. Parathreads are not included."
" All parachains. Ordered ascending by `ParaId`. Parathreads are not included.",
"",
" Consider using the [`ParachainsCache`] type of modifying."
]
},
{
@@ -23661,7 +23661,7 @@
{
"name": null,
"type": 362,
"typeName": "BitVec<bitvec::order::Lsb0, u8>",
"typeName": "BitVec<u8, bitvec::order::Lsb0>",
"docs": []
}
]
@@ -23795,7 +23795,7 @@
{
"name": "validator_indices",
"type": 362,
"typeName": "BitVec<bitvec::order::Lsb0, u8>",
"typeName": "BitVec<u8, bitvec::order::Lsb0>",
"docs": []
}
]
@@ -36271,13 +36271,13 @@
{
"name": "availability_votes",
"type": 362,
"typeName": "BitVec<BitOrderLsb0, u8>",
"typeName": "BitVec<u8, BitOrderLsb0>",
"docs": []
},
{
"name": "backers",
"type": 362,
"typeName": "BitVec<BitOrderLsb0, u8>",
"typeName": "BitVec<u8, BitOrderLsb0>",
"docs": []
},
{
@@ -37102,13 +37102,13 @@
{
"name": "votes_accept",
"type": 362,
"typeName": "BitVec<BitOrderLsb0, u8>",
"typeName": "BitVec<u8, BitOrderLsb0>",
"docs": []
},
{
"name": "votes_reject",
"type": 362,
"typeName": "BitVec<BitOrderLsb0, u8>",
"typeName": "BitVec<u8, BitOrderLsb0>",
"docs": []
},
{
File diff suppressed because one or more lines are too long
@@ -3092,7 +3092,7 @@
{
"name": "Schedule",
"type": 433,
"value": "0x0400000000020000000100008000000010000000001000000001000020000000200000000040000000000200020000009f0b00007a1c0000ee20000066170000472700004e0c00009f150000ef1a00005000000058870200754504003d180000850c0000190f0000580c0000a7210000c7290000f70d0000046cac00080c0000300c00009a0b0000b20c0000c20b00007c0b0000f40b0000ed120000291300009d120000b11200009d120000d9120000a7120000e3120000151300001b120000c11100002f12000067110000612b0000412d0000072b0000ff2d0000e911000011120000e9110000b11200007f120000431200007f120000ed1200007a9c0700000000009abcb60100000000285c030000000000ea8b0700000000008e74070000000000e8a715000000000066880700000000001c870700000000005a8a070000000000a66b070000000000d4c3120000000000eebd030000000000a062070000000000730000000000000008331a0000000000c0000000000000001869e926000000007a45180000000000ea932c0000000000e0b99f07000000002603000000000000444c06000000000010a5b1070000000018010000000000006f00000000000000e83df00700000000bae0ad07000000006c0000000000000054f1a901000000006300000000000000ec49af01000000007c020000000000002836b307000000008102000000000000aa7c85080000000032c23e1300000000da624c0d000000000c047e080000000030d3010000000000d6e43e2e0000000097270000000000000106000000000000c4340c0000000000c1110000000000009a0c0e0000000000b80b00000000000002cc0900000000009704000000000000a4ac0900000000009b04000000000000a2a12b0900000000",
"value": "0x0400000000000100008000000010000000001000000001000020000000200000000040000000000200020000009f0b00008a1b0000e01f00008417000051270000080c0000b31500008b1a000028000000c8040100754d01002b070000df0c0000d30e0000860b000089210000bd290000bf0e00007550b100c20b0000b80b0000540b0000b20c0000fa0a0000c80a0000cc0b000089120000fd1100004d12000007120000fd110000751200004312000039120000a712000025120000ad110000851100002b1100000b2c0000372d0000e32b0000c32d000053110000491100005d110000e9110000431200003912000007120000f31100001ab10700000000004ac7b501000000009648030000000000d2a8070000000000fa9907000000000020b6150000000000689f070000000000b093070000000000fea4070000000000589607000000000020f512000000000050e8030000000000727c070000000000730000000000000088d01f0000000000bc0000000000000088b5f52600000000746e180000000000b4462d00000000005241a107000000002603000000000000e6590600000000000843b2070000000017010000000000006a000000000000005658ef0700000000d452ae0700000000680000000000000042fdaa01000000005e000000000000004677af01000000007002000000000000941fb307000000007802000000000000e697830800000000f2243a130000000002a0460d00000000589785080000000020d401000000000096383f2e000000000120000000000000ef0500000000000038610c0000000000ba11000000000000a83f0e0000000000ad0b0000000000006eec0900000000008904000000000000f8d0090000000000890400000000000082d12f0900000000",
"docs": [
" Cost schedule and limits."
]
@@ -3100,7 +3100,7 @@
{
"name": "DeletionQueueDepth",
"type": 4,
"value": "0x01460000",
"value": "0x52440000",
"docs": [
" The maximum number of contracts that can be pending for deletion.",
"",
@@ -28991,8 +28991,8 @@
},
{
"name": "stack_height",
"type": 4,
"typeName": "u32",
"type": 92,
"typeName": "Option<u32>",
"docs": []
},
{
@@ -34338,7 +34338,7 @@
]
},
{
"name": "Unknown",
"name": "UnknownClass",
"fields": [],
"index": 1,
"docs": [
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-support', path: 'auto', type: 'auto', version: '7.9.1' };
export const packageInfo = { name: '@polkadot/types-support', path: 'auto', type: 'auto', version: '7.10.1' };
+5 -5
View File
@@ -20,20 +20,20 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.9.1",
"version": "7.10.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.17.2",
"@polkadot/keyring": "^8.4.1",
"@polkadot/types-augment": "7.9.1",
"@polkadot/types-codec": "7.9.1",
"@polkadot/types-create": "7.9.1",
"@polkadot/types-augment": "7.10.1",
"@polkadot/types-codec": "7.10.1",
"@polkadot/types-create": "7.10.1",
"@polkadot/util": "^8.4.1",
"@polkadot/util-crypto": "^8.4.1",
"rxjs": "^7.5.4"
},
"devDependencies": {
"@polkadot/keyring": "^8.4.1",
"@polkadot/types-support": "7.9.1"
"@polkadot/types-support": "7.10.1"
}
}
+8 -4
View File
@@ -230,13 +230,11 @@ export class TypeRegistry implements Registry {
}
public get lookup (): PortableRegistry {
return this.#lookup || this.metadata.lookup;
return assertReturn(this.#lookup, 'Lookup has not been set on this registry');
}
public get metadata (): MetadataLatest {
assert(this.#metadata, 'Metadata has not been set on this registry');
return this.#metadata;
return assertReturn(this.#metadata, 'Metadata has not been set on this registry');
}
public get unknownTypes (): string[] {
@@ -485,6 +483,9 @@ export class TypeRegistry implements Registry {
setLookup (lookup: PortableRegistry): void {
this.#lookup = lookup;
// register all applicable types found
lookup.register();
}
// sets the metadata
@@ -492,6 +493,9 @@ export class TypeRegistry implements Registry {
this.#metadata = metadata.asLatest;
this.#metadataVersion = metadata.version;
// attach the lookup at this point (before injecting)
this.setLookup(this.#metadata.lookup);
injectExtrinsics(this, this.#metadata, this.#metadataVersion, this.#metadataCalls);
injectErrors(this, this.#metadata, this.#metadataVersion, this.#metadataErrors);
injectEvents(this, this.#metadata, this.#metadataVersion, this.#metadataEvents);
@@ -9,9 +9,7 @@ import type { SiField, SiLookupTypeId, SiPath, SiType, SiTypeDefArray, SiTypeDef
import { sanitize, Struct, u32 } from '@polkadot/types-codec';
import { getTypeDef, TypeDefInfo, withTypeString } from '@polkadot/types-create';
import { assert, isNumber, isString, logger, objectSpread, stringCamelCase, stringify, stringPascalCase } from '@polkadot/util';
import { assertUnreachable } from './util';
import { assert, assertUnreachable, isNumber, isString, logger, objectSpread, stringCamelCase, stringify, stringPascalCase } from '@polkadot/util';
const l = logger('PortableRegistry');
@@ -106,7 +104,7 @@ function matchParts (first: string[], second: (string | Text)[]): boolean {
// check if the path matches the PATHS_ALIAS (with wildcards)
function getAliasPath (path: SiPath): string | null {
// TODO We need to handle ink! Balance in some way
return path.length && PATHS_ALIAS.some((p) => matchParts(p, path))
return path.length && PATHS_ALIAS.some((a) => matchParts(a, path))
? path[path.length - 1].toString()
: null;
}
@@ -345,7 +343,9 @@ function extractTypeInfo (lookup: PortableRegistry, portable: PortableType[]): [
export class PortableRegistry extends Struct implements ILookup {
#alias: Record<number, string>;
#lookups: Record<string, string>;
#names: Record<number, string>;
#params: Record<string, SiTypeParameter[]>;
#typeDefs: Record<number, TypeDef> = {};
#types: Record<number, PortableType>;
@@ -359,11 +359,11 @@ export class PortableRegistry extends Struct implements ILookup {
const [types, lookups, names, params] = extractTypeInfo(this, this.types);
this.#alias = extractAliases(params, isContract);
this.#lookups = lookups;
this.#names = names;
this.#params = params;
this.#types = types;
registerTypes(this, lookups, names, params);
// console.timeEnd('PortableRegistry')
}
@@ -378,6 +378,10 @@ export class PortableRegistry extends Struct implements ILookup {
return this.getT('types');
}
public register (): void {
registerTypes(this, this.#lookups, this.#names, this.#params);
}
/**
* @description Returns the name for a specific lookup
*/
@@ -510,8 +514,13 @@ export class PortableRegistry extends Struct implements ILookup {
}
#extractBitSequence (_: number, { bitOrderType, bitStoreType }: SiTypeDefBitSequence): TypeDef {
const bitOrder = this.#createSiDef(bitOrderType);
const bitStore = this.#createSiDef(bitStoreType);
// With the v3 of scale-info this swapped around, but obviously the decoder cannot determine
// the order. With that in-mind, we apply a detection for LSb0/Msb and set accordingly
const a = this.#createSiDef(bitOrderType);
const b = this.#createSiDef(bitStoreType);
const [bitOrder, bitStore] = ['bitvec::order::Lsb0', 'bitvec::order::Msb0'].includes(a.namespace || '')
? [a, b]
: [b, a];
// NOTE: Currently the BitVec type is one-way only, i.e. we only use it to decode, not
// re-encode stuff. As such we ignore the msb/lsb identifier given by bitOrderType, or rather
@@ -736,7 +745,7 @@ export class PortableRegistry extends Struct implements ILookup {
return this.getTypeDef(ids[0]);
}
const sub = ids.map((type) => this.#createSiDef(type));
const sub = ids.map((t) => this.#createSiDef(t));
return withTypeString(this.registry, {
info: TypeDefInfo.Tuple,
@@ -4,7 +4,7 @@
import type { PortableType, Si0Field, Si0LookupTypeId, Si0Path, Si0Type, Si0TypeDefArray, Si0TypeDefBitSequence, Si0TypeDefComposite, Si0TypeDefPrimitive, Si0TypeDefSequence, Si0TypeDefVariant, Si1Field, Si1TypeDef, SiTypeDef } from '../../interfaces';
import type { Registry } from '../../types';
import { assertUnreachable } from './util';
import { assertUnreachable } from '@polkadot/util';
function convertType (key: 'Compact' | 'Sequence'): (registry: Registry, si: Si0TypeDefSequence) => SiTypeDef {
return (registry: Registry, { type }: Si0TypeDefSequence) =>
@@ -1,7 +0,0 @@
// Copyright 2017-2022 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export function assertUnreachable (_x: never): never {
throw new Error("Didn't expect to get here");
}
+43 -36
View File
@@ -34,9 +34,9 @@ const BOXES = [['<', '>'], ['<', ','], [',', '>'], ['(', ')'], ['(', ','], [',',
* Creates a compatible type mapping
* @internal
**/
function compatType (compatTypes: TypeSpec[], _type: Text | string): number {
function compatType (specs: TypeSpec[], _type: Text | string): number {
const type = _type.toString();
const index = compatTypes.findIndex(({ def }) =>
const index = specs.findIndex(({ def }) =>
def.HistoricMetaCompat === type
);
@@ -44,23 +44,29 @@ function compatType (compatTypes: TypeSpec[], _type: Text | string): number {
return index;
}
return compatTypes.push({
return specs.push({
def: {
HistoricMetaCompat: type
}
}) - 1;
}
function makeTupleType (compatTypes: TypeSpec[], entries: number[]): number {
return compatTypes.push({
function compatTypes (specs: TypeSpec[], ...types: (Text | string)[]): void {
for (let i = 0; i < types.length; i++) {
compatType(specs, types[i]);
}
}
function makeTupleType (specs: TypeSpec[], entries: number[]): number {
return specs.push({
def: {
Tuple: entries
}
}) - 1;
}
function makeVariantType (modName: Text, variantType: string, compatTypes: TypeSpec[], variants: SiVariant[]): number {
return compatTypes.push({
function makeVariantType (modName: Text, variantType: string, specs: TypeSpec[], variants: SiVariant[]): number {
return specs.push({
def: {
Variant: { variants }
},
@@ -126,14 +132,14 @@ function setTypeOverride (sectionTypes: OverrideModuleType, types: Type[]): void
* Apply module-specific type overrides (always be done as part of toV14)
* @internal
**/
function convertCalls (compatTypes: TypeSpec[], registry: Registry, modName: Text, calls: FunctionMetadataV13[], sectionTypes: OverrideModuleType): PalletCallMetadataV14 {
function convertCalls (specs: TypeSpec[], registry: Registry, modName: Text, calls: FunctionMetadataV13[], sectionTypes: OverrideModuleType): PalletCallMetadataV14 {
const variants = calls.map(({ args, docs, name }, index): SiVariant => {
setTypeOverride(sectionTypes, args.map(({ type }) => type));
return registry.createTypeUnsafe('SiVariant', [{
docs,
fields: args.map(({ name, type }) =>
registry.createTypeUnsafe('SiField', [{ name, type: compatType(compatTypes, type) }])
registry.createTypeUnsafe('SiField', [{ name, type: compatType(specs, type) }])
),
index,
name
@@ -141,7 +147,7 @@ function convertCalls (compatTypes: TypeSpec[], registry: Registry, modName: Tex
});
return registry.createTypeUnsafe('PalletCallMetadataV14', [{
type: makeVariantType(modName, 'Call', compatTypes, variants)
type: makeVariantType(modName, 'Call', specs, variants)
}]);
}
@@ -149,14 +155,14 @@ function convertCalls (compatTypes: TypeSpec[], registry: Registry, modName: Tex
* Apply module-specific type overrides (always be done as part of toV14)
* @internal
*/
function convertConstants (compatTypes: TypeSpec[], registry: Registry, constants: ModuleConstantMetadataV13[], sectionTypes: OverrideModuleType): PalletConstantMetadataV14[] {
function convertConstants (specs: TypeSpec[], registry: Registry, constants: ModuleConstantMetadataV13[], sectionTypes: OverrideModuleType): PalletConstantMetadataV14[] {
return constants.map(({ docs, name, type, value }): PalletConstantMetadataV14 => {
setTypeOverride(sectionTypes, [type]);
return registry.createTypeUnsafe('PalletConstantMetadataV14', [{
docs,
name,
type: compatType(compatTypes, type),
type: compatType(specs, type),
value
}]);
});
@@ -167,7 +173,7 @@ function convertConstants (compatTypes: TypeSpec[], registry: Registry, constant
* @internal
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function convertErrors (compatTypes: TypeSpec[], registry: Registry, modName: Text, errors: ErrorMetadataV13[], _sectionTypes: OverrideModuleType): PalletErrorMetadataV14 {
function convertErrors (specs: TypeSpec[], registry: Registry, modName: Text, errors: ErrorMetadataV13[], _sectionTypes: OverrideModuleType): PalletErrorMetadataV14 {
const variants = errors.map(({ docs, name }, index): SiVariant =>
registry.createTypeUnsafe('SiVariant', [{
docs,
@@ -178,7 +184,7 @@ function convertErrors (compatTypes: TypeSpec[], registry: Registry, modName: Te
);
return registry.createTypeUnsafe('PalletErrorMetadataV14', [{
type: makeVariantType(modName, 'Error', compatTypes, variants)
type: makeVariantType(modName, 'Error', specs, variants)
}]);
}
@@ -186,14 +192,14 @@ function convertErrors (compatTypes: TypeSpec[], registry: Registry, modName: Te
* Apply module-specific type overrides (always be done as part of toV14)
* @internal
**/
function convertEvents (compatTypes: TypeSpec[], registry: Registry, modName: Text, events: EventMetadataV13[], sectionTypes: OverrideModuleType): PalletEventMetadataV14 {
function convertEvents (specs: TypeSpec[], registry: Registry, modName: Text, events: EventMetadataV13[], sectionTypes: OverrideModuleType): PalletEventMetadataV14 {
const variants = events.map(({ args, docs, name }, index): SiVariant => {
setTypeOverride(sectionTypes, args);
return registry.createTypeUnsafe('SiVariant', [{
docs,
fields: args.map((t) =>
registry.createTypeUnsafe('SiField', [{ type: compatType(compatTypes, t) }])
registry.createTypeUnsafe('SiField', [{ type: compatType(specs, t) }])
),
index,
name
@@ -201,20 +207,20 @@ function convertEvents (compatTypes: TypeSpec[], registry: Registry, modName: Te
});
return registry.createTypeUnsafe('PalletEventMetadataV14', [{
type: makeVariantType(modName, 'Event', compatTypes, variants)
type: makeVariantType(modName, 'Event', specs, variants)
}]);
}
function createMapEntry (compatTypes: TypeSpec[], registry: Registry, sectionTypes: OverrideModuleType, { hashers, keys, value }: MapDef): StorageEntryTypeV14 {
function createMapEntry (specs: TypeSpec[], registry: Registry, sectionTypes: OverrideModuleType, { hashers, keys, value }: MapDef): StorageEntryTypeV14 {
setTypeOverride(sectionTypes, [value, ...(Array.isArray(keys) ? keys : [keys])]);
return registry.createTypeUnsafe('StorageEntryTypeV14', [{
Map: {
hashers,
key: hashers.length === 1
? compatType(compatTypes, keys[0])
: makeTupleType(compatTypes, keys.map((t) => compatType(compatTypes, t))),
value: compatType(compatTypes, value)
? compatType(specs, keys[0])
: makeTupleType(specs, keys.map((t) => compatType(specs, t))),
value: compatType(specs, value)
}
}]);
}
@@ -223,7 +229,7 @@ function createMapEntry (compatTypes: TypeSpec[], registry: Registry, sectionTyp
* Apply module-specific storage type overrides (always part of toV14)
* @internal
**/
function convertStorage (compatTypes: TypeSpec[], registry: Registry, { items, prefix }: StorageMetadataV13, sectionTypes: OverrideModuleType): PalletStorageMetadataV14 {
function convertStorage (specs: TypeSpec[], registry: Registry, { items, prefix }: StorageMetadataV13, sectionTypes: OverrideModuleType): PalletStorageMetadataV14 {
return registry.createTypeUnsafe('PalletStorageMetadataV14', [{
items: items.map(({ docs, fallback, modifier, name, type }): StorageEntryMetadataV14 => {
let entryType: StorageEntryTypeV14;
@@ -234,12 +240,12 @@ function convertStorage (compatTypes: TypeSpec[], registry: Registry, { items, p
setTypeOverride(sectionTypes, [plain]);
entryType = registry.createTypeUnsafe('StorageEntryTypeV14', [{
Plain: compatType(compatTypes, plain)
Plain: compatType(specs, plain)
}]);
} else if (type.isMap) {
const map = type.asMap;
entryType = createMapEntry(compatTypes, registry, sectionTypes, {
entryType = createMapEntry(specs, registry, sectionTypes, {
hashers: [map.hasher],
keys: [map.key],
value: map.value
@@ -247,7 +253,7 @@ function convertStorage (compatTypes: TypeSpec[], registry: Registry, { items, p
} else if (type.isDoubleMap) {
const dm = type.asDoubleMap;
entryType = createMapEntry(compatTypes, registry, sectionTypes, {
entryType = createMapEntry(specs, registry, sectionTypes, {
hashers: [dm.hasher, dm.key2Hasher],
keys: [dm.key1, dm.key2],
value: dm.value
@@ -255,7 +261,7 @@ function convertStorage (compatTypes: TypeSpec[], registry: Registry, { items, p
} else {
const nm = type.asNMap;
entryType = createMapEntry(compatTypes, registry, sectionTypes, {
entryType = createMapEntry(specs, registry, sectionTypes, {
hashers: nm.hashers,
keys: nm.keyVec,
value: nm.value
@@ -288,17 +294,17 @@ function convertExtrinsic (registry: Registry, { signedExtensions, version }: Ex
}
/** @internal */
function createPallet (compatTypes: TypeSpec[], registry: Registry, mod: ModuleMetadataV13, { calls, constants, errors, events, storage }: { calls: FunctionMetadataV13[] | null, constants: ModuleConstantMetadataV13[], errors: ErrorMetadataV13[] | null, events: EventMetadataV13[] | null, storage: StorageMetadataV13 | null }): PalletMetadataV14 {
function createPallet (specs: TypeSpec[], registry: Registry, mod: ModuleMetadataV13, { calls, constants, errors, events, storage }: { calls: FunctionMetadataV13[] | null, constants: ModuleConstantMetadataV13[], errors: ErrorMetadataV13[] | null, events: EventMetadataV13[] | null, storage: StorageMetadataV13 | null }): PalletMetadataV14 {
const sectionTypes = getAliasTypes(registry, stringCamelCase(mod.name));
return registry.createTypeUnsafe('PalletMetadataV14', [{
calls: calls && convertCalls(compatTypes, registry, mod.name, calls, sectionTypes),
constants: convertConstants(compatTypes, registry, constants, sectionTypes),
errors: errors && convertErrors(compatTypes, registry, mod.name, errors, sectionTypes),
events: events && convertEvents(compatTypes, registry, mod.name, events, sectionTypes),
calls: calls && convertCalls(specs, registry, mod.name, calls, sectionTypes),
constants: convertConstants(specs, registry, constants, sectionTypes),
errors: errors && convertErrors(specs, registry, mod.name, errors, sectionTypes),
events: events && convertEvents(specs, registry, mod.name, events, sectionTypes),
index: mod.index,
name: mod.name,
storage: storage && convertStorage(compatTypes, registry, storage, sectionTypes)
storage: storage && convertStorage(specs, registry, storage, sectionTypes)
}]);
}
@@ -307,14 +313,15 @@ function createPallet (compatTypes: TypeSpec[], registry: Registry, mod: ModuleM
* @internal
**/
export function toV14 (registry: Registry, v13: MetadataV13, metaVersion: number): MetadataV14 {
const compatTypes: TypeSpec[] = [];
const specs: TypeSpec[] = [];
compatType(compatTypes, 'Null'); // position 0 always has Null
// position 0 always has Null, additionally add internal defaults
compatTypes(specs, 'Null', 'u8', 'u16', 'u32', 'u64');
registerOriginCaller(registry, v13.modules, metaVersion);
const extrinsic = convertExtrinsic(registry, v13.extrinsic);
const pallets = v13.modules.map((mod) =>
createPallet(compatTypes, registry, mod, {
createPallet(specs, registry, mod, {
calls: mod.calls.unwrapOr(null),
constants: mod.constants,
errors: mod.errors.length ? mod.errors : null,
@@ -326,7 +333,7 @@ export function toV14 (registry: Registry, v13: MetadataV13, metaVersion: number
return registry.createTypeUnsafe('MetadataV14', [{
extrinsic,
lookup: {
types: compatTypes.map((type, id) =>
types: specs.map((type, id) =>
registry.createTypeUnsafe('PortableType', [{ id, type }])
)
},
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types', path: 'auto', type: 'auto', version: '7.9.1' };
export const packageInfo = { name: '@polkadot/types', path: 'auto', type: 'auto', version: '7.10.1' };
+4 -4
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2022 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { AnyJson, AnyTuple, Codec, ICompact, INumber } from '@polkadot/types-codec/types';
import type { AnyJson, AnyTuple, Codec } from '@polkadot/types-codec/types';
import type { StorageEntryMetadataLatest, StorageEntryTypeLatest, StorageHasher } from '../interfaces/metadata';
import type { AllHashers } from '../interfaces/metadata/definitions';
import type { SiLookupTypeId } from '../interfaces/scaleInfo';
@@ -44,7 +44,7 @@ export function unwrapStorageSi (type: StorageEntryTypeLatest): SiLookupTypeId {
/** @internal */
export function unwrapStorageType (registry: Registry, type: StorageEntryTypeLatest, isOptional?: boolean): keyof InterfaceTypes {
const outputType = getSiName((registry).lookup, unwrapStorageSi(type));
const outputType = getSiName(registry.lookup, unwrapStorageSi(type));
return isOptional
? `Option<${outputType}>` as unknown as keyof InterfaceTypes
@@ -90,7 +90,7 @@ function decodeStorageKey (value?: string | Uint8Array | StorageKey | StorageEnt
}
/** @internal */
function decodeHashers <A extends AnyTuple> (registry: Registry, value: Uint8Array, hashers: [StorageHasher, ICompact<INumber>][]): A {
function decodeHashers <A extends AnyTuple> (registry: Registry, value: Uint8Array, hashers: [StorageHasher, SiLookupTypeId][]): A {
// the storage entry is xxhashAsU8a(prefix, 128) + xxhashAsU8a(method, 128), 256 bits total
let offset = 32;
const result = new Array<Codec>(hashers.length);
@@ -99,7 +99,7 @@ function decodeHashers <A extends AnyTuple> (registry: Registry, value: Uint8Arr
const [hasher, type] = hashers[i];
const [hashLen, canDecode] = HASHER_MAP[hasher.type as 'Identity'];
const decoded = canDecode
? registry.createTypeUnsafe(registry.createLookupType(type), [value.subarray(offset + hashLen)])
? registry.createTypeUnsafe(getSiName(registry.lookup, type), [value.subarray(offset + hashLen)])
: registry.createTypeUnsafe('Raw', [value.subarray(offset, offset + hashLen)]);
offset += hashLen + (canDecode ? decoded.encodedLength : 0);
+1
View File
@@ -8,6 +8,7 @@
{ "path": "./packages/api/tsconfig.spec.json" },
{ "path": "./packages/api-augment/tsconfig.build.json" },
{ "path": "./packages/api-augment/tsconfig.kusama.json" },
{ "path": "./packages/api-augment/tsconfig.kusama.spec.json" },
{ "path": "./packages/api-augment/tsconfig.polkadot.json" },
{ "path": "./packages/api-base/tsconfig.build.json" },
{ "path": "./packages/api-contract/tsconfig.build.json" },
+202 -200
View File
@@ -14,9 +14,9 @@ __metadata:
languageName: node
linkType: hard
"@babel/cli@npm:^7.17.3":
version: 7.17.3
resolution: "@babel/cli@npm:7.17.3"
"@babel/cli@npm:^7.17.6":
version: 7.17.6
resolution: "@babel/cli@npm:7.17.6"
dependencies:
"@jridgewell/trace-mapping": ^0.3.4
"@nicolo-ribaudo/chokidar-2": 2.1.8-no-fsevents.3
@@ -38,7 +38,7 @@ __metadata:
bin:
babel: ./bin/babel.js
babel-external-helpers: ./bin/babel-external-helpers.js
checksum: 83e4fe9f7236c1eb4bf5786c71e3d9a4f462aed1dca3096eeb12ab1d3927349ac9c2aedd6c59857fbe0a6a0b485216c454e1dd63264d6c18d2229c94b95a0653
checksum: 362c9baf14e3984bad2388647941e0ce3bf1894a5f25cd8595ca0b9bdcd8b94eb06d15eef6590e2215cfc5a191e186ae65c0c6214ed4a3eec226bd0eacc37c44
languageName: node
linkType: hard
@@ -58,9 +58,9 @@ __metadata:
languageName: node
linkType: hard
"@babel/core@npm:^7.1.0, @babel/core@npm:^7.12.3, @babel/core@npm:^7.17.4, @babel/core@npm:^7.7.2, @babel/core@npm:^7.8.0":
version: 7.17.4
resolution: "@babel/core@npm:7.17.4"
"@babel/core@npm:^7.1.0, @babel/core@npm:^7.12.3, @babel/core@npm:^7.17.5, @babel/core@npm:^7.7.2, @babel/core@npm:^7.8.0":
version: 7.17.5
resolution: "@babel/core@npm:7.17.5"
dependencies:
"@ampproject/remapping": ^2.1.0
"@babel/code-frame": ^7.16.7
@@ -77,7 +77,7 @@ __metadata:
gensync: ^1.0.0-beta.2
json5: ^2.1.2
semver: ^6.3.0
checksum: d367259b188fde69493fea407a1c134d6bb7a0d859cbe2c0f0d1f2464143bdee0fdfd3c8d45a2cdabdf321b95dd392cbc4f55e2d0c41a842a581d37fee4cef64
checksum: c5e7dddb4feaacb91175d22a6edc8e93804242328a82b80732c6e84a0647bc0a9c9d5b05f3ce13138b8e59bf7aba4ff9f7b7446302f141f243ba51df02c318a5
languageName: node
linkType: hard
@@ -1902,27 +1902,28 @@ __metadata:
languageName: node
linkType: hard
"@polkadot/api-augment@7.9.1, @polkadot/api-augment@workspace:packages/api-augment":
"@polkadot/api-augment@7.10.1, @polkadot/api-augment@workspace:packages/api-augment":
version: 0.0.0-use.local
resolution: "@polkadot/api-augment@workspace:packages/api-augment"
dependencies:
"@babel/runtime": ^7.17.2
"@polkadot/api-base": 7.9.1
"@polkadot/rpc-augment": 7.9.1
"@polkadot/types": 7.9.1
"@polkadot/types-augment": 7.9.1
"@polkadot/types-codec": 7.9.1
"@polkadot/api-base": 7.10.1
"@polkadot/rpc-augment": 7.10.1
"@polkadot/types": 7.10.1
"@polkadot/types-augment": 7.10.1
"@polkadot/types-codec": 7.10.1
"@polkadot/types-support": 7.10.1
"@polkadot/util": ^8.4.1
languageName: unknown
linkType: soft
"@polkadot/api-base@7.9.1, @polkadot/api-base@workspace:packages/api-base":
"@polkadot/api-base@7.10.1, @polkadot/api-base@workspace:packages/api-base":
version: 0.0.0-use.local
resolution: "@polkadot/api-base@workspace:packages/api-base"
dependencies:
"@babel/runtime": ^7.17.2
"@polkadot/rpc-core": 7.9.1
"@polkadot/types": 7.9.1
"@polkadot/rpc-core": 7.10.1
"@polkadot/types": 7.10.1
"@polkadot/util": ^8.4.1
rxjs: ^7.5.4
languageName: unknown
@@ -1933,56 +1934,56 @@ __metadata:
resolution: "@polkadot/api-contract@workspace:packages/api-contract"
dependencies:
"@babel/runtime": ^7.17.2
"@polkadot/api": 7.9.1
"@polkadot/api-augment": 7.9.1
"@polkadot/api": 7.10.1
"@polkadot/api-augment": 7.10.1
"@polkadot/keyring": ^8.4.1
"@polkadot/types": 7.9.1
"@polkadot/types-codec": 7.9.1
"@polkadot/types-create": 7.9.1
"@polkadot/types": 7.10.1
"@polkadot/types-codec": 7.10.1
"@polkadot/types-create": 7.10.1
"@polkadot/util": ^8.4.1
"@polkadot/util-crypto": ^8.4.1
rxjs: ^7.5.4
languageName: unknown
linkType: soft
"@polkadot/api-derive@7.9.1, @polkadot/api-derive@workspace:packages/api-derive":
"@polkadot/api-derive@7.10.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.17.2
"@polkadot/api": 7.9.1
"@polkadot/api-augment": 7.9.1
"@polkadot/api-base": 7.9.1
"@polkadot/rpc-augment": 7.9.1
"@polkadot/rpc-core": 7.9.1
"@polkadot/rpc-provider": 7.9.1
"@polkadot/types": 7.9.1
"@polkadot/types-codec": 7.9.1
"@polkadot/types-support": 7.9.1
"@polkadot/api": 7.10.1
"@polkadot/api-augment": 7.10.1
"@polkadot/api-base": 7.10.1
"@polkadot/rpc-augment": 7.10.1
"@polkadot/rpc-core": 7.10.1
"@polkadot/rpc-provider": 7.10.1
"@polkadot/types": 7.10.1
"@polkadot/types-codec": 7.10.1
"@polkadot/types-support": 7.10.1
"@polkadot/util": ^8.4.1
"@polkadot/util-crypto": ^8.4.1
rxjs: ^7.5.4
languageName: unknown
linkType: soft
"@polkadot/api@7.9.1, @polkadot/api@workspace:packages/api":
"@polkadot/api@7.10.1, @polkadot/api@workspace:packages/api":
version: 0.0.0-use.local
resolution: "@polkadot/api@workspace:packages/api"
dependencies:
"@babel/runtime": ^7.17.2
"@polkadot/api-augment": 7.9.1
"@polkadot/api-base": 7.9.1
"@polkadot/api-derive": 7.9.1
"@polkadot/api-augment": 7.10.1
"@polkadot/api-base": 7.10.1
"@polkadot/api-derive": 7.10.1
"@polkadot/keyring": ^8.4.1
"@polkadot/rpc-augment": 7.9.1
"@polkadot/rpc-core": 7.9.1
"@polkadot/rpc-provider": 7.9.1
"@polkadot/types": 7.9.1
"@polkadot/types-augment": 7.9.1
"@polkadot/types-codec": 7.9.1
"@polkadot/types-create": 7.9.1
"@polkadot/types-known": 7.9.1
"@polkadot/types-support": 7.9.1
"@polkadot/rpc-augment": 7.10.1
"@polkadot/rpc-core": 7.10.1
"@polkadot/rpc-provider": 7.10.1
"@polkadot/types": 7.10.1
"@polkadot/types-augment": 7.10.1
"@polkadot/types-codec": 7.10.1
"@polkadot/types-create": 7.10.1
"@polkadot/types-known": 7.10.1
"@polkadot/types-support": 7.10.1
"@polkadot/util": ^8.4.1
"@polkadot/util-crypto": ^8.4.1
eventemitter3: ^4.0.7
@@ -1990,12 +1991,12 @@ __metadata:
languageName: unknown
linkType: soft
"@polkadot/dev@npm:^0.65.60":
version: 0.65.60
resolution: "@polkadot/dev@npm:0.65.60"
"@polkadot/dev@npm:^0.65.73":
version: 0.65.73
resolution: "@polkadot/dev@npm:0.65.73"
dependencies:
"@babel/cli": ^7.17.3
"@babel/core": ^7.17.4
"@babel/cli": ^7.17.6
"@babel/core": ^7.17.5
"@babel/plugin-proposal-nullish-coalescing-operator": ^7.16.7
"@babel/plugin-proposal-numeric-separator": ^7.16.7
"@babel/plugin-proposal-optional-chaining": ^7.16.7
@@ -2011,33 +2012,33 @@ __metadata:
"@babel/register": ^7.17.0
"@babel/runtime": ^7.17.2
"@rollup/plugin-alias": ^3.1.9
"@rollup/plugin-commonjs": ^21.0.1
"@rollup/plugin-commonjs": ^21.0.2
"@rollup/plugin-inject": ^4.0.4
"@rollup/plugin-json": ^4.1.0
"@rollup/plugin-node-resolve": ^13.1.3
"@rushstack/eslint-patch": ^1.1.0
"@typescript-eslint/eslint-plugin": 5.12.0
"@typescript-eslint/parser": 5.12.0
"@typescript-eslint/eslint-plugin": 5.12.1
"@typescript-eslint/parser": 5.12.1
"@vue/component-compiler-utils": ^3.3.0
babel-jest: ^27.5.1
babel-plugin-module-extension-resolver: ^1.0.0-rc.2
babel-plugin-module-resolver: ^4.1.0
babel-plugin-styled-components: ^2.0.2
browserslist: ^4.19.1
babel-plugin-styled-components: ^2.0.5
browserslist: ^4.19.3
coveralls: ^3.1.1
eslint: ^8.9.0
eslint-config-standard: ^16.0.3
eslint-import-resolver-node: ^0.3.6
eslint-plugin-header: ^3.1.1
eslint-plugin-import: ^2.25.4
eslint-plugin-import-newlines: ^1.2.0
eslint-plugin-import-newlines: ^1.2.1
eslint-plugin-node: ^11.1.0
eslint-plugin-promise: ^6.0.0
eslint-plugin-react: ^7.28.0
eslint-plugin-react-hooks: ^4.3.0
eslint-plugin-simple-import-sort: ^7.0.0
eslint-plugin-sort-destructure-keys: ^1.4.0
fs-extra: ^10.0.0
fs-extra: ^10.0.1
gh-pages: ^3.2.3
gh-release: ^6.0.1
glob: ^7.2.0
@@ -2052,7 +2053,7 @@ __metadata:
mkdirp: ^1.0.4
prettier: ^2.5.1
rimraf: ^3.0.2
rollup: ^2.67.2
rollup: ^2.68.0
rollup-plugin-cleanup: ^3.2.1
typescript: ^4.5.5
yargs: ^17.3.1
@@ -2078,7 +2079,7 @@ __metadata:
polkadot-exec-rollup: scripts/polkadot-exec-rollup.mjs
polkadot-exec-tsc: scripts/polkadot-exec-tsc.mjs
polkadot-exec-webpack: scripts/polkadot-exec-webpack.mjs
checksum: b99c43951367d2e74aea08072e7a37aa256fe59af9f24de4de09c9175426b7515c9b61080662f407c309585df6ddb8d496c1b44fa23580f76c77faab03976924
checksum: e1a636d1f91cea4f84d207b6f2e2c251417d3f1390b8039dff695746992f1d977a99f6800b231a2676ca224fe4559b5e1a73e695b46c95366a94a7acab6599c1
languageName: node
linkType: hard
@@ -2107,40 +2108,40 @@ __metadata:
languageName: node
linkType: hard
"@polkadot/rpc-augment@7.9.1, @polkadot/rpc-augment@workspace:packages/rpc-augment":
"@polkadot/rpc-augment@7.10.1, @polkadot/rpc-augment@workspace:packages/rpc-augment":
version: 0.0.0-use.local
resolution: "@polkadot/rpc-augment@workspace:packages/rpc-augment"
dependencies:
"@babel/runtime": ^7.17.2
"@polkadot/rpc-core": 7.9.1
"@polkadot/types": 7.9.1
"@polkadot/types-codec": 7.9.1
"@polkadot/rpc-core": 7.10.1
"@polkadot/types": 7.10.1
"@polkadot/types-codec": 7.10.1
"@polkadot/util": ^8.4.1
languageName: unknown
linkType: soft
"@polkadot/rpc-core@7.9.1, @polkadot/rpc-core@workspace:packages/rpc-core":
"@polkadot/rpc-core@7.10.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.17.2
"@polkadot/keyring": ^8.4.1
"@polkadot/rpc-augment": 7.9.1
"@polkadot/rpc-provider": 7.9.1
"@polkadot/types": 7.9.1
"@polkadot/rpc-augment": 7.10.1
"@polkadot/rpc-provider": 7.10.1
"@polkadot/types": 7.10.1
"@polkadot/util": ^8.4.1
rxjs: ^7.5.4
languageName: unknown
linkType: soft
"@polkadot/rpc-provider@7.9.1, @polkadot/rpc-provider@workspace:packages/rpc-provider":
"@polkadot/rpc-provider@7.10.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.17.2
"@polkadot/keyring": ^8.4.1
"@polkadot/types": 7.9.1
"@polkadot/types-support": 7.9.1
"@polkadot/types": 7.10.1
"@polkadot/types-support": 7.10.1
"@polkadot/util": ^8.4.1
"@polkadot/util-crypto": ^8.4.1
"@polkadot/x-fetch": ^8.4.1
@@ -2156,18 +2157,18 @@ __metadata:
version: 0.0.0-use.local
resolution: "@polkadot/typegen@workspace:packages/typegen"
dependencies:
"@babel/core": ^7.17.4
"@babel/core": ^7.17.5
"@babel/register": ^7.17.0
"@babel/runtime": ^7.17.2
"@polkadot/api": 7.9.1
"@polkadot/api-augment": 7.9.1
"@polkadot/rpc-augment": 7.9.1
"@polkadot/rpc-provider": 7.9.1
"@polkadot/types": 7.9.1
"@polkadot/types-augment": 7.9.1
"@polkadot/types-codec": 7.9.1
"@polkadot/types-create": 7.9.1
"@polkadot/types-support": 7.9.1
"@polkadot/api": 7.10.1
"@polkadot/api-augment": 7.10.1
"@polkadot/rpc-augment": 7.10.1
"@polkadot/rpc-provider": 7.10.1
"@polkadot/types": 7.10.1
"@polkadot/types-augment": 7.10.1
"@polkadot/types-codec": 7.10.1
"@polkadot/types-create": 7.10.1
"@polkadot/types-support": 7.10.1
"@polkadot/util": ^8.4.1
"@polkadot/x-ws": ^8.4.1
"@types/websocket": ^1.0.5
@@ -2184,55 +2185,55 @@ __metadata:
languageName: unknown
linkType: soft
"@polkadot/types-augment@7.9.1, @polkadot/types-augment@workspace:packages/types-augment":
"@polkadot/types-augment@7.10.1, @polkadot/types-augment@workspace:packages/types-augment":
version: 0.0.0-use.local
resolution: "@polkadot/types-augment@workspace:packages/types-augment"
dependencies:
"@babel/runtime": ^7.17.2
"@polkadot/types": 7.9.1
"@polkadot/types-codec": 7.9.1
"@polkadot/types": 7.10.1
"@polkadot/types-codec": 7.10.1
"@polkadot/util": ^8.4.1
languageName: unknown
linkType: soft
"@polkadot/types-codec@7.9.1, @polkadot/types-codec@workspace:packages/types-codec":
"@polkadot/types-codec@7.10.1, @polkadot/types-codec@workspace:packages/types-codec":
version: 0.0.0-use.local
resolution: "@polkadot/types-codec@workspace:packages/types-codec"
dependencies:
"@babel/runtime": ^7.17.2
"@polkadot/types": 7.9.1
"@polkadot/types-augment": 7.9.1
"@polkadot/types-support": 7.9.1
"@polkadot/types": 7.10.1
"@polkadot/types-augment": 7.10.1
"@polkadot/types-support": 7.10.1
"@polkadot/util": ^8.4.1
"@polkadot/util-crypto": ^8.4.1
languageName: unknown
linkType: soft
"@polkadot/types-create@7.9.1, @polkadot/types-create@workspace:packages/types-create":
"@polkadot/types-create@7.10.1, @polkadot/types-create@workspace:packages/types-create":
version: 0.0.0-use.local
resolution: "@polkadot/types-create@workspace:packages/types-create"
dependencies:
"@babel/runtime": ^7.17.2
"@polkadot/types": 7.9.1
"@polkadot/types-codec": 7.9.1
"@polkadot/types": 7.10.1
"@polkadot/types-codec": 7.10.1
"@polkadot/util": ^8.4.1
languageName: unknown
linkType: soft
"@polkadot/types-known@7.9.1, @polkadot/types-known@workspace:packages/types-known":
"@polkadot/types-known@7.10.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.17.2
"@polkadot/networks": ^8.4.1
"@polkadot/types": 7.9.1
"@polkadot/types-codec": 7.9.1
"@polkadot/types-create": 7.9.1
"@polkadot/types": 7.10.1
"@polkadot/types-codec": 7.10.1
"@polkadot/types-create": 7.10.1
"@polkadot/util": ^8.4.1
languageName: unknown
linkType: soft
"@polkadot/types-support@7.9.1, @polkadot/types-support@workspace:packages/types-support":
"@polkadot/types-support@7.10.1, @polkadot/types-support@workspace:packages/types-support":
version: 0.0.0-use.local
resolution: "@polkadot/types-support@workspace:packages/types-support"
dependencies:
@@ -2241,16 +2242,16 @@ __metadata:
languageName: unknown
linkType: soft
"@polkadot/types@7.9.1, @polkadot/types@workspace:packages/types":
"@polkadot/types@7.10.1, @polkadot/types@workspace:packages/types":
version: 0.0.0-use.local
resolution: "@polkadot/types@workspace:packages/types"
dependencies:
"@babel/runtime": ^7.17.2
"@polkadot/keyring": ^8.4.1
"@polkadot/types-augment": 7.9.1
"@polkadot/types-codec": 7.9.1
"@polkadot/types-create": 7.9.1
"@polkadot/types-support": 7.9.1
"@polkadot/types-augment": 7.10.1
"@polkadot/types-codec": 7.10.1
"@polkadot/types-create": 7.10.1
"@polkadot/types-support": 7.10.1
"@polkadot/util": ^8.4.1
"@polkadot/util-crypto": ^8.4.1
rxjs: ^7.5.4
@@ -2410,9 +2411,9 @@ __metadata:
languageName: node
linkType: hard
"@rollup/plugin-commonjs@npm:^21.0.1":
version: 21.0.1
resolution: "@rollup/plugin-commonjs@npm:21.0.1"
"@rollup/plugin-commonjs@npm:^21.0.2":
version: 21.0.2
resolution: "@rollup/plugin-commonjs@npm:21.0.2"
dependencies:
"@rollup/pluginutils": ^3.1.0
commondir: ^1.0.1
@@ -2423,7 +2424,7 @@ __metadata:
resolve: ^1.17.0
peerDependencies:
rollup: ^2.38.3
checksum: 3e56be58c72d655face6f361f85923ddcc3cc07760b5a3a91cfc728115dfed358fc595781148c512d53a03be8c703133379f228e78fd2aed8655fae9d83800b6
checksum: 5fd4c7b75d7881070f4395d7ba5f9035934f53b25e92d136583cc794461a456efc1e2a2204f946ec567dfea58073c38cb48f24d27155b89af0df0447c2cd0758
languageName: node
linkType: hard
@@ -2640,13 +2641,13 @@ __metadata:
languageName: node
linkType: hard
"@types/jest@npm:^27.4.0":
version: 27.4.0
resolution: "@types/jest@npm:27.4.0"
"@types/jest@npm:^27.4.1":
version: 27.4.1
resolution: "@types/jest@npm:27.4.1"
dependencies:
jest-diff: ^27.0.0
jest-matcher-utils: ^27.0.0
pretty-format: ^27.0.0
checksum: d2350267f954f9a2e4a15e5f02fbf19a77abfb9fd9e57a954de1fb0e9a0d3d5f8d3646ac7d9c42aeb4b4d828d2e70624ec149c85bb50a48634a54eed8429e1f8
checksum: 5184f3eef4832d01ee8f59bed15eec45ccc8e29c724a5e6ce37bf74396b37bdf04f557000f45ba4fc38ae6075cf9cfcce3d7a75abc981023c61ceb27230a93e4
languageName: node
linkType: hard
@@ -2756,13 +2757,13 @@ __metadata:
languageName: node
linkType: hard
"@typescript-eslint/eslint-plugin@npm:5.12.0":
version: 5.12.0
resolution: "@typescript-eslint/eslint-plugin@npm:5.12.0"
"@typescript-eslint/eslint-plugin@npm:5.12.1":
version: 5.12.1
resolution: "@typescript-eslint/eslint-plugin@npm:5.12.1"
dependencies:
"@typescript-eslint/scope-manager": 5.12.0
"@typescript-eslint/type-utils": 5.12.0
"@typescript-eslint/utils": 5.12.0
"@typescript-eslint/scope-manager": 5.12.1
"@typescript-eslint/type-utils": 5.12.1
"@typescript-eslint/utils": 5.12.1
debug: ^4.3.2
functional-red-black-tree: ^1.0.1
ignore: ^5.1.8
@@ -2775,42 +2776,42 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
checksum: ac7074b51456748ef8770d82f5b4e691e1b93bb1353b448bb1b43db5b5a9722a6a012dc1dc0a3b35ab0c0ca7c1b5412f535ad992115132ed84ed6f4179778d37
checksum: 007f89f6ce8744a15cbdb1953efd41fcb4af84357070d8e13ea5d0fbbca0c9c6cfdc0598fd00a793100a0c37104e68dd61d5b7cada7abbcc5dfec50ea480b8ba
languageName: node
linkType: hard
"@typescript-eslint/parser@npm:5.12.0":
version: 5.12.0
resolution: "@typescript-eslint/parser@npm:5.12.0"
"@typescript-eslint/parser@npm:5.12.1":
version: 5.12.1
resolution: "@typescript-eslint/parser@npm:5.12.1"
dependencies:
"@typescript-eslint/scope-manager": 5.12.0
"@typescript-eslint/types": 5.12.0
"@typescript-eslint/typescript-estree": 5.12.0
"@typescript-eslint/scope-manager": 5.12.1
"@typescript-eslint/types": 5.12.1
"@typescript-eslint/typescript-estree": 5.12.1
debug: ^4.3.2
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
peerDependenciesMeta:
typescript:
optional: true
checksum: 0453c14d967ebba4ebe0d763882b7a1258f23a710d127f53196d360b78722d880cc8c0299feb52ecc4e10600834c22559bf543211249d878efad864f7ec856bc
checksum: d2995b00937de1d289d0a5742ad0744cfa8fbaed1a1a965eaa5dc8dca6e36e18f5c3802148c4bde0ab014a91330ebe186d01b0871ee30f36ac41361dc1d525d4
languageName: node
linkType: hard
"@typescript-eslint/scope-manager@npm:5.12.0":
version: 5.12.0
resolution: "@typescript-eslint/scope-manager@npm:5.12.0"
"@typescript-eslint/scope-manager@npm:5.12.1":
version: 5.12.1
resolution: "@typescript-eslint/scope-manager@npm:5.12.1"
dependencies:
"@typescript-eslint/types": 5.12.0
"@typescript-eslint/visitor-keys": 5.12.0
checksum: 87cc4e8ab3b495293e51685566cafca6f217c7328fc1210e4a9c3a89e864c5e3a04ddde11708e07820185fd158cb448980607a93fd658fa2089c152f27a847d0
"@typescript-eslint/types": 5.12.1
"@typescript-eslint/visitor-keys": 5.12.1
checksum: b6e7f45b4fe39397430149ad005f7d28aa75a063dacfc947514abd52ba5235fecf937784416dfb7e8c168025b1bc74611332ceb214045cc362922e4b311bcb11
languageName: node
linkType: hard
"@typescript-eslint/type-utils@npm:5.12.0":
version: 5.12.0
resolution: "@typescript-eslint/type-utils@npm:5.12.0"
"@typescript-eslint/type-utils@npm:5.12.1":
version: 5.12.1
resolution: "@typescript-eslint/type-utils@npm:5.12.1"
dependencies:
"@typescript-eslint/utils": 5.12.0
"@typescript-eslint/utils": 5.12.1
debug: ^4.3.2
tsutils: ^3.21.0
peerDependencies:
@@ -2818,7 +2819,7 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
checksum: 90390603319441493b62611730db78f8a732e32a5d9097d1e9c6581da6caeb71cc08a3ed6c716f2fc490b153f956c9a2471d9fbe97c22214ca86f58511c7581a
checksum: 3f25e650f3be2af93d9cb1b26120b306af11c7cf36b3bd13f1c97f5c875a4abd282f8a0ae0daff0b90b4734c0dae3828b9ec508d46f65fd6cf6389a5b037fe26
languageName: node
linkType: hard
@@ -2829,19 +2830,19 @@ __metadata:
languageName: node
linkType: hard
"@typescript-eslint/types@npm:5.12.0":
version: 5.12.0
resolution: "@typescript-eslint/types@npm:5.12.0"
checksum: f5e7f8270cb0f9f18886bf00f8f1fd589b793f4c05dc2de53cc826beb969161e19ffc10f51237402fb9f3d24f5aaf3bb41b1d8da70e115ec3ff11e79b3471988
"@typescript-eslint/types@npm:5.12.1":
version: 5.12.1
resolution: "@typescript-eslint/types@npm:5.12.1"
checksum: 753cb4b0f266500298f07c0386d72e7d9570f26e2deb7017fd677d21bb8bca7f2ca01d3f4b43d86fbb7337a76f0c9da86657de96f107dba92632d726b4e7797e
languageName: node
linkType: hard
"@typescript-eslint/typescript-estree@npm:5.12.0":
version: 5.12.0
resolution: "@typescript-eslint/typescript-estree@npm:5.12.0"
"@typescript-eslint/typescript-estree@npm:5.12.1":
version: 5.12.1
resolution: "@typescript-eslint/typescript-estree@npm:5.12.1"
dependencies:
"@typescript-eslint/types": 5.12.0
"@typescript-eslint/visitor-keys": 5.12.0
"@typescript-eslint/types": 5.12.1
"@typescript-eslint/visitor-keys": 5.12.1
debug: ^4.3.2
globby: ^11.0.4
is-glob: ^4.0.3
@@ -2850,7 +2851,7 @@ __metadata:
peerDependenciesMeta:
typescript:
optional: true
checksum: 6a8e852c210b20370eb564f3beb245c425e65a4de3e78a1e2f278a241b6acf72ba43b10767df18fc1654b529453529f721fa673569406ace4011712c9c837900
checksum: 5677f5550fdc24879b51b3bc4c7551a5b241f70cf8f4cfe0fa2dc270dcd858c6d5085bf784c0bd471bb71da5abbbcf1ec44dc84a688ce61107d5ddba21d235ae
languageName: node
linkType: hard
@@ -2872,19 +2873,19 @@ __metadata:
languageName: node
linkType: hard
"@typescript-eslint/utils@npm:5.12.0":
version: 5.12.0
resolution: "@typescript-eslint/utils@npm:5.12.0"
"@typescript-eslint/utils@npm:5.12.1":
version: 5.12.1
resolution: "@typescript-eslint/utils@npm:5.12.1"
dependencies:
"@types/json-schema": ^7.0.9
"@typescript-eslint/scope-manager": 5.12.0
"@typescript-eslint/types": 5.12.0
"@typescript-eslint/typescript-estree": 5.12.0
"@typescript-eslint/scope-manager": 5.12.1
"@typescript-eslint/types": 5.12.1
"@typescript-eslint/typescript-estree": 5.12.1
eslint-scope: ^5.1.1
eslint-utils: ^3.0.0
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
checksum: 34c394db0510be78c5cbb8928c9eb81405a117dd9e5903a149e4f3c20218dcda89a29e5012984d07c8ce9e5c7f5d7c38f5c3061558028f3f518ac98bbeb9a006
checksum: 0eb277ad4e60fa46b586d5df8e05be6e0d3963a59cf409a348e2c512d5e88d657a56026754ee10c31ee1333794e145f7ffe33e08d28aa1bed4b4ab4b02a95712
languageName: node
linkType: hard
@@ -2898,13 +2899,13 @@ __metadata:
languageName: node
linkType: hard
"@typescript-eslint/visitor-keys@npm:5.12.0":
version: 5.12.0
resolution: "@typescript-eslint/visitor-keys@npm:5.12.0"
"@typescript-eslint/visitor-keys@npm:5.12.1":
version: 5.12.1
resolution: "@typescript-eslint/visitor-keys@npm:5.12.1"
dependencies:
"@typescript-eslint/types": 5.12.0
"@typescript-eslint/types": 5.12.1
eslint-visitor-keys: ^3.0.0
checksum: c3774f542aae801926edf86fe6cab534c4cdac914b035730912443ed53fcc701b0f0e7b1a0d5fc959484637c55f63409fc43df5508c334e202d66d4654484d11
checksum: ada52c77dc42d055a6cefb294b9a893d680d125eb0fc5cc0daf2f85007c603ef688f4f5a865893758e00e89739850409bb748e26bb8c834372409d24ea820677
languageName: node
linkType: hard
@@ -3379,17 +3380,18 @@ __metadata:
languageName: node
linkType: hard
"babel-plugin-styled-components@npm:^2.0.2":
version: 2.0.2
resolution: "babel-plugin-styled-components@npm:2.0.2"
"babel-plugin-styled-components@npm:^2.0.5":
version: 2.0.5
resolution: "babel-plugin-styled-components@npm:2.0.5"
dependencies:
"@babel/helper-annotate-as-pure": ^7.16.0
"@babel/helper-module-imports": ^7.16.0
babel-plugin-syntax-jsx: ^6.18.0
lodash: ^4.17.11
picomatch: ^2.3.0
peerDependencies:
styled-components: ">= 2"
checksum: 3de729e909506b8dda27567fa561aa2f50822f1151f0d321303790afa45ffc0698f0d6836b8c8fd5f24845f4e1b181f8c51532dd9c1fa7a15fa37033a445c137
checksum: 0aa9dd2ab650bde4916070df34d25788d7dbdec71b7192b5686bd7ba4dd9d8e9233187c3111cb1d136e6309f6636298e0f40930865da3ad7e0f67000386c8b9d
languageName: node
linkType: hard
@@ -3547,18 +3549,18 @@ __metadata:
languageName: node
linkType: hard
"browserslist@npm:^4.17.5, browserslist@npm:^4.19.1":
version: 4.19.1
resolution: "browserslist@npm:4.19.1"
"browserslist@npm:^4.17.5, browserslist@npm:^4.19.1, browserslist@npm:^4.19.3":
version: 4.19.3
resolution: "browserslist@npm:4.19.3"
dependencies:
caniuse-lite: ^1.0.30001286
electron-to-chromium: ^1.4.17
caniuse-lite: ^1.0.30001312
electron-to-chromium: ^1.4.71
escalade: ^3.1.1
node-releases: ^2.0.1
node-releases: ^2.0.2
picocolors: ^1.0.0
bin:
browserslist: cli.js
checksum: c0777fd483691638fd6801e16c9d809e1d65f6d2b06db2e806654be51045cbab1452a89841a2c5caea2cbe19d621b4f1d391cffbb24512aa33280039ab345875
checksum: c28958313dd17f345dd6e26379cc863126cd7d855588e57a1ed9e552a1135d64f05ec57063b48fff0d94a9b785bd248e9472c2d63ce8460ca56fc2444f5a1e66
languageName: node
linkType: hard
@@ -3651,10 +3653,10 @@ __metadata:
languageName: node
linkType: hard
"caniuse-lite@npm:^1.0.30001286":
version: 1.0.30001286
resolution: "caniuse-lite@npm:1.0.30001286"
checksum: 04de4742552d4aeb713677b40693d9ac1fbd259573e0ff739565278bcecb6f398f3227546a4e930f4d5cf95b61458f4a53c9c1f90f5b0c4f6063b32e4c54b89e
"caniuse-lite@npm:^1.0.30001312":
version: 1.0.30001312
resolution: "caniuse-lite@npm:1.0.30001312"
checksum: 753fb9ea1e02e999430b323a71b5acab5120f3b5fc0161b01669f54a3ef5c5296240b6ae9b79b12a3742e3aed216aa9ee3d5398a23c16d08625ccd376b79545d
languageName: node
linkType: hard
@@ -4485,10 +4487,10 @@ __metadata:
languageName: node
linkType: hard
"electron-to-chromium@npm:^1.4.17":
version: 1.4.17
resolution: "electron-to-chromium@npm:1.4.17"
checksum: d0bafe96ea345167c1a4c5d4626a26a3bd7f75d3fe48bdc1a1dc53fad226b08245fa700f06c28d2366913ec506eba0e57f7fd9a630cc5669a08f27614c8e63a9
"electron-to-chromium@npm:^1.4.71":
version: 1.4.71
resolution: "electron-to-chromium@npm:1.4.71"
checksum: ecb2546eed6b0e95003d787c259de730f32e2f5c0fa2acb27069c0cd21378cbc2a6c7516f4ec677a5960db4e180644f87ed91a729825a238454e31e4e74617db
languageName: node
linkType: hard
@@ -4733,14 +4735,14 @@ __metadata:
languageName: node
linkType: hard
"eslint-plugin-import-newlines@npm:^1.2.0":
version: 1.2.0
resolution: "eslint-plugin-import-newlines@npm:1.2.0"
"eslint-plugin-import-newlines@npm:^1.2.1":
version: 1.2.1
resolution: "eslint-plugin-import-newlines@npm:1.2.1"
peerDependencies:
eslint: ">=6.0.0"
bin:
import-linter: lib/index.js
checksum: aa6db47826dd11e775fd18a367b1cf14d411c371c6f5d421aeaca917b426934cff6b411de5c4253b03f8f962634d8b9d247ba874d5310296dc0a43690dc17d7e
checksum: c2eb87241f73d1a968a46a10c0529ea17ac00ef534571e0755bf6b3ed07b6ea2fa2152f19700fd9bfc91c32936cd65b69dc66c0cc23a752169b3409a176ddb7f
languageName: node
linkType: hard
@@ -5357,14 +5359,14 @@ __metadata:
languageName: node
linkType: hard
"fs-extra@npm:^10.0.0":
version: 10.0.0
resolution: "fs-extra@npm:10.0.0"
"fs-extra@npm:^10.0.1":
version: 10.0.1
resolution: "fs-extra@npm:10.0.1"
dependencies:
graceful-fs: ^4.2.0
jsonfile: ^6.0.1
universalify: ^2.0.0
checksum: 5285a3d8f34b917cf2b66af8c231a40c1623626e9d701a20051d3337be16c6d7cac94441c8b3732d47a92a2a027886ca93c69b6a4ae6aee3c89650d2a8880c0a
checksum: c1faaa5eb9e1c5c7c7ff09f966e93922ecb068ae1b04801cfc983ef05fcc1f66bfbb8d8d0b745c910014c7a2e7317fb6cf3bfe7390450c1157e3cc1a218f221d
languageName: node
linkType: hard
@@ -6621,7 +6623,7 @@ fsevents@~2.1.2:
languageName: node
linkType: hard
"jest-diff@npm:^27.0.0, jest-diff@npm:^27.5.1":
"jest-diff@npm:^27.5.1":
version: 27.5.1
resolution: "jest-diff@npm:27.5.1"
dependencies:
@@ -6750,7 +6752,7 @@ fsevents@~2.1.2:
languageName: node
linkType: hard
"jest-matcher-utils@npm:^27.5.1":
"jest-matcher-utils@npm:^27.0.0, jest-matcher-utils@npm:^27.5.1":
version: 27.5.1
resolution: "jest-matcher-utils@npm:27.5.1"
dependencies:
@@ -7819,10 +7821,10 @@ fsevents@~2.1.2:
languageName: node
linkType: hard
"node-releases@npm:^2.0.1":
version: 2.0.1
resolution: "node-releases@npm:2.0.1"
checksum: b20dd8d4bced11f75060f0387e05e76b9dc4a0451f7bb3516eade6f50499ea7768ba95d8a60d520c193402df1e58cb3fe301510cc1c1ad68949c3d57b5149866
"node-releases@npm:^2.0.2":
version: 2.0.2
resolution: "node-releases@npm:2.0.2"
checksum: da858bf86b4d512842379749f5a5e4196ddab05ba18ffcf29f05bf460beceaca927f070f4430bb5046efec18941ddbc85e4c5fdbb83afc28a38dd6069a2f255e
languageName: node
linkType: hard
@@ -8250,10 +8252,10 @@ fsevents@~2.1.2:
languageName: node
linkType: hard
"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.2, picomatch@npm:^2.2.3":
version: 2.3.0
resolution: "picomatch@npm:2.3.0"
checksum: 16818720ea7c5872b6af110760dee856c8e4cd79aed1c7a006d076b1cc09eff3ae41ca5019966694c33fbd2e1cc6ea617ab10e4adac6df06556168f13be3fca2
"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.2, picomatch@npm:^2.2.3, picomatch@npm:^2.3.0":
version: 2.3.1
resolution: "picomatch@npm:2.3.1"
checksum: 050c865ce81119c4822c45d3c84f1ced46f93a0126febae20737bd05ca20589c564d6e9226977df859ed5e03dc73f02584a2b0faad36e896936238238b0446cf
languageName: node
linkType: hard
@@ -8965,9 +8967,9 @@ resolve@^2.0.0-next.3:
languageName: node
linkType: hard
"rollup@npm:^2.67.2":
version: 2.67.2
resolution: "rollup@npm:2.67.2"
"rollup@npm:^2.68.0":
version: 2.68.0
resolution: "rollup@npm:2.68.0"
dependencies:
fsevents: ~2.3.2
dependenciesMeta:
@@ -8975,7 +8977,7 @@ resolve@^2.0.0-next.3:
optional: true
bin:
rollup: dist/bin/rollup
checksum: 9aca5251ba4b441064183cde2394b91567259002d68086bdd3906db66d55dd148ab27e57c51eb53830d7b9b813c2d4e834b7735d65e2a869780bc639d4a20c38
checksum: c883f6fb2e10e1c79a32527da0c50ef47a7beb8ddacfdae4197ff2d1911fb8d10bb2704496cf878d3048fbf3524d613bc87f25c5be0afc667fe30b7d04fa8092
languageName: node
linkType: hard
@@ -8983,12 +8985,12 @@ resolve@^2.0.0-next.3:
version: 0.0.0-use.local
resolution: "root-workspace-0b6124@workspace:."
dependencies:
"@babel/core": ^7.17.4
"@babel/core": ^7.17.5
"@babel/register": ^7.17.0
"@babel/runtime": ^7.17.2
"@polkadot/dev": ^0.65.60
"@polkadot/dev": ^0.65.73
"@polkadot/typegen": "workspace:packages/typegen"
"@types/jest": ^27.4.0
"@types/jest": ^27.4.1
copyfiles: ^2.4.1
languageName: unknown
linkType: soft