Compare commits

...
45 Commits
Author SHA1 Message Date
github-actions[bot] 5e891f68ca [CI Skip] release/stable 8.13.1
skip-checks: true
2022-07-16 06:19:09 +00:00
Jaco 040e8cbe94 8.13.1 (#5078) 2022-07-16 09:11:01 +03:00
github-actions[bot] 1b5a772a4a [CI Skip] bump/beta 8.12.3-18-x
skip-checks: true
2022-07-16 05:58:22 +00:00
Jaco 12d8465cf4 Update to latest Substrate, Polkadot & Kusama metadata (#5077) 2022-07-16 08:50:15 +03:00
github-actions[bot] 190f4194cc [CI Skip] bump/beta 8.12.3-17-x
skip-checks: true
2022-07-15 17:59:01 +00:00
Jaco c01a6001fc Deupe decodeU8a result format on failure (#5076) 2022-07-15 20:50:18 +03:00
github-actions[bot] c847920f86 [CI Skip] bump/beta 8.12.3-16-x
skip-checks: true
2022-07-15 15:49:36 +00:00
Jaco 67325dbc09 Additional historic DispatchError variant (#5075) 2022-07-15 18:39:59 +03:00
github-actions[bot] 63d72e7d36 [CI Skip] bump/beta 8.12.3-15-x
skip-checks: true
2022-07-15 10:04:43 +00:00
Jaco 64ddc05bc8 Support DebugRuntimeApi runtime calls (frontier) (#5073) 2022-07-15 12:57:11 +03:00
github-actions[bot] d15dec1e58 [CI Skip] bump/beta 8.12.3-14-x
skip-checks: true
2022-07-15 08:22:01 +00:00
Jaco cb283c410b Use type asserts for json imports (#5072) 2022-07-15 11:13:12 +03:00
github-actions[bot] 7c6ca42c10 [CI Skip] bump/beta 8.12.3-13-x
skip-checks: true
2022-07-15 07:15:32 +00:00
Jaco bd6ad3a2ef Asupport for NimbusApi on runtime (#5071) 2022-07-15 10:08:11 +03:00
github-actions[bot] 1a29d7950c [CI Skip] bump/beta 8.12.3-12-x
skip-checks: true
2022-07-15 06:37:43 +00:00
Jaco 7049186928 Support for NominationPoolsApi runtime (#5069)
* Support for NominationPoolsApi runtime

* CHANGELOG
2022-07-15 09:27:30 +03:00
github-actions[bot] dc34974a06 [CI Skip] bump/beta 8.12.3-11-x
skip-checks: true
2022-07-15 06:05:10 +00:00
Jaco 932e02e018 Remove old test infrastructure (#5070) 2022-07-15 08:57:17 +03:00
github-actions[bot] 6f91fbd847 [CI Skip] bump/beta 8.12.3-10-x
skip-checks: true
2022-07-14 11:37:39 +00:00
Jaco af7c4609f2 Add Kusama 9250 upgrade block (#5068) 2022-07-14 14:29:20 +03:00
github-actions[bot] 3600a4bdd7 [CI Skip] bump/beta 8.12.3-9-x
skip-checks: true
2022-07-14 11:12:10 +00:00
Jaco 3bf4e905e9 BlockBuilder 2/3/4 & GrandpaApi 2 runtime interface definitions (#5067) 2022-07-14 14:03:15 +03:00
github-actions[bot] 38984af858 [CI Skip] bump/beta 8.12.3-8-x
skip-checks: true
2022-07-13 14:07:26 +00:00
Jaco 60384ad850 Adjust blockNumber extract (w & w/o Compact) (#5066)
* Adjust blockNumber extract (w & w/o Compact)

* Adjust unused test file
2022-07-13 16:59:39 +03:00
github-actions[bot] 998f88be05 [CI Skip] bump/beta 8.12.3-7-x
skip-checks: true
2022-07-13 09:25:42 +00:00
Jaco 551a081990 Support for Moonbeam author extraction in derive.chain.* (#5065)
* Support for Moonbeam author extraction in derive.chain.*

* use unwrapOr

* Adjust logic
2022-07-13 12:18:07 +03:00
github-actions[bot] 51e6e528ce [CI Skip] bump/beta 8.12.3-6-x
skip-checks: true
2022-07-13 06:54:31 +00:00
Jaco 1f5e939b73 derive.subscribeFinalizedBlocks w/ events & author (#5064)
* derive.subscribeFinalizedBlocks w/ events & author

* Apply createdAtHash (some)

* Pass through events registry

* Throw on use
2022-07-13 09:44:47 +03:00
github-actions[bot] 3813152b46 [CI Skip] bump/beta 8.12.3-5-x
skip-checks: true
2022-07-13 05:12:42 +00:00
Jaco cfec580956 derive.chain.subscribeFinalizedHeads (#5063)
* derive.chain.subscribeFinalizedHeads

* Remove extra map
2022-07-13 08:02:49 +03:00
github-actions[bot] 859ce51eab [CI Skip] bump/beta 8.12.3-4-x
skip-checks: true
2022-07-12 05:41:05 +00:00
Jaco aa5cc1eef1 Use ReturnType<typeof setInterval> for timerIds (#5060)
* Use ReturnType<typeof setInterval> for timerIds

* Remove as number casts for clearInterval
2022-07-12 08:31:50 +03:00
Jaco 2548601c9f Bump rxjs (#5059) 2022-07-12 08:07:41 +03:00
github-actions[bot] 51ceede446 [CI Skip] bump/beta 8.12.3-3-x
skip-checks: true
2022-07-12 05:00:18 +00:00
Nikos Kontakis a16ba9f2ac Bump substrate connect to 0.7.8 (#5058) 2022-07-12 07:48:54 +03:00
github-actions[bot] 9926fcd14f [CI Skip] bump/beta 8.12.3-2-x
skip-checks: true
2022-07-11 12:53:27 +00:00
Jaco fa5ec1b4a8 Adjust assert usage in api-contract (#5057) 2022-07-11 15:43:03 +03:00
github-actions[bot] 29d9c8a279 [CI Skip] bump/beta 8.12.3-1-x
skip-checks: true
2022-07-11 11:00:34 +00:00
Jaco 6a9428943d Adjust some API assertions (#5056) 2022-07-11 13:52:48 +03:00
github-actions[bot] ea9cd6981d [CI Skip] bump/beta 8.12.3-0-x
skip-checks: true
2022-07-11 05:27:13 +00:00
Jaco c7d37c9504 Bump dev (#5053) 2022-07-11 08:19:08 +03:00
github-actions[bot] a41bc2113d [CI Skip] release/stable 8.12.2
skip-checks: true
2022-07-10 09:21:43 +00:00
Jaco e514d9b5a9 8.12.2 (#5052) 2022-07-10 12:14:17 +03:00
github-actions[bot] 3b4310a418 [CI Skip] bump/beta 8.12.2-0-x
skip-checks: true
2022-07-10 06:55:16 +00:00
Jaco 0ec32636a9 Bump common (#5051) 2022-07-10 09:47:21 +03:00
141 changed files with 2773 additions and 2281 deletions
-1
View File
@@ -1 +0,0 @@
8.12.1
-60
View File
@@ -1,60 +0,0 @@
40
1.4.2
1.6.2
1.11.2
1.12.2
1.17.2
1.31.2
2.8.2
3.2.2
3.2.3
3.3.2
3.6.2
3.6.3
3.6.4
3.7.2
3.7.3
3.9.2
3.9.3
3.10.2
4.0.2
4.0.3
4.6.2
4.7.2
4.9.2
4.11.2
4.16.2
5.3.2
5.5.2
5.8.2
5.8.3
6.0.2
6.0.3
6.0.4
6.0.5
6.1.2
6.4.2
6.5.2
6.7.2
6.9.2
6.10.2
6.10.3
7.0.2
7.14.2
7.14.3
8.0.2
8.3.2
8.4.2
8.6.2
8.8.2
8.11.2
8.11.3
+1 -2
View File
@@ -6,8 +6,7 @@ const base = require('@polkadot/dev/config/eslint.cjs');
module.exports = { module.exports = {
...base, ...base,
ignorePatterns: [ ignorePatterns: [
...base.ignorePatterns, ...base.ignorePatterns
'**/deno/*.ts'
], ],
parserOptions: { parserOptions: {
...base.parserOptions, ...base.parserOptions,
+1 -6
View File
@@ -1,12 +1,7 @@
_book/ _book/
build/ build/
build-cjs/ build-*/
build-esm/
build-deno/
build-docs/
coverage/ coverage/
docs/.vuepress/dist/
docs/substrate/*.md
node_modules/ node_modules/
tmp/ tmp/
/import_map.json /import_map.json
+22
View File
@@ -1,5 +1,27 @@
# CHANGELOG # CHANGELOG
## 8.13.1 Jul 16, 2022
Changes:
- Add `derive.chain.subscribeFinalized{Heads, Blocks}` which returns all finalized, no skips
- Support Moonbeam author extraction on `derive.chain.*` (w/ shared logic dedupe)
- Cater for older `BlockBuilder 2/3/4` & `GrandpaApi 2` runtime interface definitions
- Support for `NominationPoolsApi` runtime interface
- Support for `DebugRuntimeApi` runtime interface, Frontier-specific
- Support for `NimbusApi` runtime interface (& older `AuthorFilterAPI`)
- Add additional historic `DispatchError` enum variant for asset chains
- Add Kusama 9250 upgrade block
- Update to latest Substrate, Polkadot & Kusama metadata
## 8.12.2 Jul 10, 2022
Changes:
- Update to `@polkadot/util` 10.0.2
## 8.12.1 Jul 9, 2022 ## 8.12.1 Jul 9, 2022
Changes: Changes:
+2 -2
View File
@@ -1,4 +1,4 @@
3114 Jaco 8.12.1 (#5050) 3136 Jaco 8.13.1 (#5078)
83 Amaury Martiny StatementKind: Regular and Saft (#2303) 83 Amaury Martiny StatementKind: Regular and Saft (#2303)
37 Keith Ingram Update contract types and rpc (#4541) 37 Keith Ingram Update contract types and rpc (#4541)
35 Stefanie Doll Updated child storage parameters (#1709) 35 Stefanie Doll Updated child storage parameters (#1709)
@@ -7,9 +7,9 @@
15 Jeremías Díaz feat(types): add correct tuple type to storage key (#3054) 15 Jeremías Díaz feat(types): add correct tuple type to storage key (#3054)
11 Ian He HttpProvider support clone() (#3949) 11 Ian He HttpProvider support clone() (#3949)
10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954) 10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954)
6 Nikos Kontakis Bump substrate connect to 0.7.8 (#5058)
5 Chevdor Fix metadata package link (#3458) 5 Chevdor Fix metadata package link (#3458)
5 Jake Naviasky Fixing approvalFlagsToBools. (#1250) 5 Jake Naviasky Fixing approvalFlagsToBools. (#1250)
5 Nikos Kontakis Bump substrate connect to 0.7.7 (#4962)
4 Alex D Use derive customAccount and customLocks for balance overrides (#3248) 4 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
4 Alex Wang fix issue that creates duplicate providers (#983) 4 Alex Wang fix issue that creates duplicate providers (#983)
4 Alexander Popiak Add asset id in signing (#4009) 4 Alexander Popiak Add asset id in signing (#4009)
+7 -3
View File
@@ -11,7 +11,11 @@
}, },
"sideEffects": false, "sideEffects": false,
"type": "module", "type": "module",
"version": "8.12.1", "version": "8.13.1",
"versions": {
"git": "8.13.1",
"npm": "8.13.1"
},
"workspaces": [ "workspaces": [
"packages/*" "packages/*"
], ],
@@ -33,9 +37,9 @@
"@babel/core": "^7.18.6", "@babel/core": "^7.18.6",
"@babel/register": "^7.18.6", "@babel/register": "^7.18.6",
"@babel/runtime": "^7.18.6", "@babel/runtime": "^7.18.6",
"@polkadot/dev": "^0.67.65", "@polkadot/dev": "^0.67.79",
"@polkadot/typegen": "workspace:packages/typegen", "@polkadot/typegen": "workspace:packages/typegen",
"@types/jest": "^28.1.4", "@types/jest": "^28.1.6",
"copyfiles": "^2.4.1" "copyfiles": "^2.4.1"
}, },
"resolutions": { "resolutions": {
+8 -8
View File
@@ -20,18 +20,18 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "8.12.1", "version": "8.13.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.6", "@babel/runtime": "^7.18.6",
"@polkadot/api-base": "8.12.1", "@polkadot/api-base": "8.13.1",
"@polkadot/rpc-augment": "8.12.1", "@polkadot/rpc-augment": "8.13.1",
"@polkadot/types": "8.12.1", "@polkadot/types": "8.13.1",
"@polkadot/types-augment": "8.12.1", "@polkadot/types-augment": "8.13.1",
"@polkadot/types-codec": "8.12.1", "@polkadot/types-codec": "8.13.1",
"@polkadot/util": "^10.0.1" "@polkadot/util": "^10.0.2"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/types-support": "8.12.1" "@polkadot/types-support": "8.13.1"
} }
} }
+9 -2
View File
@@ -463,13 +463,20 @@ declare module '@polkadot/api-base/types/consts' {
}; };
nominationPools: { nominationPools: {
/** /**
* The minimum pool points-to-balance ratio that must be maintained for it to be `open`. * The maximum pool points-to-balance ratio that an `open` pool can have.
*
* This is important in the event slashing takes place and the pool's points-to-balance * This is important in the event slashing takes place and the pool's points-to-balance
* ratio becomes disproportional. * ratio becomes disproportional.
*
* Moreover, this relates to the `RewardCounter` type as well, as the arithmetic operations
* are a function of number of points, and by setting this value to e.g. 10, you ensure
* that the total number of points in the system are at most 10 times the total_issuance of
* the chain, in the absolute worse case.
*
* For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1. * For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1.
* Such a scenario would also be the equivalent of the pool being 90% slashed. * Such a scenario would also be the equivalent of the pool being 90% slashed.
**/ **/
minPointsToBalance: u32 & AugmentedConst<ApiType>; maxPointsToBalance: u8 & AugmentedConst<ApiType>;
/** /**
* The nomination pool's pallet id. * The nomination pool's pallet id.
**/ **/
+4 -4
View File
@@ -1296,14 +1296,14 @@ declare module '@polkadot/api-base/types/errors' {
* Must vote for at least one candidate. * Must vote for at least one candidate.
**/ **/
NoVotes: AugmentedError<ApiType>; NoVotes: AugmentedError<ApiType>;
/**
* Cannot report self.
**/
ReportSelf: AugmentedError<ApiType>;
/** /**
* Runner cannot re-submit candidacy. * Runner cannot re-submit candidacy.
**/ **/
RunnerUpSubmit: AugmentedError<ApiType>; RunnerUpSubmit: AugmentedError<ApiType>;
/**
* Too many candidates have been created.
**/
TooManyCandidates: AugmentedError<ApiType>;
/** /**
* Cannot vote more than candidates. * Cannot vote more than candidates.
**/ **/
+16 -4
View File
@@ -2129,6 +2129,8 @@ declare module '@polkadot/api-base/types/submittable' {
* *
* Additional funds can come from either the free balance of the account, of from the * Additional funds can come from either the free balance of the account, of from the
* accumulated rewards, see [`BondExtra`]. * accumulated rewards, see [`BondExtra`].
*
* Bonding extra funds implies an automatic payout of all pending rewards as well.
**/ **/
bondExtra: AugmentedSubmittable<(extra: PalletNominationPoolsBondExtra | { FreeBalance: any } | { Rewards: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsBondExtra]>; bondExtra: AugmentedSubmittable<(extra: PalletNominationPoolsBondExtra | { FreeBalance: any } | { Rewards: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsBondExtra]>;
/** /**
@@ -2225,8 +2227,14 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* Set a new state for the pool. * Set a new state for the pool.
* *
* The dispatch origin of this call must be signed by the state toggler, or the root role * If a pool is already in the `Destroying` state, then under no condition can its state
* of the pool. * change again.
*
* The dispatch origin of this call must be either:
*
* 1. signed by the state toggler, or the root role of the pool,
* 2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and
* then the state of the pool can be permissionlessly changed to `Destroying`.
**/ **/
setState: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, state: PalletNominationPoolsPoolState | 'Open' | 'Blocked' | 'Destroying' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletNominationPoolsPoolState]>; setState: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, state: PalletNominationPoolsPoolState | 'Open' | 'Blocked' | 'Destroying' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletNominationPoolsPoolState]>;
/** /**
@@ -2402,7 +2410,11 @@ declare module '@polkadot/api-base/types/submittable' {
* the outgoing member is slashed. * the outgoing member is slashed.
* *
* If a runner-up is available, then the best runner-up will be removed and replaces the * If a runner-up is available, then the best runner-up will be removed and replaces the
* outgoing member. Otherwise, a new phragmen election is started. * outgoing member. Otherwise, if `rerun_election` is `true`, a new phragmen election is
* started, else, nothing happens.
*
* If `slash_bond` is set to true, the bond of the member being removed is slashed. Else,
* it is returned.
* *
* The dispatch origin of this call must be root. * The dispatch origin of this call must be root.
* *
@@ -2413,7 +2425,7 @@ declare module '@polkadot/api-base/types/submittable' {
* will go into phragmen, we assume full block for now. * will go into phragmen, we assume full block for now.
* # </weight> * # </weight>
**/ **/
removeMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, hasReplacement: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, bool]>; removeMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, slashBond: bool | boolean | Uint8Array, rerunElection: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, bool, bool]>;
/** /**
* Remove `origin` as a voter. * Remove `origin` as a voter.
* *
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '8.12.1' }; export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '8.13.1' };
+4 -4
View File
@@ -1154,14 +1154,14 @@ declare module '@polkadot/api-base/types/errors' {
* Must vote for at least one candidate. * Must vote for at least one candidate.
**/ **/
NoVotes: AugmentedError<ApiType>; NoVotes: AugmentedError<ApiType>;
/**
* Cannot report self.
**/
ReportSelf: AugmentedError<ApiType>;
/** /**
* Runner cannot re-submit candidacy. * Runner cannot re-submit candidacy.
**/ **/
RunnerUpSubmit: AugmentedError<ApiType>; RunnerUpSubmit: AugmentedError<ApiType>;
/**
* Too many candidates have been created.
**/
TooManyCandidates: AugmentedError<ApiType>;
/** /**
* Cannot vote more than candidates. * Cannot vote more than candidates.
**/ **/
+6 -2
View File
@@ -2177,7 +2177,11 @@ declare module '@polkadot/api-base/types/submittable' {
* the outgoing member is slashed. * the outgoing member is slashed.
* *
* If a runner-up is available, then the best runner-up will be removed and replaces the * If a runner-up is available, then the best runner-up will be removed and replaces the
* outgoing member. Otherwise, a new phragmen election is started. * outgoing member. Otherwise, if `rerun_election` is `true`, a new phragmen election is
* started, else, nothing happens.
*
* If `slash_bond` is set to true, the bond of the member being removed is slashed. Else,
* it is returned.
* *
* The dispatch origin of this call must be root. * The dispatch origin of this call must be root.
* *
@@ -2188,7 +2192,7 @@ declare module '@polkadot/api-base/types/submittable' {
* will go into phragmen, we assume full block for now. * will go into phragmen, we assume full block for now.
* # </weight> * # </weight>
**/ **/
removeMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, hasReplacement: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, bool]>; removeMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, slashBond: bool | boolean | Uint8Array, rerunElection: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, bool, bool]>;
/** /**
* Remove `origin` as a voter. * Remove `origin` as a voter.
* *
+9 -2
View File
@@ -683,13 +683,20 @@ declare module '@polkadot/api-base/types/consts' {
}; };
nominationPools: { nominationPools: {
/** /**
* The minimum pool points-to-balance ratio that must be maintained for it to be `open`. * The maximum pool points-to-balance ratio that an `open` pool can have.
*
* This is important in the event slashing takes place and the pool's points-to-balance * This is important in the event slashing takes place and the pool's points-to-balance
* ratio becomes disproportional. * ratio becomes disproportional.
*
* Moreover, this relates to the `RewardCounter` type as well, as the arithmetic operations
* are a function of number of points, and by setting this value to e.g. 10, you ensure
* that the total number of points in the system are at most 10 times the total_issuance of
* the chain, in the absolute worse case.
*
* For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1. * For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1.
* Such a scenario would also be the equivalent of the pool being 90% slashed. * Such a scenario would also be the equivalent of the pool being 90% slashed.
**/ **/
minPointsToBalance: u32 & AugmentedConst<ApiType>; maxPointsToBalance: u8 & AugmentedConst<ApiType>;
/** /**
* The nomination pool's pallet id. * The nomination pool's pallet id.
**/ **/
+20 -13
View File
@@ -855,14 +855,14 @@ declare module '@polkadot/api-base/types/errors' {
* Must vote for at least one candidate. * Must vote for at least one candidate.
**/ **/
NoVotes: AugmentedError<ApiType>; NoVotes: AugmentedError<ApiType>;
/**
* Cannot report self.
**/
ReportSelf: AugmentedError<ApiType>;
/** /**
* Runner cannot re-submit candidacy. * Runner cannot re-submit candidacy.
**/ **/
RunnerUpSubmit: AugmentedError<ApiType>; RunnerUpSubmit: AugmentedError<ApiType>;
/**
* Too many candidates have been created.
**/
TooManyCandidates: AugmentedError<ApiType>;
/** /**
* Cannot vote more than candidates. * Cannot vote more than candidates.
**/ **/
@@ -1207,6 +1207,10 @@ declare module '@polkadot/api-base/types/errors' {
MetadataExceedsMaxLen: AugmentedError<ApiType>; MetadataExceedsMaxLen: AugmentedError<ApiType>;
/** /**
* The amount does not meet the minimum bond to either join or create a pool. * The amount does not meet the minimum bond to either join or create a pool.
*
* The depositor can never unbond to a value less than
* `Pallet::depositor_min_bond`. The caller does not have nominating
* permissions for the pool. Members can never unbond to a value below `MinJoinBond`.
**/ **/
MinimumBondNotMet: AugmentedError<ApiType>; MinimumBondNotMet: AugmentedError<ApiType>;
/** /**
@@ -1214,10 +1218,6 @@ declare module '@polkadot/api-base/types/errors' {
* other members to be permissionlessly unbonded. * other members to be permissionlessly unbonded.
**/ **/
NotDestroying: AugmentedError<ApiType>; NotDestroying: AugmentedError<ApiType>;
/**
* Not enough points. Ty unbonding less.
**/
NotEnoughPointsToUnbond: AugmentedError<ApiType>;
/** /**
* Either a) the caller cannot make a valid kick or b) the pool is not destroying. * Either a) the caller cannot make a valid kick or b) the pool is not destroying.
**/ **/
@@ -1226,11 +1226,6 @@ declare module '@polkadot/api-base/types/errors' {
* The caller does not have nominating permissions for the pool. * The caller does not have nominating permissions for the pool.
**/ **/
NotNominator: AugmentedError<ApiType>; NotNominator: AugmentedError<ApiType>;
/**
* The depositor must be the only member in the bonded pool in order to unbond. And the
* depositor must be the only member in the sub pools in order to withdraw unbonded.
**/
NotOnlyPoolMember: AugmentedError<ApiType>;
/** /**
* The pool is not open to join * The pool is not open to join
**/ **/
@@ -2058,6 +2053,10 @@ declare module '@polkadot/api-base/types/errors' {
* Invalid witness data given. * Invalid witness data given.
**/ **/
BadWitness: AugmentedError<ApiType>; BadWitness: AugmentedError<ApiType>;
/**
* The provided bid is too low.
**/
BidTooLow: AugmentedError<ApiType>;
/** /**
* The item or collection is frozen. * The item or collection is frozen.
**/ **/
@@ -2090,6 +2089,10 @@ declare module '@polkadot/api-base/types/errors' {
* The signing account has no permission to do the operation. * The signing account has no permission to do the operation.
**/ **/
NoPermission: AugmentedError<ApiType>; NoPermission: AugmentedError<ApiType>;
/**
* Item is not for sale.
**/
NotForSale: AugmentedError<ApiType>;
/** /**
* The named owner has not signed ownership of the collection is acceptable. * The named owner has not signed ownership of the collection is acceptable.
**/ **/
@@ -2102,6 +2105,10 @@ declare module '@polkadot/api-base/types/errors' {
* The given item ID is unknown. * The given item ID is unknown.
**/ **/
UnknownCollection: AugmentedError<ApiType>; UnknownCollection: AugmentedError<ApiType>;
/**
* The given item ID is unknown.
**/
UnknownItem: AugmentedError<ApiType>;
/** /**
* The delegate turned out to be different to what was expected. * The delegate turned out to be different to what was expected.
**/ **/
@@ -1469,6 +1469,18 @@ declare module '@polkadot/api-base/types/events' {
* An `item` was issued. * An `item` was issued.
**/ **/
Issued: AugmentedEvent<ApiType, [collection: u32, item: u32, owner: AccountId32], { collection: u32, item: u32, owner: AccountId32 }>; Issued: AugmentedEvent<ApiType, [collection: u32, item: u32, owner: AccountId32], { collection: u32, item: u32, owner: AccountId32 }>;
/**
* An item was bought.
**/
ItemBought: AugmentedEvent<ApiType, [collection: u32, item: u32, price: u128, seller: AccountId32, buyer: AccountId32], { collection: u32, item: u32, price: u128, seller: AccountId32, buyer: AccountId32 }>;
/**
* The price for the instance was removed.
**/
ItemPriceRemoved: AugmentedEvent<ApiType, [collection: u32, item: u32], { collection: u32, item: u32 }>;
/**
* The price was set for the instance.
**/
ItemPriceSet: AugmentedEvent<ApiType, [collection: u32, item: u32, price: u128, whitelistedBuyer: Option<AccountId32>], { collection: u32, item: u32, price: u128, whitelistedBuyer: Option<AccountId32> }>;
/** /**
* A `collection` has had its attributes changed by the `Force` origin. * A `collection` has had its attributes changed by the `Force` origin.
**/ **/
@@ -1779,6 +1779,10 @@ declare module '@polkadot/api-base/types/storage' {
* Metadata of an item. * Metadata of an item.
**/ **/
instanceMetadataOf: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesItemMetadata>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>; instanceMetadataOf: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesItemMetadata>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
/**
* Price of an asset instance.
**/
itemPriceOf: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<ITuple<[u128, Option<AccountId32>]>>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
/** /**
* The collection, if any, of which an account is willing to take ownership. * The collection, if any, of which an account is willing to take ownership.
**/ **/
+42 -4
View File
@@ -1937,7 +1937,11 @@ declare module '@polkadot/api-base/types/submittable' {
* the outgoing member is slashed. * the outgoing member is slashed.
* *
* If a runner-up is available, then the best runner-up will be removed and replaces the * If a runner-up is available, then the best runner-up will be removed and replaces the
* outgoing member. Otherwise, a new phragmen election is started. * outgoing member. Otherwise, if `rerun_election` is `true`, a new phragmen election is
* started, else, nothing happens.
*
* If `slash_bond` is set to true, the bond of the member being removed is slashed. Else,
* it is returned.
* *
* The dispatch origin of this call must be root. * The dispatch origin of this call must be root.
* *
@@ -1948,7 +1952,7 @@ declare module '@polkadot/api-base/types/submittable' {
* will go into phragmen, we assume full block for now. * will go into phragmen, we assume full block for now.
* # </weight> * # </weight>
**/ **/
removeMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, hasReplacement: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, bool]>; removeMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, slashBond: bool | boolean | Uint8Array, rerunElection: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, bool, bool]>;
/** /**
* Remove `origin` as a voter. * Remove `origin` as a voter.
* *
@@ -2714,6 +2718,8 @@ declare module '@polkadot/api-base/types/submittable' {
* *
* Additional funds can come from either the free balance of the account, of from the * Additional funds can come from either the free balance of the account, of from the
* accumulated rewards, see [`BondExtra`]. * accumulated rewards, see [`BondExtra`].
*
* Bonding extra funds implies an automatic payout of all pending rewards as well.
**/ **/
bondExtra: AugmentedSubmittable<(extra: PalletNominationPoolsBondExtra | { FreeBalance: any } | { Rewards: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsBondExtra]>; bondExtra: AugmentedSubmittable<(extra: PalletNominationPoolsBondExtra | { FreeBalance: any } | { Rewards: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsBondExtra]>;
/** /**
@@ -2810,8 +2816,14 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* Set a new state for the pool. * Set a new state for the pool.
* *
* The dispatch origin of this call must be signed by the state toggler, or the root role * If a pool is already in the `Destroying` state, then under no condition can its state
* of the pool. * change again.
*
* The dispatch origin of this call must be either:
*
* 1. signed by the state toggler, or the root role of the pool,
* 2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and
* then the state of the pool can be permissionlessly changed to `Destroying`.
**/ **/
setState: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, state: PalletNominationPoolsPoolState | 'Open' | 'Blocked' | 'Destroying' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletNominationPoolsPoolState]>; setState: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, state: PalletNominationPoolsPoolState | 'Open' | 'Blocked' | 'Destroying' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletNominationPoolsPoolState]>;
/** /**
@@ -4983,6 +4995,18 @@ declare module '@polkadot/api-base/types/submittable' {
* Modes: `check_owner.is_some()`. * Modes: `check_owner.is_some()`.
**/ **/
burn: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array, checkOwner: Option<MultiAddress> | null | Uint8Array | MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string) => SubmittableExtrinsic<ApiType>, [u32, u32, Option<MultiAddress>]>; burn: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array, checkOwner: Option<MultiAddress> | null | Uint8Array | MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string) => SubmittableExtrinsic<ApiType>, [u32, u32, Option<MultiAddress>]>;
/**
* Allows to buy an item if it's up for sale.
*
* Origin must be Signed and must not be the owner of the `item`.
*
* - `collection`: The collection of the item.
* - `item`: The item the sender wants to buy.
* - `bid_price`: The price the sender is willing to pay.
*
* Emits `ItemBought` on success.
**/
buyItem: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array, bidPrice: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, u128]>;
/** /**
* Cancel the prior approval for the transfer of an item by a delegate. * Cancel the prior approval for the transfer of an item by a delegate.
* *
@@ -5271,6 +5295,20 @@ declare module '@polkadot/api-base/types/submittable' {
* Weight: `O(1)` * Weight: `O(1)`
**/ **/
setMetadata: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array, data: Bytes | string | Uint8Array, isFrozen: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, Bytes, bool]>; setMetadata: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array, data: Bytes | string | Uint8Array, isFrozen: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, Bytes, bool]>;
/**
* Set (or reset) the price for an item.
*
* Origin must be Signed and must be the owner of the asset `item`.
*
* - `collection`: The collection of the item.
* - `item`: The item to set the price for.
* - `price`: The price for the item. Pass `None`, to reset the price.
* - `buyer`: Restricts the buy operation to a specific account.
*
* Emits `ItemPriceSet` on success if the price is not `None`.
* Emits `ItemPriceRemoved` on success if the price is `None`.
**/
setPrice: AugmentedSubmittable<(collection: u32 | AnyNumber | Uint8Array, item: u32 | AnyNumber | Uint8Array, price: Option<u128> | null | Uint8Array | u128 | AnyNumber, whitelistedBuyer: Option<MultiAddress> | null | Uint8Array | MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string) => SubmittableExtrinsic<ApiType>, [u32, u32, Option<u128>, Option<MultiAddress>]>;
/** /**
* Change the Issuer, Admin and Freezer of a collection. * Change the Issuer, Admin and Freezer of a collection.
* *
+5 -5
View File
@@ -20,13 +20,13 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "8.12.1", "version": "8.13.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.6", "@babel/runtime": "^7.18.6",
"@polkadot/rpc-core": "8.12.1", "@polkadot/rpc-core": "8.13.1",
"@polkadot/types": "8.12.1", "@polkadot/types": "8.13.1",
"@polkadot/util": "^10.0.1", "@polkadot/util": "^10.0.2",
"rxjs": "^7.5.5" "rxjs": "^7.5.6"
} }
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '8.12.1' }; export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '8.13.1' };
+10 -10
View File
@@ -20,20 +20,20 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "8.12.1", "version": "8.13.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.6", "@babel/runtime": "^7.18.6",
"@polkadot/api": "8.12.1", "@polkadot/api": "8.13.1",
"@polkadot/types": "8.12.1", "@polkadot/types": "8.13.1",
"@polkadot/types-codec": "8.12.1", "@polkadot/types-codec": "8.13.1",
"@polkadot/types-create": "8.12.1", "@polkadot/types-create": "8.13.1",
"@polkadot/util": "^10.0.1", "@polkadot/util": "^10.0.2",
"@polkadot/util-crypto": "^10.0.1", "@polkadot/util-crypto": "^10.0.2",
"rxjs": "^7.5.5" "rxjs": "^7.5.6"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/api-augment": "8.12.1", "@polkadot/api-augment": "8.13.1",
"@polkadot/keyring": "^10.0.1" "@polkadot/keyring": "^10.0.2"
} }
} }
+16 -6
View File
@@ -8,7 +8,7 @@ import type { AbiConstructor, AbiEvent, AbiMessage, AbiParam, DecodedEvent, Deco
import { TypeRegistry } from '@polkadot/types'; import { TypeRegistry } from '@polkadot/types';
import { TypeDefInfo } from '@polkadot/types-create'; import { TypeDefInfo } from '@polkadot/types-create';
import { assert, assertReturn, compactAddLength, compactStripLength, isNumber, isObject, isString, logger, stringCamelCase, stringify, u8aConcat, u8aToHex } from '@polkadot/util'; import { assertReturn, compactAddLength, compactStripLength, isNumber, isObject, isString, logger, stringCamelCase, stringify, u8aConcat, u8aToHex } from '@polkadot/util';
import { convertVersions, enumVersions } from './toLatest'; import { convertVersions, enumVersions } from './toLatest';
@@ -35,7 +35,9 @@ function getLatestMeta (registry: Registry, json: Record<string, unknown>): Cont
) as unknown as ContractMetadata; ) as unknown as ContractMetadata;
const converter = convertVersions.find(([v]) => metadata[`is${v}`]); const converter = convertVersions.find(([v]) => metadata[`is${v}`]);
assert(converter, () => `Unable to convert ABI with version ${metadata.type} to latest`); if (!converter) {
throw new Error(`Unable to convert ABI with version ${metadata.type} to latest`);
}
return converter[1](registry, metadata[`as${converter[0]}`]); return converter[1](registry, metadata[`as${converter[0]}`]);
} }
@@ -112,7 +114,9 @@ export class Abi {
const index = data[0]; const index = data[0];
const event = this.events[index]; const event = this.events[index];
assert(event, () => `Unable to find event with index ${index}`); if (!event) {
throw new Error(`Unable to find event with index ${index}`);
}
return event.fromU8a(data.subarray(1)); return event.fromU8a(data.subarray(1));
} }
@@ -142,7 +146,9 @@ export class Abi {
#createArgs = (args: ContractMessageParamSpecLatest[], spec: unknown): AbiParam[] => { #createArgs = (args: ContractMessageParamSpecLatest[], spec: unknown): AbiParam[] => {
return args.map(({ label, type }, index): AbiParam => { return args.map(({ label, type }, index): AbiParam => {
try { try {
assert(isObject(type), 'Invalid type definition found'); if (!isObject(type)) {
throw new Error('Invalid type definition found');
}
const displayName = type.displayName.length const displayName = type.displayName.length
? type.displayName[type.displayName.length - 1].toString() ? type.displayName[type.displayName.length - 1].toString()
@@ -233,13 +239,17 @@ export class Abi {
const selector = trimmed.subarray(0, 4); const selector = trimmed.subarray(0, 4);
const message = list.find((m) => m.selector.eq(selector)); const message = list.find((m) => m.selector.eq(selector));
assert(message, `Unable to find ${type} with selector ${u8aToHex(selector)}`); if (!message) {
throw new Error(`Unable to find ${type} with selector ${u8aToHex(selector)}`);
}
return message.fromU8a(trimmed.subarray(4)); return message.fromU8a(trimmed.subarray(4));
}; };
#encodeArgs = ({ label, selector }: ContractMessageSpecLatest | ContractConstructorSpecLatest, args: AbiParam[], data: unknown[]): Uint8Array => { #encodeArgs = ({ label, selector }: ContractMessageSpecLatest | ContractConstructorSpecLatest, args: AbiParam[], data: unknown[]): Uint8Array => {
assert(data.length === args.length, () => `Expected ${args.length} arguments to contract message '${label.toString()}', found ${data.length}`); if (data.length !== args.length) {
throw new Error(`Expected ${args.length} arguments to contract message '${label.toString()}', found ${data.length}`);
}
return compactAddLength( return compactAddLength(
u8aConcat( u8aConcat(
+8 -4
View File
@@ -5,7 +5,7 @@ import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
import type { Registry } from '@polkadot/types/types'; import type { Registry } from '@polkadot/types/types';
import { ApiBase } from '@polkadot/api/base'; import { ApiBase } from '@polkadot/api/base';
import { assert, isFunction } from '@polkadot/util'; import { isFunction } from '@polkadot/util';
import { Abi } from '../Abi'; import { Abi } from '../Abi';
@@ -24,9 +24,13 @@ export abstract class Base<ApiType extends ApiTypes> {
this._decorateMethod = decorateMethod; this._decorateMethod = decorateMethod;
assert(!!(api && api.isConnected && api.tx), 'Your API has not been initialized correctly and is not connected to a chain'); if (!api || !api.isConnected || !api.tx) {
assert(!!(api.tx.contracts && Object.keys(api.tx.contracts).length), 'You need to connect to a chain with a runtime that supports contracts'); throw new Error('Your API has not been initialized correctly and is not connected to a chain');
assert(isFunction(api.tx.contracts.instantiateWithCode), 'You need to connect to a chain with a runtime with a V3 contracts module. The runtime does not expose api.tx.contracts.instantiateWithCode'); } else if (!api.tx.contracts || !Object.keys(api.tx.contracts).length) {
throw new Error('You need to connect to a chain with a runtime that supports contracts');
} else if (!isFunction(api.tx.contracts.instantiateWithCode)) {
throw new Error('You need to connect to a chain with a runtime with a V3 contracts module. The runtime does not expose api.tx.contracts.instantiateWithCode');
}
} }
public get registry (): Registry { public get registry (): Registry {
+3 -3
View File
@@ -6,9 +6,9 @@ import path from 'path';
import { toPromiseMethod } from '@polkadot/api'; import { toPromiseMethod } from '@polkadot/api';
import v0contractFlipper from '../test/contracts/ink/v0/flipper.contract.json'; import v0contractFlipper from '../test/contracts/ink/v0/flipper.contract.json' assert { type: 'json' };
import v0abiFlipper from '../test/contracts/ink/v0/flipper.json'; import v0abiFlipper from '../test/contracts/ink/v0/flipper.json' assert { type: 'json' };
import v1contractFlipper from '../test/contracts/ink/v1/flipper.contract.json'; import v1contractFlipper from '../test/contracts/ink/v1/flipper.contract.json' assert { type: 'json' };
import { Code } from './Code'; import { Code } from './Code';
import { mockApi } from './mock'; import { mockApi } from './mock';
+4 -2
View File
@@ -11,7 +11,7 @@ import type { MapConstructorExec } from './types';
import { SubmittableResult } from '@polkadot/api'; import { SubmittableResult } from '@polkadot/api';
import { ApiBase } from '@polkadot/api/base'; import { ApiBase } from '@polkadot/api/base';
import { assert, BN_ZERO, compactAddLength, isUndefined, isWasm, u8aToU8a } from '@polkadot/util'; import { BN_ZERO, compactAddLength, isUndefined, isWasm, u8aToU8a } from '@polkadot/util';
import { Abi } from '../Abi'; import { Abi } from '../Abi';
import { applyOnEvent } from '../util'; import { applyOnEvent } from '../util';
@@ -48,7 +48,9 @@ export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
? this.abi.info.source.wasm ? this.abi.info.source.wasm
: u8aToU8a(wasm); : u8aToU8a(wasm);
assert(isWasm(this.code), 'No WASM code provided'); if (!isWasm(this.code)) {
throw new Error('No WASM code provided');
}
this.abi.constructors.forEach((c): void => { this.abi.constructors.forEach((c): void => {
if (isUndefined(this.#tx[c.method])) { if (isUndefined(this.#tx[c.method])) {
+7 -3
View File
@@ -13,7 +13,7 @@ import { map } from 'rxjs';
import { SubmittableResult } from '@polkadot/api'; import { SubmittableResult } from '@polkadot/api';
import { ApiBase } from '@polkadot/api/base'; import { ApiBase } from '@polkadot/api/base';
import { assert, BN, BN_HUNDRED, BN_ONE, BN_ZERO, bnToBn, isFunction, isUndefined, logger } from '@polkadot/util'; import { BN, BN_HUNDRED, BN_ONE, BN_ZERO, bnToBn, isFunction, isUndefined, logger } from '@polkadot/util';
import { Abi } from '../Abi'; import { Abi } from '../Abi';
import { applyOnEvent, extractOptions, isOptions } from '../util'; import { applyOnEvent, extractOptions, isOptions } from '../util';
@@ -87,7 +87,9 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
} }
public get query (): MapMessageQuery<ApiType> { public get query (): MapMessageQuery<ApiType> {
assert(this.hasRpcContractsCall, ERROR_NO_CALL); if (!this.hasRpcContractsCall) {
throw new Error(ERROR_NO_CALL);
}
return this.#query; return this.#query;
} }
@@ -138,7 +140,9 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
}; };
#read = (messageOrId: AbiMessage | string | number, { gasLimit = BN_ZERO, storageDepositLimit = null, value = BN_ZERO }: ContractOptions, params: unknown[]): ContractCallSend<ApiType> => { #read = (messageOrId: AbiMessage | string | number, { gasLimit = BN_ZERO, storageDepositLimit = null, value = BN_ZERO }: ContractOptions, params: unknown[]): ContractCallSend<ApiType> => {
assert(this.hasRpcContractsCall, ERROR_NO_CALL); if (!this.hasRpcContractsCall) {
throw new Error(ERROR_NO_CALL);
}
const message = this.abi.findMessage(messageOrId); const message = this.abi.findMessage(messageOrId);
@@ -9,7 +9,7 @@ import { ApiPromise } from '@polkadot/api';
import { BlueprintPromise, ContractPromise } from '@polkadot/api-contract'; import { BlueprintPromise, ContractPromise } from '@polkadot/api-contract';
import { createTestPairs, TestKeyringMap } from '@polkadot/keyring/testingPairs'; import { createTestPairs, TestKeyringMap } from '@polkadot/keyring/testingPairs';
import abiIncrementer from './test/contracts/ink/v0/incrementer.json'; import abiIncrementer from './test/contracts/ink/v0/incrementer.json' assert { type: 'json' };
async function checkBlueprint (api: ApiPromise, pairs: TestKeyringMap): Promise<void> { async function checkBlueprint (api: ApiPromise, pairs: TestKeyringMap): Promise<void> {
const blueprint = new BlueprintPromise(api, abiIncrementer as Record<string, unknown>, '0x1234'); const blueprint = new BlueprintPromise(api, abiIncrementer as Record<string, unknown>, '0x1234');
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '8.12.1' }; export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '8.13.1' };
@@ -1,11 +1,11 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors // Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
export { default as delegator } from './delegator.json'; export { default as delegator } from './delegator.json' assert { type: 'json' };
export { default as dns } from './dns.json'; export { default as dns } from './dns.json' assert { type: 'json' };
export { default as erc20 } from './erc20.json'; export { default as erc20 } from './erc20.json' assert { type: 'json' };
export { default as erc721 } from './erc721.json'; export { default as erc721 } from './erc721.json' assert { type: 'json' };
export { default as flipper } from './flipper.json'; export { default as flipper } from './flipper.json' assert { type: 'json' };
export { default as flipperBundle } from './flipper.contract.json'; export { default as flipperBundle } from './flipper.contract.json' assert { type: 'json' };
export { default as incrementer } from './incrementer.json'; export { default as incrementer } from './incrementer.json' assert { type: 'json' };
export { default as multisigPlain } from './multisig_plain.json'; export { default as multisigPlain } from './multisig_plain.json' assert { type: 'json' };
@@ -1,6 +1,6 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors // Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
export { default as flipper } from './flipper.contract.json'; export { default as flipper } from './flipper.contract.json' assert { type: 'json' };
// A complex contract example with traits. // A complex contract example with traits.
export { default as psp22 } from './psp22_minter_pauser.contract.json'; export { default as psp22 } from './psp22_minter_pauser.contract.json' assert { type: 'json' };
@@ -1,5 +1,5 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors // Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
export { default as erc20 } from './erc20.contract.json'; export { default as erc20 } from './erc20.contract.json' assert { type: 'json' };
export { default as flipper } from './flipper.contract.json'; export { default as flipper } from './flipper.contract.json' assert { type: 'json' };
@@ -1,6 +1,6 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors // Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
export { default as flipper } from './flipper.contract.json'; export { default as flipper } from './flipper.contract.json' assert { type: 'json' };
// A complex contract example with traits. // A complex contract example with traits.
export { default as traitErc20 } from './trait_erc20.contract.json'; export { default as traitErc20 } from './trait_erc20.contract.json' assert { type: 'json' };
@@ -1,4 +1,4 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors // Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
export { default as ints256 } from './ints256.json'; export { default as ints256 } from './ints256.json' assert { type: 'json' };
@@ -1,7 +1,7 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors // Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
export { default as assetTransfer } from './assetTransfer.json'; export { default as assetTransfer } from './assetTransfer.json' assert { type: 'json' };
export { default as enumExample } from './enumExample.json'; export { default as enumExample } from './enumExample.json' assert { type: 'json' };
export { default as recursive } from './recursive.contract.json'; export { default as recursive } from './recursive.contract.json' assert { type: 'json' };
export { default as withString } from './withString.json'; export { default as withString } from './withString.json' assert { type: 'json' };
+15 -15
View File
@@ -20,25 +20,25 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "8.12.1", "version": "8.13.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.6", "@babel/runtime": "^7.18.6",
"@polkadot/api": "8.12.1", "@polkadot/api": "8.13.1",
"@polkadot/api-augment": "8.12.1", "@polkadot/api-augment": "8.13.1",
"@polkadot/api-base": "8.12.1", "@polkadot/api-base": "8.13.1",
"@polkadot/rpc-core": "8.12.1", "@polkadot/rpc-core": "8.13.1",
"@polkadot/types": "8.12.1", "@polkadot/types": "8.13.1",
"@polkadot/types-codec": "8.12.1", "@polkadot/types-codec": "8.13.1",
"@polkadot/util": "^10.0.1", "@polkadot/util": "^10.0.2",
"@polkadot/util-crypto": "^10.0.1", "@polkadot/util-crypto": "^10.0.2",
"rxjs": "^7.5.5" "rxjs": "^7.5.6"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/api": "8.12.1", "@polkadot/api": "8.13.1",
"@polkadot/api-augment": "8.12.1", "@polkadot/api-augment": "8.13.1",
"@polkadot/rpc-augment": "8.12.1", "@polkadot/rpc-augment": "8.13.1",
"@polkadot/rpc-provider": "8.12.1", "@polkadot/rpc-provider": "8.13.1",
"@polkadot/types-support": "8.12.1" "@polkadot/types-support": "8.13.1"
} }
} }
+3 -3
View File
@@ -3,7 +3,7 @@
import type { DeriveApi } from '../types'; import type { DeriveApi } from '../types';
import { unwrapBlockNumber } from './util'; import { createBlockNumberDerive } from './util';
/** /**
* @name bestNumber * @name bestNumber
@@ -17,7 +17,7 @@ import { unwrapBlockNumber } from './util';
* }); * });
* ``` * ```
*/ */
export const bestNumber = unwrapBlockNumber( export const bestNumber = createBlockNumberDerive(
(api: DeriveApi) => (api: DeriveApi) =>
api.derive.chain.subscribeNewHeads() api.rpc.chain.subscribeNewHeads()
); );
@@ -3,7 +3,7 @@
import type { DeriveApi } from '../types'; import type { DeriveApi } from '../types';
import { unwrapBlockNumber } from './util'; import { createBlockNumberDerive } from './util';
/** /**
* @name bestNumberFinalized * @name bestNumberFinalized
@@ -18,7 +18,7 @@ import { unwrapBlockNumber } from './util';
* }); * });
* ``` * ```
*/ */
export const bestNumberFinalized = unwrapBlockNumber( export const bestNumberFinalized = createBlockNumberDerive(
(api: DeriveApi) => (api: DeriveApi) =>
api.rpc.chain.subscribeFinalizedHeads() api.rpc.chain.subscribeFinalizedHeads()
); );
+15 -21
View File
@@ -5,10 +5,11 @@ import type { Observable } from 'rxjs';
import type { SignedBlockExtended } from '../type/types'; import type { SignedBlockExtended } from '../type/types';
import type { DeriveApi } from '../types'; import type { DeriveApi } from '../types';
import { catchError, combineLatest, map, of, switchMap } from 'rxjs'; import { combineLatest, map, of, switchMap } from 'rxjs';
import { createSignedBlockExtended } from '../type'; import { createSignedBlockExtended } from '../type';
import { memo } from '../util'; import { memo } from '../util';
import { getAuthorDetails } from './util';
/** /**
* @name getBlock * @name getBlock
@@ -23,29 +24,22 @@ import { memo } from '../util';
* console.log(`block #${block.header.number} was authored by ${author}`); * console.log(`block #${block.header.number} was authored by ${author}`);
* ``` * ```
*/ */
export function getBlock (instanceId: string, api: DeriveApi): (hash: Uint8Array | string) => Observable<SignedBlockExtended | undefined> { export function getBlock (instanceId: string, api: DeriveApi): (hash: Uint8Array | string) => Observable<SignedBlockExtended> {
return memo(instanceId, (blockHash: Uint8Array | string): Observable<SignedBlockExtended | undefined> => return memo(instanceId, (blockHash: Uint8Array | string): Observable<SignedBlockExtended> =>
combineLatest([ combineLatest([
api.rpc.chain.getBlock(blockHash), api.rpc.chain.getBlock(blockHash),
api.queryAt(blockHash).pipe( api.queryAt(blockHash)
switchMap((queryAt) =>
combineLatest([
queryAt.system.events(),
queryAt.session
? queryAt.session.validators()
: of([])
])
)
)
]).pipe( ]).pipe(
map(([signedBlock, [events, validators]]) => switchMap(([signedBlock, queryAt]) =>
createSignedBlockExtended(api.registry, signedBlock, events, validators) combineLatest([
of(signedBlock),
queryAt.system.events(),
getAuthorDetails(signedBlock.block.header, queryAt)
])
), ),
catchError((): Observable<undefined> => map(([signedBlock, events, [, validators, author]]) =>
// where rpc.chain.getHeader throws, we will land here - it can happen that createSignedBlockExtended(events.registry, signedBlock, events, validators, author)
// we supplied an invalid hash. (Due to defaults, storage will have an
// empty value, so only the RPC is affected). So return undefined
of()
) )
)); )
);
} }
@@ -10,8 +10,8 @@ import { switchMap } from 'rxjs';
import { memo } from '../util'; import { memo } from '../util';
export function getBlockByNumber (instanceId: string, api: DeriveApi): (blockNumber: AnyNumber) => Observable<SignedBlockExtended | undefined> { export function getBlockByNumber (instanceId: string, api: DeriveApi): (blockNumber: AnyNumber) => Observable<SignedBlockExtended> {
return memo(instanceId, (blockNumber: AnyNumber): Observable<SignedBlockExtended | undefined> => return memo(instanceId, (blockNumber: AnyNumber): Observable<SignedBlockExtended> =>
api.rpc.chain.getBlockHash(blockNumber).pipe( api.rpc.chain.getBlockHash(blockNumber).pipe(
switchMap((h) => api.derive.chain.getBlock(h)) switchMap((h) => api.derive.chain.getBlock(h))
) )
+11 -19
View File
@@ -2,14 +2,14 @@
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs'; import type { Observable } from 'rxjs';
import type { AccountId } from '@polkadot/types/interfaces';
import type { HeaderExtended } from '../type/types'; import type { HeaderExtended } from '../type/types';
import type { DeriveApi } from '../types'; import type { DeriveApi } from '../types';
import { catchError, combineLatest, map, of, switchMap } from 'rxjs'; import { combineLatest, map, switchMap } from 'rxjs';
import { createHeaderExtended } from '../type'; import { createHeaderExtended } from '../type';
import { memo } from '../util'; import { memo } from '../util';
import { getAuthorDetails } from './util';
/** /**
* @name getHeader * @name getHeader
@@ -25,26 +25,18 @@ import { memo } from '../util';
* console.log(`block #${number} was authored by ${author}`); * console.log(`block #${number} was authored by ${author}`);
* ``` * ```
*/ */
export function getHeader (instanceId: string, api: DeriveApi): (blockHash: Uint8Array | string) => Observable<HeaderExtended | undefined> { export function getHeader (instanceId: string, api: DeriveApi): (blockHash: Uint8Array | string) => Observable<HeaderExtended> {
return memo(instanceId, (blockHash: Uint8Array | string): Observable<HeaderExtended | undefined> => return memo(instanceId, (blockHash: Uint8Array | string): Observable<HeaderExtended> =>
combineLatest([ combineLatest([
api.rpc.chain.getHeader(blockHash), api.rpc.chain.getHeader(blockHash),
api.queryAt(blockHash).pipe( api.queryAt(blockHash)
switchMap((queryAt) =>
queryAt.session
? queryAt.session.validators()
: of([] as AccountId[])
)
)
]).pipe( ]).pipe(
map(([header, validators]) => switchMap(([header, queryAt]) =>
createHeaderExtended(header.registry, header, validators) getAuthorDetails(header, queryAt)
), ),
catchError((): Observable<undefined> => map(([header, validators, author]) =>
// where rpc.chain.getHeader throws, we will land here - it can happen that createHeaderExtended((validators || header).registry, header, validators, author)
// we supplied an invalid hash. (Due to defaults, storeage will have an
// empty value, so only the RPC is affected). So return undefined
of()
) )
)); )
);
} }
+1
View File
@@ -7,5 +7,6 @@ export * from './bestNumberLag';
export * from './getHeader'; export * from './getHeader';
export * from './getBlock'; export * from './getBlock';
export * from './getBlockByNumber'; export * from './getBlockByNumber';
export * from './subscribeFinalizedHeads';
export * from './subscribeNewBlocks'; export * from './subscribeNewBlocks';
export * from './subscribeNewHeads'; export * from './subscribeNewHeads';
@@ -0,0 +1,24 @@
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { SignedBlockExtended } from '../type/types';
import type { DeriveApi } from '../types';
import { switchMap } from 'rxjs';
import { memo } from '../util';
/**
* @name subscribeFinalizedBlocks
* @returns The finalized block & events for that block
*/
export function subscribeFinalizedBlocks (instanceId: string, api: DeriveApi): () => Observable<SignedBlockExtended> {
return memo(instanceId, (): Observable<SignedBlockExtended> =>
api.derive.chain.subscribeFinalizedHeads().pipe(
switchMap((header) =>
api.derive.chain.getBlock(header.createdAtHash || header.hash)
)
)
);
}
@@ -0,0 +1,56 @@
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { Hash, Header } from '@polkadot/types/interfaces';
import type { DeriveApi } from '../types';
import { from, of, switchMap } from 'rxjs';
import { memo } from '../util';
/**
* Returns a header range from startHash to to (not including) endHash, i.e. lastBlock.parentHash === endHash
*/
export function _getHeaderRange (instanceId: string, api: DeriveApi): (startHash: Hash, endHash: Hash, prev?: Header[]) => Observable<Header[]> {
return memo(instanceId, (startHash: Hash, endHash: Hash, prev: Header[] = []): Observable<Header[]> =>
api.rpc.chain.getHeader(startHash).pipe(
switchMap((header) =>
header.parentHash.eq(endHash)
? of([header, ...prev])
: api.derive.chain._getHeaderRange(header.parentHash, endHash, [header, ...prev])
)
)
);
}
/**
* @name subscribeFinalizedHeads
* @description An observable of the finalized block headers. Unlike the base
* chain.subscribeFinalizedHeads this does not skip any headers. Since finalization
* may skip specific blocks (finalization happens in terms of chains), this version
* of the derive tracks missing headers (since last retrieved) and provides them
* to the caller
*/
export function subscribeFinalizedHeads (instanceId: string, api: DeriveApi): () => Observable<Header> {
return memo(instanceId, (): Observable<Header> => {
let prevHash: Hash | null = null;
return api.rpc.chain.subscribeFinalizedHeads().pipe(
switchMap((header) => {
const endHash = prevHash;
const startHash = header.parentHash;
prevHash = header.createdAtHash = header.hash;
return endHash === null || startHash.eq(endHash)
? of(header)
: api.derive.chain._getHeaderRange(startHash, endHash, [header]).pipe(
switchMap((headers) =>
from(headers)
)
);
})
);
});
}
@@ -5,9 +5,8 @@ import type { Observable } from 'rxjs';
import type { SignedBlockExtended } from '../type/types'; import type { SignedBlockExtended } from '../type/types';
import type { DeriveApi } from '../types'; import type { DeriveApi } from '../types';
import { combineLatest, map, of, switchMap } from 'rxjs'; import { switchMap } from 'rxjs';
import { createSignedBlockExtended } from '../type';
import { memo } from '../util'; import { memo } from '../util';
/** /**
@@ -17,22 +16,8 @@ import { memo } from '../util';
export function subscribeNewBlocks (instanceId: string, api: DeriveApi): () => Observable<SignedBlockExtended> { export function subscribeNewBlocks (instanceId: string, api: DeriveApi): () => Observable<SignedBlockExtended> {
return memo(instanceId, (): Observable<SignedBlockExtended> => return memo(instanceId, (): Observable<SignedBlockExtended> =>
api.derive.chain.subscribeNewHeads().pipe( api.derive.chain.subscribeNewHeads().pipe(
switchMap((header) => { switchMap((header) =>
const blockHash = header.createdAtHash || header.hash; api.derive.chain.getBlock(header.createdAtHash || header.hash)
// we get the block first, setting up the registry
return combineLatest([
of(header),
api.rpc.chain.getBlock(blockHash),
api.queryAt(blockHash).pipe(
switchMap((queryAt) =>
queryAt.system.events()
)
)
]);
}),
map(([header, block, events]) =>
createSignedBlockExtended(block.registry, block, events, header.validators)
) )
) )
); );
@@ -5,10 +5,11 @@ import type { Observable } from 'rxjs';
import type { HeaderExtended } from '../type/types'; import type { HeaderExtended } from '../type/types';
import type { DeriveApi } from '../types'; import type { DeriveApi } from '../types';
import { combineLatest, map, of } from 'rxjs'; import { combineLatest, map, of, switchMap } from 'rxjs';
import { createHeaderExtended } from '../type'; import { createHeaderExtended } from '../type';
import { memo } from '../util'; import { memo } from '../util';
import { getAuthorDetails } from './util';
/** /**
* @name subscribeNewHeads * @name subscribeNewHeads
@@ -25,16 +26,20 @@ import { memo } from '../util';
*/ */
export function subscribeNewHeads (instanceId: string, api: DeriveApi): () => Observable<HeaderExtended> { export function subscribeNewHeads (instanceId: string, api: DeriveApi): () => Observable<HeaderExtended> {
return memo(instanceId, (): Observable<HeaderExtended> => return memo(instanceId, (): Observable<HeaderExtended> =>
combineLatest([ api.rpc.chain.subscribeNewHeads().pipe(
api.rpc.chain.subscribeNewHeads(), switchMap((header) =>
api.query.session combineLatest([
? api.query.session.validators() of(header),
: of(undefined) api.queryAt(header.hash)
]).pipe( ])
map(([header, validators]): HeaderExtended => { ),
switchMap(([header, queryAt]) =>
getAuthorDetails(header, queryAt)
),
map(([header, validators, author]): HeaderExtended => {
header.createdAtHash = header.hash; header.createdAtHash = header.hash;
return createHeaderExtended(header.registry, header, validators); return createHeaderExtended(header.registry, header, validators, author);
}) })
) )
); );
+45 -8
View File
@@ -2,21 +2,58 @@
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs'; import type { Observable } from 'rxjs';
import type { Compact } from '@polkadot/types'; import type { QueryableStorage } from '@polkadot/api-base/types';
import type { BlockNumber } from '@polkadot/types/interfaces'; import type { Compact, Vec } from '@polkadot/types';
import type { AccountId, BlockNumber, Header } from '@polkadot/types/interfaces';
import type { Codec, IOption } from '@polkadot/types/types';
import type { DeriveApi } from '../types'; import type { DeriveApi } from '../types';
import { map } from 'rxjs'; import { combineLatest, map, of } from 'rxjs';
import { memo } from '../util'; import { memo, unwrapBlockNumber } from '../util';
// re-export these - since these needs to be resolvable from api-derive, i.e. without this // re-export these - since these needs to be resolvable from api-derive, i.e. without this
// we would emit code with ../<somewhere>/src embedded in the *.d.ts files // we would emit code with ../<somewhere>/src embedded in the *.d.ts files
export type { BlockNumber } from '@polkadot/types/interfaces'; export type { BlockNumber } from '@polkadot/types/interfaces';
export function unwrapBlockNumber <T extends { number: Compact<BlockNumber> }> (fn: (api: DeriveApi) => Observable<T>): (instanceId: string, api: DeriveApi) => () => Observable<BlockNumber> { export function createBlockNumberDerive <T extends { number: Compact<BlockNumber> | BlockNumber }> (fn: (api: DeriveApi) => Observable<T>): (instanceId: string, api: DeriveApi) => () => Observable<BlockNumber> {
return (instanceId: string, api: DeriveApi) => return (instanceId: string, api: DeriveApi) =>
memo(instanceId, () => fn(api).pipe( memo(instanceId, () =>
map((r) => r.number.unwrap()) fn(api).pipe(
)); map(unwrapBlockNumber)
)
);
}
export function getAuthorDetails (header: Header, queryAt: QueryableStorage<'rxjs'>): Observable<[Header, Vec<AccountId> | null, AccountId | null]> {
// this is Moonbeam specific
if (queryAt.authorMapping && queryAt.authorMapping.mappingWithDeposit) {
const mapId = header.digest.logs[0] && (
(header.digest.logs[0].isConsensus && header.digest.logs[0].asConsensus[1]) ||
(header.digest.logs[0].isPreRuntime && header.digest.logs[0].asPreRuntime[1])
);
if (mapId) {
return combineLatest([
of(header),
queryAt.session
? queryAt.session.validators()
: of(null),
queryAt.authorMapping.mappingWithDeposit<IOption<{ account: AccountId } & Codec>>(mapId).pipe(
map((opt) =>
opt.unwrapOr({ account: null }).account
)
)
]);
}
}
// normal operation, non-mapping
return combineLatest([
of(header),
queryAt.session
? queryAt.session.validators()
: of(null),
of(null)
]);
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '8.12.1' }; export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '8.13.1' };
+2 -1
View File
@@ -10,6 +10,7 @@ import { combineLatest, map, of, switchMap } from 'rxjs';
import { isNumber, isUndefined } from '@polkadot/util'; import { isNumber, isUndefined } from '@polkadot/util';
import { unwrapBlockNumber } from '../util';
import { FALLBACK_MAX_HASH_COUNT, FALLBACK_PERIOD, MAX_FINALITY_LAG, MORTAL_PERIOD } from './constants'; import { FALLBACK_MAX_HASH_COUNT, FALLBACK_PERIOD, MAX_FINALITY_LAG, MORTAL_PERIOD } from './constants';
interface Result { interface Result {
@@ -51,7 +52,7 @@ function signingHeader (api: DeriveApi): Observable<Header> {
]).pipe( ]).pipe(
map(([current, finalized]) => map(([current, finalized]) =>
// determine the hash to use, current when lag > max, else finalized // determine the hash to use, current when lag > max, else finalized
current.number.unwrap().sub(finalized.number.unwrap()).gt(MAX_FINALITY_LAG) unwrapBlockNumber(current).sub(unwrapBlockNumber(finalized)).gt(MAX_FINALITY_LAG)
? current ? current
: finalized : finalized
) )
+4 -13
View File
@@ -7,19 +7,17 @@ import type { HeaderExtended } from './types';
import { extractAuthor } from './util'; import { extractAuthor } from './util';
export function createHeaderExtended (registry: Registry, header?: Header, validators?: AccountId[]): HeaderExtended { export function createHeaderExtended (registry: Registry, header?: Header, validators?: AccountId[] | null, author?: AccountId | null): HeaderExtended {
// an instance of the base extrinsic for us to extend // an instance of the base extrinsic for us to extend
const HeaderBase = registry.createClass('Header'); const HeaderBase = registry.createClass('Header');
class Implementation extends HeaderBase implements HeaderExtended { class Implementation extends HeaderBase implements HeaderExtended {
readonly #author?: AccountId; readonly #author?: AccountId;
readonly #validators?: AccountId[];
constructor (registry: Registry, header?: Header, validators?: AccountId[]) { constructor (registry: Registry, header?: Header, validators?: AccountId[] | null, author?: AccountId | null) {
super(registry, header); super(registry, header);
this.#author = extractAuthor(this.digest, validators); this.#author = author || extractAuthor(this.digest, validators || []);
this.#validators = validators;
this.createdAtHash = header?.createdAtHash; this.createdAtHash = header?.createdAtHash;
} }
@@ -29,14 +27,7 @@ export function createHeaderExtended (registry: Registry, header?: Header, valid
public get author (): AccountId | undefined { public get author (): AccountId | undefined {
return this.#author; return this.#author;
} }
/**
* @description Convenience method, returns the validators for the block
*/
public get validators (): AccountId[] | undefined {
return this.#validators;
}
} }
return new Implementation(registry, header, validators); return new Implementation(registry, header, validators, author);
} }
@@ -31,7 +31,7 @@ function mapExtrinsics (extrinsics: Extrinsic[], records: EventRecord[]): TxWith
}); });
} }
export function createSignedBlockExtended (registry: Registry, block?: SignedBlock, events?: EventRecord[], validators?: AccountId[]): SignedBlockExtended { export function createSignedBlockExtended (registry: Registry, block?: SignedBlock, events?: EventRecord[], validators?: AccountId[] | null, author?: AccountId | null): SignedBlockExtended {
// an instance of the base extrinsic for us to extend // an instance of the base extrinsic for us to extend
const SignedBlockBase = registry.createClass('SignedBlock'); const SignedBlockBase = registry.createClass('SignedBlock');
@@ -40,10 +40,10 @@ export function createSignedBlockExtended (registry: Registry, block?: SignedBlo
readonly #events: EventRecord[]; readonly #events: EventRecord[];
readonly #extrinsics: TxWithEvent[]; readonly #extrinsics: TxWithEvent[];
constructor (registry: Registry, block?: SignedBlock, events?: EventRecord[], validators?: AccountId[]) { constructor (registry: Registry, block?: SignedBlock, events?: EventRecord[], validators?: AccountId[] | null, author?: AccountId | null) {
super(registry, block); super(registry, block);
this.#author = extractAuthor(this.block.header.digest, validators); this.#author = author || extractAuthor(this.block.header.digest, validators || []);
this.#events = events || ([] as EventRecord[]); this.#events = events || ([] as EventRecord[]);
this.#extrinsics = mapExtrinsics(this.block.extrinsics, this.#events); this.#extrinsics = mapExtrinsics(this.block.extrinsics, this.#events);
this.createdAtHash = block?.createdAtHash; this.createdAtHash = block?.createdAtHash;
@@ -71,5 +71,5 @@ export function createSignedBlockExtended (registry: Registry, block?: SignedBlo
} }
} }
return new Implementation(registry, block, events, validators); return new Implementation(registry, block, events, validators, author);
} }
-1
View File
@@ -5,7 +5,6 @@ import type { AccountId, DispatchError, DispatchInfo, Event, EventRecord, Extrin
export interface HeaderExtended extends Header { export interface HeaderExtended extends Header {
readonly author: AccountId | undefined; readonly author: AccountId | undefined;
readonly validators: AccountId[] | undefined;
} }
export interface SignedBlockExtended extends SignedBlock { export interface SignedBlockExtended extends SignedBlock {
@@ -0,0 +1,15 @@
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Compact } from '@polkadot/types';
import type { BlockNumber } from '@polkadot/types/interfaces';
import { isCompact } from '@polkadot/util';
type CompatHeader = { number: Compact<BlockNumber> | BlockNumber };
export function unwrapBlockNumber (hdr: CompatHeader): BlockNumber {
return isCompact<BlockNumber>(hdr.number)
? hdr.number.unwrap()
: hdr.number;
}
+1
View File
@@ -4,6 +4,7 @@
export { drr, memo } from '@polkadot/rpc-core'; export { drr, memo } from '@polkadot/rpc-core';
export * from './approvalFlagsToBools'; export * from './approvalFlagsToBools';
export * from './blockNumber';
export * from './cache'; export * from './cache';
export * from './cacheImpl'; export * from './cacheImpl';
export * from './first'; export * from './first';
+18 -18
View File
@@ -20,29 +20,29 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "8.12.1", "version": "8.13.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.6", "@babel/runtime": "^7.18.6",
"@polkadot/api-augment": "8.12.1", "@polkadot/api-augment": "8.13.1",
"@polkadot/api-base": "8.12.1", "@polkadot/api-base": "8.13.1",
"@polkadot/api-derive": "8.12.1", "@polkadot/api-derive": "8.13.1",
"@polkadot/keyring": "^10.0.1", "@polkadot/keyring": "^10.0.2",
"@polkadot/rpc-augment": "8.12.1", "@polkadot/rpc-augment": "8.13.1",
"@polkadot/rpc-core": "8.12.1", "@polkadot/rpc-core": "8.13.1",
"@polkadot/rpc-provider": "8.12.1", "@polkadot/rpc-provider": "8.13.1",
"@polkadot/types": "8.12.1", "@polkadot/types": "8.13.1",
"@polkadot/types-augment": "8.12.1", "@polkadot/types-augment": "8.13.1",
"@polkadot/types-codec": "8.12.1", "@polkadot/types-codec": "8.13.1",
"@polkadot/types-create": "8.12.1", "@polkadot/types-create": "8.13.1",
"@polkadot/types-known": "8.12.1", "@polkadot/types-known": "8.13.1",
"@polkadot/util": "^10.0.1", "@polkadot/util": "^10.0.2",
"@polkadot/util-crypto": "^10.0.1", "@polkadot/util-crypto": "^10.0.2",
"eventemitter3": "^4.0.7", "eventemitter3": "^4.0.7",
"rxjs": "^7.5.5" "rxjs": "^7.5.6"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/api-augment": "8.12.1", "@polkadot/api-augment": "8.13.1",
"@polkadot/types-support": "8.12.1" "@polkadot/types-support": "8.13.1"
} }
} }
+7 -3
View File
@@ -21,7 +21,7 @@ import { memo, RpcCore } from '@polkadot/rpc-core';
import { WsProvider } from '@polkadot/rpc-provider'; import { WsProvider } from '@polkadot/rpc-provider';
import { expandMetadata, Metadata, typeDefinitions, TypeRegistry, unwrapStorageType } from '@polkadot/types'; import { expandMetadata, Metadata, typeDefinitions, TypeRegistry, unwrapStorageType } from '@polkadot/types';
import { getSpecRuntime } from '@polkadot/types-known'; import { getSpecRuntime } from '@polkadot/types-known';
import { arrayChunk, arrayFlatten, assert, assertReturn, BN, compactStripLength, lazyMethod, lazyMethods, logger, nextTick, objectSpread, stringCamelCase, stringUpperFirst, u8aConcatStrict, u8aToHex } from '@polkadot/util'; import { arrayChunk, arrayFlatten, assertReturn, BN, compactStripLength, lazyMethod, lazyMethods, logger, nextTick, objectSpread, stringCamelCase, stringUpperFirst, u8aConcatStrict, u8aToHex } from '@polkadot/util';
import { blake2AsHex } from '@polkadot/util-crypto'; import { blake2AsHex } from '@polkadot/util-crypto';
import { createSubmittable } from '../submittable'; import { createSubmittable } from '../submittable';
@@ -918,7 +918,9 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
} }
private _retrieveMapKeys ({ iterKey, meta, method, section }: StorageEntry, at: Hash | Uint8Array | string | null, args: unknown[]): Observable<StorageKey[]> { private _retrieveMapKeys ({ iterKey, meta, method, section }: StorageEntry, at: Hash | Uint8Array | string | null, args: unknown[]): Observable<StorageKey[]> {
assert(iterKey && meta.type.isMap, 'keys can only be retrieved on maps'); if (!iterKey || !meta.type.isMap) {
throw new Error('keys can only be retrieved on maps');
}
const headKey = iterKey(...args).toHex(); const headKey = iterKey(...args).toHex();
const startSubject = new BehaviorSubject<string>(headKey); const startSubject = new BehaviorSubject<string>(headKey);
@@ -945,7 +947,9 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
} }
private _retrieveMapKeysPaged ({ iterKey, meta, method, section }: StorageEntry, at: Hash | Uint8Array | string | undefined, opts: PaginationOptions): Observable<StorageKey[]> { private _retrieveMapKeysPaged ({ iterKey, meta, method, section }: StorageEntry, at: Hash | Uint8Array | string | undefined, opts: PaginationOptions): Observable<StorageKey[]> {
assert(iterKey && meta.type.isMap, 'keys can only be retrieved on maps'); if (!iterKey || !meta.type.isMap) {
throw new Error('keys can only be retrieved on maps');
}
const setMeta = (key: StorageKey) => key.setMeta(meta, section, method); const setMeta = (key: StorageKey) => key.setMeta(meta, section, method);
const query = at const query = at
+9 -7
View File
@@ -15,7 +15,7 @@ import { firstValueFrom, map, of, switchMap } from 'rxjs';
import { Metadata, TypeRegistry } from '@polkadot/types'; import { Metadata, TypeRegistry } from '@polkadot/types';
import { getSpecAlias, getSpecExtensions, getSpecHasher, getSpecRpc, getSpecTypes, getUpgradeVersion } from '@polkadot/types-known'; import { getSpecAlias, getSpecExtensions, getSpecHasher, getSpecRpc, getSpecTypes, getUpgradeVersion } from '@polkadot/types-known';
import { assert, assertReturn, BN_ZERO, isUndefined, logger, objectSpread, u8aEq, u8aToHex, u8aToU8a } from '@polkadot/util'; import { assertReturn, BN_ZERO, isUndefined, logger, objectSpread, u8aEq, u8aToHex, u8aToU8a } from '@polkadot/util';
import { cryptoWaitReady } from '@polkadot/util-crypto'; import { cryptoWaitReady } from '@polkadot/util-crypto';
import { Decorate } from './Decorate'; import { Decorate } from './Decorate';
@@ -29,8 +29,7 @@ function textToString (t: Text): string {
} }
export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> { export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
// Browser/Deno = number, Node = Timeout #healthTimer: ReturnType<typeof setInterval> | null = null;
#healthTimer: unknown | null = null;
#registries: VersionedRegistry<ApiType>[] = []; #registries: VersionedRegistry<ApiType>[] = [];
@@ -180,7 +179,9 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
private async _getBlockRegistryViaHash (blockHash: Uint8Array): Promise<VersionedRegistry<ApiType>> { private async _getBlockRegistryViaHash (blockHash: Uint8Array): Promise<VersionedRegistry<ApiType>> {
// ensure we have everything required // ensure we have everything required
assert(this._genesisHash && this._runtimeVersion, 'Cannot retrieve data on an uninitialized chain'); if (!this._genesisHash || !this._runtimeVersion) {
throw new Error('Cannot retrieve data on an uninitialized chain');
}
// We have to assume that on the RPC layer the calls used here does not call back into // We have to assume that on the RPC layer the calls used here does not call back into
// the registry swap, so getHeader & getRuntimeVersion should not be historic // the registry swap, so getHeader & getRuntimeVersion should not be historic
@@ -190,7 +191,9 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
: await firstValueFrom(this._rpcCore.chain.getHeader.raw(blockHash)) : await firstValueFrom(this._rpcCore.chain.getHeader.raw(blockHash))
); );
assert(!header.parentHash.isEmpty, 'Unable to retrieve header and parent from supplied hash'); if (header.parentHash.isEmpty) {
throw new Error('Unable to retrieve header and parent from supplied hash');
}
// get the runtime version, either on-chain or via an known upgrade history // get the runtime version, either on-chain or via an known upgrade history
const [firstVersion, lastVersion] = getUpgradeVersion(this._genesisHash, header.number); const [firstVersion, lastVersion] = getUpgradeVersion(this._genesisHash, header.number);
@@ -370,8 +373,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
private _unsubscribeHealth (): void { private _unsubscribeHealth (): void {
if (this.#healthTimer) { if (this.#healthTimer) {
// different method signatures for Node vs Browser/Deno clearInterval(this.#healthTimer);
clearInterval(this.#healthTimer as number);
this.#healthTimer = null; this.#healthTimer = null;
} }
} }
+4 -2
View File
@@ -4,7 +4,7 @@
import type { SignerPayloadRawBase } from '@polkadot/types/types'; import type { SignerPayloadRawBase } from '@polkadot/types/types';
import type { ApiOptions, ApiTypes, DecorateMethod, Signer } from '../types'; import type { ApiOptions, ApiTypes, DecorateMethod, Signer } from '../types';
import { assert, isString, objectSpread, u8aToHex, u8aToU8a } from '@polkadot/util'; import { isString, objectSpread, u8aToHex, u8aToU8a } from '@polkadot/util';
import { Getters } from './Getters'; import { Getters } from './Getters';
@@ -69,7 +69,9 @@ export abstract class ApiBase<ApiType extends ApiTypes> extends Getters<ApiType>
if (isString(address)) { if (isString(address)) {
const _signer = signer || this._rx.signer; const _signer = signer || this._rx.signer;
assert(_signer?.signRaw, 'No signer exists with a signRaw interface. You possibly need to pass through an explicit keypair for the origin so it can be used for signing.'); if (!_signer || !_signer.signRaw) {
throw new Error('No signer exists with a signRaw interface. You possibly need to pass through an explicit keypair for the origin so it can be used for signing.');
}
return ( return (
await _signer.signRaw( await _signer.signRaw(
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '8.12.1' }; export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '8.13.1' };
+4 -2
View File
@@ -7,7 +7,7 @@ import type { DecorateFn, DecorateMethodOptions, ObsInnerType, StorageEntryPromi
import { catchError, EMPTY, Subscription, tap } from 'rxjs'; import { catchError, EMPTY, Subscription, tap } from 'rxjs';
import { assert, isFunction, nextTick } from '@polkadot/util'; import { isFunction, nextTick } from '@polkadot/util';
interface Tracker<T> { interface Tracker<T> {
reject: (value: Error) => Observable<never>; reject: (value: Error) => Observable<never>;
@@ -57,7 +57,9 @@ function extractArgs (args: unknown[], needsCallback: boolean): [unknown[], Call
: undefined; : undefined;
// When we need a subscription, ensure that a valid callback is actually passed // When we need a subscription, ensure that a valid callback is actually passed
assert(!needsCallback || isFunction(callback), 'Expected a callback to be passed with subscriptions'); if (needsCallback && !isFunction(callback)) {
throw new Error('Expected a callback to be passed with subscriptions');
}
return [actualArgs, callback]; return [actualArgs, callback];
} }
+1 -1
View File
@@ -12,7 +12,7 @@ import { MockProvider } from '@polkadot/rpc-provider/mock';
import { TypeRegistry } from '@polkadot/types'; import { TypeRegistry } from '@polkadot/types';
import { hexToU8a } from '@polkadot/util'; import { hexToU8a } from '@polkadot/util';
import { SingleAccountSigner } from '../test/util'; import { SingleAccountSigner } from '../test';
import { ApiPromise } from '.'; import { ApiPromise } from '.';
const TRANSFER_SIG = '0xcc277eb341d3801c08f149508221583fa3185cc3944e6cb376cd061640305edd7dc24dfd754adb24768f1d8547389b7720e6f626bc81f5593fba1141e7f7ba07'; const TRANSFER_SIG = '0xcc277eb341d3801c08f149508221583fa3185cc3944e6cb376cd061640305edd7dc24dfd754adb24768f1d8547389b7720e6f626bc81f5593fba1141e7f7ba07';
+7 -3
View File
@@ -12,7 +12,7 @@ import type { AddressOrPair, SignerOptions, SubmittableDryRunResult, Submittable
import { catchError, first, map, mapTo, mergeMap, of, switchMap, tap } from 'rxjs'; import { catchError, first, map, mapTo, mergeMap, of, switchMap, tap } from 'rxjs';
import { assert, isBn, isFunction, isNumber, isString, isU8a, isUndefined, objectSpread } from '@polkadot/util'; import { isBn, isFunction, isNumber, isString, isU8a, objectSpread } from '@polkadot/util';
import { ApiBase } from '../base'; import { ApiBase } from '../base';
import { filterEvents, isKeyringPair } from '../util'; import { filterEvents, isKeyringPair } from '../util';
@@ -34,7 +34,9 @@ const identity = <T> (input: T): T => input;
function makeEraOptions (api: ApiInterfaceRx, registry: Registry, partialOptions: Partial<SignerOptions>, { header, mortalLength, nonce }: { header: Header | null; mortalLength: number; nonce: Index }): SignatureOptions { function makeEraOptions (api: ApiInterfaceRx, registry: Registry, partialOptions: Partial<SignerOptions>, { header, mortalLength, nonce }: { header: Header | null; mortalLength: number; nonce: Index }): SignatureOptions {
if (!header) { if (!header) {
assert(partialOptions.era === 0 || !isUndefined(partialOptions.blockHash), 'Expected blockHash to be passed alongside non-immortal era options'); if (partialOptions.era && !partialOptions.blockHash) {
throw new Error('Expected blockHash to be passed alongside non-immortal era options');
}
if (isNumber(partialOptions.era)) { if (isNumber(partialOptions.era)) {
// since we have no header, it is immortal, remove any option overrides // since we have no header, it is immortal, remove any option overrides
@@ -299,7 +301,9 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, blockHas
#signViaSigner = async (address: Address | string | Uint8Array, options: SignatureOptions, header: Header | null): Promise<number> => { #signViaSigner = async (address: Address | string | Uint8Array, options: SignatureOptions, header: Header | null): Promise<number> => {
const signer = options.signer || api.signer; const signer = options.signer || api.signer;
assert(signer, 'No signer specified, either via api.setSigner or via sign options. You possibly need to pass through an explicit keypair for the origin so it can be used for signing.'); if (!signer) {
throw new Error('No signer specified, either via api.setSigner or via sign options. You possibly need to pass through an explicit keypair for the origin so it can be used for signing.');
}
const payload = this.registry.createTypeUnsafe<SignerPayload>('SignerPayload', [objectSpread({}, options, { const payload = this.registry.createTypeUnsafe<SignerPayload>('SignerPayload', [objectSpread({}, options, {
address, address,
@@ -5,7 +5,7 @@ import type { Signer, SignerResult } from '@polkadot/api/types';
import type { KeyringPair } from '@polkadot/keyring/types'; import type { KeyringPair } from '@polkadot/keyring/types';
import type { Registry, SignerPayloadJSON, SignerPayloadRaw } from '@polkadot/types/types'; import type { Registry, SignerPayloadJSON, SignerPayloadRaw } from '@polkadot/types/types';
import { assert, hexToU8a, u8aToHex } from '@polkadot/util'; import { hexToU8a, u8aToHex } from '@polkadot/util';
let id = 0; let id = 0;
@@ -23,7 +23,9 @@ export class SingleAccountSigner implements Signer {
} }
public async signPayload (payload: SignerPayloadJSON): Promise<SignerResult> { public async signPayload (payload: SignerPayloadJSON): Promise<SignerResult> {
assert(payload.address === this.#keyringPair.address, 'Signer does not have the keyringPair'); if (payload.address !== this.#keyringPair.address) {
throw new Error('Signer does not have the keyringPair');
}
return new Promise((resolve): void => { return new Promise((resolve): void => {
setTimeout((): void => { setTimeout((): void => {
@@ -38,7 +40,9 @@ export class SingleAccountSigner implements Signer {
} }
public async signRaw ({ address, data }: SignerPayloadRaw): Promise<SignerResult> { public async signRaw ({ address, data }: SignerPayloadRaw): Promise<SignerResult> {
assert(address === this.#keyringPair.address, 'Signer does not have the keyringPair'); if (address !== this.#keyringPair.address) {
throw new Error('Signer does not have the keyringPair');
}
return new Promise((resolve): void => { return new Promise((resolve): void => {
setTimeout((): void => { setTimeout((): void => {
-72
View File
@@ -1,72 +0,0 @@
// Copyright 2017-2022 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { jest } from '@jest/globals';
import { ApiPromise, WsProvider } from '@polkadot/api';
describe.skip('misc online tests', (): void => {
let api: ApiPromise;
beforeEach(async () => {
jest.setTimeout(30000);
process.env.NODE_ENV = 'test';
// const provider = new WsProvider('wss://kusama-rpc.polkadot.io');
const provider = new WsProvider('wss://westend-rpc.polkadot.io/');
api = await ApiPromise.create({ provider });
});
afterEach(async () => {
await api.disconnect();
});
it('expose rpc and rx definition', (): void => {
console.error(api.rpc.payment.queryFeeDetails.meta);
console.error(api.rx.rpc.chain.getBlock.meta);
});
it.skip('retrieves balances correctly', async (): Promise<void> => {
console.error(JSON.stringify(
await api.query.system.account('FPzukZw2mphWsXDqdkNzLaxnanjZEWH9i2vqwobTdtde5me')
));
console.error(JSON.stringify(
await api.query.system.account('HUewJvzVuEeyaxH2vx9XiyAPKrpu1Zj5r5Pi9VrGiBVty7q')
));
});
it.skip('handles map keys', async (): Promise<void> => {
console.time('map.keys');
const keys = await api.query.system.account.keys();
console.error('# keys', keys.length);
console.timeEnd('map.keys');
});
it.skip('handles map entries', async (): Promise<void> => {
console.time('map.entries');
const entries = await api.query.system.account.entries(); // api.query.indices.accounts.entries();
console.error('# entries', entries.length);
console.timeEnd('map.entries');
});
it.skip('handles doublemap entries', async (): Promise<void> => {
const activeEra = await api.query.staking.activeEra();
console.error(JSON.stringify(
await api.query.staking.erasStakers.entries(activeEra.unwrapOrDefault().index)
));
});
it.skip('does something in society', async (): Promise<void> => {
console.error(JSON.stringify(
await api.query.society.defenderVotes('Dab4bfYTZRUDMWjYAUQuFbDreQ9mt7nULWu3Dw7jodbzVe9')
));
});
});
@@ -3,7 +3,7 @@
import type { EventRecord } from '@polkadot/types/interfaces'; import type { EventRecord } from '@polkadot/types/interfaces';
import { SubmittableResult } from '../..'; import { SubmittableResult } from '..';
// log all events for the transfers, calling done() when finalized // log all events for the transfers, calling done() when finalized
export const logEvents = (done: () => Record<string, unknown>): (r: SubmittableResult) => void => export const logEvents = (done: () => Record<string, unknown>): (r: SubmittableResult) => void =>
@@ -1,237 +0,0 @@
// Copyright 2017-2022 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { ApiInterfaceRx } from '@polkadot/api/types';
import type { Enum, Struct } from '@polkadot/types';
import type { Option } from '@polkadot/types/codec';
import type { AccountId, AccountIndex, AccountInfo, Address, Balance, BlockNumber, Index } from '@polkadot/types/interfaces';
import { jest } from '@jest/globals';
import { combineLatest, map, of, switchMap } from 'rxjs';
import { ApiPromise, WsProvider } from '@polkadot/api';
import { memo } from '@polkadot/rpc-core';
interface VestingInfo extends Struct {
readonly locked: Balance;
readonly perBlock: Balance;
readonly startingBlock: BlockNumber;
}
interface SignedBalance extends Enum {
readonly isPositive: boolean;
readonly asPositive: Balance;
readonly isNegative: boolean;
readonly asNegative: Balance;
}
export interface EQDeriveBalancesAll {
freeBalance: Balance;
reservedBalance: Balance;
vestingLocked: Balance;
lockedBalance: Balance;
accountId: AccountId;
accountNonce: Index;
lockedBreakdown: unknown[];
}
type Result = [Balance, Balance, Balance, Index];
type RawResult = [
SignedBalance,
Option<Balance>,
Option<VestingInfo>,
AccountInfo
];
type EQDeriveBalancesQuery = (address: AccountIndex | AccountId | Address | string) => Observable<EQDeriveBalancesAll>;
const typesBundle = {
spec: {
Equilibrium: {
derives: {
balances: {
all: (
instanceId: string,
api: ApiInterfaceRx
): EQDeriveBalancesQuery =>
memo(
instanceId,
(address: AccountIndex | AccountId | Address | string) =>
api.derive.accounts.accountId(address).pipe(
switchMap(
(accountId): Observable<[AccountId, Result]> =>
accountId
? combineLatest([
of(accountId),
api
.queryMulti([
[api.query.balances.account, [accountId, 'EQ']],
[api.query.eqVesting.vested, accountId],
[api.query.eqVesting.vesting, accountId],
[api.query.system.account, accountId]
])
.pipe(
map(
(raw): Result => {
if (raw.length < 4) {
throw new Error('4 members expected');
}
const res = raw as RawResult;
const freeBalance = res[0].asPositive;
let reservedBalance = api.registry.createType(
'Balance'
);
let vestingLocked = api.registry.createType(
'Balance'
);
if (res[1].isSome && res[2].isSome) {
const vested = res[1].unwrap();
const info = res[2].unwrap();
vestingLocked = info.locked;
reservedBalance = api.registry.createType(
'Balance',
vestingLocked.sub(vested)
);
}
return [
freeBalance,
reservedBalance,
vestingLocked,
res[3].nonce
];
}
)
)
])
: of([
api.registry.createType('AccountId'),
[
api.registry.createType('Balance'),
api.registry.createType('Balance'),
api.registry.createType('Balance'),
api.registry.createType('Index')
]
])
),
map(
([
accountId,
[
freeBalance,
reservedBalance,
vestingLocked,
accountNonce
]
]): EQDeriveBalancesAll => ({
accountId,
accountNonce,
freeBalance,
lockedBalance: vestingLocked,
lockedBreakdown: [],
reservedBalance,
vestingLocked
})
)
)
)
}
},
types: [
{
minmax: [0, undefined],
types: {
Balance: 'u64',
BalanceOf: 'Balance',
BalancesAggregate: {
total_debt: 'Balance',
total_issuance: 'Balance'
},
BlockNumber: 'u64',
Currency: {
_enum: ['Unknown', 'Usd', 'EQ', 'Eth', 'Btc', 'Eos', 'Dot']
},
DataPoint: {
account_id: 'AccountId',
block_number: 'BlockNumber',
price: 'u64',
timestamp: 'u64'
},
FixedI64: 'i64',
Keys: 'SessionKeys3',
LookupSource: 'AccountId',
PricePeriod: {
_enum: ['Min', 'TenMin', 'Hour', 'FourHour', 'Day']
},
PricePoint: {
block_number: 'BlockNumber',
data_points: 'Vec<DataPoint>',
price: 'u64',
timestamp: 'u64'
},
ReinitRequest: {
account: 'AccountId',
authority_index: 'AuthIndex',
block_num: 'BlockNumber',
validators_len: 'u32'
},
SignedBalance: {
_enum: {
Negative: 'Balance',
Positive: 'Balance'
}
},
TotalAggregates: {
collateral: 'Balance',
debt: 'Balance'
},
TransferReason: {
_enum: [
'Common',
'InterestFee',
'MarginCall',
'BailsmenRedistribution',
'TreasuryEqBuyout',
'TreasuryBuyEq'
]
},
UserGroup: {
_enum: ['Unknown', 'Balances', 'Bailsman']
},
VestingInfo: {
locked: 'Balance',
perBlock: 'Balance',
startingBlock: 'BlockNumber'
}
}
}
]
}
}
};
function createApi (): Promise<ApiPromise> {
jest.setTimeout(30000);
const provider = new WsProvider('wss://tge.equilibrium.io');
return new ApiPromise({ provider, typesBundle }).isReady;
}
describe.skip('equilibrium api', () => {
it.skip('does not fail on derive.balances.all', async () => {
const api = await createApi();
await api.derive.balances.all(
'5DnoYz3koaRcMZ9Hj4FmQ2nNRKQfS73yBmEzzM9SsPn9cLtb'
);
});
});
+7 -3
View File
@@ -5,7 +5,7 @@ import type { SiLookupTypeId } from '@polkadot/types/interfaces';
import type { StorageEntry } from '@polkadot/types/primitive/types'; import type { StorageEntry } from '@polkadot/types/primitive/types';
import type { Registry } from '@polkadot/types/types'; import type { Registry } from '@polkadot/types/types';
import { assert, isUndefined } from '@polkadot/util'; import { isUndefined } from '@polkadot/util';
function sig ({ lookup }: Registry, { method, section }: StorageEntry, args: SiLookupTypeId[]): string { function sig ({ lookup }: Registry, { method, section }: StorageEntry, args: SiLookupTypeId[]): string {
return `${section}.${method}(${args.map((a) => lookup.getTypeDef(a).type).join(', ')})`; return `${section}.${method}(${args.map((a) => lookup.getTypeDef(a).type).join(', ')})`;
@@ -17,14 +17,18 @@ export function extractStorageArgs (registry: Registry, creator: StorageEntry, _
const args = _args.filter((a) => !isUndefined(a)); const args = _args.filter((a) => !isUndefined(a));
if (creator.meta.type.isPlain) { if (creator.meta.type.isPlain) {
assert(args.length === 0, () => `${sig(registry, creator, [])} does not take any arguments, ${args.length} found`); if (args.length !== 0) {
throw new Error(`${sig(registry, creator, [])} does not take any arguments, ${args.length} found`);
}
} else { } else {
const { hashers, key } = creator.meta.type.asMap; const { hashers, key } = creator.meta.type.asMap;
const keys = hashers.length === 1 const keys = hashers.length === 1
? [key] ? [key]
: registry.lookup.getSiType(key).def.asTuple.map((t) => t); : registry.lookup.getSiType(key).def.asTuple.map((t) => t);
assert(args.length === keys.length, () => `${sig(registry, creator, keys)} is a map, requiring ${keys.length} arguments, ${args.length} found`); if (args.length !== keys.length) {
throw new Error(`${sig(registry, creator, keys)} is a map, requiring ${keys.length} arguments, ${args.length} found`);
}
} }
// pass as tuple // pass as tuple
+5 -5
View File
@@ -20,13 +20,13 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "8.12.1", "version": "8.13.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.6", "@babel/runtime": "^7.18.6",
"@polkadot/rpc-core": "8.12.1", "@polkadot/rpc-core": "8.13.1",
"@polkadot/types": "8.12.1", "@polkadot/types": "8.13.1",
"@polkadot/types-codec": "8.12.1", "@polkadot/types-codec": "8.13.1",
"@polkadot/util": "^10.0.1" "@polkadot/util": "^10.0.2"
} }
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '8.12.1' }; export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '8.13.1' };
+8 -8
View File
@@ -20,18 +20,18 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "8.12.1", "version": "8.13.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.6", "@babel/runtime": "^7.18.6",
"@polkadot/rpc-augment": "8.12.1", "@polkadot/rpc-augment": "8.13.1",
"@polkadot/rpc-provider": "8.12.1", "@polkadot/rpc-provider": "8.13.1",
"@polkadot/types": "8.12.1", "@polkadot/types": "8.13.1",
"@polkadot/util": "^10.0.1", "@polkadot/util": "^10.0.2",
"rxjs": "^7.5.5" "rxjs": "^7.5.6"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/keyring": "^10.0.1", "@polkadot/keyring": "^10.0.2",
"@polkadot/rpc-augment": "8.12.1" "@polkadot/rpc-augment": "8.13.1"
} }
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '8.12.1' }; export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '8.13.1' };
+10 -10
View File
@@ -20,19 +20,19 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "8.12.1", "version": "8.13.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.6", "@babel/runtime": "^7.18.6",
"@polkadot/keyring": "^10.0.1", "@polkadot/keyring": "^10.0.2",
"@polkadot/types": "8.12.1", "@polkadot/types": "8.13.1",
"@polkadot/types-support": "8.12.1", "@polkadot/types-support": "8.13.1",
"@polkadot/util": "^10.0.1", "@polkadot/util": "^10.0.2",
"@polkadot/util-crypto": "^10.0.1", "@polkadot/util-crypto": "^10.0.2",
"@polkadot/x-fetch": "^10.0.1", "@polkadot/x-fetch": "^10.0.2",
"@polkadot/x-global": "^10.0.1", "@polkadot/x-global": "^10.0.2",
"@polkadot/x-ws": "^10.0.1", "@polkadot/x-ws": "^10.0.2",
"@substrate/connect": "0.7.7", "@substrate/connect": "0.7.8",
"eventemitter3": "^4.0.7", "eventemitter3": "^4.0.7",
"mock-socket": "^9.1.5", "mock-socket": "^9.1.5",
"nock": "^13.2.8" "nock": "^13.2.8"
+4 -6
View File
@@ -13,8 +13,8 @@ import EventEmitter from 'eventemitter3';
import { createTestKeyring } from '@polkadot/keyring/testing'; import { createTestKeyring } from '@polkadot/keyring/testing';
import { decorateStorage, Metadata } from '@polkadot/types'; import { decorateStorage, Metadata } from '@polkadot/types';
import jsonrpc from '@polkadot/types/interfaces/jsonrpc'; import jsonrpc from '@polkadot/types/interfaces/jsonrpc';
import rpcHeader from '@polkadot/types-support/json/Header.004.json'; import rpcHeader from '@polkadot/types-support/json/Header.004.json' assert { type: 'json' };
import rpcSignedBlock from '@polkadot/types-support/json/SignedBlock.004.immortal.json'; import rpcSignedBlock from '@polkadot/types-support/json/SignedBlock.004.immortal.json' assert { type: 'json' };
import rpcMetadata from '@polkadot/types-support/metadata/static-substrate'; import rpcMetadata from '@polkadot/types-support/metadata/static-substrate';
import { BN, bnToU8a, logger, u8aToHex } from '@polkadot/util'; import { BN, bnToU8a, logger, u8aToHex } from '@polkadot/util';
import { randomAsU8a } from '@polkadot/util-crypto'; import { randomAsU8a } from '@polkadot/util-crypto';
@@ -44,8 +44,7 @@ export class MockProvider implements ProviderInterface {
private emitter = new EventEmitter(); private emitter = new EventEmitter();
// Browser/Deno = number, Node = Timeout private intervalId?: ReturnType<typeof setInterval> | null;
private intervalId?: unknown | null;
public isUpdating = true; public isUpdating = true;
@@ -110,8 +109,7 @@ export class MockProvider implements ProviderInterface {
// eslint-disable-next-line @typescript-eslint/require-await // eslint-disable-next-line @typescript-eslint/require-await
public async disconnect (): Promise<void> { public async disconnect (): Promise<void> {
if (this.intervalId) { if (this.intervalId) {
// different method signatures for Node vs Browser/Deno clearInterval(this.intervalId);
clearInterval(this.intervalId as number);
this.intervalId = null; this.intervalId = null;
} }
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '8.12.1' }; export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '8.13.1' };
+2 -4
View File
@@ -106,8 +106,7 @@ export class WsProvider implements ProviderInterface {
#subscriptions: Record<string, WsStateSubscription> = {}; #subscriptions: Record<string, WsStateSubscription> = {};
// Browser/Deno = number, Node = Timeout #timeoutId?: ReturnType<typeof setInterval> | null = null;
#timeoutId?: unknown | null = null;
#websocket: WebSocket | null; #websocket: WebSocket | null;
@@ -431,8 +430,7 @@ export class WsProvider implements ProviderInterface {
} }
if (this.#timeoutId) { if (this.#timeoutId) {
// different method signatures for Node vs Browser/Deno clearInterval(this.#timeoutId);
clearInterval(this.#timeoutId as number);
this.#timeoutId = null; this.#timeoutId = null;
} }
+13 -13
View File
@@ -20,7 +20,7 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "8.12.1", "version": "8.13.1",
"main": "index.js", "main": "index.js",
"bin": { "bin": {
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.cjs", "polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.cjs",
@@ -33,18 +33,18 @@
"@babel/core": "^7.18.6", "@babel/core": "^7.18.6",
"@babel/register": "^7.18.6", "@babel/register": "^7.18.6",
"@babel/runtime": "^7.18.6", "@babel/runtime": "^7.18.6",
"@polkadot/api": "8.12.1", "@polkadot/api": "8.13.1",
"@polkadot/api-augment": "8.12.1", "@polkadot/api-augment": "8.13.1",
"@polkadot/rpc-augment": "8.12.1", "@polkadot/rpc-augment": "8.13.1",
"@polkadot/rpc-provider": "8.12.1", "@polkadot/rpc-provider": "8.13.1",
"@polkadot/types": "8.12.1", "@polkadot/types": "8.13.1",
"@polkadot/types-augment": "8.12.1", "@polkadot/types-augment": "8.13.1",
"@polkadot/types-codec": "8.12.1", "@polkadot/types-codec": "8.13.1",
"@polkadot/types-create": "8.12.1", "@polkadot/types-create": "8.13.1",
"@polkadot/types-support": "8.12.1", "@polkadot/types-support": "8.13.1",
"@polkadot/util": "^10.0.1", "@polkadot/util": "^10.0.2",
"@polkadot/util-crypto": "^10.0.1", "@polkadot/util-crypto": "^10.0.2",
"@polkadot/x-ws": "^10.0.1", "@polkadot/x-ws": "^10.0.2",
"handlebars": "^4.7.7", "handlebars": "^4.7.7",
"websocket": "^1.0.34", "websocket": "^1.0.34",
"yargs": "^17.5.1" "yargs": "^17.5.1"
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '8.12.1' }; export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '8.13.1' };
+4 -4
View File
@@ -20,12 +20,12 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "8.12.1", "version": "8.13.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.6", "@babel/runtime": "^7.18.6",
"@polkadot/types": "8.12.1", "@polkadot/types": "8.13.1",
"@polkadot/types-codec": "8.12.1", "@polkadot/types-codec": "8.13.1",
"@polkadot/util": "^10.0.1" "@polkadot/util": "^10.0.2"
} }
} }
+1 -1
View File
@@ -158,7 +158,7 @@ export default {
votes24: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);23],Compact<u16>)>' votes24: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);23],Compact<u16>)>'
}, },
/** /**
* Lookup779: kusama_runtime::Runtime * Lookup777: kusama_runtime::Runtime
**/ **/
KusamaRuntimeRuntime: 'Null' KusamaRuntimeRuntime: 'Null'
}; };
+86 -59
View File
@@ -1249,7 +1249,24 @@ export default {
}, },
CollectionMaxSupplySet: { CollectionMaxSupplySet: {
collection: 'u32', collection: 'u32',
maxSupply: 'u32' maxSupply: 'u32',
},
ItemPriceSet: {
collection: 'u32',
item: 'u32',
price: 'u128',
whitelistedBuyer: 'Option<AccountId32>',
},
ItemPriceRemoved: {
collection: 'u32',
item: 'u32',
},
ItemBought: {
collection: 'u32',
item: 'u32',
price: 'u128',
seller: 'AccountId32',
buyer: 'AccountId32'
} }
} }
}, },
@@ -2329,7 +2346,8 @@ export default {
}, },
remove_member: { remove_member: {
who: 'MultiAddress', who: 'MultiAddress',
hasReplacement: 'bool', slashBond: 'bool',
rerunElection: 'bool',
}, },
clean_defunct_voters: { clean_defunct_voters: {
numVoters: 'u32', numVoters: 'u32',
@@ -3338,7 +3356,18 @@ export default {
}, },
set_collection_max_supply: { set_collection_max_supply: {
collection: 'u32', collection: 'u32',
maxSupply: 'u32' maxSupply: 'u32',
},
set_price: {
collection: 'u32',
item: 'u32',
price: 'Option<u128>',
whitelistedBuyer: 'Option<MultiAddress>',
},
buy_item: {
collection: 'u32',
item: 'u32',
bidPrice: 'u128'
} }
} }
}, },
@@ -4254,7 +4283,7 @@ export default {
* Lookup467: pallet_elections_phragmen::pallet::Error<T> * Lookup467: pallet_elections_phragmen::pallet::Error<T>
**/ **/
PalletElectionsPhragmenError: { PalletElectionsPhragmenError: {
_enum: ['UnableToVote', 'NoVotes', 'TooManyVotes', 'MaximumVotesExceeded', 'LowBalance', 'UnableToPayBond', 'MustBeVoter', 'ReportSelf', 'DuplicatedCandidate', 'MemberSubmit', 'RunnerUpSubmit', 'InsufficientCandidateFunds', 'NotMember', 'InvalidWitnessData', 'InvalidVoteCount', 'InvalidRenouncing', 'InvalidReplacement'] _enum: ['UnableToVote', 'NoVotes', 'TooManyVotes', 'MaximumVotesExceeded', 'LowBalance', 'UnableToPayBond', 'MustBeVoter', 'DuplicatedCandidate', 'TooManyCandidates', 'MemberSubmit', 'RunnerUpSubmit', 'InsufficientCandidateFunds', 'NotMember', 'InvalidWitnessData', 'InvalidVoteCount', 'InvalidRenouncing', 'InvalidReplacement']
}, },
/** /**
* Lookup469: pallet_membership::pallet::Error<T, I> * Lookup469: pallet_membership::pallet::Error<T, I>
@@ -4886,13 +4915,13 @@ export default {
isFrozen: 'bool' isFrozen: 'bool'
}, },
/** /**
* Lookup589: pallet_uniques::pallet::Error<T, I> * Lookup590: pallet_uniques::pallet::Error<T, I>
**/ **/
PalletUniquesError: { PalletUniquesError: {
_enum: ['NoPermission', 'UnknownCollection', 'AlreadyExists', 'WrongOwner', 'BadWitness', 'InUse', 'Frozen', 'WrongDelegate', 'NoDelegate', 'Unapproved', 'Unaccepted', 'Locked', 'MaxSupplyReached', 'MaxSupplyAlreadySet', 'MaxSupplyTooSmall'] _enum: ['NoPermission', 'UnknownCollection', 'AlreadyExists', 'WrongOwner', 'BadWitness', 'InUse', 'Frozen', 'WrongDelegate', 'NoDelegate', 'Unapproved', 'Unaccepted', 'Locked', 'MaxSupplyReached', 'MaxSupplyAlreadySet', 'MaxSupplyTooSmall', 'UnknownItem', 'NotForSale', 'BidTooLow']
}, },
/** /**
* Lookup591: pallet_transaction_storage::TransactionInfo * Lookup592: pallet_transaction_storage::TransactionInfo
**/ **/
PalletTransactionStorageTransactionInfo: { PalletTransactionStorageTransactionInfo: {
_alias: { _alias: {
@@ -4904,13 +4933,13 @@ export default {
blockChunks: 'u32' blockChunks: 'u32'
}, },
/** /**
* Lookup593: pallet_transaction_storage::pallet::Error<T> * Lookup594: pallet_transaction_storage::pallet::Error<T>
**/ **/
PalletTransactionStorageError: { PalletTransactionStorageError: {
_enum: ['InsufficientFunds', 'NotConfigured', 'RenewedNotFound', 'EmptyTransaction', 'UnexpectedProof', 'InvalidProof', 'MissingProof', 'MissingStateData', 'DoubleCheck', 'ProofNotChecked', 'TransactionTooLarge', 'TooManyTransactions', 'BadContext'] _enum: ['InsufficientFunds', 'NotConfigured', 'RenewedNotFound', 'EmptyTransaction', 'UnexpectedProof', 'InvalidProof', 'MissingProof', 'MissingStateData', 'DoubleCheck', 'ProofNotChecked', 'TransactionTooLarge', 'TooManyTransactions', 'BadContext']
}, },
/** /**
* Lookup594: pallet_bags_list::list::Node<T, I> * Lookup595: pallet_bags_list::list::Node<T, I>
**/ **/
PalletBagsListListNode: { PalletBagsListListNode: {
id: 'AccountId32', id: 'AccountId32',
@@ -4920,14 +4949,14 @@ export default {
score: 'u64' score: 'u64'
}, },
/** /**
* Lookup595: pallet_bags_list::list::Bag<T, I> * Lookup596: pallet_bags_list::list::Bag<T, I>
**/ **/
PalletBagsListListBag: { PalletBagsListListBag: {
head: 'Option<AccountId32>', head: 'Option<AccountId32>',
tail: 'Option<AccountId32>' tail: 'Option<AccountId32>'
}, },
/** /**
* Lookup597: pallet_bags_list::pallet::Error<T, I> * Lookup598: pallet_bags_list::pallet::Error<T, I>
**/ **/
PalletBagsListError: { PalletBagsListError: {
_enum: { _enum: {
@@ -4935,19 +4964,19 @@ export default {
} }
}, },
/** /**
* Lookup598: pallet_bags_list::list::ListError * Lookup599: pallet_bags_list::list::ListError
**/ **/
PalletBagsListListListError: { PalletBagsListListListError: {
_enum: ['Duplicate', 'NotHeavier', 'NotInSameBag', 'NodeNotFound'] _enum: ['Duplicate', 'NotHeavier', 'NotInSameBag', 'NodeNotFound']
}, },
/** /**
* Lookup599: pallet_state_trie_migration::pallet::Error<T> * Lookup600: pallet_state_trie_migration::pallet::Error<T>
**/ **/
PalletStateTrieMigrationError: { PalletStateTrieMigrationError: {
_enum: ['MaxSignedLimits', 'KeyTooLong', 'NotEnoughFunds', 'BadWitness', 'SizeUpperBoundExceeded', 'SignedMigrationNotAllowed'] _enum: ['MaxSignedLimits', 'KeyTooLong', 'NotEnoughFunds', 'BadWitness', 'SizeUpperBoundExceeded', 'SignedMigrationNotAllowed']
}, },
/** /**
* Lookup600: pallet_child_bounties::ChildBounty<sp_core::crypto::AccountId32, Balance, BlockNumber> * Lookup601: pallet_child_bounties::ChildBounty<sp_core::crypto::AccountId32, Balance, BlockNumber>
**/ **/
PalletChildBountiesChildBounty: { PalletChildBountiesChildBounty: {
parentBounty: 'u32', parentBounty: 'u32',
@@ -4957,7 +4986,7 @@ export default {
status: 'PalletChildBountiesChildBountyStatus' status: 'PalletChildBountiesChildBountyStatus'
}, },
/** /**
* Lookup601: pallet_child_bounties::ChildBountyStatus<sp_core::crypto::AccountId32, BlockNumber> * Lookup602: pallet_child_bounties::ChildBountyStatus<sp_core::crypto::AccountId32, BlockNumber>
**/ **/
PalletChildBountiesChildBountyStatus: { PalletChildBountiesChildBountyStatus: {
_enum: { _enum: {
@@ -4976,13 +5005,13 @@ export default {
} }
}, },
/** /**
* Lookup602: pallet_child_bounties::pallet::Error<T> * Lookup603: pallet_child_bounties::pallet::Error<T>
**/ **/
PalletChildBountiesError: { PalletChildBountiesError: {
_enum: ['ParentBountyNotActive', 'InsufficientBountyBalance', 'TooManyChildBounties'] _enum: ['ParentBountyNotActive', 'InsufficientBountyBalance', 'TooManyChildBounties']
}, },
/** /**
* Lookup603: pallet_referenda::types::ReferendumInfo<TrackId, node_runtime::OriginCaller, Moment, primitive_types::H256, Balance, pallet_conviction_voting::types::Tally<Votes, Total>, sp_core::crypto::AccountId32, ScheduleAddress> * Lookup604: pallet_referenda::types::ReferendumInfo<TrackId, node_runtime::OriginCaller, Moment, primitive_types::H256, Balance, pallet_conviction_voting::types::Tally<Votes, Total>, sp_core::crypto::AccountId32, ScheduleAddress>
**/ **/
PalletReferendaReferendumInfoConvictionVotingTally: { PalletReferendaReferendumInfoConvictionVotingTally: {
_enum: { _enum: {
@@ -4995,7 +5024,7 @@ export default {
} }
}, },
/** /**
* Lookup604: pallet_referenda::types::ReferendumStatus<TrackId, node_runtime::OriginCaller, Moment, primitive_types::H256, Balance, pallet_conviction_voting::types::Tally<Votes, Total>, sp_core::crypto::AccountId32, ScheduleAddress> * Lookup605: pallet_referenda::types::ReferendumStatus<TrackId, node_runtime::OriginCaller, Moment, primitive_types::H256, Balance, pallet_conviction_voting::types::Tally<Votes, Total>, sp_core::crypto::AccountId32, ScheduleAddress>
**/ **/
PalletReferendaReferendumStatusConvictionVotingTally: { PalletReferendaReferendumStatusConvictionVotingTally: {
track: 'u16', track: 'u16',
@@ -5011,33 +5040,33 @@ export default {
alarm: 'Option<(u32,(u32,u32))>' alarm: 'Option<(u32,(u32,u32))>'
}, },
/** /**
* Lookup605: pallet_referenda::types::Deposit<sp_core::crypto::AccountId32, Balance> * Lookup606: pallet_referenda::types::Deposit<sp_core::crypto::AccountId32, Balance>
**/ **/
PalletReferendaDeposit: { PalletReferendaDeposit: {
who: 'AccountId32', who: 'AccountId32',
amount: 'u128' amount: 'u128'
}, },
/** /**
* Lookup608: pallet_referenda::types::DecidingStatus<BlockNumber> * Lookup609: pallet_referenda::types::DecidingStatus<BlockNumber>
**/ **/
PalletReferendaDecidingStatus: { PalletReferendaDecidingStatus: {
since: 'u32', since: 'u32',
confirming: 'Option<u32>' confirming: 'Option<u32>'
}, },
/** /**
* Lookup612: pallet_referenda::pallet::Error<T, I> * Lookup613: pallet_referenda::pallet::Error<T, I>
**/ **/
PalletReferendaError: { PalletReferendaError: {
_enum: ['NotOngoing', 'HasDeposit', 'BadTrack', 'Full', 'QueueEmpty', 'BadReferendum', 'NothingToDo', 'NoTrack', 'Unfinished', 'NoPermission', 'NoDeposit'] _enum: ['NotOngoing', 'HasDeposit', 'BadTrack', 'Full', 'QueueEmpty', 'BadReferendum', 'NothingToDo', 'NoTrack', 'Unfinished', 'NoPermission', 'NoDeposit']
}, },
/** /**
* Lookup613: pallet_remark::pallet::Error<T> * Lookup614: pallet_remark::pallet::Error<T>
**/ **/
PalletRemarkError: { PalletRemarkError: {
_enum: ['Empty', 'BadContext'] _enum: ['Empty', 'BadContext']
}, },
/** /**
* Lookup615: pallet_conviction_voting::vote::Voting<Balance, sp_core::crypto::AccountId32, BlockNumber, PollIndex, MaxVotes> * Lookup616: pallet_conviction_voting::vote::Voting<Balance, sp_core::crypto::AccountId32, BlockNumber, PollIndex, MaxVotes>
**/ **/
PalletConvictionVotingVoteVoting: { PalletConvictionVotingVoteVoting: {
_enum: { _enum: {
@@ -5046,7 +5075,7 @@ export default {
} }
}, },
/** /**
* Lookup616: pallet_conviction_voting::vote::Casting<Balance, BlockNumber, PollIndex, MaxVotes> * Lookup617: pallet_conviction_voting::vote::Casting<Balance, BlockNumber, PollIndex, MaxVotes>
**/ **/
PalletConvictionVotingVoteCasting: { PalletConvictionVotingVoteCasting: {
votes: 'Vec<(u32,PalletConvictionVotingVoteAccountVote)>', votes: 'Vec<(u32,PalletConvictionVotingVoteAccountVote)>',
@@ -5054,18 +5083,18 @@ export default {
prior: 'PalletConvictionVotingVotePriorLock' prior: 'PalletConvictionVotingVotePriorLock'
}, },
/** /**
* Lookup620: pallet_conviction_voting::types::Delegations<Balance> * Lookup621: pallet_conviction_voting::types::Delegations<Balance>
**/ **/
PalletConvictionVotingDelegations: { PalletConvictionVotingDelegations: {
votes: 'u128', votes: 'u128',
capital: 'u128' capital: 'u128'
}, },
/** /**
* Lookup621: pallet_conviction_voting::vote::PriorLock<BlockNumber, Balance> * Lookup622: pallet_conviction_voting::vote::PriorLock<BlockNumber, Balance>
**/ **/
PalletConvictionVotingVotePriorLock: '(u32,u128)', PalletConvictionVotingVotePriorLock: '(u32,u128)',
/** /**
* Lookup622: pallet_conviction_voting::vote::Delegating<Balance, sp_core::crypto::AccountId32, BlockNumber> * Lookup623: pallet_conviction_voting::vote::Delegating<Balance, sp_core::crypto::AccountId32, BlockNumber>
**/ **/
PalletConvictionVotingVoteDelegating: { PalletConvictionVotingVoteDelegating: {
balance: 'u128', balance: 'u128',
@@ -5075,40 +5104,40 @@ export default {
prior: 'PalletConvictionVotingVotePriorLock' prior: 'PalletConvictionVotingVotePriorLock'
}, },
/** /**
* Lookup626: pallet_conviction_voting::pallet::Error<T, I> * Lookup627: pallet_conviction_voting::pallet::Error<T, I>
**/ **/
PalletConvictionVotingError: { PalletConvictionVotingError: {
_enum: ['NotOngoing', 'NotVoter', 'NoPermission', 'NoPermissionYet', 'AlreadyDelegating', 'AlreadyVoting', 'InsufficientFunds', 'NotDelegating', 'Nonsense', 'MaxVotesReached', 'ClassNeeded', 'BadClass'] _enum: ['NotOngoing', 'NotVoter', 'NoPermission', 'NoPermissionYet', 'AlreadyDelegating', 'AlreadyVoting', 'InsufficientFunds', 'NotDelegating', 'Nonsense', 'MaxVotesReached', 'ClassNeeded', 'BadClass']
}, },
/** /**
* Lookup627: pallet_whitelist::pallet::Error<T> * Lookup628: pallet_whitelist::pallet::Error<T>
**/ **/
PalletWhitelistError: { PalletWhitelistError: {
_enum: ['UnavailablePreImage', 'UndecodableCall', 'InvalidCallWeightWitness', 'CallIsNotWhitelisted', 'CallAlreadyWhitelisted'] _enum: ['UnavailablePreImage', 'UndecodableCall', 'InvalidCallWeightWitness', 'CallIsNotWhitelisted', 'CallAlreadyWhitelisted']
}, },
/** /**
* Lookup632: pallet_alliance::MemberRole * Lookup633: pallet_alliance::MemberRole
**/ **/
PalletAllianceMemberRole: { PalletAllianceMemberRole: {
_enum: ['Founder', 'Fellow', 'Ally'] _enum: ['Founder', 'Fellow', 'Ally']
}, },
/** /**
* Lookup637: pallet_alliance::pallet::Error<T, I> * Lookup638: pallet_alliance::pallet::Error<T, I>
**/ **/
PalletAllianceError: { PalletAllianceError: {
_enum: ['MembersAlreadyInitialized', 'AlreadyMember', 'NotMember', 'NotAlly', 'NotFounder', 'UpForKicking', 'NoVotingRights', 'AlreadyElevated', 'AlreadyUnscrupulous', 'AccountNonGrata', 'NotListedAsUnscrupulous', 'TooManyUnscrupulousItems', 'TooLongWebsiteUrl', 'InsufficientFunds', 'WithoutIdentityDisplayAndWebsite', 'WithoutGoodIdentityJudgement', 'MissingProposalHash', 'NotVetoableProposal', 'MissingAnnouncement', 'TooManyMembers', 'TooManyAnnouncements'] _enum: ['MembersAlreadyInitialized', 'AlreadyMember', 'NotMember', 'NotAlly', 'NotFounder', 'UpForKicking', 'NoVotingRights', 'AlreadyElevated', 'AlreadyUnscrupulous', 'AccountNonGrata', 'NotListedAsUnscrupulous', 'TooManyUnscrupulousItems', 'TooLongWebsiteUrl', 'InsufficientFunds', 'WithoutIdentityDisplayAndWebsite', 'WithoutGoodIdentityJudgement', 'MissingProposalHash', 'NotVetoableProposal', 'MissingAnnouncement', 'TooManyMembers', 'TooManyAnnouncements']
}, },
/** /**
* Lookup638: pallet_nomination_pools::PoolMember<T> * Lookup639: pallet_nomination_pools::PoolMember<T>
**/ **/
PalletNominationPoolsPoolMember: { PalletNominationPoolsPoolMember: {
poolId: 'u32', poolId: 'u32',
points: 'u128', points: 'u128',
rewardPoolTotalEarnings: 'u128', lastRecordedRewardCounter: 'u128',
unbondingEras: 'BTreeMap<u32, u128>' unbondingEras: 'BTreeMap<u32, u128>'
}, },
/** /**
* Lookup641: pallet_nomination_pools::BondedPoolInner<T> * Lookup642: pallet_nomination_pools::BondedPoolInner<T>
**/ **/
PalletNominationPoolsBondedPoolInner: { PalletNominationPoolsBondedPoolInner: {
points: 'u128', points: 'u128',
@@ -5117,7 +5146,7 @@ export default {
roles: 'PalletNominationPoolsPoolRoles' roles: 'PalletNominationPoolsPoolRoles'
}, },
/** /**
* Lookup642: pallet_nomination_pools::PoolRoles<sp_core::crypto::AccountId32> * Lookup643: pallet_nomination_pools::PoolRoles<sp_core::crypto::AccountId32>
**/ **/
PalletNominationPoolsPoolRoles: { PalletNominationPoolsPoolRoles: {
depositor: 'AccountId32', depositor: 'AccountId32',
@@ -5126,29 +5155,29 @@ export default {
stateToggler: 'Option<AccountId32>' stateToggler: 'Option<AccountId32>'
}, },
/** /**
* Lookup643: pallet_nomination_pools::RewardPool<T> * Lookup644: pallet_nomination_pools::RewardPool<T>
**/ **/
PalletNominationPoolsRewardPool: { PalletNominationPoolsRewardPool: {
balance: 'u128', lastRecordedRewardCounter: 'u128',
totalEarnings: 'u128', lastRecordedTotalPayouts: 'u128',
points: 'U256' totalRewardsClaimed: 'u128'
}, },
/** /**
* Lookup646: pallet_nomination_pools::SubPools<T> * Lookup645: pallet_nomination_pools::SubPools<T>
**/ **/
PalletNominationPoolsSubPools: { PalletNominationPoolsSubPools: {
noEra: 'PalletNominationPoolsUnbondPool', noEra: 'PalletNominationPoolsUnbondPool',
withEra: 'BTreeMap<u32, PalletNominationPoolsUnbondPool>' withEra: 'BTreeMap<u32, PalletNominationPoolsUnbondPool>'
}, },
/** /**
* Lookup647: pallet_nomination_pools::UnbondPool<T> * Lookup646: pallet_nomination_pools::UnbondPool<T>
**/ **/
PalletNominationPoolsUnbondPool: { PalletNominationPoolsUnbondPool: {
points: 'u128', points: 'u128',
balance: 'u128' balance: 'u128'
}, },
/** /**
* Lookup653: pallet_nomination_pools::pallet::Error<T> * Lookup652: pallet_nomination_pools::pallet::Error<T>
**/ **/
PalletNominationPoolsError: { PalletNominationPoolsError: {
_enum: { _enum: {
@@ -5163,7 +5192,6 @@ export default {
MinimumBondNotMet: 'Null', MinimumBondNotMet: 'Null',
OverflowRisk: 'Null', OverflowRisk: 'Null',
NotDestroying: 'Null', NotDestroying: 'Null',
NotOnlyPoolMember: 'Null',
NotNominator: 'Null', NotNominator: 'Null',
NotKickerOrDestroying: 'Null', NotKickerOrDestroying: 'Null',
NotOpen: 'Null', NotOpen: 'Null',
@@ -5173,18 +5201,17 @@ export default {
DoesNotHavePermission: 'Null', DoesNotHavePermission: 'Null',
MetadataExceedsMaxLen: 'Null', MetadataExceedsMaxLen: 'Null',
Defensive: 'PalletNominationPoolsDefensiveError', Defensive: 'PalletNominationPoolsDefensiveError',
NotEnoughPointsToUnbond: 'Null',
PartialUnbondNotAllowedPermissionlessly: 'Null' PartialUnbondNotAllowedPermissionlessly: 'Null'
} }
}, },
/** /**
* Lookup654: pallet_nomination_pools::pallet::DefensiveError * Lookup653: pallet_nomination_pools::pallet::DefensiveError
**/ **/
PalletNominationPoolsDefensiveError: { PalletNominationPoolsDefensiveError: {
_enum: ['NotEnoughSpaceInUnbondPool', 'PoolNotFound', 'RewardPoolNotFound', 'SubPoolsNotFound', 'BondedStashKilledPrematurely'] _enum: ['NotEnoughSpaceInUnbondPool', 'PoolNotFound', 'RewardPoolNotFound', 'SubPoolsNotFound', 'BondedStashKilledPrematurely']
}, },
/** /**
* Lookup655: pallet_referenda::types::ReferendumInfo<TrackId, node_runtime::OriginCaller, Moment, primitive_types::H256, Balance, pallet_ranked_collective::Tally<M>, sp_core::crypto::AccountId32, ScheduleAddress> * Lookup654: pallet_referenda::types::ReferendumInfo<TrackId, node_runtime::OriginCaller, Moment, primitive_types::H256, Balance, pallet_ranked_collective::Tally<M>, sp_core::crypto::AccountId32, ScheduleAddress>
**/ **/
PalletReferendaReferendumInfoRankedCollectiveTally: { PalletReferendaReferendumInfoRankedCollectiveTally: {
_enum: { _enum: {
@@ -5197,7 +5224,7 @@ export default {
} }
}, },
/** /**
* Lookup656: pallet_referenda::types::ReferendumStatus<TrackId, node_runtime::OriginCaller, Moment, primitive_types::H256, Balance, pallet_ranked_collective::Tally<M>, sp_core::crypto::AccountId32, ScheduleAddress> * Lookup655: pallet_referenda::types::ReferendumStatus<TrackId, node_runtime::OriginCaller, Moment, primitive_types::H256, Balance, pallet_ranked_collective::Tally<M>, sp_core::crypto::AccountId32, ScheduleAddress>
**/ **/
PalletReferendaReferendumStatusRankedCollectiveTally: { PalletReferendaReferendumStatusRankedCollectiveTally: {
track: 'u16', track: 'u16',
@@ -5213,19 +5240,19 @@ export default {
alarm: 'Option<(u32,(u32,u32))>' alarm: 'Option<(u32,(u32,u32))>'
}, },
/** /**
* Lookup659: pallet_ranked_collective::MemberRecord * Lookup658: pallet_ranked_collective::MemberRecord
**/ **/
PalletRankedCollectiveMemberRecord: { PalletRankedCollectiveMemberRecord: {
rank: 'u16' rank: 'u16'
}, },
/** /**
* Lookup663: pallet_ranked_collective::pallet::Error<T, I> * Lookup662: pallet_ranked_collective::pallet::Error<T, I>
**/ **/
PalletRankedCollectiveError: { PalletRankedCollectiveError: {
_enum: ['AlreadyMember', 'NotMember', 'NotPolling', 'Ongoing', 'NoneRemaining', 'Corruption', 'RankTooLow', 'InvalidWitness', 'NoPermission'] _enum: ['AlreadyMember', 'NotMember', 'NotPolling', 'Ongoing', 'NoneRemaining', 'Corruption', 'RankTooLow', 'InvalidWitness', 'NoPermission']
}, },
/** /**
* Lookup665: sp_runtime::MultiSignature * Lookup664: sp_runtime::MultiSignature
**/ **/
SpRuntimeMultiSignature: { SpRuntimeMultiSignature: {
_enum: { _enum: {
@@ -5235,42 +5262,42 @@ export default {
} }
}, },
/** /**
* Lookup666: sp_core::ecdsa::Signature * Lookup665: sp_core::ecdsa::Signature
**/ **/
SpCoreEcdsaSignature: '[u8;65]', SpCoreEcdsaSignature: '[u8;65]',
/** /**
* Lookup669: frame_system::extensions::check_non_zero_sender::CheckNonZeroSender<T> * Lookup668: frame_system::extensions::check_non_zero_sender::CheckNonZeroSender<T>
**/ **/
FrameSystemExtensionsCheckNonZeroSender: 'Null', FrameSystemExtensionsCheckNonZeroSender: 'Null',
/** /**
* Lookup670: frame_system::extensions::check_spec_version::CheckSpecVersion<T> * Lookup669: frame_system::extensions::check_spec_version::CheckSpecVersion<T>
**/ **/
FrameSystemExtensionsCheckSpecVersion: 'Null', FrameSystemExtensionsCheckSpecVersion: 'Null',
/** /**
* Lookup671: frame_system::extensions::check_tx_version::CheckTxVersion<T> * Lookup670: frame_system::extensions::check_tx_version::CheckTxVersion<T>
**/ **/
FrameSystemExtensionsCheckTxVersion: 'Null', FrameSystemExtensionsCheckTxVersion: 'Null',
/** /**
* Lookup672: frame_system::extensions::check_genesis::CheckGenesis<T> * Lookup671: frame_system::extensions::check_genesis::CheckGenesis<T>
**/ **/
FrameSystemExtensionsCheckGenesis: 'Null', FrameSystemExtensionsCheckGenesis: 'Null',
/** /**
* Lookup675: frame_system::extensions::check_nonce::CheckNonce<T> * Lookup674: frame_system::extensions::check_nonce::CheckNonce<T>
**/ **/
FrameSystemExtensionsCheckNonce: 'Compact<u32>', FrameSystemExtensionsCheckNonce: 'Compact<u32>',
/** /**
* Lookup676: frame_system::extensions::check_weight::CheckWeight<T> * Lookup675: frame_system::extensions::check_weight::CheckWeight<T>
**/ **/
FrameSystemExtensionsCheckWeight: 'Null', FrameSystemExtensionsCheckWeight: 'Null',
/** /**
* Lookup677: pallet_asset_tx_payment::ChargeAssetTxPayment<T> * Lookup676: pallet_asset_tx_payment::ChargeAssetTxPayment<T>
**/ **/
PalletAssetTxPaymentChargeAssetTxPayment: { PalletAssetTxPaymentChargeAssetTxPayment: {
tip: 'Compact<u128>', tip: 'Compact<u128>',
assetId: 'Option<u32>' assetId: 'Option<u32>'
}, },
/** /**
* Lookup678: node_runtime::Runtime * Lookup677: node_runtime::Runtime
**/ **/
NodeRuntimeRuntime: 'Null' NodeRuntimeRuntime: 'Null'
}; };
@@ -77,7 +77,7 @@ declare module '@polkadot/types/lookup' {
readonly votes24: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>; readonly votes24: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
} }
/** @name KusamaRuntimeRuntime (779) */ /** @name KusamaRuntimeRuntime (777) */
type KusamaRuntimeRuntime = Null; type KusamaRuntimeRuntime = Null;
} // declare module } // declare module
@@ -6,7 +6,7 @@
import '@polkadot/types/lookup'; import '@polkadot/types/lookup';
import type { Data } from '@polkadot/types'; import type { Data } from '@polkadot/types';
import type { BTreeMap, Bytes, Compact, Enum, Null, Option, Result, Set, Struct, Text, U256, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { BTreeMap, Bytes, Compact, Enum, Null, Option, Result, Set, Struct, Text, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { ITuple } from '@polkadot/types-codec/types'; import type { ITuple } from '@polkadot/types-codec/types';
import type { Vote } from '@polkadot/types/interfaces/elections'; import type { Vote } from '@polkadot/types/interfaces/elections';
import type { OpaqueMultiaddr, OpaquePeerId } from '@polkadot/types/interfaces/imOnline'; import type { OpaqueMultiaddr, OpaquePeerId } from '@polkadot/types/interfaces/imOnline';
@@ -1401,7 +1401,27 @@ declare module '@polkadot/types/lookup' {
readonly collection: u32; readonly collection: u32;
readonly maxSupply: u32; readonly maxSupply: u32;
} & Struct; } & Struct;
readonly type: 'Created' | 'ForceCreated' | 'Destroyed' | 'Issued' | 'Transferred' | 'Burned' | 'Frozen' | 'Thawed' | 'CollectionFrozen' | 'CollectionThawed' | 'OwnerChanged' | 'TeamChanged' | 'ApprovedTransfer' | 'ApprovalCancelled' | 'ItemStatusChanged' | 'CollectionMetadataSet' | 'CollectionMetadataCleared' | 'MetadataSet' | 'MetadataCleared' | 'Redeposited' | 'AttributeSet' | 'AttributeCleared' | 'OwnershipAcceptanceChanged' | 'CollectionMaxSupplySet'; readonly isItemPriceSet: boolean;
readonly asItemPriceSet: {
readonly collection: u32;
readonly item: u32;
readonly price: u128;
readonly whitelistedBuyer: Option<AccountId32>;
} & Struct;
readonly isItemPriceRemoved: boolean;
readonly asItemPriceRemoved: {
readonly collection: u32;
readonly item: u32;
} & Struct;
readonly isItemBought: boolean;
readonly asItemBought: {
readonly collection: u32;
readonly item: u32;
readonly price: u128;
readonly seller: AccountId32;
readonly buyer: AccountId32;
} & Struct;
readonly type: 'Created' | 'ForceCreated' | 'Destroyed' | 'Issued' | 'Transferred' | 'Burned' | 'Frozen' | 'Thawed' | 'CollectionFrozen' | 'CollectionThawed' | 'OwnerChanged' | 'TeamChanged' | 'ApprovedTransfer' | 'ApprovalCancelled' | 'ItemStatusChanged' | 'CollectionMetadataSet' | 'CollectionMetadataCleared' | 'MetadataSet' | 'MetadataCleared' | 'Redeposited' | 'AttributeSet' | 'AttributeCleared' | 'OwnershipAcceptanceChanged' | 'CollectionMaxSupplySet' | 'ItemPriceSet' | 'ItemPriceRemoved' | 'ItemBought';
} }
/** @name PalletTransactionStorageEvent (100) */ /** @name PalletTransactionStorageEvent (100) */
@@ -2541,7 +2561,8 @@ declare module '@polkadot/types/lookup' {
readonly isRemoveMember: boolean; readonly isRemoveMember: boolean;
readonly asRemoveMember: { readonly asRemoveMember: {
readonly who: MultiAddress; readonly who: MultiAddress;
readonly hasReplacement: bool; readonly slashBond: bool;
readonly rerunElection: bool;
} & Struct; } & Struct;
readonly isCleanDefunctVoters: boolean; readonly isCleanDefunctVoters: boolean;
readonly asCleanDefunctVoters: { readonly asCleanDefunctVoters: {
@@ -3628,7 +3649,20 @@ declare module '@polkadot/types/lookup' {
readonly collection: u32; readonly collection: u32;
readonly maxSupply: u32; readonly maxSupply: u32;
} & Struct; } & Struct;
readonly type: 'Create' | 'ForceCreate' | 'Destroy' | 'Mint' | 'Burn' | 'Transfer' | 'Redeposit' | 'Freeze' | 'Thaw' | 'FreezeCollection' | 'ThawCollection' | 'TransferOwnership' | 'SetTeam' | 'ApproveTransfer' | 'CancelApproval' | 'ForceItemStatus' | 'SetAttribute' | 'ClearAttribute' | 'SetMetadata' | 'ClearMetadata' | 'SetCollectionMetadata' | 'ClearCollectionMetadata' | 'SetAcceptOwnership' | 'SetCollectionMaxSupply'; readonly isSetPrice: boolean;
readonly asSetPrice: {
readonly collection: u32;
readonly item: u32;
readonly price: Option<u128>;
readonly whitelistedBuyer: Option<MultiAddress>;
} & Struct;
readonly isBuyItem: boolean;
readonly asBuyItem: {
readonly collection: u32;
readonly item: u32;
readonly bidPrice: u128;
} & Struct;
readonly type: 'Create' | 'ForceCreate' | 'Destroy' | 'Mint' | 'Burn' | 'Transfer' | 'Redeposit' | 'Freeze' | 'Thaw' | 'FreezeCollection' | 'ThawCollection' | 'TransferOwnership' | 'SetTeam' | 'ApproveTransfer' | 'CancelApproval' | 'ForceItemStatus' | 'SetAttribute' | 'ClearAttribute' | 'SetMetadata' | 'ClearMetadata' | 'SetCollectionMetadata' | 'ClearCollectionMetadata' | 'SetAcceptOwnership' | 'SetCollectionMaxSupply' | 'SetPrice' | 'BuyItem';
} }
/** @name PalletUniquesDestroyWitness (337) */ /** @name PalletUniquesDestroyWitness (337) */
@@ -4620,8 +4654,8 @@ declare module '@polkadot/types/lookup' {
readonly isLowBalance: boolean; readonly isLowBalance: boolean;
readonly isUnableToPayBond: boolean; readonly isUnableToPayBond: boolean;
readonly isMustBeVoter: boolean; readonly isMustBeVoter: boolean;
readonly isReportSelf: boolean;
readonly isDuplicatedCandidate: boolean; readonly isDuplicatedCandidate: boolean;
readonly isTooManyCandidates: boolean;
readonly isMemberSubmit: boolean; readonly isMemberSubmit: boolean;
readonly isRunnerUpSubmit: boolean; readonly isRunnerUpSubmit: boolean;
readonly isInsufficientCandidateFunds: boolean; readonly isInsufficientCandidateFunds: boolean;
@@ -4630,7 +4664,7 @@ declare module '@polkadot/types/lookup' {
readonly isInvalidVoteCount: boolean; readonly isInvalidVoteCount: boolean;
readonly isInvalidRenouncing: boolean; readonly isInvalidRenouncing: boolean;
readonly isInvalidReplacement: boolean; readonly isInvalidReplacement: boolean;
readonly type: 'UnableToVote' | 'NoVotes' | 'TooManyVotes' | 'MaximumVotesExceeded' | 'LowBalance' | 'UnableToPayBond' | 'MustBeVoter' | 'ReportSelf' | 'DuplicatedCandidate' | 'MemberSubmit' | 'RunnerUpSubmit' | 'InsufficientCandidateFunds' | 'NotMember' | 'InvalidWitnessData' | 'InvalidVoteCount' | 'InvalidRenouncing' | 'InvalidReplacement'; readonly type: 'UnableToVote' | 'NoVotes' | 'TooManyVotes' | 'MaximumVotesExceeded' | 'LowBalance' | 'UnableToPayBond' | 'MustBeVoter' | 'DuplicatedCandidate' | 'TooManyCandidates' | 'MemberSubmit' | 'RunnerUpSubmit' | 'InsufficientCandidateFunds' | 'NotMember' | 'InvalidWitnessData' | 'InvalidVoteCount' | 'InvalidRenouncing' | 'InvalidReplacement';
} }
/** @name PalletMembershipError (469) */ /** @name PalletMembershipError (469) */
@@ -5386,7 +5420,7 @@ declare module '@polkadot/types/lookup' {
readonly isFrozen: bool; readonly isFrozen: bool;
} }
/** @name PalletUniquesError (589) */ /** @name PalletUniquesError (590) */
interface PalletUniquesError extends Enum { interface PalletUniquesError extends Enum {
readonly isNoPermission: boolean; readonly isNoPermission: boolean;
readonly isUnknownCollection: boolean; readonly isUnknownCollection: boolean;
@@ -5403,10 +5437,13 @@ declare module '@polkadot/types/lookup' {
readonly isMaxSupplyReached: boolean; readonly isMaxSupplyReached: boolean;
readonly isMaxSupplyAlreadySet: boolean; readonly isMaxSupplyAlreadySet: boolean;
readonly isMaxSupplyTooSmall: boolean; readonly isMaxSupplyTooSmall: boolean;
readonly type: 'NoPermission' | 'UnknownCollection' | 'AlreadyExists' | 'WrongOwner' | 'BadWitness' | 'InUse' | 'Frozen' | 'WrongDelegate' | 'NoDelegate' | 'Unapproved' | 'Unaccepted' | 'Locked' | 'MaxSupplyReached' | 'MaxSupplyAlreadySet' | 'MaxSupplyTooSmall'; readonly isUnknownItem: boolean;
readonly isNotForSale: boolean;
readonly isBidTooLow: boolean;
readonly type: 'NoPermission' | 'UnknownCollection' | 'AlreadyExists' | 'WrongOwner' | 'BadWitness' | 'InUse' | 'Frozen' | 'WrongDelegate' | 'NoDelegate' | 'Unapproved' | 'Unaccepted' | 'Locked' | 'MaxSupplyReached' | 'MaxSupplyAlreadySet' | 'MaxSupplyTooSmall' | 'UnknownItem' | 'NotForSale' | 'BidTooLow';
} }
/** @name PalletTransactionStorageTransactionInfo (591) */ /** @name PalletTransactionStorageTransactionInfo (592) */
interface PalletTransactionStorageTransactionInfo extends Struct { interface PalletTransactionStorageTransactionInfo extends Struct {
readonly chunkRoot: H256; readonly chunkRoot: H256;
readonly contentHash: H256; readonly contentHash: H256;
@@ -5414,7 +5451,7 @@ declare module '@polkadot/types/lookup' {
readonly blockChunks: u32; readonly blockChunks: u32;
} }
/** @name PalletTransactionStorageError (593) */ /** @name PalletTransactionStorageError (594) */
interface PalletTransactionStorageError extends Enum { interface PalletTransactionStorageError extends Enum {
readonly isInsufficientFunds: boolean; readonly isInsufficientFunds: boolean;
readonly isNotConfigured: boolean; readonly isNotConfigured: boolean;
@@ -5432,7 +5469,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'InsufficientFunds' | 'NotConfigured' | 'RenewedNotFound' | 'EmptyTransaction' | 'UnexpectedProof' | 'InvalidProof' | 'MissingProof' | 'MissingStateData' | 'DoubleCheck' | 'ProofNotChecked' | 'TransactionTooLarge' | 'TooManyTransactions' | 'BadContext'; readonly type: 'InsufficientFunds' | 'NotConfigured' | 'RenewedNotFound' | 'EmptyTransaction' | 'UnexpectedProof' | 'InvalidProof' | 'MissingProof' | 'MissingStateData' | 'DoubleCheck' | 'ProofNotChecked' | 'TransactionTooLarge' | 'TooManyTransactions' | 'BadContext';
} }
/** @name PalletBagsListListNode (594) */ /** @name PalletBagsListListNode (595) */
interface PalletBagsListListNode extends Struct { interface PalletBagsListListNode extends Struct {
readonly id: AccountId32; readonly id: AccountId32;
readonly prev: Option<AccountId32>; readonly prev: Option<AccountId32>;
@@ -5441,20 +5478,20 @@ declare module '@polkadot/types/lookup' {
readonly score: u64; readonly score: u64;
} }
/** @name PalletBagsListListBag (595) */ /** @name PalletBagsListListBag (596) */
interface PalletBagsListListBag extends Struct { interface PalletBagsListListBag extends Struct {
readonly head: Option<AccountId32>; readonly head: Option<AccountId32>;
readonly tail: Option<AccountId32>; readonly tail: Option<AccountId32>;
} }
/** @name PalletBagsListError (597) */ /** @name PalletBagsListError (598) */
interface PalletBagsListError extends Enum { interface PalletBagsListError extends Enum {
readonly isList: boolean; readonly isList: boolean;
readonly asList: PalletBagsListListListError; readonly asList: PalletBagsListListListError;
readonly type: 'List'; readonly type: 'List';
} }
/** @name PalletBagsListListListError (598) */ /** @name PalletBagsListListListError (599) */
interface PalletBagsListListListError extends Enum { interface PalletBagsListListListError extends Enum {
readonly isDuplicate: boolean; readonly isDuplicate: boolean;
readonly isNotHeavier: boolean; readonly isNotHeavier: boolean;
@@ -5463,7 +5500,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Duplicate' | 'NotHeavier' | 'NotInSameBag' | 'NodeNotFound'; readonly type: 'Duplicate' | 'NotHeavier' | 'NotInSameBag' | 'NodeNotFound';
} }
/** @name PalletStateTrieMigrationError (599) */ /** @name PalletStateTrieMigrationError (600) */
interface PalletStateTrieMigrationError extends Enum { interface PalletStateTrieMigrationError extends Enum {
readonly isMaxSignedLimits: boolean; readonly isMaxSignedLimits: boolean;
readonly isKeyTooLong: boolean; readonly isKeyTooLong: boolean;
@@ -5474,7 +5511,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'MaxSignedLimits' | 'KeyTooLong' | 'NotEnoughFunds' | 'BadWitness' | 'SizeUpperBoundExceeded' | 'SignedMigrationNotAllowed'; readonly type: 'MaxSignedLimits' | 'KeyTooLong' | 'NotEnoughFunds' | 'BadWitness' | 'SizeUpperBoundExceeded' | 'SignedMigrationNotAllowed';
} }
/** @name PalletChildBountiesChildBounty (600) */ /** @name PalletChildBountiesChildBounty (601) */
interface PalletChildBountiesChildBounty extends Struct { interface PalletChildBountiesChildBounty extends Struct {
readonly parentBounty: u32; readonly parentBounty: u32;
readonly value: u128; readonly value: u128;
@@ -5483,7 +5520,7 @@ declare module '@polkadot/types/lookup' {
readonly status: PalletChildBountiesChildBountyStatus; readonly status: PalletChildBountiesChildBountyStatus;
} }
/** @name PalletChildBountiesChildBountyStatus (601) */ /** @name PalletChildBountiesChildBountyStatus (602) */
interface PalletChildBountiesChildBountyStatus extends Enum { interface PalletChildBountiesChildBountyStatus extends Enum {
readonly isAdded: boolean; readonly isAdded: boolean;
readonly isCuratorProposed: boolean; readonly isCuratorProposed: boolean;
@@ -5503,7 +5540,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Added' | 'CuratorProposed' | 'Active' | 'PendingPayout'; readonly type: 'Added' | 'CuratorProposed' | 'Active' | 'PendingPayout';
} }
/** @name PalletChildBountiesError (602) */ /** @name PalletChildBountiesError (603) */
interface PalletChildBountiesError extends Enum { interface PalletChildBountiesError extends Enum {
readonly isParentBountyNotActive: boolean; readonly isParentBountyNotActive: boolean;
readonly isInsufficientBountyBalance: boolean; readonly isInsufficientBountyBalance: boolean;
@@ -5511,7 +5548,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'ParentBountyNotActive' | 'InsufficientBountyBalance' | 'TooManyChildBounties'; readonly type: 'ParentBountyNotActive' | 'InsufficientBountyBalance' | 'TooManyChildBounties';
} }
/** @name PalletReferendaReferendumInfoConvictionVotingTally (603) */ /** @name PalletReferendaReferendumInfoConvictionVotingTally (604) */
interface PalletReferendaReferendumInfoConvictionVotingTally extends Enum { interface PalletReferendaReferendumInfoConvictionVotingTally extends Enum {
readonly isOngoing: boolean; readonly isOngoing: boolean;
readonly asOngoing: PalletReferendaReferendumStatusConvictionVotingTally; readonly asOngoing: PalletReferendaReferendumStatusConvictionVotingTally;
@@ -5528,7 +5565,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Ongoing' | 'Approved' | 'Rejected' | 'Cancelled' | 'TimedOut' | 'Killed'; readonly type: 'Ongoing' | 'Approved' | 'Rejected' | 'Cancelled' | 'TimedOut' | 'Killed';
} }
/** @name PalletReferendaReferendumStatusConvictionVotingTally (604) */ /** @name PalletReferendaReferendumStatusConvictionVotingTally (605) */
interface PalletReferendaReferendumStatusConvictionVotingTally extends Struct { interface PalletReferendaReferendumStatusConvictionVotingTally extends Struct {
readonly track: u16; readonly track: u16;
readonly origin: NodeRuntimeOriginCaller; readonly origin: NodeRuntimeOriginCaller;
@@ -5543,19 +5580,19 @@ declare module '@polkadot/types/lookup' {
readonly alarm: Option<ITuple<[u32, ITuple<[u32, u32]>]>>; readonly alarm: Option<ITuple<[u32, ITuple<[u32, u32]>]>>;
} }
/** @name PalletReferendaDeposit (605) */ /** @name PalletReferendaDeposit (606) */
interface PalletReferendaDeposit extends Struct { interface PalletReferendaDeposit extends Struct {
readonly who: AccountId32; readonly who: AccountId32;
readonly amount: u128; readonly amount: u128;
} }
/** @name PalletReferendaDecidingStatus (608) */ /** @name PalletReferendaDecidingStatus (609) */
interface PalletReferendaDecidingStatus extends Struct { interface PalletReferendaDecidingStatus extends Struct {
readonly since: u32; readonly since: u32;
readonly confirming: Option<u32>; readonly confirming: Option<u32>;
} }
/** @name PalletReferendaError (612) */ /** @name PalletReferendaError (613) */
interface PalletReferendaError extends Enum { interface PalletReferendaError extends Enum {
readonly isNotOngoing: boolean; readonly isNotOngoing: boolean;
readonly isHasDeposit: boolean; readonly isHasDeposit: boolean;
@@ -5571,14 +5608,14 @@ declare module '@polkadot/types/lookup' {
readonly type: 'NotOngoing' | 'HasDeposit' | 'BadTrack' | 'Full' | 'QueueEmpty' | 'BadReferendum' | 'NothingToDo' | 'NoTrack' | 'Unfinished' | 'NoPermission' | 'NoDeposit'; readonly type: 'NotOngoing' | 'HasDeposit' | 'BadTrack' | 'Full' | 'QueueEmpty' | 'BadReferendum' | 'NothingToDo' | 'NoTrack' | 'Unfinished' | 'NoPermission' | 'NoDeposit';
} }
/** @name PalletRemarkError (613) */ /** @name PalletRemarkError (614) */
interface PalletRemarkError extends Enum { interface PalletRemarkError extends Enum {
readonly isEmpty: boolean; readonly isEmpty: boolean;
readonly isBadContext: boolean; readonly isBadContext: boolean;
readonly type: 'Empty' | 'BadContext'; readonly type: 'Empty' | 'BadContext';
} }
/** @name PalletConvictionVotingVoteVoting (615) */ /** @name PalletConvictionVotingVoteVoting (616) */
interface PalletConvictionVotingVoteVoting extends Enum { interface PalletConvictionVotingVoteVoting extends Enum {
readonly isCasting: boolean; readonly isCasting: boolean;
readonly asCasting: PalletConvictionVotingVoteCasting; readonly asCasting: PalletConvictionVotingVoteCasting;
@@ -5587,23 +5624,23 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Casting' | 'Delegating'; readonly type: 'Casting' | 'Delegating';
} }
/** @name PalletConvictionVotingVoteCasting (616) */ /** @name PalletConvictionVotingVoteCasting (617) */
interface PalletConvictionVotingVoteCasting extends Struct { interface PalletConvictionVotingVoteCasting extends Struct {
readonly votes: Vec<ITuple<[u32, PalletConvictionVotingVoteAccountVote]>>; readonly votes: Vec<ITuple<[u32, PalletConvictionVotingVoteAccountVote]>>;
readonly delegations: PalletConvictionVotingDelegations; readonly delegations: PalletConvictionVotingDelegations;
readonly prior: PalletConvictionVotingVotePriorLock; readonly prior: PalletConvictionVotingVotePriorLock;
} }
/** @name PalletConvictionVotingDelegations (620) */ /** @name PalletConvictionVotingDelegations (621) */
interface PalletConvictionVotingDelegations extends Struct { interface PalletConvictionVotingDelegations extends Struct {
readonly votes: u128; readonly votes: u128;
readonly capital: u128; readonly capital: u128;
} }
/** @name PalletConvictionVotingVotePriorLock (621) */ /** @name PalletConvictionVotingVotePriorLock (622) */
interface PalletConvictionVotingVotePriorLock extends ITuple<[u32, u128]> {} interface PalletConvictionVotingVotePriorLock extends ITuple<[u32, u128]> {}
/** @name PalletConvictionVotingVoteDelegating (622) */ /** @name PalletConvictionVotingVoteDelegating (623) */
interface PalletConvictionVotingVoteDelegating extends Struct { interface PalletConvictionVotingVoteDelegating extends Struct {
readonly balance: u128; readonly balance: u128;
readonly target: AccountId32; readonly target: AccountId32;
@@ -5612,7 +5649,7 @@ declare module '@polkadot/types/lookup' {
readonly prior: PalletConvictionVotingVotePriorLock; readonly prior: PalletConvictionVotingVotePriorLock;
} }
/** @name PalletConvictionVotingError (626) */ /** @name PalletConvictionVotingError (627) */
interface PalletConvictionVotingError extends Enum { interface PalletConvictionVotingError extends Enum {
readonly isNotOngoing: boolean; readonly isNotOngoing: boolean;
readonly isNotVoter: boolean; readonly isNotVoter: boolean;
@@ -5629,7 +5666,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'NotOngoing' | 'NotVoter' | 'NoPermission' | 'NoPermissionYet' | 'AlreadyDelegating' | 'AlreadyVoting' | 'InsufficientFunds' | 'NotDelegating' | 'Nonsense' | 'MaxVotesReached' | 'ClassNeeded' | 'BadClass'; readonly type: 'NotOngoing' | 'NotVoter' | 'NoPermission' | 'NoPermissionYet' | 'AlreadyDelegating' | 'AlreadyVoting' | 'InsufficientFunds' | 'NotDelegating' | 'Nonsense' | 'MaxVotesReached' | 'ClassNeeded' | 'BadClass';
} }
/** @name PalletWhitelistError (627) */ /** @name PalletWhitelistError (628) */
interface PalletWhitelistError extends Enum { interface PalletWhitelistError extends Enum {
readonly isUnavailablePreImage: boolean; readonly isUnavailablePreImage: boolean;
readonly isUndecodableCall: boolean; readonly isUndecodableCall: boolean;
@@ -5639,7 +5676,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'UnavailablePreImage' | 'UndecodableCall' | 'InvalidCallWeightWitness' | 'CallIsNotWhitelisted' | 'CallAlreadyWhitelisted'; readonly type: 'UnavailablePreImage' | 'UndecodableCall' | 'InvalidCallWeightWitness' | 'CallIsNotWhitelisted' | 'CallAlreadyWhitelisted';
} }
/** @name PalletAllianceMemberRole (632) */ /** @name PalletAllianceMemberRole (633) */
interface PalletAllianceMemberRole extends Enum { interface PalletAllianceMemberRole extends Enum {
readonly isFounder: boolean; readonly isFounder: boolean;
readonly isFellow: boolean; readonly isFellow: boolean;
@@ -5647,7 +5684,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Founder' | 'Fellow' | 'Ally'; readonly type: 'Founder' | 'Fellow' | 'Ally';
} }
/** @name PalletAllianceError (637) */ /** @name PalletAllianceError (638) */
interface PalletAllianceError extends Enum { interface PalletAllianceError extends Enum {
readonly isMembersAlreadyInitialized: boolean; readonly isMembersAlreadyInitialized: boolean;
readonly isAlreadyMember: boolean; readonly isAlreadyMember: boolean;
@@ -5673,15 +5710,15 @@ declare module '@polkadot/types/lookup' {
readonly type: 'MembersAlreadyInitialized' | 'AlreadyMember' | 'NotMember' | 'NotAlly' | 'NotFounder' | 'UpForKicking' | 'NoVotingRights' | 'AlreadyElevated' | 'AlreadyUnscrupulous' | 'AccountNonGrata' | 'NotListedAsUnscrupulous' | 'TooManyUnscrupulousItems' | 'TooLongWebsiteUrl' | 'InsufficientFunds' | 'WithoutIdentityDisplayAndWebsite' | 'WithoutGoodIdentityJudgement' | 'MissingProposalHash' | 'NotVetoableProposal' | 'MissingAnnouncement' | 'TooManyMembers' | 'TooManyAnnouncements'; readonly type: 'MembersAlreadyInitialized' | 'AlreadyMember' | 'NotMember' | 'NotAlly' | 'NotFounder' | 'UpForKicking' | 'NoVotingRights' | 'AlreadyElevated' | 'AlreadyUnscrupulous' | 'AccountNonGrata' | 'NotListedAsUnscrupulous' | 'TooManyUnscrupulousItems' | 'TooLongWebsiteUrl' | 'InsufficientFunds' | 'WithoutIdentityDisplayAndWebsite' | 'WithoutGoodIdentityJudgement' | 'MissingProposalHash' | 'NotVetoableProposal' | 'MissingAnnouncement' | 'TooManyMembers' | 'TooManyAnnouncements';
} }
/** @name PalletNominationPoolsPoolMember (638) */ /** @name PalletNominationPoolsPoolMember (639) */
interface PalletNominationPoolsPoolMember extends Struct { interface PalletNominationPoolsPoolMember extends Struct {
readonly poolId: u32; readonly poolId: u32;
readonly points: u128; readonly points: u128;
readonly rewardPoolTotalEarnings: u128; readonly lastRecordedRewardCounter: u128;
readonly unbondingEras: BTreeMap<u32, u128>; readonly unbondingEras: BTreeMap<u32, u128>;
} }
/** @name PalletNominationPoolsBondedPoolInner (641) */ /** @name PalletNominationPoolsBondedPoolInner (642) */
interface PalletNominationPoolsBondedPoolInner extends Struct { interface PalletNominationPoolsBondedPoolInner extends Struct {
readonly points: u128; readonly points: u128;
readonly state: PalletNominationPoolsPoolState; readonly state: PalletNominationPoolsPoolState;
@@ -5689,7 +5726,7 @@ declare module '@polkadot/types/lookup' {
readonly roles: PalletNominationPoolsPoolRoles; readonly roles: PalletNominationPoolsPoolRoles;
} }
/** @name PalletNominationPoolsPoolRoles (642) */ /** @name PalletNominationPoolsPoolRoles (643) */
interface PalletNominationPoolsPoolRoles extends Struct { interface PalletNominationPoolsPoolRoles extends Struct {
readonly depositor: AccountId32; readonly depositor: AccountId32;
readonly root: Option<AccountId32>; readonly root: Option<AccountId32>;
@@ -5697,26 +5734,26 @@ declare module '@polkadot/types/lookup' {
readonly stateToggler: Option<AccountId32>; readonly stateToggler: Option<AccountId32>;
} }
/** @name PalletNominationPoolsRewardPool (643) */ /** @name PalletNominationPoolsRewardPool (644) */
interface PalletNominationPoolsRewardPool extends Struct { interface PalletNominationPoolsRewardPool extends Struct {
readonly balance: u128; readonly lastRecordedRewardCounter: u128;
readonly totalEarnings: u128; readonly lastRecordedTotalPayouts: u128;
readonly points: U256; readonly totalRewardsClaimed: u128;
} }
/** @name PalletNominationPoolsSubPools (646) */ /** @name PalletNominationPoolsSubPools (645) */
interface PalletNominationPoolsSubPools extends Struct { interface PalletNominationPoolsSubPools extends Struct {
readonly noEra: PalletNominationPoolsUnbondPool; readonly noEra: PalletNominationPoolsUnbondPool;
readonly withEra: BTreeMap<u32, PalletNominationPoolsUnbondPool>; readonly withEra: BTreeMap<u32, PalletNominationPoolsUnbondPool>;
} }
/** @name PalletNominationPoolsUnbondPool (647) */ /** @name PalletNominationPoolsUnbondPool (646) */
interface PalletNominationPoolsUnbondPool extends Struct { interface PalletNominationPoolsUnbondPool extends Struct {
readonly points: u128; readonly points: u128;
readonly balance: u128; readonly balance: u128;
} }
/** @name PalletNominationPoolsError (653) */ /** @name PalletNominationPoolsError (652) */
interface PalletNominationPoolsError extends Enum { interface PalletNominationPoolsError extends Enum {
readonly isPoolNotFound: boolean; readonly isPoolNotFound: boolean;
readonly isPoolMemberNotFound: boolean; readonly isPoolMemberNotFound: boolean;
@@ -5729,7 +5766,6 @@ declare module '@polkadot/types/lookup' {
readonly isMinimumBondNotMet: boolean; readonly isMinimumBondNotMet: boolean;
readonly isOverflowRisk: boolean; readonly isOverflowRisk: boolean;
readonly isNotDestroying: boolean; readonly isNotDestroying: boolean;
readonly isNotOnlyPoolMember: boolean;
readonly isNotNominator: boolean; readonly isNotNominator: boolean;
readonly isNotKickerOrDestroying: boolean; readonly isNotKickerOrDestroying: boolean;
readonly isNotOpen: boolean; readonly isNotOpen: boolean;
@@ -5740,12 +5776,11 @@ declare module '@polkadot/types/lookup' {
readonly isMetadataExceedsMaxLen: boolean; readonly isMetadataExceedsMaxLen: boolean;
readonly isDefensive: boolean; readonly isDefensive: boolean;
readonly asDefensive: PalletNominationPoolsDefensiveError; readonly asDefensive: PalletNominationPoolsDefensiveError;
readonly isNotEnoughPointsToUnbond: boolean;
readonly isPartialUnbondNotAllowedPermissionlessly: boolean; readonly isPartialUnbondNotAllowedPermissionlessly: boolean;
readonly type: 'PoolNotFound' | 'PoolMemberNotFound' | 'RewardPoolNotFound' | 'SubPoolsNotFound' | 'AccountBelongsToOtherPool' | 'FullyUnbonding' | 'MaxUnbondingLimit' | 'CannotWithdrawAny' | 'MinimumBondNotMet' | 'OverflowRisk' | 'NotDestroying' | 'NotOnlyPoolMember' | 'NotNominator' | 'NotKickerOrDestroying' | 'NotOpen' | 'MaxPools' | 'MaxPoolMembers' | 'CanNotChangeState' | 'DoesNotHavePermission' | 'MetadataExceedsMaxLen' | 'Defensive' | 'NotEnoughPointsToUnbond' | 'PartialUnbondNotAllowedPermissionlessly'; readonly type: 'PoolNotFound' | 'PoolMemberNotFound' | 'RewardPoolNotFound' | 'SubPoolsNotFound' | 'AccountBelongsToOtherPool' | 'FullyUnbonding' | 'MaxUnbondingLimit' | 'CannotWithdrawAny' | 'MinimumBondNotMet' | 'OverflowRisk' | 'NotDestroying' | 'NotNominator' | 'NotKickerOrDestroying' | 'NotOpen' | 'MaxPools' | 'MaxPoolMembers' | 'CanNotChangeState' | 'DoesNotHavePermission' | 'MetadataExceedsMaxLen' | 'Defensive' | 'PartialUnbondNotAllowedPermissionlessly';
} }
/** @name PalletNominationPoolsDefensiveError (654) */ /** @name PalletNominationPoolsDefensiveError (653) */
interface PalletNominationPoolsDefensiveError extends Enum { interface PalletNominationPoolsDefensiveError extends Enum {
readonly isNotEnoughSpaceInUnbondPool: boolean; readonly isNotEnoughSpaceInUnbondPool: boolean;
readonly isPoolNotFound: boolean; readonly isPoolNotFound: boolean;
@@ -5755,7 +5790,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'NotEnoughSpaceInUnbondPool' | 'PoolNotFound' | 'RewardPoolNotFound' | 'SubPoolsNotFound' | 'BondedStashKilledPrematurely'; readonly type: 'NotEnoughSpaceInUnbondPool' | 'PoolNotFound' | 'RewardPoolNotFound' | 'SubPoolsNotFound' | 'BondedStashKilledPrematurely';
} }
/** @name PalletReferendaReferendumInfoRankedCollectiveTally (655) */ /** @name PalletReferendaReferendumInfoRankedCollectiveTally (654) */
interface PalletReferendaReferendumInfoRankedCollectiveTally extends Enum { interface PalletReferendaReferendumInfoRankedCollectiveTally extends Enum {
readonly isOngoing: boolean; readonly isOngoing: boolean;
readonly asOngoing: PalletReferendaReferendumStatusRankedCollectiveTally; readonly asOngoing: PalletReferendaReferendumStatusRankedCollectiveTally;
@@ -5772,7 +5807,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Ongoing' | 'Approved' | 'Rejected' | 'Cancelled' | 'TimedOut' | 'Killed'; readonly type: 'Ongoing' | 'Approved' | 'Rejected' | 'Cancelled' | 'TimedOut' | 'Killed';
} }
/** @name PalletReferendaReferendumStatusRankedCollectiveTally (656) */ /** @name PalletReferendaReferendumStatusRankedCollectiveTally (655) */
interface PalletReferendaReferendumStatusRankedCollectiveTally extends Struct { interface PalletReferendaReferendumStatusRankedCollectiveTally extends Struct {
readonly track: u16; readonly track: u16;
readonly origin: NodeRuntimeOriginCaller; readonly origin: NodeRuntimeOriginCaller;
@@ -5787,12 +5822,12 @@ declare module '@polkadot/types/lookup' {
readonly alarm: Option<ITuple<[u32, ITuple<[u32, u32]>]>>; readonly alarm: Option<ITuple<[u32, ITuple<[u32, u32]>]>>;
} }
/** @name PalletRankedCollectiveMemberRecord (659) */ /** @name PalletRankedCollectiveMemberRecord (658) */
interface PalletRankedCollectiveMemberRecord extends Struct { interface PalletRankedCollectiveMemberRecord extends Struct {
readonly rank: u16; readonly rank: u16;
} }
/** @name PalletRankedCollectiveError (663) */ /** @name PalletRankedCollectiveError (662) */
interface PalletRankedCollectiveError extends Enum { interface PalletRankedCollectiveError extends Enum {
readonly isAlreadyMember: boolean; readonly isAlreadyMember: boolean;
readonly isNotMember: boolean; readonly isNotMember: boolean;
@@ -5806,7 +5841,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'AlreadyMember' | 'NotMember' | 'NotPolling' | 'Ongoing' | 'NoneRemaining' | 'Corruption' | 'RankTooLow' | 'InvalidWitness' | 'NoPermission'; readonly type: 'AlreadyMember' | 'NotMember' | 'NotPolling' | 'Ongoing' | 'NoneRemaining' | 'Corruption' | 'RankTooLow' | 'InvalidWitness' | 'NoPermission';
} }
/** @name SpRuntimeMultiSignature (665) */ /** @name SpRuntimeMultiSignature (664) */
interface SpRuntimeMultiSignature extends Enum { interface SpRuntimeMultiSignature extends Enum {
readonly isEd25519: boolean; readonly isEd25519: boolean;
readonly asEd25519: SpCoreEd25519Signature; readonly asEd25519: SpCoreEd25519Signature;
@@ -5817,34 +5852,34 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Ed25519' | 'Sr25519' | 'Ecdsa'; readonly type: 'Ed25519' | 'Sr25519' | 'Ecdsa';
} }
/** @name SpCoreEcdsaSignature (666) */ /** @name SpCoreEcdsaSignature (665) */
interface SpCoreEcdsaSignature extends U8aFixed {} interface SpCoreEcdsaSignature extends U8aFixed {}
/** @name FrameSystemExtensionsCheckNonZeroSender (669) */ /** @name FrameSystemExtensionsCheckNonZeroSender (668) */
type FrameSystemExtensionsCheckNonZeroSender = Null; type FrameSystemExtensionsCheckNonZeroSender = Null;
/** @name FrameSystemExtensionsCheckSpecVersion (670) */ /** @name FrameSystemExtensionsCheckSpecVersion (669) */
type FrameSystemExtensionsCheckSpecVersion = Null; type FrameSystemExtensionsCheckSpecVersion = Null;
/** @name FrameSystemExtensionsCheckTxVersion (671) */ /** @name FrameSystemExtensionsCheckTxVersion (670) */
type FrameSystemExtensionsCheckTxVersion = Null; type FrameSystemExtensionsCheckTxVersion = Null;
/** @name FrameSystemExtensionsCheckGenesis (672) */ /** @name FrameSystemExtensionsCheckGenesis (671) */
type FrameSystemExtensionsCheckGenesis = Null; type FrameSystemExtensionsCheckGenesis = Null;
/** @name FrameSystemExtensionsCheckNonce (675) */ /** @name FrameSystemExtensionsCheckNonce (674) */
interface FrameSystemExtensionsCheckNonce extends Compact<u32> {} interface FrameSystemExtensionsCheckNonce extends Compact<u32> {}
/** @name FrameSystemExtensionsCheckWeight (676) */ /** @name FrameSystemExtensionsCheckWeight (675) */
type FrameSystemExtensionsCheckWeight = Null; type FrameSystemExtensionsCheckWeight = Null;
/** @name PalletAssetTxPaymentChargeAssetTxPayment (677) */ /** @name PalletAssetTxPaymentChargeAssetTxPayment (676) */
interface PalletAssetTxPaymentChargeAssetTxPayment extends Struct { interface PalletAssetTxPaymentChargeAssetTxPayment extends Struct {
readonly tip: Compact<u128>; readonly tip: Compact<u128>;
readonly assetId: Option<u32>; readonly assetId: Option<u32>;
} }
/** @name NodeRuntimeRuntime (678) */ /** @name NodeRuntimeRuntime (677) */
type NodeRuntimeRuntime = Null; type NodeRuntimeRuntime = Null;
} // declare module } // declare module
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '8.12.1' }; export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '8.13.1' };
@@ -42,6 +42,7 @@ import type { AuthIndex, AuthoritySignature, Heartbeat, HeartbeatTo244, OpaqueMu
import type { CallIndex, LotteryConfig } from '@polkadot/types/interfaces/lottery'; import type { CallIndex, LotteryConfig } from '@polkadot/types/interfaces/lottery';
import type { ErrorMetadataLatest, ErrorMetadataV10, ErrorMetadataV11, ErrorMetadataV12, ErrorMetadataV13, ErrorMetadataV14, ErrorMetadataV9, EventMetadataLatest, EventMetadataV10, EventMetadataV11, EventMetadataV12, EventMetadataV13, EventMetadataV14, EventMetadataV9, ExtrinsicMetadataLatest, ExtrinsicMetadataV11, ExtrinsicMetadataV12, ExtrinsicMetadataV13, ExtrinsicMetadataV14, FunctionArgumentMetadataLatest, FunctionArgumentMetadataV10, FunctionArgumentMetadataV11, FunctionArgumentMetadataV12, FunctionArgumentMetadataV13, FunctionArgumentMetadataV14, FunctionArgumentMetadataV9, FunctionMetadataLatest, FunctionMetadataV10, FunctionMetadataV11, FunctionMetadataV12, FunctionMetadataV13, FunctionMetadataV14, FunctionMetadataV9, MetadataAll, MetadataLatest, MetadataV10, MetadataV11, MetadataV12, MetadataV13, MetadataV14, MetadataV9, ModuleConstantMetadataV10, ModuleConstantMetadataV11, ModuleConstantMetadataV12, ModuleConstantMetadataV13, ModuleConstantMetadataV9, ModuleMetadataV10, ModuleMetadataV11, ModuleMetadataV12, ModuleMetadataV13, ModuleMetadataV9, OpaqueMetadata, PalletCallMetadataLatest, PalletCallMetadataV14, PalletConstantMetadataLatest, PalletConstantMetadataV14, PalletErrorMetadataLatest, PalletErrorMetadataV14, PalletEventMetadataLatest, PalletEventMetadataV14, PalletMetadataLatest, PalletMetadataV14, PalletStorageMetadataLatest, PalletStorageMetadataV14, PortableType, PortableTypeV14, SignedExtensionMetadataLatest, SignedExtensionMetadataV14, StorageEntryMetadataLatest, StorageEntryMetadataV10, StorageEntryMetadataV11, StorageEntryMetadataV12, StorageEntryMetadataV13, StorageEntryMetadataV14, StorageEntryMetadataV9, StorageEntryModifierLatest, StorageEntryModifierV10, StorageEntryModifierV11, StorageEntryModifierV12, StorageEntryModifierV13, StorageEntryModifierV14, StorageEntryModifierV9, StorageEntryTypeLatest, StorageEntryTypeV10, StorageEntryTypeV11, StorageEntryTypeV12, StorageEntryTypeV13, StorageEntryTypeV14, StorageEntryTypeV9, StorageHasher, StorageHasherV10, StorageHasherV11, StorageHasherV12, StorageHasherV13, StorageHasherV14, StorageHasherV9, StorageMetadataV10, StorageMetadataV11, StorageMetadataV12, StorageMetadataV13, StorageMetadataV9 } from '@polkadot/types/interfaces/metadata'; import type { ErrorMetadataLatest, ErrorMetadataV10, ErrorMetadataV11, ErrorMetadataV12, ErrorMetadataV13, ErrorMetadataV14, ErrorMetadataV9, EventMetadataLatest, EventMetadataV10, EventMetadataV11, EventMetadataV12, EventMetadataV13, EventMetadataV14, EventMetadataV9, ExtrinsicMetadataLatest, ExtrinsicMetadataV11, ExtrinsicMetadataV12, ExtrinsicMetadataV13, ExtrinsicMetadataV14, FunctionArgumentMetadataLatest, FunctionArgumentMetadataV10, FunctionArgumentMetadataV11, FunctionArgumentMetadataV12, FunctionArgumentMetadataV13, FunctionArgumentMetadataV14, FunctionArgumentMetadataV9, FunctionMetadataLatest, FunctionMetadataV10, FunctionMetadataV11, FunctionMetadataV12, FunctionMetadataV13, FunctionMetadataV14, FunctionMetadataV9, MetadataAll, MetadataLatest, MetadataV10, MetadataV11, MetadataV12, MetadataV13, MetadataV14, MetadataV9, ModuleConstantMetadataV10, ModuleConstantMetadataV11, ModuleConstantMetadataV12, ModuleConstantMetadataV13, ModuleConstantMetadataV9, ModuleMetadataV10, ModuleMetadataV11, ModuleMetadataV12, ModuleMetadataV13, ModuleMetadataV9, OpaqueMetadata, PalletCallMetadataLatest, PalletCallMetadataV14, PalletConstantMetadataLatest, PalletConstantMetadataV14, PalletErrorMetadataLatest, PalletErrorMetadataV14, PalletEventMetadataLatest, PalletEventMetadataV14, PalletMetadataLatest, PalletMetadataV14, PalletStorageMetadataLatest, PalletStorageMetadataV14, PortableType, PortableTypeV14, SignedExtensionMetadataLatest, SignedExtensionMetadataV14, StorageEntryMetadataLatest, StorageEntryMetadataV10, StorageEntryMetadataV11, StorageEntryMetadataV12, StorageEntryMetadataV13, StorageEntryMetadataV14, StorageEntryMetadataV9, StorageEntryModifierLatest, StorageEntryModifierV10, StorageEntryModifierV11, StorageEntryModifierV12, StorageEntryModifierV13, StorageEntryModifierV14, StorageEntryModifierV9, StorageEntryTypeLatest, StorageEntryTypeV10, StorageEntryTypeV11, StorageEntryTypeV12, StorageEntryTypeV13, StorageEntryTypeV14, StorageEntryTypeV9, StorageHasher, StorageHasherV10, StorageHasherV11, StorageHasherV12, StorageHasherV13, StorageHasherV14, StorageHasherV9, StorageMetadataV10, StorageMetadataV11, StorageMetadataV12, StorageMetadataV13, StorageMetadataV9 } from '@polkadot/types/interfaces/metadata';
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafBatchProof, MmrLeafIndex, MmrLeafProof, MmrNodeIndex, MmrProof } from '@polkadot/types/interfaces/mmr'; import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafBatchProof, MmrLeafIndex, MmrLeafProof, MmrNodeIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
import type { NpApiError } from '@polkadot/types/interfaces/nompools';
import type { StorageKind } from '@polkadot/types/interfaces/offchain'; import type { StorageKind } from '@polkadot/types/interfaces/offchain';
import type { DeferredOffenceOf, Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences'; import type { DeferredOffenceOf, Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences';
import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateEvent, CandidateHash, CandidateInfo, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, CoreAssignment, CoreIndex, CoreOccupied, CoreState, DisputeLocation, DisputeResult, DisputeState, DisputeStatement, DisputeStatementSet, DoubleVoteReport, DownwardMessage, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, GroupRotationInfo, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InvalidDisputeStatementKind, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiDisputeStatementSet, NewBidder, OccupiedCore, OccupiedCoreAssumption, OldV1SessionInfo, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, PvfCheckStatement, QueuedParathread, RegisteredParachainInfo, RelayBlockNumber, RelayChainBlockNumber, RelayChainHash, RelayHash, Remark, ReplacementTimes, Retriable, ScheduledCore, Scheduling, ScrapedOnChainVotes, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, SlotRange10, Statement, SubId, SystemInherentData, TransientValidationData, UpgradeGoAhead, UpgradeRestriction, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationCodeHash, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, WinnersData, WinnersData10, WinnersDataTuple, WinnersDataTuple10, WinningData, WinningData10, WinningDataEntry } from '@polkadot/types/interfaces/parachains'; import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateEvent, CandidateHash, CandidateInfo, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, CoreAssignment, CoreIndex, CoreOccupied, CoreState, DisputeLocation, DisputeResult, DisputeState, DisputeStatement, DisputeStatementSet, DoubleVoteReport, DownwardMessage, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, GroupRotationInfo, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InvalidDisputeStatementKind, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiDisputeStatementSet, NewBidder, OccupiedCore, OccupiedCoreAssumption, OldV1SessionInfo, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, PvfCheckStatement, QueuedParathread, RegisteredParachainInfo, RelayBlockNumber, RelayChainBlockNumber, RelayChainHash, RelayHash, Remark, ReplacementTimes, Retriable, ScheduledCore, Scheduling, ScrapedOnChainVotes, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, SlotRange10, Statement, SubId, SystemInherentData, TransientValidationData, UpgradeGoAhead, UpgradeRestriction, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationCodeHash, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, WinnersData, WinnersData10, WinnersDataTuple, WinnersDataTuple10, WinningData, WinningData10, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
@@ -59,7 +60,7 @@ import type { Bid, BidKind, SocietyJudgement, SocietyVote, StrikeCount, Vouching
import type { ActiveEraInfo, CompactAssignments, CompactAssignmentsTo257, CompactAssignmentsTo265, CompactAssignmentsWith16, CompactAssignmentsWith24, CompactScore, CompactScoreCompact, ElectionCompute, ElectionPhase, ElectionResult, ElectionScore, ElectionSize, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, ExtendedBalance, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, NominatorIndex, NominatorIndexCompact, OffchainAccuracy, OffchainAccuracyCompact, PhragmenScore, Points, RawSolution, RawSolutionTo265, RawSolutionWith16, RawSolutionWith24, ReadySolution, RewardDestination, RewardPoint, RoundSnapshot, SeatHolder, SignedSubmission, SignedSubmissionOf, SignedSubmissionTo276, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SolutionOrSnapshotSize, SolutionSupport, SolutionSupports, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, StakingLedgerTo240, SubmissionIndicesOf, Supports, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorIndexCompact, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196, ValidatorPrefsWithBlocked, ValidatorPrefsWithCommission, VoteWeight, Voter } from '@polkadot/types/interfaces/staking'; import type { ActiveEraInfo, CompactAssignments, CompactAssignmentsTo257, CompactAssignmentsTo265, CompactAssignmentsWith16, CompactAssignmentsWith24, CompactScore, CompactScoreCompact, ElectionCompute, ElectionPhase, ElectionResult, ElectionScore, ElectionSize, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, ExtendedBalance, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, NominatorIndex, NominatorIndexCompact, OffchainAccuracy, OffchainAccuracyCompact, PhragmenScore, Points, RawSolution, RawSolutionTo265, RawSolutionWith16, RawSolutionWith24, ReadySolution, RewardDestination, RewardPoint, RoundSnapshot, SeatHolder, SignedSubmission, SignedSubmissionOf, SignedSubmissionTo276, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SolutionOrSnapshotSize, SolutionSupport, SolutionSupports, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, StakingLedgerTo240, SubmissionIndicesOf, Supports, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorIndexCompact, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196, ValidatorPrefsWithBlocked, ValidatorPrefsWithCommission, VoteWeight, Voter } from '@polkadot/types/interfaces/staking';
import type { ApiId, BlockTrace, BlockTraceEvent, BlockTraceEventData, BlockTraceSpan, KeyValueOption, MigrationStatusResult, ReadProof, RuntimeVersion, RuntimeVersionApi, RuntimeVersionPartial, RuntimeVersionPre3, RuntimeVersionPre4, SpecVersion, StorageChangeSet, TraceBlockResponse, TraceError } from '@polkadot/types/interfaces/state'; import type { ApiId, BlockTrace, BlockTraceEvent, BlockTraceEventData, BlockTraceSpan, KeyValueOption, MigrationStatusResult, ReadProof, RuntimeVersion, RuntimeVersionApi, RuntimeVersionPartial, RuntimeVersionPre3, RuntimeVersionPre4, SpecVersion, StorageChangeSet, TraceBlockResponse, TraceError } from '@polkadot/types/interfaces/state';
import type { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support'; import type { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';
import type { AccountInfo, AccountInfoWithDualRefCount, AccountInfoWithProviders, AccountInfoWithRefCount, AccountInfoWithRefCountU8, AccountInfoWithTripleRefCount, ApplyExtrinsicResult, ApplyExtrinsicResultPre6, ArithmeticError, BlockLength, BlockWeights, ChainProperties, ChainType, ConsumedWeight, DigestOf, DispatchClass, DispatchError, DispatchErrorModule, DispatchErrorModulePre6, DispatchErrorModuleU8, DispatchErrorModuleU8a, DispatchErrorPre6, DispatchErrorTo198, DispatchInfo, DispatchInfoTo190, DispatchInfoTo244, DispatchOutcome, DispatchOutcomePre6, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, Health, InvalidTransaction, Key, LastRuntimeUpgradeInfo, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NodeRole, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, PerDispatchClassU32, PerDispatchClassWeight, PerDispatchClassWeightsPerClass, Phase, RawOrigin, RefCount, RefCountTo259, SyncState, SystemOrigin, TokenError, TransactionValidityError, TransactionalError, UnknownTransaction, WeightPerClass } from '@polkadot/types/interfaces/system'; import type { AccountInfo, AccountInfoWithDualRefCount, AccountInfoWithProviders, AccountInfoWithRefCount, AccountInfoWithRefCountU8, AccountInfoWithTripleRefCount, ApplyExtrinsicResult, ApplyExtrinsicResultPre6, ArithmeticError, BlockLength, BlockWeights, ChainProperties, ChainType, ConsumedWeight, DigestOf, DispatchClass, DispatchError, DispatchErrorModule, DispatchErrorModulePre6, DispatchErrorModuleU8, DispatchErrorModuleU8a, DispatchErrorPre6, DispatchErrorPre6First, DispatchErrorTo198, DispatchInfo, DispatchInfoTo190, DispatchInfoTo244, DispatchOutcome, DispatchOutcomePre6, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, Health, InvalidTransaction, Key, LastRuntimeUpgradeInfo, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NodeRole, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, PerDispatchClassU32, PerDispatchClassWeight, PerDispatchClassWeightsPerClass, Phase, RawOrigin, RefCount, RefCountTo259, SyncState, SystemOrigin, TokenError, TransactionValidityError, TransactionalError, UnknownTransaction, WeightPerClass } from '@polkadot/types/interfaces/system';
import type { Bounty, BountyIndex, BountyStatus, BountyStatusActive, BountyStatusCuratorProposed, BountyStatusPendingPayout, OpenTip, OpenTipFinderTo225, OpenTipTip, OpenTipTo225, TreasuryProposal } from '@polkadot/types/interfaces/treasury'; import type { Bounty, BountyIndex, BountyStatus, BountyStatusActive, BountyStatusCuratorProposed, BountyStatusPendingPayout, OpenTip, OpenTipFinderTo225, OpenTipTip, OpenTipTo225, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
import type { Multiplier } from '@polkadot/types/interfaces/txpayment'; import type { Multiplier } from '@polkadot/types/interfaces/txpayment';
import type { TransactionSource, TransactionValidity, ValidTransaction } from '@polkadot/types/interfaces/txqueue'; import type { TransactionSource, TransactionValidity, ValidTransaction } from '@polkadot/types/interfaces/txqueue';
@@ -330,6 +331,7 @@ declare module '@polkadot/types/types/registry' {
DispatchErrorModuleU8: DispatchErrorModuleU8; DispatchErrorModuleU8: DispatchErrorModuleU8;
DispatchErrorModuleU8a: DispatchErrorModuleU8a; DispatchErrorModuleU8a: DispatchErrorModuleU8a;
DispatchErrorPre6: DispatchErrorPre6; DispatchErrorPre6: DispatchErrorPre6;
DispatchErrorPre6First: DispatchErrorPre6First;
DispatchErrorTo198: DispatchErrorTo198; DispatchErrorTo198: DispatchErrorTo198;
DispatchFeePayment: DispatchFeePayment; DispatchFeePayment: DispatchFeePayment;
DispatchInfo: DispatchInfo; DispatchInfo: DispatchInfo;
@@ -688,6 +690,7 @@ declare module '@polkadot/types/types/registry' {
NominatorIndex: NominatorIndex; NominatorIndex: NominatorIndex;
NominatorIndexCompact: NominatorIndexCompact; NominatorIndexCompact: NominatorIndexCompact;
NotConnectedPeer: NotConnectedPeer; NotConnectedPeer: NotConnectedPeer;
NpApiError: NpApiError;
Null: Null; Null: Null;
OccupiedCore: OccupiedCore; OccupiedCore: OccupiedCore;
OccupiedCoreAssumption: OccupiedCoreAssumption; OccupiedCoreAssumption: OccupiedCoreAssumption;
+7 -7
View File
@@ -20,17 +20,17 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "8.12.1", "version": "8.13.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.6", "@babel/runtime": "^7.18.6",
"@polkadot/util": "^10.0.1", "@polkadot/util": "^10.0.2",
"@polkadot/x-bigint": "^10.0.1" "@polkadot/x-bigint": "^10.0.2"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/types": "8.12.1", "@polkadot/types": "8.13.1",
"@polkadot/types-augment": "8.12.1", "@polkadot/types-augment": "8.13.1",
"@polkadot/types-support": "8.12.1", "@polkadot/types-support": "8.13.1",
"@polkadot/util-crypto": "^10.0.1" "@polkadot/util-crypto": "^10.0.2"
} }
} }
+4 -2
View File
@@ -119,7 +119,7 @@ export abstract class AbstractArray<T extends Codec> extends Array<T> implements
const result = new Array<AnyJson>(this.length); const result = new Array<AnyJson>(this.length);
for (let i = 0; i < this.length; i++) { for (let i = 0; i < this.length; i++) {
result[i] = this[i].toHuman(isExtended); result[i] = this[i] && this[i].toHuman(isExtended);
} }
return result; return result;
@@ -132,7 +132,9 @@ export abstract class AbstractArray<T extends Codec> extends Array<T> implements
const result = new Array<AnyJson>(this.length); const result = new Array<AnyJson>(this.length);
for (let i = 0; i < this.length; i++) { for (let i = 0; i < this.length; i++) {
result[i] = this[i].toJSON(); // We actually log inside the U8a decoding and use JSON.stringify(...), which
// means that the Vec may be partially populated (same applies to toHuman, same check)
result[i] = this[i] && this[i].toJSON();
} }
return result; return result;
@@ -285,6 +285,8 @@ export class Struct<
for (const [k, v] of this.entries()) { for (const [k, v] of this.entries()) {
const jsonKey = this.#jsonMap.get(k) || k; const jsonKey = this.#jsonMap.get(k) || k;
// We actually log inside the U8a decoding and use JSON.stringify(...), which
// means that the Vec may be partially populated (same applies to toHuman, same check)
json[jsonKey as string] = v && v.toJSON(); json[jsonKey as string] = v && v.toJSON();
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-codec', path: 'auto', type: 'auto', version: '8.12.1' }; export const packageInfo = { name: '@polkadot/types-codec', path: 'auto', type: 'auto', version: '8.13.1' };
+6 -4
View File
@@ -6,7 +6,7 @@ import type { Codec, CodecClass, Registry } from '../types';
import { u8aToHex } from '@polkadot/util'; import { u8aToHex } from '@polkadot/util';
/** @internal */ /** @internal */
function formatFailure (registry: Registry, { message }: Error, u8a: Uint8Array, i: number, count: number, Type: CodecClass, key?: string): string { function formatFailure (registry: Registry, result: unknown[], { message }: Error, u8a: Uint8Array, i: number, count: number, Type: CodecClass, key?: string): string {
let type = ''; let type = '';
try { try {
@@ -15,6 +15,8 @@ function formatFailure (registry: Registry, { message }: Error, u8a: Uint8Array,
// ignore // ignore
} }
// 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}/${count})${type}:: ${message}`;
} }
@@ -42,7 +44,7 @@ export function decodeU8a <T extends Codec = Codec> (registry: Registry, result:
i++; i++;
} }
} catch (error) { } catch (error) {
throw new Error(formatFailure(registry, error as Error, u8a.subarray(offset), i, count, Types[i], keys[i])); throw new Error(formatFailure(registry, result, error as Error, u8a.subarray(offset), i, count, Types[i], keys[i]));
} }
return [result, offset]; return [result, offset];
@@ -68,7 +70,7 @@ export function decodeU8aStruct (registry: Registry, result: [string, Codec][],
i++; i++;
} }
} catch (error) { } catch (error) {
throw new Error(formatFailure(registry, error as Error, u8a.subarray(offset), i, count, Types[i], keys[i])); throw new Error(formatFailure(registry, result, error as Error, u8a.subarray(offset), i, count, Types[i], keys[i]));
} }
return [result, offset]; return [result, offset];
@@ -94,7 +96,7 @@ export function decodeU8aVec <T extends Codec = Codec> (registry: Registry, resu
i++; i++;
} }
} catch (error) { } catch (error) {
throw new Error(formatFailure(registry, error as Error, u8a.subarray(offset), i, count, Type)); throw new Error(formatFailure(registry, result, error as Error, u8a.subarray(offset), i, count, Type));
} }
return [offset, offset - startAt]; return [offset, offset - startAt];
+4 -4
View File
@@ -20,14 +20,14 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "8.12.1", "version": "8.13.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.6", "@babel/runtime": "^7.18.6",
"@polkadot/types-codec": "8.12.1", "@polkadot/types-codec": "8.13.1",
"@polkadot/util": "^10.0.1" "@polkadot/util": "^10.0.2"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/types": "8.12.1" "@polkadot/types": "8.13.1"
} }
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-create', path: 'auto', type: 'auto', version: '8.12.1' }; export const packageInfo = { name: '@polkadot/types-create', path: 'auto', type: 'auto', version: '8.13.1' };
+6 -6
View File
@@ -20,14 +20,14 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "8.12.1", "version": "8.13.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.6", "@babel/runtime": "^7.18.6",
"@polkadot/networks": "^10.0.1", "@polkadot/networks": "^10.0.2",
"@polkadot/types": "8.12.1", "@polkadot/types": "8.13.1",
"@polkadot/types-codec": "8.12.1", "@polkadot/types-codec": "8.13.1",
"@polkadot/types-create": "8.12.1", "@polkadot/types-create": "8.13.1",
"@polkadot/util": "^10.0.1" "@polkadot/util": "^10.0.2"
} }
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-known', path: 'auto', type: 'auto', version: '8.12.1' }; export const packageInfo = { name: '@polkadot/types-known', path: 'auto', type: 'auto', version: '8.13.1' };
+5 -1
View File
@@ -28,7 +28,11 @@ const sharedTypes = {
const versioned: OverrideVersionedType[] = [ const versioned: OverrideVersionedType[] = [
{ {
minmax: [0, 3], minmax: [0, 3],
types: objectSpread({}, sharedTypes, mapXcmTypes('V0')) types: objectSpread({
// Enum was modified mid-flight -
// https://github.com/paritytech/substrate/pull/10382/files#diff-e4e016b33a82268b6208dc974eea841bad47597865a749fee2f937eb6fdf67b4R498
DispatchError: 'DispatchErrorPre6First'
}, sharedTypes, mapXcmTypes('V0'))
}, },
{ {
minmax: [4, 5], minmax: [4, 5],
+1 -1
View File
@@ -16,7 +16,7 @@ const upgrades: ChainUpgradesRaw = [
[7812476, 9040], [8010981, 9050], [8073833, 9070], [8555825, 9080], [8945245, 9090], [7812476, 9040], [8010981, 9050], [8073833, 9070], [8555825, 9080], [8945245, 9090],
[9611377, 9100], [9625129, 9111], [9866422, 9122], [10403784, 9130], [10960765, 9150], [9611377, 9100], [9625129, 9111], [9866422, 9122], [10403784, 9130], [10960765, 9150],
[11006614, 9151], [11404482, 9160], [11601803, 9170], [12008022, 9180], [12405451, 9190], [11006614, 9151], [11404482, 9160], [11601803, 9170], [12008022, 9180], [12405451, 9190],
[12665416, 9200], [12909508, 9220], [13109752, 9230] [12665416, 9200], [12909508, 9220], [13109752, 9230], [13555777, 9250]
]; ];
export default upgrades; export default upgrades;
+2 -2
View File
@@ -20,10 +20,10 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "8.12.1", "version": "8.13.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.6", "@babel/runtime": "^7.18.6",
"@polkadot/util": "^10.0.1" "@polkadot/util": "^10.0.2"
} }
} }
File diff suppressed because one or more lines are too long
@@ -5050,7 +5050,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 4, "key": 4,
"value": 673 "value": 671
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -5079,7 +5079,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 4, "key": 4,
"value": 679 "value": 677
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -5158,20 +5158,27 @@
] ]
}, },
{ {
"name": "MinPointsToBalance", "name": "MaxPointsToBalance",
"type": 4, "type": 2,
"value": "0x0a000000", "value": "0x0a",
"docs": [ "docs": [
" The minimum pool points-to-balance ratio that must be maintained for it to be `open`.", " The maximum pool points-to-balance ratio that an `open` pool can have.",
"",
" This is important in the event slashing takes place and the pool's points-to-balance", " This is important in the event slashing takes place and the pool's points-to-balance",
" ratio becomes disproportional.", " ratio becomes disproportional.",
"",
" Moreover, this relates to the `RewardCounter` type as well, as the arithmetic operations",
" are a function of number of points, and by setting this value to e.g. 10, you ensure",
" that the total number of points in the system are at most 10 times the total_issuance of",
" the chain, in the absolute worse case.",
"",
" For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1.", " For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1.",
" Such a scenario would also be the equivalent of the pool being 90% slashed." " Such a scenario would also be the equivalent of the pool being 90% slashed."
] ]
} }
], ],
"errors": { "errors": {
"type": 680 "type": 678
}, },
"index": 41 "index": 41
}, },
@@ -5193,7 +5200,7 @@
"name": "ActiveConfig", "name": "ActiveConfig",
"modifier": "Default", "modifier": "Default",
"type": { "type": {
"plain": 682 "plain": 680
}, },
"fallback": "0x00000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000100000001000000000000000000060000006400000002000000c8000000010000000000000000000000000000000000000000c817a804000000000200000002000000", "fallback": "0x00000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000100000001000000000000000000060000006400000002000000c8000000010000000000000000000000000000000000000000c817a804000000000200000002000000",
"docs": [ "docs": [
@@ -5204,7 +5211,7 @@
"name": "PendingConfigs", "name": "PendingConfigs",
"modifier": "Default", "modifier": "Default",
"type": { "type": {
"plain": 683 "plain": 681
}, },
"fallback": "0x00", "fallback": "0x00",
"docs": [ "docs": [
@@ -5237,7 +5244,7 @@
"events": null, "events": null,
"constants": [], "constants": [],
"errors": { "errors": {
"type": 685 "type": 683
}, },
"index": 51 "index": 51
}, },
@@ -5261,7 +5268,7 @@
"name": "ActiveValidatorIndices", "name": "ActiveValidatorIndices",
"modifier": "Default", "modifier": "Default",
"type": { "type": {
"plain": 686 "plain": 684
}, },
"fallback": "0x00", "fallback": "0x00",
"docs": [ "docs": [
@@ -5273,7 +5280,7 @@
"name": "ActiveValidatorKeys", "name": "ActiveValidatorKeys",
"modifier": "Default", "modifier": "Default",
"type": { "type": {
"plain": 687 "plain": 685
}, },
"fallback": "0x00", "fallback": "0x00",
"docs": [ "docs": [
@@ -5305,7 +5312,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 501, "key": 501,
"value": 688 "value": 686
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -5322,7 +5329,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 99, "key": 99,
"value": 689 "value": 687
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -5357,7 +5364,7 @@
}, },
"constants": [], "constants": [],
"errors": { "errors": {
"type": 690 "type": 688
}, },
"index": 53 "index": 53
}, },
@@ -5386,7 +5393,7 @@
"name": "OnChainVotes", "name": "OnChainVotes",
"modifier": "Optional", "modifier": "Optional",
"type": { "type": {
"plain": 691 "plain": 689
}, },
"fallback": "0x00", "fallback": "0x00",
"docs": [ "docs": [
@@ -5401,7 +5408,7 @@
"events": null, "events": null,
"constants": [], "constants": [],
"errors": { "errors": {
"type": 696 "type": 694
}, },
"index": 54 "index": 54
}, },
@@ -5414,7 +5421,7 @@
"name": "ValidatorGroups", "name": "ValidatorGroups",
"modifier": "Default", "modifier": "Default",
"type": { "type": {
"plain": 697 "plain": 695
}, },
"fallback": "0x00", "fallback": "0x00",
"docs": [ "docs": [
@@ -5430,7 +5437,7 @@
"name": "ParathreadQueue", "name": "ParathreadQueue",
"modifier": "Default", "modifier": "Default",
"type": { "type": {
"plain": 698 "plain": 696
}, },
"fallback": "0x0000000000", "fallback": "0x0000000000",
"docs": [ "docs": [
@@ -5444,7 +5451,7 @@
"name": "AvailabilityCores", "name": "AvailabilityCores",
"modifier": "Default", "modifier": "Default",
"type": { "type": {
"plain": 703 "plain": 701
}, },
"fallback": "0x00", "fallback": "0x00",
"docs": [ "docs": [
@@ -5462,7 +5469,7 @@
"name": "ParathreadClaimIndex", "name": "ParathreadClaimIndex",
"modifier": "Default", "modifier": "Default",
"type": { "type": {
"plain": 706 "plain": 704
}, },
"fallback": "0x00", "fallback": "0x00",
"docs": [ "docs": [
@@ -5492,7 +5499,7 @@
"name": "Scheduled", "name": "Scheduled",
"modifier": "Default", "modifier": "Default",
"type": { "type": {
"plain": 707 "plain": 705
}, },
"fallback": "0x00", "fallback": "0x00",
"docs": [ "docs": [
@@ -5526,7 +5533,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 104, "key": 104,
"value": 710 "value": 708
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -5541,7 +5548,7 @@
"name": "PvfActiveVoteList", "name": "PvfActiveVoteList",
"modifier": "Default", "modifier": "Default",
"type": { "type": {
"plain": 713 "plain": 711
}, },
"fallback": "0x00", "fallback": "0x00",
"docs": [ "docs": [
@@ -5552,7 +5559,7 @@
"name": "Parachains", "name": "Parachains",
"modifier": "Default", "modifier": "Default",
"type": { "type": {
"plain": 706 "plain": 704
}, },
"fallback": "0x00", "fallback": "0x00",
"docs": [ "docs": [
@@ -5570,7 +5577,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 99, "key": 99,
"value": 714 "value": 712
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -5622,7 +5629,7 @@
"hashers": [ "hashers": [
"Twox64Concat" "Twox64Concat"
], ],
"key": 715, "key": 713,
"value": 104 "value": 104
} }
}, },
@@ -5643,7 +5650,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 99, "key": 99,
"value": 716 "value": 714
} }
}, },
"fallback": "0x0000", "fallback": "0x0000",
@@ -5657,7 +5664,7 @@
"name": "PastCodePruning", "name": "PastCodePruning",
"modifier": "Default", "modifier": "Default",
"type": { "type": {
"plain": 719 "plain": 717
}, },
"fallback": "0x00", "fallback": "0x00",
"docs": [ "docs": [
@@ -5716,7 +5723,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 99, "key": 99,
"value": 720 "value": 718
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -5741,7 +5748,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 99, "key": 99,
"value": 721 "value": 719
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -5761,7 +5768,7 @@
"name": "UpgradeCooldowns", "name": "UpgradeCooldowns",
"modifier": "Default", "modifier": "Default",
"type": { "type": {
"plain": 719 "plain": 717
}, },
"fallback": "0x00", "fallback": "0x00",
"docs": [ "docs": [
@@ -5774,7 +5781,7 @@
"name": "UpcomingUpgrades", "name": "UpcomingUpgrades",
"modifier": "Default", "modifier": "Default",
"type": { "type": {
"plain": 719 "plain": 717
}, },
"fallback": "0x00", "fallback": "0x00",
"docs": [ "docs": [
@@ -5793,7 +5800,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 4, "key": 4,
"value": 706 "value": 704
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -5810,7 +5817,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 99, "key": 99,
"value": 722 "value": 720
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -5875,7 +5882,7 @@
} }
], ],
"errors": { "errors": {
"type": 723 "type": 721
}, },
"index": 56 "index": 56
}, },
@@ -5906,7 +5913,7 @@
"name": "BufferedSessionChanges", "name": "BufferedSessionChanges",
"modifier": "Default", "modifier": "Default",
"type": { "type": {
"plain": 724 "plain": 722
}, },
"fallback": "0x00", "fallback": "0x00",
"docs": [ "docs": [
@@ -5943,7 +5950,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 99, "key": 99,
"value": 726 "value": 724
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -6042,7 +6049,7 @@
"name": "NeedsDispatch", "name": "NeedsDispatch",
"modifier": "Default", "modifier": "Default",
"type": { "type": {
"plain": 706 "plain": 704
}, },
"fallback": "0x00", "fallback": "0x00",
"docs": [ "docs": [
@@ -6077,7 +6084,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 8, "key": 8,
"value": 728 "value": 726
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -6109,7 +6116,7 @@
}, },
"constants": [], "constants": [],
"errors": { "errors": {
"type": 729 "type": 727
}, },
"index": 59 "index": 59
}, },
@@ -6127,7 +6134,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 113, "key": 113,
"value": 730 "value": 728
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -6144,7 +6151,7 @@
"name": "HrmpOpenChannelRequestsList", "name": "HrmpOpenChannelRequestsList",
"modifier": "Default", "modifier": "Default",
"type": { "type": {
"plain": 731 "plain": 729
}, },
"fallback": "0x00", "fallback": "0x00",
"docs": [] "docs": []
@@ -6214,7 +6221,7 @@
"name": "HrmpCloseChannelRequestsList", "name": "HrmpCloseChannelRequestsList",
"modifier": "Default", "modifier": "Default",
"type": { "type": {
"plain": 731 "plain": 729
}, },
"fallback": "0x00", "fallback": "0x00",
"docs": [] "docs": []
@@ -6247,7 +6254,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 113, "key": 113,
"value": 732 "value": 730
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -6266,7 +6273,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 99, "key": 99,
"value": 706 "value": 704
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -6295,7 +6302,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 99, "key": 99,
"value": 706 "value": 704
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -6310,7 +6317,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 113, "key": 113,
"value": 734 "value": 732
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -6328,7 +6335,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 99, "key": 99,
"value": 736 "value": 734
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -6351,7 +6358,7 @@
}, },
"constants": [], "constants": [],
"errors": { "errors": {
"type": 738 "type": 736
}, },
"index": 60 "index": 60
}, },
@@ -6364,7 +6371,7 @@
"name": "AssignmentKeysUnsafe", "name": "AssignmentKeysUnsafe",
"modifier": "Default", "modifier": "Default",
"type": { "type": {
"plain": 739 "plain": 737
}, },
"fallback": "0x00", "fallback": "0x00",
"docs": [ "docs": [
@@ -6393,7 +6400,7 @@
"Identity" "Identity"
], ],
"key": 4, "key": 4,
"value": 740 "value": 738
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -6454,8 +6461,8 @@
"Twox64Concat", "Twox64Concat",
"Blake2_128Concat" "Blake2_128Concat"
], ],
"key": 742, "key": 740,
"value": 743 "value": 741
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -6472,7 +6479,7 @@
"Twox64Concat", "Twox64Concat",
"Blake2_128Concat" "Blake2_128Concat"
], ],
"key": 742, "key": 740,
"value": 4 "value": 4
} }
}, },
@@ -6527,7 +6534,7 @@
}, },
"constants": [], "constants": [],
"errors": { "errors": {
"type": 744 "type": 742
}, },
"index": 62 "index": 62
}, },
@@ -6562,7 +6569,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 99, "key": 99,
"value": 745 "value": 743
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -6612,7 +6619,7 @@
} }
], ],
"errors": { "errors": {
"type": 746 "type": 744
}, },
"index": 70 "index": 70
}, },
@@ -6630,7 +6637,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 99, "key": 99,
"value": 747 "value": 745
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -6680,7 +6687,7 @@
} }
], ],
"errors": { "errors": {
"type": 748 "type": 746
}, },
"index": 71 "index": 71
}, },
@@ -6723,7 +6730,7 @@
"hashers": [ "hashers": [
"Twox64Concat" "Twox64Concat"
], ],
"key": 749, "key": 747,
"value": 6 "value": 6
} }
}, },
@@ -6742,7 +6749,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 4, "key": 4,
"value": 750 "value": 748
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -6793,7 +6800,7 @@
} }
], ],
"errors": { "errors": {
"type": 753 "type": 751
}, },
"index": 72 "index": 72
}, },
@@ -6811,7 +6818,7 @@
"Twox64Concat" "Twox64Concat"
], ],
"key": 99, "key": 99,
"value": 754 "value": 752
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -6823,7 +6830,7 @@
"name": "NewRaise", "name": "NewRaise",
"modifier": "Default", "modifier": "Default",
"type": { "type": {
"plain": 706 "plain": 704
}, },
"fallback": "0x00", "fallback": "0x00",
"docs": [ "docs": [
@@ -6889,7 +6896,7 @@
} }
], ],
"errors": { "errors": {
"type": 756 "type": 754
}, },
"index": 73 "index": 73
}, },
@@ -6918,7 +6925,7 @@
"Blake2_128Concat" "Blake2_128Concat"
], ],
"key": 8, "key": 8,
"value": 757 "value": 755
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -6967,7 +6974,7 @@
"Twox64Concat", "Twox64Concat",
"Blake2_128Concat" "Blake2_128Concat"
], ],
"key": 761, "key": 759,
"value": 4 "value": 4
} }
}, },
@@ -6985,7 +6992,7 @@
"Twox64Concat", "Twox64Concat",
"Blake2_128Concat" "Blake2_128Concat"
], ],
"key": 761, "key": 759,
"value": 8 "value": 8
} }
}, },
@@ -7003,8 +7010,8 @@
"Twox64Concat", "Twox64Concat",
"Blake2_128Concat" "Blake2_128Concat"
], ],
"key": 761, "key": 759,
"value": 762 "value": 760
} }
}, },
"fallback": "0x00", "fallback": "0x00",
@@ -7017,7 +7024,7 @@
"name": "VersionDiscoveryQueue", "name": "VersionDiscoveryQueue",
"modifier": "Default", "modifier": "Default",
"type": { "type": {
"plain": 763 "plain": 761
}, },
"fallback": "0x00", "fallback": "0x00",
"docs": [ "docs": [
@@ -7030,7 +7037,7 @@
"name": "CurrentMigration", "name": "CurrentMigration",
"modifier": "Optional", "modifier": "Optional",
"type": { "type": {
"plain": 766 "plain": 764
}, },
"fallback": "0x00", "fallback": "0x00",
"docs": [ "docs": [
@@ -7047,58 +7054,58 @@
}, },
"constants": [], "constants": [],
"errors": { "errors": {
"type": 767 "type": 765
}, },
"index": 99 "index": 99
} }
], ],
"extrinsic": { "extrinsic": {
"type": 768, "type": 766,
"version": 4, "version": 4,
"signedExtensions": [ "signedExtensions": [
{ {
"identifier": "CheckNonZeroSender", "identifier": "CheckNonZeroSender",
"type": 770, "type": 768,
"additionalSigned": 57 "additionalSigned": 57
}, },
{ {
"identifier": "CheckSpecVersion", "identifier": "CheckSpecVersion",
"type": 771, "type": 769,
"additionalSigned": 4 "additionalSigned": 4
}, },
{ {
"identifier": "CheckTxVersion", "identifier": "CheckTxVersion",
"type": 772, "type": 770,
"additionalSigned": 4 "additionalSigned": 4
}, },
{ {
"identifier": "CheckGenesis", "identifier": "CheckGenesis",
"type": 773, "type": 771,
"additionalSigned": 9 "additionalSigned": 9
}, },
{ {
"identifier": "CheckMortality", "identifier": "CheckMortality",
"type": 774, "type": 772,
"additionalSigned": 9 "additionalSigned": 9
}, },
{ {
"identifier": "CheckNonce", "identifier": "CheckNonce",
"type": 776, "type": 774,
"additionalSigned": 57 "additionalSigned": 57
}, },
{ {
"identifier": "CheckWeight", "identifier": "CheckWeight",
"type": 777, "type": 775,
"additionalSigned": 57 "additionalSigned": 57
}, },
{ {
"identifier": "ChargeTransactionPayment", "identifier": "ChargeTransactionPayment",
"type": 778, "type": 776,
"additionalSigned": 57 "additionalSigned": 57
} }
] ]
}, },
"type": 779 "type": 777
} }
} }
} }
File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More