Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce5ec004b4 | ||
|
|
196f91bc92 | ||
|
|
159ec48029 | ||
|
|
993e16240d | ||
|
|
ae6c2aa750 | ||
|
|
79da77234e | ||
|
|
8992e7f2e8 | ||
|
|
9b1e5f2f25 | ||
|
|
a94c0ff11c | ||
|
|
0db40bc98b | ||
|
|
4fd5e56af3 | ||
|
|
38cb10fb24 | ||
|
|
b5ab09fdb1 | ||
|
|
517baddb25 | ||
|
|
e445a26d5d | ||
|
|
f523325c0a | ||
|
|
55cb602a71 | ||
|
|
904b2aafe7 | ||
|
|
3dee6a9cb4 | ||
|
|
bd113b124e | ||
|
|
580039a23c | ||
|
|
2472ef8c98 | ||
|
|
020fb1cd09 | ||
|
|
3cbebb6d71 | ||
|
|
138a64c5fb | ||
|
|
efd76e3e20 | ||
|
|
2b562c80b9 | ||
|
|
f9ab3e7029 | ||
|
|
fdc30fd2c2 | ||
|
|
d2b40660ad | ||
|
|
c545cffec0 | ||
|
|
479719fdcc |
@@ -9,7 +9,7 @@ jobs:
|
||||
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: jacogr/action-approve@master
|
||||
- uses: jacogr/action-approve@9d6ce78d26f23ad29d009d034822cf773f2cb50e
|
||||
with:
|
||||
authors: jacogr
|
||||
labels: -auto
|
||||
|
||||
@@ -8,7 +8,7 @@ jobs:
|
||||
merge:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: jacogr/action-merge@master
|
||||
- uses: jacogr/action-merge@3b4b49af8a8644bf5cbb5409ee236abe04eeb1b0
|
||||
with:
|
||||
checks: build,lint,test
|
||||
labels: -auto
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
env:
|
||||
YARN_ENABLE_SCRIPTS: false
|
||||
steps:
|
||||
- uses: dessant/lock-threads@v2
|
||||
- uses: dessant/lock-threads@f1a42f0f44eb83361d617a014663e1a76cf282d2
|
||||
with:
|
||||
github-token: ${{ secrets.GH_PAT_BOT }}
|
||||
issue-lock-inactive-days: '7'
|
||||
|
||||
@@ -11,8 +11,8 @@ jobs:
|
||||
env:
|
||||
YARN_ENABLE_SCRIPTS: false
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: denoland/setup-deno@v1
|
||||
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e
|
||||
- uses: denoland/setup-deno@004814556e37c54a2f6e31384c9e18e983317366
|
||||
with:
|
||||
deno-version: vx.x.x
|
||||
- name: ${{ matrix.step }}
|
||||
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GH_PAT }}
|
||||
|
||||
@@ -12,8 +12,8 @@ jobs:
|
||||
env:
|
||||
YARN_ENABLE_SCRIPTS: false
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: returntocorp/semgrep-action@v1
|
||||
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e
|
||||
- uses: returntocorp/semgrep-action@aeafd770072c4f48798b991e3449592bddc2c435
|
||||
with:
|
||||
auditOn: push
|
||||
publishToken: ${{ secrets.SEMGREP_APP_TOKEN }}
|
||||
|
||||
@@ -9,7 +9,7 @@ jobs:
|
||||
env:
|
||||
YARN_ENABLE_SCRIPTS: false
|
||||
steps:
|
||||
- uses: actions/stale@v3
|
||||
- uses: actions/stale@98ed4cb500039dbcccf4bd9bedada4d0187f2757
|
||||
with:
|
||||
repo-token: ${{ secrets.GH_PAT_BOT }}
|
||||
stale-issue-message: 'This issue has been open for 21 days with no activity and is not labelled as an enhancement. It will be closed in 7 days.'
|
||||
|
||||
@@ -1,7 +1,29 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 9.3.1 Sep 3, 2022
|
||||
|
||||
Changes:
|
||||
|
||||
- Support for ink! v4 metadata
|
||||
- Adjust pool runtime call `pendingRewards` return type
|
||||
- Support for `AccountId33` (raw/compressed 33-byte ecdsa)
|
||||
- Update to latest Substrate, Polkadot & Kusama metadata
|
||||
|
||||
|
||||
## 9.2.4 Aug 27, 2022
|
||||
|
||||
Changes:
|
||||
|
||||
- Remove extra error logging in internal rpc-core Observable
|
||||
- Allow for embebbed `Enum` in `Struct` typegen (no `lookupName`)
|
||||
|
||||
|
||||
## 9.2.3 Aug 21, 2022
|
||||
|
||||
Contributed:
|
||||
|
||||
- Update `@substrate/connect` to latest (Thanks to https://github.com/wirednkod)
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust `StakingLedger` with fallback for Kusama 1050 (2 different structures on-chain)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
3199 Jaco 9.2.3 (#5177)
|
||||
3215 Jaco 9.3.1 (#5201)
|
||||
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)
|
||||
|
||||
+7
-7
@@ -11,10 +11,10 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"version": "9.2.3",
|
||||
"version": "9.3.1",
|
||||
"versions": {
|
||||
"git": "9.2.3",
|
||||
"npm": "9.2.3"
|
||||
"git": "9.3.1",
|
||||
"npm": "9.3.1"
|
||||
},
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
@@ -35,15 +35,15 @@
|
||||
"test:one": "NODE_OPTIONS=--experimental-vm-modules polkadot-dev-run-test --detectOpenHandles --forceExit"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.18.10",
|
||||
"@babel/core": "^7.18.13",
|
||||
"@babel/register": "^7.18.9",
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/dev": "^0.67.113",
|
||||
"@polkadot/dev": "^0.67.120",
|
||||
"@polkadot/typegen": "workspace:packages/typegen",
|
||||
"@types/jest": "^28.1.7",
|
||||
"@types/jest": "^29.0.0",
|
||||
"copyfiles": "^2.4.1"
|
||||
},
|
||||
"resolutions": {
|
||||
"typescript": "^4.7.4"
|
||||
"typescript": "^4.8.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,18 +20,18 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.3",
|
||||
"version": "9.3.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/api-base": "9.2.3",
|
||||
"@polkadot/rpc-augment": "9.2.3",
|
||||
"@polkadot/types": "9.2.3",
|
||||
"@polkadot/types-augment": "9.2.3",
|
||||
"@polkadot/types-codec": "9.2.3",
|
||||
"@polkadot/util": "^10.1.5"
|
||||
"@polkadot/api-base": "9.3.1",
|
||||
"@polkadot/rpc-augment": "9.3.1",
|
||||
"@polkadot/types": "9.3.1",
|
||||
"@polkadot/types-augment": "9.3.1",
|
||||
"@polkadot/types-codec": "9.3.1",
|
||||
"@polkadot/util": "^10.1.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/types-support": "9.2.3"
|
||||
"@polkadot/types-support": "9.3.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -774,7 +774,7 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
dbWeight: FrameSupportWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The designated SS85 prefix of this chain.
|
||||
* The designated SS58 prefix of this chain.
|
||||
*
|
||||
* This replaces the "ss58Format" property declared in the chain spec. Reason is
|
||||
* that the runtime should know about the prefix in order to make use of it as
|
||||
|
||||
@@ -17,7 +17,6 @@ import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
||||
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
|
||||
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||
import type { NpApiError } from '@polkadot/types/interfaces/nompools';
|
||||
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
|
||||
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
||||
@@ -212,7 +211,7 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
/**
|
||||
* Returns the pending rewards for the given member.
|
||||
**/
|
||||
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Result<Balance, NpApiError>>>;
|
||||
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '9.2.3' };
|
||||
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '9.3.1' };
|
||||
|
||||
@@ -641,7 +641,7 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
dbWeight: FrameSupportWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The designated SS85 prefix of this chain.
|
||||
* The designated SS58 prefix of this chain.
|
||||
*
|
||||
* This replaces the "ss58Format" property declared in the chain spec. Reason is
|
||||
* that the runtime should know about the prefix in order to make use of it as
|
||||
|
||||
@@ -19,7 +19,7 @@ import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
|
||||
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import type { AccountId, Block, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
||||
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
||||
import type { SessionIndex } from '@polkadot/types/interfaces/session';
|
||||
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
||||
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
|
||||
@@ -206,6 +206,17 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x17a6bc0d0062aeb3/1 */
|
||||
nominationPoolsApi: {
|
||||
/**
|
||||
* Returns the pending rewards for the given member.
|
||||
**/
|
||||
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xf78b278be53f454c/2 */
|
||||
offchainWorkerApi: {
|
||||
/**
|
||||
|
||||
@@ -999,7 +999,7 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
dbWeight: FrameSupportWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The designated SS85 prefix of this chain.
|
||||
* The designated SS58 prefix of this chain.
|
||||
*
|
||||
* This replaces the "ss58Format" property declared in the chain spec. Reason is
|
||||
* that the runtime should know about the prefix in order to make use of it as
|
||||
|
||||
@@ -33,6 +33,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Account is already a member.
|
||||
**/
|
||||
AlreadyMember: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Account already gave retirement notice
|
||||
**/
|
||||
AlreadyRetiring: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Item is already listed as unscrupulous.
|
||||
**/
|
||||
@@ -73,6 +77,14 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Account does not have voting rights.
|
||||
**/
|
||||
NoVotingRights: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Account did not give a retirement notice required to retire.
|
||||
**/
|
||||
RetirementNoticeNotGiven: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Retirement period has not passed.
|
||||
**/
|
||||
RetirementPeriodNotPassed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Length of website URL exceeds `MaxWebsiteUrlLength`.
|
||||
**/
|
||||
@@ -89,10 +101,6 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The number of unscrupulous items exceeds `MaxUnscrupulousItems`.
|
||||
**/
|
||||
TooManyUnscrupulousItems: AugmentedError<ApiType>;
|
||||
/**
|
||||
* This member is up for being kicked from the Alliance and cannot perform this operation.
|
||||
**/
|
||||
UpForKicking: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The account's identity has no good judgement.
|
||||
**/
|
||||
|
||||
@@ -36,6 +36,10 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* A member has retired with its deposit unreserved.
|
||||
**/
|
||||
MemberRetired: AugmentedEvent<ApiType, [member: AccountId32, unreserved: Option<u128>], { member: AccountId32, unreserved: Option<u128> }>;
|
||||
/**
|
||||
* A member gave retirement notice and their retirement period started.
|
||||
**/
|
||||
MemberRetirementPeriodStarted: AugmentedEvent<ApiType, [member: AccountId32], { member: AccountId32 }>;
|
||||
/**
|
||||
* Some accounts have been initialized as members (founders/fellows/allies).
|
||||
**/
|
||||
|
||||
@@ -30,7 +30,12 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Maps member type to members of each type.
|
||||
**/
|
||||
members: AugmentedQuery<ApiType, (arg: PalletAllianceMemberRole | 'Founder' | 'Fellow' | 'Ally' | number | Uint8Array) => Observable<Vec<AccountId32>>, [PalletAllianceMemberRole]> & QueryableStorageEntry<ApiType, [PalletAllianceMemberRole]>;
|
||||
members: AugmentedQuery<ApiType, (arg: PalletAllianceMemberRole | 'Founder' | 'Fellow' | 'Ally' | 'Retiring' | number | Uint8Array) => Observable<Vec<AccountId32>>, [PalletAllianceMemberRole]> & QueryableStorageEntry<ApiType, [PalletAllianceMemberRole]>;
|
||||
/**
|
||||
* A set of members who gave a retirement notice. They can retire after the end of retirement
|
||||
* period stored as a future block number.
|
||||
**/
|
||||
retiringMembers: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* The IPFS CID of the alliance rule.
|
||||
* Founders and fellows can propose a new rule with a super-majority.
|
||||
@@ -47,11 +52,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* The current list of websites deemed unscrupulous.
|
||||
**/
|
||||
unscrupulousWebsites: AugmentedQuery<ApiType, () => Observable<Vec<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* A set of members that are (potentially) being kicked out. They cannot retire until the
|
||||
* motion is settled.
|
||||
**/
|
||||
upForKicking: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<bool>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
|
||||
@@ -17,7 +17,6 @@ import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
||||
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
|
||||
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||
import type { NpApiError } from '@polkadot/types/interfaces/nompools';
|
||||
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot } from '@polkadot/types/interfaces/runtime';
|
||||
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
||||
@@ -222,7 +221,7 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
/**
|
||||
* Returns the pending rewards for the given member.
|
||||
**/
|
||||
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Result<Balance, NpApiError>>>;
|
||||
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
|
||||
@@ -37,6 +37,11 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Elevate an ally to fellow.
|
||||
**/
|
||||
elevateAlly: AugmentedSubmittable<(ally: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
|
||||
/**
|
||||
* As a member, give a retirement notice and start a retirement period required to pass in
|
||||
* order to retire.
|
||||
**/
|
||||
giveRetirementNotice: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||
/**
|
||||
* Initialize the founders, fellows, and allies.
|
||||
*
|
||||
@@ -72,6 +77,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
removeUnscrupulousItems: AugmentedSubmittable<(items: Vec<PalletAllianceUnscrupulousItem> | (PalletAllianceUnscrupulousItem | { AccountId: any } | { Website: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<PalletAllianceUnscrupulousItem>]>;
|
||||
/**
|
||||
* As a member, retire from the alliance and unreserve the deposit.
|
||||
* This can only be done once you have `give_retirement_notice` and it has expired.
|
||||
**/
|
||||
retire: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||
/**
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.3",
|
||||
"version": "9.3.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/rpc-core": "9.2.3",
|
||||
"@polkadot/types": "9.2.3",
|
||||
"@polkadot/util": "^10.1.5",
|
||||
"@polkadot/rpc-core": "9.3.1",
|
||||
"@polkadot/types": "9.3.1",
|
||||
"@polkadot/util": "^10.1.7",
|
||||
"rxjs": "^7.5.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '9.2.3' };
|
||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '9.3.1' };
|
||||
|
||||
@@ -20,20 +20,20 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.3",
|
||||
"version": "9.3.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/api": "9.2.3",
|
||||
"@polkadot/types": "9.2.3",
|
||||
"@polkadot/types-codec": "9.2.3",
|
||||
"@polkadot/types-create": "9.2.3",
|
||||
"@polkadot/util": "^10.1.5",
|
||||
"@polkadot/util-crypto": "^10.1.5",
|
||||
"@polkadot/api": "9.3.1",
|
||||
"@polkadot/types": "9.3.1",
|
||||
"@polkadot/types-codec": "9.3.1",
|
||||
"@polkadot/types-create": "9.3.1",
|
||||
"@polkadot/util": "^10.1.7",
|
||||
"@polkadot/util-crypto": "^10.1.7",
|
||||
"rxjs": "^7.5.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api-augment": "9.2.3",
|
||||
"@polkadot/keyring": "^10.1.5"
|
||||
"@polkadot/api-augment": "9.3.1",
|
||||
"@polkadot/keyring": "^10.1.7"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,9 @@ interface JSONAbi {
|
||||
},
|
||||
V3: {
|
||||
spec: SpecDef;
|
||||
},
|
||||
V4: {
|
||||
spec: SpecDef;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +62,7 @@ describe('Abi', (): void => {
|
||||
|
||||
it(`initializes from a contract ABI (${abiName})`, (): void => {
|
||||
try {
|
||||
const messageIds = (abi.V3 || abi.V2 || abi.V1 || abi).spec.messages.map(({ label, name }) =>
|
||||
const messageIds = (abi.V4 || abi.V3 || abi.V2 || abi.V1 || abi).spec.messages.map(({ label, name }) =>
|
||||
label || (
|
||||
Array.isArray(name)
|
||||
? name.join('::')
|
||||
|
||||
@@ -27,12 +27,23 @@ function findMessage <T extends AbiMessage> (list: T[], messageOrId: T | string
|
||||
}
|
||||
|
||||
function getLatestMeta (registry: Registry, json: Record<string, unknown>): ContractMetadataLatest {
|
||||
// this is for V1, V2, V3
|
||||
const vx = enumVersions.find((v) => isObject(json[v]));
|
||||
const metadata = registry.createType('ContractMetadata',
|
||||
|
||||
// this was added in V4
|
||||
const jsonVersion = json.version as string;
|
||||
|
||||
if (!vx && jsonVersion && !enumVersions.find((v) => v === `V${jsonVersion}`)) {
|
||||
throw new Error(`Unable to handle version ${jsonVersion}`);
|
||||
}
|
||||
|
||||
const metadata = registry.createType<ContractMetadata>('ContractMetadata',
|
||||
vx
|
||||
? { [vx]: json[vx] }
|
||||
: { V0: json }
|
||||
) as unknown as ContractMetadata;
|
||||
: jsonVersion
|
||||
? { [`V${jsonVersion}`]: json }
|
||||
: { V0: json }
|
||||
);
|
||||
const converter = convertVersions.find(([v]) => metadata[`is${v}`]);
|
||||
|
||||
if (!converter) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { v0ToLatest, v1ToLatest, v2ToLatest, v3ToLatest } from '@polkadot/api-contract/Abi/toLatest';
|
||||
import { TypeRegistry } from '@polkadot/types';
|
||||
|
||||
import abis from '../test/contracts';
|
||||
import { v0ToLatest, v1ToLatest, v2ToLatest, v3ToLatest, v4ToLatest } from './toLatest';
|
||||
|
||||
describe('v0ToLatest', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
@@ -120,3 +120,18 @@ describe('v3ToLatest', (): void => {
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('v4ToLatest', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V4: abis.ink_v4_flipperContract });
|
||||
const latest = v4ToLatest(registry, contract.asV4);
|
||||
|
||||
it('has the correct constructor flags', (): void => {
|
||||
expect(
|
||||
latest.spec.constructors[0].payable.isTrue
|
||||
).toEqual(false);
|
||||
expect(
|
||||
latest.spec.constructors[1].payable.isTrue
|
||||
).toEqual(false);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ContractMetadataLatest, ContractMetadataV3 } from '@polkadot/types/interfaces';
|
||||
import type { ContractMetadataLatest, ContractMetadataV4 } from '@polkadot/types/interfaces';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
|
||||
import { v0ToV1 } from './toV1';
|
||||
import { v1ToV2 } from './toV2';
|
||||
import { v2ToV3 } from './toV3';
|
||||
import { v3ToV4 } from './toV4';
|
||||
|
||||
// The versions where an enum is used, aka V0 is missing
|
||||
// (Order from newest, i.e. we expect more on newest vs oldest)
|
||||
export const enumVersions = <const> ['V3', 'V2', 'V1'];
|
||||
export const enumVersions = <const> ['V4', 'V3', 'V2', 'V1'];
|
||||
|
||||
type Versions = typeof enumVersions[number] | 'V0';
|
||||
|
||||
@@ -22,15 +23,17 @@ function createConverter <I, O> (next: (registry: Registry, input: O) => Contrac
|
||||
next(registry, step(registry, input));
|
||||
}
|
||||
|
||||
export function v3ToLatest (registry: Registry, v3: ContractMetadataV3): ContractMetadataLatest {
|
||||
return v3;
|
||||
export function v4ToLatest (registry: Registry, v4: ContractMetadataV4): ContractMetadataLatest {
|
||||
return v4;
|
||||
}
|
||||
|
||||
export const v3ToLatest = createConverter(v4ToLatest, v3ToV4);
|
||||
export const v2ToLatest = createConverter(v3ToLatest, v2ToV3);
|
||||
export const v1ToLatest = createConverter(v2ToLatest, v1ToV2);
|
||||
export const v0ToLatest = createConverter(v1ToLatest, v0ToV1);
|
||||
|
||||
export const convertVersions: [Versions, Converter][] = [
|
||||
['V4', v4ToLatest],
|
||||
['V3', v3ToLatest],
|
||||
['V2', v2ToLatest],
|
||||
['V1', v1ToLatest],
|
||||
|
||||
@@ -21,6 +21,10 @@ function v0ToV1Names (all: Named[]): unknown[] {
|
||||
}
|
||||
|
||||
export function v0ToV1 (registry: Registry, v0: ContractMetadataV0): ContractMetadataV1 {
|
||||
if (!v0.metadataVersion.length) {
|
||||
throw new Error('Invalid format for V0 (detected) contract metadata');
|
||||
}
|
||||
|
||||
return registry.createType('ContractMetadataV1', objectSpread({}, v0, {
|
||||
spec: objectSpread({}, v0.spec, {
|
||||
constructors: v0ToV1Names(v0.spec.constructors),
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ContractMetadataV3, ContractMetadataV4 } from '@polkadot/types/interfaces';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
|
||||
export function v3ToV4 (registry: Registry, v3: ContractMetadataV3): ContractMetadataV4 {
|
||||
return v3;
|
||||
}
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '9.2.3' };
|
||||
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '9.3.1' };
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
]
|
||||
@@ -6,5 +6,6 @@ import * as v0 from './v0';
|
||||
import * as v1 from './v1';
|
||||
import * as v2 from './v2';
|
||||
import * as v3 from './v3';
|
||||
import * as v4 from './v4';
|
||||
|
||||
export default createVersionedExport({ v0, v1, v2, v3 });
|
||||
export default createVersionedExport({ v0, v1, v2, v3, v4 });
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,103 @@
|
||||
{
|
||||
"source": {
|
||||
"hash": "0xf051c631190ac47f82e280ba763df932210f6e2447978e24cbe0dcc6d6903c7a",
|
||||
"language": "ink! 4.0.0-alpha.1",
|
||||
"compiler": "rustc 1.63.0"
|
||||
},
|
||||
"contract": {
|
||||
"name": "flipper",
|
||||
"version": "4.0.0-alpha.1",
|
||||
"authors": [
|
||||
"Parity Technologies <admin@parity.io>"
|
||||
]
|
||||
},
|
||||
"spec": {
|
||||
"constructors": [
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"label": "init_value",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"bool"
|
||||
],
|
||||
"type": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
"Creates a new flipper smart contract initialized with the given value."
|
||||
],
|
||||
"label": "new",
|
||||
"payable": false,
|
||||
"selector": "0x9bae9d5e"
|
||||
},
|
||||
{
|
||||
"args": [],
|
||||
"docs": [
|
||||
"Creates a new flipper smart contract initialized to `false`."
|
||||
],
|
||||
"label": "default",
|
||||
"payable": false,
|
||||
"selector": "0xed4b9d1b"
|
||||
}
|
||||
],
|
||||
"docs": [],
|
||||
"events": [],
|
||||
"messages": [
|
||||
{
|
||||
"args": [],
|
||||
"docs": [
|
||||
" Flips the current value of the Flipper's boolean."
|
||||
],
|
||||
"label": "flip",
|
||||
"mutates": true,
|
||||
"payable": false,
|
||||
"returnType": null,
|
||||
"selector": "0x633aa551"
|
||||
},
|
||||
{
|
||||
"args": [],
|
||||
"docs": [
|
||||
" Returns the current value of the Flipper's boolean."
|
||||
],
|
||||
"label": "get",
|
||||
"mutates": false,
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"bool"
|
||||
],
|
||||
"type": 0
|
||||
},
|
||||
"selector": "0x2f865bd9"
|
||||
}
|
||||
]
|
||||
},
|
||||
"storage": {
|
||||
"struct": {
|
||||
"fields": [
|
||||
{
|
||||
"layout": {
|
||||
"cell": {
|
||||
"key": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"ty": 0
|
||||
}
|
||||
},
|
||||
"name": "value"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"types": [
|
||||
{
|
||||
"id": 0,
|
||||
"type": {
|
||||
"def": {
|
||||
"primitive": "bool"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"version": "4"
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as flipperContract } from './flipper.contract.json' assert { type: 'json' };
|
||||
export { default as flipperMetadata } from './flipper.json' assert { type: 'json' };
|
||||
@@ -20,25 +20,25 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.3",
|
||||
"version": "9.3.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/api": "9.2.3",
|
||||
"@polkadot/api-augment": "9.2.3",
|
||||
"@polkadot/api-base": "9.2.3",
|
||||
"@polkadot/rpc-core": "9.2.3",
|
||||
"@polkadot/types": "9.2.3",
|
||||
"@polkadot/types-codec": "9.2.3",
|
||||
"@polkadot/util": "^10.1.5",
|
||||
"@polkadot/util-crypto": "^10.1.5",
|
||||
"@polkadot/api": "9.3.1",
|
||||
"@polkadot/api-augment": "9.3.1",
|
||||
"@polkadot/api-base": "9.3.1",
|
||||
"@polkadot/rpc-core": "9.3.1",
|
||||
"@polkadot/types": "9.3.1",
|
||||
"@polkadot/types-codec": "9.3.1",
|
||||
"@polkadot/util": "^10.1.7",
|
||||
"@polkadot/util-crypto": "^10.1.7",
|
||||
"rxjs": "^7.5.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api": "9.2.3",
|
||||
"@polkadot/api-augment": "9.2.3",
|
||||
"@polkadot/rpc-augment": "9.2.3",
|
||||
"@polkadot/rpc-provider": "9.2.3",
|
||||
"@polkadot/types-support": "9.2.3"
|
||||
"@polkadot/api": "9.3.1",
|
||||
"@polkadot/api-augment": "9.3.1",
|
||||
"@polkadot/rpc-augment": "9.3.1",
|
||||
"@polkadot/rpc-provider": "9.3.1",
|
||||
"@polkadot/types-support": "9.3.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '9.2.3' };
|
||||
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '9.3.1' };
|
||||
|
||||
@@ -99,14 +99,14 @@ export const query = firstMemo(
|
||||
|
||||
export function queryMulti (instanceId: string, api: DeriveApi): (accountIds: (Uint8Array | string)[], flags: StakingQueryFlags) => Observable<DeriveStakingQuery[]> {
|
||||
return memo(instanceId, (accountIds: (Uint8Array | string)[], flags: StakingQueryFlags): Observable<DeriveStakingQuery[]> =>
|
||||
accountIds.length
|
||||
? api.derive.session.indexes().pipe(
|
||||
switchMap(({ activeEra }): Observable<DeriveStakingQuery[]> => {
|
||||
const stashIds = accountIds.map((accountId) => api.registry.createType('AccountId', accountId));
|
||||
api.derive.session.indexes().pipe(
|
||||
switchMap(({ activeEra }): Observable<DeriveStakingQuery[]> => {
|
||||
const stashIds = accountIds.map((a) => api.registry.createType('AccountId', a));
|
||||
|
||||
return getBatch(api, activeEra, stashIds, flags);
|
||||
})
|
||||
)
|
||||
: of([])
|
||||
return stashIds.length
|
||||
? getBatch(api, activeEra, stashIds, flags)
|
||||
: of([]);
|
||||
})
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
+17
-17
@@ -20,29 +20,29 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.3",
|
||||
"version": "9.3.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/api-augment": "9.2.3",
|
||||
"@polkadot/api-base": "9.2.3",
|
||||
"@polkadot/api-derive": "9.2.3",
|
||||
"@polkadot/keyring": "^10.1.5",
|
||||
"@polkadot/rpc-augment": "9.2.3",
|
||||
"@polkadot/rpc-core": "9.2.3",
|
||||
"@polkadot/rpc-provider": "9.2.3",
|
||||
"@polkadot/types": "9.2.3",
|
||||
"@polkadot/types-augment": "9.2.3",
|
||||
"@polkadot/types-codec": "9.2.3",
|
||||
"@polkadot/types-create": "9.2.3",
|
||||
"@polkadot/types-known": "9.2.3",
|
||||
"@polkadot/util": "^10.1.5",
|
||||
"@polkadot/util-crypto": "^10.1.5",
|
||||
"@polkadot/api-augment": "9.3.1",
|
||||
"@polkadot/api-base": "9.3.1",
|
||||
"@polkadot/api-derive": "9.3.1",
|
||||
"@polkadot/keyring": "^10.1.7",
|
||||
"@polkadot/rpc-augment": "9.3.1",
|
||||
"@polkadot/rpc-core": "9.3.1",
|
||||
"@polkadot/rpc-provider": "9.3.1",
|
||||
"@polkadot/types": "9.3.1",
|
||||
"@polkadot/types-augment": "9.3.1",
|
||||
"@polkadot/types-codec": "9.3.1",
|
||||
"@polkadot/types-create": "9.3.1",
|
||||
"@polkadot/types-known": "9.3.1",
|
||||
"@polkadot/util": "^10.1.7",
|
||||
"@polkadot/util-crypto": "^10.1.7",
|
||||
"eventemitter3": "^4.0.7",
|
||||
"rxjs": "^7.5.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api-augment": "9.2.3",
|
||||
"@polkadot/types-support": "9.2.3"
|
||||
"@polkadot/api-augment": "9.3.1",
|
||||
"@polkadot/types-support": "9.3.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -844,21 +844,29 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
let valueIdx = 0;
|
||||
let valueObs: Observable<Codec[]>;
|
||||
|
||||
// if we don't have queue entries yet,
|
||||
// or the current queue has fired (see from below),
|
||||
// or the current queue has the max entries,
|
||||
// then we create a new queue
|
||||
if (queueIdx === -1 || !queue[queueIdx] || queue[queueIdx][1].length === PAGE_SIZE_Q) {
|
||||
queueIdx++;
|
||||
|
||||
valueObs = from(
|
||||
// Defer to the next tick - this aligns with nextTick in @polkadot/util,
|
||||
// however since we return a value here, we don't re-use what is there
|
||||
Promise
|
||||
.resolve()
|
||||
.then((): [StorageEntry, unknown[]][] => {
|
||||
// we delay the execution until the next tick, this allows
|
||||
// any queries made in this timeframe to be added to the same
|
||||
// queue for a single query
|
||||
new Promise<[StorageEntry, unknown[]][]>((resolve): void => {
|
||||
nextTick((): void => {
|
||||
// get all the calls in this instance, resolve with it
|
||||
// and then clear the queue so we don't add more
|
||||
// (anyhting after this will be added to a new queue)
|
||||
const calls = queue[queueIdx][1];
|
||||
|
||||
delete queue[queueIdx];
|
||||
|
||||
return calls;
|
||||
})
|
||||
resolve(calls);
|
||||
});
|
||||
})
|
||||
).pipe(
|
||||
switchMap((calls) => query(calls))
|
||||
);
|
||||
@@ -872,6 +880,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
}
|
||||
|
||||
return valueObs.pipe(
|
||||
// return the single value at this index
|
||||
map((values) => values[valueIdx])
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '9.2.3' };
|
||||
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '9.3.1' };
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.3",
|
||||
"version": "9.3.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/rpc-core": "9.2.3",
|
||||
"@polkadot/types": "9.2.3",
|
||||
"@polkadot/types-codec": "9.2.3",
|
||||
"@polkadot/util": "^10.1.5"
|
||||
"@polkadot/rpc-core": "9.3.1",
|
||||
"@polkadot/types": "9.3.1",
|
||||
"@polkadot/types-codec": "9.3.1",
|
||||
"@polkadot/util": "^10.1.7"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '9.2.3' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '9.3.1' };
|
||||
|
||||
@@ -20,18 +20,18 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.3",
|
||||
"version": "9.3.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/rpc-augment": "9.2.3",
|
||||
"@polkadot/rpc-provider": "9.2.3",
|
||||
"@polkadot/types": "9.2.3",
|
||||
"@polkadot/util": "^10.1.5",
|
||||
"@polkadot/rpc-augment": "9.3.1",
|
||||
"@polkadot/rpc-provider": "9.3.1",
|
||||
"@polkadot/types": "9.3.1",
|
||||
"@polkadot/util": "^10.1.7",
|
||||
"rxjs": "^7.5.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^10.1.5",
|
||||
"@polkadot/rpc-augment": "9.2.3"
|
||||
"@polkadot/keyring": "^10.1.7",
|
||||
"@polkadot/rpc-augment": "9.3.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '9.2.3' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '9.3.1' };
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { Observable } from 'rxjs';
|
||||
|
||||
import { catchError, distinctUntilChanged, publishReplay, refCount, tap } from 'rxjs';
|
||||
|
||||
import { logger, stringify } from '@polkadot/util';
|
||||
import { stringify } from '@polkadot/util';
|
||||
|
||||
import { refCountDelay } from './refCountDelay';
|
||||
|
||||
@@ -17,18 +17,17 @@ interface Options {
|
||||
skipTimeout?: boolean;
|
||||
}
|
||||
|
||||
const l = logger('drr');
|
||||
|
||||
const CMP = (a: unknown, b: unknown): boolean =>
|
||||
stringify({ t: a }) === stringify({ t: b });
|
||||
|
||||
const ERR = (error: Error): Observable<never> => {
|
||||
l.error(error.message);
|
||||
function CMP (a: unknown, b: unknown): boolean {
|
||||
return stringify({ t: a }) === stringify({ t: b });
|
||||
}
|
||||
|
||||
function ERR (error: Error): Observable<never> {
|
||||
throw error;
|
||||
};
|
||||
}
|
||||
|
||||
const NOOP = (): void => undefined;
|
||||
function NOOP (): void {
|
||||
// empty
|
||||
}
|
||||
|
||||
/**
|
||||
* Shorthand for distinctUntilChanged(), publishReplay(1) and refCount().
|
||||
@@ -36,14 +35,16 @@ const NOOP = (): void => undefined;
|
||||
* @ignore
|
||||
* @internal
|
||||
*/
|
||||
export const drr = ({ delay, skipChange = false, skipTimeout = false }: Options = {}): DrrResult => <T> (source$: Observable<T>): Observable<T> =>
|
||||
source$.pipe(
|
||||
catchError(ERR),
|
||||
skipChange
|
||||
? tap(NOOP)
|
||||
: distinctUntilChanged<T>(CMP),
|
||||
publishReplay(1),
|
||||
skipTimeout
|
||||
? refCount()
|
||||
: refCountDelay(delay)
|
||||
);
|
||||
export function drr ({ delay, skipChange = false, skipTimeout = false }: Options = {}): DrrResult {
|
||||
return <T> (source$: Observable<T>): Observable<T> =>
|
||||
source$.pipe(
|
||||
catchError(ERR),
|
||||
skipChange
|
||||
? tap(NOOP)
|
||||
: distinctUntilChanged<T>(CMP),
|
||||
publishReplay(1),
|
||||
skipTimeout
|
||||
? refCount()
|
||||
: refCountDelay(delay)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -20,18 +20,18 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.3",
|
||||
"version": "9.3.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/keyring": "^10.1.5",
|
||||
"@polkadot/types": "9.2.3",
|
||||
"@polkadot/types-support": "9.2.3",
|
||||
"@polkadot/util": "^10.1.5",
|
||||
"@polkadot/util-crypto": "^10.1.5",
|
||||
"@polkadot/x-fetch": "^10.1.5",
|
||||
"@polkadot/x-global": "^10.1.5",
|
||||
"@polkadot/x-ws": "^10.1.5",
|
||||
"@polkadot/keyring": "^10.1.7",
|
||||
"@polkadot/types": "9.3.1",
|
||||
"@polkadot/types-support": "9.3.1",
|
||||
"@polkadot/util": "^10.1.7",
|
||||
"@polkadot/util-crypto": "^10.1.7",
|
||||
"@polkadot/x-fetch": "^10.1.7",
|
||||
"@polkadot/x-global": "^10.1.7",
|
||||
"@polkadot/x-ws": "^10.1.7",
|
||||
"@substrate/connect": "0.7.11",
|
||||
"eventemitter3": "^4.0.7",
|
||||
"mock-socket": "^9.1.5",
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '9.2.3' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '9.3.1' };
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.3",
|
||||
"version": "9.3.1",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.cjs",
|
||||
@@ -30,27 +30,27 @@
|
||||
"polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.cjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.18.10",
|
||||
"@babel/core": "^7.18.13",
|
||||
"@babel/register": "^7.18.9",
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/api": "9.2.3",
|
||||
"@polkadot/api-augment": "9.2.3",
|
||||
"@polkadot/rpc-augment": "9.2.3",
|
||||
"@polkadot/rpc-provider": "9.2.3",
|
||||
"@polkadot/types": "9.2.3",
|
||||
"@polkadot/types-augment": "9.2.3",
|
||||
"@polkadot/types-codec": "9.2.3",
|
||||
"@polkadot/types-create": "9.2.3",
|
||||
"@polkadot/types-support": "9.2.3",
|
||||
"@polkadot/util": "^10.1.5",
|
||||
"@polkadot/util-crypto": "^10.1.5",
|
||||
"@polkadot/x-ws": "^10.1.5",
|
||||
"@polkadot/api": "9.3.1",
|
||||
"@polkadot/api-augment": "9.3.1",
|
||||
"@polkadot/rpc-augment": "9.3.1",
|
||||
"@polkadot/rpc-provider": "9.3.1",
|
||||
"@polkadot/types": "9.3.1",
|
||||
"@polkadot/types-augment": "9.3.1",
|
||||
"@polkadot/types-codec": "9.3.1",
|
||||
"@polkadot/types-create": "9.3.1",
|
||||
"@polkadot/types-support": "9.3.1",
|
||||
"@polkadot/util": "^10.1.7",
|
||||
"@polkadot/util-crypto": "^10.1.7",
|
||||
"@polkadot/x-ws": "^10.1.7",
|
||||
"handlebars": "^4.7.7",
|
||||
"websocket": "^1.0.34",
|
||||
"yargs": "^17.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/websocket": "^1.0.5",
|
||||
"@types/yargs": "^17.0.11"
|
||||
"@types/yargs": "^17.0.12"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,9 +43,10 @@ function tsExport (registry: Registry, definitions: Record<string, ModuleTypes>,
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, { lookupIndex, name: enumName, sub }: TypeDef, imports: TypeImports): string {
|
||||
function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, { lookupIndex, name: enumName, sub }: TypeDef, imports: TypeImports, withShortcut = false): string {
|
||||
setImports(definitions, imports, ['Enum']);
|
||||
|
||||
const indent = withShortcut ? ' ' : '';
|
||||
const named = (sub as TypeDef[]).filter(({ name }) => !!name && !name.startsWith('__Unused'));
|
||||
const keys = named.map((def): string => {
|
||||
const { info, lookupName, name = '', type } = def;
|
||||
@@ -53,7 +54,7 @@ function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, {
|
||||
const isComplex = [TypeDefInfo.Option, TypeDefInfo.Range, TypeDefInfo.RangeInclusive, TypeDefInfo.Result, TypeDefInfo.Struct, TypeDefInfo.Tuple, TypeDefInfo.Vec, TypeDefInfo.VecFixed].includes(info);
|
||||
const asGetter = type === 'Null' || info === TypeDefInfo.DoNotConstruct
|
||||
? ''
|
||||
: createGetter(definitions, `as${getter}`, lookupName || (isComplex ? formatType(registry, definitions, info === TypeDefInfo.Struct ? def : type, imports, false) : type), imports);
|
||||
: createGetter(definitions, `as${getter}`, lookupName || (isComplex ? formatType(registry, definitions, info === TypeDefInfo.Struct ? def : type, imports, withShortcut) : type), imports);
|
||||
const isGetter = info === TypeDefInfo.DoNotConstruct
|
||||
? ''
|
||||
: createGetter(definitions, `is${getter}`, 'boolean', imports);
|
||||
@@ -74,18 +75,18 @@ function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, {
|
||||
case TypeDefInfo.VecFixed:
|
||||
case TypeDefInfo.WrapperKeepOpaque:
|
||||
case TypeDefInfo.WrapperOpaque:
|
||||
return `${isGetter}${asGetter}`;
|
||||
return `${indent}${isGetter}${indent}${asGetter}`;
|
||||
|
||||
case TypeDefInfo.DoNotConstruct:
|
||||
case TypeDefInfo.Null:
|
||||
return `${isGetter}`;
|
||||
return `${indent}${isGetter}`;
|
||||
|
||||
default:
|
||||
throw new Error(`Enum: ${enumName || 'undefined'}: Unhandled type ${TypeDefInfo[info]}, ${stringify(def)}`);
|
||||
}
|
||||
});
|
||||
|
||||
return exportInterface(lookupIndex, enumName, 'Enum', `${keys.join('')} readonly type: ${named.map(({ name = '' }) => `'${stringPascalCase(name.replace(' ', '_'))}'`).join(' | ')};\n`);
|
||||
return exportInterface(lookupIndex, enumName, 'Enum', `${keys.join('')} ${indent}readonly type: ${named.map(({ name = '' }) => `'${stringPascalCase(name.replace(' ', '_'))}'`).join(' | ')};\n`, withShortcut);
|
||||
}
|
||||
|
||||
function tsInt (_: Registry, definitions: Record<string, ModuleTypes>, def: TypeDef, imports: TypeImports, type: 'Int' | 'UInt' = 'Int'): string {
|
||||
@@ -176,7 +177,9 @@ function tsStruct (registry: Registry, definitions: Record<string, ModuleTypes>,
|
||||
const keys = (sub as TypeDef[]).map((def): string => {
|
||||
const fmtType = def.lookupName && def.name !== def.lookupName
|
||||
? def.lookupName
|
||||
: formatType(registry, definitions, def, imports, false);
|
||||
: def.info === TypeDefInfo.Enum
|
||||
? `${tsEnum(registry, definitions, def, imports, true)} & Enum`
|
||||
: formatType(registry, definitions, def, imports, false);
|
||||
|
||||
return createGetter(definitions, def.name, fmtType, imports);
|
||||
});
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '9.2.3' };
|
||||
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '9.3.1' };
|
||||
|
||||
@@ -105,11 +105,13 @@ Handlebars.registerHelper({
|
||||
|
||||
// helper to generate a `export interface <Name> extends <Base> {<Body>}
|
||||
/** @internal */
|
||||
export function exportInterface (lookupIndex = -1, name = '', base: string, body = ''): string {
|
||||
export function exportInterface (lookupIndex = -1, name = '', base: string, body = '', withShortcut = false): string {
|
||||
// * @description extends [[${base}]]
|
||||
const doc = `/** @name ${name}${lookupIndex !== -1 ? ` (${lookupIndex})` : ''} */\n`;
|
||||
const doc = withShortcut
|
||||
? ''
|
||||
: `/** @name ${name}${lookupIndex !== -1 ? ` (${lookupIndex})` : ''} */\n`;
|
||||
|
||||
return `${doc}export interface ${name} extends ${base} {${body.length ? '\n' : ''}${body}}`;
|
||||
return `${doc}${withShortcut ? '' : `export interface ${name} extends ${base} `}{${body.length ? '\n' : ''}${body}${withShortcut ? ' ' : ''}}`;
|
||||
}
|
||||
|
||||
function singleParamNotation (registry: Registry, wrapper: string, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean): string {
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.3",
|
||||
"version": "9.3.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/types": "9.2.3",
|
||||
"@polkadot/types-codec": "9.2.3",
|
||||
"@polkadot/util": "^10.1.5"
|
||||
"@polkadot/types": "9.3.1",
|
||||
"@polkadot/types-codec": "9.3.1",
|
||||
"@polkadot/util": "^10.1.7"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1518,6 +1518,9 @@ export default {
|
||||
AllyElevated: {
|
||||
ally: 'AccountId32',
|
||||
},
|
||||
MemberRetirementPeriodStarted: {
|
||||
member: 'AccountId32',
|
||||
},
|
||||
MemberRetired: {
|
||||
member: 'AccountId32',
|
||||
unreserved: 'Option<u128>',
|
||||
@@ -3793,6 +3796,7 @@ export default {
|
||||
elevate_ally: {
|
||||
ally: 'MultiAddress',
|
||||
},
|
||||
give_retirement_notice: 'Null',
|
||||
retire: 'Null',
|
||||
kick_member: {
|
||||
who: 'MultiAddress',
|
||||
@@ -5135,13 +5139,13 @@ export default {
|
||||
* Lookup634: pallet_alliance::MemberRole
|
||||
**/
|
||||
PalletAllianceMemberRole: {
|
||||
_enum: ['Founder', 'Fellow', 'Ally']
|
||||
_enum: ['Founder', 'Fellow', 'Ally', 'Retiring']
|
||||
},
|
||||
/**
|
||||
* Lookup639: pallet_alliance::pallet::Error<T, I>
|
||||
**/
|
||||
PalletAllianceError: {
|
||||
_enum: ['AllianceAlreadyInitialized', 'AllianceNotYetInitialized', 'AlreadyMember', 'NotMember', 'NotAlly', 'NotFounder', 'UpForKicking', 'NoVotingRights', 'AlreadyElevated', 'AlreadyUnscrupulous', 'AccountNonGrata', 'NotListedAsUnscrupulous', 'TooManyUnscrupulousItems', 'TooLongWebsiteUrl', 'InsufficientFunds', 'WithoutIdentityDisplayAndWebsite', 'WithoutGoodIdentityJudgement', 'MissingProposalHash', 'NotVetoableProposal', 'MissingAnnouncement', 'TooManyMembers', 'TooManyAnnouncements']
|
||||
_enum: ['AllianceAlreadyInitialized', 'AllianceNotYetInitialized', 'AlreadyMember', 'NotMember', 'NotAlly', 'NotFounder', 'NoVotingRights', 'AlreadyElevated', 'AlreadyUnscrupulous', 'AccountNonGrata', 'NotListedAsUnscrupulous', 'TooManyUnscrupulousItems', 'TooLongWebsiteUrl', 'InsufficientFunds', 'WithoutIdentityDisplayAndWebsite', 'WithoutGoodIdentityJudgement', 'MissingProposalHash', 'NotVetoableProposal', 'MissingAnnouncement', 'TooManyMembers', 'TooManyAnnouncements', 'AlreadyRetiring', 'RetirementNoticeNotGiven', 'RetirementPeriodNotPassed']
|
||||
},
|
||||
/**
|
||||
* Lookup640: pallet_nomination_pools::PoolMember<T>
|
||||
|
||||
@@ -1691,6 +1691,10 @@ declare module '@polkadot/types/lookup' {
|
||||
readonly asAllyElevated: {
|
||||
readonly ally: AccountId32;
|
||||
} & Struct;
|
||||
readonly isMemberRetirementPeriodStarted: boolean;
|
||||
readonly asMemberRetirementPeriodStarted: {
|
||||
readonly member: AccountId32;
|
||||
} & Struct;
|
||||
readonly isMemberRetired: boolean;
|
||||
readonly asMemberRetired: {
|
||||
readonly member: AccountId32;
|
||||
@@ -1709,7 +1713,7 @@ declare module '@polkadot/types/lookup' {
|
||||
readonly asUnscrupulousItemRemoved: {
|
||||
readonly items: Vec<PalletAllianceUnscrupulousItem>;
|
||||
} & Struct;
|
||||
readonly type: 'NewRuleSet' | 'Announced' | 'AnnouncementRemoved' | 'MembersInitialized' | 'NewAllyJoined' | 'AllyElevated' | 'MemberRetired' | 'MemberKicked' | 'UnscrupulousItemAdded' | 'UnscrupulousItemRemoved';
|
||||
readonly type: 'NewRuleSet' | 'Announced' | 'AnnouncementRemoved' | 'MembersInitialized' | 'NewAllyJoined' | 'AllyElevated' | 'MemberRetirementPeriodStarted' | 'MemberRetired' | 'MemberKicked' | 'UnscrupulousItemAdded' | 'UnscrupulousItemRemoved';
|
||||
}
|
||||
|
||||
/** @name PalletAllianceCid (118) */
|
||||
@@ -4066,6 +4070,7 @@ declare module '@polkadot/types/lookup' {
|
||||
readonly asElevateAlly: {
|
||||
readonly ally: MultiAddress;
|
||||
} & Struct;
|
||||
readonly isGiveRetirementNotice: boolean;
|
||||
readonly isRetire: boolean;
|
||||
readonly isKickMember: boolean;
|
||||
readonly asKickMember: {
|
||||
@@ -4079,7 +4084,7 @@ declare module '@polkadot/types/lookup' {
|
||||
readonly asRemoveUnscrupulousItems: {
|
||||
readonly items: Vec<PalletAllianceUnscrupulousItem>;
|
||||
} & Struct;
|
||||
readonly type: 'Propose' | 'Vote' | 'Veto' | 'Close' | 'InitMembers' | 'SetRule' | 'Announce' | 'RemoveAnnouncement' | 'JoinAlliance' | 'NominateAlly' | 'ElevateAlly' | 'Retire' | 'KickMember' | 'AddUnscrupulousItems' | 'RemoveUnscrupulousItems';
|
||||
readonly type: 'Propose' | 'Vote' | 'Veto' | 'Close' | 'InitMembers' | 'SetRule' | 'Announce' | 'RemoveAnnouncement' | 'JoinAlliance' | 'NominateAlly' | 'ElevateAlly' | 'GiveRetirementNotice' | 'Retire' | 'KickMember' | 'AddUnscrupulousItems' | 'RemoveUnscrupulousItems';
|
||||
}
|
||||
|
||||
/** @name PalletNominationPoolsCall (368) */
|
||||
@@ -5698,7 +5703,8 @@ declare module '@polkadot/types/lookup' {
|
||||
readonly isFounder: boolean;
|
||||
readonly isFellow: boolean;
|
||||
readonly isAlly: boolean;
|
||||
readonly type: 'Founder' | 'Fellow' | 'Ally';
|
||||
readonly isRetiring: boolean;
|
||||
readonly type: 'Founder' | 'Fellow' | 'Ally' | 'Retiring';
|
||||
}
|
||||
|
||||
/** @name PalletAllianceError (639) */
|
||||
@@ -5709,7 +5715,6 @@ declare module '@polkadot/types/lookup' {
|
||||
readonly isNotMember: boolean;
|
||||
readonly isNotAlly: boolean;
|
||||
readonly isNotFounder: boolean;
|
||||
readonly isUpForKicking: boolean;
|
||||
readonly isNoVotingRights: boolean;
|
||||
readonly isAlreadyElevated: boolean;
|
||||
readonly isAlreadyUnscrupulous: boolean;
|
||||
@@ -5725,7 +5730,10 @@ declare module '@polkadot/types/lookup' {
|
||||
readonly isMissingAnnouncement: boolean;
|
||||
readonly isTooManyMembers: boolean;
|
||||
readonly isTooManyAnnouncements: boolean;
|
||||
readonly type: 'AllianceAlreadyInitialized' | 'AllianceNotYetInitialized' | 'AlreadyMember' | 'NotMember' | 'NotAlly' | 'NotFounder' | 'UpForKicking' | 'NoVotingRights' | 'AlreadyElevated' | 'AlreadyUnscrupulous' | 'AccountNonGrata' | 'NotListedAsUnscrupulous' | 'TooManyUnscrupulousItems' | 'TooLongWebsiteUrl' | 'InsufficientFunds' | 'WithoutIdentityDisplayAndWebsite' | 'WithoutGoodIdentityJudgement' | 'MissingProposalHash' | 'NotVetoableProposal' | 'MissingAnnouncement' | 'TooManyMembers' | 'TooManyAnnouncements';
|
||||
readonly isAlreadyRetiring: boolean;
|
||||
readonly isRetirementNoticeNotGiven: boolean;
|
||||
readonly isRetirementPeriodNotPassed: boolean;
|
||||
readonly type: 'AllianceAlreadyInitialized' | 'AllianceNotYetInitialized' | 'AlreadyMember' | 'NotMember' | 'NotAlly' | 'NotFounder' | 'NoVotingRights' | 'AlreadyElevated' | 'AlreadyUnscrupulous' | 'AccountNonGrata' | 'NotListedAsUnscrupulous' | 'TooManyUnscrupulousItems' | 'TooLongWebsiteUrl' | 'InsufficientFunds' | 'WithoutIdentityDisplayAndWebsite' | 'WithoutGoodIdentityJudgement' | 'MissingProposalHash' | 'NotVetoableProposal' | 'MissingAnnouncement' | 'TooManyMembers' | 'TooManyAnnouncements' | 'AlreadyRetiring' | 'RetirementNoticeNotGiven' | 'RetirementPeriodNotPassed';
|
||||
}
|
||||
|
||||
/** @name PalletNominationPoolsPoolMember (640) */
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '9.2.3' };
|
||||
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '9.3.1' };
|
||||
|
||||
@@ -24,7 +24,7 @@ import type { StatementKind } from '@polkadot/types/interfaces/claims';
|
||||
import type { CollectiveOrigin, MemberCount, ProposalIndex, Votes, VotesTo230 } from '@polkadot/types/interfaces/collective';
|
||||
import type { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/consensus';
|
||||
import type { AliveContractInfo, CodeHash, CodeSource, CodeUploadRequest, CodeUploadResult, CodeUploadResultValue, ContractCallFlags, ContractCallRequest, ContractExecResult, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractExecResultTo267, ContractInfo, ContractInstantiateResult, ContractInstantiateResultTo267, ContractInstantiateResultTo299, ContractReturnFlags, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateRequestV1, InstantiateRequestV2, InstantiateReturnValue, InstantiateReturnValueOk, InstantiateReturnValueTo267, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, StorageDeposit, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
|
||||
import type { ContractConstructorSpecLatest, ContractConstructorSpecV0, ContractConstructorSpecV1, ContractConstructorSpecV2, ContractConstructorSpecV3, ContractContractSpecV0, ContractContractSpecV1, ContractContractSpecV2, ContractContractSpecV3, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEventParamSpecLatest, ContractEventParamSpecV0, ContractEventParamSpecV2, ContractEventSpecLatest, ContractEventSpecV0, ContractEventSpecV1, ContractEventSpecV2, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpecLatest, ContractMessageParamSpecV0, ContractMessageParamSpecV2, ContractMessageSpecLatest, ContractMessageSpecV0, ContractMessageSpecV1, ContractMessageSpecV2, ContractMetadata, ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1, ContractMetadataV2, ContractMetadataV3, ContractProject, ContractProjectContract, ContractProjectInfo, ContractProjectSource, ContractProjectV0, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi';
|
||||
import type { ContractConstructorSpecLatest, ContractConstructorSpecV0, ContractConstructorSpecV1, ContractConstructorSpecV2, ContractConstructorSpecV3, ContractContractSpecV0, ContractContractSpecV1, ContractContractSpecV2, ContractContractSpecV3, ContractContractSpecV4, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEventParamSpecLatest, ContractEventParamSpecV0, ContractEventParamSpecV2, ContractEventSpecLatest, ContractEventSpecV0, ContractEventSpecV1, ContractEventSpecV2, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpecLatest, ContractMessageParamSpecV0, ContractMessageParamSpecV2, ContractMessageSpecLatest, ContractMessageSpecV0, ContractMessageSpecV1, ContractMessageSpecV2, ContractMetadata, ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1, ContractMetadataV2, ContractMetadataV3, ContractMetadataV4, ContractProject, ContractProjectContract, ContractProjectInfo, ContractProjectSource, ContractProjectV0, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi';
|
||||
import type { FundIndex, FundInfo, LastContribution, TrieIndex } from '@polkadot/types/interfaces/crowdloan';
|
||||
import type { CollationInfo, CollationInfoV1, ConfigData, MessageId, OverweightIndex, PageCounter, PageIndexData } from '@polkadot/types/interfaces/cumulus';
|
||||
import type { AccountVote, AccountVoteSplit, AccountVoteStandard, Conviction, Delegations, PreimageStatus, PreimageStatusAvailable, PriorLock, PropIndex, Proposal, ProxyState, ReferendumIndex, ReferendumInfo, ReferendumInfoFinished, ReferendumInfoTo239, ReferendumStatus, Tally, Voting, VotingDelegating, VotingDirect, VotingDirectVote } from '@polkadot/types/interfaces/democracy';
|
||||
@@ -52,7 +52,7 @@ import type { ProxyAnnouncement, ProxyDefinition, ProxyType } from '@polkadot/ty
|
||||
import type { AccountStatus, AccountValidity } from '@polkadot/types/interfaces/purchase';
|
||||
import type { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';
|
||||
import type { RpcMethods } from '@polkadot/types/interfaces/rpc';
|
||||
import type { AccountId, AccountId20, AccountId32, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, BlockNumberFor, BlockNumberOf, Call, CallHash, CallHashOf, ChangesTrieConfiguration, ChangesTrieSignal, CodecHash, Consensus, ConsensusEngineId, CrateVersion, Digest, DigestItem, EncodedJustification, ExtrinsicsWeight, Fixed128, Fixed64, FixedI128, FixedI64, FixedU128, FixedU64, H1024, H128, H160, H2048, H256, H32, H512, H64, Hash, Header, HeaderPartial, I32F32, Index, IndicesLookupSource, Justification, Justifications, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, MultiAddress, MultiSigner, OpaqueCall, Origin, OriginCaller, PalletId, PalletVersion, PalletsOrigin, Pays, PerU16, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Releases, RuntimeDbWeight, Seal, SealV0, SignedBlock, SignedBlockWithJustification, SignedBlockWithJustifications, Slot, SlotDuration, StorageData, StorageInfo, StorageProof, TransactionInfo, TransactionLongevity, TransactionPriority, TransactionStorageProof, TransactionTag, U32F32, ValidatorId, ValidatorIdOf, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
|
||||
import type { AccountId, AccountId20, AccountId32, AccountId33, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, BlockNumberFor, BlockNumberOf, Call, CallHash, CallHashOf, ChangesTrieConfiguration, ChangesTrieSignal, CodecHash, Consensus, ConsensusEngineId, CrateVersion, Digest, DigestItem, EncodedJustification, ExtrinsicsWeight, Fixed128, Fixed64, FixedI128, FixedI64, FixedU128, FixedU64, H1024, H128, H160, H2048, H256, H32, H512, H64, Hash, Header, HeaderPartial, I32F32, Index, IndicesLookupSource, Justification, Justifications, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, MultiAddress, MultiSigner, OpaqueCall, Origin, OriginCaller, PalletId, PalletVersion, PalletsOrigin, Pays, PerU16, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Releases, RuntimeDbWeight, Seal, SealV0, SignedBlock, SignedBlockWithJustification, SignedBlockWithJustifications, Slot, SlotDuration, StorageData, StorageInfo, StorageProof, TransactionInfo, TransactionLongevity, TransactionPriority, TransactionStorageProof, TransactionTag, U32F32, ValidatorId, ValidatorIdOf, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
|
||||
import type { Si0Field, Si0LookupTypeId, Si0Path, Si0Type, Si0TypeDef, Si0TypeDefArray, Si0TypeDefBitSequence, Si0TypeDefCompact, Si0TypeDefComposite, Si0TypeDefPhantom, Si0TypeDefPrimitive, Si0TypeDefSequence, Si0TypeDefTuple, Si0TypeDefVariant, Si0TypeParameter, Si0Variant, Si1Field, Si1LookupTypeId, Si1Path, Si1Type, Si1TypeDef, Si1TypeDefArray, Si1TypeDefBitSequence, Si1TypeDefCompact, Si1TypeDefComposite, Si1TypeDefPrimitive, Si1TypeDefSequence, Si1TypeDefTuple, Si1TypeDefVariant, Si1TypeParameter, Si1Variant, SiField, SiLookupTypeId, SiPath, SiType, SiTypeDef, SiTypeDefArray, SiTypeDefBitSequence, SiTypeDefCompact, SiTypeDefComposite, SiTypeDefPrimitive, SiTypeDefSequence, SiTypeDefTuple, SiTypeDefVariant, SiTypeParameter, SiVariant } from '@polkadot/types/interfaces/scaleInfo';
|
||||
import type { Period, Priority, SchedulePeriod, SchedulePriority, Scheduled, ScheduledTo254, TaskAddress } from '@polkadot/types/interfaces/scheduler';
|
||||
import type { BeefyKey, FullIdentification, IdentificationTuple, Keys, MembershipProof, SessionIndex, SessionKeys1, SessionKeys10, SessionKeys10B, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6, SessionKeys6B, SessionKeys7, SessionKeys7B, SessionKeys8, SessionKeys8B, SessionKeys9, SessionKeys9B, ValidatorCount } from '@polkadot/types/interfaces/session';
|
||||
@@ -78,6 +78,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
AccountId: AccountId;
|
||||
AccountId20: AccountId20;
|
||||
AccountId32: AccountId32;
|
||||
AccountId33: AccountId33;
|
||||
AccountIdOf: AccountIdOf;
|
||||
AccountIndex: AccountIndex;
|
||||
AccountInfo: AccountInfo;
|
||||
@@ -252,6 +253,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
ContractContractSpecV1: ContractContractSpecV1;
|
||||
ContractContractSpecV2: ContractContractSpecV2;
|
||||
ContractContractSpecV3: ContractContractSpecV3;
|
||||
ContractContractSpecV4: ContractContractSpecV4;
|
||||
ContractCryptoHasher: ContractCryptoHasher;
|
||||
ContractDiscriminant: ContractDiscriminant;
|
||||
ContractDisplayName: ContractDisplayName;
|
||||
@@ -295,6 +297,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
ContractMetadataV1: ContractMetadataV1;
|
||||
ContractMetadataV2: ContractMetadataV2;
|
||||
ContractMetadataV3: ContractMetadataV3;
|
||||
ContractMetadataV4: ContractMetadataV4;
|
||||
ContractProject: ContractProject;
|
||||
ContractProjectContract: ContractProjectContract;
|
||||
ContractProjectInfo: ContractProjectInfo;
|
||||
|
||||
@@ -20,17 +20,17 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.3",
|
||||
"version": "9.3.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/util": "^10.1.5",
|
||||
"@polkadot/x-bigint": "^10.1.5"
|
||||
"@polkadot/util": "^10.1.7",
|
||||
"@polkadot/x-bigint": "^10.1.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/types": "9.2.3",
|
||||
"@polkadot/types-augment": "9.2.3",
|
||||
"@polkadot/types-support": "9.2.3",
|
||||
"@polkadot/util-crypto": "^10.1.5"
|
||||
"@polkadot/types": "9.3.1",
|
||||
"@polkadot/types-augment": "9.3.1",
|
||||
"@polkadot/types-support": "9.3.1",
|
||||
"@polkadot/util-crypto": "^10.1.7"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ export function decodeVec<T extends Codec> (registry: Registry, result: T[], val
|
||||
const count = result.length;
|
||||
|
||||
for (let i = 0; i < count; i++) {
|
||||
// 26/08/2022 this is actually a false positive - after recent eslint upgdates
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
const entry = value[i];
|
||||
|
||||
try {
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-codec', path: 'auto', type: 'auto', version: '9.2.3' };
|
||||
export const packageInfo = { name: '@polkadot/types-codec', path: 'auto', type: 'auto', version: '9.3.1' };
|
||||
|
||||
@@ -20,14 +20,14 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.3",
|
||||
"version": "9.3.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/types-codec": "9.2.3",
|
||||
"@polkadot/util": "^10.1.5"
|
||||
"@polkadot/types-codec": "9.3.1",
|
||||
"@polkadot/util": "^10.1.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/types": "9.2.3"
|
||||
"@polkadot/types": "9.3.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-create', path: 'auto', type: 'auto', version: '9.2.3' };
|
||||
export const packageInfo = { name: '@polkadot/types-create', path: 'auto', type: 'auto', version: '9.3.1' };
|
||||
|
||||
@@ -8,11 +8,13 @@ import { isNumber, isUndefined, objectSpread, stringify } from '@polkadot/util';
|
||||
|
||||
import { TypeDefInfo } from '../types';
|
||||
|
||||
const stringIdentity = <T extends { toString: () => string }> (value: T): string => value.toString();
|
||||
type ToString = { toString: () => string };
|
||||
|
||||
const stringIdentity = <T extends ToString> (value: T): string => value.toString();
|
||||
|
||||
const INFO_WRAP = ['BTreeMap', 'BTreeSet', 'Compact', 'HashMap', 'Option', 'Result', 'Vec'];
|
||||
|
||||
export function paramsNotation <T> (outer: string, inner?: T | T[], transform: (_: T) => string = stringIdentity): string {
|
||||
export function paramsNotation <T extends ToString> (outer: string, inner?: T | T[], transform: (_: T) => string = stringIdentity): string {
|
||||
return `${outer}${
|
||||
inner
|
||||
? `<${(Array.isArray(inner) ? inner : [inner]).map(transform).join(', ')}>`
|
||||
|
||||
@@ -20,17 +20,17 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.3",
|
||||
"version": "9.3.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/networks": "^10.1.5",
|
||||
"@polkadot/types": "9.2.3",
|
||||
"@polkadot/types-codec": "9.2.3",
|
||||
"@polkadot/types-create": "9.2.3",
|
||||
"@polkadot/util": "^10.1.5"
|
||||
"@polkadot/networks": "^10.1.7",
|
||||
"@polkadot/types": "9.3.1",
|
||||
"@polkadot/types-codec": "9.3.1",
|
||||
"@polkadot/types-create": "9.3.1",
|
||||
"@polkadot/util": "^10.1.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api": "9.2.3"
|
||||
"@polkadot/api": "9.3.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-known', path: 'auto', type: 'auto', version: '9.2.3' };
|
||||
export const packageInfo = { name: '@polkadot/types-known', path: 'auto', type: 'auto', version: '9.3.1' };
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.3",
|
||||
"version": "9.3.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/util": "^10.1.5"
|
||||
"@polkadot/util": "^10.1.7"
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -236,7 +236,7 @@
|
||||
{
|
||||
"name": "BlockWeights",
|
||||
"type": 167,
|
||||
"value": "0x68f7096d0100000000204aa9d101000088f82405000000000178d7ba9158010000010098f73e5d01000001000000000000000088f824050000000001785f0dfccc0100000100204aa9d1010000010088526a7400000088f8240500000000000000",
|
||||
"value": "0x08a017710100000000204aa9d101000088f82405000000000178d7ba9158010000010098f73e5d01000001000000000000000088f824050000000001785f0dfccc0100000100204aa9d1010000010088526a7400000088f8240500000000000000",
|
||||
"docs": [
|
||||
" Block & extrinsics weights: base values and limits."
|
||||
]
|
||||
@@ -268,7 +268,7 @@
|
||||
{
|
||||
"name": "Version",
|
||||
"type": 174,
|
||||
"value": "0x186b7573616d61347061726974792d6b7573616d6102000000362400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0200000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a801000000f3ff14d5ab5270590100000017a6bc0d0062aeb3010000000c00000000",
|
||||
"value": "0x186b7573616d61347061726974792d6b7573616d6102000000402400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0200000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a801000000f3ff14d5ab5270590100000017a6bc0d0062aeb3010000000c00000000",
|
||||
"docs": [
|
||||
" Get the chain's current version."
|
||||
]
|
||||
@@ -278,7 +278,7 @@
|
||||
"type": 81,
|
||||
"value": "0x0200",
|
||||
"docs": [
|
||||
" The designated SS85 prefix of this chain.",
|
||||
" The designated SS58 prefix of this chain.",
|
||||
"",
|
||||
" This replaces the \"ss58Format\" property declared in the chain spec. Reason is",
|
||||
" that the runtime should know about the prefix in order to make use of it as",
|
||||
@@ -4556,7 +4556,7 @@
|
||||
{
|
||||
"name": "SignedMaxWeight",
|
||||
"type": 8,
|
||||
"value": "0x10e0b02457010000",
|
||||
"value": "0x7037a32057010000",
|
||||
"docs": [
|
||||
" Maximum weight of a signed solution.",
|
||||
"",
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -236,7 +236,7 @@
|
||||
{
|
||||
"name": "BlockWeights",
|
||||
"type": 164,
|
||||
"value": "0x5872d25c0100000000204aa9d1010000603b14050000000001a094cb9158010000010098f73e5d010000010000000000000000603b14050000000001a01c1efccc0100000100204aa9d1010000010088526a74000000603b140500000000000000",
|
||||
"value": "0x387fae5c0100000000204aa9d1010000603b14050000000001a094cb9158010000010098f73e5d010000010000000000000000603b14050000000001a01c1efccc0100000100204aa9d1010000010088526a74000000603b140500000000000000",
|
||||
"docs": [
|
||||
" Block & extrinsics weights: base values and limits."
|
||||
]
|
||||
@@ -268,7 +268,7 @@
|
||||
{
|
||||
"name": "Version",
|
||||
"type": 171,
|
||||
"value": "0x20706f6c6b61646f743c7061726974792d706f6c6b61646f740000000036240000000000003cdf6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0200000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a801000000f3ff14d5ab527059010000000d00000000",
|
||||
"value": "0x20706f6c6b61646f743c7061726974792d706f6c6b61646f7400000000402400000000000040df6acb689907609b0400000037e397fc7c91f5e40100000040fe3ad401f8959a0600000017a6bc0d0062aeb301000000d2bc9897eed08f1503000000f78b278be53f454c02000000af2c0297a23e6d3d0200000049eaaf1b548a0cb00100000091d5df18b0d2cf5801000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000ab3c0572291feb8b01000000bc9d89904f5b923f0100000037c8bb1350a9a2a801000000f3ff14d5ab527059010000000d00000000",
|
||||
"docs": [
|
||||
" Get the chain's current version."
|
||||
]
|
||||
@@ -278,7 +278,7 @@
|
||||
"type": 80,
|
||||
"value": "0x0000",
|
||||
"docs": [
|
||||
" The designated SS85 prefix of this chain.",
|
||||
" The designated SS58 prefix of this chain.",
|
||||
"",
|
||||
" This replaces the \"ss58Format\" property declared in the chain spec. Reason is",
|
||||
" that the runtime should know about the prefix in order to make use of it as",
|
||||
@@ -4115,7 +4115,7 @@
|
||||
{
|
||||
"name": "SignedMaxWeight",
|
||||
"type": 8,
|
||||
"value": "0x4822f93457010000",
|
||||
"value": "0x68151d3557010000",
|
||||
"docs": [
|
||||
" Maximum weight of a signed solution.",
|
||||
"",
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -278,7 +278,7 @@
|
||||
"type": 87,
|
||||
"value": "0x2a00",
|
||||
"docs": [
|
||||
" The designated SS85 prefix of this chain.",
|
||||
" The designated SS58 prefix of this chain.",
|
||||
"",
|
||||
" This replaces the \"ss58Format\" property declared in the chain spec. Reason is",
|
||||
" that the runtime should know about the prefix in order to make use of it as",
|
||||
@@ -6311,21 +6311,21 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "UpForKicking",
|
||||
"modifier": "Default",
|
||||
"name": "RetiringMembers",
|
||||
"modifier": "Optional",
|
||||
"type": {
|
||||
"map": {
|
||||
"hashers": [
|
||||
"Blake2_128Concat"
|
||||
],
|
||||
"key": 0,
|
||||
"value": 38
|
||||
"value": 4
|
||||
}
|
||||
},
|
||||
"fallback": "0x00",
|
||||
"docs": [
|
||||
" A set of members that are (potentially) being kicked out. They cannot retire until the",
|
||||
" motion is settled."
|
||||
" A set of members who gave a retirement notice. They can retire after the end of retirement",
|
||||
" period stored as a future block number."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -9805,6 +9805,21 @@
|
||||
"An ally has been elevated to Fellow."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MemberRetirementPeriodStarted",
|
||||
"fields": [
|
||||
{
|
||||
"name": "member",
|
||||
"type": 0,
|
||||
"typeName": "T::AccountId",
|
||||
"docs": []
|
||||
}
|
||||
],
|
||||
"index": 6,
|
||||
"docs": [
|
||||
"A member gave retirement notice and their retirement period started."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MemberRetired",
|
||||
"fields": [
|
||||
@@ -9821,7 +9836,7 @@
|
||||
"docs": []
|
||||
}
|
||||
],
|
||||
"index": 6,
|
||||
"index": 7,
|
||||
"docs": [
|
||||
"A member has retired with its deposit unreserved."
|
||||
]
|
||||
@@ -9842,7 +9857,7 @@
|
||||
"docs": []
|
||||
}
|
||||
],
|
||||
"index": 7,
|
||||
"index": 8,
|
||||
"docs": [
|
||||
"A member has been kicked out with its deposit slashed."
|
||||
]
|
||||
@@ -9857,7 +9872,7 @@
|
||||
"docs": []
|
||||
}
|
||||
],
|
||||
"index": 8,
|
||||
"index": 9,
|
||||
"docs": [
|
||||
"Accounts or websites have been added into the list of unscrupulous items."
|
||||
]
|
||||
@@ -9872,7 +9887,7 @@
|
||||
"docs": []
|
||||
}
|
||||
],
|
||||
"index": 9,
|
||||
"index": 10,
|
||||
"docs": [
|
||||
"Accounts or websites have been removed from the list of unscrupulous items."
|
||||
]
|
||||
@@ -28777,11 +28792,21 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "retire",
|
||||
"name": "give_retirement_notice",
|
||||
"fields": [],
|
||||
"index": 11,
|
||||
"docs": [
|
||||
"As a member, retire from the alliance and unreserve the deposit."
|
||||
"As a member, give a retirement notice and start a retirement period required to pass in",
|
||||
"order to retire."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "retire",
|
||||
"fields": [],
|
||||
"index": 12,
|
||||
"docs": [
|
||||
"As a member, retire from the alliance and unreserve the deposit.",
|
||||
"This can only be done once you have `give_retirement_notice` and it has expired."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -28794,7 +28819,7 @@
|
||||
"docs": []
|
||||
}
|
||||
],
|
||||
"index": 12,
|
||||
"index": 13,
|
||||
"docs": [
|
||||
"Kick a member from the alliance and slash its deposit."
|
||||
]
|
||||
@@ -28809,7 +28834,7 @@
|
||||
"docs": []
|
||||
}
|
||||
],
|
||||
"index": 13,
|
||||
"index": 14,
|
||||
"docs": [
|
||||
"Add accounts or websites to the list of unscrupulous items."
|
||||
]
|
||||
@@ -28824,7 +28849,7 @@
|
||||
"docs": []
|
||||
}
|
||||
],
|
||||
"index": 14,
|
||||
"index": 15,
|
||||
"docs": [
|
||||
"Deem an item no longer unscrupulous."
|
||||
]
|
||||
@@ -42303,6 +42328,12 @@
|
||||
"fields": [],
|
||||
"index": 2,
|
||||
"docs": []
|
||||
},
|
||||
{
|
||||
"name": "Retiring",
|
||||
"fields": [],
|
||||
"index": 3,
|
||||
"docs": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -42494,18 +42525,10 @@
|
||||
"Account is not a founder."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "UpForKicking",
|
||||
"fields": [],
|
||||
"index": 6,
|
||||
"docs": [
|
||||
"This member is up for being kicked from the Alliance and cannot perform this operation."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "NoVotingRights",
|
||||
"fields": [],
|
||||
"index": 7,
|
||||
"index": 6,
|
||||
"docs": [
|
||||
"Account does not have voting rights."
|
||||
]
|
||||
@@ -42513,7 +42536,7 @@
|
||||
{
|
||||
"name": "AlreadyElevated",
|
||||
"fields": [],
|
||||
"index": 8,
|
||||
"index": 7,
|
||||
"docs": [
|
||||
"Account is already an elevated (fellow) member."
|
||||
]
|
||||
@@ -42521,7 +42544,7 @@
|
||||
{
|
||||
"name": "AlreadyUnscrupulous",
|
||||
"fields": [],
|
||||
"index": 9,
|
||||
"index": 8,
|
||||
"docs": [
|
||||
"Item is already listed as unscrupulous."
|
||||
]
|
||||
@@ -42529,7 +42552,7 @@
|
||||
{
|
||||
"name": "AccountNonGrata",
|
||||
"fields": [],
|
||||
"index": 10,
|
||||
"index": 9,
|
||||
"docs": [
|
||||
"Account has been deemed unscrupulous by the Alliance and is not welcome to join or be",
|
||||
"nominated."
|
||||
@@ -42538,7 +42561,7 @@
|
||||
{
|
||||
"name": "NotListedAsUnscrupulous",
|
||||
"fields": [],
|
||||
"index": 11,
|
||||
"index": 10,
|
||||
"docs": [
|
||||
"Item has not been deemed unscrupulous."
|
||||
]
|
||||
@@ -42546,7 +42569,7 @@
|
||||
{
|
||||
"name": "TooManyUnscrupulousItems",
|
||||
"fields": [],
|
||||
"index": 12,
|
||||
"index": 11,
|
||||
"docs": [
|
||||
"The number of unscrupulous items exceeds `MaxUnscrupulousItems`."
|
||||
]
|
||||
@@ -42554,7 +42577,7 @@
|
||||
{
|
||||
"name": "TooLongWebsiteUrl",
|
||||
"fields": [],
|
||||
"index": 13,
|
||||
"index": 12,
|
||||
"docs": [
|
||||
"Length of website URL exceeds `MaxWebsiteUrlLength`."
|
||||
]
|
||||
@@ -42562,7 +42585,7 @@
|
||||
{
|
||||
"name": "InsufficientFunds",
|
||||
"fields": [],
|
||||
"index": 14,
|
||||
"index": 13,
|
||||
"docs": [
|
||||
"Balance is insufficient for the required deposit."
|
||||
]
|
||||
@@ -42570,7 +42593,7 @@
|
||||
{
|
||||
"name": "WithoutIdentityDisplayAndWebsite",
|
||||
"fields": [],
|
||||
"index": 15,
|
||||
"index": 14,
|
||||
"docs": [
|
||||
"The account's identity does not have display field and website field."
|
||||
]
|
||||
@@ -42578,7 +42601,7 @@
|
||||
{
|
||||
"name": "WithoutGoodIdentityJudgement",
|
||||
"fields": [],
|
||||
"index": 16,
|
||||
"index": 15,
|
||||
"docs": [
|
||||
"The account's identity has no good judgement."
|
||||
]
|
||||
@@ -42586,7 +42609,7 @@
|
||||
{
|
||||
"name": "MissingProposalHash",
|
||||
"fields": [],
|
||||
"index": 17,
|
||||
"index": 16,
|
||||
"docs": [
|
||||
"The proposal hash is not found."
|
||||
]
|
||||
@@ -42594,7 +42617,7 @@
|
||||
{
|
||||
"name": "NotVetoableProposal",
|
||||
"fields": [],
|
||||
"index": 18,
|
||||
"index": 17,
|
||||
"docs": [
|
||||
"The proposal is not vetoable."
|
||||
]
|
||||
@@ -42602,7 +42625,7 @@
|
||||
{
|
||||
"name": "MissingAnnouncement",
|
||||
"fields": [],
|
||||
"index": 19,
|
||||
"index": 18,
|
||||
"docs": [
|
||||
"The announcement is not found."
|
||||
]
|
||||
@@ -42610,7 +42633,7 @@
|
||||
{
|
||||
"name": "TooManyMembers",
|
||||
"fields": [],
|
||||
"index": 20,
|
||||
"index": 19,
|
||||
"docs": [
|
||||
"Number of members exceeds `MaxMembersCount`."
|
||||
]
|
||||
@@ -42618,10 +42641,34 @@
|
||||
{
|
||||
"name": "TooManyAnnouncements",
|
||||
"fields": [],
|
||||
"index": 21,
|
||||
"index": 20,
|
||||
"docs": [
|
||||
"Number of announcements exceeds `MaxAnnouncementsCount`."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "AlreadyRetiring",
|
||||
"fields": [],
|
||||
"index": 21,
|
||||
"docs": [
|
||||
"Account already gave retirement notice"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "RetirementNoticeNotGiven",
|
||||
"fields": [],
|
||||
"index": 22,
|
||||
"docs": [
|
||||
"Account did not give a retirement notice required to retire."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "RetirementPeriodNotPassed",
|
||||
"fields": [],
|
||||
"index": 23,
|
||||
"docs": [
|
||||
"Retirement period has not passed."
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-support', path: 'auto', type: 'auto', version: '9.2.3' };
|
||||
export const packageInfo = { name: '@polkadot/types-support', path: 'auto', type: 'auto', version: '9.3.1' };
|
||||
|
||||
@@ -20,20 +20,20 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.3",
|
||||
"version": "9.3.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/keyring": "^10.1.5",
|
||||
"@polkadot/types-augment": "9.2.3",
|
||||
"@polkadot/types-codec": "9.2.3",
|
||||
"@polkadot/types-create": "9.2.3",
|
||||
"@polkadot/util": "^10.1.5",
|
||||
"@polkadot/util-crypto": "^10.1.5",
|
||||
"@polkadot/keyring": "^10.1.7",
|
||||
"@polkadot/types-augment": "9.3.1",
|
||||
"@polkadot/types-codec": "9.3.1",
|
||||
"@polkadot/types-create": "9.3.1",
|
||||
"@polkadot/util": "^10.1.7",
|
||||
"@polkadot/util-crypto": "^10.1.7",
|
||||
"rxjs": "^7.5.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^10.1.5",
|
||||
"@polkadot/types-support": "9.2.3"
|
||||
"@polkadot/keyring": "^10.1.7",
|
||||
"@polkadot/types-support": "9.3.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import { Raw } from '@polkadot/types-codec';
|
||||
import jsonVec from '@polkadot/types-support/json/AccountIdVec.001.json' assert { type: 'json' };
|
||||
|
||||
import { TypeRegistry } from '../create';
|
||||
import { GenericAccountId as AccountId } from '.';
|
||||
|
||||
describe('AccountId', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
@@ -37,7 +36,7 @@ describe('AccountId', (): void => {
|
||||
});
|
||||
|
||||
describe('decoding', (): void => {
|
||||
const testDecode = (type: string, input: Uint8Array | string | AccountId, expected: string): void =>
|
||||
const testDecode = (type: string, input: Uint8Array | string, expected: string): void =>
|
||||
it(`can decode from ${type}`, (): void => {
|
||||
expect(
|
||||
registry
|
||||
@@ -57,6 +56,11 @@ describe('AccountId', (): void => {
|
||||
registry.createType('AccountId', '0x0102030405060708010203040506070801020304050607080102030405060708'),
|
||||
'5C62W7ELLAAfix9LYrcx5smtcffbhvThkM5x7xfMeYXCtGwF'
|
||||
);
|
||||
testDecode(
|
||||
'AccountId33',
|
||||
registry.createType('AccountId33', '0x098765430987654309876543098765430987654309876543098765430987654309'),
|
||||
'5CHCWUYMmDGeJjiuaQ1LnrsAWacDhiTAV6vCfytSxoqBdCCb'
|
||||
);
|
||||
testDecode('hex', '0x0102030405060708010203040506070801020304050607080102030405060708', '5C62W7ELLAAfix9LYrcx5smtcffbhvThkM5x7xfMeYXCtGwF');
|
||||
testDecode('string', '5C62W7ELLAAfix9LYrcx5smtcffbhvThkM5x7xfMeYXCtGwF', '5C62W7ELLAAfix9LYrcx5smtcffbhvThkM5x7xfMeYXCtGwF');
|
||||
testDecode(
|
||||
|
||||
@@ -22,20 +22,14 @@ function decodeAccountId (value?: AnyU8a | AnyString): Uint8Array {
|
||||
throw new Error(`Unknown type passed to AccountId constructor, found typeof ${typeof value}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* @name GenericAccountId
|
||||
* @description
|
||||
* A wrapper around an AccountId/PublicKey representation. Since we are dealing with
|
||||
* underlying PublicKeys (32 bytes in length), we extend from U8aFixed which is
|
||||
* just a Uint8Array wrapper with a fixed length.
|
||||
*/
|
||||
export class GenericAccountId extends U8aFixed {
|
||||
constructor (registry: Registry, value?: AnyU8a) {
|
||||
class BaseAccountId extends U8aFixed {
|
||||
constructor (registry: Registry, allowedBits = 256 | 264, value?: AnyU8a) {
|
||||
const decoded = decodeAccountId(value);
|
||||
const decodedBits = decoded.length * 8;
|
||||
|
||||
// Part of stream containing >= 32 bytes or a all empty (defaults)
|
||||
if (decoded.length < 32 && decoded.some((b) => b)) {
|
||||
throw new Error(`Invalid AccountId provided, expected 32 bytes, found ${decoded.length}`);
|
||||
if (decodedBits < allowedBits && decoded.some((b) => b)) {
|
||||
throw new Error(`Invalid AccountId provided, expected ${allowedBits >> 3} bytes, found ${decoded.length}`);
|
||||
}
|
||||
|
||||
super(registry, decoded, 256);
|
||||
@@ -83,3 +77,22 @@ export class GenericAccountId extends U8aFixed {
|
||||
return 'AccountId';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @name GenericAccountId
|
||||
* @description
|
||||
* A wrapper around an AccountId/PublicKey representation. Since we are dealing with
|
||||
* underlying PublicKeys (32 bytes in length), we extend from U8aFixed which is
|
||||
* just a Uint8Array wrapper with a fixed length.
|
||||
*/
|
||||
export class GenericAccountId extends BaseAccountId {
|
||||
constructor (registry: Registry, value?: AnyU8a) {
|
||||
super(registry, 256, value);
|
||||
}
|
||||
}
|
||||
|
||||
export class GenericAccountId33 extends BaseAccountId {
|
||||
constructor (registry: Registry, value?: AnyU8a) {
|
||||
super(registry, 264, value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
export * from '../ethereum';
|
||||
|
||||
export { GenericAccountId } from './AccountId';
|
||||
export { GenericAccountId, GenericAccountId as GenericAccountId32, GenericAccountId33 } from './AccountId';
|
||||
export { GenericAccountIndex } from './AccountIndex';
|
||||
export { GenericBlock } from './Block';
|
||||
export { GenericCall } from './Call';
|
||||
|
||||
@@ -106,6 +106,7 @@ const spec = {
|
||||
events: 'Vec<ContractEventSpecV2>',
|
||||
docs: 'Vec<Text>'
|
||||
},
|
||||
ContractContractSpecV4: 'ContractContractSpecV3',
|
||||
ContractDisplayName: 'SiPath',
|
||||
ContractEventParamSpecV0: {
|
||||
name: 'Text',
|
||||
@@ -177,6 +178,7 @@ const spec = {
|
||||
};
|
||||
|
||||
const ContractMetadataV0 = {
|
||||
metadataVersion: 'Text',
|
||||
types: 'Vec<Si0Type>',
|
||||
spec: 'ContractContractSpecV0'
|
||||
};
|
||||
@@ -196,6 +198,8 @@ const ContractMetadataV3 = {
|
||||
spec: 'ContractContractSpecV3'
|
||||
};
|
||||
|
||||
const ContractMetadataV4 = ContractMetadataV3;
|
||||
|
||||
const ContractProjectInfo = {
|
||||
source: 'ContractProjectSource',
|
||||
contract: 'ContractProjectContract'
|
||||
@@ -207,7 +211,7 @@ const latest = {
|
||||
ContractEventParamSpecLatest: 'ContractEventParamSpecV2',
|
||||
ContractMessageParamSpecLatest: 'ContractMessageParamSpecV2',
|
||||
ContractMessageSpecLatest: 'ContractMessageSpecV2',
|
||||
ContractMetadataLatest: 'ContractMetadataV3'
|
||||
ContractMetadataLatest: 'ContractMetadataV4'
|
||||
};
|
||||
|
||||
export default {
|
||||
@@ -218,12 +222,14 @@ export default {
|
||||
ContractMetadataV1,
|
||||
ContractMetadataV2,
|
||||
ContractMetadataV3,
|
||||
ContractMetadataV4,
|
||||
ContractMetadata: {
|
||||
_enum: {
|
||||
V0: 'ContractMetadataV0',
|
||||
V1: 'ContractMetadataV1',
|
||||
V2: 'ContractMetadataV2',
|
||||
V3: 'ContractMetadataV3'
|
||||
V3: 'ContractMetadataV3',
|
||||
V4: 'ContractMetadataV4'
|
||||
}
|
||||
},
|
||||
ContractProjectV0: objectSpread({ metadataVersion: 'Text' }, ContractProjectInfo, ContractMetadataV0),
|
||||
|
||||
@@ -74,6 +74,9 @@ export interface ContractContractSpecV3 extends Struct {
|
||||
readonly docs: Vec<Text>;
|
||||
}
|
||||
|
||||
/** @name ContractContractSpecV4 */
|
||||
export interface ContractContractSpecV4 extends ContractContractSpecV3 {}
|
||||
|
||||
/** @name ContractCryptoHasher */
|
||||
export interface ContractCryptoHasher extends Enum {
|
||||
readonly isBlake2x256: boolean;
|
||||
@@ -240,14 +243,17 @@ export interface ContractMetadata extends Enum {
|
||||
readonly asV2: ContractMetadataV2;
|
||||
readonly isV3: boolean;
|
||||
readonly asV3: ContractMetadataV3;
|
||||
readonly type: 'V0' | 'V1' | 'V2' | 'V3';
|
||||
readonly isV4: boolean;
|
||||
readonly asV4: ContractMetadataV4;
|
||||
readonly type: 'V0' | 'V1' | 'V2' | 'V3' | 'V4';
|
||||
}
|
||||
|
||||
/** @name ContractMetadataLatest */
|
||||
export interface ContractMetadataLatest extends ContractMetadataV3 {}
|
||||
export interface ContractMetadataLatest extends ContractMetadataV4 {}
|
||||
|
||||
/** @name ContractMetadataV0 */
|
||||
export interface ContractMetadataV0 extends Struct {
|
||||
readonly metadataVersion: Text;
|
||||
readonly types: Vec<Si0Type>;
|
||||
readonly spec: ContractContractSpecV0;
|
||||
}
|
||||
@@ -270,6 +276,12 @@ export interface ContractMetadataV3 extends Struct {
|
||||
readonly spec: ContractContractSpecV3;
|
||||
}
|
||||
|
||||
/** @name ContractMetadataV4 */
|
||||
export interface ContractMetadataV4 extends Struct {
|
||||
readonly types: Vec<PortableType>;
|
||||
readonly spec: ContractContractSpecV3;
|
||||
}
|
||||
|
||||
/** @name ContractProject */
|
||||
export interface ContractProject extends ITuple<[ContractProjectInfo, ContractMetadata]> {}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ export const runtime: DefinitionsCall = {
|
||||
type: 'AccountId'
|
||||
}
|
||||
],
|
||||
type: 'Result<Balance, NpApiError>'
|
||||
type: 'Balance'
|
||||
}
|
||||
},
|
||||
version: 1
|
||||
|
||||
@@ -53,7 +53,8 @@ export default {
|
||||
types: objectSpread({}, numberTypes, {
|
||||
AccountId: 'AccountId32',
|
||||
AccountId20: 'GenericEthereumAccountId',
|
||||
AccountId32: 'GenericAccountId',
|
||||
AccountId32: 'GenericAccountId32',
|
||||
AccountId33: 'GenericAccountId33',
|
||||
AccountIdOf: 'AccountId',
|
||||
AccountIndex: 'GenericAccountIndex',
|
||||
Address: 'MultiAddress',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import type { GenericAccountId, GenericAccountIndex, GenericBlock, GenericCall, GenericConsensusEngineId, GenericEthereumAccountId, GenericLookupSource, GenericMultiAddress, StorageKey } from '@polkadot/types';
|
||||
import type { GenericAccountId32, GenericAccountId33, GenericAccountIndex, GenericBlock, GenericCall, GenericConsensusEngineId, GenericEthereumAccountId, GenericLookupSource, GenericMultiAddress, StorageKey } from '@polkadot/types';
|
||||
import type { Bytes, Compact, DoNotConstruct, Enum, Int, Null, Option, Struct, U8aFixed, UInt, Vec, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { ITuple } from '@polkadot/types-codec/types';
|
||||
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||
@@ -15,7 +15,10 @@ export interface AccountId extends AccountId32 {}
|
||||
export interface AccountId20 extends GenericEthereumAccountId {}
|
||||
|
||||
/** @name AccountId32 */
|
||||
export interface AccountId32 extends GenericAccountId {}
|
||||
export interface AccountId32 extends GenericAccountId32 {}
|
||||
|
||||
/** @name AccountId33 */
|
||||
export interface AccountId33 extends GenericAccountId33 {}
|
||||
|
||||
/** @name AccountIdOf */
|
||||
export interface AccountIdOf extends AccountId {}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types', path: 'auto', type: 'auto', version: '9.2.3' };
|
||||
export const packageInfo = { name: '@polkadot/types', path: 'auto', type: 'auto', version: '9.3.1' };
|
||||
|
||||
Reference in New Issue
Block a user