Compare commits

..
26 Commits
Author SHA1 Message Date
github-actions[bot] 0da2c25abd [CI Skip] release/stable 9.6.2
skip-checks: true
2022-10-30 08:20:45 +00:00
Jaco 2f0036e34a 9.6.2 (#5304) 2022-10-30 10:12:41 +02:00
github-actions[bot] bf4cff113a [CI Skip] bump/beta 9.6.2-0-x
skip-checks: true
2022-10-28 09:27:10 +00:00
Jaco 3f3c51d652 Adjust historic DispatchError type for statemint/statemine (#5303) 2022-10-28 12:18:50 +03:00
github-actions[bot] 0caae6beb5 [CI Skip] release/stable 9.6.1
skip-checks: true
2022-10-23 06:31:21 +00:00
Jaco 7f92bb33bc 9.6.1 (#5289) 2022-10-23 09:23:03 +03:00
github-actions[bot] 20b39c18f6 [CI Skip] bump/beta 9.5.3-9-x
skip-checks: true
2022-10-22 07:29:13 +00:00
Jaco f6907eb5de Bump dev (#5286) 2022-10-22 10:21:23 +03:00
github-actions[bot] 8880785951 [CI Skip] bump/beta 9.5.3-8-x
skip-checks: true
2022-10-21 14:25:29 +00:00
Jaco c4a4e1acd7 Update CHANGELOG (#5285) 2022-10-21 17:16:51 +03:00
github-actions[bot] e1cf75288c [CI Skip] bump/beta 9.5.3-7-x
skip-checks: true
2022-10-21 07:31:40 +00:00
Jaco be95356999 Ensure apiAt.<section>.<method>.key(...) passes through the correct arguments (#5283) 2022-10-21 10:23:54 +03:00
github-actions[bot] b66d62548a [CI Skip] bump/beta 9.5.3-6-x
skip-checks: true
2022-10-20 09:41:41 +00:00
Jaco bee7db805a Retrieve preimages from new pallet (#5281) 2022-10-20 12:33:52 +03:00
github-actions[bot] ca7a382c5b [CI Skip] bump/beta 9.5.3-5-x
skip-checks: true
2022-10-20 08:57:27 +00:00
Jaco 40393ddc1e Prepare for swap to global V2 weight defs (#5280) 2022-10-20 11:46:23 +03:00
github-actions[bot] 5bd2a664ec [CI Skip] bump/beta 9.5.3-4-x
skip-checks: true
2022-10-20 04:38:40 +00:00
Shunji Zhan 52ef27806b small polish (#5276) 2022-10-20 07:31:47 +03:00
github-actions[bot] 8e234f8a98 [CI Skip] bump/beta 9.5.3-3-x
skip-checks: true
2022-10-19 05:18:01 +00:00
Jaco 5e9ba771b5 Bump dev (#5278) 2022-10-19 08:09:31 +03:00
github-actions[bot] e855dca167 [CI Skip] bump/beta 9.5.3-2-x
skip-checks: true
2022-10-18 13:21:06 +00:00
Nikos Kontakis 3da1bbe403 Bump Substrate connect to 0.7.15 (#5275) 2022-10-18 16:10:46 +03:00
github-actions[bot] 5740c00259 [CI Skip] bump/beta 9.5.3-1-x
skip-checks: true
2022-10-18 10:43:18 +00:00
Jaco 8bb8fa0f32 Polkadot & Westend upgrade blocks (#5277) 2022-10-18 13:35:35 +03:00
github-actions[bot] 30bd10c3b3 [CI Skip] bump/beta 9.5.3-0-x
skip-checks: true
2022-10-17 12:05:45 +00:00
Jaco f7b647f4c6 Bump metadata (#5274)
* Bump metadata

* Adjust democracy proposals

* CHANGELOG

* Adjust for bounded extraction

* Adjust

* Adjust nextExternal

* dispatchQueue adjustments

* checkTypes adjust

* CHANGELOG
2022-10-17 14:55:51 +03:00
69 changed files with 23619 additions and 24031 deletions
+25
View File
@@ -1,5 +1,30 @@
# CHANGELOG
## 9.6.2 Oct 30, 2022
Changes:
- Adjust historic `DispatchError` type for `statemint/statemine`
## 9.6.1 Oct 23, 2022
Contributed:
- Update `@substrate/connect` to latest (Thanks to https://github.com/wirednkod)
- Use `.?` operators in submittable class (Thanks to https://github.com/shunjizhan)
Changes:
- Cater for latest Substrate `DispatchError` (additional preimage statuses)
- Adjust `api.derive.democracy.*` to return `imageHash` as `HexString` (as applicable, supports current-gen preimages)
- Adjust `api.derive.preimages.*` to retrieve via `democracy` or `preimage` pallets
- Ensure `apiAt.<section>.<method>.key(...)` passes through the correct arguments
- Apply fallback for Weight downgrades (V2 >> V1 detection)
- Update to latest Substrate metadata
- Polkadot 9291 & Westend 9300 upgrade blocks
## 9.5.2 Oct 16, 2022
Changes:
+3 -2
View File
@@ -1,11 +1,11 @@
3252 Jaco 9.5.2 (#5273)
3263 Jaco 9.6.2 (#5304)
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)
20 Luke Schoen fix: Fixes TypeError: Cannot read property 'vesting' of undefined (#1970)
16 Xiliang Chen implement entriesPaged and keysPages for query at (#4701)
15 Jeremías Díaz feat(types): add correct tuple type to storage key (#3054)
12 Nikos Kontakis Add resubscription delete on unsubscribe (#5230)
13 Nikos Kontakis Bump Substrate connect to 0.7.15 (#5275)
11 Ian He HttpProvider support clone() (#3949)
10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954)
5 Chevdor Fix metadata package link (#3458)
@@ -101,6 +101,7 @@
1 Sean Young Solang requires u256 and i256 types (#2752)
1 serge make WS provider timeout configurable (#4758)
1 Sergei Pepyakin INK! -> ink! (#1347)
1 Shunji Zhan small polish (#5276)
1 WoeOm adapt Darwinia, Crab Network types (#3498)
1 Xat_MassacrE Fix packages/types/src/codec/utils/encodeTypes.ts encodeSubTypes bug (#1544)
1 yjh fix MetadataVersioned.asV12 (#2983)
+7 -7
View File
@@ -11,10 +11,10 @@
},
"sideEffects": false,
"type": "module",
"version": "9.5.2",
"version": "9.6.2",
"versions": {
"git": "9.5.2",
"npm": "9.5.2"
"git": "9.6.2",
"npm": "9.6.2"
},
"workspaces": [
"packages/*"
@@ -36,12 +36,12 @@
"test:one": "NODE_OPTIONS=--experimental-vm-modules polkadot-dev-run-test --detectOpenHandles --forceExit"
},
"devDependencies": {
"@babel/core": "^7.19.3",
"@babel/core": "^7.19.6",
"@babel/register": "^7.18.9",
"@babel/runtime": "^7.19.4",
"@polkadot/dev": "^0.67.144",
"@babel/runtime": "^7.20.0",
"@polkadot/dev": "^0.67.150",
"@polkadot/typegen": "workspace:packages/typegen",
"@types/jest": "^29.1.2",
"@types/jest": "^29.2.0",
"copyfiles": "^2.4.1"
},
"resolutions": {
+8 -8
View File
@@ -20,18 +20,18 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.5.2",
"version": "9.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.19.4",
"@polkadot/api-base": "9.5.2",
"@polkadot/rpc-augment": "9.5.2",
"@polkadot/types": "9.5.2",
"@polkadot/types-augment": "9.5.2",
"@polkadot/types-codec": "9.5.2",
"@babel/runtime": "^7.20.0",
"@polkadot/api-base": "9.6.2",
"@polkadot/rpc-augment": "9.6.2",
"@polkadot/types": "9.6.2",
"@polkadot/types-augment": "9.6.2",
"@polkadot/types-codec": "9.6.2",
"@polkadot/util": "^10.1.11"
},
"devDependencies": {
"@polkadot/types-support": "9.5.2"
"@polkadot/types-support": "9.6.2"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '9.5.2' };
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '9.6.2' };
+10 -29
View File
@@ -191,27 +191,6 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec;
};
contracts: {
/**
* The weight per byte of code that is charged when loading a contract from storage.
*
* Currently, FRAME only charges fees for computation incurred but not for PoV
* consumption caused for storage access. This is usually not exploitable because
* accessing storage carries some substantial weight costs, too. However in case
* of contract code very much PoV consumption can be caused while consuming very little
* computation. This could be used to keep the chain busy without paying the
* proper fee for it. Until this is resolved we charge from the weight meter for
* contract access.
*
* For more information check out: <https://github.com/paritytech/substrate/issues/10301>
*
* [`DefaultContractAccessWeight`] is a safe default to be used for Polkadot or Kusama
* parachains.
*
* # Note
*
* This is only relevant for parachains. Set to zero in case of a standalone chain.
**/
contractAccessWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
/**
* The maximum number of contracts that can be pending for deletion.
*
@@ -311,6 +290,14 @@ declare module '@polkadot/api-base/types/consts' {
* How often (in blocks) new public referenda are launched.
**/
launchPeriod: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of items which can be blacklisted.
**/
maxBlacklisted: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of deposits a public proposal may have at any time.
**/
maxDeposits: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of public proposals that can exist at any time.
**/
@@ -326,10 +313,6 @@ declare module '@polkadot/api-base/types/consts' {
* The minimum amount to be used as a deposit for a public referendum proposal.
**/
minimumDeposit: u128 & AugmentedConst<ApiType>;
/**
* The amount of balance that must be deposited per byte of preimage stored.
**/
preimageByteDeposit: u128 & AugmentedConst<ApiType>;
/**
* The minimum period of vote locking.
*
@@ -815,13 +798,11 @@ declare module '@polkadot/api-base/types/consts' {
};
scheduler: {
/**
* The maximum weight that may be scheduled per block for any dispatchables of less
* priority than `schedule::HARD_DEADLINE`.
* The maximum weight that may be scheduled per block for any dispatchables.
**/
maximumWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
/**
* The maximum number of scheduled calls in the queue for a single block.
* Not strictly enforced, but used for weight estimation.
**/
maxScheduledPerBlock: u32 & AugmentedConst<ApiType>;
/**
@@ -1173,7 +1154,7 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
voterBagsList: {
voterList: {
/**
* The list of thresholds separating the various bags.
*
+8 -28
View File
@@ -652,18 +652,10 @@ declare module '@polkadot/api-base/types/errors' {
* Identity may not veto a proposal twice
**/
AlreadyVetoed: AugmentedError<ApiType>;
/**
* Preimage already noted
**/
DuplicatePreimage: AugmentedError<ApiType>;
/**
* Proposal already made
**/
DuplicateProposal: AugmentedError<ApiType>;
/**
* Imminent
**/
Imminent: AugmentedError<ApiType>;
/**
* The instant referendum origin is currently disallowed.
**/
@@ -700,10 +692,6 @@ declare module '@polkadot/api-base/types/errors' {
* The account is not currently delegating.
**/
NotDelegating: AugmentedError<ApiType>;
/**
* Not imminent
**/
NotImminent: AugmentedError<ApiType>;
/**
* Next external proposal not simple majority
**/
@@ -712,14 +700,6 @@ declare module '@polkadot/api-base/types/errors' {
* The given account did not vote on the referendum.
**/
NotVoter: AugmentedError<ApiType>;
/**
* Invalid preimage
**/
PreimageInvalid: AugmentedError<ApiType>;
/**
* Preimage not found
**/
PreimageMissing: AugmentedError<ApiType>;
/**
* Proposal still blacklisted
**/
@@ -733,13 +713,9 @@ declare module '@polkadot/api-base/types/errors' {
**/
ReferendumInvalid: AugmentedError<ApiType>;
/**
* Too early
* Maximum number of items reached.
**/
TooEarly: AugmentedError<ApiType>;
/**
* Maximum number of proposals reached.
**/
TooManyProposals: AugmentedError<ApiType>;
TooMany: AugmentedError<ApiType>;
/**
* Value too low
**/
@@ -1329,7 +1305,7 @@ declare module '@polkadot/api-base/types/errors' {
/**
* Preimage is too large to store on-chain.
**/
TooLarge: AugmentedError<ApiType>;
TooBig: AugmentedError<ApiType>;
/**
* Generic error
**/
@@ -1604,6 +1580,10 @@ declare module '@polkadot/api-base/types/errors' {
* Failed to schedule a call
**/
FailedToSchedule: AugmentedError<ApiType>;
/**
* Attempt to use a non-named function on a named task.
**/
Named: AugmentedError<ApiType>;
/**
* Cannot find the scheduled call.
**/
@@ -2209,7 +2189,7 @@ declare module '@polkadot/api-base/types/errors' {
**/
[key: string]: AugmentedError<ApiType>;
};
voterBagsList: {
voterList: {
/**
* A error in the list interface implementation.
**/
+17 -33
View File
@@ -9,7 +9,7 @@ import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, KitchensinkRuntimeProxyType, PalletAllianceCid, PalletAllianceUnscrupulousItem, PalletConvictionVotingTally, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletStakingExposure, PalletStakingValidatorPrefs, PalletStateTrieMigrationError, PalletStateTrieMigrationMigrationCompute, SpFinalityGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo } from '@polkadot/types/lookup';
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, KitchensinkRuntimeProxyType, PalletAllianceCid, PalletAllianceUnscrupulousItem, PalletConvictionVotingTally, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletStakingExposure, PalletStakingValidatorPrefs, PalletStateTrieMigrationError, PalletStateTrieMigrationMigrationCompute, SpFinalityGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo } from '@polkadot/types/lookup';
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
@@ -417,10 +417,6 @@ declare module '@polkadot/api-base/types/events' {
* An account has delegated their vote to another account.
**/
Delegated: AugmentedEvent<ApiType, [who: AccountId32, target: AccountId32], { who: AccountId32, target: AccountId32 }>;
/**
* A proposal has been enacted.
**/
Executed: AugmentedEvent<ApiType, [refIndex: u32, result: Result<Null, SpRuntimeDispatchError>], { refIndex: u32, result: Result<Null, SpRuntimeDispatchError> }>;
/**
* An external proposal has been tabled.
**/
@@ -433,26 +429,6 @@ declare module '@polkadot/api-base/types/events' {
* A proposal has been approved by referendum.
**/
Passed: AugmentedEvent<ApiType, [refIndex: u32], { refIndex: u32 }>;
/**
* A proposal could not be executed because its preimage was invalid.
**/
PreimageInvalid: AugmentedEvent<ApiType, [proposalHash: H256, refIndex: u32], { proposalHash: H256, refIndex: u32 }>;
/**
* A proposal could not be executed because its preimage was missing.
**/
PreimageMissing: AugmentedEvent<ApiType, [proposalHash: H256, refIndex: u32], { proposalHash: H256, refIndex: u32 }>;
/**
* A proposal's preimage was noted, and the deposit taken.
**/
PreimageNoted: AugmentedEvent<ApiType, [proposalHash: H256, who: AccountId32, deposit: u128], { proposalHash: H256, who: AccountId32, deposit: u128 }>;
/**
* A registered preimage was removed and the deposit collected by the reaper.
**/
PreimageReaped: AugmentedEvent<ApiType, [proposalHash: H256, provider: AccountId32, deposit: u128, reaper: AccountId32], { proposalHash: H256, provider: AccountId32, deposit: u128, reaper: AccountId32 }>;
/**
* A proposal preimage was removed and used (the deposit was returned).
**/
PreimageUsed: AugmentedEvent<ApiType, [proposalHash: H256, provider: AccountId32, deposit: u128], { proposalHash: H256, provider: AccountId32, deposit: u128 }>;
/**
* A proposal got canceled.
**/
@@ -472,7 +448,7 @@ declare module '@polkadot/api-base/types/events' {
/**
* A public proposal has been tabled for referendum vote.
**/
Tabled: AugmentedEvent<ApiType, [proposalIndex: u32, deposit: u128, depositors: Vec<AccountId32>], { proposalIndex: u32, deposit: u128, depositors: Vec<AccountId32> }>;
Tabled: AugmentedEvent<ApiType, [proposalIndex: u32, deposit: u128], { proposalIndex: u32, deposit: u128 }>;
/**
* An account has cancelled a previous delegation operation.
**/
@@ -942,7 +918,7 @@ declare module '@polkadot/api-base/types/events' {
/**
* A referendum has moved into the deciding phase.
**/
DecisionStarted: AugmentedEvent<ApiType, [index: u32, track: u16, proposalHash: H256, tally: PalletRankedCollectiveTally], { index: u32, track: u16, proposalHash: H256, tally: PalletRankedCollectiveTally }>;
DecisionStarted: AugmentedEvent<ApiType, [index: u32, track: u16, proposal: FrameSupportPreimagesBounded, tally: PalletRankedCollectiveTally], { index: u32, track: u16, proposal: FrameSupportPreimagesBounded, tally: PalletRankedCollectiveTally }>;
/**
* A deposit has been slashaed.
**/
@@ -958,7 +934,7 @@ declare module '@polkadot/api-base/types/events' {
/**
* A referendum has being submitted.
**/
Submitted: AugmentedEvent<ApiType, [index: u32, track: u16, proposalHash: H256], { index: u32, track: u16, proposalHash: H256 }>;
Submitted: AugmentedEvent<ApiType, [index: u32, track: u16, proposal: FrameSupportPreimagesBounded], { index: u32, track: u16, proposal: FrameSupportPreimagesBounded }>;
/**
* A referendum has been timed out without being decided.
**/
@@ -1024,7 +1000,7 @@ declare module '@polkadot/api-base/types/events' {
/**
* A referendum has moved into the deciding phase.
**/
DecisionStarted: AugmentedEvent<ApiType, [index: u32, track: u16, proposalHash: H256, tally: PalletConvictionVotingTally], { index: u32, track: u16, proposalHash: H256, tally: PalletConvictionVotingTally }>;
DecisionStarted: AugmentedEvent<ApiType, [index: u32, track: u16, proposal: FrameSupportPreimagesBounded, tally: PalletConvictionVotingTally], { index: u32, track: u16, proposal: FrameSupportPreimagesBounded, tally: PalletConvictionVotingTally }>;
/**
* A deposit has been slashaed.
**/
@@ -1040,7 +1016,7 @@ declare module '@polkadot/api-base/types/events' {
/**
* A referendum has being submitted.
**/
Submitted: AugmentedEvent<ApiType, [index: u32, track: u16, proposalHash: H256], { index: u32, track: u16, proposalHash: H256 }>;
Submitted: AugmentedEvent<ApiType, [index: u32, track: u16, proposal: FrameSupportPreimagesBounded], { index: u32, track: u16, proposal: FrameSupportPreimagesBounded }>;
/**
* A referendum has been timed out without being decided.
**/
@@ -1064,7 +1040,7 @@ declare module '@polkadot/api-base/types/events' {
/**
* The call for the provided hash was not found so the task has been aborted.
**/
CallLookupFailed: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<Bytes>, error: FrameSupportScheduleLookupError], { task: ITuple<[u32, u32]>, id: Option<Bytes>, error: FrameSupportScheduleLookupError }>;
CallUnavailable: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed> }>;
/**
* Canceled some task.
**/
@@ -1072,7 +1048,15 @@ declare module '@polkadot/api-base/types/events' {
/**
* Dispatched some task.
**/
Dispatched: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<Bytes>, result: Result<Null, SpRuntimeDispatchError>], { task: ITuple<[u32, u32]>, id: Option<Bytes>, result: Result<Null, SpRuntimeDispatchError> }>;
Dispatched: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>, result: Result<Null, SpRuntimeDispatchError>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed>, result: Result<Null, SpRuntimeDispatchError> }>;
/**
* The given task was unable to be renewed since the agenda is full at that block.
**/
PeriodicFailed: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed> }>;
/**
* The given task can never be executed since it is overweight.
**/
PermanentlyOverweight: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed> }>;
/**
* Scheduled some task.
**/
@@ -1622,7 +1606,7 @@ declare module '@polkadot/api-base/types/events' {
**/
[key: string]: AugmentedEvent<ApiType>;
};
voterBagsList: {
voterList: {
/**
* Moved an account from one bag to another.
**/
+14 -25
View File
@@ -7,10 +7,10 @@ import '@polkadot/api-base/types/storage';
import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';
import type { Data } from '@polkadot/types';
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, WrapperOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceMemberRole, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageContractInfo, PalletContractsStorageDeletedContract, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletConvictionVotingVoteVoting, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata, PalletUniquesItemDetails, PalletUniquesItemMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceMemberRole, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageContractInfo, PalletContractsStorageDeletedContract, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletConvictionVotingVoteVoting, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata, PalletUniquesItemDetails, PalletUniquesItemMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
import type { Observable } from '@polkadot/types/types';
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
@@ -481,20 +481,15 @@ declare module '@polkadot/api-base/types/storage' {
* - `LastTabledWasExternal` is `false`; or
* - `PublicProps` is empty.
**/
nextExternal: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[H256, PalletDemocracyVoteThreshold]>>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Map of hashes to the proposal preimage, along with who registered it and their deposit.
* The block number is the block at which it was deposited.
**/
preimages: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<PalletDemocracyPreimageStatus>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
nextExternal: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[FrameSupportPreimagesBounded, PalletDemocracyVoteThreshold]>>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The number of (public) proposals that have been made so far.
**/
publicPropCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The public proposals. Unsorted. The second item is the proposal's hash.
* The public proposals. Unsorted. The second item is the proposal.
**/
publicProps: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, H256, AccountId32]>>>, []> & QueryableStorageEntry<ApiType, []>;
publicProps: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, FrameSupportPreimagesBounded, AccountId32]>>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The next free referendum index, aka the number of referenda started so far.
**/
@@ -505,12 +500,6 @@ declare module '@polkadot/api-base/types/storage' {
* TWOX-NOTE: SAFE as indexes are not under an attacker’s control.
**/
referendumInfoOf: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletDemocracyReferendumInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Storage version of the pallet.
*
* New networks start with last version.
**/
storageVersion: AugmentedQuery<ApiType, () => Observable<Option<PalletDemocracyReleases>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* All votes for a particular voter. We store the balance for the number of votes that we
* have recorded. The second item is the total amount of delegations, that will be added.
@@ -858,7 +847,6 @@ declare module '@polkadot/api-base/types/storage' {
[key: string]: QueryableStorageEntry<ApiType>;
};
multisig: {
calls: AugmentedQuery<ApiType, (arg: U8aFixed | string | Uint8Array) => Observable<Option<ITuple<[WrapperKeepOpaque<Call>, AccountId32, u128]>>>, [U8aFixed]> & QueryableStorageEntry<ApiType, [U8aFixed]>;
/**
* The set of open multisig operations.
**/
@@ -984,10 +972,7 @@ declare module '@polkadot/api-base/types/storage' {
[key: string]: QueryableStorageEntry<ApiType>;
};
preimage: {
/**
* The preimages stored by this pallet.
**/
preimageFor: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<Bytes>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
preimageFor: AugmentedQuery<ApiType, (arg: ITuple<[H256, u32]> | [H256 | string | Uint8Array, u32 | AnyNumber | Uint8Array]) => Observable<Option<Bytes>>, [ITuple<[H256, u32]>]> & QueryableStorageEntry<ApiType, [ITuple<[H256, u32]>]>;
/**
* The request status of a given hash.
**/
@@ -1130,11 +1115,15 @@ declare module '@polkadot/api-base/types/storage' {
/**
* Items to be executed, indexed by the block number that they should be executed on.
**/
agenda: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Option<PalletSchedulerScheduledV3>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
agenda: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Option<PalletSchedulerScheduled>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
incompleteSince: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Lookup from identity to the block number and index of the task.
* Lookup from a name to the block number and index of the task.
*
* For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4
* identities.
**/
lookup: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>;
lookup: AugmentedQuery<ApiType, (arg: U8aFixed | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [U8aFixed]> & QueryableStorageEntry<ApiType, [U8aFixed]>;
/**
* Generic query
**/
@@ -1801,7 +1790,7 @@ declare module '@polkadot/api-base/types/storage' {
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
voterBagsList: {
voterList: {
/**
* Counter for the related counted storage map
**/
+31 -149
View File
@@ -7,10 +7,10 @@ import '@polkadot/api-base/types/submittable';
import type { ApiTypes, AugmentedSubmittable, SubmittableExtrinsic, SubmittableExtrinsicFunction } from '@polkadot/api-base/types';
import type { Data } from '@polkadot/types';
import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportScheduleDispatchTime, FrameSupportScheduleMaybeHashed, KitchensinkRuntimeOriginCaller, KitchensinkRuntimeProxyType, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceDisbandWitness, PalletAllianceUnscrupulousItem, PalletAssetsDestroyWitness, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeHeader, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, KitchensinkRuntimeOriginCaller, KitchensinkRuntimeProxyType, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceDisbandWitness, PalletAllianceUnscrupulousItem, PalletAssetsDestroyWitness, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeHeader, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
@@ -1186,22 +1186,7 @@ declare module '@polkadot/api-base/types/submittable' {
**/
call: AugmentedSubmittable<(dest: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: Compact<u128> | AnyNumber | Uint8Array, gasLimit: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array, storageDepositLimit: Option<Compact<u128>> | null | Uint8Array | Compact<u128> | AnyNumber, data: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Compact<u128>, SpWeightsWeightV2Weight, Option<Compact<u128>>, Bytes]>;
/**
* Makes a call to an account, optionally transferring some balance.
*
* # Parameters
*
* * `dest`: Address of the contract to call.
* * `value`: The balance to transfer from the `origin` to `dest`.
* * `gas_limit`: The gas limit enforced when executing the constructor.
* * `storage_deposit_limit`: The maximum amount of balance that can be charged from the
* caller to pay for the storage consumed.
* * `data`: The input data to pass to the contract.
*
* * If the account is a smart-contract account, the associated code will be
* executed and any value will be transferred.
* * If the account is a regular account, any value will be transferred.
* * If no account exists and the call value is not less than `existential_deposit`,
* a regular account will be created and any value will be transferred.
* Deprecated version if [`Self::call`] for use in an in-storage `Call`.
**/
callOldWeight: AugmentedSubmittable<(dest: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: Compact<u128> | AnyNumber | Uint8Array, gasLimit: Compact<u64> | AnyNumber | Uint8Array, storageDepositLimit: Option<Compact<u128>> | null | Uint8Array | Compact<u128> | AnyNumber, data: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Compact<u128>, Compact<u64>, Option<Compact<u128>>, Bytes]>;
/**
@@ -1213,11 +1198,7 @@ declare module '@polkadot/api-base/types/submittable' {
**/
instantiate: AugmentedSubmittable<(value: Compact<u128> | AnyNumber | Uint8Array, gasLimit: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array, storageDepositLimit: Option<Compact<u128>> | null | Uint8Array | Compact<u128> | AnyNumber, codeHash: H256 | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, SpWeightsWeightV2Weight, Option<Compact<u128>>, H256, Bytes, Bytes]>;
/**
* Instantiates a contract from a previously deployed wasm binary.
*
* This function is identical to [`Self::instantiate_with_code`] but without the
* code deployment step. Instead, the `code_hash` of an on-chain deployed wasm binary
* must be supplied.
* Deprecated version if [`Self::instantiate`] for use in an in-storage `Call`.
**/
instantiateOldWeight: AugmentedSubmittable<(value: Compact<u128> | AnyNumber | Uint8Array, gasLimit: Compact<u64> | AnyNumber | Uint8Array, storageDepositLimit: Option<Compact<u128>> | null | Uint8Array | Compact<u128> | AnyNumber, codeHash: H256 | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, Compact<u64>, Option<Compact<u128>>, H256, Bytes, Bytes]>;
/**
@@ -1250,32 +1231,7 @@ declare module '@polkadot/api-base/types/submittable' {
**/
instantiateWithCode: AugmentedSubmittable<(value: Compact<u128> | AnyNumber | Uint8Array, gasLimit: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array, storageDepositLimit: Option<Compact<u128>> | null | Uint8Array | Compact<u128> | AnyNumber, code: Bytes | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, SpWeightsWeightV2Weight, Option<Compact<u128>>, Bytes, Bytes, Bytes]>;
/**
* Instantiates a new contract from the supplied `code` optionally transferring
* some balance.
*
* This dispatchable has the same effect as calling [`Self::upload_code`] +
* [`Self::instantiate`]. Bundling them together provides efficiency gains. Please
* also check the documentation of [`Self::upload_code`].
*
* # Parameters
*
* * `value`: The balance to transfer from the `origin` to the newly created contract.
* * `gas_limit`: The gas limit enforced when executing the constructor.
* * `storage_deposit_limit`: The maximum amount of balance that can be charged/reserved
* from the caller to pay for the storage consumed.
* * `code`: The contract code to deploy in raw bytes.
* * `data`: The input data to pass to the contract constructor.
* * `salt`: Used for the address derivation. See [`Pallet::contract_address`].
*
* Instantiation is executed as follows:
*
* - The supplied `code` is instrumented, deployed, and a `code_hash` is created for that
* code.
* - If the `code_hash` already exists on the chain the underlying `code` will be shared.
* - The destination address is computed based on the sender, code_hash and the salt.
* - The smart-contract account is created at the computed address.
* - The `value` is transferred to the new account.
* - The `deploy` function is executed in the context of the newly-created account.
* Deprecated version if [`Self::instantiate_with_code`] for use in an in-storage `Call`.
**/
instantiateWithCodeOldWeight: AugmentedSubmittable<(value: Compact<u128> | AnyNumber | Uint8Array, gasLimit: Compact<u64> | AnyNumber | Uint8Array, storageDepositLimit: Option<Compact<u128>> | null | Uint8Array | Compact<u128> | AnyNumber, code: Bytes | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, Compact<u64>, Option<Compact<u128>>, Bytes, Bytes, Bytes]>;
/**
@@ -1665,16 +1621,6 @@ declare module '@polkadot/api-base/types/submittable' {
* Weight: `O(p)` where `p = PublicProps::<T>::decode_len()`
**/
cancelProposal: AugmentedSubmittable<(propIndex: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* Cancel a proposal queued for enactment.
*
* The dispatch origin of this call must be _Root_.
*
* - `which`: The index of the referendum to cancel.
*
* Weight: `O(D)` where `D` is the items in the dispatch queue. Weighted as `D = 10`.
**/
cancelQueued: AugmentedSubmittable<(which: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* Remove a referendum.
*
@@ -1727,10 +1673,6 @@ declare module '@polkadot/api-base/types/submittable' {
* Weight: `O(1)`.
**/
emergencyCancel: AugmentedSubmittable<(refIndex: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* Enact a proposal from a referendum. For now we just make the weight be the maximum.
**/
enactProposal: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, u32]>;
/**
* Schedule a referendum to be tabled once it is legal to schedule an external
* referendum.
@@ -1738,11 +1680,8 @@ declare module '@polkadot/api-base/types/submittable' {
* The dispatch origin of this call must be `ExternalOrigin`.
*
* - `proposal_hash`: The preimage hash of the proposal.
*
* Weight: `O(V)` with V number of vetoers in the blacklist of proposal.
* Decoding vec of length V. Charged as maximum
**/
externalPropose: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
externalPropose: AugmentedSubmittable<(proposal: FrameSupportPreimagesBounded | { Legacy: any } | { Inline: any } | { Lookup: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [FrameSupportPreimagesBounded]>;
/**
* Schedule a negative-turnout-bias referendum to be tabled next once it is legal to
* schedule an external referendum.
@@ -1756,7 +1695,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(1)`
**/
externalProposeDefault: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
externalProposeDefault: AugmentedSubmittable<(proposal: FrameSupportPreimagesBounded | { Legacy: any } | { Inline: any } | { Lookup: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [FrameSupportPreimagesBounded]>;
/**
* Schedule a majority-carries referendum to be tabled next once it is legal to schedule
* an external referendum.
@@ -1770,7 +1709,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(1)`
**/
externalProposeMajority: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
externalProposeMajority: AugmentedSubmittable<(proposal: FrameSupportPreimagesBounded | { Legacy: any } | { Inline: any } | { Lookup: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [FrameSupportPreimagesBounded]>;
/**
* Schedule the currently externally-proposed majority-carries referendum to be tabled
* immediately. If there is no externally-proposed referendum currently, or if there is one
@@ -1779,7 +1718,7 @@ declare module '@polkadot/api-base/types/submittable' {
* The dispatch of this call must be `FastTrackOrigin`.
*
* - `proposal_hash`: The hash of the current external proposal.
* - `voting_period`: The period that is allowed for voting on this proposal.
* - `voting_period`: The period that is allowed for voting on this proposal. Increased to
* Must be always greater than zero.
* For `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`.
* - `delay`: The number of block after voting has ended in approval and this should be
@@ -1790,42 +1729,6 @@ declare module '@polkadot/api-base/types/submittable' {
* Weight: `O(1)`
**/
fastTrack: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, votingPeriod: u32 | AnyNumber | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, u32, u32]>;
/**
* Register the preimage for an upcoming proposal. This requires the proposal to be
* in the dispatch queue. No deposit is needed. When this call is successful, i.e.
* the preimage has not been uploaded before and matches some imminent proposal,
* no fee is paid.
*
* The dispatch origin of this call must be _Signed_.
*
* - `encoded_proposal`: The preimage of a proposal.
*
* Emits `PreimageNoted`.
*
* Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit).
**/
noteImminentPreimage: AugmentedSubmittable<(encodedProposal: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
/**
* Same as `note_imminent_preimage` but origin is `OperationalPreimageOrigin`.
**/
noteImminentPreimageOperational: AugmentedSubmittable<(encodedProposal: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
/**
* Register the preimage for an upcoming proposal. This doesn't require the proposal to be
* in the dispatch queue but does require a deposit, returned once enacted.
*
* The dispatch origin of this call must be _Signed_.
*
* - `encoded_proposal`: The preimage of a proposal.
*
* Emits `PreimageNoted`.
*
* Weight: `O(E)` with E size of `encoded_proposal` (protected by a required deposit).
**/
notePreimage: AugmentedSubmittable<(encodedProposal: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
/**
* Same as `note_preimage` but origin is `OperationalPreimageOrigin`.
**/
notePreimageOperational: AugmentedSubmittable<(encodedProposal: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
/**
* Propose a sensitive action to be taken.
*
@@ -1836,28 +1739,8 @@ declare module '@polkadot/api-base/types/submittable' {
* - `value`: The amount of deposit (must be at least `MinimumDeposit`).
*
* Emits `Proposed`.
*
* Weight: `O(p)`
**/
propose: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, value: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u128>]>;
/**
* Remove an expired proposal preimage and collect the deposit.
*
* The dispatch origin of this call must be _Signed_.
*
* - `proposal_hash`: The preimage hash of a proposal.
* - `proposal_length_upper_bound`: an upper bound on length of the proposal. Extrinsic is
* weighted according to this value with no refund.
*
* This will only work after `VotingPeriod` blocks from the time that the preimage was
* noted, if it's the same account doing it. If it's a different account, then it'll only
* work an additional `EnactmentPeriod` later.
*
* Emits `PreimageReaped`.
*
* Weight: `O(D)` where D is length of proposal.
**/
reapPreimage: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, proposalLenUpperBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>]>;
propose: AugmentedSubmittable<(proposal: FrameSupportPreimagesBounded | { Legacy: any } | { Inline: any } | { Lookup: any } | string | Uint8Array, value: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [FrameSupportPreimagesBounded, Compact<u128>]>;
/**
* Remove a vote for a referendum.
*
@@ -1913,12 +1796,8 @@ declare module '@polkadot/api-base/types/submittable' {
* must have funds to cover the deposit, equal to the original deposit.
*
* - `proposal`: The index of the proposal to second.
* - `seconds_upper_bound`: an upper bound on the current number of seconds on this
* proposal. Extrinsic is weighted according to this value with no refund.
*
* Weight: `O(S)` where S is the number of seconds a proposal already has.
**/
second: AugmentedSubmittable<(proposal: Compact<u32> | AnyNumber | Uint8Array, secondsUpperBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
second: AugmentedSubmittable<(proposal: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* Undelegate the voting power of the sending account.
*
@@ -1964,8 +1843,6 @@ declare module '@polkadot/api-base/types/submittable' {
*
* - `ref_index`: The index of the referendum to vote for.
* - `vote`: The vote configuration.
*
* Weight: `O(R)` where R is the number of referendums the voter has voted on.
**/
vote: AugmentedSubmittable<(refIndex: Compact<u32> | AnyNumber | Uint8Array, vote: PalletDemocracyVoteAccountVote | { Standard: any } | { Split: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, PalletDemocracyVoteAccountVote]>;
/**
@@ -2813,12 +2690,12 @@ declare module '@polkadot/api-base/types/submittable' {
* taken for its lifetime of `DepositBase + threshold * DepositFactor`.
* -------------------------------
* - DB Weight:
* - Reads: Multisig Storage, [Caller Account], Calls (if `store_call`)
* - Writes: Multisig Storage, [Caller Account], Calls (if `store_call`)
* - Reads: Multisig Storage, [Caller Account]
* - Writes: Multisig Storage, [Caller Account]
* - Plus Call Weight
* # </weight>
**/
asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option<PalletMultisigTimepoint> | null | Uint8Array | PalletMultisigTimepoint | { height?: any; index?: any } | string, call: WrapperKeepOpaque<Call> | object | string | Uint8Array, storeCall: bool | boolean | Uint8Array, maxWeight: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, WrapperKeepOpaque<Call>, bool, SpWeightsWeightV2Weight]>;
asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option<PalletMultisigTimepoint> | null | Uint8Array | PalletMultisigTimepoint | { height?: any; index?: any } | string, call: Call | IMethod | string | Uint8Array, maxWeight: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, Call, SpWeightsWeightV2Weight]>;
/**
* Immediately dispatch a multi-signature call using a single approval from the caller.
*
@@ -2862,8 +2739,8 @@ declare module '@polkadot/api-base/types/submittable' {
* - Storage: removes one item.
* ----------------------------------
* - DB Weight:
* - Read: Multisig Storage, [Caller Account], Refund Account, Calls
* - Write: Multisig Storage, [Caller Account], Refund Account, Calls
* - Read: Multisig Storage, [Caller Account], Refund Account
* - Write: Multisig Storage, [Caller Account], Refund Account
* # </weight>
**/
cancelAsMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], timepoint: PalletMultisigTimepoint | { height?: any; index?: any } | string | Uint8Array, callHash: U8aFixed | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, PalletMultisigTimepoint, U8aFixed]>;
@@ -3071,6 +2948,11 @@ declare module '@polkadot/api-base/types/submittable' {
requestPreimage: AugmentedSubmittable<(hash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
/**
* Clear an unrequested preimage from the runtime storage.
*
* If `len` is provided, then it will be a much cheaper operation.
*
* - `hash`: The hash of the preimage to be removed from the store.
* - `len`: The length of the preimage of `hash`.
**/
unnotePreimage: AugmentedSubmittable<(hash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
/**
@@ -3370,12 +3252,12 @@ declare module '@polkadot/api-base/types/submittable' {
* - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds
* available.
* - `proposal_origin`: The origin from which the proposal should be executed.
* - `proposal_hash`: The hash of the proposal preimage.
* - `proposal`: The proposal.
* - `enactment_moment`: The moment that the proposal should be enacted.
*
* Emits `Submitted`.
**/
submit: AugmentedSubmittable<(proposalOrigin: KitchensinkRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { AllianceMotion: any } | string | Uint8Array, proposalHash: H256 | string | Uint8Array, enactmentMoment: FrameSupportScheduleDispatchTime | { At: any } | { After: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [KitchensinkRuntimeOriginCaller, H256, FrameSupportScheduleDispatchTime]>;
submit: AugmentedSubmittable<(proposalOrigin: KitchensinkRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { AllianceMotion: any } | string | Uint8Array, proposal: FrameSupportPreimagesBounded | { Legacy: any } | { Inline: any } | { Lookup: any } | string | Uint8Array, enactmentMoment: FrameSupportScheduleDispatchTime | { At: any } | { After: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [KitchensinkRuntimeOriginCaller, FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime]>;
/**
* Generic tx
**/
@@ -3572,12 +3454,12 @@ declare module '@polkadot/api-base/types/submittable' {
* - `origin`: must be `SubmitOrigin` and the account must have `SubmissionDeposit` funds
* available.
* - `proposal_origin`: The origin from which the proposal should be executed.
* - `proposal_hash`: The hash of the proposal preimage.
* - `proposal`: The proposal.
* - `enactment_moment`: The moment that the proposal should be enacted.
*
* Emits `Submitted`.
**/
submit: AugmentedSubmittable<(proposalOrigin: KitchensinkRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { AllianceMotion: any } | string | Uint8Array, proposalHash: H256 | string | Uint8Array, enactmentMoment: FrameSupportScheduleDispatchTime | { At: any } | { After: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [KitchensinkRuntimeOriginCaller, H256, FrameSupportScheduleDispatchTime]>;
submit: AugmentedSubmittable<(proposalOrigin: KitchensinkRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { AllianceMotion: any } | string | Uint8Array, proposal: FrameSupportPreimagesBounded | { Legacy: any } | { Inline: any } | { Lookup: any } | string | Uint8Array, enactmentMoment: FrameSupportScheduleDispatchTime | { At: any } | { After: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [KitchensinkRuntimeOriginCaller, FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime]>;
/**
* Generic tx
**/
@@ -3601,11 +3483,11 @@ declare module '@polkadot/api-base/types/submittable' {
/**
* Cancel a named scheduled task.
**/
cancelNamed: AugmentedSubmittable<(id: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
cancelNamed: AugmentedSubmittable<(id: U8aFixed | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [U8aFixed]>;
/**
* Anonymously schedule a task.
**/
schedule: AugmentedSubmittable<(when: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | Uint8Array | ITuple<[u32, u32]> | [u32 | AnyNumber | Uint8Array, u32 | AnyNumber | Uint8Array], priority: u8 | AnyNumber | Uint8Array, call: FrameSupportScheduleMaybeHashed | { Value: any } | { Hash: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Option<ITuple<[u32, u32]>>, u8, FrameSupportScheduleMaybeHashed]>;
schedule: AugmentedSubmittable<(when: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | Uint8Array | ITuple<[u32, u32]> | [u32 | AnyNumber | Uint8Array, u32 | AnyNumber | Uint8Array], priority: u8 | AnyNumber | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Option<ITuple<[u32, u32]>>, u8, Call]>;
/**
* Anonymously schedule a task after a delay.
*
@@ -3613,11 +3495,11 @@ declare module '@polkadot/api-base/types/submittable' {
* Same as [`schedule`].
* # </weight>
**/
scheduleAfter: AugmentedSubmittable<(after: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | Uint8Array | ITuple<[u32, u32]> | [u32 | AnyNumber | Uint8Array, u32 | AnyNumber | Uint8Array], priority: u8 | AnyNumber | Uint8Array, call: FrameSupportScheduleMaybeHashed | { Value: any } | { Hash: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Option<ITuple<[u32, u32]>>, u8, FrameSupportScheduleMaybeHashed]>;
scheduleAfter: AugmentedSubmittable<(after: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | Uint8Array | ITuple<[u32, u32]> | [u32 | AnyNumber | Uint8Array, u32 | AnyNumber | Uint8Array], priority: u8 | AnyNumber | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Option<ITuple<[u32, u32]>>, u8, Call]>;
/**
* Schedule a named task.
**/
scheduleNamed: AugmentedSubmittable<(id: Bytes | string | Uint8Array, when: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | Uint8Array | ITuple<[u32, u32]> | [u32 | AnyNumber | Uint8Array, u32 | AnyNumber | Uint8Array], priority: u8 | AnyNumber | Uint8Array, call: FrameSupportScheduleMaybeHashed | { Value: any } | { Hash: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, u32, Option<ITuple<[u32, u32]>>, u8, FrameSupportScheduleMaybeHashed]>;
scheduleNamed: AugmentedSubmittable<(id: U8aFixed | string | Uint8Array, when: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | Uint8Array | ITuple<[u32, u32]> | [u32 | AnyNumber | Uint8Array, u32 | AnyNumber | Uint8Array], priority: u8 | AnyNumber | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [U8aFixed, u32, Option<ITuple<[u32, u32]>>, u8, Call]>;
/**
* Schedule a named task after a delay.
*
@@ -3625,7 +3507,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Same as [`schedule_named`](Self::schedule_named).
* # </weight>
**/
scheduleNamedAfter: AugmentedSubmittable<(id: Bytes | string | Uint8Array, after: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | Uint8Array | ITuple<[u32, u32]> | [u32 | AnyNumber | Uint8Array, u32 | AnyNumber | Uint8Array], priority: u8 | AnyNumber | Uint8Array, call: FrameSupportScheduleMaybeHashed | { Value: any } | { Hash: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, u32, Option<ITuple<[u32, u32]>>, u8, FrameSupportScheduleMaybeHashed]>;
scheduleNamedAfter: AugmentedSubmittable<(id: U8aFixed | string | Uint8Array, after: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | Uint8Array | ITuple<[u32, u32]> | [u32 | AnyNumber | Uint8Array, u32 | AnyNumber | Uint8Array], priority: u8 | AnyNumber | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [U8aFixed, u32, Option<ITuple<[u32, u32]>>, u8, Call]>;
/**
* Generic tx
**/
@@ -5708,7 +5590,7 @@ declare module '@polkadot/api-base/types/submittable' {
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
voterBagsList: {
voterList: {
/**
* Move the caller's Id directly in front of `lighter`.
*
+4 -4
View File
@@ -20,12 +20,12 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.5.2",
"version": "9.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.19.4",
"@polkadot/rpc-core": "9.5.2",
"@polkadot/types": "9.5.2",
"@babel/runtime": "^7.20.0",
"@polkadot/rpc-core": "9.6.2",
"@polkadot/types": "9.6.2",
"@polkadot/util": "^10.1.11",
"rxjs": "^7.5.7"
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '9.5.2' };
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '9.6.2' };
+7 -7
View File
@@ -20,20 +20,20 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.5.2",
"version": "9.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.19.4",
"@polkadot/api": "9.5.2",
"@polkadot/types": "9.5.2",
"@polkadot/types-codec": "9.5.2",
"@polkadot/types-create": "9.5.2",
"@babel/runtime": "^7.20.0",
"@polkadot/api": "9.6.2",
"@polkadot/types": "9.6.2",
"@polkadot/types-codec": "9.6.2",
"@polkadot/types-create": "9.6.2",
"@polkadot/util": "^10.1.11",
"@polkadot/util-crypto": "^10.1.11",
"rxjs": "^7.5.7"
},
"devDependencies": {
"@polkadot/api-augment": "9.5.2",
"@polkadot/api-augment": "9.6.2",
"@polkadot/keyring": "^10.1.11"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '9.5.2' };
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '9.6.2' };
+13 -13
View File
@@ -20,25 +20,25 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.5.2",
"version": "9.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.19.4",
"@polkadot/api": "9.5.2",
"@polkadot/api-augment": "9.5.2",
"@polkadot/api-base": "9.5.2",
"@polkadot/rpc-core": "9.5.2",
"@polkadot/types": "9.5.2",
"@polkadot/types-codec": "9.5.2",
"@babel/runtime": "^7.20.0",
"@polkadot/api": "9.6.2",
"@polkadot/api-augment": "9.6.2",
"@polkadot/api-base": "9.6.2",
"@polkadot/rpc-core": "9.6.2",
"@polkadot/types": "9.6.2",
"@polkadot/types-codec": "9.6.2",
"@polkadot/util": "^10.1.11",
"@polkadot/util-crypto": "^10.1.11",
"rxjs": "^7.5.7"
},
"devDependencies": {
"@polkadot/api": "9.5.2",
"@polkadot/api-augment": "9.5.2",
"@polkadot/rpc-augment": "9.5.2",
"@polkadot/rpc-provider": "9.5.2",
"@polkadot/types-support": "9.5.2"
"@polkadot/api": "9.6.2",
"@polkadot/api-augment": "9.6.2",
"@polkadot/rpc-augment": "9.6.2",
"@polkadot/rpc-provider": "9.6.2",
"@polkadot/types-support": "9.6.2"
}
}
@@ -4,8 +4,9 @@
import type { Observable } from 'rxjs';
import type { Option, Vec } from '@polkadot/types';
import type { BlockNumber, Call, Hash, ReferendumIndex, Scheduled } from '@polkadot/types/interfaces';
import type { FrameSupportScheduleMaybeHashed, PalletSchedulerScheduledV3 } from '@polkadot/types/lookup';
import type { FrameSupportPreimagesBounded, FrameSupportScheduleMaybeHashed, PalletSchedulerScheduled, PalletSchedulerScheduledV3 } from '@polkadot/types/lookup';
import type { ITuple } from '@polkadot/types/types';
import type { HexString } from '@polkadot/util/types';
import type { DeriveApi, DeriveDispatch, DeriveProposalImage } from '../types';
import { catchError, combineLatest, map, of, switchMap } from 'rxjs';
@@ -14,20 +15,26 @@ import { Enum } from '@polkadot/types';
import { isFunction, objectSpread, stringToHex } from '@polkadot/util';
import { memo } from '../util';
import { getImageHashBounded } from './util';
const DEMOCRACY_ID = stringToHex('democrac');
interface SchedulerInfo {
at: BlockNumber;
imageHash: Hash;
imageHash: HexString;
index: ReferendumIndex;
}
function isMaybeHashed (call: FrameSupportScheduleMaybeHashed | Call): call is FrameSupportScheduleMaybeHashed {
function isMaybeHashedOrBounded (call: FrameSupportPreimagesBounded | FrameSupportScheduleMaybeHashed | Call): call is FrameSupportScheduleMaybeHashed | FrameSupportPreimagesBounded {
// check for enum
return call instanceof Enum;
}
function isBounded (call: FrameSupportPreimagesBounded | FrameSupportScheduleMaybeHashed): call is FrameSupportPreimagesBounded {
// check for type
return (call as FrameSupportPreimagesBounded).isInline || (call as FrameSupportPreimagesBounded).isLegacy || (call as FrameSupportPreimagesBounded).isLookup;
}
function queryQueue (api: DeriveApi): Observable<DeriveDispatch[]> {
return api.query.democracy.dispatchQueue<Vec<ITuple<[BlockNumber, Hash, ReferendumIndex]>>>().pipe(
switchMap((dispatches) =>
@@ -41,14 +48,14 @@ function queryQueue (api: DeriveApi): Observable<DeriveDispatch[]> {
dispatches.map(([at, imageHash, index], dispatchIndex): DeriveDispatch => ({
at,
image: images[dispatchIndex],
imageHash,
imageHash: getImageHashBounded(imageHash),
index
}))
)
);
}
function schedulerEntries (api: DeriveApi): Observable<[BlockNumber[], Option<PalletSchedulerScheduledV3 | Scheduled>[][]]> {
function schedulerEntries (api: DeriveApi): Observable<[BlockNumber[], Option<PalletSchedulerScheduled | PalletSchedulerScheduledV3 | Scheduled>[][]]> {
// We don't get entries, but rather we get the keys (triggered via finished referendums) and
// the subscribe to those keys - this means we pickup when the schedulers actually executes
// at a block, the entry for that block will become empty
@@ -87,11 +94,13 @@ function queryScheduler (api: DeriveApi): Observable<DeriveDispatch[]> {
const id = scheduled.maybeId.unwrap().toHex();
if (id.startsWith(DEMOCRACY_ID)) {
const imageHash = isMaybeHashed(scheduled.call)
? scheduled.call.isHash
? scheduled.call.asHash
: scheduled.call.asValue.args[0] as Hash
: scheduled.call.args[0] as Hash;
const imageHash = isMaybeHashedOrBounded(scheduled.call)
? isBounded(scheduled.call)
? getImageHashBounded(scheduled.call)
: scheduled.call.isHash
? scheduled.call.asHash.toHex()
: scheduled.call.asValue.args[0].toHex()
: scheduled.call.args[0].toHex();
result.push({ at, imageHash, index: api.registry.createType('(u64, ReferendumIndex)', id)[1] });
}
@@ -4,25 +4,26 @@
import type { Observable } from 'rxjs';
import type { Option } from '@polkadot/types';
import type { H256 } from '@polkadot/types/interfaces';
import type { PalletDemocracyVoteThreshold } from '@polkadot/types/lookup';
import type { FrameSupportPreimagesBounded, PalletDemocracyVoteThreshold } from '@polkadot/types/lookup';
import type { ITuple } from '@polkadot/types/types';
import type { DeriveApi, DeriveProposalExternal } from '../types';
import { map, of, switchMap } from 'rxjs';
import { memo } from '../util';
import { getImageHashBounded } from './util';
function withImage (api: DeriveApi, nextOpt: Option<ITuple<[H256, PalletDemocracyVoteThreshold]>>): Observable<DeriveProposalExternal | null> {
function withImage (api: DeriveApi, nextOpt: Option<ITuple<[H256 | FrameSupportPreimagesBounded, PalletDemocracyVoteThreshold]>>): Observable<DeriveProposalExternal | null> {
if (nextOpt.isNone) {
return of(null);
}
const [imageHash, threshold] = nextOpt.unwrap();
const [hash, threshold] = nextOpt.unwrap();
return api.derive.democracy.preimage(imageHash).pipe(
return api.derive.democracy.preimage(hash).pipe(
map((image): DeriveProposalExternal => ({
image,
imageHash,
imageHash: getImageHashBounded(hash),
threshold
}))
);
+70 -11
View File
@@ -2,16 +2,19 @@
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { AccountId, Balance, BlockNumber, Hash, PreimageStatus, Proposal } from '@polkadot/types/interfaces';
import type { AccountId, Balance, BlockNumber, Call, Hash, PreimageStatus } from '@polkadot/types/interfaces';
import type { FrameSupportPreimagesBounded, PalletPreimageRequestStatus } from '@polkadot/types/lookup';
import type { Bytes, Option } from '@polkadot/types-codec';
import type { ITuple } from '@polkadot/types-codec/types';
import type { HexString } from '@polkadot/util/types';
import type { DeriveApi, DeriveProposalImage } from '../types';
import { map, of } from 'rxjs';
import { map, of, switchMap } from 'rxjs';
import { isFunction } from '@polkadot/util';
import { BN_ZERO, isFunction } from '@polkadot/util';
import { firstMemo, memo } from '../util';
import { getImageHashBounded } from './util';
type PreimageInfo = [Bytes, AccountId, Balance, BlockNumber];
type OldPreimage = ITuple<PreimageInfo>;
@@ -21,10 +24,10 @@ function isDemocracyPreimage (api: DeriveApi, imageOpt: Option<OldPreimage> | Op
}
function constructProposal (api: DeriveApi, [bytes, proposer, balance, at]: PreimageInfo): DeriveProposalImage {
let proposal: Proposal | undefined;
let proposal: Call | undefined;
try {
proposal = api.registry.createType('Proposal', bytes.toU8a(true));
proposal = api.registry.createType('Call', bytes.toU8a(true));
} catch (error) {
console.error(error);
}
@@ -52,25 +55,81 @@ function parseDemocracy (api: DeriveApi, imageOpt: Option<OldPreimage> | Option<
return constructProposal(api, imageOpt.unwrap());
}
function parseImage (api: DeriveApi, [proposalHash, status, bytes]: [HexString, PalletPreimageRequestStatus | null, Bytes | null]): DeriveProposalImage | undefined {
if (!status) {
return undefined;
}
const [proposer, balance] = status.isUnrequested
? status.asUnrequested.deposit
: status.asRequested.deposit.unwrapOrDefault();
let proposal: Call | undefined;
if (bytes) {
try {
proposal = api.registry.createType('Call', bytes.toU8a(true));
} catch (error) {
console.error(error);
}
}
return { at: BN_ZERO, balance, proposal, proposalHash, proposer };
}
function getDemocracyImages (api: DeriveApi, hashes: (Hash | Uint8Array | string)[]): Observable<(DeriveProposalImage | undefined)[]> {
return api.query.democracy.preimages.multi(hashes).pipe(
return api.query.democracy.preimages.multi<Option<PreimageStatus>>(hashes).pipe(
map((images): (DeriveProposalImage | undefined)[] =>
images.map((imageOpt) => parseDemocracy(api, imageOpt))
)
);
}
export function preimages (instanceId: string, api: DeriveApi): (hashes: (Hash | Uint8Array | string)[]) => Observable<(DeriveProposalImage | undefined)[]> {
return memo(instanceId, (hashes: (Hash | Uint8Array | string)[]): Observable<(DeriveProposalImage | undefined)[]> =>
function getImages (api: DeriveApi, bounded: FrameSupportPreimagesBounded[]): Observable<(DeriveProposalImage | undefined)[]> {
const hashes = bounded.map((b) => getImageHashBounded(b));
return api.query.preimage.statusFor.multi(hashes).pipe(
switchMap((optStatus) => {
const statuses = optStatus.map((o) => o.unwrapOr(null));
const keys = statuses
.map((s, i) =>
s
? s.isRequested
? [hashes[i], s.asRequested.len.unwrapOr(0)]
: [hashes[i], s.asUnrequested.len]
: null
)
.filter((p) => !!p);
return api.query.preimage.preimageFor.multi(keys).pipe(
map((optBytes) => {
let ptr = -1;
return statuses
.map((s, i): [HexString, PalletPreimageRequestStatus | null, Bytes | null] =>
s
? [hashes[i], s, optBytes[++ptr].unwrapOr(null)]
: [hashes[i], null, null]
)
.map((v) => parseImage(api, v));
})
);
})
);
}
export function preimages (instanceId: string, api: DeriveApi): (hashes: (Hash | Uint8Array | string | FrameSupportPreimagesBounded)[]) => Observable<(DeriveProposalImage | undefined)[]> {
return memo(instanceId, (hashes: (Hash | Uint8Array | string | FrameSupportPreimagesBounded)[]): Observable<(DeriveProposalImage | undefined)[]> =>
hashes.length
? isFunction(api.query.democracy.preimages)
? getDemocracyImages(api, hashes)
: of([])
? getDemocracyImages(api, hashes as string[])
: isFunction(api.query.preimage.preimageFor)
? getImages(api, hashes as FrameSupportPreimagesBounded[])
: of([])
: of([])
);
}
export const preimage = firstMemo(
(api: DeriveApi, hash: Hash | Uint8Array | string) =>
(api: DeriveApi, hash: Hash | Uint8Array | string | FrameSupportPreimagesBounded) =>
api.derive.democracy.preimages([hash])
);
@@ -4,6 +4,7 @@
import type { Observable } from 'rxjs';
import type { Option, Vec } from '@polkadot/types';
import type { AccountId, Balance, Hash, PropIndex } from '@polkadot/types/interfaces';
import type { FrameSupportPreimagesBounded } from '@polkadot/types/lookup';
import type { ITuple } from '@polkadot/types/types';
import type { DeriveApi, DeriveProposal, DeriveProposalImage } from '../types';
@@ -12,11 +13,12 @@ import { combineLatest, map, of, switchMap } from 'rxjs';
import { isFunction, objectSpread } from '@polkadot/util';
import { memo } from '../util';
import { getImageHashBounded } from './util';
type DepositorsNew = Option<ITuple<[Vec<AccountId>, Balance]>>;
type DepositorsOld = Option<ITuple<[Balance, Vec<AccountId>]>>;
type Depositors = DepositorsNew | DepositorsOld;
type Proposals = ITuple<[PropIndex, Hash, AccountId]>[];
type Proposals = ITuple<[PropIndex, Hash | FrameSupportPreimagesBounded, AccountId]>[];
type Result = [Proposals, (DeriveProposalImage | undefined)[], Depositors[]];
function isNewDepositors (depositors: ITuple<[Vec<AccountId>, Balance]> | ITuple<[Balance, Vec<AccountId>]>): depositors is ITuple<[Vec<AccountId>, Balance]> {
@@ -30,13 +32,13 @@ function parse ([proposals, images, optDepositors]: Result): DeriveProposal[] {
.filter(([, , proposer], index): boolean =>
!!(optDepositors[index]?.isSome) && !proposer.isEmpty
)
.map(([index, imageHash, proposer], proposalIndex): DeriveProposal => {
.map(([index, hash, proposer], proposalIndex): DeriveProposal => {
const depositors = optDepositors[proposalIndex].unwrap();
return objectSpread(
{
image: images[proposalIndex],
imageHash,
imageHash: getImageHashBounded(hash),
index,
proposer
},
@@ -56,7 +58,7 @@ export function proposals (instanceId: string, api: DeriveApi): () => Observable
? combineLatest([
of(proposals),
api.derive.democracy.preimages(
proposals.map(([, hash]) => hash)
proposals.map(([, hash]) => hash as unknown as Uint8Array)
),
api.query.democracy.depositOf.multi(
proposals.map(([index]) => index)
@@ -3,8 +3,8 @@
import type { Observable } from 'rxjs';
import type { Option, Vec } from '@polkadot/types';
import type { AccountId, ReferendumInfoTo239, Vote } from '@polkadot/types/interfaces';
import type { PalletDemocracyReferendumInfo, PalletDemocracyVoteVoting } from '@polkadot/types/lookup';
import type { AccountId, Hash, ReferendumInfoTo239, Vote } from '@polkadot/types/interfaces';
import type { PalletDemocracyReferendumInfo, PalletDemocracyReferendumStatus, PalletDemocracyVoteVoting } from '@polkadot/types/lookup';
import type { BN } from '@polkadot/util';
import type { DeriveApi, DeriveBalancesAccount, DeriveReferendum, DeriveReferendumVote, DeriveReferendumVotes } from '../types';
@@ -13,7 +13,7 @@ import { combineLatest, map, of, switchMap } from 'rxjs';
import { isFunction, objectSpread } from '@polkadot/util';
import { memo } from '../util';
import { calcVotes, getStatus } from './util';
import { calcVotes, getImageHash, getStatus } from './util';
type VotingDelegating = PalletDemocracyVoteVoting['asDelegating'];
type VotingDirect = PalletDemocracyVoteVoting['asDirect'];
@@ -133,10 +133,13 @@ export function _referendumInfo (instanceId: string, api: DeriveApi): (index: BN
const status = getStatus(info);
return status
? api.derive.democracy.preimage(status.proposalHash).pipe(
? api.derive.democracy.preimage(
(status as PalletDemocracyReferendumStatus).proposal ||
(status as unknown as { proposalHash: Hash }).proposalHash
).pipe(
map((image): DeriveReferendum => ({
image,
imageHash: status.proposalHash,
imageHash: getImageHash(status),
index: api.registry.createType('ReferendumIndex', index),
status
}))
@@ -157,7 +160,7 @@ export function referendumsInfo (instanceId: string, api: DeriveApi): (ids: BN[]
)
),
map((infos) =>
infos.filter((referendum): referendum is DeriveReferendum => !!referendum)
infos.filter((r): r is DeriveReferendum => !!r)
)
)
: of([])
+9 -6
View File
@@ -2,12 +2,13 @@
// SPDX-License-Identifier: Apache-2.0
import type { Vec } from '@polkadot/types';
import type { AccountId, Balance, BlockNumber, Hash, PropIndex, Proposal, ReferendumIndex, ReferendumInfoTo239, Vote } from '@polkadot/types/interfaces';
import type { AccountId, Balance, Call, Hash, PropIndex, ReferendumIndex, ReferendumInfoTo239, Vote } from '@polkadot/types/interfaces';
import type { PalletDemocracyReferendumStatus, PalletDemocracyVoteThreshold } from '@polkadot/types/lookup';
import type { BN } from '@polkadot/util';
import type { HexString } from '@polkadot/util/types';
export interface AtBlock {
at: BlockNumber;
at: BN;
}
export interface DeriveDemocracyLock {
@@ -22,13 +23,15 @@ export interface DeriveDemocracyLock {
export interface DeriveProposalImage extends AtBlock {
balance: Balance;
proposal?: Proposal;
proposal?: Call;
proposalHash?: HexString;
proposalLen?: number;
proposer: AccountId;
}
export interface DeriveDispatch extends AtBlock {
index: ReferendumIndex;
imageHash: Hash;
imageHash: HexString;
image?: DeriveProposalImage;
}
@@ -43,14 +46,14 @@ export interface DeriveProposal {
export interface DeriveProposalExternal {
image?: DeriveProposalImage;
imageHash: Hash;
imageHash: HexString;
threshold: PalletDemocracyVoteThreshold;
}
export interface DeriveReferendum {
index: ReferendumIndex;
image?: DeriveProposalImage;
imageHash: Hash;
imageHash: HexString;
status: PalletDemocracyReferendumStatus | ReferendumInfoTo239;
}
+21 -2
View File
@@ -1,9 +1,10 @@
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ReferendumInfoTo239, Tally } from '@polkadot/types/interfaces';
import type { PalletDemocracyReferendumInfo, PalletDemocracyReferendumStatus, PalletDemocracyVoteThreshold } from '@polkadot/types/lookup';
import type { Hash, ReferendumInfoTo239, Tally } from '@polkadot/types/interfaces';
import type { FrameSupportPreimagesBounded, PalletDemocracyReferendumInfo, PalletDemocracyReferendumStatus, PalletDemocracyVoteThreshold } from '@polkadot/types/lookup';
import type { Option } from '@polkadot/types-codec';
import type { HexString } from '@polkadot/util/types';
import type { DeriveReferendum, DeriveReferendumVote, DeriveReferendumVotes, DeriveReferendumVoteState } from '../types';
import { BN, bnSqrt, objectSpread } from '@polkadot/util';
@@ -139,3 +140,21 @@ export function getStatus (info: Option<PalletDemocracyReferendumInfo | Referend
// done, we don't include it here... only currently active
: null;
}
export function getImageHashBounded (hash: Hash | FrameSupportPreimagesBounded): HexString {
return (hash as FrameSupportPreimagesBounded).isLegacy
? (hash as FrameSupportPreimagesBounded).asLegacy.hash_.toHex()
: (hash as FrameSupportPreimagesBounded).isLookup
? (hash as FrameSupportPreimagesBounded).asLookup.hash_.toHex()
// for inline, use the actual Bytes hash
: (hash as FrameSupportPreimagesBounded).isInline
? (hash as FrameSupportPreimagesBounded).asInline.hash.toHex()
: hash.toHex();
}
export function getImageHash (status: PalletDemocracyReferendumStatus | ReferendumInfoTo239): HexString {
return getImageHashBounded(
(status as PalletDemocracyReferendumStatus).proposal ||
(status as ReferendumInfoTo239).proposalHash
);
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '9.5.2' };
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '9.6.2' };
+15 -15
View File
@@ -20,29 +20,29 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.5.2",
"version": "9.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.19.4",
"@polkadot/api-augment": "9.5.2",
"@polkadot/api-base": "9.5.2",
"@polkadot/api-derive": "9.5.2",
"@babel/runtime": "^7.20.0",
"@polkadot/api-augment": "9.6.2",
"@polkadot/api-base": "9.6.2",
"@polkadot/api-derive": "9.6.2",
"@polkadot/keyring": "^10.1.11",
"@polkadot/rpc-augment": "9.5.2",
"@polkadot/rpc-core": "9.5.2",
"@polkadot/rpc-provider": "9.5.2",
"@polkadot/types": "9.5.2",
"@polkadot/types-augment": "9.5.2",
"@polkadot/types-codec": "9.5.2",
"@polkadot/types-create": "9.5.2",
"@polkadot/types-known": "9.5.2",
"@polkadot/rpc-augment": "9.6.2",
"@polkadot/rpc-core": "9.6.2",
"@polkadot/rpc-provider": "9.6.2",
"@polkadot/types": "9.6.2",
"@polkadot/types-augment": "9.6.2",
"@polkadot/types-codec": "9.6.2",
"@polkadot/types-create": "9.6.2",
"@polkadot/types-known": "9.6.2",
"@polkadot/util": "^10.1.11",
"@polkadot/util-crypto": "^10.1.11",
"eventemitter3": "^4.0.7",
"rxjs": "^7.5.7"
},
"devDependencies": {
"@polkadot/api-augment": "9.5.2",
"@polkadot/types-support": "9.5.2"
"@polkadot/api-augment": "9.6.2",
"@polkadot/types-support": "9.6.2"
}
}
+1 -5
View File
@@ -791,11 +791,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
key.method === creator.method;
decorated.key = (...args: unknown[]): string =>
u8aToHex(compactStripLength(creator(
creator.meta.type.isPlain
? undefined
: args
))[1]);
u8aToHex(compactStripLength(creator(...args))[1]);
decorated.keyPrefix = (...keys: unknown[]): string =>
u8aToHex(creator.keyPrefix(...keys));
+1 -1
View File
@@ -269,7 +269,7 @@ async function tx (api: ApiPromise, pairs: TestKeyringMap): Promise<void> {
});
// it allows for query & then using the submittable
const second = api.tx.democracy.second(123, 5);
const second = api.tx.democracy.second(123);
// eslint-disable-next-line @typescript-eslint/no-floating-promises
await second.signAndSend('123', (result) => console.log(result));
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '9.5.2' };
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '9.6.2' };
+2 -2
View File
@@ -102,7 +102,7 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, blockHas
// dry run an extrinsic
public dryRun (account: AddressOrPair, optionsOrHash?: Partial<SignerOptions> | Uint8Array | string): SubmittableDryRunResult<ApiType> {
if (!api.rpc.system || !api.rpc.system.dryRun) {
if (!api.rpc.system?.dryRun) {
throw new Error('The system.dryRun RPC call is not available in your environment');
}
@@ -124,7 +124,7 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, blockHas
// calculate the payment info for this transaction (if signed and submitted)
public paymentInfo (account: AddressOrPair, optionsOrHash?: Partial<SignerOptions> | Uint8Array | string): SubmittablePaymentResult<ApiType> {
if (!api.call.transactionPaymentApi || !api.call.transactionPaymentApi.queryInfo) {
if (!api.call.transactionPaymentApi?.queryInfo) {
throw new Error('The transactionPaymentApi.queryInfo runtime call is not available in your environment');
}
+5 -5
View File
@@ -20,13 +20,13 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.5.2",
"version": "9.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.19.4",
"@polkadot/rpc-core": "9.5.2",
"@polkadot/types": "9.5.2",
"@polkadot/types-codec": "9.5.2",
"@babel/runtime": "^7.20.0",
"@polkadot/rpc-core": "9.6.2",
"@polkadot/types": "9.6.2",
"@polkadot/types-codec": "9.6.2",
"@polkadot/util": "^10.1.11"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '9.5.2' };
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '9.6.2' };
+6 -6
View File
@@ -20,18 +20,18 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.5.2",
"version": "9.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.19.4",
"@polkadot/rpc-augment": "9.5.2",
"@polkadot/rpc-provider": "9.5.2",
"@polkadot/types": "9.5.2",
"@babel/runtime": "^7.20.0",
"@polkadot/rpc-augment": "9.6.2",
"@polkadot/rpc-provider": "9.6.2",
"@polkadot/types": "9.6.2",
"@polkadot/util": "^10.1.11",
"rxjs": "^7.5.7"
},
"devDependencies": {
"@polkadot/keyring": "^10.1.11",
"@polkadot/rpc-augment": "9.5.2"
"@polkadot/rpc-augment": "9.6.2"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '9.5.2' };
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '9.6.2' };
+5 -5
View File
@@ -20,19 +20,19 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.5.2",
"version": "9.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.19.4",
"@babel/runtime": "^7.20.0",
"@polkadot/keyring": "^10.1.11",
"@polkadot/types": "9.5.2",
"@polkadot/types-support": "9.5.2",
"@polkadot/types": "9.6.2",
"@polkadot/types-support": "9.6.2",
"@polkadot/util": "^10.1.11",
"@polkadot/util-crypto": "^10.1.11",
"@polkadot/x-fetch": "^10.1.11",
"@polkadot/x-global": "^10.1.11",
"@polkadot/x-ws": "^10.1.11",
"@substrate/connect": "0.7.14",
"@substrate/connect": "0.7.15",
"eventemitter3": "^4.0.7",
"mock-socket": "^9.1.5",
"nock": "^13.2.9"
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '9.5.2' };
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '9.6.2' };
+12 -12
View File
@@ -20,7 +20,7 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.5.2",
"version": "9.6.2",
"main": "index.js",
"bin": {
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.cjs",
@@ -30,18 +30,18 @@
"polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.cjs"
},
"dependencies": {
"@babel/core": "^7.19.3",
"@babel/core": "^7.19.6",
"@babel/register": "^7.18.9",
"@babel/runtime": "^7.19.4",
"@polkadot/api": "9.5.2",
"@polkadot/api-augment": "9.5.2",
"@polkadot/rpc-augment": "9.5.2",
"@polkadot/rpc-provider": "9.5.2",
"@polkadot/types": "9.5.2",
"@polkadot/types-augment": "9.5.2",
"@polkadot/types-codec": "9.5.2",
"@polkadot/types-create": "9.5.2",
"@polkadot/types-support": "9.5.2",
"@babel/runtime": "^7.20.0",
"@polkadot/api": "9.6.2",
"@polkadot/api-augment": "9.6.2",
"@polkadot/rpc-augment": "9.6.2",
"@polkadot/rpc-provider": "9.6.2",
"@polkadot/types": "9.6.2",
"@polkadot/types-augment": "9.6.2",
"@polkadot/types-codec": "9.6.2",
"@polkadot/types-create": "9.6.2",
"@polkadot/types-support": "9.6.2",
"@polkadot/util": "^10.1.11",
"@polkadot/util-crypto": "^10.1.11",
"@polkadot/x-ws": "^10.1.11",
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '9.5.2' };
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '9.6.2' };
+4 -4
View File
@@ -20,12 +20,12 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.5.2",
"version": "9.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.19.4",
"@polkadot/types": "9.5.2",
"@polkadot/types-codec": "9.5.2",
"@babel/runtime": "^7.20.0",
"@polkadot/types": "9.6.2",
"@polkadot/types-codec": "9.6.2",
"@polkadot/util": "^10.1.11"
}
}
@@ -4,6 +4,12 @@
/* eslint-disable sort-keys */
export default {
/**
* Lookup33: frame_support::traits::schedule::LookupError
**/
FrameSupportScheduleLookupError: {
_enum: ['Unknown', 'BadFormat']
},
/**
* Lookup73: polkadot_runtime_common::claims::pallet::Event<T>
**/
@@ -722,6 +728,25 @@ export default {
V1: 'XcmV1MultiLocation'
}
},
/**
* Lookup181: pallet_scheduler::ScheduledV3<frame_support::traits::schedule::MaybeHashed<polkadot_runtime::RuntimeCall, primitive_types::H256>, BlockNumber, polkadot_runtime::OriginCaller, sp_core::crypto::AccountId32>
**/
PalletSchedulerScheduledV3: {
maybeId: 'Option<Bytes>',
priority: 'u8',
call: 'FrameSupportScheduleMaybeHashed',
maybePeriodic: 'Option<(u32,u32)>',
origin: 'PolkadotRuntimeOriginCaller'
},
/**
* Lookup182: frame_support::traits::schedule::MaybeHashed<polkadot_runtime::RuntimeCall, primitive_types::H256>
**/
FrameSupportScheduleMaybeHashed: {
_enum: {
Value: 'Call',
Hash: 'H256'
}
},
/**
* Lookup213: polkadot_runtime::SessionKeys
**/
@@ -1850,6 +1875,27 @@ export default {
Version: 'u32'
}
},
/**
* Lookup530: pallet_democracy::PreimageStatus<sp_core::crypto::AccountId32, Balance, BlockNumber>
**/
PalletDemocracyPreimageStatus: {
_enum: {
Missing: 'u32',
Available: {
data: 'Bytes',
provider: 'AccountId32',
deposit: 'u128',
since: 'u32',
expiry: 'Option<u32>'
}
}
},
/**
* Lookup541: pallet_democracy::Releases
**/
PalletDemocracyReleases: {
_enum: ['V1']
},
/**
* Lookup560: polkadot_runtime_common::claims::pallet::Error<T>
**/
File diff suppressed because it is too large Load Diff
@@ -8,9 +8,16 @@ import '@polkadot/types/lookup';
import type { BitVec, Bytes, Compact, Enum, Null, Option, Result, Struct, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { ITuple } from '@polkadot/types-codec/types';
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, H256, PerU16, Weight } from '@polkadot/types/interfaces/runtime';
import type { AccountId32, Call, H256, PerU16, Weight } from '@polkadot/types/interfaces/runtime';
declare module '@polkadot/types/lookup' {
/** @name FrameSupportScheduleLookupError (33) */
interface FrameSupportScheduleLookupError extends Enum {
readonly isUnknown: boolean;
readonly isBadFormat: boolean;
readonly type: 'Unknown' | 'BadFormat';
}
/** @name PolkadotRuntimeCommonClaimsPalletEvent (73) */
interface PolkadotRuntimeCommonClaimsPalletEvent extends Enum {
readonly isClaimed: boolean;
@@ -831,6 +838,24 @@ declare module '@polkadot/types/lookup' {
readonly type: 'V0' | 'V1';
}
/** @name PalletSchedulerScheduledV3 (181) */
interface PalletSchedulerScheduledV3 extends Struct {
readonly maybeId: Option<Bytes>;
readonly priority: u8;
readonly call: FrameSupportScheduleMaybeHashed;
readonly maybePeriodic: Option<ITuple<[u32, u32]>>;
readonly origin: PolkadotRuntimeOriginCaller;
}
/** @name FrameSupportScheduleMaybeHashed (182) */
interface FrameSupportScheduleMaybeHashed extends Enum {
readonly isValue: boolean;
readonly asValue: Call;
readonly isHash: boolean;
readonly asHash: H256;
readonly type: 'Value' | 'Hash';
}
/** @name PolkadotRuntimeSessionKeys (213) */
interface PolkadotRuntimeSessionKeys extends Struct {
readonly grandpa: SpFinalityGrandpaAppPublic;
@@ -1813,6 +1838,27 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Assets' | 'Version';
}
/** @name PalletDemocracyPreimageStatus (530) */
interface PalletDemocracyPreimageStatus extends Enum {
readonly isMissing: boolean;
readonly asMissing: u32;
readonly isAvailable: boolean;
readonly asAvailable: {
readonly data: Bytes;
readonly provider: AccountId32;
readonly deposit: u128;
readonly since: u32;
readonly expiry: Option<u32>;
} & Struct;
readonly type: 'Missing' | 'Available';
}
/** @name PalletDemocracyReleases (541) */
interface PalletDemocracyReleases extends Enum {
readonly isV1: boolean;
readonly type: 'V1';
}
/** @name PolkadotRuntimeCommonClaimsPalletError (560) */
interface PolkadotRuntimeCommonClaimsPalletError extends Enum {
readonly isInvalidEthereumSignature: boolean;
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '9.5.2' };
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '9.6.2' };
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+5 -5
View File
@@ -20,17 +20,17 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.5.2",
"version": "9.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.19.4",
"@babel/runtime": "^7.20.0",
"@polkadot/util": "^10.1.11",
"@polkadot/x-bigint": "^10.1.11"
},
"devDependencies": {
"@polkadot/types": "9.5.2",
"@polkadot/types-augment": "9.5.2",
"@polkadot/types-support": "9.5.2",
"@polkadot/types": "9.6.2",
"@polkadot/types-augment": "9.6.2",
"@polkadot/types-support": "9.6.2",
"@polkadot/util-crypto": "^10.1.11"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-codec', path: 'auto', type: 'auto', version: '9.5.2' };
export const packageInfo = { name: '@polkadot/types-codec', path: 'auto', type: 'auto', version: '9.6.2' };
+3 -1
View File
@@ -15,9 +15,11 @@ function formatFailure (registry: Registry, result: unknown[], { message }: Erro
// ignore
}
// This is extra debugging info (we most-probably want this in in some way, shape or form,
// but at this point not quite sure how to include and format it (it can be quite massive)
// console.error(JSON.stringify(result, null, 2));
return `decodeU8a: failed at ${u8aToHex(u8a.subarray(0, 16))}…${key ? ` on ${key}` : ''} (index ${i}/${count})${type}:: ${message}`;
return `decodeU8a: failed at ${u8aToHex(u8a.subarray(0, 16))}…${key ? ` on ${key}` : ''} (index ${i + 1}/${count})${type}:: ${message}`;
}
/**
+4 -4
View File
@@ -20,14 +20,14 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.5.2",
"version": "9.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.19.4",
"@polkadot/types-codec": "9.5.2",
"@babel/runtime": "^7.20.0",
"@polkadot/types-codec": "9.6.2",
"@polkadot/util": "^10.1.11"
},
"devDependencies": {
"@polkadot/types": "9.5.2"
"@polkadot/types": "9.6.2"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-create', path: 'auto', type: 'auto', version: '9.5.2' };
export const packageInfo = { name: '@polkadot/types-create', path: 'auto', type: 'auto', version: '9.6.2' };
+6 -6
View File
@@ -20,17 +20,17 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.5.2",
"version": "9.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.19.4",
"@babel/runtime": "^7.20.0",
"@polkadot/networks": "^10.1.11",
"@polkadot/types": "9.5.2",
"@polkadot/types-codec": "9.5.2",
"@polkadot/types-create": "9.5.2",
"@polkadot/types": "9.6.2",
"@polkadot/types-codec": "9.6.2",
"@polkadot/types-create": "9.6.2",
"@polkadot/util": "^10.1.11"
},
"devDependencies": {
"@polkadot/api": "9.5.2"
"@polkadot/api": "9.6.2"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-known', path: 'auto', type: 'auto', version: '9.5.2' };
export const packageInfo = { name: '@polkadot/types-known', path: 'auto', type: 'auto', version: '9.6.2' };
+4 -1
View File
@@ -37,7 +37,10 @@ const versioned: OverrideVersionedType[] = [
},
{
minmax: [4, 5],
types: objectSpread({}, sharedTypes, mapXcmTypes('V1'))
types: objectSpread({
// As above, see https://github.com/polkadot-js/api/issues/5301
DispatchError: 'DispatchErrorPre6First'
}, sharedTypes, mapXcmTypes('V1'))
},
{
// metadata V14
@@ -2488,6 +2488,76 @@ const upgrades: ChainUpgradesGenerated = [
1
]
]
],
[
12532644,
9291,
[
[
"0xdf6acb689907609b",
4
],
[
"0x37e397fc7c91f5e4",
1
],
[
"0x40fe3ad401f8959a",
6
],
[
"0x17a6bc0d0062aeb3",
1
],
[
"0xd2bc9897eed08f15",
3
],
[
"0xf78b278be53f454c",
2
],
[
"0xaf2c0297a23e6d3d",
2
],
[
"0x49eaaf1b548a0cb0",
1
],
[
"0x91d5df18b0d2cf58",
1
],
[
"0xed99c5acb25eedf5",
3
],
[
"0xcbca25e39f142387",
2
],
[
"0x687ad44ad37f03c2",
1
],
[
"0xab3c0572291feb8b",
1
],
[
"0xbc9d89904f5b923f",
1
],
[
"0x37c8bb1350a9a2a8",
1
],
[
"0xf3ff14d5ab527059",
1
]
]
]
];
@@ -3596,6 +3596,76 @@ const upgrades: ChainUpgradesGenerated = [
1
]
]
],
[
12841034,
9300,
[
[
"0xdf6acb689907609b",
4
],
[
"0x37e397fc7c91f5e4",
1
],
[
"0x40fe3ad401f8959a",
6
],
[
"0xd2bc9897eed08f15",
3
],
[
"0xf78b278be53f454c",
2
],
[
"0xaf2c0297a23e6d3d",
3
],
[
"0x49eaaf1b548a0cb0",
1
],
[
"0x91d5df18b0d2cf58",
1
],
[
"0xed99c5acb25eedf5",
3
],
[
"0xcbca25e39f142387",
2
],
[
"0x687ad44ad37f03c2",
1
],
[
"0xab3c0572291feb8b",
1
],
[
"0xbc9d89904f5b923f",
1
],
[
"0x37c8bb1350a9a2a8",
1
],
[
"0xf3ff14d5ab527059",
1
],
[
"0x17a6bc0d0062aeb3",
1
]
]
]
];
@@ -12,7 +12,7 @@ const upgrades: ChainUpgradesManual = [
[6321619, 9080], [6713249, 9090], [7217907, 9100], [7229126, 9110], [7560558, 9122],
[8115869, 9140], [8638103, 9151], [9280179, 9170], [9738717, 9180], [10156856, 9190],
[10458576, 9200], [10655116, 9220], [10879371, 9230], [11328884, 9250], [11532856, 9260],
[11933818, 9270], [12217535, 9280], [12245277, 9281]
[11933818, 9270], [12217535, 9280], [12245277, 9281], [12532644, 9291]
];
export default upgrades;
@@ -16,7 +16,7 @@ const upgrades: ChainUpgradesManual = [
[9406726, 9160], [9921066, 9170], [10007115, 9180], [10480973, 9190], [10578091, 9200],
[10678509, 9210], [10811001, 9220], [11096116, 9230], [11409279, 9250], [11584820, 9251],
[11716837, 9260], [11876919, 9261], [11987927, 9270], [12077324, 9271], [12301871, 9280],
[12604343, 9290]
[12604343, 9290], [12841034, 9300]
];
export default upgrades;
+2 -2
View File
@@ -20,10 +20,10 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.5.2",
"version": "9.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.19.4",
"@babel/runtime": "^7.20.0",
"@polkadot/util": "^10.1.11"
}
}
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-support', path: 'auto', type: 'auto', version: '9.5.2' };
export const packageInfo = { name: '@polkadot/types-support', path: 'auto', type: 'auto', version: '9.6.2' };
+6 -6
View File
@@ -20,20 +20,20 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "9.5.2",
"version": "9.6.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.19.4",
"@babel/runtime": "^7.20.0",
"@polkadot/keyring": "^10.1.11",
"@polkadot/types-augment": "9.5.2",
"@polkadot/types-codec": "9.5.2",
"@polkadot/types-create": "9.5.2",
"@polkadot/types-augment": "9.6.2",
"@polkadot/types-codec": "9.6.2",
"@polkadot/types-create": "9.6.2",
"@polkadot/util": "^10.1.11",
"@polkadot/util-crypto": "^10.1.11",
"rxjs": "^7.5.7"
},
"devDependencies": {
"@polkadot/keyring": "^10.1.11",
"@polkadot/types-support": "9.5.2"
"@polkadot/types-support": "9.6.2"
}
}
@@ -84,7 +84,10 @@ export default {
TooManyConsumers: 'Null',
Token: 'TokenError',
Arithmetic: 'ArithmeticError',
Transactional: 'TransactionalError'
Transactional: 'TransactionalError',
Exhausted: 'Null',
Corruption: 'Null',
Unavailable: 'Null'
}
},
DispatchErrorPre6: {
@@ -123,7 +123,10 @@ export interface DispatchError extends Enum {
readonly asArithmetic: ArithmeticError;
readonly isTransactional: boolean;
readonly asTransactional: TransactionalError;
readonly type: 'Other' | 'CannotLookup' | 'BadOrigin' | 'Module' | 'ConsumerRemaining' | 'NoProviders' | 'TooManyConsumers' | 'Token' | 'Arithmetic' | 'Transactional';
readonly isExhausted: boolean;
readonly isCorruption: boolean;
readonly isUnavailable: boolean;
readonly type: 'Other' | 'CannotLookup' | 'BadOrigin' | 'Module' | 'ConsumerRemaining' | 'NoProviders' | 'TooManyConsumers' | 'Token' | 'Arithmetic' | 'Transactional' | 'Exhausted' | 'Corruption' | 'Unavailable';
}
/** @name DispatchErrorModule */
@@ -430,12 +430,13 @@ function registerTypes (lookup: PortableRegistry, lookups: Record<string, string
const weightDef = lookup.getTypeDef(`Lookup${weight[0]}`);
// we have a complex structure
if (Array.isArray(weightDef.sub) && weightDef.sub.length !== 1) {
lookup.registry.register({
Weight: 'SpWeightsWeightV2Weight'
});
}
lookup.registry.register({
Weight: Array.isArray(weightDef.sub) && weightDef.sub.length !== 1
// we have a complex structure
? 'SpWeightsWeightV2Weight'
// single entry, fallback to weight V1
: 'WeightV1'
});
}
}
@@ -46,6 +46,11 @@ export const NO_RAW_ARGS: RawArgs = {
keys: []
};
/** @internal */
function filterDefined (a: unknown): boolean {
return !isUndefined(a);
}
/** @internal */
function assertArgs ({ method, section }: CreateItemFn, { args, keys }: RawArgs): void {
if (!Array.isArray(args)) {
@@ -112,11 +117,6 @@ export function createKeyRaw (registry: Registry, itemFn: CreateItemBase, args:
);
}
/** @internal */
function filterDefined (a: unknown): boolean {
return !isUndefined(a);
}
/** @internal */
function createKey (registry: Registry, itemFn: CreateItemFn, args: RawArgs): Uint8Array {
assertArgs(itemFn, args);
@@ -36,6 +36,10 @@ describe('decorateStorage', (): void => {
expect(() => query.timestamp.now()).not.toThrow();
});
it('should return a value if the storage function has the correct arguments', (): void => {
expect(() => query.staking.erasStakers(1, keyring.alice.address)).not.toThrow();
});
it('should return the correct length-prefixed storage key', (): void => {
expect(
u8aToHex(query.system.account(keyring.alice.address))
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types', path: 'auto', type: 'auto', version: '9.5.2' };
export const packageInfo = { name: '@polkadot/types', path: 'auto', type: 'auto', version: '9.6.2' };
+648 -634
View File
File diff suppressed because it is too large Load Diff