Compare commits

...
66 Commits
Author SHA1 Message Date
github-actions[bot] a1e25176dd [CI Skip] release/stable 10.10.1
skip-checks: true
2023-10-14 07:04:51 +00:00
Jaco c241d2430f 10.10.1 (#5738) 2023-10-14 09:54:17 +03:00
github-actions[bot] 0f84a4f53d [CI Skip] bump/beta 10.9.2-29-x
skip-checks: true
2023-10-14 04:13:01 +00:00
Jaco 200ea2310c Bump dev deps (#5737) 2023-10-14 07:03:54 +03:00
github-actions[bot] a22a111f72 [CI Skip] bump/beta 10.9.2-28-x
skip-checks: true
2023-10-03 06:12:06 +00:00
Jaco 2a16dc80c9 Bump dev deps (#5733) 2023-10-03 08:59:50 +03:00
github-actions[bot] 0dcf349831 [CI Skip] bump/beta 10.9.2-27-x
skip-checks: true
2023-09-24 16:52:57 +00:00
Jaco f77a97b1fe Bump dev deps (#5730) 2023-09-24 19:42:18 +03:00
github-actions[bot] 38209a3123 [CI Skip] bump/beta 10.9.2-26-x
skip-checks: true
2023-09-15 07:44:00 +00:00
Jaco c0d5408d8f Bump deps (w/ latest util) (#5729)
* Bump deps (w/ latest util)

* CHANGELOG

* Fix typo
2023-09-15 10:34:33 +03:00
github-actions[bot] 700812aa60 [CI Skip] bump/beta 10.9.2-25-x
skip-checks: true
2023-09-04 21:24:29 +00:00
Andreea EfteneandJaco ae24a99fcb Update check for contract instantiation (#5699)
* add risc v check

* run lint

* Update packages/api-contract/src/base/Code.ts

Co-authored-by: Jaco <jacogr@gmail.com>

* add explicit return type

Co-authored-by: Jaco <jacogr@gmail.com>

---------

Co-authored-by: Jaco <jacogr@gmail.com>
2023-09-05 00:13:41 +03:00
github-actions[bot] 257c9579d0 [CI Skip] bump/beta 10.9.2-24-x
skip-checks: true
2023-09-01 04:52:16 +00:00
Francisco Gamundi 74a969bb54 Add isEthereum to ChainProperties (#5686)
* Add isEthereum to ChainProperties

* Decription

* Set isEthereum in registry

* lint

* Change type to Bool

* Registry getter

* Fix test
2023-09-01 07:41:04 +03:00
github-actions[bot] 00b26f48b4 [CI Skip] bump/beta 10.9.2-23-x
skip-checks: true
2023-08-30 06:16:18 +00:00
Jaco 641ca4daee Expose chain.subscribeFinalizedBlocks derive (#5724)
* Expose chain.subscribeFinalizedBlocks derive

* CHANGELOG
2023-08-30 09:04:25 +03:00
github-actions[bot] 4ab9ad6765 [CI Skip] bump/beta 10.9.2-22-x
skip-checks: true
2023-08-30 06:02:18 +00:00
Jaco 1c3fc93ebd Bump dev deps (w/ latest CHANGELOG) (#5723) 2023-08-30 08:49:26 +03:00
github-actions[bot] 03f323fae1 [CI Skip] bump/beta 10.9.2-21-x
skip-checks: true
2023-08-30 05:34:38 +00:00
Jaco 7cae843e9b Expose combination of provider + core stats (#5696)
* Expose combination of provider + core stats

* Non-existing core stats
2023-08-30 08:25:51 +03:00
github-actions[bot] ab3b162d7e [CI Skip] bump/beta 10.9.2-20-x
skip-checks: true
2023-08-29 13:24:39 +00:00
Jaco 21425900bb Parsing for latest metadata v15 (#5720)
* Parsing for latest metadata v15

* ExtrinsicMetadataLatest = 15

* ExtrinsicMetadataV14 -> ExtrinsicMetadataV15 conversion

* V15 conversion type unwrap

* Cleanup checks

* Adjust (again)

* Start outerEnums population

* Add Event outer enum extraction

* Adjust expectations
2023-08-29 16:15:45 +03:00
github-actions[bot] b82bf68954 [CI Skip] bump/beta 10.9.2-19-x
skip-checks: true
2023-08-29 12:13:46 +00:00
Jegor Sidorenko cfffa68c96 Use Box<XcmV3MultiLocation> instead of MultiAssetId (#5700)
* Use Box<XcmV3MultiLocation> instead of MultiAssetId

* Remove Box<>

* Fix test
2023-08-29 15:03:21 +03:00
github-actions[bot] f08be2f928 [CI Skip] bump/beta 10.9.2-18-x
skip-checks: true
2023-08-29 10:22:23 +00:00
peetzweg/andJaco f213063972 Adds tests cases for issue #5702 (#5703)
* adds tests cases describe in #5702

* fix wrong test outputs

* Update packages/types-codec/src/base/Int.spec.ts

Co-authored-by: Jaco <jacogr@gmail.com>

* Apply suggestions from code review

---------

Co-authored-by: Jaco <jacogr@gmail.com>
2023-08-29 13:10:09 +03:00
github-actions[bot] 3828f41a0f [CI Skip] bump/beta 10.9.2-17-x
skip-checks: true
2023-08-29 10:09:32 +00:00
Jaco bc62b46fa5 Seraliaze "unknown" payload fields via toJSON (#5716)
* Seraliaze "unknown" payload fields via toJSON

* Additional tests

* Adjust

* CHANGELOG
2023-08-29 12:58:55 +03:00
github-actions[bot] 9f0a32474d [CI Skip] bump/beta 10.9.2-16-x
skip-checks: true
2023-08-29 09:54:27 +00:00
Jaco ebde5a3c19 Latest CHANGELOG (w/ deps bump) (#5719) 2023-08-29 12:44:52 +03:00
github-actions[bot] 321b759723 [CI Skip] bump/beta 10.9.2-15-x
skip-checks: true
2023-08-29 09:18:00 +00:00
Jaco f49f05c820 Bump static metadata (#5717)
* Bump static metadata

* Adjust society candidate retrieval

* Fix society member retrieval

* Rebuild

* Build runtime

* Adjust types

* Extract re-used types
2023-08-29 12:08:41 +03:00
github-actions[bot] e9fec17599 [CI Skip] bump/beta 10.9.2-14-x
skip-checks: true
2023-08-29 08:16:33 +00:00
Jaco 6f24d2f5dc Latest BeefyApi & ParachainHost runtime interfaces (#5718)
* Latest BeefyApi & ParachainHost runtime interfaces

* Add missing types

* Correct string closing
2023-08-29 11:07:39 +03:00
github-actions[bot] c028c69582 [CI Skip] bump/beta 10.9.2-13-x
skip-checks: true
2023-08-24 10:29:03 +00:00
Jaco 136ec7c600 Group Int/Uint tests, size check compare for Int (#5709)
* Group In/Uint tests, size check compare for Int

* Adjust
2023-08-24 13:20:03 +03:00
github-actions[bot] 0455a94630 [CI Skip] bump/beta 10.9.2-12-x
skip-checks: true
2023-08-23 10:44:59 +00:00
Jaco 3c7dc4b82a Bump deps (#5708) 2023-08-23 13:35:52 +03:00
github-actions[bot] 52e36534cf [CI Skip] bump/beta 10.9.2-11-x
skip-checks: true
2023-08-20 07:00:26 +00:00
Jaco 0320e9b410 Bump deps (#5707) 2023-08-20 09:49:24 +03:00
github-actions[bot] f4655a233a [CI Skip] bump/beta 10.9.2-10-x
skip-checks: true
2023-08-18 06:46:00 +00:00
Jaco 4826906b6d Bump common (#5705)
* Bump common

* Fix lint
2023-08-18 09:36:52 +03:00
github-actions[bot] 2f2bbc01bb [CI Skip] bump/beta 10.9.2-9-x
skip-checks: true
2023-08-16 08:09:47 +00:00
Jaco d8136a8e61 Bump dev (w/ ts-eslint updates) (#5691) 2023-08-16 11:00:52 +03:00
github-actions[bot] 319535a1e9 [CI Skip] bump/beta 10.9.2-8-x
skip-checks: true
2023-07-24 11:11:03 +00:00
Jegor Sidorenko c2944f2dc1 Add AssetConversionApi (#5694)
* Add Asset Conversion Api

* Fix lint errors
2023-07-24 14:02:17 +03:00
github-actions[bot] 1fcc278381 [CI Skip] bump/beta 10.9.2-7-x
skip-checks: true
2023-07-24 09:05:52 +00:00
Tim B fd87b08396 added EthRTApiV5 ifaces (#5680) 2023-07-24 11:56:52 +03:00
github-actions[bot] 114c8d3f98 [CI Skip] bump/beta 10.9.2-6-x
skip-checks: true
2023-07-17 08:34:26 +00:00
Branislav Kontur a8b38b09d6 Added FungiblesApi version 2 (#5687)
* Added FungiblesApi version 2

* Add exception to inspectType
2023-07-17 11:25:44 +03:00
github-actions[bot] 47df39e02d [CI Skip] bump/beta 10.9.2-5-x
skip-checks: true
2023-07-06 07:37:17 +00:00
Jaco dd58202af7 Bump deps (#5685)
* Bump deps

* String extends override
2023-07-06 10:28:41 +03:00
github-actions[bot] 6ee830b838 [CI Skip] bump/beta 10.9.2-4-x
skip-checks: true
2023-06-28 13:39:10 +00:00
Jaco 3c3f1bf78e Bump deps (#5682) 2023-06-28 16:29:57 +03:00
github-actions[bot] 8282159f70 [CI Skip] bump/beta 10.9.2-3-x
skip-checks: true
2023-06-21 17:05:27 +00:00
Jeeyong Um d946a99a35 Alias for Noir types (#5678) 2023-06-21 19:56:39 +03:00
github-actions[bot] 2235cbde19 [CI Skip] bump/beta 10.9.2-2-x
skip-checks: true
2023-06-17 10:38:18 +00:00
Jaco e89212b435 Remove some eslint overrides (#5676)
* Remove some eslint overrides

* Use noop
2023-06-17 13:27:51 +03:00
github-actions[bot] 9913701e82 [CI Skip] bump/beta 10.9.2-1-x
skip-checks: true
2023-06-16 06:55:38 +00:00
Jaco 61a8b4041e Use import.meta.url instead of process.cwd() (#5675)
* Use import.meta.url instead of process.cwd()

* Bump dev
2023-06-16 09:45:32 +03:00
github-actions[bot] 56fb5c9985 [CI Skip] bump/beta 10.9.2-0-x
skip-checks: true
2023-06-12 06:16:24 +00:00
Jaco eb9a0c4a66 Bump util (#5673) 2023-06-12 09:07:51 +03:00
github-actions[bot] ac07123e54 [CI Skip] release/stable 10.9.1
skip-checks: true
2023-06-12 04:41:46 +00:00
Jaco a9865bb60a 10.9.1 (#5672)
* 10.9.1

* Bump static metadata
2023-06-12 07:31:48 +03:00
github-actions[bot] 62741a10dd [CI Skip] bump/beta 10.8.2-0-x
skip-checks: true
2023-06-11 07:08:56 +00:00
Jaco c277b3d865 Adjust object index typings (#5671)
* Adjust object index typings

* CHANGELOG

* Remove dot-notation overrides

* Align overrides

* Ordering

* Revert lint formatting changes

* Bump common
2023-06-11 09:58:20 +03:00
257 changed files with 44150 additions and 35538 deletions
+1
View File
@@ -19,6 +19,7 @@ NOTES.md
!.yarn/plugins !.yarn/plugins
.pnp.* .pnp.*
.vscode/ .vscode/
.idea/
cc-test-reporter cc-test-reporter
lerna-debug.log* lerna-debug.log*
npm-debug.log* npm-debug.log*
+34
View File
@@ -1,5 +1,39 @@
# CHANGELOG # CHANGELOG
## 10.10.1 Oct 14, 2023
Contributed:
- Add aliases for Noir type paths (Thanks to https://github.com/conr2d)
- Add runtime `FungliblesApi` version 2 (Thanks to https://github.com/bkontur)
- Add runtime `EthereumApi` version 5 (Thanks to https://github.com/timbrinded)
- Add runtime `AssetConversionApi` (Thanks to https://github.com/jsidorenko)
- Adjust types for runtime `AssetConversionApi` (Thanks to https://github.com/jsidorenko)
- Expand test cases for `Int` conversions (Thanks to https://github.com/peetzweg)
- Add `isEthereum` to chain properties (Thanks to https://github.com/fgamundi)
- Allow RiscV contracts via check (Thanks to https://github.com/statictype)
Changes:
- Serialize any additional payload fields via `toJSON()`
- Expose internal `rpc-core` stats on `api.stats` getter
- Add support for latest/stable V15 metadata interfaces
- Add runtime `BeefyApi` version 3
- Add runtime `ParachainHost` version 5
- Expose `chain.subscribeFinalizedBlocks` derive
- Consistently use `import.meta.url` inside tests
- Group `Uint/Int` tests for maintainability
- Update to latest Polkadot, Kusama & Substrate metadata
## 10.9.1 Jun 12, 2023
Changes:
- Adjust object index access for stricter tsconfig settings
- Update to latest Polkadot, Kusama & Substrate metadata
## 10.8.1 Jun 5, 2023 ## 10.8.1 Jun 5, 2023
Contributed: Contributed:
+8 -4
View File
@@ -1,4 +1,4 @@
3473 Jaco 10.8.1 (#5669) 3498 Jaco 10.10.1 (#5738)
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)
@@ -8,7 +8,7 @@
14 Nikos Kontakis Bump substrate connect to 0.7.16 (#5307) 14 Nikos Kontakis Bump substrate connect to 0.7.16 (#5307)
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)
5 Andreea Eftene Add suport for latest ink! metadata (#5650) 6 Andreea Eftene Update check for contract instantiation (#5699)
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 Julien Eluard General WsProvider extensibility improvements (#5467) 5 Julien Eluard General WsProvider extensibility improvements (#5467)
@@ -22,6 +22,7 @@
3 André Silva add support for ValidationCodeHash (#3640) 3 André Silva add support for ValidationCodeHash (#3640)
3 Antoine Estienne Adapted to display moonbeam author (#3108) 3 Antoine Estienne Adapted to display moonbeam author (#3108)
3 Arjan Zijderveld Added `Emergency` to `ElectionPhase` (#3707) 3 Arjan Zijderveld Added `Emergency` to `ElectionPhase` (#3707)
3 Branislav Kontur Added FungiblesApi version 2 (#5687)
3 Ewa Kowalska Handle no council for bounties proposals (#3062) 3 Ewa Kowalska Handle no council for bounties proposals (#3062)
3 hamidra add support for n key entries for NMaps (#3886) 3 hamidra add support for n key entries for NMaps (#3886)
3 Hamza Tokuchi more typos (#2532) 3 Hamza Tokuchi more typos (#2532)
@@ -32,11 +33,12 @@
3 YJ feat: Vote interface as U8a (#1061) 3 YJ feat: Vote interface as U8a (#1061)
2 Alexander Krupenkin Add [u8; 33] type width for U8aFixed type (#2391) 2 Alexander Krupenkin Add [u8; 33] type width for U8aFixed type (#2391)
2 Branan Riley Add proxy type for Centrifuge (#3940) 2 Branan Riley Add proxy type for Centrifuge (#3940)
2 Branislav Kontur Fungibles runtime api for statemine/statemint/westmint (#5592)
2 Caio Add `Range` and `RangeInclusive` types (#3791) 2 Caio Add `Range` and `RangeInclusive` types (#3791)
2 HackFisher Update maxExtrinsic definition (#4703) 2 HackFisher Update maxExtrinsic definition (#4703)
2 Jakub Pánik All heads subscription (#1899) 2 Jakub Pánik All heads subscription (#1899)
2 James Lefrère Add `.eq()` usage to docs and fix docs typos (#1405) 2 James Lefrère Add `.eq()` usage to docs and fix docs typos (#1405)
2 Jeeyong Um Alias for Noir types (#5678)
2 Jegor Sidorenko Use Box<XcmV3MultiLocation> instead of MultiAssetId (#5700)
2 Keith Yeung Allow keyPrefix to accept an additional argument for double maps (#2230) 2 Keith Yeung Allow keyPrefix to accept an additional argument for double maps (#2230)
2 MOZGIII Follow-up fix after #4665 (#4666) 2 MOZGIII Follow-up fix after #4665 (#4666)
2 Paweł Nguyen Fix a minor typo in cookbook blocks docs (#2294) 2 Paweł Nguyen Fix a minor typo in cookbook blocks docs (#2294)
@@ -65,6 +67,7 @@
1 Dylan Galea Updated users of the polkadot-js/api (#2027) 1 Dylan Galea Updated users of the polkadot-js/api (#2027)
1 flex Change BeefySignedCommitment signatures type to EcdsaSignature (#4204) 1 flex Change BeefySignedCommitment signatures type to EcdsaSignature (#4204)
1 Florian Franzen metadataMd: use endpoint for rpc and runtime details too (#5628) 1 Florian Franzen metadataMd: use endpoint for rpc and runtime details too (#5628)
1 Francisco Gamundi Add isEthereum to ChainProperties (#5686)
1 Furqan A fix: fixed 404 to the docs from the api readme (#3985) 1 Furqan A fix: fixed 404 to the docs from the api readme (#3985)
1 Gérard Dethier Fix LRUCache memory leak. (#4520) 1 Gérard Dethier Fix LRUCache memory leak. (#4520)
1 Gerben van de Wiel Adding some extra notes on changes in the specname (#2329) 1 Gerben van de Wiel Adding some extra notes on changes in the specname (#2329)
@@ -73,7 +76,6 @@
1 Hyungsuk Kang Update fees.ts (#1014) 1 Hyungsuk Kang Update fees.ts (#1014)
1 icodezjb Update SessionKeys (#3035) 1 icodezjb Update SessionKeys (#3035)
1 iiiiiiii Make unknownTypes externally accessible (#3263) 1 iiiiiiii Make unknownTypes externally accessible (#3263)
1 Jeeyong Um Fix inaccessible yargs instance error (#5531)
1 JesseAbram added 07 Example showing how to make a transfer with allowed block permissions folder in docs (#1062) 1 JesseAbram added 07 Example showing how to make a transfer with allowed block permissions folder in docs (#1062)
1 Joey don't throw error at `onSocketClose` (#4363) 1 Joey don't throw error at `onSocketClose` (#4363)
1 Jordan Allow typegen for custom RPCs (#2876) 1 Jordan Allow typegen for custom RPCs (#2876)
@@ -96,6 +98,7 @@
1 Noah Corona Add rpc error fields (#4637) 1 Noah Corona Add rpc error fields (#4637)
1 Oleksandr Mykhailenko Add more complex namespaced contracts & test cases for them (#4472) 1 Oleksandr Mykhailenko Add more complex namespaced contracts & test cases for them (#4472)
1 Paul M Fox Basic BTreeMaps codec support (#1474) 1 Paul M Fox Basic BTreeMaps codec support (#1474)
1 peetzweg/ Adds tests cases for issue #5702 (#5703)
1 philipstanislaus Update types for centrifuge chain v1.2.0 (#2424) 1 philipstanislaus Update types for centrifuge chain v1.2.0 (#2424)
1 Pierre Krieger Update substrate/connect to 0.7.6 (#4940) 1 Pierre Krieger Update substrate/connect to 0.7.6 (#4940)
1 polymath-eric Allow unset external signer (#5649) 1 polymath-eric Allow unset external signer (#5649)
@@ -115,6 +118,7 @@
1 Shunji Zhan small polish (#5276) 1 Shunji Zhan small polish (#5276)
1 Stephen Shelton Add transaction-payment runtime API V3 (#5430) 1 Stephen Shelton Add transaction-payment runtime API V3 (#5430)
1 Tarik Gul Update .nvmrc (#5624) 1 Tarik Gul Update .nvmrc (#5624)
1 Tim B added EthRTApiV5 ifaces (#5680)
1 WoeOm adapt Darwinia, Crab Network types (#3498) 1 WoeOm adapt Darwinia, Crab Network types (#3498)
1 Xat_MassacrE Fix packages/types/src/codec/utils/encodeTypes.ts encodeSubTypes bug (#1544) 1 Xat_MassacrE Fix packages/types/src/codec/utils/encodeTypes.ts encodeSubTypes bug (#1544)
1 yjh fix MetadataVersioned.asV12 (#2983) 1 yjh fix MetadataVersioned.asV12 (#2983)
+8 -1
View File
@@ -1,9 +1,16 @@
// Copyright 2017-2023 @polkadot/dev authors & contributors // Copyright 2017-2023 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import baseConfig from '@polkadot/dev/config/eslint'; import baseConfig from '@polkadot/dev/config/eslint';
export default [ export default [
{
ignores: [
// see the tsconfig.eslint.json for explanation
'packages/api-augment/src/kusama/*.ts',
'packages/api-augment/src/polkadot/*.ts'
]
},
...baseConfig, ...baseConfig,
{ {
rules: { rules: {
+6 -6
View File
@@ -14,10 +14,10 @@
}, },
"sideEffects": false, "sideEffects": false,
"type": "module", "type": "module",
"version": "10.8.1", "version": "10.10.1",
"versions": { "versions": {
"git": "10.8.1", "git": "10.10.1",
"npm": "10.8.1" "npm": "10.10.1"
}, },
"workspaces": [ "workspaces": [
"packages/*" "packages/*"
@@ -40,11 +40,11 @@
"test:one": "polkadot-dev-run-test --env node" "test:one": "polkadot-dev-run-test --env node"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/dev": "^0.75.16", "@polkadot/dev": "^0.76.29",
"@polkadot/typegen": "workspace:packages/typegen", "@polkadot/typegen": "workspace:packages/typegen",
"@types/node": "^20.2.5" "@types/node": "^20.8.6"
}, },
"resolutions": { "resolutions": {
"typescript": "^5.0.4" "typescript": "^5.1.6"
} }
} }
+8 -8
View File
@@ -18,15 +18,15 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "10.8.1", "version": "10.10.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@polkadot/api-base": "10.8.1", "@polkadot/api-base": "10.10.1",
"@polkadot/rpc-augment": "10.8.1", "@polkadot/rpc-augment": "10.10.1",
"@polkadot/types": "10.8.1", "@polkadot/types": "10.10.1",
"@polkadot/types-augment": "10.8.1", "@polkadot/types-augment": "10.10.1",
"@polkadot/types-codec": "10.8.1", "@polkadot/types-codec": "10.10.1",
"@polkadot/util": "^12.2.2", "@polkadot/util": "^12.5.1",
"tslib": "^2.5.3" "tslib": "^2.6.2"
} }
} }
+82 -34
View File
@@ -52,6 +52,10 @@ declare module '@polkadot/api-base/types/consts' {
* Max number of authorities allowed * Max number of authorities allowed
**/ **/
maxAuthorities: u32 & AugmentedConst<ApiType>; maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of nominators for each validator.
**/
maxNominators: u32 & AugmentedConst<ApiType>;
/** /**
* Generic const * Generic const
**/ **/
@@ -91,6 +95,29 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
beefy: {
/**
* The maximum number of authorities that can be added.
**/
maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of nominators for each validator.
**/
maxNominators: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of entries to keep in the set id to session index mapping.
*
* Since the `SetIdSession` map is only used for validating equivocations this
* value should relate to the bonding duration of whatever staking system is
* being used (if any). If equivocation handling is not enabled then this value
* can be zero.
**/
maxSetIdSessionEntries: u64 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
bounties: { bounties: {
/** /**
* The amount held on deposit for placing a bounty proposal. * The amount held on deposit for placing a bounty proposal.
@@ -181,12 +208,13 @@ declare module '@polkadot/api-base/types/consts' {
}; };
crowdloan: { crowdloan: {
/** /**
* The minimum amount that may be contributed into a crowdloan. Should almost certainly be at * The minimum amount that may be contributed into a crowdloan. Should almost certainly be
* least `ExistentialDeposit`. * at least `ExistentialDeposit`.
**/ **/
minContribution: u128 & AugmentedConst<ApiType>; minContribution: u128 & AugmentedConst<ApiType>;
/** /**
* `PalletId` for the crowdloan pallet. An appropriate value could be `PalletId(*b"py/cfund")` * `PalletId` for the crowdloan pallet. An appropriate value could be
* `PalletId(*b"py/cfund")`
**/ **/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>; palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/** /**
@@ -209,16 +237,6 @@ declare module '@polkadot/api-base/types/consts' {
* "better" in the Unsigned phase. * "better" in the Unsigned phase.
**/ **/
betterUnsignedThreshold: Perbill & AugmentedConst<ApiType>; betterUnsignedThreshold: Perbill & AugmentedConst<ApiType>;
/**
* The maximum number of electable targets to put in the snapshot.
**/
maxElectableTargets: u16 & AugmentedConst<ApiType>;
/**
* The maximum number of electing voters to put in the snapshot. At the moment, snapshots
* are only over a single block, but once multi-block elections are introduced they will
* take place over multiple blocks.
**/
maxElectingVoters: u32 & AugmentedConst<ApiType>;
/** /**
* The maximum number of winners that can be elected by this `ElectionProvider` * The maximum number of winners that can be elected by this `ElectionProvider`
* implementation. * implementation.
@@ -337,6 +355,10 @@ declare module '@polkadot/api-base/types/consts' {
* Max Authorities in use * Max Authorities in use
**/ **/
maxAuthorities: u32 & AugmentedConst<ApiType>; maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of nominators for each validator.
**/
maxNominators: u32 & AugmentedConst<ApiType>;
/** /**
* The maximum number of entries to keep in the set id to session index mapping. * The maximum number of entries to keep in the set id to session index mapping.
* *
@@ -708,7 +730,7 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
dataDepositPerByte: u128 & AugmentedConst<ApiType>; dataDepositPerByte: u128 & AugmentedConst<ApiType>;
/** /**
* The deposit to be paid to run a parathread. * The deposit to be paid to run a on-demand parachain.
* This should include the cost for storing the genesis head and validation code. * This should include the cost for storing the genesis head and validation code.
**/ **/
paraDeposit: u128 & AugmentedConst<ApiType>; paraDeposit: u128 & AugmentedConst<ApiType>;
@@ -750,27 +772,31 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec; [key: string]: Codec;
}; };
society: { society: {
/**
* The minimum amount of a deposit required for a bid to be made.
**/
candidateDeposit: u128 & AugmentedConst<ApiType>;
/** /**
* The number of blocks between membership challenges. * The number of blocks between membership challenges.
**/ **/
challengePeriod: u32 & AugmentedConst<ApiType>; challengePeriod: u32 & AugmentedConst<ApiType>;
/** /**
* The maximum number of candidates that we accept per round. * The number of blocks on which new candidates can claim their membership and be the
* named head.
**/ **/
maxCandidateIntake: u32 & AugmentedConst<ApiType>; claimPeriod: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of strikes before a member gets funds slashed.
**/
graceStrikes: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of bids at once.
**/
maxBids: u32 & AugmentedConst<ApiType>;
/** /**
* The maximum duration of the payout lock. * The maximum duration of the payout lock.
**/ **/
maxLockDuration: u32 & AugmentedConst<ApiType>; maxLockDuration: u32 & AugmentedConst<ApiType>;
/** /**
* The number of times a member may vote the wrong way (or not at all, when they are a * The maximum number of payouts a member may have waiting unclaimed.
* skeptic) before they become suspended.
**/ **/
maxStrikes: u32 & AugmentedConst<ApiType>; maxPayouts: u32 & AugmentedConst<ApiType>;
/** /**
* The societies's pallet id * The societies's pallet id
**/ **/
@@ -780,14 +806,10 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
periodSpend: u128 & AugmentedConst<ApiType>; periodSpend: u128 & AugmentedConst<ApiType>;
/** /**
* The number of blocks between candidate/membership rotation periods. * The number of blocks on which new candidates should be voted on. Together with
* `ClaimPeriod`, this sums to the number of blocks between candidate intake periods.
**/ **/
rotationPeriod: u32 & AugmentedConst<ApiType>; votingPeriod: u32 & AugmentedConst<ApiType>;
/**
* The amount of the unpaid reward that gets deducted in the case that either a skeptic
* doesn't vote or someone votes in the wrong way.
**/
wrongSideDeduction: u128 & AugmentedConst<ApiType>;
/** /**
* Generic const * Generic const
**/ **/
@@ -821,10 +843,6 @@ declare module '@polkadot/api-base/types/consts' {
* The test `reducing_history_depth_abrupt` shows this effect. * The test `reducing_history_depth_abrupt` shows this effect.
**/ **/
historyDepth: u32 & AugmentedConst<ApiType>; historyDepth: u32 & AugmentedConst<ApiType>;
/**
* Maximum number of nominations per nominator.
**/
maxNominations: u32 & AugmentedConst<ApiType>;
/** /**
* The maximum number of nominators rewarded for each validator. * The maximum number of nominators rewarded for each validator.
* *
@@ -861,6 +879,36 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
stateTrieMigration: {
/**
* Maximal number of bytes that a key can have.
*
* FRAME itself does not limit the key length.
* The concrete value must therefore depend on your storage usage.
* A [`frame_support::storage::StorageNMap`] for example can have an arbitrary number of
* keys which are then hashed and concatenated, resulting in arbitrarily long keys.
*
* Use the *state migration RPC* to retrieve the length of the longest key in your
* storage: <https://github.com/paritytech/substrate/issues/11642>
*
* The migration will halt with a `Halted` event if this value is too small.
* Since there is no real penalty from over-estimating, it is advised to use a large
* value. The default is 512 byte.
*
* Some key lengths for reference:
* - [`frame_support::storage::StorageValue`]: 32 byte
* - [`frame_support::storage::StorageMap`]: 64 byte
* - [`frame_support::storage::StorageDoubleMap`]: 96 byte
*
* For more info see
* <https://www.shawntabrizi.com/substrate/querying-substrate-storage-via-rpc/>
**/
maxKeyLen: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
system: { system: {
/** /**
* Maximum number of block number to block hash mappings to keep (oldest pruned first). * Maximum number of block number to block hash mappings to keep (oldest pruned first).
+150 -26
View File
@@ -113,6 +113,24 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
beefy: {
/**
* A given equivocation report is valid but already previously reported.
**/
DuplicateOffenceReport: AugmentedError<ApiType>;
/**
* An equivocation proof provided as part of an equivocation report is invalid.
**/
InvalidEquivocationProof: AugmentedError<ApiType>;
/**
* A key ownership proof provided as part of an equivocation report is invalid.
**/
InvalidKeyOwnershipProof: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
bounties: { bounties: {
/** /**
* The bounty cannot be closed because it has active child bounties. * The bounty cannot be closed because it has active child bounties.
@@ -192,8 +210,8 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
InvalidStatement: AugmentedError<ApiType>; InvalidStatement: AugmentedError<ApiType>;
/** /**
* There's not enough in the pot to pay out some unvested amount. Generally implies a logic * There's not enough in the pot to pay out some unvested amount. Generally implies a
* error. * logic error.
**/ **/
PotUnderflow: AugmentedError<ApiType>; PotUnderflow: AugmentedError<ApiType>;
/** /**
@@ -360,7 +378,8 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
NotParachain: AugmentedError<ApiType>; NotParachain: AugmentedError<ApiType>;
/** /**
* The crowdloan is not ready to dissolve. Potentially still has a slot or in retirement period. * The crowdloan is not ready to dissolve. Potentially still has a slot or in retirement
* period.
**/ **/
NotReadyToDissolve: AugmentedError<ApiType>; NotReadyToDissolve: AugmentedError<ApiType>;
/** /**
@@ -832,6 +851,12 @@ declare module '@polkadot/api-base/types/errors' {
* The message is queued for future execution. * The message is queued for future execution.
**/ **/
Queued: AugmentedError<ApiType>; Queued: AugmentedError<ApiType>;
/**
* The queue is paused and no message can be executed from it.
*
* This can change at any time and may resolve in the future by re-trying.
**/
QueuePaused: AugmentedError<ApiType>;
/** /**
* This message is temporarily unprocessable. * This message is temporarily unprocessable.
* *
@@ -1045,6 +1070,10 @@ declare module '@polkadot/api-base/types/errors' {
* Not enough blocks have surpassed since the last commission update. * Not enough blocks have surpassed since the last commission update.
**/ **/
CommissionChangeThrottled: AugmentedError<ApiType>; CommissionChangeThrottled: AugmentedError<ApiType>;
/**
* The supplied commission exceeds global maximum commission.
**/
CommissionExceedsGlobalMaximum: AugmentedError<ApiType>;
/** /**
* The supplied commission exceeds the max allowed commission. * The supplied commission exceeds the max allowed commission.
**/ **/
@@ -1168,14 +1197,15 @@ declare module '@polkadot/api-base/types/errors' {
* invalid dispute. * invalid dispute.
**/ **/
BitfieldReferencesFreedCore: AugmentedError<ApiType>; BitfieldReferencesFreedCore: AugmentedError<ApiType>;
/**
* Candidate not in parent context.
**/
CandidateNotInParentContext: AugmentedError<ApiType>;
/** /**
* Candidate scheduled despite pending candidate already existing for the para. * Candidate scheduled despite pending candidate already existing for the para.
**/ **/
CandidateScheduledBeforeParaFree: AugmentedError<ApiType>; CandidateScheduledBeforeParaFree: AugmentedError<ApiType>;
/**
* The candidate's relay-parent was not allowed. Either it was
* not recent enough or it didn't advance based on the last parachain block.
**/
DisallowedRelayParent: AugmentedError<ApiType>;
/** /**
* Head data exceeds the configured maximum. * Head data exceeds the configured maximum.
**/ **/
@@ -1192,6 +1222,11 @@ declare module '@polkadot/api-base/types/errors' {
* Insufficient (non-majority) backing. * Insufficient (non-majority) backing.
**/ **/
InsufficientBacking: AugmentedError<ApiType>; InsufficientBacking: AugmentedError<ApiType>;
/**
* Failed to compute group index for the core: either it's out of bounds
* or the relay parent doesn't belong to the current session.
**/
InvalidAssignment: AugmentedError<ApiType>;
/** /**
* Invalid (bad signature, unknown validator, etc.) backing. * Invalid (bad signature, unknown validator, etc.) backing.
**/ **/
@@ -1225,8 +1260,8 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
NotCollatorSigned: AugmentedError<ApiType>; NotCollatorSigned: AugmentedError<ApiType>;
/** /**
* The `para_head` hash in the candidate descriptor doesn't match the hash of the actual para head in the * The `para_head` hash in the candidate descriptor doesn't match the hash of the actual
* commitments. * para head in the commitments.
**/ **/
ParaHeadMismatch: AugmentedError<ApiType>; ParaHeadMismatch: AugmentedError<ApiType>;
/** /**
@@ -1269,10 +1304,6 @@ declare module '@polkadot/api-base/types/errors' {
* Availability bitfield has unexpected size. * Availability bitfield has unexpected size.
**/ **/
WrongBitfieldSize: AugmentedError<ApiType>; WrongBitfieldSize: AugmentedError<ApiType>;
/**
* Candidate included with the wrong collator.
**/
WrongCollator: AugmentedError<ApiType>;
/** /**
* Generic error * Generic error
**/ **/
@@ -1311,7 +1342,7 @@ declare module '@polkadot/api-base/types/errors' {
}; };
paras: { paras: {
/** /**
* Para cannot be downgraded to a parathread. * Para cannot be downgraded to an on-demand parachain.
**/ **/
CannotDowngrade: AugmentedError<ApiType>; CannotDowngrade: AugmentedError<ApiType>;
/** /**
@@ -1323,7 +1354,7 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
CannotOnboard: AugmentedError<ApiType>; CannotOnboard: AugmentedError<ApiType>;
/** /**
* Para cannot be upgraded to a parachain. * Para cannot be upgraded to a lease holding parachain.
**/ **/
CannotUpgrade: AugmentedError<ApiType>; CannotUpgrade: AugmentedError<ApiType>;
/** /**
@@ -1642,16 +1673,16 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
CannotDeregister: AugmentedError<ApiType>; CannotDeregister: AugmentedError<ApiType>;
/** /**
* Cannot schedule downgrade of parachain to parathread * Cannot schedule downgrade of lease holding parachain to on-demand parachain
**/ **/
CannotDowngrade: AugmentedError<ApiType>; CannotDowngrade: AugmentedError<ApiType>;
/** /**
* Cannot perform a parachain slot / lifecycle swap. Check that the state of both paras are * Cannot perform a parachain slot / lifecycle swap. Check that the state of both paras
* correct for the swap to work. * are correct for the swap to work.
**/ **/
CannotSwap: AugmentedError<ApiType>; CannotSwap: AugmentedError<ApiType>;
/** /**
* Cannot schedule upgrade of parathread to parachain * Cannot schedule upgrade of on-demand parachain to lease holding parachain
**/ **/
CannotUpgrade: AugmentedError<ApiType>; CannotUpgrade: AugmentedError<ApiType>;
/** /**
@@ -1675,7 +1706,7 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
NotParachain: AugmentedError<ApiType>; NotParachain: AugmentedError<ApiType>;
/** /**
* Para is not a Parathread. * Para is not a Parathread (on-demand parachain).
**/ **/
NotParathread: AugmentedError<ApiType>; NotParathread: AugmentedError<ApiType>;
/** /**
@@ -1687,7 +1718,8 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
NotReserved: AugmentedError<ApiType>; NotReserved: AugmentedError<ApiType>;
/** /**
* Para is locked from manipulation by the manager. Must use parachain or relay chain governance. * Para is locked from manipulation by the manager. Must use parachain or relay chain
* governance.
**/ **/
ParaLocked: AugmentedError<ApiType>; ParaLocked: AugmentedError<ApiType>;
/** /**
@@ -1770,6 +1802,10 @@ declare module '@polkadot/api-base/types/errors' {
* User is already a candidate. * User is already a candidate.
**/ **/
AlreadyCandidate: AugmentedError<ApiType>; AlreadyCandidate: AugmentedError<ApiType>;
/**
* The member is already elevated to this rank.
**/
AlreadyElevated: AugmentedError<ApiType>;
/** /**
* Society already founded. * Society already founded.
**/ **/
@@ -1778,14 +1814,22 @@ declare module '@polkadot/api-base/types/errors' {
* User is already a member. * User is already a member.
**/ **/
AlreadyMember: AugmentedError<ApiType>; AlreadyMember: AugmentedError<ApiType>;
/**
* The skeptic has already been punished for this offence.
**/
AlreadyPunished: AugmentedError<ApiType>;
/** /**
* Member is already vouching or banned from vouching again. * Member is already vouching or banned from vouching again.
**/ **/
AlreadyVouching: AugmentedError<ApiType>; AlreadyVouching: AugmentedError<ApiType>;
/** /**
* An incorrect position was provided. * The candidacy cannot be dropped as the candidate was clearly approved.
**/ **/
BadPosition: AugmentedError<ApiType>; Approved: AugmentedError<ApiType>;
/**
* The skeptic need not vote on candidates from expired rounds.
**/
Expired: AugmentedError<ApiType>;
/** /**
* Cannot remove the founder. * Cannot remove the founder.
**/ **/
@@ -1794,6 +1838,14 @@ declare module '@polkadot/api-base/types/errors' {
* Cannot remove the head of the chain. * Cannot remove the head of the chain.
**/ **/
Head: AugmentedError<ApiType>; Head: AugmentedError<ApiType>;
/**
* The candidacy cannot be concluded as the voting is still in progress.
**/
InProgress: AugmentedError<ApiType>;
/**
* Funds are insufficient to pay off society debts.
**/
InsufficientFunds: AugmentedError<ApiType>;
/** /**
* Not enough in pot to accept candidate. * Not enough in pot to accept candidate.
**/ **/
@@ -1802,10 +1854,22 @@ declare module '@polkadot/api-base/types/errors' {
* Too many members in the society. * Too many members in the society.
**/ **/
MaxMembers: AugmentedError<ApiType>; MaxMembers: AugmentedError<ApiType>;
/**
* There is no defender currently.
**/
NoDefender: AugmentedError<ApiType>;
/** /**
* Nothing to payout. * Nothing to payout.
**/ **/
NoPayout: AugmentedError<ApiType>; NoPayout: AugmentedError<ApiType>;
/**
* The membership cannot be claimed as the candidate was not clearly approved.
**/
NotApproved: AugmentedError<ApiType>;
/**
* User is not a bidder.
**/
NotBidder: AugmentedError<ApiType>;
/** /**
* User is not a candidate. * User is not a candidate.
**/ **/
@@ -1814,6 +1878,10 @@ declare module '@polkadot/api-base/types/errors' {
* The caller is not the founder. * The caller is not the founder.
**/ **/
NotFounder: AugmentedError<ApiType>; NotFounder: AugmentedError<ApiType>;
/**
* Group doesn't exist.
**/
NotGroup: AugmentedError<ApiType>;
/** /**
* The caller is not the head. * The caller is not the head.
**/ **/
@@ -1822,6 +1890,10 @@ declare module '@polkadot/api-base/types/errors' {
* User is not a member. * User is not a member.
**/ **/
NotMember: AugmentedError<ApiType>; NotMember: AugmentedError<ApiType>;
/**
* The candidate cannot be kicked as the candidate was not clearly rejected.
**/
NotRejected: AugmentedError<ApiType>;
/** /**
* User is not suspended. * User is not suspended.
**/ **/
@@ -1829,11 +1901,27 @@ declare module '@polkadot/api-base/types/errors' {
/** /**
* Member is not vouching. * Member is not vouching.
**/ **/
NotVouching: AugmentedError<ApiType>; NotVouchingOnBidder: AugmentedError<ApiType>;
/**
* The candidate/defender has no stale votes to remove.
**/
NoVotes: AugmentedError<ApiType>;
/**
* The candidacy cannot be bestowed as the candidate was clearly rejected.
**/
Rejected: AugmentedError<ApiType>;
/** /**
* User is suspended. * User is suspended.
**/ **/
Suspended: AugmentedError<ApiType>; Suspended: AugmentedError<ApiType>;
/**
* The candidacy cannot be pruned until a full additional intake period has passed.
**/
TooEarly: AugmentedError<ApiType>;
/**
* The skeptic already voted.
**/
Voted: AugmentedError<ApiType>;
/** /**
* Generic error * Generic error
**/ **/
@@ -1949,6 +2037,42 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
stateTrieMigration: {
/**
* Bad child root provided.
**/
BadChildRoot: AugmentedError<ApiType>;
/**
* Bad witness data provided.
**/
BadWitness: AugmentedError<ApiType>;
/**
* A key was longer than the configured maximum.
*
* This means that the migration halted at the current [`Progress`] and
* can be resumed with a larger [`crate::Config::MaxKeyLen`] value.
* Retrying with the same [`crate::Config::MaxKeyLen`] value will not work.
* The value should only be increased to avoid a storage migration for the currently
* stored [`crate::Progress::LastKey`].
**/
KeyTooLong: AugmentedError<ApiType>;
/**
* Max signed limits not respected.
**/
MaxSignedLimits: AugmentedError<ApiType>;
/**
* submitter does not have enough funds.
**/
NotEnoughFunds: AugmentedError<ApiType>;
/**
* Signed migration is not allowed because the maximum limit is not set yet.
**/
SignedMigrationNotAllowed: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
system: { system: {
/** /**
* The origin filter prevent the call to be dispatched. * The origin filter prevent the call to be dispatched.
@@ -2146,8 +2270,8 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
NoSubscription: AugmentedError<ApiType>; NoSubscription: AugmentedError<ApiType>;
/** /**
* There was some other issue (i.e. not to do with routing) in sending the message. Perhaps * There was some other issue (i.e. not to do with routing) in sending the message.
* a lack of space for buffering the message. * Perhaps a lack of space for buffering the message.
**/ **/
SendFailure: AugmentedError<ApiType>; SendFailure: AugmentedError<ApiType>;
/** /**
+49 -16
View File
@@ -10,7 +10,7 @@ import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32,
import type { ITuple } from '@polkadot/types-codec/types'; import type { ITuple } from '@polkadot/types-codec/types';
import type { EthereumAddress } from '@polkadot/types/interfaces/eth'; import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, H256, Perbill, Perquintill } from '@polkadot/types/interfaces/runtime'; import type { AccountId32, H256, Perbill, Perquintill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportMessagesProcessMessageError, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, KusamaRuntimeProxyType, PalletConvictionVotingTally, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletStakingExposure, PalletStakingForcing, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV4CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3MultiassetMultiAssets, XcmV3Response, XcmV3TraitsError, XcmV3TraitsOutcome, XcmV3Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup'; import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportMessagesProcessMessageError, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, KusamaRuntimeProxyType, PalletConvictionVotingTally, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletSocietyGroupParams, PalletStakingExposure, PalletStakingForcing, PalletStakingValidatorPrefs, PalletStateTrieMigrationError, PalletStateTrieMigrationMigrationCompute, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV5CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3MultiassetMultiAssets, XcmV3Response, XcmV3TraitsError, XcmV3TraitsOutcome, XcmV3Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>; export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
@@ -31,8 +31,8 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
BidAccepted: AugmentedEvent<ApiType, [bidder: AccountId32, paraId: u32, amount: u128, firstSlot: u32, lastSlot: u32], { bidder: AccountId32, paraId: u32, amount: u128, firstSlot: u32, lastSlot: u32 }>; BidAccepted: AugmentedEvent<ApiType, [bidder: AccountId32, paraId: u32, amount: u128, firstSlot: u32, lastSlot: u32], { bidder: AccountId32, paraId: u32, amount: u128, firstSlot: u32, lastSlot: u32 }>;
/** /**
* Someone attempted to lease the same slot twice for a parachain. The amount is held in reserve * Someone attempted to lease the same slot twice for a parachain. The amount is held in
* but no parachain slot has been leased. * reserve but no parachain slot has been leased.
**/ **/
ReserveConfiscated: AugmentedEvent<ApiType, [paraId: u32, leaser: AccountId32, amount: u128], { paraId: u32, leaser: AccountId32, amount: u128 }>; ReserveConfiscated: AugmentedEvent<ApiType, [paraId: u32, leaser: AccountId32, amount: u128], { paraId: u32, leaser: AccountId32, amount: u128 }>;
/** /**
@@ -45,7 +45,8 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
Unreserved: AugmentedEvent<ApiType, [bidder: AccountId32, amount: u128], { bidder: AccountId32, amount: u128 }>; Unreserved: AugmentedEvent<ApiType, [bidder: AccountId32, amount: u128], { bidder: AccountId32, amount: u128 }>;
/** /**
* The winning offset was chosen for an auction. This will map into the `Winning` storage map. * The winning offset was chosen for an auction. This will map into the `Winning` storage
* map.
**/ **/
WinningOffset: AugmentedEvent<ApiType, [auctionIndex: u32, blockNumber: u32], { auctionIndex: u32, blockNumber: u32 }>; WinningOffset: AugmentedEvent<ApiType, [auctionIndex: u32, blockNumber: u32], { auctionIndex: u32, blockNumber: u32 }>;
/** /**
@@ -826,15 +827,15 @@ declare module '@polkadot/api-base/types/events' {
/** /**
* A candidate was backed. `[candidate, head_data]` * A candidate was backed. `[candidate, head_data]`
**/ **/
CandidateBacked: AugmentedEvent<ApiType, [PolkadotPrimitivesV4CandidateReceipt, Bytes, u32, u32]>; CandidateBacked: AugmentedEvent<ApiType, [PolkadotPrimitivesV5CandidateReceipt, Bytes, u32, u32]>;
/** /**
* A candidate was included. `[candidate, head_data]` * A candidate was included. `[candidate, head_data]`
**/ **/
CandidateIncluded: AugmentedEvent<ApiType, [PolkadotPrimitivesV4CandidateReceipt, Bytes, u32, u32]>; CandidateIncluded: AugmentedEvent<ApiType, [PolkadotPrimitivesV5CandidateReceipt, Bytes, u32, u32]>;
/** /**
* A candidate timed out. `[candidate, head_data]` * A candidate timed out. `[candidate, head_data]`
**/ **/
CandidateTimedOut: AugmentedEvent<ApiType, [PolkadotPrimitivesV4CandidateReceipt, Bytes, u32]>; CandidateTimedOut: AugmentedEvent<ApiType, [PolkadotPrimitivesV5CandidateReceipt, Bytes, u32]>;
/** /**
* Some upward messages have been received and will be processed. * Some upward messages have been received and will be processed.
**/ **/
@@ -1139,6 +1140,10 @@ declare module '@polkadot/api-base/types/events' {
* Some funds were deposited into the society account. * Some funds were deposited into the society account.
**/ **/
Deposit: AugmentedEvent<ApiType, [value: u128], { value: u128 }>; Deposit: AugmentedEvent<ApiType, [value: u128], { value: u128 }>;
/**
* A \[member\] got elevated to \[rank\].
**/
Elevated: AugmentedEvent<ApiType, [member: AccountId32, rank: u32], { member: AccountId32, rank: u32 }>;
/** /**
* The society is founded by the given identity. * The society is founded by the given identity.
**/ **/
@@ -1153,13 +1158,9 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
MemberSuspended: AugmentedEvent<ApiType, [member: AccountId32], { member: AccountId32 }>; MemberSuspended: AugmentedEvent<ApiType, [member: AccountId32], { member: AccountId32 }>;
/** /**
* A new \[max\] member count has been set * A new set of \[params\] has been set for the group.
**/ **/
NewMaxMembers: AugmentedEvent<ApiType, [max: u32], { max: u32 }>; NewParams: AugmentedEvent<ApiType, [params: PalletSocietyGroupParams], { params: PalletSocietyGroupParams }>;
/**
* A group of members has been choosen as Skeptics
**/
SkepticsChosen: AugmentedEvent<ApiType, [skeptics: Vec<AccountId32>], { skeptics: Vec<AccountId32> }>;
/** /**
* A suspended member has been judged. * A suspended member has been judged.
**/ **/
@@ -1237,6 +1238,14 @@ declare module '@polkadot/api-base/types/events' {
* era as been reported. * era as been reported.
**/ **/
SlashReported: AugmentedEvent<ApiType, [validator: AccountId32, fraction: Perbill, slashEra: u32], { validator: AccountId32, fraction: Perbill, slashEra: u32 }>; SlashReported: AugmentedEvent<ApiType, [validator: AccountId32, fraction: Perbill, slashEra: u32], { validator: AccountId32, fraction: Perbill, slashEra: u32 }>;
/**
* Targets size limit reached.
**/
SnapshotTargetsSizeExceeded: AugmentedEvent<ApiType, [size_: u32], { size_: u32 }>;
/**
* Voters size limit reached.
**/
SnapshotVotersSizeExceeded: AugmentedEvent<ApiType, [size_: u32], { size_: u32 }>;
/** /**
* A new set of stakers was elected. * A new set of stakers was elected.
**/ **/
@@ -1263,6 +1272,29 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
stateTrieMigration: {
/**
* The auto migration task finished.
**/
AutoMigrationFinished: AugmentedEvent<ApiType, []>;
/**
* Migration got halted due to an error or miss-configuration.
**/
Halted: AugmentedEvent<ApiType, [error: PalletStateTrieMigrationError], { error: PalletStateTrieMigrationError }>;
/**
* Given number of `(top, child)` keys were migrated respectively, with the given
* `compute`.
**/
Migrated: AugmentedEvent<ApiType, [top: u32, child: u32, compute: PalletStateTrieMigrationMigrationCompute], { top: u32, child: u32, compute: PalletStateTrieMigrationMigrationCompute }>;
/**
* Some account got slashed by the given amount.
**/
Slashed: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
system: { system: {
/** /**
* `:code` was updated. * `:code` was updated.
@@ -1481,8 +1513,8 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
NotifyDispatchError: AugmentedEvent<ApiType, [queryId: u64, palletIndex: u8, callIndex: u8], { queryId: u64, palletIndex: u8, callIndex: u8 }>; NotifyDispatchError: AugmentedEvent<ApiType, [queryId: u64, palletIndex: u8, callIndex: u8], { queryId: u64, palletIndex: u8, callIndex: u8 }>;
/** /**
* Query response has been received and query is removed. The registered notification could * Query response has been received and query is removed. The registered notification
* not be dispatched because the dispatch weight is greater than the maximum weight * could not be dispatched because the dispatch weight is greater than the maximum weight
* originally budgeted by this runtime for the query result. * originally budgeted by this runtime for the query result.
**/ **/
NotifyOverweight: AugmentedEvent<ApiType, [queryId: u64, palletIndex: u8, callIndex: u8, actualWeight: SpWeightsWeightV2Weight, maxBudgetedWeight: SpWeightsWeightV2Weight], { queryId: u64, palletIndex: u8, callIndex: u8, actualWeight: SpWeightsWeightV2Weight, maxBudgetedWeight: SpWeightsWeightV2Weight }>; NotifyOverweight: AugmentedEvent<ApiType, [queryId: u64, palletIndex: u8, callIndex: u8, actualWeight: SpWeightsWeightV2Weight, maxBudgetedWeight: SpWeightsWeightV2Weight], { queryId: u64, palletIndex: u8, callIndex: u8, actualWeight: SpWeightsWeightV2Weight, maxBudgetedWeight: SpWeightsWeightV2Weight }>;
@@ -1536,7 +1568,8 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
VersionNotifyStarted: AugmentedEvent<ApiType, [destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed], { destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed }>; VersionNotifyStarted: AugmentedEvent<ApiType, [destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed], { destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed }>;
/** /**
* We have requested that a remote chain stops sending us XCM version change notifications. * We have requested that a remote chain stops sending us XCM version change
* notifications.
**/ **/
VersionNotifyUnrequested: AugmentedEvent<ApiType, [destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed], { destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed }>; VersionNotifyUnrequested: AugmentedEvent<ApiType, [destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed], { destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed }>;
/** /**
+207 -88
View File
@@ -7,11 +7,11 @@ import '@polkadot/api-base/types/storage';
import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types'; import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';
import type { Data } from '@polkadot/types'; import type { Data } from '@polkadot/types';
import type { BTreeSet, Bytes, Null, Option, Struct, U8aFixed, Vec, WrapperOpaque, bool, u128, u16, u32, u64 } from '@polkadot/types-codec'; import type { BTreeMap, BTreeSet, Bytes, Null, Option, Struct, U8aFixed, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types'; import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { EthereumAddress } from '@polkadot/types/interfaces/eth'; import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime'; import type { AccountId32, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeRuntimeHoldReason, KusamaRuntimeSessionKeys, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesIdAmount, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletConvictionVotingVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMessageQueueBookState, PalletMessageQueuePage, PalletMultisigMultisig, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV4AssignmentAppPublic, PolkadotPrimitivesV4CandidateCommitments, PolkadotPrimitivesV4CoreOccupied, PolkadotPrimitivesV4DisputeState, PolkadotPrimitivesV4ExecutorParams, PolkadotPrimitivesV4ScrapedOnChainVotes, PolkadotPrimitivesV4SessionInfo, PolkadotPrimitivesV4UpgradeGoAhead, PolkadotPrimitivesV4UpgradeRestriction, PolkadotPrimitivesV4ValidatorAppPublic, PolkadotPrimitivesVstagingSlashingPendingSlashes, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, SpWeightsWeightV2Weight, XcmVersionedAssetId, XcmVersionedMultiLocation } from '@polkadot/types/lookup'; import type { FrameSupportDispatchPerDispatchClassWeight, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeRuntimeHoldReason, KusamaRuntimeSessionKeys, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesIdAmount, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletConvictionVotingVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineSr25519AppSr25519Public, PalletMessageQueueBookState, PalletMessageQueuePage, PalletMultisigMultisig, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyCandidacy, PalletSocietyGroupParams, PalletSocietyIntakeRecord, PalletSocietyMemberRecord, PalletSocietyPayoutRecord, PalletSocietyTally, PalletSocietyVote, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV5AssignmentAppPublic, PolkadotPrimitivesV5CandidateCommitments, PolkadotPrimitivesV5CoreOccupied, PolkadotPrimitivesV5DisputeState, PolkadotPrimitivesV5ExecutorParams, PolkadotPrimitivesV5ParasEntry, PolkadotPrimitivesV5ScrapedOnChainVotes, PolkadotPrimitivesV5SessionInfo, PolkadotPrimitivesV5SlashingPendingSlashes, PolkadotPrimitivesV5UpgradeGoAhead, PolkadotPrimitivesV5UpgradeRestriction, PolkadotPrimitivesV5ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpConsensusBeefyEcdsaCryptoPublic, SpConsensusBeefyMmrBeefyAuthoritySet, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, SpWeightsWeightV2Weight, XcmVersionedAssetId, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
import type { Observable } from '@polkadot/types/types'; import type { Observable } from '@polkadot/types/types';
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>; export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
@@ -232,6 +232,59 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
beefy: {
/**
* The current authorities set
**/
authorities: AugmentedQuery<ApiType, () => Observable<Vec<SpConsensusBeefyEcdsaCryptoPublic>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Block number where BEEFY consensus is enabled/started.
* By changing this (through governance or sudo), BEEFY consensus is effectively
* restarted from the new block number.
**/
genesisBlock: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Authorities set scheduled to be used with the next session
**/
nextAuthorities: AugmentedQuery<ApiType, () => Observable<Vec<SpConsensusBeefyEcdsaCryptoPublic>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* A mapping from BEEFY set ID to the index of the *most recent* session for which its
* members were responsible.
*
* This is only used for validating equivocation proofs. An equivocation proof must
* contains a key-ownership proof for a given session, therefore we need a way to tie
* together sessions and BEEFY set ids, i.e. we need to validate that a validator
* was the owner of a given key on a given session, and what the active set ID was
* during that session.
*
* TWOX-NOTE: `ValidatorSetId` is not under user control.
**/
setIdSession: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
/**
* The current validator set id
**/
validatorSetId: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
beefyMmrLeaf: {
/**
* Details of current BEEFY authority set.
**/
beefyAuthorities: AugmentedQuery<ApiType, () => Observable<SpConsensusBeefyMmrBeefyAuthoritySet>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Details of next BEEFY authority set.
*
* This storage entry is used as cache for calls to `update_beefy_next_authority_set`.
**/
beefyNextAuthorities: AugmentedQuery<ApiType, () => Observable<SpConsensusBeefyMmrBeefyAuthoritySet>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
bounties: { bounties: {
/** /**
* Bounties that have been made. * Bounties that have been made.
@@ -684,7 +737,8 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* The HRMP watermark associated with each para. * The HRMP watermark associated with each para.
* Invariant: * Invariant:
* - each para `P` used here as a key should satisfy `Paras::is_valid_para(P)` within a session. * - each para `P` used here as a key should satisfy `Paras::is_valid_para(P)` within a
* session.
**/ **/
hrmpWatermarks: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; hrmpWatermarks: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
@@ -749,10 +803,9 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
keys: AugmentedQuery<ApiType, () => Observable<Vec<PalletImOnlineSr25519AppSr25519Public>>, []> & QueryableStorageEntry<ApiType, []>; keys: AugmentedQuery<ApiType, () => Observable<Vec<PalletImOnlineSr25519AppSr25519Public>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* For each session index, we keep a mapping of `SessionIndex` and `AuthIndex` to * For each session index, we keep a mapping of `SessionIndex` and `AuthIndex`.
* `WrapperOpaque<BoundedOpaqueNetworkState>`.
**/ **/
receivedHeartbeats: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<WrapperOpaque<PalletImOnlineBoundedOpaqueNetworkState>>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>; receivedHeartbeats: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<bool>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
/** /**
* Generic query * Generic query
**/ **/
@@ -785,9 +838,9 @@ declare module '@polkadot/api-base/types/storage' {
* Semantically a `bool`, but this guarantees it should never hit the trie, * Semantically a `bool`, but this guarantees it should never hit the trie,
* as this is cleared in `on_finalize` and Frame optimizes `None` values to be empty values. * as this is cleared in `on_finalize` and Frame optimizes `None` values to be empty values.
* *
* As a `bool`, `set(false)` and `remove()` both lead to the next `get()` being false, but one of * As a `bool`, `set(false)` and `remove()` both lead to the next `get()` being false, but one
* them writes to the trie and one does not. This confusion makes `Option<()>` more suitable for * of them writes to the trie and one does not. This confusion makes `Option<()>` more suitable
* the semantics of this variable. * for the semantics of this variable.
**/ **/
hasInitialized: AugmentedQuery<ApiType, () => Observable<Option<Null>>, []> & QueryableStorageEntry<ApiType, []>; hasInitialized: AugmentedQuery<ApiType, () => Observable<Option<Null>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
@@ -813,6 +866,27 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
mmr: {
/**
* Hashes of the nodes in the MMR.
*
* Note this collection only contains MMR peaks, the inner nodes (and leaves)
* are pruned and only stored in the Offchain DB.
**/
nodes: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<H256>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
/**
* Current size of the MMR (number of leaves).
**/
numberOfLeaves: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Latest MMR Root hash.
**/
rootHash: AugmentedQuery<ApiType, () => Observable<H256>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
multisig: { multisig: {
/** /**
* The set of open multisig operations. * The set of open multisig operations.
@@ -1028,6 +1102,12 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
paraAssignmentProvider: {
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
paraInclusion: { paraInclusion: {
/** /**
* The latest bitfield for each validator, referred to by their index in the validator set. * The latest bitfield for each validator, referred to by their index in the validator set.
@@ -1040,7 +1120,7 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* The commitments of candidates pending availability, by `ParaId`. * The commitments of candidates pending availability, by `ParaId`.
**/ **/
pendingAvailabilityCommitments: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV4CandidateCommitments>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; pendingAvailabilityCommitments: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV5CandidateCommitments>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Generic query * Generic query
**/ **/
@@ -1059,7 +1139,7 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* Scraped on chain data for extracting resolved disputes as well as backing votes. * Scraped on chain data for extracting resolved disputes as well as backing votes.
**/ **/
onChainVotes: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV4ScrapedOnChainVotes>>, []> & QueryableStorageEntry<ApiType, []>; onChainVotes: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV5ScrapedOnChainVotes>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* Generic query * Generic query
**/ **/
@@ -1104,7 +1184,12 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
heads: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; heads: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* All parachains. Ordered ascending by `ParaId`. Parathreads are not included. * The context (relay-chain block number) of the most recent parachain head.
**/
mostRecentContext: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* All lease holding parachains. Ordered ascending by `ParaId`. On demand parachains are not
* included.
* *
* Consider using the [`ParachainsCache`] type of modifying. * Consider using the [`ParachainsCache`] type of modifying.
**/ **/
@@ -1127,11 +1212,11 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
pastCodeMeta: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<PolkadotRuntimeParachainsParasParaPastCodeMeta>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; pastCodeMeta: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<PolkadotRuntimeParachainsParasParaPastCodeMeta>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Which paras have past code that needs pruning and the relay-chain block at which the code was replaced. * Which paras have past code that needs pruning and the relay-chain block at which the code
* Note that this is the actual height of the included block, not the expected height at which the * was replaced. Note that this is the actual height of the included block, not the expected
* code upgrade would be applied, although they may be equal. * height at which the code upgrade would be applied, although they may be equal.
* This is to ensure the entire acceptance period is covered, not an offset acceptance period starting * This is to ensure the entire acceptance period is covered, not an offset acceptance period
* from the time at which the parachain perceives a code upgrade as having occurred. * starting from the time at which the parachain perceives a code upgrade as having occurred.
* Multiple entries for a single para are permitted. Ordered ascending by block number. * Multiple entries for a single para are permitted. Ordered ascending by block number.
**/ **/
pastCodePruning: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, u32]>>>, []> & QueryableStorageEntry<ApiType, []>; pastCodePruning: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;
@@ -1167,17 +1252,18 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
upgradeCooldowns: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, u32]>>>, []> & QueryableStorageEntry<ApiType, []>; upgradeCooldowns: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* This is used by the relay-chain to communicate to a parachain a go-ahead with in the upgrade procedure. * This is used by the relay-chain to communicate to a parachain a go-ahead with in the upgrade
* procedure.
* *
* This value is absent when there are no upgrades scheduled or during the time the relay chain * This value is absent when there are no upgrades scheduled or during the time the relay chain
* performs the checks. It is set at the first relay-chain block when the corresponding parachain * performs the checks. It is set at the first relay-chain block when the corresponding
* can switch its upgrade function. As soon as the parachain's block is included, the value * parachain can switch its upgrade function. As soon as the parachain's block is included, the
* gets reset to `None`. * value gets reset to `None`.
* *
* NOTE that this field is used by parachains via merkle storage proofs, therefore changing * NOTE that this field is used by parachains via merkle storage proofs, therefore changing
* the format will require migration of parachains. * the format will require migration of parachains.
**/ **/
upgradeGoAheadSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV4UpgradeGoAhead>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; upgradeGoAheadSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV5UpgradeGoAhead>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* This is used by the relay-chain to communicate that there are restrictions for performing * This is used by the relay-chain to communicate that there are restrictions for performing
* an upgrade for this parachain. * an upgrade for this parachain.
@@ -1189,7 +1275,7 @@ declare module '@polkadot/api-base/types/storage' {
* NOTE that this field is used by parachains via merkle storage proofs, therefore changing * NOTE that this field is used by parachains via merkle storage proofs, therefore changing
* the format will require migration of parachains. * the format will require migration of parachains.
**/ **/
upgradeRestrictionSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV4UpgradeRestriction>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; upgradeRestrictionSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV5UpgradeRestriction>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Generic query * Generic query
**/ **/
@@ -1197,8 +1283,8 @@ declare module '@polkadot/api-base/types/storage' {
}; };
paraScheduler: { paraScheduler: {
/** /**
* One entry for each availability core. Entries are `None` if the core is not currently occupied. Can be * One entry for each availability core. Entries are `None` if the core is not currently
* temporarily `Some` if scheduled but not occupied. * occupied. Can be temporarily `Some` if scheduled but not occupied.
* The i'th parachain belongs to the i'th core, with the remaining cores all being * The i'th parachain belongs to the i'th core, with the remaining cores all being
* parathread-multiplexers. * parathread-multiplexers.
* *
@@ -1206,32 +1292,18 @@ declare module '@polkadot/api-base/types/storage' {
* * The number of parachains and parathread multiplexers * * The number of parachains and parathread multiplexers
* * The number of validators divided by `configuration.max_validators_per_core`. * * The number of validators divided by `configuration.max_validators_per_core`.
**/ **/
availabilityCores: AugmentedQuery<ApiType, () => Observable<Vec<Option<PolkadotPrimitivesV4CoreOccupied>>>, []> & QueryableStorageEntry<ApiType, []>; availabilityCores: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV5CoreOccupied>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* An index used to ensure that only one claim on a parathread exists in the queue or is * One entry for each availability core. The `VecDeque` represents the assignments to be
* currently being handled by an occupied core. * scheduled on that core. `None` is used to signal to not schedule the next para of the core
* * as there is one currently being scheduled. Not using `None` here would overwrite the
* Bounded by the number of parathread cores and scheduling lookahead. Reasonably, 10 * 50 = 500. * `CoreState` in the runtime API. The value contained here will not be valid after the end of
* a block. Runtime APIs should be used to determine scheduled cores/ for the upcoming block.
**/ **/
parathreadClaimIndex: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>; claimQueue: AugmentedQuery<ApiType, () => Observable<BTreeMap<u32, Vec<Option<PolkadotPrimitivesV5ParasEntry>>>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* A queue of upcoming claims and which core they should be mapped onto. * The block number where the session start occurred. Used to track how many group rotations
* * have occurred.
* The number of queued claims is bounded at the `scheduling_lookahead`
* multiplied by the number of parathread multiplexer cores. Reasonably, 10 * 50 = 500.
**/
parathreadQueue: AugmentedQuery<ApiType, () => Observable<PolkadotRuntimeParachainsSchedulerParathreadClaimQueue>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Currently scheduled cores - free but up to be occupied.
*
* Bounded by the number of cores: one for each parachain and parathread multiplexer.
*
* The value contained here will not be valid after the end of a block. Runtime APIs should be used to determine scheduled cores/
* for the upcoming block.
**/
scheduled: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotRuntimeParachainsSchedulerCoreAssignment>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The block number where the session start occurred. Used to track how many group rotations have occurred.
* *
* Note that in the context of parachains modules the session change is signaled during * Note that in the context of parachains modules the session change is signaled during
* the block and enacted at the end of the block (at the finalization stage, to be exact). * the block and enacted at the end of the block (at the finalization stage, to be exact).
@@ -1244,8 +1316,9 @@ declare module '@polkadot/api-base/types/storage' {
* broader set of Polkadot validators, but instead just the subset used for parachains during * broader set of Polkadot validators, but instead just the subset used for parachains during
* this session. * this session.
* *
* Bound: The number of cores is the sum of the numbers of parachains and parathread multiplexers. * Bound: The number of cores is the sum of the numbers of parachains and parathread
* Reasonably, 100-1000. The dominant factor is the number of validators: safe upper bound at 10k. * multiplexers. Reasonably, 100-1000. The dominant factor is the number of validators: safe
* upper bound at 10k.
**/ **/
validatorGroups: AugmentedQuery<ApiType, () => Observable<Vec<Vec<u32>>>, []> & QueryableStorageEntry<ApiType, []>; validatorGroups: AugmentedQuery<ApiType, () => Observable<Vec<Vec<u32>>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
@@ -1262,7 +1335,7 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* All ongoing or concluded disputes for the last several sessions. * All ongoing or concluded disputes for the last several sessions.
**/ **/
disputes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV4DisputeState>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>; disputes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV5DisputeState>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
/** /**
* Whether the chain is frozen. Starts as `None`. When this is `Some`, * Whether the chain is frozen. Starts as `None`. When this is `Some`,
* the chain will not accept any new parachain blocks for backing or inclusion, * the chain will not accept any new parachain blocks for backing or inclusion,
@@ -1295,7 +1368,7 @@ declare module '@polkadot/api-base/types/storage' {
* Note that this API is private due to it being prone to 'off-by-one' at session boundaries. * Note that this API is private due to it being prone to 'off-by-one' at session boundaries.
* When in doubt, use `Sessions` API instead. * When in doubt, use `Sessions` API instead.
**/ **/
assignmentKeysUnsafe: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV4AssignmentAppPublic>>, []> & QueryableStorageEntry<ApiType, []>; assignmentKeysUnsafe: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV5AssignmentAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The earliest session for which previous session info is stored. * The earliest session for which previous session info is stored.
**/ **/
@@ -1303,13 +1376,13 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* Executor parameter set for a given session index * Executor parameter set for a given session index
**/ **/
sessionExecutorParams: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV4ExecutorParams>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; sessionExecutorParams: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV5ExecutorParams>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Session information in a rolling window. * Session information in a rolling window.
* Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`. * Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`.
* Does not have any entries before the session index in the first session change notification. * Does not have any entries before the session index in the first session change notification.
**/ **/
sessions: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV4SessionInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; sessions: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV5SessionInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Generic query * Generic query
**/ **/
@@ -1322,10 +1395,14 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
activeValidatorIndices: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>; activeValidatorIndices: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The parachain attestation keys of the validators actively participating in parachain consensus. * The parachain attestation keys of the validators actively participating in parachain
* This should be the same length as `ActiveValidatorIndices`. * consensus. This should be the same length as `ActiveValidatorIndices`.
**/ **/
activeValidatorKeys: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV4ValidatorAppPublic>>, []> & QueryableStorageEntry<ApiType, []>; activeValidatorKeys: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV5ValidatorAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* All allowed relay-parents.
**/
allowedRelayParents: AugmentedQuery<ApiType, () => Observable<PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The current session index. * The current session index.
**/ **/
@@ -1339,7 +1416,7 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* Validators pending dispute slashes. * Validators pending dispute slashes.
**/ **/
unappliedSlashes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesVstagingSlashingPendingSlashes>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>; unappliedSlashes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV5SlashingPendingSlashes>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
/** /**
* `ValidatorSetCount` per session. * `ValidatorSetCount` per session.
**/ **/
@@ -1440,8 +1517,8 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* Amount held on deposit for each para and the original depositor. * Amount held on deposit for each para and the original depositor.
* *
* The given account ID is responsible for registering the code and initial head data, but may only do * The given account ID is responsible for registering the code and initial head data, but may
* so if it isn't yet registered. (After that, it's up to governance to do so.) * only do so if it isn't yet registered. (After that, it's up to governance to do so.)
**/ **/
paras: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotRuntimeCommonParasRegistrarParaInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; paras: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotRuntimeCommonParasRegistrarParaInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
@@ -1515,8 +1592,8 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* Amounts held on deposit for each (possibly future) leased parachain. * Amounts held on deposit for each (possibly future) leased parachain.
* *
* The actual amount locked on its behalf by any account at any time is the maximum of the second values * The actual amount locked on its behalf by any account at any time is the maximum of the
* of the items in this list whose first value is the account. * second values of the items in this list whose first value is the account.
* *
* The first item in the list is the amount locked for the current Lease Period. Following * The first item in the list is the amount locked for the current Lease Period. Following
* items are for the subsequent lease periods. * items are for the subsequent lease periods.
@@ -1541,67 +1618,83 @@ declare module '@polkadot/api-base/types/storage' {
* The current bids, stored ordered by the value of the bid. * The current bids, stored ordered by the value of the bid.
**/ **/
bids: AugmentedQuery<ApiType, () => Observable<Vec<PalletSocietyBid>>, []> & QueryableStorageEntry<ApiType, []>; bids: AugmentedQuery<ApiType, () => Observable<Vec<PalletSocietyBid>>, []> & QueryableStorageEntry<ApiType, []>;
candidates: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletSocietyCandidacy>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/** /**
* The current set of candidates; bidders that are attempting to become members. * The number of challenge rounds there have been. Used to identify stale DefenderVotes.
**/ **/
candidates: AugmentedQuery<ApiType, () => Observable<Vec<PalletSocietyBid>>, []> & QueryableStorageEntry<ApiType, []>; challengeRoundCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The defending member currently being challenged. * Votes for the defender, keyed by challenge round.
**/ **/
defender: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>; defenderVotes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<PalletSocietyVote>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;
/** /**
* Votes for the defender. * The defending member currently being challenged, along with a running tally of votes.
**/ **/
defenderVotes: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletSocietyVote>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>; defending: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[AccountId32, AccountId32, PalletSocietyTally]>>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The first member. * The first member.
**/ **/
founder: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>; founder: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The most primary from the most recently approved members. * The most primary from the most recently approved rank 0 members in the society.
**/ **/
head: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>; head: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The current items in `Members` keyed by their unique index. Keys are densely populated
* `0..MemberCount` (does not include `MemberCount`).
**/
memberByIndex: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<AccountId32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* The number of items in `Members` currently. (Doesn't include `SuspendedMembers`.)
**/
memberCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The current members and their rank. Doesn't include `SuspendedMembers`.
**/
members: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletSocietyMemberRecord>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* At the end of the claim period, this contains the most recently approved members (along with
* their bid and round ID) who is from the most recent round with the lowest bid. They will
* become the new `Head`.
**/
nextHead: AugmentedQuery<ApiType, () => Observable<Option<PalletSocietyIntakeRecord>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The max number of members for the society at one time. * The max number of members for the society at one time.
**/ **/
maxMembers: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>; parameters: AugmentedQuery<ApiType, () => Observable<Option<PalletSocietyGroupParams>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The current set of members, ordered. * Information regarding rank-0 payouts, past and future.
**/ **/
members: AugmentedQuery<ApiType, () => Observable<Vec<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>; payouts: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletSocietyPayoutRecord>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* Pending payouts; ordered by block number, with the amount that should be paid out.
**/
payouts: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<ITuple<[u32, u128]>>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/** /**
* Amount of our account balance that is specifically for the next round's bid(s). * Amount of our account balance that is specifically for the next round's bid(s).
**/ **/
pot: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>; pot: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The number of rounds which have passed.
**/
roundCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* A hash of the rules of this society concerning membership. Can only be set once and * A hash of the rules of this society concerning membership. Can only be set once and
* only by the founder. * only by the founder.
**/ **/
rules: AugmentedQuery<ApiType, () => Observable<Option<H256>>, []> & QueryableStorageEntry<ApiType, []>; rules: AugmentedQuery<ApiType, () => Observable<Option<H256>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The ongoing number of losing votes cast by the member. * The current skeptic.
**/ **/
strikes: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<u32>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>; skeptic: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The set of suspended candidates. * The set of suspended members, with their old membership record.
**/ **/
suspendedCandidates: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<ITuple<[u128, PalletSocietyBidKind]>>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>; suspendedMembers: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletSocietyMemberRecord>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/** /**
* The set of suspended members. * Clear-cursor for Vote, map from Candidate -> (Maybe) Cursor.
**/ **/
suspendedMembers: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<bool>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>; voteClearCursor: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<Bytes>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/** /**
* Double map from Candidate -> Voter -> (Maybe) Vote. * Double map from Candidate -> Voter -> (Maybe) Vote.
**/ **/
votes: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<PalletSocietyVote>>, [AccountId32, AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32, AccountId32]>; votes: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<PalletSocietyVote>>, [AccountId32, AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32, AccountId32]>;
/**
* Members currently vouching or banned from vouching again
**/
vouching: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletSocietyVouchingStatus>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/** /**
* Generic query * Generic query
**/ **/
@@ -1767,7 +1860,8 @@ declare module '@polkadot/api-base/types/storage' {
* they wish to support. * they wish to support.
* *
* Note that the keys of this storage map might become non-decodable in case the * Note that the keys of this storage map might become non-decodable in case the
* [`Config::MaxNominations`] configuration is decreased. In this rare case, these nominators * account's [`NominationsQuota::MaxNominations`] configuration is decreased.
* In this rare case, these nominators
* are still existent in storage, their key is correct and retrievable (i.e. `contains_key` * are still existent in storage, their key is correct and retrievable (i.e. `contains_key`
* indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable * indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable
* nominators will effectively not-exist, until they re-submit their preferences such that it * nominators will effectively not-exist, until they re-submit their preferences such that it
@@ -1844,6 +1938,31 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
stateTrieMigration: {
/**
* The limits that are imposed on automatic migrations.
*
* If set to None, then no automatic migration happens.
**/
autoLimits: AugmentedQuery<ApiType, () => Observable<Option<PalletStateTrieMigrationMigrationLimits>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Migration progress.
*
* This stores the snapshot of the last migrated keys. It can be set into motion and move
* forward by any of the means provided by this pallet.
**/
migrationProcess: AugmentedQuery<ApiType, () => Observable<PalletStateTrieMigrationMigrationTask>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The maximum limits that the signed migration could use.
*
* If not set, no signed submission is allowed.
**/
signedMigrationMaxLimits: AugmentedQuery<ApiType, () => Observable<Option<PalletStateTrieMigrationMigrationLimits>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
system: { system: {
/** /**
* The full account information for a particular account ID. * The full account information for a particular account ID.
@@ -1887,7 +2006,7 @@ declare module '@polkadot/api-base/types/storage' {
* allows light-clients to leverage the changes trie storage tracking mechanism and * allows light-clients to leverage the changes trie storage tracking mechanism and
* in case of changes fetch the list of events of interest. * in case of changes fetch the list of events of interest.
* *
* The value has the type `(T::BlockNumber, EventIndex)` because if we used only just * The value has the type `(BlockNumberFor<T>, EventIndex)` because if we used only just
* the `EventIndex` then in case if the topic has the same contents on the next block * the `EventIndex` then in case if the topic has the same contents on the next block
* no notification will be triggered thus the event might be lost. * no notification will be triggered thus the event might be lost.
**/ **/
+31 -4
View File
@@ -9,7 +9,7 @@ import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-b
import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec'; import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types'; import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe'; import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
import type { BeefyEquivocationProof, ValidatorSet, ValidatorSetId } from '@polkadot/types/interfaces/beefy'; import type { BeefyAuthoritySet, BeefyEquivocationProof, BeefyNextAuthoritySet, ValidatorSet, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder'; import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
import type { BlockHash } from '@polkadot/types/interfaces/chain'; import type { BlockHash } from '@polkadot/types/interfaces/chain';
import type { AuthorityId } from '@polkadot/types/interfaces/consensus'; import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
@@ -18,7 +18,7 @@ import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/t
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata'; import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError } from '@polkadot/types/interfaces/mmr'; import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError } from '@polkadot/types/interfaces/mmr';
import type { NpPoolId } from '@polkadot/types/interfaces/nompools'; import type { NpPoolId } from '@polkadot/types/interfaces/nompools';
import type { CandidateCommitments, CandidateEvent, CandidateHash, CommittedCandidateReceipt, CoreState, DisputeState, ExecutorParams, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains'; import type { CandidateCommitments, CandidateEvent, CandidateHash, CommittedCandidateReceipt, CoreState, DisputeProof, DisputeState, ExecutorParams, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PendingSlashes, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment'; import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
import type { AccountId, Balance, Block, BlockNumber, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime'; import type { AccountId, Balance, Block, BlockNumber, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime';
import type { SessionIndex } from '@polkadot/types/interfaces/session'; import type { SessionIndex } from '@polkadot/types/interfaces/session';
@@ -85,7 +85,7 @@ declare module '@polkadot/api-base/types/calls' {
**/ **/
[key: string]: DecoratedCallBase<ApiType>; [key: string]: DecoratedCallBase<ApiType>;
}; };
/** 0x49eaaf1b548a0cb0/2 */ /** 0x49eaaf1b548a0cb0/3 */
beefyApi: { beefyApi: {
/** /**
* Return the block number where BEEFY consensus is enabled/started * Return the block number where BEEFY consensus is enabled/started
@@ -108,6 +108,21 @@ declare module '@polkadot/api-base/types/calls' {
**/ **/
[key: string]: DecoratedCallBase<ApiType>; [key: string]: DecoratedCallBase<ApiType>;
}; };
/** 0x2a5e924655399e60/1 */
beefyMmrApi: {
/**
* Return the currently active BEEFY authority set proof.
**/
authoritySetProof: AugmentedCall<ApiType, () => Observable<BeefyAuthoritySet>>;
/**
* Return the next/queued BEEFY authority set proof.
**/
nextAuthoritySetProof: AugmentedCall<ApiType, () => Observable<BeefyNextAuthoritySet>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x40fe3ad401f8959a/6 */ /** 0x40fe3ad401f8959a/6 */
blockBuilder: { blockBuilder: {
/** /**
@@ -245,7 +260,7 @@ declare module '@polkadot/api-base/types/calls' {
**/ **/
[key: string]: DecoratedCallBase<ApiType>; [key: string]: DecoratedCallBase<ApiType>;
}; };
/** 0xaf2c0297a23e6d3d/4 */ /** 0xaf2c0297a23e6d3d/5 */
parachainHost: { parachainHost: {
/** /**
* Returns the persisted validation data for the given `ParaId` along with the corresponding validation code hash. * Returns the persisted validation data for the given `ParaId` along with the corresponding validation code hash.
@@ -279,6 +294,10 @@ declare module '@polkadot/api-base/types/calls' {
* Get the contents of all channels addressed to the given recipient. * Get the contents of all channels addressed to the given recipient.
**/ **/
inboundHrmpChannelsContents: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Vec<InboundHrmpMessage>>>; inboundHrmpChannelsContents: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Vec<InboundHrmpMessage>>>;
/**
* Returns a merkle proof of a validator session key
**/
keyOwnershipProof: AugmentedCall<ApiType, (validatorId: ValidatorId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
/** /**
* Scrape dispute relevant from on-chain, backing votes and resolved disputes. * Scrape dispute relevant from on-chain, backing votes and resolved disputes.
**/ **/
@@ -307,6 +326,14 @@ declare module '@polkadot/api-base/types/calls' {
* Submits a PVF pre-checking statement into the transaction pool. * Submits a PVF pre-checking statement into the transaction pool.
**/ **/
submitPvfCheckStatement: AugmentedCall<ApiType, (stmt: PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: ValidatorSignature | string | Uint8Array) => Observable<Null>>; submitPvfCheckStatement: AugmentedCall<ApiType, (stmt: PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: ValidatorSignature | string | Uint8Array) => Observable<Null>>;
/**
* Submit an unsigned extrinsic to slash validators who lost a dispute about a candidate of a past session
**/
submitReportDisputeLost: AugmentedCall<ApiType, (disputeProof: DisputeProof | { timeSlot?: any; kind?: any; validatorIndex?: any; validatorId?: any } | string | Uint8Array, keyOwnershipProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
/**
* Returns a list of validators that lost a past session dispute and need to be slashed
**/
unappliedSlashes: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[SessionIndex, CandidateHash, PendingSlashes]>>>>;
/** /**
* Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`. * Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.
**/ **/
+129 -41
View File
@@ -11,7 +11,7 @@ import type { Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64,
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types'; import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { EthereumAddress } from '@polkadot/types/interfaces/eth'; import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime'; import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeSessionKeys, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpPerbill, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV4ExecutorParams, PolkadotPrimitivesV4InherentData, PolkadotPrimitivesV4PvfCheckStatement, PolkadotPrimitivesV4ValidatorAppSignature, PolkadotPrimitivesVstagingAsyncBackingParams, PolkadotPrimitivesVstagingSlashingDisputeProof, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup'; import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeSessionKeys, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpPerbill, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV5ExecutorParams, PolkadotPrimitivesV5InherentData, PolkadotPrimitivesV5PvfCheckStatement, PolkadotPrimitivesV5SlashingDisputeProof, PolkadotPrimitivesV5ValidatorAppSignature, PolkadotPrimitivesVstagingAsyncBackingParams, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBeefyEquivocationProof, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>; export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>; export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
@@ -97,6 +97,20 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
[key: string]: SubmittableExtrinsicFunction<ApiType>; [key: string]: SubmittableExtrinsicFunction<ApiType>;
}; };
beefy: {
/**
* See [`Pallet::report_equivocation`].
**/
reportEquivocation: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyEquivocationProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyEquivocationProof, SpSessionMembershipProof]>;
/**
* See [`Pallet::report_equivocation_unsigned`].
**/
reportEquivocationUnsigned: AugmentedSubmittable<(equivocationProof: SpConsensusBeefyEquivocationProof | { first?: any; second?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [SpConsensusBeefyEquivocationProof, SpSessionMembershipProof]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
bounties: { bounties: {
/** /**
* See [`Pallet::accept_curator`]. * See [`Pallet::accept_curator`].
@@ -208,10 +222,6 @@ declare module '@polkadot/api-base/types/submittable' {
* See [`Pallet::set_bypass_consistency_check`]. * See [`Pallet::set_bypass_consistency_check`].
**/ **/
setBypassConsistencyCheck: AugmentedSubmittable<(updated: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [bool]>; setBypassConsistencyCheck: AugmentedSubmittable<(updated: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [bool]>;
/**
* See [`Pallet::set_chain_availability_period`].
**/
setChainAvailabilityPeriod: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/** /**
* See [`Pallet::set_code_retention_period`]. * See [`Pallet::set_code_retention_period`].
**/ **/
@@ -227,7 +237,7 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* See [`Pallet::set_executor_params`]. * See [`Pallet::set_executor_params`].
**/ **/
setExecutorParams: AugmentedSubmittable<(updated: PolkadotPrimitivesV4ExecutorParams) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV4ExecutorParams]>; setExecutorParams: AugmentedSubmittable<(updated: PolkadotPrimitivesV5ExecutorParams) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV5ExecutorParams]>;
/** /**
* See [`Pallet::set_group_rotation_frequency`]. * See [`Pallet::set_group_rotation_frequency`].
**/ **/
@@ -256,14 +266,6 @@ declare module '@polkadot/api-base/types/submittable' {
* See [`Pallet::set_hrmp_max_parachain_outbound_channels`]. * See [`Pallet::set_hrmp_max_parachain_outbound_channels`].
**/ **/
setHrmpMaxParachainOutboundChannels: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>; setHrmpMaxParachainOutboundChannels: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* See [`Pallet::set_hrmp_max_parathread_inbound_channels`].
**/
setHrmpMaxParathreadInboundChannels: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* See [`Pallet::set_hrmp_max_parathread_outbound_channels`].
**/
setHrmpMaxParathreadOutboundChannels: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/** /**
* See [`Pallet::set_hrmp_open_request_ttl`]. * See [`Pallet::set_hrmp_open_request_ttl`].
**/ **/
@@ -333,17 +335,37 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
setNoShowSlots: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>; setNoShowSlots: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/** /**
* See [`Pallet::set_parathread_cores`]. * See [`Pallet::set_on_demand_base_fee`].
**/ **/
setParathreadCores: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>; setOnDemandBaseFee: AugmentedSubmittable<(updated: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128]>;
/** /**
* See [`Pallet::set_parathread_retries`]. * See [`Pallet::set_on_demand_cores`].
**/ **/
setParathreadRetries: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>; setOnDemandCores: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/** /**
* See [`Pallet::set_pvf_checking_enabled`]. * See [`Pallet::set_on_demand_fee_variability`].
**/ **/
setPvfCheckingEnabled: AugmentedSubmittable<(updated: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [bool]>; setOnDemandFeeVariability: AugmentedSubmittable<(updated: Perbill | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Perbill]>;
/**
* See [`Pallet::set_on_demand_queue_max_size`].
**/
setOnDemandQueueMaxSize: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* See [`Pallet::set_on_demand_retries`].
**/
setOnDemandRetries: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* See [`Pallet::set_on_demand_target_queue_utilization`].
**/
setOnDemandTargetQueueUtilization: AugmentedSubmittable<(updated: Perbill | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Perbill]>;
/**
* See [`Pallet::set_on_demand_ttl`].
**/
setOnDemandTtl: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* See [`Pallet::set_paras_availability_period`].
**/
setParasAvailabilityPeriod: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/** /**
* See [`Pallet::set_pvf_voting_ttl`]. * See [`Pallet::set_pvf_voting_ttl`].
**/ **/
@@ -356,10 +378,6 @@ declare module '@polkadot/api-base/types/submittable' {
* See [`Pallet::set_scheduling_lookahead`]. * See [`Pallet::set_scheduling_lookahead`].
**/ **/
setSchedulingLookahead: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>; setSchedulingLookahead: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* See [`Pallet::set_thread_availability_period`].
**/
setThreadAvailabilityPeriod: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/** /**
* See [`Pallet::set_validation_upgrade_cooldown`]. * See [`Pallet::set_validation_upgrade_cooldown`].
**/ **/
@@ -691,7 +709,7 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* See [`Pallet::heartbeat`]. * See [`Pallet::heartbeat`].
**/ **/
heartbeat: AugmentedSubmittable<(heartbeat: PalletImOnlineHeartbeat | { blockNumber?: any; networkState?: any; sessionIndex?: any; authorityIndex?: any; validatorsLen?: any } | string | Uint8Array, signature: PalletImOnlineSr25519AppSr25519Signature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature]>; heartbeat: AugmentedSubmittable<(heartbeat: PalletImOnlineHeartbeat | { blockNumber?: any; sessionIndex?: any; authorityIndex?: any; validatorsLen?: any } | string | Uint8Array, signature: PalletImOnlineSr25519AppSr25519Signature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature]>;
/** /**
* Generic tx * Generic tx
**/ **/
@@ -945,7 +963,7 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* See [`Pallet::enter`]. * See [`Pallet::enter`].
**/ **/
enter: AugmentedSubmittable<(data: PolkadotPrimitivesV4InherentData | { bitfields?: any; backedCandidates?: any; disputes?: any; parentHeader?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV4InherentData]>; enter: AugmentedSubmittable<(data: PolkadotPrimitivesV5InherentData | { bitfields?: any; backedCandidates?: any; disputes?: any; parentHeader?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV5InherentData]>;
/** /**
* Generic tx * Generic tx
**/ **/
@@ -976,10 +994,14 @@ declare module '@polkadot/api-base/types/submittable' {
* See [`Pallet::force_set_current_head`]. * See [`Pallet::force_set_current_head`].
**/ **/
forceSetCurrentHead: AugmentedSubmittable<(para: u32 | AnyNumber | Uint8Array, newHead: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>; forceSetCurrentHead: AugmentedSubmittable<(para: u32 | AnyNumber | Uint8Array, newHead: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>;
/**
* See [`Pallet::force_set_most_recent_context`].
**/
forceSetMostRecentContext: AugmentedSubmittable<(para: u32 | AnyNumber | Uint8Array, context: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
/** /**
* See [`Pallet::include_pvf_check_statement`]. * See [`Pallet::include_pvf_check_statement`].
**/ **/
includePvfCheckStatement: AugmentedSubmittable<(stmt: PolkadotPrimitivesV4PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV4ValidatorAppSignature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV4PvfCheckStatement, PolkadotPrimitivesV4ValidatorAppSignature]>; includePvfCheckStatement: AugmentedSubmittable<(stmt: PolkadotPrimitivesV5PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV5ValidatorAppSignature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV5PvfCheckStatement, PolkadotPrimitivesV5ValidatorAppSignature]>;
/** /**
* See [`Pallet::poke_unused_validation_code`]. * See [`Pallet::poke_unused_validation_code`].
**/ **/
@@ -1009,7 +1031,7 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* See [`Pallet::report_dispute_lost_unsigned`]. * See [`Pallet::report_dispute_lost_unsigned`].
**/ **/
reportDisputeLostUnsigned: AugmentedSubmittable<(disputeProof: PolkadotPrimitivesVstagingSlashingDisputeProof | { timeSlot?: any; kind?: any; validatorIndex?: any; validatorId?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesVstagingSlashingDisputeProof, SpSessionMembershipProof]>; reportDisputeLostUnsigned: AugmentedSubmittable<(disputeProof: PolkadotPrimitivesV5SlashingDisputeProof | { timeSlot?: any; kind?: any; validatorIndex?: any; validatorId?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV5SlashingDisputeProof, SpSessionMembershipProof]>;
/** /**
* Generic tx * Generic tx
**/ **/
@@ -1247,7 +1269,7 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* See [`Pallet::set_keys`]. * See [`Pallet::set_keys`].
**/ **/
setKeys: AugmentedSubmittable<(keys: KusamaRuntimeSessionKeys | { grandpa?: any; babe?: any; imOnline?: any; paraValidator?: any; paraAssignment?: any; authorityDiscovery?: any } | string | Uint8Array, proof: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [KusamaRuntimeSessionKeys, Bytes]>; setKeys: AugmentedSubmittable<(keys: KusamaRuntimeSessionKeys | { grandpa?: any; babe?: any; imOnline?: any; paraValidator?: any; paraAssignment?: any; authorityDiscovery?: any; beefy?: any } | string | Uint8Array, proof: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [KusamaRuntimeSessionKeys, Bytes]>;
/** /**
* Generic tx * Generic tx
**/ **/
@@ -1272,46 +1294,74 @@ declare module '@polkadot/api-base/types/submittable' {
[key: string]: SubmittableExtrinsicFunction<ApiType>; [key: string]: SubmittableExtrinsicFunction<ApiType>;
}; };
society: { society: {
/**
* See [`Pallet::bestow_membership`].
**/
bestowMembership: AugmentedSubmittable<(candidate: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/** /**
* See [`Pallet::bid`]. * See [`Pallet::bid`].
**/ **/
bid: AugmentedSubmittable<(value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128]>; bid: AugmentedSubmittable<(value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128]>;
/**
* See [`Pallet::claim_membership`].
**/
claimMembership: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* See [`Pallet::cleanup_candidacy`].
**/
cleanupCandidacy: AugmentedSubmittable<(candidate: AccountId32 | string | Uint8Array, max: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
/**
* See [`Pallet::cleanup_challenge`].
**/
cleanupChallenge: AugmentedSubmittable<(challengeRound: u32 | AnyNumber | Uint8Array, max: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
/** /**
* See [`Pallet::defender_vote`]. * See [`Pallet::defender_vote`].
**/ **/
defenderVote: AugmentedSubmittable<(approve: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [bool]>; defenderVote: AugmentedSubmittable<(approve: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [bool]>;
/** /**
* See [`Pallet::found`]. * See [`Pallet::dissolve`].
**/ **/
found: AugmentedSubmittable<(founder: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, maxMembers: u32 | AnyNumber | Uint8Array, rules: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u32, Bytes]>; dissolve: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/** /**
* See [`Pallet::judge_suspended_candidate`]. * See [`Pallet::drop_candidate`].
**/ **/
judgeSuspendedCandidate: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, judgement: PalletSocietyJudgement | 'Rebid' | 'Reject' | 'Approve' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, PalletSocietyJudgement]>; dropCandidate: AugmentedSubmittable<(candidate: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
* See [`Pallet::found_society`].
**/
foundSociety: AugmentedSubmittable<(founder: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, maxMembers: u32 | AnyNumber | Uint8Array, maxIntake: u32 | AnyNumber | Uint8Array, maxStrikes: u32 | AnyNumber | Uint8Array, candidateDeposit: u128 | AnyNumber | Uint8Array, rules: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u32, u32, u32, u128, Bytes]>;
/** /**
* See [`Pallet::judge_suspended_member`]. * See [`Pallet::judge_suspended_member`].
**/ **/
judgeSuspendedMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forgive: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, bool]>; judgeSuspendedMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forgive: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, bool]>;
/**
* See [`Pallet::kick_candidate`].
**/
kickCandidate: AugmentedSubmittable<(candidate: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/** /**
* See [`Pallet::payout`]. * See [`Pallet::payout`].
**/ **/
payout: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>; payout: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/** /**
* See [`Pallet::set_max_members`]. * See [`Pallet::punish_skeptic`].
**/ **/
setMaxMembers: AugmentedSubmittable<(max: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>; punishSkeptic: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* See [`Pallet::resign_candidacy`].
**/
resignCandidacy: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* See [`Pallet::set_parameters`].
**/
setParameters: AugmentedSubmittable<(maxMembers: u32 | AnyNumber | Uint8Array, maxIntake: u32 | AnyNumber | Uint8Array, maxStrikes: u32 | AnyNumber | Uint8Array, candidateDeposit: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, u32, u128]>;
/** /**
* See [`Pallet::unbid`]. * See [`Pallet::unbid`].
**/ **/
unbid: AugmentedSubmittable<(pos: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>; unbid: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* See [`Pallet::unfound`].
**/
unfound: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/** /**
* See [`Pallet::unvouch`]. * See [`Pallet::unvouch`].
**/ **/
unvouch: AugmentedSubmittable<(pos: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>; unvouch: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/** /**
* See [`Pallet::vote`]. * See [`Pallet::vote`].
**/ **/
@@ -1320,6 +1370,10 @@ declare module '@polkadot/api-base/types/submittable' {
* See [`Pallet::vouch`]. * See [`Pallet::vouch`].
**/ **/
vouch: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: u128 | AnyNumber | Uint8Array, tip: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u128, u128]>; vouch: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: u128 | AnyNumber | Uint8Array, tip: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u128, u128]>;
/**
* See [`Pallet::waive_repay`].
**/
waiveRepay: AugmentedSubmittable<(amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128]>;
/** /**
* Generic tx * Generic tx
**/ **/
@@ -1435,6 +1489,36 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
[key: string]: SubmittableExtrinsicFunction<ApiType>; [key: string]: SubmittableExtrinsicFunction<ApiType>;
}; };
stateTrieMigration: {
/**
* See [`Pallet::continue_migrate`].
**/
continueMigrate: AugmentedSubmittable<(limits: PalletStateTrieMigrationMigrationLimits | { size_?: any; item?: any } | string | Uint8Array, realSizeUpper: u32 | AnyNumber | Uint8Array, witnessTask: PalletStateTrieMigrationMigrationTask | { progressTop?: any; progressChild?: any; size_?: any; topItems?: any; childItems?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletStateTrieMigrationMigrationLimits, u32, PalletStateTrieMigrationMigrationTask]>;
/**
* See [`Pallet::control_auto_migration`].
**/
controlAutoMigration: AugmentedSubmittable<(maybeConfig: Option<PalletStateTrieMigrationMigrationLimits> | null | Uint8Array | PalletStateTrieMigrationMigrationLimits | { size_?: any; item?: any } | string) => SubmittableExtrinsic<ApiType>, [Option<PalletStateTrieMigrationMigrationLimits>]>;
/**
* See [`Pallet::force_set_progress`].
**/
forceSetProgress: AugmentedSubmittable<(progressTop: PalletStateTrieMigrationProgress | { ToStart: any } | { LastKey: any } | { Complete: any } | string | Uint8Array, progressChild: PalletStateTrieMigrationProgress | { ToStart: any } | { LastKey: any } | { Complete: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletStateTrieMigrationProgress, PalletStateTrieMigrationProgress]>;
/**
* See [`Pallet::migrate_custom_child`].
**/
migrateCustomChild: AugmentedSubmittable<(root: Bytes | string | Uint8Array, childKeys: Vec<Bytes> | (Bytes | string | Uint8Array)[], totalSize: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, Vec<Bytes>, u32]>;
/**
* See [`Pallet::migrate_custom_top`].
**/
migrateCustomTop: AugmentedSubmittable<(keys: Vec<Bytes> | (Bytes | string | Uint8Array)[], witnessSize: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<Bytes>, u32]>;
/**
* See [`Pallet::set_signed_max_limits`].
**/
setSignedMaxLimits: AugmentedSubmittable<(limits: PalletStateTrieMigrationMigrationLimits | { size_?: any; item?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletStateTrieMigrationMigrationLimits]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
system: { system: {
/** /**
* See [`Pallet::kill_prefix`]. * See [`Pallet::kill_prefix`].
@@ -1570,6 +1654,10 @@ declare module '@polkadot/api-base/types/submittable' {
* See [`Pallet::put_in_front_of`]. * See [`Pallet::put_in_front_of`].
**/ **/
putInFrontOf: AugmentedSubmittable<(lighter: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>; putInFrontOf: AugmentedSubmittable<(lighter: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* See [`Pallet::put_in_front_of_other`].
**/
putInFrontOfOther: AugmentedSubmittable<(heavier: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, lighter: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress]>;
/** /**
* See [`Pallet::rebag`]. * See [`Pallet::rebag`].
**/ **/
+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: '10.8.1' }; export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '10.10.1' };
+15 -198
View File
@@ -6,9 +6,9 @@
import '@polkadot/api-base/types/consts'; import '@polkadot/api-base/types/consts';
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types'; import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { Bytes, Option, Vec, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { Codec, ITuple } from '@polkadot/types-codec/types'; import type { Codec, ITuple } from '@polkadot/types-codec/types';
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime'; import type { Perbill, Permill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletReferendaTrackInfo, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup'; import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletReferendaTrackInfo, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>; export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
@@ -52,6 +52,10 @@ declare module '@polkadot/api-base/types/consts' {
* Max number of authorities allowed * Max number of authorities allowed
**/ **/
maxAuthorities: u32 & AugmentedConst<ApiType>; maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of nominators for each validator.
**/
maxNominators: u32 & AugmentedConst<ApiType>;
/** /**
* Generic const * Generic const
**/ **/
@@ -179,24 +183,15 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
council: {
/**
* The maximum weight of a dispatch call that can be proposed and executed.
**/
maxProposalWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
crowdloan: { crowdloan: {
/** /**
* The minimum amount that may be contributed into a crowdloan. Should almost certainly be at * The minimum amount that may be contributed into a crowdloan. Should almost certainly be
* least `ExistentialDeposit`. * at least `ExistentialDeposit`.
**/ **/
minContribution: u128 & AugmentedConst<ApiType>; minContribution: u128 & AugmentedConst<ApiType>;
/** /**
* `PalletId` for the crowdloan pallet. An appropriate value could be `PalletId(*b"py/cfund")` * `PalletId` for the crowdloan pallet. An appropriate value could be
* `PalletId(*b"py/cfund")`
**/ **/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>; palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/** /**
@@ -208,72 +203,6 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
democracy: {
/**
* Period in blocks where an external proposal may not be re-submitted after being vetoed.
**/
cooloffPeriod: u32 & AugmentedConst<ApiType>;
/**
* The period between a proposal being approved and enacted.
*
* It should generally be a little more than the unstake period to ensure that
* voting stakers have an opportunity to remove themselves from the system in the case
* where they are on the losing side of a vote.
**/
enactmentPeriod: u32 & AugmentedConst<ApiType>;
/**
* Minimum voting period allowed for a fast-track referendum.
**/
fastTrackVotingPeriod: u32 & AugmentedConst<ApiType>;
/**
* Indicator for whether an emergency origin is even allowed to happen. Some chains may
* want to set this permanently to `false`, others may want to condition it on things such
* as an upgrade having happened recently.
**/
instantAllowed: bool & AugmentedConst<ApiType>;
/**
* How often (in blocks) new public referenda are launched.
**/
launchPeriod: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of items which can be blacklisted.
**/
maxBlacklisted: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of deposits a public proposal may have at any time.
**/
maxDeposits: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of public proposals that can exist at any time.
**/
maxProposals: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of votes for an account.
*
* Also used to compute weight, an overly big value can
* lead to extrinsic with very big weight: see `delegate` for instance.
**/
maxVotes: u32 & AugmentedConst<ApiType>;
/**
* The minimum amount to be used as a deposit for a public referendum proposal.
**/
minimumDeposit: u128 & AugmentedConst<ApiType>;
/**
* The minimum period of vote locking.
*
* It should be no shorter than enactment period to ensure that in the case of an approval,
* those successful voters are locked into the consequences that their votes entail.
**/
voteLockingPeriod: u32 & AugmentedConst<ApiType>;
/**
* How often (in blocks) to check for new votes.
**/
votingPeriod: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
electionProviderMultiPhase: { electionProviderMultiPhase: {
/** /**
* The minimum amount of improvement to the solution score that defines a solution as * The minimum amount of improvement to the solution score that defines a solution as
@@ -285,16 +214,6 @@ declare module '@polkadot/api-base/types/consts' {
* "better" in the Unsigned phase. * "better" in the Unsigned phase.
**/ **/
betterUnsignedThreshold: Perbill & AugmentedConst<ApiType>; betterUnsignedThreshold: Perbill & AugmentedConst<ApiType>;
/**
* The maximum number of electable targets to put in the snapshot.
**/
maxElectableTargets: u16 & AugmentedConst<ApiType>;
/**
* The maximum number of electing voters to put in the snapshot. At the moment, snapshots
* are only over a single block, but once multi-block elections are introduced they will
* take place over multiple blocks.
**/
maxElectingVoters: u32 & AugmentedConst<ApiType>;
/** /**
* The maximum number of winners that can be elected by this `ElectionProvider` * The maximum number of winners that can be elected by this `ElectionProvider`
* implementation. * implementation.
@@ -384,6 +303,10 @@ declare module '@polkadot/api-base/types/consts' {
* Max Authorities in use * Max Authorities in use
**/ **/
maxAuthorities: u32 & AugmentedConst<ApiType>; maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of nominators for each validator.
**/
maxNominators: u32 & AugmentedConst<ApiType>;
/** /**
* The maximum number of entries to keep in the set id to session index mapping. * The maximum number of entries to keep in the set id to session index mapping.
* *
@@ -540,70 +463,6 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
phragmenElection: {
/**
* How much should be locked up in order to submit one's candidacy.
**/
candidacyBond: u128 & AugmentedConst<ApiType>;
/**
* Number of members to elect.
**/
desiredMembers: u32 & AugmentedConst<ApiType>;
/**
* Number of runners_up to keep.
**/
desiredRunnersUp: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of candidates in a phragmen election.
*
* Warning: This impacts the size of the election which is run onchain. Chose wisely, and
* consider how it will impact `T::WeightInfo::election_phragmen`.
*
* When this limit is reached no more candidates are accepted in the election.
**/
maxCandidates: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of voters to allow in a phragmen election.
*
* Warning: This impacts the size of the election which is run onchain. Chose wisely, and
* consider how it will impact `T::WeightInfo::election_phragmen`.
*
* When the limit is reached the new voters are ignored.
**/
maxVoters: u32 & AugmentedConst<ApiType>;
/**
* Maximum numbers of votes per voter.
*
* Warning: This impacts the size of the election which is run onchain. Chose wisely, and
* consider how it will impact `T::WeightInfo::election_phragmen`.
**/
maxVotesPerVoter: u32 & AugmentedConst<ApiType>;
/**
* Identifier for the elections-phragmen pallet's lock
**/
palletId: U8aFixed & AugmentedConst<ApiType>;
/**
* How long each seat is kept. This defines the next block number at which an election
* round will happen. If set to zero, no elections are ever triggered and the module will
* be in passive mode.
**/
termDuration: u32 & AugmentedConst<ApiType>;
/**
* Base deposit associated with voting.
*
* This should be sensibly high to economically ensure the pallet cannot be attacked by
* creating a gigantic number of votes.
**/
votingBondBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of bond that need to be locked for each vote (32 bytes).
**/
votingBondFactor: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
proxy: { proxy: {
/** /**
* The base amount of currency needed to reserve for creating an announcement. * The base amount of currency needed to reserve for creating an announcement.
@@ -682,7 +541,7 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
dataDepositPerByte: u128 & AugmentedConst<ApiType>; dataDepositPerByte: u128 & AugmentedConst<ApiType>;
/** /**
* The deposit to be paid to run a parathread. * The deposit to be paid to run a on-demand parachain.
* This should include the cost for storing the genesis head and validation code. * This should include the cost for storing the genesis head and validation code.
**/ **/
paraDeposit: u128 & AugmentedConst<ApiType>; paraDeposit: u128 & AugmentedConst<ApiType>;
@@ -751,10 +610,6 @@ declare module '@polkadot/api-base/types/consts' {
* The test `reducing_history_depth_abrupt` shows this effect. * The test `reducing_history_depth_abrupt` shows this effect.
**/ **/
historyDepth: u32 & AugmentedConst<ApiType>; historyDepth: u32 & AugmentedConst<ApiType>;
/**
* Maximum number of nominations per nominator.
**/
maxNominations: u32 & AugmentedConst<ApiType>;
/** /**
* The maximum number of nominators rewarded for each validator. * The maximum number of nominators rewarded for each validator.
* *
@@ -825,16 +680,6 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
technicalCommittee: {
/**
* The maximum weight of a dispatch call that can be proposed and executed.
**/
maxProposalWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
timestamp: { timestamp: {
/** /**
* The minimum period between blocks. Beware that this is different to the *expected* * The minimum period between blocks. Beware that this is different to the *expected*
@@ -848,34 +693,6 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
tips: {
/**
* The amount held on deposit per byte within the tip report reason or bounty description.
**/
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
/**
* Maximum acceptable reason length.
*
* Benchmarks depend on this value, be sure to update weights file when changing this value
**/
maximumReasonLength: u32 & AugmentedConst<ApiType>;
/**
* The period for which a tip remains open after is has achieved threshold tippers.
**/
tipCountdown: u32 & AugmentedConst<ApiType>;
/**
* The percent of the final tip which goes to the original reporter of the tip.
**/
tipFindersFee: Percent & AugmentedConst<ApiType>;
/**
* The amount held on deposit for placing a tip report.
**/
tipReportDepositBase: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
transactionPayment: { transactionPayment: {
/** /**
* A fee mulitplier for `Operational` extrinsics to compute "virtual tip" to boost their * A fee mulitplier for `Operational` extrinsics to compute "virtual tip" to boost their
+37 -340
View File
@@ -192,8 +192,8 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
InvalidStatement: AugmentedError<ApiType>; InvalidStatement: AugmentedError<ApiType>;
/** /**
* There's not enough in the pot to pay out some unvested amount. Generally implies a logic * There's not enough in the pot to pay out some unvested amount. Generally implies a
* error. * logic error.
**/ **/
PotUnderflow: AugmentedError<ApiType>; PotUnderflow: AugmentedError<ApiType>;
/** /**
@@ -278,52 +278,6 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
council: {
/**
* Members are already initialized!
**/
AlreadyInitialized: AugmentedError<ApiType>;
/**
* Duplicate proposals not allowed
**/
DuplicateProposal: AugmentedError<ApiType>;
/**
* Duplicate vote ignored
**/
DuplicateVote: AugmentedError<ApiType>;
/**
* Account is not a member
**/
NotMember: AugmentedError<ApiType>;
/**
* Proposal must exist
**/
ProposalMissing: AugmentedError<ApiType>;
/**
* The close call was made too early, before the end of the voting.
**/
TooEarly: AugmentedError<ApiType>;
/**
* There can only be a maximum of `MaxProposals` active proposals.
**/
TooManyProposals: AugmentedError<ApiType>;
/**
* Mismatched index
**/
WrongIndex: AugmentedError<ApiType>;
/**
* The given length bound for the proposal was too low.
**/
WrongProposalLength: AugmentedError<ApiType>;
/**
* The given weight bound for the proposal was too low.
**/
WrongProposalWeight: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
crowdloan: { crowdloan: {
/** /**
* The fund is already in `NewRaise` * The fund is already in `NewRaise`
@@ -406,7 +360,8 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
NotParachain: AugmentedError<ApiType>; NotParachain: AugmentedError<ApiType>;
/** /**
* The crowdloan is not ready to dissolve. Potentially still has a slot or in retirement period. * The crowdloan is not ready to dissolve. Potentially still has a slot or in retirement
* period.
**/ **/
NotReadyToDissolve: AugmentedError<ApiType>; NotReadyToDissolve: AugmentedError<ApiType>;
/** /**
@@ -422,109 +377,6 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
democracy: {
/**
* Cannot cancel the same proposal twice
**/
AlreadyCanceled: AugmentedError<ApiType>;
/**
* The account is already delegating.
**/
AlreadyDelegating: AugmentedError<ApiType>;
/**
* Identity may not veto a proposal twice
**/
AlreadyVetoed: AugmentedError<ApiType>;
/**
* Proposal already made
**/
DuplicateProposal: AugmentedError<ApiType>;
/**
* The instant referendum origin is currently disallowed.
**/
InstantNotAllowed: AugmentedError<ApiType>;
/**
* Too high a balance was provided that the account cannot afford.
**/
InsufficientFunds: AugmentedError<ApiType>;
/**
* Invalid hash
**/
InvalidHash: AugmentedError<ApiType>;
/**
* Maximum number of votes reached.
**/
MaxVotesReached: AugmentedError<ApiType>;
/**
* No proposals waiting
**/
NoneWaiting: AugmentedError<ApiType>;
/**
* Delegation to oneself makes no sense.
**/
Nonsense: AugmentedError<ApiType>;
/**
* The actor has no permission to conduct the action.
**/
NoPermission: AugmentedError<ApiType>;
/**
* No external proposal
**/
NoProposal: AugmentedError<ApiType>;
/**
* The account is not currently delegating.
**/
NotDelegating: AugmentedError<ApiType>;
/**
* Next external proposal not simple majority
**/
NotSimpleMajority: AugmentedError<ApiType>;
/**
* The given account did not vote on the referendum.
**/
NotVoter: AugmentedError<ApiType>;
/**
* The preimage does not exist.
**/
PreimageNotExist: AugmentedError<ApiType>;
/**
* Proposal still blacklisted
**/
ProposalBlacklisted: AugmentedError<ApiType>;
/**
* Proposal does not exist
**/
ProposalMissing: AugmentedError<ApiType>;
/**
* Vote given for invalid referendum
**/
ReferendumInvalid: AugmentedError<ApiType>;
/**
* Maximum number of items reached.
**/
TooMany: AugmentedError<ApiType>;
/**
* Value too low
**/
ValueLow: AugmentedError<ApiType>;
/**
* The account currently has votes attached to it and the operation cannot succeed until
* these are removed, either through `unvote` or `reap_vote`.
**/
VotesExist: AugmentedError<ApiType>;
/**
* Voting period too low
**/
VotingPeriodLow: AugmentedError<ApiType>;
/**
* Invalid upper bound.
**/
WrongUpperBound: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
electionProviderMultiPhase: { electionProviderMultiPhase: {
/** /**
* Some bound not met * Some bound not met
@@ -881,6 +733,12 @@ declare module '@polkadot/api-base/types/errors' {
* The message is queued for future execution. * The message is queued for future execution.
**/ **/
Queued: AugmentedError<ApiType>; Queued: AugmentedError<ApiType>;
/**
* The queue is paused and no message can be executed from it.
*
* This can change at any time and may resolve in the future by re-trying.
**/
QueuePaused: AugmentedError<ApiType>;
/** /**
* This message is temporarily unprocessable. * This message is temporarily unprocessable.
* *
@@ -981,6 +839,10 @@ declare module '@polkadot/api-base/types/errors' {
* Not enough blocks have surpassed since the last commission update. * Not enough blocks have surpassed since the last commission update.
**/ **/
CommissionChangeThrottled: AugmentedError<ApiType>; CommissionChangeThrottled: AugmentedError<ApiType>;
/**
* The supplied commission exceeds global maximum commission.
**/
CommissionExceedsGlobalMaximum: AugmentedError<ApiType>;
/** /**
* The supplied commission exceeds the max allowed commission. * The supplied commission exceeds the max allowed commission.
**/ **/
@@ -1104,14 +966,15 @@ declare module '@polkadot/api-base/types/errors' {
* invalid dispute. * invalid dispute.
**/ **/
BitfieldReferencesFreedCore: AugmentedError<ApiType>; BitfieldReferencesFreedCore: AugmentedError<ApiType>;
/**
* Candidate not in parent context.
**/
CandidateNotInParentContext: AugmentedError<ApiType>;
/** /**
* Candidate scheduled despite pending candidate already existing for the para. * Candidate scheduled despite pending candidate already existing for the para.
**/ **/
CandidateScheduledBeforeParaFree: AugmentedError<ApiType>; CandidateScheduledBeforeParaFree: AugmentedError<ApiType>;
/**
* The candidate's relay-parent was not allowed. Either it was
* not recent enough or it didn't advance based on the last parachain block.
**/
DisallowedRelayParent: AugmentedError<ApiType>;
/** /**
* Head data exceeds the configured maximum. * Head data exceeds the configured maximum.
**/ **/
@@ -1128,6 +991,11 @@ declare module '@polkadot/api-base/types/errors' {
* Insufficient (non-majority) backing. * Insufficient (non-majority) backing.
**/ **/
InsufficientBacking: AugmentedError<ApiType>; InsufficientBacking: AugmentedError<ApiType>;
/**
* Failed to compute group index for the core: either it's out of bounds
* or the relay parent doesn't belong to the current session.
**/
InvalidAssignment: AugmentedError<ApiType>;
/** /**
* Invalid (bad signature, unknown validator, etc.) backing. * Invalid (bad signature, unknown validator, etc.) backing.
**/ **/
@@ -1161,8 +1029,8 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
NotCollatorSigned: AugmentedError<ApiType>; NotCollatorSigned: AugmentedError<ApiType>;
/** /**
* The `para_head` hash in the candidate descriptor doesn't match the hash of the actual para head in the * The `para_head` hash in the candidate descriptor doesn't match the hash of the actual
* commitments. * para head in the commitments.
**/ **/
ParaHeadMismatch: AugmentedError<ApiType>; ParaHeadMismatch: AugmentedError<ApiType>;
/** /**
@@ -1205,10 +1073,6 @@ declare module '@polkadot/api-base/types/errors' {
* Availability bitfield has unexpected size. * Availability bitfield has unexpected size.
**/ **/
WrongBitfieldSize: AugmentedError<ApiType>; WrongBitfieldSize: AugmentedError<ApiType>;
/**
* Candidate included with the wrong collator.
**/
WrongCollator: AugmentedError<ApiType>;
/** /**
* Generic error * Generic error
**/ **/
@@ -1247,7 +1111,7 @@ declare module '@polkadot/api-base/types/errors' {
}; };
paras: { paras: {
/** /**
* Para cannot be downgraded to a parathread. * Para cannot be downgraded to an on-demand parachain.
**/ **/
CannotDowngrade: AugmentedError<ApiType>; CannotDowngrade: AugmentedError<ApiType>;
/** /**
@@ -1259,7 +1123,7 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
CannotOnboard: AugmentedError<ApiType>; CannotOnboard: AugmentedError<ApiType>;
/** /**
* Para cannot be upgraded to a parachain. * Para cannot be upgraded to a lease holding parachain.
**/ **/
CannotUpgrade: AugmentedError<ApiType>; CannotUpgrade: AugmentedError<ApiType>;
/** /**
@@ -1372,80 +1236,6 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
phragmenElection: {
/**
* Duplicated candidate submission.
**/
DuplicatedCandidate: AugmentedError<ApiType>;
/**
* Candidate does not have enough funds.
**/
InsufficientCandidateFunds: AugmentedError<ApiType>;
/**
* The renouncing origin presented a wrong `Renouncing` parameter.
**/
InvalidRenouncing: AugmentedError<ApiType>;
/**
* Prediction regarding replacement after member removal is wrong.
**/
InvalidReplacement: AugmentedError<ApiType>;
/**
* The provided count of number of votes is incorrect.
**/
InvalidVoteCount: AugmentedError<ApiType>;
/**
* The provided count of number of candidates is incorrect.
**/
InvalidWitnessData: AugmentedError<ApiType>;
/**
* Cannot vote with stake less than minimum balance.
**/
LowBalance: AugmentedError<ApiType>;
/**
* Cannot vote more than maximum allowed.
**/
MaximumVotesExceeded: AugmentedError<ApiType>;
/**
* Member cannot re-submit candidacy.
**/
MemberSubmit: AugmentedError<ApiType>;
/**
* Must be a voter.
**/
MustBeVoter: AugmentedError<ApiType>;
/**
* Not a member.
**/
NotMember: AugmentedError<ApiType>;
/**
* Must vote for at least one candidate.
**/
NoVotes: AugmentedError<ApiType>;
/**
* Runner cannot re-submit candidacy.
**/
RunnerUpSubmit: AugmentedError<ApiType>;
/**
* Too many candidates have been created.
**/
TooManyCandidates: AugmentedError<ApiType>;
/**
* Cannot vote more than candidates.
**/
TooManyVotes: AugmentedError<ApiType>;
/**
* Voter can not pay voting bond.
**/
UnableToPayBond: AugmentedError<ApiType>;
/**
* Cannot vote when no candidates or members exist.
**/
UnableToVote: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
preimage: { preimage: {
/** /**
* Preimage has already been noted on-chain. * Preimage has already been noted on-chain.
@@ -1582,16 +1372,16 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
CannotDeregister: AugmentedError<ApiType>; CannotDeregister: AugmentedError<ApiType>;
/** /**
* Cannot schedule downgrade of parachain to parathread * Cannot schedule downgrade of lease holding parachain to on-demand parachain
**/ **/
CannotDowngrade: AugmentedError<ApiType>; CannotDowngrade: AugmentedError<ApiType>;
/** /**
* Cannot perform a parachain slot / lifecycle swap. Check that the state of both paras are * Cannot perform a parachain slot / lifecycle swap. Check that the state of both paras
* correct for the swap to work. * are correct for the swap to work.
**/ **/
CannotSwap: AugmentedError<ApiType>; CannotSwap: AugmentedError<ApiType>;
/** /**
* Cannot schedule upgrade of parathread to parachain * Cannot schedule upgrade of on-demand parachain to lease holding parachain
**/ **/
CannotUpgrade: AugmentedError<ApiType>; CannotUpgrade: AugmentedError<ApiType>;
/** /**
@@ -1615,7 +1405,7 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
NotParachain: AugmentedError<ApiType>; NotParachain: AugmentedError<ApiType>;
/** /**
* Para is not a Parathread. * Para is not a Parathread (on-demand parachain).
**/ **/
NotParathread: AugmentedError<ApiType>; NotParathread: AugmentedError<ApiType>;
/** /**
@@ -1627,7 +1417,8 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
NotReserved: AugmentedError<ApiType>; NotReserved: AugmentedError<ApiType>;
/** /**
* Para is locked from manipulation by the manager. Must use parachain or relay chain governance. * Para is locked from manipulation by the manager. Must use parachain or relay chain
* governance.
**/ **/
ParaLocked: AugmentedError<ApiType>; ParaLocked: AugmentedError<ApiType>;
/** /**
@@ -1845,100 +1636,6 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
technicalCommittee: {
/**
* Members are already initialized!
**/
AlreadyInitialized: AugmentedError<ApiType>;
/**
* Duplicate proposals not allowed
**/
DuplicateProposal: AugmentedError<ApiType>;
/**
* Duplicate vote ignored
**/
DuplicateVote: AugmentedError<ApiType>;
/**
* Account is not a member
**/
NotMember: AugmentedError<ApiType>;
/**
* Proposal must exist
**/
ProposalMissing: AugmentedError<ApiType>;
/**
* The close call was made too early, before the end of the voting.
**/
TooEarly: AugmentedError<ApiType>;
/**
* There can only be a maximum of `MaxProposals` active proposals.
**/
TooManyProposals: AugmentedError<ApiType>;
/**
* Mismatched index
**/
WrongIndex: AugmentedError<ApiType>;
/**
* The given length bound for the proposal was too low.
**/
WrongProposalLength: AugmentedError<ApiType>;
/**
* The given weight bound for the proposal was too low.
**/
WrongProposalWeight: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
technicalMembership: {
/**
* Already a member.
**/
AlreadyMember: AugmentedError<ApiType>;
/**
* Not a member.
**/
NotMember: AugmentedError<ApiType>;
/**
* Too many members.
**/
TooManyMembers: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
tips: {
/**
* The tip was already found/started.
**/
AlreadyKnown: AugmentedError<ApiType>;
/**
* The account attempting to retract the tip is not the finder of the tip.
**/
NotFinder: AugmentedError<ApiType>;
/**
* The tip cannot be claimed/closed because it's still in the countdown period.
**/
Premature: AugmentedError<ApiType>;
/**
* The reason given is just too big.
**/
ReasonTooBig: AugmentedError<ApiType>;
/**
* The tip cannot be claimed/closed because there are not enough tippers yet.
**/
StillOpen: AugmentedError<ApiType>;
/**
* The tip hash is unknown.
**/
UnknownTip: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
treasury: { treasury: {
/** /**
* The spend origin is valid but the amount it is allowed to spend is lower than the * The spend origin is valid but the amount it is allowed to spend is lower than the
@@ -2102,8 +1799,8 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
NoSubscription: AugmentedError<ApiType>; NoSubscription: AugmentedError<ApiType>;
/** /**
* There was some other issue (i.e. not to do with routing) in sending the message. Perhaps * There was some other issue (i.e. not to do with routing) in sending the message.
* a lack of space for buffering the message. * Perhaps a lack of space for buffering the message.
**/ **/
SendFailure: AugmentedError<ApiType>; SendFailure: AugmentedError<ApiType>;
/** /**
+20 -255
View File
@@ -10,7 +10,7 @@ import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32,
import type { ITuple } from '@polkadot/types-codec/types'; import type { ITuple } from '@polkadot/types-codec/types';
import type { EthereumAddress } from '@polkadot/types/interfaces/eth'; import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, H256, Perbill } from '@polkadot/types/interfaces/runtime'; import type { AccountId32, H256, Perbill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportMessagesProcessMessageError, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, PalletConvictionVotingTally, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsPoolState, PalletStakingExposure, PalletStakingForcing, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV4CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, PolkadotRuntimeProxyType, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3MultiassetMultiAssets, XcmV3Response, XcmV3TraitsError, XcmV3TraitsOutcome, XcmV3Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup'; import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportMessagesProcessMessageError, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, PalletConvictionVotingTally, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsPoolState, PalletStakingExposure, PalletStakingForcing, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV5CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, PolkadotRuntimeProxyType, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3MultiassetMultiAssets, XcmV3Response, XcmV3TraitsError, XcmV3TraitsOutcome, XcmV3Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>; export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
@@ -31,8 +31,8 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
BidAccepted: AugmentedEvent<ApiType, [bidder: AccountId32, paraId: u32, amount: u128, firstSlot: u32, lastSlot: u32], { bidder: AccountId32, paraId: u32, amount: u128, firstSlot: u32, lastSlot: u32 }>; BidAccepted: AugmentedEvent<ApiType, [bidder: AccountId32, paraId: u32, amount: u128, firstSlot: u32, lastSlot: u32], { bidder: AccountId32, paraId: u32, amount: u128, firstSlot: u32, lastSlot: u32 }>;
/** /**
* Someone attempted to lease the same slot twice for a parachain. The amount is held in reserve * Someone attempted to lease the same slot twice for a parachain. The amount is held in
* but no parachain slot has been leased. * reserve but no parachain slot has been leased.
**/ **/
ReserveConfiscated: AugmentedEvent<ApiType, [paraId: u32, leaser: AccountId32, amount: u128], { paraId: u32, leaser: AccountId32, amount: u128 }>; ReserveConfiscated: AugmentedEvent<ApiType, [paraId: u32, leaser: AccountId32, amount: u128], { paraId: u32, leaser: AccountId32, amount: u128 }>;
/** /**
@@ -45,7 +45,8 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
Unreserved: AugmentedEvent<ApiType, [bidder: AccountId32, amount: u128], { bidder: AccountId32, amount: u128 }>; Unreserved: AugmentedEvent<ApiType, [bidder: AccountId32, amount: u128], { bidder: AccountId32, amount: u128 }>;
/** /**
* The winning offset was chosen for an auction. This will map into the `Winning` storage map. * The winning offset was chosen for an auction. This will map into the `Winning` storage
* map.
**/ **/
WinningOffset: AugmentedEvent<ApiType, [auctionIndex: u32, blockNumber: u32], { auctionIndex: u32, blockNumber: u32 }>; WinningOffset: AugmentedEvent<ApiType, [auctionIndex: u32, blockNumber: u32], { auctionIndex: u32, blockNumber: u32 }>;
/** /**
@@ -225,42 +226,6 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
council: {
/**
* A motion was approved by the required threshold.
**/
Approved: AugmentedEvent<ApiType, [proposalHash: H256], { proposalHash: H256 }>;
/**
* A proposal was closed because its threshold was reached or after its duration was up.
**/
Closed: AugmentedEvent<ApiType, [proposalHash: H256, yes: u32, no: u32], { proposalHash: H256, yes: u32, no: u32 }>;
/**
* A motion was not approved by the required threshold.
**/
Disapproved: AugmentedEvent<ApiType, [proposalHash: H256], { proposalHash: H256 }>;
/**
* A motion was executed; result will be `Ok` if it returned without error.
**/
Executed: AugmentedEvent<ApiType, [proposalHash: H256, result: Result<Null, SpRuntimeDispatchError>], { proposalHash: H256, result: Result<Null, SpRuntimeDispatchError> }>;
/**
* A single member did some action; result will be `Ok` if it returned without error.
**/
MemberExecuted: AugmentedEvent<ApiType, [proposalHash: H256, result: Result<Null, SpRuntimeDispatchError>], { proposalHash: H256, result: Result<Null, SpRuntimeDispatchError> }>;
/**
* A motion (given hash) has been proposed (by given account) with a threshold (given
* `MemberCount`).
**/
Proposed: AugmentedEvent<ApiType, [account: AccountId32, proposalIndex: u32, proposalHash: H256, threshold: u32], { account: AccountId32, proposalIndex: u32, proposalHash: H256, threshold: u32 }>;
/**
* A motion (given hash) has been voted on by given account, leaving
* a tally (yes votes and no votes given respectively as `MemberCount`).
**/
Voted: AugmentedEvent<ApiType, [account: AccountId32, proposalHash: H256, voted: bool, yes: u32, no: u32], { account: AccountId32, proposalHash: H256, voted: bool, yes: u32, no: u32 }>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
crowdloan: { crowdloan: {
/** /**
* A parachain has been moved to `NewRaise` * A parachain has been moved to `NewRaise`
@@ -308,80 +273,6 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
democracy: {
/**
* A proposal_hash has been blacklisted permanently.
**/
Blacklisted: AugmentedEvent<ApiType, [proposalHash: H256], { proposalHash: H256 }>;
/**
* A referendum has been cancelled.
**/
Cancelled: AugmentedEvent<ApiType, [refIndex: u32], { refIndex: u32 }>;
/**
* An account has delegated their vote to another account.
**/
Delegated: AugmentedEvent<ApiType, [who: AccountId32, target: AccountId32], { who: AccountId32, target: AccountId32 }>;
/**
* An external proposal has been tabled.
**/
ExternalTabled: AugmentedEvent<ApiType, []>;
/**
* Metadata for a proposal or a referendum has been cleared.
**/
MetadataCleared: AugmentedEvent<ApiType, [owner: PalletDemocracyMetadataOwner, hash_: H256], { owner: PalletDemocracyMetadataOwner, hash_: H256 }>;
/**
* Metadata for a proposal or a referendum has been set.
**/
MetadataSet: AugmentedEvent<ApiType, [owner: PalletDemocracyMetadataOwner, hash_: H256], { owner: PalletDemocracyMetadataOwner, hash_: H256 }>;
/**
* Metadata has been transferred to new owner.
**/
MetadataTransferred: AugmentedEvent<ApiType, [prevOwner: PalletDemocracyMetadataOwner, owner: PalletDemocracyMetadataOwner, hash_: H256], { prevOwner: PalletDemocracyMetadataOwner, owner: PalletDemocracyMetadataOwner, hash_: H256 }>;
/**
* A proposal has been rejected by referendum.
**/
NotPassed: AugmentedEvent<ApiType, [refIndex: u32], { refIndex: u32 }>;
/**
* A proposal has been approved by referendum.
**/
Passed: AugmentedEvent<ApiType, [refIndex: u32], { refIndex: u32 }>;
/**
* A proposal got canceled.
**/
ProposalCanceled: AugmentedEvent<ApiType, [propIndex: u32], { propIndex: u32 }>;
/**
* A motion has been proposed by a public account.
**/
Proposed: AugmentedEvent<ApiType, [proposalIndex: u32, deposit: u128], { proposalIndex: u32, deposit: u128 }>;
/**
* An account has secconded a proposal
**/
Seconded: AugmentedEvent<ApiType, [seconder: AccountId32, propIndex: u32], { seconder: AccountId32, propIndex: u32 }>;
/**
* A referendum has begun.
**/
Started: AugmentedEvent<ApiType, [refIndex: u32, threshold: PalletDemocracyVoteThreshold], { refIndex: u32, threshold: PalletDemocracyVoteThreshold }>;
/**
* A public proposal has been tabled for referendum vote.
**/
Tabled: AugmentedEvent<ApiType, [proposalIndex: u32, deposit: u128], { proposalIndex: u32, deposit: u128 }>;
/**
* An account has cancelled a previous delegation operation.
**/
Undelegated: AugmentedEvent<ApiType, [account: AccountId32], { account: AccountId32 }>;
/**
* An external proposal has been vetoed.
**/
Vetoed: AugmentedEvent<ApiType, [who: AccountId32, proposalHash: H256, until: u32], { who: AccountId32, proposalHash: H256, until: u32 }>;
/**
* An account has voted in a referendum
**/
Voted: AugmentedEvent<ApiType, [voter: AccountId32, refIndex: u32, vote: PalletDemocracyVoteAccountVote], { voter: AccountId32, refIndex: u32, vote: PalletDemocracyVoteAccountVote }>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
electionProviderMultiPhase: { electionProviderMultiPhase: {
/** /**
* An election failed. * An election failed.
@@ -723,15 +614,15 @@ declare module '@polkadot/api-base/types/events' {
/** /**
* A candidate was backed. `[candidate, head_data]` * A candidate was backed. `[candidate, head_data]`
**/ **/
CandidateBacked: AugmentedEvent<ApiType, [PolkadotPrimitivesV4CandidateReceipt, Bytes, u32, u32]>; CandidateBacked: AugmentedEvent<ApiType, [PolkadotPrimitivesV5CandidateReceipt, Bytes, u32, u32]>;
/** /**
* A candidate was included. `[candidate, head_data]` * A candidate was included. `[candidate, head_data]`
**/ **/
CandidateIncluded: AugmentedEvent<ApiType, [PolkadotPrimitivesV4CandidateReceipt, Bytes, u32, u32]>; CandidateIncluded: AugmentedEvent<ApiType, [PolkadotPrimitivesV5CandidateReceipt, Bytes, u32, u32]>;
/** /**
* A candidate timed out. `[candidate, head_data]` * A candidate timed out. `[candidate, head_data]`
**/ **/
CandidateTimedOut: AugmentedEvent<ApiType, [PolkadotPrimitivesV4CandidateReceipt, Bytes, u32]>; CandidateTimedOut: AugmentedEvent<ApiType, [PolkadotPrimitivesV5CandidateReceipt, Bytes, u32]>;
/** /**
* Some upward messages have been received and will be processed. * Some upward messages have been received and will be processed.
**/ **/
@@ -804,49 +695,6 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
phragmenElection: {
/**
* A candidate was slashed by amount due to failing to obtain a seat as member or
* runner-up.
*
* Note that old members and runners-up are also candidates.
**/
CandidateSlashed: AugmentedEvent<ApiType, [candidate: AccountId32, amount: u128], { candidate: AccountId32, amount: u128 }>;
/**
* Internal error happened while trying to perform election.
**/
ElectionError: AugmentedEvent<ApiType, []>;
/**
* No (or not enough) candidates existed for this round. This is different from
* `NewTerm(\[\])`. See the description of `NewTerm`.
**/
EmptyTerm: AugmentedEvent<ApiType, []>;
/**
* A member has been removed. This should always be followed by either `NewTerm` or
* `EmptyTerm`.
**/
MemberKicked: AugmentedEvent<ApiType, [member: AccountId32], { member: AccountId32 }>;
/**
* A new term with new_members. This indicates that enough candidates existed to run
* the election, not that enough have has been elected. The inner value must be examined
* for this purpose. A `NewTerm(\[\])` indicates that some candidates got their bond
* slashed and none were elected, whilst `EmptyTerm` means that no candidates existed to
* begin with.
**/
NewTerm: AugmentedEvent<ApiType, [newMembers: Vec<ITuple<[AccountId32, u128]>>], { newMembers: Vec<ITuple<[AccountId32, u128]>> }>;
/**
* Someone has renounced their candidacy.
**/
Renounced: AugmentedEvent<ApiType, [candidate: AccountId32], { candidate: AccountId32 }>;
/**
* A seat holder was slashed by amount by being forcefully removed from the set.
**/
SeatHolderSlashed: AugmentedEvent<ApiType, [seatHolder: AccountId32, amount: u128], { seatHolder: AccountId32, amount: u128 }>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
preimage: { preimage: {
/** /**
* A preimage has ben cleared. * A preimage has ben cleared.
@@ -1070,6 +918,14 @@ declare module '@polkadot/api-base/types/events' {
* era as been reported. * era as been reported.
**/ **/
SlashReported: AugmentedEvent<ApiType, [validator: AccountId32, fraction: Perbill, slashEra: u32], { validator: AccountId32, fraction: Perbill, slashEra: u32 }>; SlashReported: AugmentedEvent<ApiType, [validator: AccountId32, fraction: Perbill, slashEra: u32], { validator: AccountId32, fraction: Perbill, slashEra: u32 }>;
/**
* Targets size limit reached.
**/
SnapshotTargetsSizeExceeded: AugmentedEvent<ApiType, [size_: u32], { size_: u32 }>;
/**
* Voters size limit reached.
**/
SnapshotVotersSizeExceeded: AugmentedEvent<ApiType, [size_: u32], { size_: u32 }>;
/** /**
* A new set of stakers was elected. * A new set of stakers was elected.
**/ **/
@@ -1126,98 +982,6 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
technicalCommittee: {
/**
* A motion was approved by the required threshold.
**/
Approved: AugmentedEvent<ApiType, [proposalHash: H256], { proposalHash: H256 }>;
/**
* A proposal was closed because its threshold was reached or after its duration was up.
**/
Closed: AugmentedEvent<ApiType, [proposalHash: H256, yes: u32, no: u32], { proposalHash: H256, yes: u32, no: u32 }>;
/**
* A motion was not approved by the required threshold.
**/
Disapproved: AugmentedEvent<ApiType, [proposalHash: H256], { proposalHash: H256 }>;
/**
* A motion was executed; result will be `Ok` if it returned without error.
**/
Executed: AugmentedEvent<ApiType, [proposalHash: H256, result: Result<Null, SpRuntimeDispatchError>], { proposalHash: H256, result: Result<Null, SpRuntimeDispatchError> }>;
/**
* A single member did some action; result will be `Ok` if it returned without error.
**/
MemberExecuted: AugmentedEvent<ApiType, [proposalHash: H256, result: Result<Null, SpRuntimeDispatchError>], { proposalHash: H256, result: Result<Null, SpRuntimeDispatchError> }>;
/**
* A motion (given hash) has been proposed (by given account) with a threshold (given
* `MemberCount`).
**/
Proposed: AugmentedEvent<ApiType, [account: AccountId32, proposalIndex: u32, proposalHash: H256, threshold: u32], { account: AccountId32, proposalIndex: u32, proposalHash: H256, threshold: u32 }>;
/**
* A motion (given hash) has been voted on by given account, leaving
* a tally (yes votes and no votes given respectively as `MemberCount`).
**/
Voted: AugmentedEvent<ApiType, [account: AccountId32, proposalHash: H256, voted: bool, yes: u32, no: u32], { account: AccountId32, proposalHash: H256, voted: bool, yes: u32, no: u32 }>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
technicalMembership: {
/**
* Phantom member, never used.
**/
Dummy: AugmentedEvent<ApiType, []>;
/**
* One of the members' keys changed.
**/
KeyChanged: AugmentedEvent<ApiType, []>;
/**
* The given member was added; see the transaction for who.
**/
MemberAdded: AugmentedEvent<ApiType, []>;
/**
* The given member was removed; see the transaction for who.
**/
MemberRemoved: AugmentedEvent<ApiType, []>;
/**
* The membership was reset; see the transaction for who the new set is.
**/
MembersReset: AugmentedEvent<ApiType, []>;
/**
* Two members were swapped; see the transaction for who.
**/
MembersSwapped: AugmentedEvent<ApiType, []>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
tips: {
/**
* A new tip suggestion has been opened.
**/
NewTip: AugmentedEvent<ApiType, [tipHash: H256], { tipHash: H256 }>;
/**
* A tip suggestion has been closed.
**/
TipClosed: AugmentedEvent<ApiType, [tipHash: H256, who: AccountId32, payout: u128], { tipHash: H256, who: AccountId32, payout: u128 }>;
/**
* A tip suggestion has reached threshold and is closing.
**/
TipClosing: AugmentedEvent<ApiType, [tipHash: H256], { tipHash: H256 }>;
/**
* A tip suggestion has been retracted.
**/
TipRetracted: AugmentedEvent<ApiType, [tipHash: H256], { tipHash: H256 }>;
/**
* A tip suggestion has been slashed.
**/
TipSlashed: AugmentedEvent<ApiType, [tipHash: H256, finder: AccountId32, deposit: u128], { tipHash: H256, finder: AccountId32, deposit: u128 }>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
transactionPayment: { transactionPayment: {
/** /**
* A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee, * A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,
@@ -1406,8 +1170,8 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
NotifyDispatchError: AugmentedEvent<ApiType, [queryId: u64, palletIndex: u8, callIndex: u8], { queryId: u64, palletIndex: u8, callIndex: u8 }>; NotifyDispatchError: AugmentedEvent<ApiType, [queryId: u64, palletIndex: u8, callIndex: u8], { queryId: u64, palletIndex: u8, callIndex: u8 }>;
/** /**
* Query response has been received and query is removed. The registered notification could * Query response has been received and query is removed. The registered notification
* not be dispatched because the dispatch weight is greater than the maximum weight * could not be dispatched because the dispatch weight is greater than the maximum weight
* originally budgeted by this runtime for the query result. * originally budgeted by this runtime for the query result.
**/ **/
NotifyOverweight: AugmentedEvent<ApiType, [queryId: u64, palletIndex: u8, callIndex: u8, actualWeight: SpWeightsWeightV2Weight, maxBudgetedWeight: SpWeightsWeightV2Weight], { queryId: u64, palletIndex: u8, callIndex: u8, actualWeight: SpWeightsWeightV2Weight, maxBudgetedWeight: SpWeightsWeightV2Weight }>; NotifyOverweight: AugmentedEvent<ApiType, [queryId: u64, palletIndex: u8, callIndex: u8, actualWeight: SpWeightsWeightV2Weight, maxBudgetedWeight: SpWeightsWeightV2Weight], { queryId: u64, palletIndex: u8, callIndex: u8, actualWeight: SpWeightsWeightV2Weight, maxBudgetedWeight: SpWeightsWeightV2Weight }>;
@@ -1461,7 +1225,8 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
VersionNotifyStarted: AugmentedEvent<ApiType, [destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed], { destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed }>; VersionNotifyStarted: AugmentedEvent<ApiType, [destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed], { destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed }>;
/** /**
* We have requested that a remote chain stops sending us XCM version change notifications. * We have requested that a remote chain stops sending us XCM version change
* notifications.
**/ **/
VersionNotifyUnrequested: AugmentedEvent<ApiType, [destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed], { destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed }>; VersionNotifyUnrequested: AugmentedEvent<ApiType, [destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed], { destination: XcmV3MultiLocation, cost: XcmV3MultiassetMultiAssets, messageId: U8aFixed }>;
/** /**
+63 -266
View File
@@ -7,11 +7,11 @@ import '@polkadot/api-base/types/storage';
import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types'; import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';
import type { Data } from '@polkadot/types'; import type { Data } from '@polkadot/types';
import type { BTreeSet, Bytes, Null, Option, Struct, U8aFixed, Vec, WrapperOpaque, bool, u128, u16, u32, u64 } from '@polkadot/types-codec'; import type { BTreeMap, BTreeSet, Bytes, Null, Option, Struct, U8aFixed, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types'; import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { EthereumAddress } from '@polkadot/types/interfaces/eth'; import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime'; import type { AccountId32, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesIdAmount, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletConvictionVotingVoteVoting, PalletDemocracyMetadataOwner, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMessageQueueBookState, PalletMessageQueuePage, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletReferendaReferendumInfo, PalletSchedulerScheduled, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV4AssignmentAppPublic, PolkadotPrimitivesV4CandidateCommitments, PolkadotPrimitivesV4CoreOccupied, PolkadotPrimitivesV4DisputeState, PolkadotPrimitivesV4ExecutorParams, PolkadotPrimitivesV4ScrapedOnChainVotes, PolkadotPrimitivesV4SessionInfo, PolkadotPrimitivesV4UpgradeGoAhead, PolkadotPrimitivesV4UpgradeRestriction, PolkadotPrimitivesV4ValidatorAppPublic, PolkadotPrimitivesVstagingSlashingPendingSlashes, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeRuntimeHoldReason, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, SpWeightsWeightV2Weight, XcmVersionedAssetId, XcmVersionedMultiLocation } from '@polkadot/types/lookup'; import type { FrameSupportDispatchPerDispatchClassWeight, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesIdAmount, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletConvictionVotingVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineSr25519AppSr25519Public, PalletMessageQueueBookState, PalletMessageQueuePage, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletReferendaReferendumInfo, PalletSchedulerScheduled, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV5AssignmentAppPublic, PolkadotPrimitivesV5CandidateCommitments, PolkadotPrimitivesV5CoreOccupied, PolkadotPrimitivesV5DisputeState, PolkadotPrimitivesV5ExecutorParams, PolkadotPrimitivesV5ParasEntry, PolkadotPrimitivesV5ScrapedOnChainVotes, PolkadotPrimitivesV5SessionInfo, PolkadotPrimitivesV5SlashingPendingSlashes, PolkadotPrimitivesV5UpgradeGoAhead, PolkadotPrimitivesV5UpgradeRestriction, PolkadotPrimitivesV5ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker, PolkadotRuntimeRuntimeHoldReason, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, SpWeightsWeightV2Weight, XcmVersionedAssetId, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
import type { Observable } from '@polkadot/types/types'; import type { Observable } from '@polkadot/types/types';
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>; export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
@@ -346,36 +346,6 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
council: {
/**
* The current members of the collective. This is stored sorted (just by value).
**/
members: AugmentedQuery<ApiType, () => Observable<Vec<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The prime member that helps determine the default vote behavior in case of absentations.
**/
prime: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Proposals so far.
**/
proposalCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Actual proposal for a given hash, if it's current.
**/
proposalOf: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<Call>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
/**
* The hashes of the active proposals.
**/
proposals: AugmentedQuery<ApiType, () => Observable<Vec<H256>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Votes on a given proposal, if it is ongoing.
**/
voting: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<PalletCollectiveVotes>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
crowdloan: { crowdloan: {
/** /**
* The number of auctions that have entered into their ending period so far. * The number of auctions that have entered into their ending period so far.
@@ -399,78 +369,6 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
democracy: {
/**
* A record of who vetoed what. Maps proposal hash to a possible existent block number
* (until when it may not be resubmitted) and who vetoed it.
**/
blacklist: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<ITuple<[u32, Vec<AccountId32>]>>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
/**
* Record of all proposals that have been subject to emergency cancellation.
**/
cancellations: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<bool>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
/**
* Those who have locked a deposit.
*
* TWOX-NOTE: Safe, as increasing integer keys are safe.
**/
depositOf: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<ITuple<[Vec<AccountId32>, u128]>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* True if the last referendum tabled was submitted externally. False if it was a public
* proposal.
**/
lastTabledWasExternal: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The lowest referendum index representing an unbaked referendum. Equal to
* `ReferendumCount` if there isn't a unbaked referendum.
**/
lowestUnbaked: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* General information concerning any proposal or referendum.
* The `PreimageHash` refers to the preimage of the `Preimages` provider which can be a JSON
* dump or IPFS hash of a JSON file.
*
* Consider a garbage collection for a metadata of finished referendums to `unrequest` (remove)
* large preimages.
**/
metadataOf: AugmentedQuery<ApiType, (arg: PalletDemocracyMetadataOwner | { External: any } | { Proposal: any } | { Referendum: any } | string | Uint8Array) => Observable<Option<H256>>, [PalletDemocracyMetadataOwner]> & QueryableStorageEntry<ApiType, [PalletDemocracyMetadataOwner]>;
/**
* The referendum to be tabled whenever it would be valid to table an external proposal.
* This happens when a referendum needs to be tabled and one of two conditions are met:
* - `LastTabledWasExternal` is `false`; or
* - `PublicProps` is empty.
**/
nextExternal: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[FrameSupportPreimagesBounded, PalletDemocracyVoteThreshold]>>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The number of (public) proposals that have been made so far.
**/
publicPropCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The public proposals. Unsorted. The second item is the proposal.
**/
publicProps: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, FrameSupportPreimagesBounded, AccountId32]>>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The next free referendum index, aka the number of referenda started so far.
**/
referendumCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Information concerning any given referendum.
*
* TWOX-NOTE: SAFE as indexes are not under an attacker’s control.
**/
referendumInfoOf: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletDemocracyReferendumInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* All votes for a particular voter. We store the balance for the number of votes that we
* have recorded. The second item is the total amount of delegations, that will be added.
*
* TWOX-NOTE: SAFE as `AccountId`s are crypto hashes anyway.
**/
votingOf: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletDemocracyVoteVoting>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
dmp: { dmp: {
/** /**
* The number to multiply the base delivery fee by. * The number to multiply the base delivery fee by.
@@ -723,7 +621,8 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* The HRMP watermark associated with each para. * The HRMP watermark associated with each para.
* Invariant: * Invariant:
* - each para `P` used here as a key should satisfy `Paras::is_valid_para(P)` within a session. * - each para `P` used here as a key should satisfy `Paras::is_valid_para(P)` within a
* session.
**/ **/
hrmpWatermarks: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; hrmpWatermarks: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
@@ -788,10 +687,9 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
keys: AugmentedQuery<ApiType, () => Observable<Vec<PalletImOnlineSr25519AppSr25519Public>>, []> & QueryableStorageEntry<ApiType, []>; keys: AugmentedQuery<ApiType, () => Observable<Vec<PalletImOnlineSr25519AppSr25519Public>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* For each session index, we keep a mapping of `SessionIndex` and `AuthIndex` to * For each session index, we keep a mapping of `SessionIndex` and `AuthIndex`.
* `WrapperOpaque<BoundedOpaqueNetworkState>`.
**/ **/
receivedHeartbeats: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<WrapperOpaque<PalletImOnlineBoundedOpaqueNetworkState>>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>; receivedHeartbeats: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<bool>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
/** /**
* Generic query * Generic query
**/ **/
@@ -824,9 +722,9 @@ declare module '@polkadot/api-base/types/storage' {
* Semantically a `bool`, but this guarantees it should never hit the trie, * Semantically a `bool`, but this guarantees it should never hit the trie,
* as this is cleared in `on_finalize` and Frame optimizes `None` values to be empty values. * as this is cleared in `on_finalize` and Frame optimizes `None` values to be empty values.
* *
* As a `bool`, `set(false)` and `remove()` both lead to the next `get()` being false, but one of * As a `bool`, `set(false)` and `remove()` both lead to the next `get()` being false, but one
* them writes to the trie and one does not. This confusion makes `Option<()>` more suitable for * of them writes to the trie and one does not. This confusion makes `Option<()>` more suitable
* the semantics of this variable. * for the semantics of this variable.
**/ **/
hasInitialized: AugmentedQuery<ApiType, () => Observable<Option<Null>>, []> & QueryableStorageEntry<ApiType, []>; hasInitialized: AugmentedQuery<ApiType, () => Observable<Option<Null>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
@@ -992,7 +890,7 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* The commitments of candidates pending availability, by `ParaId`. * The commitments of candidates pending availability, by `ParaId`.
**/ **/
pendingAvailabilityCommitments: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV4CandidateCommitments>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; pendingAvailabilityCommitments: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV5CandidateCommitments>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Generic query * Generic query
**/ **/
@@ -1011,7 +909,7 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* Scraped on chain data for extracting resolved disputes as well as backing votes. * Scraped on chain data for extracting resolved disputes as well as backing votes.
**/ **/
onChainVotes: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV4ScrapedOnChainVotes>>, []> & QueryableStorageEntry<ApiType, []>; onChainVotes: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV5ScrapedOnChainVotes>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* Generic query * Generic query
**/ **/
@@ -1056,7 +954,12 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
heads: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; heads: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* All parachains. Ordered ascending by `ParaId`. Parathreads are not included. * The context (relay-chain block number) of the most recent parachain head.
**/
mostRecentContext: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* All lease holding parachains. Ordered ascending by `ParaId`. On demand parachains are not
* included.
* *
* Consider using the [`ParachainsCache`] type of modifying. * Consider using the [`ParachainsCache`] type of modifying.
**/ **/
@@ -1079,11 +982,11 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
pastCodeMeta: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<PolkadotRuntimeParachainsParasParaPastCodeMeta>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; pastCodeMeta: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<PolkadotRuntimeParachainsParasParaPastCodeMeta>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Which paras have past code that needs pruning and the relay-chain block at which the code was replaced. * Which paras have past code that needs pruning and the relay-chain block at which the code
* Note that this is the actual height of the included block, not the expected height at which the * was replaced. Note that this is the actual height of the included block, not the expected
* code upgrade would be applied, although they may be equal. * height at which the code upgrade would be applied, although they may be equal.
* This is to ensure the entire acceptance period is covered, not an offset acceptance period starting * This is to ensure the entire acceptance period is covered, not an offset acceptance period
* from the time at which the parachain perceives a code upgrade as having occurred. * starting from the time at which the parachain perceives a code upgrade as having occurred.
* Multiple entries for a single para are permitted. Ordered ascending by block number. * Multiple entries for a single para are permitted. Ordered ascending by block number.
**/ **/
pastCodePruning: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, u32]>>>, []> & QueryableStorageEntry<ApiType, []>; pastCodePruning: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;
@@ -1119,17 +1022,18 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
upgradeCooldowns: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, u32]>>>, []> & QueryableStorageEntry<ApiType, []>; upgradeCooldowns: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* This is used by the relay-chain to communicate to a parachain a go-ahead with in the upgrade procedure. * This is used by the relay-chain to communicate to a parachain a go-ahead with in the upgrade
* procedure.
* *
* This value is absent when there are no upgrades scheduled or during the time the relay chain * This value is absent when there are no upgrades scheduled or during the time the relay chain
* performs the checks. It is set at the first relay-chain block when the corresponding parachain * performs the checks. It is set at the first relay-chain block when the corresponding
* can switch its upgrade function. As soon as the parachain's block is included, the value * parachain can switch its upgrade function. As soon as the parachain's block is included, the
* gets reset to `None`. * value gets reset to `None`.
* *
* NOTE that this field is used by parachains via merkle storage proofs, therefore changing * NOTE that this field is used by parachains via merkle storage proofs, therefore changing
* the format will require migration of parachains. * the format will require migration of parachains.
**/ **/
upgradeGoAheadSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV4UpgradeGoAhead>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; upgradeGoAheadSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV5UpgradeGoAhead>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* This is used by the relay-chain to communicate that there are restrictions for performing * This is used by the relay-chain to communicate that there are restrictions for performing
* an upgrade for this parachain. * an upgrade for this parachain.
@@ -1141,7 +1045,7 @@ declare module '@polkadot/api-base/types/storage' {
* NOTE that this field is used by parachains via merkle storage proofs, therefore changing * NOTE that this field is used by parachains via merkle storage proofs, therefore changing
* the format will require migration of parachains. * the format will require migration of parachains.
**/ **/
upgradeRestrictionSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV4UpgradeRestriction>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; upgradeRestrictionSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV5UpgradeRestriction>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Generic query * Generic query
**/ **/
@@ -1149,8 +1053,8 @@ declare module '@polkadot/api-base/types/storage' {
}; };
paraScheduler: { paraScheduler: {
/** /**
* One entry for each availability core. Entries are `None` if the core is not currently occupied. Can be * One entry for each availability core. Entries are `None` if the core is not currently
* temporarily `Some` if scheduled but not occupied. * occupied. Can be temporarily `Some` if scheduled but not occupied.
* The i'th parachain belongs to the i'th core, with the remaining cores all being * The i'th parachain belongs to the i'th core, with the remaining cores all being
* parathread-multiplexers. * parathread-multiplexers.
* *
@@ -1158,32 +1062,18 @@ declare module '@polkadot/api-base/types/storage' {
* * The number of parachains and parathread multiplexers * * The number of parachains and parathread multiplexers
* * The number of validators divided by `configuration.max_validators_per_core`. * * The number of validators divided by `configuration.max_validators_per_core`.
**/ **/
availabilityCores: AugmentedQuery<ApiType, () => Observable<Vec<Option<PolkadotPrimitivesV4CoreOccupied>>>, []> & QueryableStorageEntry<ApiType, []>; availabilityCores: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV5CoreOccupied>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* An index used to ensure that only one claim on a parathread exists in the queue or is * One entry for each availability core. The `VecDeque` represents the assignments to be
* currently being handled by an occupied core. * scheduled on that core. `None` is used to signal to not schedule the next para of the core
* * as there is one currently being scheduled. Not using `None` here would overwrite the
* Bounded by the number of parathread cores and scheduling lookahead. Reasonably, 10 * 50 = 500. * `CoreState` in the runtime API. The value contained here will not be valid after the end of
* a block. Runtime APIs should be used to determine scheduled cores/ for the upcoming block.
**/ **/
parathreadClaimIndex: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>; claimQueue: AugmentedQuery<ApiType, () => Observable<BTreeMap<u32, Vec<Option<PolkadotPrimitivesV5ParasEntry>>>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* A queue of upcoming claims and which core they should be mapped onto. * The block number where the session start occurred. Used to track how many group rotations
* * have occurred.
* The number of queued claims is bounded at the `scheduling_lookahead`
* multiplied by the number of parathread multiplexer cores. Reasonably, 10 * 50 = 500.
**/
parathreadQueue: AugmentedQuery<ApiType, () => Observable<PolkadotRuntimeParachainsSchedulerParathreadClaimQueue>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Currently scheduled cores - free but up to be occupied.
*
* Bounded by the number of cores: one for each parachain and parathread multiplexer.
*
* The value contained here will not be valid after the end of a block. Runtime APIs should be used to determine scheduled cores/
* for the upcoming block.
**/
scheduled: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotRuntimeParachainsSchedulerCoreAssignment>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The block number where the session start occurred. Used to track how many group rotations have occurred.
* *
* Note that in the context of parachains modules the session change is signaled during * Note that in the context of parachains modules the session change is signaled during
* the block and enacted at the end of the block (at the finalization stage, to be exact). * the block and enacted at the end of the block (at the finalization stage, to be exact).
@@ -1196,8 +1086,9 @@ declare module '@polkadot/api-base/types/storage' {
* broader set of Polkadot validators, but instead just the subset used for parachains during * broader set of Polkadot validators, but instead just the subset used for parachains during
* this session. * this session.
* *
* Bound: The number of cores is the sum of the numbers of parachains and parathread multiplexers. * Bound: The number of cores is the sum of the numbers of parachains and parathread
* Reasonably, 100-1000. The dominant factor is the number of validators: safe upper bound at 10k. * multiplexers. Reasonably, 100-1000. The dominant factor is the number of validators: safe
* upper bound at 10k.
**/ **/
validatorGroups: AugmentedQuery<ApiType, () => Observable<Vec<Vec<u32>>>, []> & QueryableStorageEntry<ApiType, []>; validatorGroups: AugmentedQuery<ApiType, () => Observable<Vec<Vec<u32>>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
@@ -1214,7 +1105,7 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* All ongoing or concluded disputes for the last several sessions. * All ongoing or concluded disputes for the last several sessions.
**/ **/
disputes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV4DisputeState>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>; disputes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV5DisputeState>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
/** /**
* Whether the chain is frozen. Starts as `None`. When this is `Some`, * Whether the chain is frozen. Starts as `None`. When this is `Some`,
* the chain will not accept any new parachain blocks for backing or inclusion, * the chain will not accept any new parachain blocks for backing or inclusion,
@@ -1247,7 +1138,7 @@ declare module '@polkadot/api-base/types/storage' {
* Note that this API is private due to it being prone to 'off-by-one' at session boundaries. * Note that this API is private due to it being prone to 'off-by-one' at session boundaries.
* When in doubt, use `Sessions` API instead. * When in doubt, use `Sessions` API instead.
**/ **/
assignmentKeysUnsafe: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV4AssignmentAppPublic>>, []> & QueryableStorageEntry<ApiType, []>; assignmentKeysUnsafe: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV5AssignmentAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The earliest session for which previous session info is stored. * The earliest session for which previous session info is stored.
**/ **/
@@ -1255,13 +1146,13 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* Executor parameter set for a given session index * Executor parameter set for a given session index
**/ **/
sessionExecutorParams: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV4ExecutorParams>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; sessionExecutorParams: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV5ExecutorParams>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Session information in a rolling window. * Session information in a rolling window.
* Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`. * Should have an entry in range `EarliestStoredSession..=CurrentSessionIndex`.
* Does not have any entries before the session index in the first session change notification. * Does not have any entries before the session index in the first session change notification.
**/ **/
sessions: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV4SessionInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; sessions: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV5SessionInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
* Generic query * Generic query
**/ **/
@@ -1274,10 +1165,14 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
activeValidatorIndices: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>; activeValidatorIndices: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The parachain attestation keys of the validators actively participating in parachain consensus. * The parachain attestation keys of the validators actively participating in parachain
* This should be the same length as `ActiveValidatorIndices`. * consensus. This should be the same length as `ActiveValidatorIndices`.
**/ **/
activeValidatorKeys: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV4ValidatorAppPublic>>, []> & QueryableStorageEntry<ApiType, []>; activeValidatorKeys: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV5ValidatorAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* All allowed relay-parents.
**/
allowedRelayParents: AugmentedQuery<ApiType, () => Observable<PolkadotRuntimeParachainsSharedAllowedRelayParentsTracker>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The current session index. * The current session index.
**/ **/
@@ -1291,7 +1186,7 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* Validators pending dispute slashes. * Validators pending dispute slashes.
**/ **/
unappliedSlashes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesVstagingSlashingPendingSlashes>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>; unappliedSlashes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV5SlashingPendingSlashes>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
/** /**
* `ValidatorSetCount` per session. * `ValidatorSetCount` per session.
**/ **/
@@ -1301,44 +1196,6 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
phragmenElection: {
/**
* The present candidate list. A current member or runner-up can never enter this vector
* and is always implicitly assumed to be a candidate.
*
* Second element is the deposit.
*
* Invariant: Always sorted based on account id.
**/
candidates: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[AccountId32, u128]>>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The total number of vote rounds that have happened, excluding the upcoming one.
**/
electionRounds: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The current elected members.
*
* Invariant: Always sorted based on account id.
**/
members: AugmentedQuery<ApiType, () => Observable<Vec<PalletElectionsPhragmenSeatHolder>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The current reserved runners-up.
*
* Invariant: Always sorted based on rank (worse to best). Upon removal of a member, the
* last (i.e. _best_) runner-up will be replaced.
**/
runnersUp: AugmentedQuery<ApiType, () => Observable<Vec<PalletElectionsPhragmenSeatHolder>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Votes and locked stake of a particular voter.
*
* TWOX-NOTE: SAFE as `AccountId` is a crypto hash.
**/
voting: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletElectionsPhragmenVoter>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
preimage: { preimage: {
preimageFor: AugmentedQuery<ApiType, (arg: ITuple<[H256, u32]> | [H256 | string | Uint8Array, u32 | AnyNumber | Uint8Array]) => Observable<Option<Bytes>>, [ITuple<[H256, u32]>]> & QueryableStorageEntry<ApiType, [ITuple<[H256, u32]>]>; preimageFor: AugmentedQuery<ApiType, (arg: ITuple<[H256, u32]> | [H256 | string | Uint8Array, u32 | AnyNumber | Uint8Array]) => Observable<Option<Bytes>>, [ITuple<[H256, u32]>]> & QueryableStorageEntry<ApiType, [ITuple<[H256, u32]>]>;
/** /**
@@ -1407,8 +1264,8 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* Amount held on deposit for each para and the original depositor. * Amount held on deposit for each para and the original depositor.
* *
* The given account ID is responsible for registering the code and initial head data, but may only do * The given account ID is responsible for registering the code and initial head data, but may
* so if it isn't yet registered. (After that, it's up to governance to do so.) * only do so if it isn't yet registered. (After that, it's up to governance to do so.)
**/ **/
paras: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotRuntimeCommonParasRegistrarParaInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; paras: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotRuntimeCommonParasRegistrarParaInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
@@ -1482,8 +1339,8 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* Amounts held on deposit for each (possibly future) leased parachain. * Amounts held on deposit for each (possibly future) leased parachain.
* *
* The actual amount locked on its behalf by any account at any time is the maximum of the second values * The actual amount locked on its behalf by any account at any time is the maximum of the
* of the items in this list whose first value is the account. * second values of the items in this list whose first value is the account.
* *
* The first item in the list is the amount locked for the current Lease Period. Following * The first item in the list is the amount locked for the current Lease Period. Following
* items are for the subsequent lease periods. * items are for the subsequent lease periods.
@@ -1663,7 +1520,8 @@ declare module '@polkadot/api-base/types/storage' {
* they wish to support. * they wish to support.
* *
* Note that the keys of this storage map might become non-decodable in case the * Note that the keys of this storage map might become non-decodable in case the
* [`Config::MaxNominations`] configuration is decreased. In this rare case, these nominators * account's [`NominationsQuota::MaxNominations`] configuration is decreased.
* In this rare case, these nominators
* are still existent in storage, their key is correct and retrievable (i.e. `contains_key` * are still existent in storage, their key is correct and retrievable (i.e. `contains_key`
* indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable * indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable
* nominators will effectively not-exist, until they re-submit their preferences such that it * nominators will effectively not-exist, until they re-submit their preferences such that it
@@ -1783,7 +1641,7 @@ declare module '@polkadot/api-base/types/storage' {
* allows light-clients to leverage the changes trie storage tracking mechanism and * allows light-clients to leverage the changes trie storage tracking mechanism and
* in case of changes fetch the list of events of interest. * in case of changes fetch the list of events of interest.
* *
* The value has the type `(T::BlockNumber, EventIndex)` because if we used only just * The value has the type `(BlockNumberFor<T>, EventIndex)` because if we used only just
* the `EventIndex` then in case if the topic has the same contents on the next block * the `EventIndex` then in case if the topic has the same contents on the next block
* no notification will be triggered thus the event might be lost. * no notification will be triggered thus the event might be lost.
**/ **/
@@ -1826,50 +1684,6 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
technicalCommittee: {
/**
* The current members of the collective. This is stored sorted (just by value).
**/
members: AugmentedQuery<ApiType, () => Observable<Vec<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The prime member that helps determine the default vote behavior in case of absentations.
**/
prime: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Proposals so far.
**/
proposalCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Actual proposal for a given hash, if it's current.
**/
proposalOf: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<Call>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
/**
* The hashes of the active proposals.
**/
proposals: AugmentedQuery<ApiType, () => Observable<Vec<H256>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Votes on a given proposal, if it is ongoing.
**/
voting: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<PalletCollectiveVotes>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
technicalMembership: {
/**
* The current membership, stored as an ordered Vec.
**/
members: AugmentedQuery<ApiType, () => Observable<Vec<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The current prime member, if one exists.
**/
prime: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
timestamp: { timestamp: {
/** /**
* Did the timestamp get updated in this block? * Did the timestamp get updated in this block?
@@ -1884,23 +1698,6 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
tips: {
/**
* Simple preimage lookup from the reason's hash to the original data. Again, has an
* insecure enumerable hash since the key is guaranteed to be the result of a secure hash.
**/
reasons: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<Bytes>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
/**
* TipsMap that are not yet completed. Keyed by the hash of `(reason, who)` from the value.
* This has the insecure enumerable hash function since the key itself is already
* guaranteed to be a secure hash.
**/
tips: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<PalletTipsOpenTip>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
transactionPayment: { transactionPayment: {
nextFeeMultiplier: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>; nextFeeMultiplier: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
storageVersion: AugmentedQuery<ApiType, () => Observable<PalletTransactionPaymentReleases>, []> & QueryableStorageEntry<ApiType, []>; storageVersion: AugmentedQuery<ApiType, () => Observable<PalletTransactionPaymentReleases>, []> & QueryableStorageEntry<ApiType, []>;
+15 -3
View File
@@ -18,7 +18,7 @@ import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/t
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata'; import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError } from '@polkadot/types/interfaces/mmr'; import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError } from '@polkadot/types/interfaces/mmr';
import type { NpPoolId } from '@polkadot/types/interfaces/nompools'; import type { NpPoolId } from '@polkadot/types/interfaces/nompools';
import type { CandidateCommitments, CandidateEvent, CandidateHash, CommittedCandidateReceipt, CoreState, DisputeState, ExecutorParams, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains'; import type { CandidateCommitments, CandidateEvent, CandidateHash, CommittedCandidateReceipt, CoreState, DisputeProof, DisputeState, ExecutorParams, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PendingSlashes, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment'; import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
import type { AccountId, Balance, Block, BlockNumber, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime'; import type { AccountId, Balance, Block, BlockNumber, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime';
import type { SessionIndex } from '@polkadot/types/interfaces/session'; import type { SessionIndex } from '@polkadot/types/interfaces/session';
@@ -85,7 +85,7 @@ declare module '@polkadot/api-base/types/calls' {
**/ **/
[key: string]: DecoratedCallBase<ApiType>; [key: string]: DecoratedCallBase<ApiType>;
}; };
/** 0x49eaaf1b548a0cb0/2 */ /** 0x49eaaf1b548a0cb0/3 */
beefyApi: { beefyApi: {
/** /**
* Return the block number where BEEFY consensus is enabled/started * Return the block number where BEEFY consensus is enabled/started
@@ -245,7 +245,7 @@ declare module '@polkadot/api-base/types/calls' {
**/ **/
[key: string]: DecoratedCallBase<ApiType>; [key: string]: DecoratedCallBase<ApiType>;
}; };
/** 0xaf2c0297a23e6d3d/4 */ /** 0xaf2c0297a23e6d3d/5 */
parachainHost: { parachainHost: {
/** /**
* Returns the persisted validation data for the given `ParaId` along with the corresponding validation code hash. * Returns the persisted validation data for the given `ParaId` along with the corresponding validation code hash.
@@ -279,6 +279,10 @@ declare module '@polkadot/api-base/types/calls' {
* Get the contents of all channels addressed to the given recipient. * Get the contents of all channels addressed to the given recipient.
**/ **/
inboundHrmpChannelsContents: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Vec<InboundHrmpMessage>>>; inboundHrmpChannelsContents: AugmentedCall<ApiType, (paraId: ParaId | AnyNumber | Uint8Array) => Observable<Vec<InboundHrmpMessage>>>;
/**
* Returns a merkle proof of a validator session key
**/
keyOwnershipProof: AugmentedCall<ApiType, (validatorId: ValidatorId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
/** /**
* Scrape dispute relevant from on-chain, backing votes and resolved disputes. * Scrape dispute relevant from on-chain, backing votes and resolved disputes.
**/ **/
@@ -307,6 +311,14 @@ declare module '@polkadot/api-base/types/calls' {
* Submits a PVF pre-checking statement into the transaction pool. * Submits a PVF pre-checking statement into the transaction pool.
**/ **/
submitPvfCheckStatement: AugmentedCall<ApiType, (stmt: PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: ValidatorSignature | string | Uint8Array) => Observable<Null>>; submitPvfCheckStatement: AugmentedCall<ApiType, (stmt: PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: ValidatorSignature | string | Uint8Array) => Observable<Null>>;
/**
* Submit an unsigned extrinsic to slash validators who lost a dispute about a candidate of a past session
**/
submitReportDisputeLost: AugmentedCall<ApiType, (disputeProof: DisputeProof | { timeSlot?: any; kind?: any; validatorIndex?: any; validatorId?: any } | string | Uint8Array, keyOwnershipProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
/**
* Returns a list of validators that lost a past session dispute and need to be slashed
**/
unappliedSlashes: AugmentedCall<ApiType, () => Observable<Vec<ITuple<[SessionIndex, CandidateHash, PendingSlashes]>>>>;
/** /**
* Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`. * Fetch the validation code used by a para, making the given `OccupiedCoreAssumption`.
**/ **/
+42 -266
View File
@@ -11,7 +11,7 @@ import type { Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64,
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types'; import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { EthereumAddress } from '@polkadot/types/interfaces/eth'; import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent } from '@polkadot/types/interfaces/runtime'; import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletDemocracyConviction, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpPerbill, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV4ExecutorParams, PolkadotPrimitivesV4InherentData, PolkadotPrimitivesV4PvfCheckStatement, PolkadotPrimitivesV4ValidatorAppSignature, PolkadotPrimitivesVstagingAsyncBackingParams, PolkadotPrimitivesVstagingSlashingDisputeProof, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeOriginCaller, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, PolkadotRuntimeProxyType, PolkadotRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup'; import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpPerbill, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV5ExecutorParams, PolkadotPrimitivesV5InherentData, PolkadotPrimitivesV5PvfCheckStatement, PolkadotPrimitivesV5SlashingDisputeProof, PolkadotPrimitivesV5ValidatorAppSignature, PolkadotPrimitivesVstagingAsyncBackingParams, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeOriginCaller, PolkadotRuntimeParachainsInclusionAggregateMessageOrigin, PolkadotRuntimeProxyType, PolkadotRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>; export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>; export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
@@ -208,10 +208,6 @@ declare module '@polkadot/api-base/types/submittable' {
* See [`Pallet::set_bypass_consistency_check`]. * See [`Pallet::set_bypass_consistency_check`].
**/ **/
setBypassConsistencyCheck: AugmentedSubmittable<(updated: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [bool]>; setBypassConsistencyCheck: AugmentedSubmittable<(updated: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [bool]>;
/**
* See [`Pallet::set_chain_availability_period`].
**/
setChainAvailabilityPeriod: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/** /**
* See [`Pallet::set_code_retention_period`]. * See [`Pallet::set_code_retention_period`].
**/ **/
@@ -227,7 +223,7 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* See [`Pallet::set_executor_params`]. * See [`Pallet::set_executor_params`].
**/ **/
setExecutorParams: AugmentedSubmittable<(updated: PolkadotPrimitivesV4ExecutorParams) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV4ExecutorParams]>; setExecutorParams: AugmentedSubmittable<(updated: PolkadotPrimitivesV5ExecutorParams) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV5ExecutorParams]>;
/** /**
* See [`Pallet::set_group_rotation_frequency`]. * See [`Pallet::set_group_rotation_frequency`].
**/ **/
@@ -256,14 +252,6 @@ declare module '@polkadot/api-base/types/submittable' {
* See [`Pallet::set_hrmp_max_parachain_outbound_channels`]. * See [`Pallet::set_hrmp_max_parachain_outbound_channels`].
**/ **/
setHrmpMaxParachainOutboundChannels: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>; setHrmpMaxParachainOutboundChannels: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* See [`Pallet::set_hrmp_max_parathread_inbound_channels`].
**/
setHrmpMaxParathreadInboundChannels: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* See [`Pallet::set_hrmp_max_parathread_outbound_channels`].
**/
setHrmpMaxParathreadOutboundChannels: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/** /**
* See [`Pallet::set_hrmp_open_request_ttl`]. * See [`Pallet::set_hrmp_open_request_ttl`].
**/ **/
@@ -333,17 +321,37 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
setNoShowSlots: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>; setNoShowSlots: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/** /**
* See [`Pallet::set_parathread_cores`]. * See [`Pallet::set_on_demand_base_fee`].
**/ **/
setParathreadCores: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>; setOnDemandBaseFee: AugmentedSubmittable<(updated: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128]>;
/** /**
* See [`Pallet::set_parathread_retries`]. * See [`Pallet::set_on_demand_cores`].
**/ **/
setParathreadRetries: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>; setOnDemandCores: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/** /**
* See [`Pallet::set_pvf_checking_enabled`]. * See [`Pallet::set_on_demand_fee_variability`].
**/ **/
setPvfCheckingEnabled: AugmentedSubmittable<(updated: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [bool]>; setOnDemandFeeVariability: AugmentedSubmittable<(updated: Perbill | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Perbill]>;
/**
* See [`Pallet::set_on_demand_queue_max_size`].
**/
setOnDemandQueueMaxSize: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* See [`Pallet::set_on_demand_retries`].
**/
setOnDemandRetries: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* See [`Pallet::set_on_demand_target_queue_utilization`].
**/
setOnDemandTargetQueueUtilization: AugmentedSubmittable<(updated: Perbill | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Perbill]>;
/**
* See [`Pallet::set_on_demand_ttl`].
**/
setOnDemandTtl: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* See [`Pallet::set_paras_availability_period`].
**/
setParasAvailabilityPeriod: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/** /**
* See [`Pallet::set_pvf_voting_ttl`]. * See [`Pallet::set_pvf_voting_ttl`].
**/ **/
@@ -356,10 +364,6 @@ declare module '@polkadot/api-base/types/submittable' {
* See [`Pallet::set_scheduling_lookahead`]. * See [`Pallet::set_scheduling_lookahead`].
**/ **/
setSchedulingLookahead: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>; setSchedulingLookahead: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* See [`Pallet::set_thread_availability_period`].
**/
setThreadAvailabilityPeriod: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/** /**
* See [`Pallet::set_validation_upgrade_cooldown`]. * See [`Pallet::set_validation_upgrade_cooldown`].
**/ **/
@@ -407,36 +411,6 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
[key: string]: SubmittableExtrinsicFunction<ApiType>; [key: string]: SubmittableExtrinsicFunction<ApiType>;
}; };
council: {
/**
* See [`Pallet::close`].
**/
close: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, SpWeightsWeightV2Weight, Compact<u32>]>;
/**
* See [`Pallet::disapprove_proposal`].
**/
disapproveProposal: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
/**
* See [`Pallet::execute`].
**/
execute: AugmentedSubmittable<(proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Compact<u32>]>;
/**
* See [`Pallet::propose`].
**/
propose: AugmentedSubmittable<(threshold: Compact<u32> | AnyNumber | Uint8Array, proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Call, Compact<u32>]>;
/**
* See [`Pallet::set_members`].
**/
setMembers: AugmentedSubmittable<(newMembers: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], prime: Option<AccountId32> | null | Uint8Array | AccountId32 | string, oldCount: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, Option<AccountId32>, u32]>;
/**
* See [`Pallet::vote`].
**/
vote: AugmentedSubmittable<(proposal: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, approve: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, bool]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
crowdloan: { crowdloan: {
/** /**
* See [`Pallet::add_memo`]. * See [`Pallet::add_memo`].
@@ -479,88 +453,6 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
[key: string]: SubmittableExtrinsicFunction<ApiType>; [key: string]: SubmittableExtrinsicFunction<ApiType>;
}; };
democracy: {
/**
* See [`Pallet::blacklist`].
**/
blacklist: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, maybeRefIndex: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [H256, Option<u32>]>;
/**
* See [`Pallet::cancel_proposal`].
**/
cancelProposal: AugmentedSubmittable<(propIndex: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* See [`Pallet::cancel_referendum`].
**/
cancelReferendum: AugmentedSubmittable<(refIndex: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* See [`Pallet::clear_public_proposals`].
**/
clearPublicProposals: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* See [`Pallet::delegate`].
**/
delegate: AugmentedSubmittable<(to: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, conviction: PalletDemocracyConviction | 'None' | 'Locked1x' | 'Locked2x' | 'Locked3x' | 'Locked4x' | 'Locked5x' | 'Locked6x' | number | Uint8Array, balance: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, PalletDemocracyConviction, u128]>;
/**
* See [`Pallet::emergency_cancel`].
**/
emergencyCancel: AugmentedSubmittable<(refIndex: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* See [`Pallet::external_propose`].
**/
externalPropose: AugmentedSubmittable<(proposal: FrameSupportPreimagesBounded | { Legacy: any } | { Inline: any } | { Lookup: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [FrameSupportPreimagesBounded]>;
/**
* See [`Pallet::external_propose_default`].
**/
externalProposeDefault: AugmentedSubmittable<(proposal: FrameSupportPreimagesBounded | { Legacy: any } | { Inline: any } | { Lookup: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [FrameSupportPreimagesBounded]>;
/**
* See [`Pallet::external_propose_majority`].
**/
externalProposeMajority: AugmentedSubmittable<(proposal: FrameSupportPreimagesBounded | { Legacy: any } | { Inline: any } | { Lookup: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [FrameSupportPreimagesBounded]>;
/**
* See [`Pallet::fast_track`].
**/
fastTrack: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, votingPeriod: u32 | AnyNumber | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, u32, u32]>;
/**
* See [`Pallet::propose`].
**/
propose: AugmentedSubmittable<(proposal: FrameSupportPreimagesBounded | { Legacy: any } | { Inline: any } | { Lookup: any } | string | Uint8Array, value: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [FrameSupportPreimagesBounded, Compact<u128>]>;
/**
* See [`Pallet::remove_other_vote`].
**/
removeOtherVote: AugmentedSubmittable<(target: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u32]>;
/**
* See [`Pallet::remove_vote`].
**/
removeVote: AugmentedSubmittable<(index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* See [`Pallet::second`].
**/
second: AugmentedSubmittable<(proposal: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* See [`Pallet::set_metadata`].
**/
setMetadata: AugmentedSubmittable<(owner: PalletDemocracyMetadataOwner | { External: any } | { Proposal: any } | { Referendum: any } | string | Uint8Array, maybeHash: Option<H256> | null | Uint8Array | H256 | string) => SubmittableExtrinsic<ApiType>, [PalletDemocracyMetadataOwner, Option<H256>]>;
/**
* See [`Pallet::undelegate`].
**/
undelegate: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* See [`Pallet::unlock`].
**/
unlock: AugmentedSubmittable<(target: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* See [`Pallet::veto_external`].
**/
vetoExternal: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
/**
* See [`Pallet::vote`].
**/
vote: AugmentedSubmittable<(refIndex: Compact<u32> | AnyNumber | Uint8Array, vote: PalletDemocracyVoteAccountVote | { Standard: any } | { Split: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, PalletDemocracyVoteAccountVote]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
electionProviderMultiPhase: { electionProviderMultiPhase: {
/** /**
* See [`Pallet::governance_fallback`]. * See [`Pallet::governance_fallback`].
@@ -731,7 +623,7 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* See [`Pallet::heartbeat`]. * See [`Pallet::heartbeat`].
**/ **/
heartbeat: AugmentedSubmittable<(heartbeat: PalletImOnlineHeartbeat | { blockNumber?: any; networkState?: any; sessionIndex?: any; authorityIndex?: any; validatorsLen?: any } | string | Uint8Array, signature: PalletImOnlineSr25519AppSr25519Signature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature]>; heartbeat: AugmentedSubmittable<(heartbeat: PalletImOnlineHeartbeat | { blockNumber?: any; sessionIndex?: any; authorityIndex?: any; validatorsLen?: any } | string | Uint8Array, signature: PalletImOnlineSr25519AppSr25519Signature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature]>;
/** /**
* Generic tx * Generic tx
**/ **/
@@ -909,7 +801,7 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* See [`Pallet::enter`]. * See [`Pallet::enter`].
**/ **/
enter: AugmentedSubmittable<(data: PolkadotPrimitivesV4InherentData | { bitfields?: any; backedCandidates?: any; disputes?: any; parentHeader?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV4InherentData]>; enter: AugmentedSubmittable<(data: PolkadotPrimitivesV5InherentData | { bitfields?: any; backedCandidates?: any; disputes?: any; parentHeader?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV5InherentData]>;
/** /**
* Generic tx * Generic tx
**/ **/
@@ -940,10 +832,14 @@ declare module '@polkadot/api-base/types/submittable' {
* See [`Pallet::force_set_current_head`]. * See [`Pallet::force_set_current_head`].
**/ **/
forceSetCurrentHead: AugmentedSubmittable<(para: u32 | AnyNumber | Uint8Array, newHead: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>; forceSetCurrentHead: AugmentedSubmittable<(para: u32 | AnyNumber | Uint8Array, newHead: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>;
/**
* See [`Pallet::force_set_most_recent_context`].
**/
forceSetMostRecentContext: AugmentedSubmittable<(para: u32 | AnyNumber | Uint8Array, context: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
/** /**
* See [`Pallet::include_pvf_check_statement`]. * See [`Pallet::include_pvf_check_statement`].
**/ **/
includePvfCheckStatement: AugmentedSubmittable<(stmt: PolkadotPrimitivesV4PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV4ValidatorAppSignature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV4PvfCheckStatement, PolkadotPrimitivesV4ValidatorAppSignature]>; includePvfCheckStatement: AugmentedSubmittable<(stmt: PolkadotPrimitivesV5PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV5ValidatorAppSignature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV5PvfCheckStatement, PolkadotPrimitivesV5ValidatorAppSignature]>;
/** /**
* See [`Pallet::poke_unused_validation_code`]. * See [`Pallet::poke_unused_validation_code`].
**/ **/
@@ -973,37 +869,7 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* See [`Pallet::report_dispute_lost_unsigned`]. * See [`Pallet::report_dispute_lost_unsigned`].
**/ **/
reportDisputeLostUnsigned: AugmentedSubmittable<(disputeProof: PolkadotPrimitivesVstagingSlashingDisputeProof | { timeSlot?: any; kind?: any; validatorIndex?: any; validatorId?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesVstagingSlashingDisputeProof, SpSessionMembershipProof]>; reportDisputeLostUnsigned: AugmentedSubmittable<(disputeProof: PolkadotPrimitivesV5SlashingDisputeProof | { timeSlot?: any; kind?: any; validatorIndex?: any; validatorId?: any } | string | Uint8Array, keyOwnerProof: SpSessionMembershipProof | { session?: any; trieNodes?: any; validatorCount?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV5SlashingDisputeProof, SpSessionMembershipProof]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
phragmenElection: {
/**
* See [`Pallet::clean_defunct_voters`].
**/
cleanDefunctVoters: AugmentedSubmittable<(numVoters: u32 | AnyNumber | Uint8Array, numDefunct: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
/**
* See [`Pallet::remove_member`].
**/
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]>;
/**
* See [`Pallet::remove_voter`].
**/
removeVoter: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* See [`Pallet::renounce_candidacy`].
**/
renounceCandidacy: AugmentedSubmittable<(renouncing: PalletElectionsPhragmenRenouncing | { Member: any } | { RunnerUp: any } | { Candidate: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletElectionsPhragmenRenouncing]>;
/**
* See [`Pallet::submit_candidacy`].
**/
submitCandidacy: AugmentedSubmittable<(candidateCount: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* See [`Pallet::vote`].
**/
vote: AugmentedSubmittable<(votes: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], value: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, Compact<u128>]>;
/** /**
* Generic tx * Generic tx
**/ **/
@@ -1113,7 +979,7 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* See [`Pallet::submit`]. * See [`Pallet::submit`].
**/ **/
submit: AugmentedSubmittable<(proposalOrigin: PolkadotRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { Origins: any } | { ParachainsOrigin: any } | { XcmPallet: any } | string | Uint8Array, proposal: FrameSupportPreimagesBounded | { Legacy: any } | { Inline: any } | { Lookup: any } | string | Uint8Array, enactmentMoment: FrameSupportScheduleDispatchTime | { At: any } | { After: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotRuntimeOriginCaller, FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime]>; submit: AugmentedSubmittable<(proposalOrigin: PolkadotRuntimeOriginCaller | { system: any } | { Void: any } | { Origins: any } | { ParachainsOrigin: any } | { XcmPallet: any } | string | Uint8Array, proposal: FrameSupportPreimagesBounded | { Legacy: any } | { Inline: any } | { Lookup: any } | string | Uint8Array, enactmentMoment: FrameSupportScheduleDispatchTime | { At: any } | { After: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotRuntimeOriginCaller, FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime]>;
/** /**
* Generic tx * Generic tx
**/ **/
@@ -1371,70 +1237,6 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
[key: string]: SubmittableExtrinsicFunction<ApiType>; [key: string]: SubmittableExtrinsicFunction<ApiType>;
}; };
technicalCommittee: {
/**
* See [`Pallet::close`].
**/
close: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, SpWeightsWeightV2Weight, Compact<u32>]>;
/**
* See [`Pallet::disapprove_proposal`].
**/
disapproveProposal: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
/**
* See [`Pallet::execute`].
**/
execute: AugmentedSubmittable<(proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Compact<u32>]>;
/**
* See [`Pallet::propose`].
**/
propose: AugmentedSubmittable<(threshold: Compact<u32> | AnyNumber | Uint8Array, proposal: Call | IMethod | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Call, Compact<u32>]>;
/**
* See [`Pallet::set_members`].
**/
setMembers: AugmentedSubmittable<(newMembers: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], prime: Option<AccountId32> | null | Uint8Array | AccountId32 | string, oldCount: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, Option<AccountId32>, u32]>;
/**
* See [`Pallet::vote`].
**/
vote: AugmentedSubmittable<(proposal: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, approve: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, bool]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
technicalMembership: {
/**
* See [`Pallet::add_member`].
**/
addMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* See [`Pallet::change_key`].
**/
changeKey: AugmentedSubmittable<(updated: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* See [`Pallet::clear_prime`].
**/
clearPrime: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* See [`Pallet::remove_member`].
**/
removeMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* See [`Pallet::reset_members`].
**/
resetMembers: AugmentedSubmittable<(members: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>]>;
/**
* See [`Pallet::set_prime`].
**/
setPrime: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* See [`Pallet::swap_member`].
**/
swapMember: AugmentedSubmittable<(remove: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, add: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
timestamp: { timestamp: {
/** /**
* See [`Pallet::set`]. * See [`Pallet::set`].
@@ -1445,36 +1247,6 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
[key: string]: SubmittableExtrinsicFunction<ApiType>; [key: string]: SubmittableExtrinsicFunction<ApiType>;
}; };
tips: {
/**
* See [`Pallet::close_tip`].
**/
closeTip: AugmentedSubmittable<(hash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
/**
* See [`Pallet::report_awesome`].
**/
reportAwesome: AugmentedSubmittable<(reason: Bytes | string | Uint8Array, who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, MultiAddress]>;
/**
* See [`Pallet::retract_tip`].
**/
retractTip: AugmentedSubmittable<(hash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
/**
* See [`Pallet::slash_tip`].
**/
slashTip: AugmentedSubmittable<(hash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
/**
* See [`Pallet::tip`].
**/
tip: AugmentedSubmittable<(hash: H256 | string | Uint8Array, tipValue: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u128>]>;
/**
* See [`Pallet::tip_new`].
**/
tipNew: AugmentedSubmittable<(reason: Bytes | string | Uint8Array, who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, tipValue: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, MultiAddress, Compact<u128>]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
treasury: { treasury: {
/** /**
* See [`Pallet::approve_proposal`]. * See [`Pallet::approve_proposal`].
@@ -1517,7 +1289,7 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* See [`Pallet::dispatch_as`]. * See [`Pallet::dispatch_as`].
**/ **/
dispatchAs: AugmentedSubmittable<(asOrigin: PolkadotRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { Origins: any } | { ParachainsOrigin: any } | { XcmPallet: any } | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotRuntimeOriginCaller, Call]>; dispatchAs: AugmentedSubmittable<(asOrigin: PolkadotRuntimeOriginCaller | { system: any } | { Void: any } | { Origins: any } | { ParachainsOrigin: any } | { XcmPallet: any } | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotRuntimeOriginCaller, Call]>;
/** /**
* See [`Pallet::force_batch`]. * See [`Pallet::force_batch`].
**/ **/
@@ -1562,6 +1334,10 @@ declare module '@polkadot/api-base/types/submittable' {
* See [`Pallet::put_in_front_of`]. * See [`Pallet::put_in_front_of`].
**/ **/
putInFrontOf: AugmentedSubmittable<(lighter: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>; putInFrontOf: AugmentedSubmittable<(lighter: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* See [`Pallet::put_in_front_of_other`].
**/
putInFrontOfOther: AugmentedSubmittable<(heavier: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, lighter: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress]>;
/** /**
* See [`Pallet::rebag`]. * See [`Pallet::rebag`].
**/ **/
+118 -34
View File
@@ -9,7 +9,7 @@ import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { Codec, ITuple } from '@polkadot/types-codec/types'; import type { Codec, ITuple } from '@polkadot/types-codec/types';
import type { Perbill, Percent, Permill, Perquintill } from '@polkadot/types/interfaces/runtime'; import type { Perbill, Percent, Permill, Perquintill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletContractsSchedule, PalletReferendaTrackInfo, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup'; import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletContractsEnvironment, PalletContractsSchedule, PalletReferendaTrackInfo, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>; export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
@@ -142,6 +142,10 @@ declare module '@polkadot/api-base/types/consts' {
* Max number of authorities allowed * Max number of authorities allowed
**/ **/
maxAuthorities: u32 & AugmentedConst<ApiType>; maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of nominators for each validator.
**/
maxNominators: u32 & AugmentedConst<ApiType>;
/** /**
* Generic const * Generic const
**/ **/
@@ -228,6 +232,28 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
broker: {
/**
* Maximum number of legacy leases.
**/
maxLeasedCores: u32 & AugmentedConst<ApiType>;
/**
* Maximum number of system cores.
**/
maxReservedCores: u32 & AugmentedConst<ApiType>;
/**
* Identifier from which the internal Pot is generated.
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* Number of Relay-chain blocks per timeslice.
**/
timeslicePeriod: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
childBounties: { childBounties: {
/** /**
* Minimum value for a child-bounty. * Minimum value for a child-bounty.
@@ -243,6 +269,13 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec; [key: string]: Codec;
}; };
contracts: { contracts: {
/**
* The percentage of the storage deposit that should be held for using a code hash.
* Instantiating a contract, or calling [`chain_extension::Ext::add_delegate_dependency`]
* protects the code from being removed. In order to prevent abuse these actions are
* protected with a percentage of the code deposit.
**/
codeHashLockupDepositPercent: Perbill & AugmentedConst<ApiType>;
/** /**
* Fallback value to limit the storage deposit if it's not being set by the caller. * Fallback value to limit the storage deposit if it's not being set by the caller.
**/ **/
@@ -264,9 +297,14 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
depositPerItem: u128 & AugmentedConst<ApiType>; depositPerItem: u128 & AugmentedConst<ApiType>;
/** /**
* The maximum length of a contract code in bytes. This limit applies to the instrumented * Type that bundles together all the runtime configurable interface types.
* version of the code. Therefore `instantiate_with_code` can fail even when supplying *
* a wasm binary below this maximum size. * This is not a real config. We just mention the type here as constant so that
* its type appears in the metadata. Only valid value is `()`.
**/
environment: PalletContractsEnvironment & AugmentedConst<ApiType>;
/**
* The maximum length of a contract code in bytes.
* *
* The value should be chosen carefully taking into the account the overall memory limit * The value should be chosen carefully taking into the account the overall memory limit
* your runtime has, as well as the [maximum allowed callstack * your runtime has, as well as the [maximum allowed callstack
@@ -277,6 +315,11 @@ declare module '@polkadot/api-base/types/consts' {
* The maximum length of the debug buffer in bytes. * The maximum length of the debug buffer in bytes.
**/ **/
maxDebugBufferLen: u32 & AugmentedConst<ApiType>; maxDebugBufferLen: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of delegate_dependencies that a contract can lock with
* [`chain_extension::Ext::add_delegate_dependency`].
**/
maxDelegateDependencies: u32 & AugmentedConst<ApiType>;
/** /**
* The maximum allowable length in bytes for storage keys. * The maximum allowable length in bytes for storage keys.
**/ **/
@@ -419,16 +462,6 @@ declare module '@polkadot/api-base/types/consts' {
* "better" in the Unsigned phase. * "better" in the Unsigned phase.
**/ **/
betterUnsignedThreshold: Perbill & AugmentedConst<ApiType>; betterUnsignedThreshold: Perbill & AugmentedConst<ApiType>;
/**
* The maximum number of electable targets to put in the snapshot.
**/
maxElectableTargets: u16 & AugmentedConst<ApiType>;
/**
* The maximum number of electing voters to put in the snapshot. At the moment, snapshots
* are only over a single block, but once multi-block elections are introduced they will
* take place over multiple blocks.
**/
maxElectingVoters: u32 & AugmentedConst<ApiType>;
/** /**
* The maximum number of winners that can be elected by this `ElectionProvider` * The maximum number of winners that can be elected by this `ElectionProvider`
* implementation. * implementation.
@@ -582,6 +615,10 @@ declare module '@polkadot/api-base/types/consts' {
* Max Authorities in use * Max Authorities in use
**/ **/
maxAuthorities: u32 & AugmentedConst<ApiType>; maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of nominators for each validator.
**/
maxNominators: u32 & AugmentedConst<ApiType>;
/** /**
* The maximum number of entries to keep in the set id to session index mapping. * The maximum number of entries to keep in the set id to session index mapping.
* *
@@ -1083,6 +1120,45 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
safeMode: {
/**
* The amount that will be reserved upon calling [`Pallet::enter`].
*
* `None` disallows permissionlessly enabling the safe-mode and is a sane default.
**/
enterDepositAmount: Option<u128> & AugmentedConst<ApiType>;
/**
* For how many blocks the safe-mode will be entered by [`Pallet::enter`].
**/
enterDuration: u32 & AugmentedConst<ApiType>;
/**
* The amount that will be reserved upon calling [`Pallet::extend`].
*
* `None` disallows permissionlessly extending the safe-mode and is a sane default.
**/
extendDepositAmount: Option<u128> & AugmentedConst<ApiType>;
/**
* For how many blocks the safe-mode can be extended by each [`Pallet::extend`] call.
*
* This does not impose a hard limit as the safe-mode can be extended multiple times.
**/
extendDuration: u32 & AugmentedConst<ApiType>;
/**
* The minimal duration a deposit will remain reserved after safe-mode is entered or
* extended, unless [`Pallet::force_release_deposit`] is successfully called sooner.
*
* Every deposit is tied to a specific activation or extension, thus each deposit can be
* released independently after the delay for it has passed.
*
* `None` disallows permissionlessly releasing the safe-mode deposits and is a sane
* default.
**/
releaseDelay: Option<u32> & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
salary: { salary: {
/** /**
* The total budget per cycle. * The total budget per cycle.
@@ -1129,27 +1205,31 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec; [key: string]: Codec;
}; };
society: { society: {
/**
* The minimum amount of a deposit required for a bid to be made.
**/
candidateDeposit: u128 & AugmentedConst<ApiType>;
/** /**
* The number of blocks between membership challenges. * The number of blocks between membership challenges.
**/ **/
challengePeriod: u32 & AugmentedConst<ApiType>; challengePeriod: u32 & AugmentedConst<ApiType>;
/** /**
* The maximum number of candidates that we accept per round. * The number of blocks on which new candidates can claim their membership and be the
* named head.
**/ **/
maxCandidateIntake: u32 & AugmentedConst<ApiType>; claimPeriod: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of strikes before a member gets funds slashed.
**/
graceStrikes: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of bids at once.
**/
maxBids: u32 & AugmentedConst<ApiType>;
/** /**
* The maximum duration of the payout lock. * The maximum duration of the payout lock.
**/ **/
maxLockDuration: u32 & AugmentedConst<ApiType>; maxLockDuration: u32 & AugmentedConst<ApiType>;
/** /**
* The number of times a member may vote the wrong way (or not at all, when they are a * The maximum number of payouts a member may have waiting unclaimed.
* skeptic) before they become suspended.
**/ **/
maxStrikes: u32 & AugmentedConst<ApiType>; maxPayouts: u32 & AugmentedConst<ApiType>;
/** /**
* The societies's pallet id * The societies's pallet id
**/ **/
@@ -1159,14 +1239,10 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
periodSpend: u128 & AugmentedConst<ApiType>; periodSpend: u128 & AugmentedConst<ApiType>;
/** /**
* The number of blocks between candidate/membership rotation periods. * The number of blocks on which new candidates should be voted on. Together with
* `ClaimPeriod`, this sums to the number of blocks between candidate intake periods.
**/ **/
rotationPeriod: u32 & AugmentedConst<ApiType>; votingPeriod: u32 & AugmentedConst<ApiType>;
/**
* The amount of the unpaid reward that gets deducted in the case that either a skeptic
* doesn't vote or someone votes in the wrong way.
**/
wrongSideDeduction: u128 & AugmentedConst<ApiType>;
/** /**
* Generic const * Generic const
**/ **/
@@ -1200,10 +1276,6 @@ declare module '@polkadot/api-base/types/consts' {
* The test `reducing_history_depth_abrupt` shows this effect. * The test `reducing_history_depth_abrupt` shows this effect.
**/ **/
historyDepth: u32 & AugmentedConst<ApiType>; historyDepth: u32 & AugmentedConst<ApiType>;
/**
* Maximum number of nominations per nominator.
**/
maxNominations: u32 & AugmentedConst<ApiType>;
/** /**
* The maximum number of nominators rewarded for each validator. * The maximum number of nominators rewarded for each validator.
* *
@@ -1452,6 +1524,18 @@ declare module '@polkadot/api-base/types/consts' {
**/ **/
[key: string]: Codec; [key: string]: Codec;
}; };
txPause: {
/**
* Maximum length for pallet name and call name SCALE encoded string names.
*
* TOO LONG NAMES WILL BE TREATED AS PAUSED.
**/
maxNameLen: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
uniques: { uniques: {
/** /**
* The basic amount of funds that must be reserved when adding an attribute to an item. * The basic amount of funds that must be reserved when adding an attribute to an item.
+303 -8
View File
@@ -131,6 +131,10 @@ declare module '@polkadot/api-base/types/errors' {
* Account is not a member * Account is not a member
**/ **/
NotMember: AugmentedError<ApiType>; NotMember: AugmentedError<ApiType>;
/**
* Prime account is not a member
**/
PrimeAccountNotMember: AugmentedError<ApiType>;
/** /**
* Proposal must exist * Proposal must exist
**/ **/
@@ -165,11 +169,16 @@ declare module '@polkadot/api-base/types/errors' {
* Provided amount should be greater than or equal to the existential deposit/asset's * Provided amount should be greater than or equal to the existential deposit/asset's
* minimal amount. * minimal amount.
**/ **/
AmountLessThanMinimal: AugmentedError<ApiType>; AmountOneLessThanMinimal: AugmentedError<ApiType>;
/** /**
* Desired amount can't be equal to the pool reserve. * Desired amount can't be equal to the pool reserve.
**/ **/
AmountOutTooHigh: AugmentedError<ApiType>; AmountOutTooHigh: AugmentedError<ApiType>;
/**
* Provided amount should be greater than or equal to the existential deposit/asset's
* minimal amount.
**/
AmountTwoLessThanMinimal: AugmentedError<ApiType>;
/** /**
* The minimal amount requirement for the first token in the pair wasn't met. * The minimal amount requirement for the first token in the pair wasn't met.
**/ **/
@@ -186,10 +195,20 @@ declare module '@polkadot/api-base/types/errors' {
* The minimal amount requirement for the second token in the pair wasn't met. * The minimal amount requirement for the second token in the pair wasn't met.
**/ **/
AssetTwoWithdrawalDidNotMeetMinimum: AugmentedError<ApiType>; AssetTwoWithdrawalDidNotMeetMinimum: AugmentedError<ApiType>;
/**
* Unable to find an element in an array/vec that should have one-to-one correspondence
* with another. For example, an array of assets constituting a `path` should have a
* corresponding array of `amounts` along the path.
**/
CorrespondenceError: AugmentedError<ApiType>;
/** /**
* Provided assets are equal. * Provided assets are equal.
**/ **/
EqualAssets: AugmentedError<ApiType>; EqualAssets: AugmentedError<ApiType>;
/**
* It was not possible to get or increment the Id of the pool.
**/
IncorrectPoolAssetId: AugmentedError<ApiType>;
/** /**
* Insufficient liquidity in the pool. * Insufficient liquidity in the pool.
**/ **/
@@ -243,6 +262,10 @@ declare module '@polkadot/api-base/types/errors' {
* minimal amount. * minimal amount.
**/ **/
ReserveLeftLessThanMinimal: AugmentedError<ApiType>; ReserveLeftLessThanMinimal: AugmentedError<ApiType>;
/**
* Provided asset is not supported for pool.
**/
UnsupportedAsset: AugmentedError<ApiType>;
/** /**
* Desired amount can't be zero. * Desired amount can't be zero.
**/ **/
@@ -268,7 +291,7 @@ declare module '@polkadot/api-base/types/errors' {
/** /**
* The given asset ID is unknown. * The given asset ID is unknown.
**/ **/
UnknownAssetId: AugmentedError<ApiType>; UnknownAssetKind: AugmentedError<ApiType>;
/** /**
* Generic error * Generic error
**/ **/
@@ -482,6 +505,127 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
broker: {
/**
* The lease expiry time has already passed.
**/
AlreadyExpired: AugmentedError<ApiType>;
/**
* The pivot mask for the interlacing is complete (and therefore not a strict subset).
**/
CompletePivot: AugmentedError<ApiType>;
/**
* The workplan of the pallet's state is invalid. This indicates a state corruption.
**/
CorruptWorkplan: AugmentedError<ApiType>;
/**
* The pivot mask for the interlacing is not contained within the region's interlace mask.
**/
ExteriorPivot: AugmentedError<ApiType>;
/**
* The workload assigned for renewal is incomplete. This is unexpected and indicates a
* logic error.
**/
IncompleteAssignment: AugmentedError<ApiType>;
/**
* The configuration could not be applied because it is invalid.
**/
InvalidConfig: AugmentedError<ApiType>;
/**
* The history item does not exist.
**/
NoHistory: AugmentedError<ApiType>;
/**
* There is no sale happening currently.
**/
NoSales: AugmentedError<ApiType>;
/**
* Invalid attempt to renew.
**/
NotAllowed: AugmentedError<ApiType>;
/**
* There is no work to be done.
**/
NothingToDo: AugmentedError<ApiType>;
/**
* The owner of the region is not the origin.
**/
NotOwner: AugmentedError<ApiType>;
/**
* The price limit is exceeded.
**/
Overpriced: AugmentedError<ApiType>;
/**
* The pivot point of the partition at the beginning of the region.
**/
PivotTooEarly: AugmentedError<ApiType>;
/**
* The pivot point of the partition at or after the end of the region.
**/
PivotTooLate: AugmentedError<ApiType>;
/**
* The sale limit has been reached.
**/
SoldOut: AugmentedError<ApiType>;
/**
* An item cannot be dropped because it is still valid.
**/
StillValid: AugmentedError<ApiType>;
/**
* The purchase cannot happen yet as the sale period is yet to begin.
**/
TooEarly: AugmentedError<ApiType>;
/**
* The maximum amount of leases has already been reached.
**/
TooManyLeases: AugmentedError<ApiType>;
/**
* The maximum amount of reservations has already been reached.
**/
TooManyReservations: AugmentedError<ApiType>;
/**
* There are no cores available.
**/
Unavailable: AugmentedError<ApiType>;
/**
* This pallet has not yet been initialized.
**/
Uninitialized: AugmentedError<ApiType>;
/**
* The identified contribution to the Instantaneous Core Pool is unknown.
**/
UnknownContribution: AugmentedError<ApiType>;
/**
* The given region identity is not known.
**/
UnknownRegion: AugmentedError<ApiType>;
/**
* The renewal record cannot be found.
**/
UnknownRenewal: AugmentedError<ApiType>;
/**
* No reservation of the given index exists.
**/
UnknownReservation: AugmentedError<ApiType>;
/**
* The revenue for the Instantaneous Core Sales of this period is not (yet) known and thus
* this operation cannot proceed.
**/
UnknownRevenue: AugmentedError<ApiType>;
/**
* The pivot mask for the interlacing is void (and therefore unschedulable).
**/
VoidPivot: AugmentedError<ApiType>;
/**
* The renewal operation is not valid at the current time (it may become valid in the next
* sale).
**/
WrongTime: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
childBounties: { childBounties: {
/** /**
* The bounty balance is not enough to add new child-bounty. * The bounty balance is not enough to add new child-bounty.
@@ -501,6 +645,14 @@ declare module '@polkadot/api-base/types/errors' {
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
contracts: { contracts: {
/**
* Can not add a delegate dependency to the code hash of the contract itself.
**/
CannotAddSelfAsDelegateDependency: AugmentedError<ApiType>;
/**
* No code info could be found at the supplied code hash.
**/
CodeInfoNotFound: AugmentedError<ApiType>;
/** /**
* Code removal was denied because the code is still in use by at least one contract. * Code removal was denied because the code is still in use by at least one contract.
**/ **/
@@ -510,7 +662,7 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
CodeNotFound: AugmentedError<ApiType>; CodeNotFound: AugmentedError<ApiType>;
/** /**
* The contract's code was found to be invalid during validation or instrumentation. * The contract's code was found to be invalid during validation.
* *
* The most likely cause of this is that an API was used which is not supported by the * The most likely cause of this is that an API was used which is not supported by the
* node. This happens if an older node is used with a new version of ink!. Try updating * node. This happens if an older node is used with a new version of ink!. Try updating
@@ -544,6 +696,14 @@ declare module '@polkadot/api-base/types/errors' {
* Input passed to a contract API function failed to decode as expected type. * Input passed to a contract API function failed to decode as expected type.
**/ **/
DecodingFailed: AugmentedError<ApiType>; DecodingFailed: AugmentedError<ApiType>;
/**
* The contract already depends on the given delegate dependency.
**/
DelegateDependencyAlreadyExists: AugmentedError<ApiType>;
/**
* The dependency was not found in the contract's delegate dependencies.
**/
DelegateDependencyNotFound: AugmentedError<ApiType>;
/** /**
* A contract with the same AccountId already exists. * A contract with the same AccountId already exists.
**/ **/
@@ -561,14 +721,18 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
InvalidCallFlags: AugmentedError<ApiType>; InvalidCallFlags: AugmentedError<ApiType>;
/** /**
* A new schedule must have a greater version than the current one. * Invalid schedule supplied, e.g. with zero weight of a basic operation.
**/ **/
InvalidScheduleVersion: AugmentedError<ApiType>; InvalidSchedule: AugmentedError<ApiType>;
/** /**
* Performing a call was denied because the calling depth reached the limit * Performing a call was denied because the calling depth reached the limit
* of what is specified in the schedule. * of what is specified in the schedule.
**/ **/
MaxCallDepthReached: AugmentedError<ApiType>; MaxCallDepthReached: AugmentedError<ApiType>;
/**
* The contract has reached its maximum number of delegate dependencies.
**/
MaxDelegateDependenciesReached: AugmentedError<ApiType>;
/** /**
* A pending migration needs to complete before the extrinsic can be called. * A pending migration needs to complete before the extrinsic can be called.
**/ **/
@@ -759,6 +923,10 @@ declare module '@polkadot/api-base/types/errors' {
* Account is not a member * Account is not a member
**/ **/
NotMember: AugmentedError<ApiType>; NotMember: AugmentedError<ApiType>;
/**
* Prime account is not a member
**/
PrimeAccountNotMember: AugmentedError<ApiType>;
/** /**
* Proposal must exist * Proposal must exist
**/ **/
@@ -1066,6 +1234,10 @@ declare module '@polkadot/api-base/types/errors' {
* Set `witness_count` to `Some` to bypass this error. * Set `witness_count` to `Some` to bypass this error.
**/ **/
AlreadyInitialized: AugmentedError<ApiType>; AlreadyInitialized: AugmentedError<ApiType>;
/**
* The limit was over [`crate::RESOURCE_HARD_LIMIT`].
**/
InsaneLimit: AugmentedError<ApiType>;
/** /**
* Generic error * Generic error
**/ **/
@@ -1285,6 +1457,12 @@ declare module '@polkadot/api-base/types/errors' {
* The message is queued for future execution. * The message is queued for future execution.
**/ **/
Queued: AugmentedError<ApiType>; Queued: AugmentedError<ApiType>;
/**
* The queue is paused and no message can be executed from it.
*
* This can change at any time and may resolve in the future by re-trying.
**/
QueuePaused: AugmentedError<ApiType>;
/** /**
* This message is temporarily unprocessable. * This message is temporarily unprocessable.
* *
@@ -1660,6 +1838,10 @@ declare module '@polkadot/api-base/types/errors' {
* Not enough blocks have surpassed since the last commission update. * Not enough blocks have surpassed since the last commission update.
**/ **/
CommissionChangeThrottled: AugmentedError<ApiType>; CommissionChangeThrottled: AugmentedError<ApiType>;
/**
* The supplied commission exceeds global maximum commission.
**/
CommissionExceedsGlobalMaximum: AugmentedError<ApiType>;
/** /**
* The supplied commission exceeds the max allowed commission. * The supplied commission exceeds the max allowed commission.
**/ **/
@@ -2167,6 +2349,40 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
safeMode: {
/**
* The account already has a deposit reserved and can therefore not enter or extend again.
**/
AlreadyDeposited: AugmentedError<ApiType>;
/**
* This deposit cannot be released yet.
**/
CannotReleaseYet: AugmentedError<ApiType>;
/**
* An error from the underlying `Currency`.
**/
CurrencyError: AugmentedError<ApiType>;
/**
* The safe-mode is (already or still) entered.
**/
Entered: AugmentedError<ApiType>;
/**
* The safe-mode is (already or still) exited.
**/
Exited: AugmentedError<ApiType>;
/**
* There is no balance reserved.
**/
NoDeposit: AugmentedError<ApiType>;
/**
* This functionality of the pallet is disabled by the configuration.
**/
NotConfigured: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
salary: { salary: {
/** /**
* The account is already inducted. * The account is already inducted.
@@ -2287,6 +2503,10 @@ declare module '@polkadot/api-base/types/errors' {
* User is already a candidate. * User is already a candidate.
**/ **/
AlreadyCandidate: AugmentedError<ApiType>; AlreadyCandidate: AugmentedError<ApiType>;
/**
* The member is already elevated to this rank.
**/
AlreadyElevated: AugmentedError<ApiType>;
/** /**
* Society already founded. * Society already founded.
**/ **/
@@ -2295,14 +2515,22 @@ declare module '@polkadot/api-base/types/errors' {
* User is already a member. * User is already a member.
**/ **/
AlreadyMember: AugmentedError<ApiType>; AlreadyMember: AugmentedError<ApiType>;
/**
* The skeptic has already been punished for this offence.
**/
AlreadyPunished: AugmentedError<ApiType>;
/** /**
* Member is already vouching or banned from vouching again. * Member is already vouching or banned from vouching again.
**/ **/
AlreadyVouching: AugmentedError<ApiType>; AlreadyVouching: AugmentedError<ApiType>;
/** /**
* An incorrect position was provided. * The candidacy cannot be dropped as the candidate was clearly approved.
**/ **/
BadPosition: AugmentedError<ApiType>; Approved: AugmentedError<ApiType>;
/**
* The skeptic need not vote on candidates from expired rounds.
**/
Expired: AugmentedError<ApiType>;
/** /**
* Cannot remove the founder. * Cannot remove the founder.
**/ **/
@@ -2311,6 +2539,14 @@ declare module '@polkadot/api-base/types/errors' {
* Cannot remove the head of the chain. * Cannot remove the head of the chain.
**/ **/
Head: AugmentedError<ApiType>; Head: AugmentedError<ApiType>;
/**
* The candidacy cannot be concluded as the voting is still in progress.
**/
InProgress: AugmentedError<ApiType>;
/**
* Funds are insufficient to pay off society debts.
**/
InsufficientFunds: AugmentedError<ApiType>;
/** /**
* Not enough in pot to accept candidate. * Not enough in pot to accept candidate.
**/ **/
@@ -2319,10 +2555,22 @@ declare module '@polkadot/api-base/types/errors' {
* Too many members in the society. * Too many members in the society.
**/ **/
MaxMembers: AugmentedError<ApiType>; MaxMembers: AugmentedError<ApiType>;
/**
* There is no defender currently.
**/
NoDefender: AugmentedError<ApiType>;
/** /**
* Nothing to payout. * Nothing to payout.
**/ **/
NoPayout: AugmentedError<ApiType>; NoPayout: AugmentedError<ApiType>;
/**
* The membership cannot be claimed as the candidate was not clearly approved.
**/
NotApproved: AugmentedError<ApiType>;
/**
* User is not a bidder.
**/
NotBidder: AugmentedError<ApiType>;
/** /**
* User is not a candidate. * User is not a candidate.
**/ **/
@@ -2331,6 +2579,10 @@ declare module '@polkadot/api-base/types/errors' {
* The caller is not the founder. * The caller is not the founder.
**/ **/
NotFounder: AugmentedError<ApiType>; NotFounder: AugmentedError<ApiType>;
/**
* Group doesn't exist.
**/
NotGroup: AugmentedError<ApiType>;
/** /**
* The caller is not the head. * The caller is not the head.
**/ **/
@@ -2339,6 +2591,10 @@ declare module '@polkadot/api-base/types/errors' {
* User is not a member. * User is not a member.
**/ **/
NotMember: AugmentedError<ApiType>; NotMember: AugmentedError<ApiType>;
/**
* The candidate cannot be kicked as the candidate was not clearly rejected.
**/
NotRejected: AugmentedError<ApiType>;
/** /**
* User is not suspended. * User is not suspended.
**/ **/
@@ -2346,11 +2602,27 @@ declare module '@polkadot/api-base/types/errors' {
/** /**
* Member is not vouching. * Member is not vouching.
**/ **/
NotVouching: AugmentedError<ApiType>; NotVouchingOnBidder: AugmentedError<ApiType>;
/**
* The candidate/defender has no stale votes to remove.
**/
NoVotes: AugmentedError<ApiType>;
/**
* The candidacy cannot be bestowed as the candidate was clearly rejected.
**/
Rejected: AugmentedError<ApiType>;
/** /**
* User is suspended. * User is suspended.
**/ **/
Suspended: AugmentedError<ApiType>; Suspended: AugmentedError<ApiType>;
/**
* The candidacy cannot be pruned until a full additional intake period has passed.
**/
TooEarly: AugmentedError<ApiType>;
/**
* The skeptic already voted.
**/
Voted: AugmentedError<ApiType>;
/** /**
* Generic error * Generic error
**/ **/
@@ -2563,6 +2835,10 @@ declare module '@polkadot/api-base/types/errors' {
* Account is not a member * Account is not a member
**/ **/
NotMember: AugmentedError<ApiType>; NotMember: AugmentedError<ApiType>;
/**
* Prime account is not a member
**/
PrimeAccountNotMember: AugmentedError<ApiType>;
/** /**
* Proposal must exist * Proposal must exist
**/ **/
@@ -2725,6 +3001,25 @@ declare module '@polkadot/api-base/types/errors' {
**/ **/
[key: string]: AugmentedError<ApiType>; [key: string]: AugmentedError<ApiType>;
}; };
txPause: {
/**
* The call is paused.
**/
IsPaused: AugmentedError<ApiType>;
/**
* The call is unpaused.
**/
IsUnpaused: AugmentedError<ApiType>;
NotFound: AugmentedError<ApiType>;
/**
* The call is whitelisted and cannot be paused.
**/
Unpausable: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
uniques: { uniques: {
/** /**
* The item ID has already been used for an item. * The item ID has already been used for an item.
+222 -16
View File
@@ -9,7 +9,7 @@ import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { ITuple } from '@polkadot/types-codec/types'; import type { ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, H256, Perbill, Permill, Perquintill } from '@polkadot/types/interfaces/runtime'; import type { AccountId32, H256, Perbill, Permill, Perquintill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportMessagesProcessMessageError, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, KitchensinkRuntimeProxyType, PalletAllianceCid, PalletAllianceUnscrupulousItem, PalletAssetConversionNativeOrAssetId, PalletContractsOrigin, PalletConvictionVotingTally, PalletCoreFellowshipParamsType, PalletCoreFellowshipWish, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNftsAttributeNamespace, PalletNftsPalletAttributes, PalletNftsPriceWithDirection, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletStakingExposure, PalletStakingForcing, PalletStakingValidatorPrefs, PalletStateTrieMigrationError, PalletStateTrieMigrationMigrationCompute, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpStatementStoreStatement, SpWeightsWeightV2Weight } from '@polkadot/types/lookup'; import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportMessagesProcessMessageError, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, KitchensinkRuntimeProxyType, PalletAllianceCid, PalletAllianceUnscrupulousItem, PalletAssetConversionNativeOrAssetId, PalletBrokerCoretimeInterfaceCoreAssignment, PalletBrokerRegionId, PalletBrokerScheduleItem, PalletContractsOrigin, PalletConvictionVotingTally, PalletCoreFellowshipParamsType, PalletCoreFellowshipWish, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletElectionProviderMultiPhasePhase, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNftsAttributeNamespace, PalletNftsPalletAttributes, PalletNftsPriceWithDirection, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletSafeModeExitReason, PalletSocietyGroupParams, PalletStakingExposure, PalletStakingForcing, PalletStakingValidatorPrefs, PalletStateTrieMigrationError, PalletStateTrieMigrationMigrationCompute, SpConsensusGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpStatementStoreStatement, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>; export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
@@ -121,7 +121,7 @@ declare module '@polkadot/api-base/types/events' {
/** /**
* A successful call of the `CretaPool` extrinsic will create this event. * A successful call of the `CretaPool` extrinsic will create this event.
**/ **/
PoolCreated: AugmentedEvent<ApiType, [creator: AccountId32, poolId: ITuple<[PalletAssetConversionNativeOrAssetId, PalletAssetConversionNativeOrAssetId]>, lpToken: u32], { creator: AccountId32, poolId: ITuple<[PalletAssetConversionNativeOrAssetId, PalletAssetConversionNativeOrAssetId]>, lpToken: u32 }>; PoolCreated: AugmentedEvent<ApiType, [creator: AccountId32, poolId: ITuple<[PalletAssetConversionNativeOrAssetId, PalletAssetConversionNativeOrAssetId]>, poolAccount: AccountId32, lpToken: u32], { creator: AccountId32, poolId: ITuple<[PalletAssetConversionNativeOrAssetId, PalletAssetConversionNativeOrAssetId]>, poolAccount: AccountId32, lpToken: u32 }>;
/** /**
* Assets have been converted from one to another. Both `SwapExactTokenForToken` * Assets have been converted from one to another. Both `SwapExactTokenForToken`
* and `SwapTokenForExactToken` will generate this event. * and `SwapTokenForExactToken` will generate this event.
@@ -136,10 +136,25 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
assetConversionTxPayment: {
/**
* A swap of the refund in native currency back to asset failed.
**/
AssetRefundFailed: AugmentedEvent<ApiType, [nativeAmountKept: u128], { nativeAmountKept: u128 }>;
/**
* A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,
* has been paid by `who` in an asset `asset_id`.
**/
AssetTxFeePaid: AugmentedEvent<ApiType, [who: AccountId32, actualFee: u128, tip: u128, assetId: u32], { who: AccountId32, actualFee: u128, tip: u128, assetId: u32 }>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
assetRate: { assetRate: {
AssetRateCreated: AugmentedEvent<ApiType, [assetId: u32, rate: u128], { assetId: u32, rate: u128 }>; AssetRateCreated: AugmentedEvent<ApiType, [assetKind: u32, rate: u128], { assetKind: u32, rate: u128 }>;
AssetRateRemoved: AugmentedEvent<ApiType, [assetId: u32], { assetId: u32 }>; AssetRateRemoved: AugmentedEvent<ApiType, [assetKind: u32], { assetKind: u32 }>;
AssetRateUpdated: AugmentedEvent<ApiType, [assetId: u32, old: u128, new_: u128], { assetId: u32, old: u128, new_: u128 }>; AssetRateUpdated: AugmentedEvent<ApiType, [assetKind: u32, old: u128, new_: u128], { assetKind: u32, old: u128, new_: u128 }>;
/** /**
* Generic event * Generic event
**/ **/
@@ -385,6 +400,125 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
broker: {
/**
* Some historical Instantaneous Core Pool payment record has been dropped.
**/
AllowedRenewalDropped: AugmentedEvent<ApiType, [when: u32, core: u16], { when: u32, core: u16 }>;
/**
* A Region has been assigned to a particular task.
**/
Assigned: AugmentedEvent<ApiType, [regionId: PalletBrokerRegionId, duration: u32, task: u32], { regionId: PalletBrokerRegionId, duration: u32, task: u32 }>;
/**
* Some historical Instantaneous Core Pool Revenue is ready for payout claims.
**/
ClaimsReady: AugmentedEvent<ApiType, [when: u32, systemPayout: u128, privatePayout: u128], { when: u32, systemPayout: u128, privatePayout: u128 }>;
/**
* Some historical Instantaneous Core Pool contribution record has been dropped.
**/
ContributionDropped: AugmentedEvent<ApiType, [regionId: PalletBrokerRegionId], { regionId: PalletBrokerRegionId }>;
/**
* A Core has been assigned to one or more tasks and/or the Pool on the Relay-chain.
**/
CoreAssigned: AugmentedEvent<ApiType, [core: u16, when: u32, assignment: Vec<ITuple<[PalletBrokerCoretimeInterfaceCoreAssignment, u16]>>], { core: u16, when: u32, assignment: Vec<ITuple<[PalletBrokerCoretimeInterfaceCoreAssignment, u16]>> }>;
/**
* The number of cores available for scheduling has changed.
**/
CoreCountChanged: AugmentedEvent<ApiType, [coreCount: u16], { coreCount: u16 }>;
/**
* A new number of cores has been requested.
**/
CoreCountRequested: AugmentedEvent<ApiType, [coreCount: u16], { coreCount: u16 }>;
/**
* Some Instantaneous Coretime Pool credit has been purchased.
**/
CreditPurchased: AugmentedEvent<ApiType, [who: AccountId32, beneficiary: AccountId32, amount: u128], { who: AccountId32, beneficiary: AccountId32, amount: u128 }>;
/**
* Some historical Instantaneous Core Pool payment record has been dropped.
**/
HistoryDropped: AugmentedEvent<ApiType, [when: u32, revenue: u128], { when: u32, revenue: u128 }>;
/**
* Some historical Instantaneous Core Pool payment record has been ignored because the
* timeslice was already known. Governance may need to intervene.
**/
HistoryIgnored: AugmentedEvent<ApiType, [when: u32, revenue: u128], { when: u32, revenue: u128 }>;
/**
* Some historical Instantaneous Core Pool payment record has been initialized.
**/
HistoryInitialized: AugmentedEvent<ApiType, [when: u32, privatePoolSize: u32, systemPoolSize: u32], { when: u32, privatePoolSize: u32, systemPoolSize: u32 }>;
/**
* A Region has been converted into two overlapping Regions each of lesser regularity.
**/
Interlaced: AugmentedEvent<ApiType, [oldRegionId: PalletBrokerRegionId, newRegionIds: ITuple<[PalletBrokerRegionId, PalletBrokerRegionId]>], { oldRegionId: PalletBrokerRegionId, newRegionIds: ITuple<[PalletBrokerRegionId, PalletBrokerRegionId]> }>;
/**
* A new lease has been created.
**/
Leased: AugmentedEvent<ApiType, [task: u32, until: u32], { task: u32, until: u32 }>;
/**
* A lease is about to end.
**/
LeaseEnding: AugmentedEvent<ApiType, [task: u32, when: u32], { task: u32, when: u32 }>;
/**
* A Region has been split into two non-overlapping Regions.
**/
Partitioned: AugmentedEvent<ApiType, [oldRegionId: PalletBrokerRegionId, newRegionIds: ITuple<[PalletBrokerRegionId, PalletBrokerRegionId]>], { oldRegionId: PalletBrokerRegionId, newRegionIds: ITuple<[PalletBrokerRegionId, PalletBrokerRegionId]> }>;
/**
* A Region has been added to the Instantaneous Coretime Pool.
**/
Pooled: AugmentedEvent<ApiType, [regionId: PalletBrokerRegionId, duration: u32], { regionId: PalletBrokerRegionId, duration: u32 }>;
/**
* A Region of Bulk Coretime has been purchased.
**/
Purchased: AugmentedEvent<ApiType, [who: AccountId32, regionId: PalletBrokerRegionId, price: u128, duration: u32], { who: AccountId32, regionId: PalletBrokerRegionId, price: u128, duration: u32 }>;
/**
* A Region has been dropped due to being out of date.
**/
RegionDropped: AugmentedEvent<ApiType, [regionId: PalletBrokerRegionId, duration: u32], { regionId: PalletBrokerRegionId, duration: u32 }>;
/**
* The workload of a core has become renewable.
**/
Renewable: AugmentedEvent<ApiType, [core: u16, price: u128, begin: u32, workload: Vec<PalletBrokerScheduleItem>], { core: u16, price: u128, begin: u32, workload: Vec<PalletBrokerScheduleItem> }>;
/**
* A workload has been renewed.
**/
Renewed: AugmentedEvent<ApiType, [who: AccountId32, price: u128, oldCore: u16, core: u16, begin: u32, duration: u32, workload: Vec<PalletBrokerScheduleItem>], { who: AccountId32, price: u128, oldCore: u16, core: u16, begin: u32, duration: u32, workload: Vec<PalletBrokerScheduleItem> }>;
/**
* A reservation for a workload has been cancelled.
**/
ReservationCancelled: AugmentedEvent<ApiType, [index: u32, workload: Vec<PalletBrokerScheduleItem>], { index: u32, workload: Vec<PalletBrokerScheduleItem> }>;
/**
* There is a new reservation for a workload.
**/
ReservationMade: AugmentedEvent<ApiType, [index: u32, workload: Vec<PalletBrokerScheduleItem>], { index: u32, workload: Vec<PalletBrokerScheduleItem> }>;
/**
* The act of claiming revenue has begun.
**/
RevenueClaimBegun: AugmentedEvent<ApiType, [region: PalletBrokerRegionId, maxTimeslices: u32], { region: PalletBrokerRegionId, maxTimeslices: u32 }>;
/**
* A particular timeslice has a non-zero claim.
**/
RevenueClaimItem: AugmentedEvent<ApiType, [when: u32, amount: u128], { when: u32, amount: u128 }>;
/**
* A revenue claim has (possibly only in part) been paid.
**/
RevenueClaimPaid: AugmentedEvent<ApiType, [who: AccountId32, amount: u128, next: Option<PalletBrokerRegionId>], { who: AccountId32, amount: u128, next: Option<PalletBrokerRegionId> }>;
/**
* A new sale has been initialized.
**/
SaleInitialized: AugmentedEvent<ApiType, [saleStart: u32, leadinLength: u32, startPrice: u128, regularPrice: u128, regionBegin: u32, regionEnd: u32, idealCoresSold: u16, coresOffered: u16], { saleStart: u32, leadinLength: u32, startPrice: u128, regularPrice: u128, regionBegin: u32, regionEnd: u32, idealCoresSold: u16, coresOffered: u16 }>;
/**
* The sale rotation has been started and a new sale is imminent.
**/
SalesStarted: AugmentedEvent<ApiType, [price: u128, coreCount: u16], { price: u128, coreCount: u16 }>;
/**
* Ownership of a Region has been transferred.
**/
Transferred: AugmentedEvent<ApiType, [regionId: PalletBrokerRegionId, duration: u32, oldOwner: AccountId32, owner: AccountId32], { regionId: PalletBrokerRegionId, duration: u32, oldOwner: AccountId32, owner: AccountId32 }>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
childBounties: { childBounties: {
/** /**
* A child-bounty is added. * A child-bounty is added.
@@ -421,11 +555,11 @@ declare module '@polkadot/api-base/types/events' {
/** /**
* A code with the specified hash was removed. * A code with the specified hash was removed.
**/ **/
CodeRemoved: AugmentedEvent<ApiType, [codeHash: H256], { codeHash: H256 }>; CodeRemoved: AugmentedEvent<ApiType, [codeHash: H256, depositReleased: u128, remover: AccountId32], { codeHash: H256, depositReleased: u128, remover: AccountId32 }>;
/** /**
* Code with the specified hash has been stored. * Code with the specified hash has been stored.
**/ **/
CodeStored: AugmentedEvent<ApiType, [codeHash: H256], { codeHash: H256 }>; CodeStored: AugmentedEvent<ApiType, [codeHash: H256, depositHeld: u128, uploader: AccountId32], { codeHash: H256, depositHeld: u128, uploader: AccountId32 }>;
/** /**
* A contract's code was updated. * A contract's code was updated.
**/ **/
@@ -448,6 +582,14 @@ declare module '@polkadot/api-base/types/events' {
* Contract deployed by address at the specified address. * Contract deployed by address at the specified address.
**/ **/
Instantiated: AugmentedEvent<ApiType, [deployer: AccountId32, contract: AccountId32], { deployer: AccountId32, contract: AccountId32 }>; Instantiated: AugmentedEvent<ApiType, [deployer: AccountId32, contract: AccountId32], { deployer: AccountId32, contract: AccountId32 }>;
/**
* Some funds have been transferred and held as storage deposit.
**/
StorageDepositTransferredAndHeld: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, amount: u128], { from: AccountId32, to: AccountId32, amount: u128 }>;
/**
* Some storage deposit funds have been transferred and released.
**/
StorageDepositTransferredAndReleased: AugmentedEvent<ApiType, [from: AccountId32, to: AccountId32, amount: u128], { from: AccountId32, to: AccountId32, amount: u128 }>;
/** /**
* Contract has been removed. * Contract has been removed.
* *
@@ -748,7 +890,7 @@ declare module '@polkadot/api-base/types/events' {
/** /**
* The computation limit has been updated. * The computation limit has been updated.
**/ **/
ComputationLimitSet: AugmentedEvent<ApiType, [compute: Perbill], { compute: Perbill }>; ComputationLimitSet: AugmentedEvent<ApiType, [compute: u64], { compute: u64 }>;
/** /**
* The pallet has been (re)initialized. * The pallet has been (re)initialized.
**/ **/
@@ -756,7 +898,7 @@ declare module '@polkadot/api-base/types/events' {
/** /**
* The storage limit has been updated. * The storage limit has been updated.
**/ **/
StorageLimitSet: AugmentedEvent<ApiType, [storage: Perbill], { storage: Perbill }>; StorageLimitSet: AugmentedEvent<ApiType, [storage: u64], { storage: u64 }>;
/** /**
* Generic event * Generic event
**/ **/
@@ -1048,7 +1190,7 @@ declare module '@polkadot/api-base/types/events' {
/** /**
* Event gets emitted when the `NextCollectionId` gets incremented. * Event gets emitted when the `NextCollectionId` gets incremented.
**/ **/
NextCollectionIdIncremented: AugmentedEvent<ApiType, [nextId: u32], { nextId: u32 }>; NextCollectionIdIncremented: AugmentedEvent<ApiType, [nextId: Option<u32>], { nextId: Option<u32> }>;
/** /**
* The owner changed. * The owner changed.
**/ **/
@@ -1580,6 +1722,48 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
safeMode: {
/**
* Could not hold funds for entering or extending the safe-mode.
*
* This error comes from the underlying `Currency`.
**/
CannotDeposit: AugmentedEvent<ApiType, []>;
/**
* Could not release funds for entering or extending the safe-mode.
*
* This error comes from the underlying `Currency`.
**/
CannotRelease: AugmentedEvent<ApiType, []>;
/**
* An account reserved funds for either entering or extending the safe-mode.
**/
DepositPlaced: AugmentedEvent<ApiType, [account: AccountId32, amount: u128], { account: AccountId32, amount: u128 }>;
/**
* An account had a reserve released that was reserved.
**/
DepositReleased: AugmentedEvent<ApiType, [account: AccountId32, amount: u128], { account: AccountId32, amount: u128 }>;
/**
* An account had reserve slashed that was reserved.
**/
DepositSlashed: AugmentedEvent<ApiType, [account: AccountId32, amount: u128], { account: AccountId32, amount: u128 }>;
/**
* The safe-mode was entered until inclusively this block.
**/
Entered: AugmentedEvent<ApiType, [until: u32], { until: u32 }>;
/**
* Exited the safe-mode for a specific reason.
**/
Exited: AugmentedEvent<ApiType, [reason: PalletSafeModeExitReason], { reason: PalletSafeModeExitReason }>;
/**
* The safe-mode was extended until inclusively this block.
**/
Extended: AugmentedEvent<ApiType, [until: u32], { until: u32 }>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
salary: { salary: {
/** /**
* The next cycle begins. * The next cycle begins.
@@ -1669,6 +1853,10 @@ declare module '@polkadot/api-base/types/events' {
* Some funds were deposited into the society account. * Some funds were deposited into the society account.
**/ **/
Deposit: AugmentedEvent<ApiType, [value: u128], { value: u128 }>; Deposit: AugmentedEvent<ApiType, [value: u128], { value: u128 }>;
/**
* A \[member\] got elevated to \[rank\].
**/
Elevated: AugmentedEvent<ApiType, [member: AccountId32, rank: u32], { member: AccountId32, rank: u32 }>;
/** /**
* The society is founded by the given identity. * The society is founded by the given identity.
**/ **/
@@ -1683,13 +1871,9 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
MemberSuspended: AugmentedEvent<ApiType, [member: AccountId32], { member: AccountId32 }>; MemberSuspended: AugmentedEvent<ApiType, [member: AccountId32], { member: AccountId32 }>;
/** /**
* A new \[max\] member count has been set * A new set of \[params\] has been set for the group.
**/ **/
NewMaxMembers: AugmentedEvent<ApiType, [max: u32], { max: u32 }>; NewParams: AugmentedEvent<ApiType, [params: PalletSocietyGroupParams], { params: PalletSocietyGroupParams }>;
/**
* A group of members has been choosen as Skeptics
**/
SkepticsChosen: AugmentedEvent<ApiType, [skeptics: Vec<AccountId32>], { skeptics: Vec<AccountId32> }>;
/** /**
* A suspended member has been judged. * A suspended member has been judged.
**/ **/
@@ -1767,6 +1951,14 @@ declare module '@polkadot/api-base/types/events' {
* era as been reported. * era as been reported.
**/ **/
SlashReported: AugmentedEvent<ApiType, [validator: AccountId32, fraction: Perbill, slashEra: u32], { validator: AccountId32, fraction: Perbill, slashEra: u32 }>; SlashReported: AugmentedEvent<ApiType, [validator: AccountId32, fraction: Perbill, slashEra: u32], { validator: AccountId32, fraction: Perbill, slashEra: u32 }>;
/**
* Targets size limit reached.
**/
SnapshotTargetsSizeExceeded: AugmentedEvent<ApiType, [size_: u32], { size_: u32 }>;
/**
* Voters size limit reached.
**/
SnapshotVotersSizeExceeded: AugmentedEvent<ApiType, [size_: u32], { size_: u32 }>;
/** /**
* A new set of stakers was elected. * A new set of stakers was elected.
**/ **/
@@ -2037,6 +2229,20 @@ declare module '@polkadot/api-base/types/events' {
**/ **/
[key: string]: AugmentedEvent<ApiType>; [key: string]: AugmentedEvent<ApiType>;
}; };
txPause: {
/**
* This pallet, or a specific call is now paused.
**/
CallPaused: AugmentedEvent<ApiType, [fullName: ITuple<[Bytes, Bytes]>], { fullName: ITuple<[Bytes, Bytes]> }>;
/**
* This pallet, or a specific call is now unpaused.
**/
CallUnpaused: AugmentedEvent<ApiType, [fullName: ITuple<[Bytes, Bytes]>], { fullName: ITuple<[Bytes, Bytes]> }>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
uniques: { uniques: {
/** /**
* An approval for a `delegate` account to transfer the `item` of an item * An approval for a `delegate` account to transfer the `item` of an item
+150 -45
View File
@@ -7,10 +7,10 @@ import '@polkadot/api-base/types/storage';
import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types'; import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';
import type { Data } from '@polkadot/types'; import type { Data } from '@polkadot/types';
import type { BTreeSet, Bytes, Null, Option, Struct, U8aFixed, Vec, WrapperOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { BTreeSet, Bytes, Null, Option, Struct, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types'; import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime'; import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KitchensinkRuntimeRuntimeHoldReason, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceMemberRole, PalletAssetConversionNativeOrAssetId, PalletAssetConversionPoolInfo, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesIdAmount, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageContractInfo, PalletContractsStorageDeletionQueueManager, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletConvictionVotingVoteVoting, PalletCoreFellowshipMemberStatus, PalletCoreFellowshipParamsType, PalletCoreFellowshipWish, PalletDemocracyMetadataOwner, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMessageQueueBookState, PalletMessageQueuePage, PalletMultisigMultisig, PalletNftFractionalizationDetails, PalletNftsAttributeDeposit, PalletNftsAttributeNamespace, PalletNftsCollectionConfig, PalletNftsCollectionDetails, PalletNftsCollectionMetadata, PalletNftsItemConfig, PalletNftsItemDetails, PalletNftsItemMetadata, PalletNftsPendingSwap, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSalaryClaimantStatus, PalletSalaryStatusType, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata, PalletUniquesItemDetails, PalletUniquesItemMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup'; import type { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KitchensinkRuntimeRuntimeHoldReason, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceMemberRole, PalletAssetConversionNativeOrAssetId, PalletAssetConversionPoolInfo, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesIdAmount, PalletBalancesReserveData, PalletBountiesBounty, PalletBrokerAllowedRenewalId, PalletBrokerAllowedRenewalRecord, PalletBrokerConfigRecord, PalletBrokerContributionRecord, PalletBrokerInstaPoolHistoryRecord, PalletBrokerLeaseRecordItem, PalletBrokerPoolIoRecord, PalletBrokerRegionId, PalletBrokerRegionRecord, PalletBrokerSaleInfoRecord, PalletBrokerScheduleItem, PalletBrokerStatusRecord, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageContractInfo, PalletContractsStorageDeletionQueueManager, PalletContractsWasmCodeInfo, PalletConvictionVotingVoteVoting, PalletCoreFellowshipMemberStatus, PalletCoreFellowshipParamsType, PalletCoreFellowshipWish, PalletDemocracyMetadataOwner, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMessageQueueBookState, PalletMessageQueuePage, PalletMultisigMultisig, PalletNftFractionalizationDetails, PalletNftsAttributeDeposit, PalletNftsAttributeNamespace, PalletNftsCollectionConfig, PalletNftsCollectionDetails, PalletNftsCollectionMetadata, PalletNftsItemConfig, PalletNftsItemDetails, PalletNftsItemMetadata, PalletNftsPendingSwap, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSalaryClaimantStatus, PalletSalaryStatusType, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyCandidacy, PalletSocietyGroupParams, PalletSocietyIntakeRecord, PalletSocietyMemberRecord, PalletSocietyPayoutRecord, PalletSocietyTally, PalletSocietyVote, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata, PalletUniquesItemDetails, PalletUniquesItemMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
import type { Observable } from '@polkadot/types/types'; import type { Observable } from '@polkadot/types/types';
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>; export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
@@ -105,7 +105,7 @@ declare module '@polkadot/api-base/types/storage' {
/** /**
* Maps an asset to its fixed point representation in the native balance. * Maps an asset to its fixed point representation in the native balance.
* *
* E.g. `native_amount = asset_amount * ConversionRateToNative::<T>::get(asset_id)` * E.g. `native_amount = asset_amount * ConversionRateToNative::<T>::get(asset_kind)`
**/ **/
conversionRateToNative: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<u128>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>; conversionRateToNative: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<u128>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/** /**
@@ -357,6 +357,60 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
broker: {
/**
* Records of allowed renewals.
**/
allowedRenewals: AugmentedQuery<ApiType, (arg: PalletBrokerAllowedRenewalId | { core?: any; when?: any } | string | Uint8Array) => Observable<Option<PalletBrokerAllowedRenewalRecord>>, [PalletBrokerAllowedRenewalId]> & QueryableStorageEntry<ApiType, [PalletBrokerAllowedRenewalId]>;
/**
* The current configuration of this pallet.
**/
configuration: AugmentedQuery<ApiType, () => Observable<Option<PalletBrokerConfigRecord>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Record of a single contribution to the Instantaneous Coretime Pool.
**/
instaPoolContribution: AugmentedQuery<ApiType, (arg: PalletBrokerRegionId | { begin?: any; core?: any; mask?: any } | string | Uint8Array) => Observable<Option<PalletBrokerContributionRecord>>, [PalletBrokerRegionId]> & QueryableStorageEntry<ApiType, [PalletBrokerRegionId]>;
/**
* Total InstaPool rewards for each Timeslice and the number of core parts which contributed.
**/
instaPoolHistory: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletBrokerInstaPoolHistoryRecord>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Record of Coretime entering or leaving the Instantaneous Coretime Pool.
**/
instaPoolIo: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<PalletBrokerPoolIoRecord>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* The Polkadot Core legacy leases.
**/
leases: AugmentedQuery<ApiType, () => Observable<Vec<PalletBrokerLeaseRecordItem>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The current (unassigned) Regions.
**/
regions: AugmentedQuery<ApiType, (arg: PalletBrokerRegionId | { begin?: any; core?: any; mask?: any } | string | Uint8Array) => Observable<Option<PalletBrokerRegionRecord>>, [PalletBrokerRegionId]> & QueryableStorageEntry<ApiType, [PalletBrokerRegionId]>;
/**
* The Polkadot Core reservations (generally tasked with the maintenance of System Chains).
**/
reservations: AugmentedQuery<ApiType, () => Observable<Vec<Vec<PalletBrokerScheduleItem>>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The details of the current sale, including its properties and status.
**/
saleInfo: AugmentedQuery<ApiType, () => Observable<Option<PalletBrokerSaleInfoRecord>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The current status of miscellaneous subsystems of this pallet.
**/
status: AugmentedQuery<ApiType, () => Observable<Option<PalletBrokerStatusRecord>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The current workload of each core. This gets updated with workplan as timeslices pass.
**/
workload: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<Vec<PalletBrokerScheduleItem>>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
/**
* The work we plan on having each core do at a particular time in the future.
**/
workplan: AugmentedQuery<ApiType, (arg: ITuple<[u32, u16]> | [u32 | AnyNumber | Uint8Array, u16 | AnyNumber | Uint8Array]) => Observable<Option<Vec<PalletBrokerScheduleItem>>>, [ITuple<[u32, u16]>]> & QueryableStorageEntry<ApiType, [ITuple<[u32, u16]>]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
childBounties: { childBounties: {
/** /**
* Child bounties that have been added. * Child bounties that have been added.
@@ -386,9 +440,9 @@ declare module '@polkadot/api-base/types/storage' {
}; };
contracts: { contracts: {
/** /**
* A mapping between an original code hash and instrumented wasm code, ready for execution. * A mapping from a contract's code hash to its code info.
**/ **/
codeStorage: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<PalletContractsWasmPrefabWasmModule>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>; codeInfoOf: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<PalletContractsWasmCodeInfo>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
/** /**
* The code associated with a given account. * The code associated with a given account.
* *
@@ -407,6 +461,10 @@ declare module '@polkadot/api-base/types/storage' {
* and the latest deleted contract in queue. * and the latest deleted contract in queue.
**/ **/
deletionQueueCounter: AugmentedQuery<ApiType, () => Observable<PalletContractsStorageDeletionQueueManager>, []> & QueryableStorageEntry<ApiType, []>; deletionQueueCounter: AugmentedQuery<ApiType, () => Observable<PalletContractsStorageDeletionQueueManager>, []> & QueryableStorageEntry<ApiType, []>;
/**
* A migration can span across multiple blocks. This storage defines a cursor to track the
* progress of the migration, enabling us to resume from the last completed position.
**/
migrationInProgress: AugmentedQuery<ApiType, () => Observable<Option<Bytes>>, []> & QueryableStorageEntry<ApiType, []>; migrationInProgress: AugmentedQuery<ApiType, () => Observable<Option<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* This is a **monotonic** counter incremented on contract instantiation. * This is a **monotonic** counter incremented on contract instantiation.
@@ -434,11 +492,7 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
nonce: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>; nonce: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* A mapping between an original code hash and its owner information. * A mapping from a contract's code hash to its code.
**/
ownerInfoOf: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<PalletContractsWasmOwnerInfo>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
/**
* A mapping from an original code hash to the original code, untouched by instrumentation.
**/ **/
pristineCode: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<Bytes>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>; pristineCode: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<Bytes>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
/** /**
@@ -737,15 +791,19 @@ declare module '@polkadot/api-base/types/storage' {
}; };
glutton: { glutton: {
/** /**
* Storage value used to specify what percentage of the left over `ref_time` * The proportion of the remaining `ref_time` to consume during `on_idle`.
* to consume during `on_idle`. *
* `1.0` is mapped to `100%`. Must be at most [`crate::RESOURCE_HARD_LIMIT`]. Setting this to
* over `1.0` could stall the chain.
**/ **/
compute: AugmentedQuery<ApiType, () => Observable<Perbill>, []> & QueryableStorageEntry<ApiType, []>; compute: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* Storage value used the specify what percentage of left over `proof_size` * The proportion of the remaining `proof_size` to consume during `on_idle`.
* to consume during `on_idle`. *
* `1.0` is mapped to `100%`. Must be at most [`crate::RESOURCE_HARD_LIMIT`]. Setting this to
* over `1.0` could stall the chain.
**/ **/
storage: AugmentedQuery<ApiType, () => Observable<Perbill>, []> & QueryableStorageEntry<ApiType, []>; storage: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* Storage map used for wasting proof size. * Storage map used for wasting proof size.
* *
@@ -863,10 +921,9 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
keys: AugmentedQuery<ApiType, () => Observable<Vec<PalletImOnlineSr25519AppSr25519Public>>, []> & QueryableStorageEntry<ApiType, []>; keys: AugmentedQuery<ApiType, () => Observable<Vec<PalletImOnlineSr25519AppSr25519Public>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* For each session index, we keep a mapping of `SessionIndex` and `AuthIndex` to * For each session index, we keep a mapping of `SessionIndex` and `AuthIndex`.
* `WrapperOpaque<BoundedOpaqueNetworkState>`.
**/ **/
receivedHeartbeats: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<WrapperOpaque<PalletImOnlineBoundedOpaqueNetworkState>>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>; receivedHeartbeats: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<bool>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
/** /**
* Generic query * Generic query
**/ **/
@@ -1401,6 +1458,27 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
safeMode: {
/**
* Holds the reserve that was taken from an account at a specific block number.
*
* This helps governance to have an overview of outstanding deposits that should be returned or
* slashed.
**/
deposits: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<u128>>, [AccountId32, u32]> & QueryableStorageEntry<ApiType, [AccountId32, u32]>;
/**
* Contains the last block number that the safe-mode will remain entered in.
*
* Set to `None` when safe-mode is exited.
*
* Safe-mode is automatically exited when the current block number exceeds this value.
**/
enteredUntil: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
salary: { salary: {
/** /**
* The status of a claimant. * The status of a claimant.
@@ -1478,67 +1556,83 @@ declare module '@polkadot/api-base/types/storage' {
* The current bids, stored ordered by the value of the bid. * The current bids, stored ordered by the value of the bid.
**/ **/
bids: AugmentedQuery<ApiType, () => Observable<Vec<PalletSocietyBid>>, []> & QueryableStorageEntry<ApiType, []>; bids: AugmentedQuery<ApiType, () => Observable<Vec<PalletSocietyBid>>, []> & QueryableStorageEntry<ApiType, []>;
candidates: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletSocietyCandidacy>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/** /**
* The current set of candidates; bidders that are attempting to become members. * The number of challenge rounds there have been. Used to identify stale DefenderVotes.
**/ **/
candidates: AugmentedQuery<ApiType, () => Observable<Vec<PalletSocietyBid>>, []> & QueryableStorageEntry<ApiType, []>; challengeRoundCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The defending member currently being challenged. * Votes for the defender, keyed by challenge round.
**/ **/
defender: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>; defenderVotes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<PalletSocietyVote>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;
/** /**
* Votes for the defender. * The defending member currently being challenged, along with a running tally of votes.
**/ **/
defenderVotes: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletSocietyVote>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>; defending: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[AccountId32, AccountId32, PalletSocietyTally]>>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The first member. * The first member.
**/ **/
founder: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>; founder: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The most primary from the most recently approved members. * The most primary from the most recently approved rank 0 members in the society.
**/ **/
head: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>; head: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The current items in `Members` keyed by their unique index. Keys are densely populated
* `0..MemberCount` (does not include `MemberCount`).
**/
memberByIndex: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<AccountId32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* The number of items in `Members` currently. (Doesn't include `SuspendedMembers`.)
**/
memberCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The current members and their rank. Doesn't include `SuspendedMembers`.
**/
members: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletSocietyMemberRecord>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* At the end of the claim period, this contains the most recently approved members (along with
* their bid and round ID) who is from the most recent round with the lowest bid. They will
* become the new `Head`.
**/
nextHead: AugmentedQuery<ApiType, () => Observable<Option<PalletSocietyIntakeRecord>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The max number of members for the society at one time. * The max number of members for the society at one time.
**/ **/
maxMembers: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>; parameters: AugmentedQuery<ApiType, () => Observable<Option<PalletSocietyGroupParams>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The current set of members, ordered. * Information regarding rank-0 payouts, past and future.
**/ **/
members: AugmentedQuery<ApiType, () => Observable<Vec<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>; payouts: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletSocietyPayoutRecord>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* Pending payouts; ordered by block number, with the amount that should be paid out.
**/
payouts: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<ITuple<[u32, u128]>>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/** /**
* Amount of our account balance that is specifically for the next round's bid(s). * Amount of our account balance that is specifically for the next round's bid(s).
**/ **/
pot: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>; pot: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The number of rounds which have passed.
**/
roundCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* A hash of the rules of this society concerning membership. Can only be set once and * A hash of the rules of this society concerning membership. Can only be set once and
* only by the founder. * only by the founder.
**/ **/
rules: AugmentedQuery<ApiType, () => Observable<Option<H256>>, []> & QueryableStorageEntry<ApiType, []>; rules: AugmentedQuery<ApiType, () => Observable<Option<H256>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The ongoing number of losing votes cast by the member. * The current skeptic.
**/ **/
strikes: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<u32>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>; skeptic: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/** /**
* The set of suspended candidates. * The set of suspended members, with their old membership record.
**/ **/
suspendedCandidates: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<ITuple<[u128, PalletSocietyBidKind]>>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>; suspendedMembers: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletSocietyMemberRecord>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/** /**
* The set of suspended members. * Clear-cursor for Vote, map from Candidate -> (Maybe) Cursor.
**/ **/
suspendedMembers: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<bool>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>; voteClearCursor: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<Bytes>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/** /**
* Double map from Candidate -> Voter -> (Maybe) Vote. * Double map from Candidate -> Voter -> (Maybe) Vote.
**/ **/
votes: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<PalletSocietyVote>>, [AccountId32, AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32, AccountId32]>; votes: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<PalletSocietyVote>>, [AccountId32, AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32, AccountId32]>;
/**
* Members currently vouching or banned from vouching again
**/
vouching: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletSocietyVouchingStatus>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/** /**
* Generic query * Generic query
**/ **/
@@ -1704,7 +1798,8 @@ declare module '@polkadot/api-base/types/storage' {
* they wish to support. * they wish to support.
* *
* Note that the keys of this storage map might become non-decodable in case the * Note that the keys of this storage map might become non-decodable in case the
* [`Config::MaxNominations`] configuration is decreased. In this rare case, these nominators * account's [`NominationsQuota::MaxNominations`] configuration is decreased.
* In this rare case, these nominators
* are still existent in storage, their key is correct and retrievable (i.e. `contains_key` * are still existent in storage, their key is correct and retrievable (i.e. `contains_key`
* indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable * indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable
* nominators will effectively not-exist, until they re-submit their preferences such that it * nominators will effectively not-exist, until they re-submit their preferences such that it
@@ -1859,7 +1954,7 @@ declare module '@polkadot/api-base/types/storage' {
* allows light-clients to leverage the changes trie storage tracking mechanism and * allows light-clients to leverage the changes trie storage tracking mechanism and
* in case of changes fetch the list of events of interest. * in case of changes fetch the list of events of interest.
* *
* The value has the type `(T::BlockNumber, EventIndex)` because if we used only just * The value has the type `(BlockNumberFor<T>, EventIndex)` because if we used only just
* the `EventIndex` then in case if the topic has the same contents on the next block * the `EventIndex` then in case if the topic has the same contents on the next block
* no notification will be triggered thus the event might be lost. * no notification will be triggered thus the event might be lost.
**/ **/
@@ -2039,6 +2134,16 @@ declare module '@polkadot/api-base/types/storage' {
**/ **/
[key: string]: QueryableStorageEntry<ApiType>; [key: string]: QueryableStorageEntry<ApiType>;
}; };
txPause: {
/**
* The set of calls that are explicitly paused.
**/
pausedCalls: AugmentedQuery<ApiType, (arg: ITuple<[Bytes, Bytes]> | [Bytes | string | Uint8Array, Bytes | string | Uint8Array]) => Observable<Option<Null>>, [ITuple<[Bytes, Bytes]>]> & QueryableStorageEntry<ApiType, [ITuple<[Bytes, Bytes]>]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
uniques: { uniques: {
/** /**
* The items held by any given account; set out this way so that items owned by a single * The items held by any given account; set out this way so that items owned by a single
+21 -1
View File
@@ -6,7 +6,7 @@
import '@polkadot/api-base/types/calls'; import '@polkadot/api-base/types/calls';
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types'; import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, Vec, u32 } from '@polkadot/types-codec'; import type { Bytes, Null, Option, Result, Vec, bool, u128, u32 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types'; import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { TAssetBalance } from '@polkadot/types/interfaces/assets'; import type { TAssetBalance } from '@polkadot/types/interfaces/assets';
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe'; import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
@@ -25,6 +25,7 @@ import type { AccountId, Balance, Block, BlockNumber, Call, Hash, Header, Index,
import type { RuntimeVersion } from '@polkadot/types/interfaces/state'; import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system'; import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
import type { TransactionSource, TransactionValidity } from '@polkadot/types/interfaces/txqueue'; import type { TransactionSource, TransactionValidity } from '@polkadot/types/interfaces/txqueue';
import type { XcmV3MultiLocation } from '@polkadot/types/lookup';
import type { IExtrinsic, Observable } from '@polkadot/types/types'; import type { IExtrinsic, Observable } from '@polkadot/types/types';
export type __AugmentedCall<ApiType extends ApiTypes> = AugmentedCall<ApiType>; export type __AugmentedCall<ApiType extends ApiTypes> = AugmentedCall<ApiType>;
@@ -43,6 +44,25 @@ declare module '@polkadot/api-base/types/calls' {
**/ **/
[key: string]: DecoratedCallBase<ApiType>; [key: string]: DecoratedCallBase<ApiType>;
}; };
/** 0x8a8047a53a8277ec/1 */
assetConversionApi: {
/**
* Get pool reserves
**/
getReserves: AugmentedCall<ApiType, (asset1: XcmV3MultiLocation, asset2: XcmV3MultiLocation) => Observable<Option<ITuple<[Balance, Balance]>>>>;
/**
* Quote price: exact tokens for tokens
**/
quotePriceExactTokensForTokens: AugmentedCall<ApiType, (asset1: XcmV3MultiLocation, asset2: XcmV3MultiLocation, amount: u128 | AnyNumber | Uint8Array, include_fee: bool | boolean | Uint8Array) => Observable<Option<Balance>>>;
/**
* Quote price: tokens for exact tokens
**/
quotePriceTokensForExactTokens: AugmentedCall<ApiType, (asset1: XcmV3MultiLocation, asset2: XcmV3MultiLocation, amount: u128 | AnyNumber | Uint8Array, include_fee: bool | boolean | Uint8Array) => Observable<Option<Balance>>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x8453b50b22293977/1 */ /** 0x8453b50b22293977/1 */
assetsApi: { assetsApi: {
/** /**
+189 -19
View File
@@ -10,7 +10,7 @@ import type { Data } from '@polkadot/types';
import type { Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec'; import type { Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types'; import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime'; import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, KitchensinkRuntimeOriginCaller, KitchensinkRuntimeProxyType, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceDisbandWitness, PalletAllianceUnscrupulousItem, PalletAssetConversionNativeOrAssetId, PalletContractsWasmDeterminism, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletCoreFellowshipParamsType, PalletCoreFellowshipWish, PalletDemocracyConviction, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNftsAttributeNamespace, PalletNftsCancelAttributesApprovalWitness, PalletNftsCollectionConfig, PalletNftsDestroyWitness, PalletNftsItemConfig, PalletNftsItemTip, PalletNftsMintSettings, PalletNftsMintWitness, PalletNftsPreSignedAttributes, PalletNftsPreSignedMint, PalletNftsPriceWithDirection, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpPerbill, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof, SpWeightsWeightV2Weight } from '@polkadot/types/lookup'; import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, KitchensinkRuntimeOriginCaller, KitchensinkRuntimeProxyType, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceDisbandWitness, PalletAllianceUnscrupulousItem, PalletAssetConversionNativeOrAssetId, PalletBrokerConfigRecord, PalletBrokerCoreMask, PalletBrokerFinality, PalletBrokerRegionId, PalletBrokerScheduleItem, PalletContractsWasmDeterminism, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletCoreFellowshipParamsType, PalletCoreFellowshipWish, PalletDemocracyConviction, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNftsAttributeNamespace, PalletNftsCancelAttributesApprovalWitness, PalletNftsCollectionConfig, PalletNftsDestroyWitness, PalletNftsItemConfig, PalletNftsItemTip, PalletNftsMintSettings, PalletNftsMintWitness, PalletNftsPreSignedAttributes, PalletNftsPreSignedMint, PalletNftsPriceWithDirection, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpPerbill, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>; export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>; export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
@@ -152,15 +152,15 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* See [`Pallet::create`]. * See [`Pallet::create`].
**/ **/
create: AugmentedSubmittable<(assetId: u32 | AnyNumber | Uint8Array, rate: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u128]>; create: AugmentedSubmittable<(assetKind: u32 | AnyNumber | Uint8Array, rate: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u128]>;
/** /**
* See [`Pallet::remove`]. * See [`Pallet::remove`].
**/ **/
remove: AugmentedSubmittable<(assetId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>; remove: AugmentedSubmittable<(assetKind: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/** /**
* See [`Pallet::update`]. * See [`Pallet::update`].
**/ **/
update: AugmentedSubmittable<(assetId: u32 | AnyNumber | Uint8Array, rate: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u128]>; update: AugmentedSubmittable<(assetKind: u32 | AnyNumber | Uint8Array, rate: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u128]>;
/** /**
* Generic tx * Generic tx
**/ **/
@@ -402,6 +402,88 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
[key: string]: SubmittableExtrinsicFunction<ApiType>; [key: string]: SubmittableExtrinsicFunction<ApiType>;
}; };
broker: {
/**
* See [`Pallet::assign`].
**/
assign: AugmentedSubmittable<(regionId: PalletBrokerRegionId | { begin?: any; core?: any; mask?: any } | string | Uint8Array, task: u32 | AnyNumber | Uint8Array, finality: PalletBrokerFinality | 'Provisional' | 'Final' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletBrokerRegionId, u32, PalletBrokerFinality]>;
/**
* See [`Pallet::claim_revenue`].
**/
claimRevenue: AugmentedSubmittable<(regionId: PalletBrokerRegionId | { begin?: any; core?: any; mask?: any } | string | Uint8Array, maxTimeslices: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletBrokerRegionId, u32]>;
/**
* See [`Pallet::configure`].
**/
configure: AugmentedSubmittable<(config: PalletBrokerConfigRecord | { advanceNotice?: any; interludeLength?: any; leadinLength?: any; regionLength?: any; idealBulkProportion?: any; limitCoresOffered?: any; renewalBump?: any; contributionTimeout?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletBrokerConfigRecord]>;
/**
* See [`Pallet::drop_contribution`].
**/
dropContribution: AugmentedSubmittable<(regionId: PalletBrokerRegionId | { begin?: any; core?: any; mask?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletBrokerRegionId]>;
/**
* See [`Pallet::drop_history`].
**/
dropHistory: AugmentedSubmittable<(when: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* See [`Pallet::drop_region`].
**/
dropRegion: AugmentedSubmittable<(regionId: PalletBrokerRegionId | { begin?: any; core?: any; mask?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletBrokerRegionId]>;
/**
* See [`Pallet::drop_renewal`].
**/
dropRenewal: AugmentedSubmittable<(core: u16 | AnyNumber | Uint8Array, when: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, u32]>;
/**
* See [`Pallet::interlace`].
**/
interlace: AugmentedSubmittable<(regionId: PalletBrokerRegionId | { begin?: any; core?: any; mask?: any } | string | Uint8Array, pivot: PalletBrokerCoreMask | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletBrokerRegionId, PalletBrokerCoreMask]>;
/**
* See [`Pallet::partition`].
**/
partition: AugmentedSubmittable<(regionId: PalletBrokerRegionId | { begin?: any; core?: any; mask?: any } | string | Uint8Array, pivot: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletBrokerRegionId, u32]>;
/**
* See [`Pallet::pool`].
**/
pool: AugmentedSubmittable<(regionId: PalletBrokerRegionId | { begin?: any; core?: any; mask?: any } | string | Uint8Array, payee: AccountId32 | string | Uint8Array, finality: PalletBrokerFinality | 'Provisional' | 'Final' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletBrokerRegionId, AccountId32, PalletBrokerFinality]>;
/**
* See [`Pallet::purchase`].
**/
purchase: AugmentedSubmittable<(priceLimit: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128]>;
/**
* See [`Pallet::purchase_credit`].
**/
purchaseCredit: AugmentedSubmittable<(amount: u128 | AnyNumber | Uint8Array, beneficiary: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128, AccountId32]>;
/**
* See [`Pallet::renew`].
**/
renew: AugmentedSubmittable<(core: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16]>;
/**
* See [`Pallet::request_core_count`].
**/
requestCoreCount: AugmentedSubmittable<(coreCount: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16]>;
/**
* See [`Pallet::reserve`].
**/
reserve: AugmentedSubmittable<(workload: Vec<PalletBrokerScheduleItem> | (PalletBrokerScheduleItem | { mask?: any; assignment?: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<PalletBrokerScheduleItem>]>;
/**
* See [`Pallet::set_lease`].
**/
setLease: AugmentedSubmittable<(task: u32 | AnyNumber | Uint8Array, until: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
/**
* See [`Pallet::start_sales`].
**/
startSales: AugmentedSubmittable<(initialPrice: u128 | AnyNumber | Uint8Array, coreCount: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128, u16]>;
/**
* See [`Pallet::transfer`].
**/
transfer: AugmentedSubmittable<(regionId: PalletBrokerRegionId | { begin?: any; core?: any; mask?: any } | string | Uint8Array, newOwner: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletBrokerRegionId, AccountId32]>;
/**
* See [`Pallet::unreserve`].
**/
unreserve: AugmentedSubmittable<(itemIndex: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
childBounties: { childBounties: {
/** /**
* See [`Pallet::accept_curator`]. * See [`Pallet::accept_curator`].
@@ -748,11 +830,11 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* See [`Pallet::set_compute`]. * See [`Pallet::set_compute`].
**/ **/
setCompute: AugmentedSubmittable<(compute: Perbill | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Perbill]>; setCompute: AugmentedSubmittable<(compute: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64]>;
/** /**
* See [`Pallet::set_storage`]. * See [`Pallet::set_storage`].
**/ **/
setStorage: AugmentedSubmittable<(storage: Perbill | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Perbill]>; setStorage: AugmentedSubmittable<(storage: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64]>;
/** /**
* Generic tx * Generic tx
**/ **/
@@ -846,7 +928,7 @@ declare module '@polkadot/api-base/types/submittable' {
/** /**
* See [`Pallet::heartbeat`]. * See [`Pallet::heartbeat`].
**/ **/
heartbeat: AugmentedSubmittable<(heartbeat: PalletImOnlineHeartbeat | { blockNumber?: any; networkState?: any; sessionIndex?: any; authorityIndex?: any; validatorsLen?: any } | string | Uint8Array, signature: PalletImOnlineSr25519AppSr25519Signature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature]>; heartbeat: AugmentedSubmittable<(heartbeat: PalletImOnlineHeartbeat | { blockNumber?: any; sessionIndex?: any; authorityIndex?: any; validatorsLen?: any } | string | Uint8Array, signature: PalletImOnlineSr25519AppSr25519Signature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature]>;
/** /**
* Generic tx * Generic tx
**/ **/
@@ -1628,6 +1710,44 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
[key: string]: SubmittableExtrinsicFunction<ApiType>; [key: string]: SubmittableExtrinsicFunction<ApiType>;
}; };
safeMode: {
/**
* See [`Pallet::enter`].
**/
enter: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* See [`Pallet::extend`].
**/
extend: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* See [`Pallet::force_enter`].
**/
forceEnter: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* See [`Pallet::force_exit`].
**/
forceExit: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* See [`Pallet::force_extend`].
**/
forceExtend: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* See [`Pallet::force_release_deposit`].
**/
forceReleaseDeposit: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array, block: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
/**
* See [`Pallet::force_slash_deposit`].
**/
forceSlashDeposit: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array, block: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
/**
* See [`Pallet::release_deposit`].
**/
releaseDeposit: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array, block: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
salary: { salary: {
/** /**
* See [`Pallet::bump`]. * See [`Pallet::bump`].
@@ -1707,46 +1827,74 @@ declare module '@polkadot/api-base/types/submittable' {
[key: string]: SubmittableExtrinsicFunction<ApiType>; [key: string]: SubmittableExtrinsicFunction<ApiType>;
}; };
society: { society: {
/**
* See [`Pallet::bestow_membership`].
**/
bestowMembership: AugmentedSubmittable<(candidate: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/** /**
* See [`Pallet::bid`]. * See [`Pallet::bid`].
**/ **/
bid: AugmentedSubmittable<(value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128]>; bid: AugmentedSubmittable<(value: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128]>;
/**
* See [`Pallet::claim_membership`].
**/
claimMembership: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* See [`Pallet::cleanup_candidacy`].
**/
cleanupCandidacy: AugmentedSubmittable<(candidate: AccountId32 | string | Uint8Array, max: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
/**
* See [`Pallet::cleanup_challenge`].
**/
cleanupChallenge: AugmentedSubmittable<(challengeRound: u32 | AnyNumber | Uint8Array, max: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
/** /**
* See [`Pallet::defender_vote`]. * See [`Pallet::defender_vote`].
**/ **/
defenderVote: AugmentedSubmittable<(approve: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [bool]>; defenderVote: AugmentedSubmittable<(approve: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [bool]>;
/** /**
* See [`Pallet::found`]. * See [`Pallet::dissolve`].
**/ **/
found: AugmentedSubmittable<(founder: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, maxMembers: u32 | AnyNumber | Uint8Array, rules: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u32, Bytes]>; dissolve: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/** /**
* See [`Pallet::judge_suspended_candidate`]. * See [`Pallet::drop_candidate`].
**/ **/
judgeSuspendedCandidate: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, judgement: PalletSocietyJudgement | 'Rebid' | 'Reject' | 'Approve' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, PalletSocietyJudgement]>; dropCandidate: AugmentedSubmittable<(candidate: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
* See [`Pallet::found_society`].
**/
foundSociety: AugmentedSubmittable<(founder: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, maxMembers: u32 | AnyNumber | Uint8Array, maxIntake: u32 | AnyNumber | Uint8Array, maxStrikes: u32 | AnyNumber | Uint8Array, candidateDeposit: u128 | AnyNumber | Uint8Array, rules: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u32, u32, u32, u128, Bytes]>;
/** /**
* See [`Pallet::judge_suspended_member`]. * See [`Pallet::judge_suspended_member`].
**/ **/
judgeSuspendedMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forgive: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, bool]>; judgeSuspendedMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forgive: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, bool]>;
/**
* See [`Pallet::kick_candidate`].
**/
kickCandidate: AugmentedSubmittable<(candidate: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/** /**
* See [`Pallet::payout`]. * See [`Pallet::payout`].
**/ **/
payout: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>; payout: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/** /**
* See [`Pallet::set_max_members`]. * See [`Pallet::punish_skeptic`].
**/ **/
setMaxMembers: AugmentedSubmittable<(max: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>; punishSkeptic: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* See [`Pallet::resign_candidacy`].
**/
resignCandidacy: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* See [`Pallet::set_parameters`].
**/
setParameters: AugmentedSubmittable<(maxMembers: u32 | AnyNumber | Uint8Array, maxIntake: u32 | AnyNumber | Uint8Array, maxStrikes: u32 | AnyNumber | Uint8Array, candidateDeposit: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, u32, u128]>;
/** /**
* See [`Pallet::unbid`]. * See [`Pallet::unbid`].
**/ **/
unbid: AugmentedSubmittable<(pos: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>; unbid: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* See [`Pallet::unfound`].
**/
unfound: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/** /**
* See [`Pallet::unvouch`]. * See [`Pallet::unvouch`].
**/ **/
unvouch: AugmentedSubmittable<(pos: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>; unvouch: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/** /**
* See [`Pallet::vote`]. * See [`Pallet::vote`].
**/ **/
@@ -1755,6 +1903,10 @@ declare module '@polkadot/api-base/types/submittable' {
* See [`Pallet::vouch`]. * See [`Pallet::vouch`].
**/ **/
vouch: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: u128 | AnyNumber | Uint8Array, tip: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u128, u128]>; vouch: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: u128 | AnyNumber | Uint8Array, tip: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u128, u128]>;
/**
* See [`Pallet::waive_repay`].
**/
waiveRepay: AugmentedSubmittable<(amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128]>;
/** /**
* Generic tx * Generic tx
**/ **/
@@ -2108,6 +2260,20 @@ declare module '@polkadot/api-base/types/submittable' {
**/ **/
[key: string]: SubmittableExtrinsicFunction<ApiType>; [key: string]: SubmittableExtrinsicFunction<ApiType>;
}; };
txPause: {
/**
* See [`Pallet::pause`].
**/
pause: AugmentedSubmittable<(fullName: ITuple<[Bytes, Bytes]> | [Bytes | string | Uint8Array, Bytes | string | Uint8Array]) => SubmittableExtrinsic<ApiType>, [ITuple<[Bytes, Bytes]>]>;
/**
* See [`Pallet::unpause`].
**/
unpause: AugmentedSubmittable<(ident: ITuple<[Bytes, Bytes]> | [Bytes | string | Uint8Array, Bytes | string | Uint8Array]) => SubmittableExtrinsic<ApiType>, [ITuple<[Bytes, Bytes]>]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
uniques: { uniques: {
/** /**
* See [`Pallet::approve_transfer`]. * See [`Pallet::approve_transfer`].
@@ -2279,6 +2445,10 @@ declare module '@polkadot/api-base/types/submittable' {
* See [`Pallet::put_in_front_of`]. * See [`Pallet::put_in_front_of`].
**/ **/
putInFrontOf: AugmentedSubmittable<(lighter: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>; putInFrontOf: AugmentedSubmittable<(lighter: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* See [`Pallet::put_in_front_of_other`].
**/
putInFrontOfOther: AugmentedSubmittable<(heavier: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, lighter: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress]>;
/** /**
* See [`Pallet::rebag`]. * See [`Pallet::rebag`].
**/ **/
+5 -5
View File
@@ -18,13 +18,13 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "10.8.1", "version": "10.10.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@polkadot/rpc-core": "10.8.1", "@polkadot/rpc-core": "10.10.1",
"@polkadot/types": "10.8.1", "@polkadot/types": "10.10.1",
"@polkadot/util": "^12.2.2", "@polkadot/util": "^12.5.1",
"rxjs": "^7.8.1", "rxjs": "^7.8.1",
"tslib": "^2.5.3" "tslib": "^2.6.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/api-base', path: 'auto', type: 'auto', version: '10.8.1' }; export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '10.10.1' };
+1 -1
View File
@@ -65,7 +65,7 @@ export interface PaginationOptions<A = unknown> {
export type DecorateMethod<_ApiType extends ApiTypes, T = any> = export type DecorateMethod<_ApiType extends ApiTypes, T = any> =
<M extends (...args: any[]) => Observable<any>>(method: M, options?: DecorateMethodOptions) => T; <M extends (...args: any[]) => Observable<any>>(method: M, options?: DecorateMethodOptions) => T;
type AsCodec<R extends Codec | any> = R extends Codec type AsCodec<R> = R extends Codec
? R ? R
: Codec; : Codec;
+4 -5
View File
@@ -7,8 +7,8 @@ import type { ApiTypes, EmptyBase, ReturnCodec } from './base.js';
export type DecoratedCallBase<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> = export type DecoratedCallBase<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> =
ApiType extends 'rxjs' ApiType extends 'rxjs'
? <T extends Codec | any = ReturnCodec<F>> (...args: Parameters<F>) => Observable<T> ? <T = ReturnCodec<F>> (...args: Parameters<F>) => Observable<T>
: <T extends Codec | any = ReturnCodec<F>> (...args: Parameters<F>) => Promise<T>; : <T = ReturnCodec<F>> (...args: Parameters<F>) => Promise<T>;
export type AugmentedCall<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> = DecoratedCallBase<ApiType, F> & { export type AugmentedCall<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> = DecoratedCallBase<ApiType, F> & {
/** The metadata/description/definition for this method */ /** The metadata/description/definition for this method */
@@ -22,11 +22,10 @@ export interface AugmentedCalls<ApiType extends ApiTypes> extends EmptyBase<ApiT
// augmented // augmented
} }
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
export interface QueryableCalls<ApiType extends ApiTypes> extends AugmentedCalls<ApiType> { export interface QueryableCalls<ApiType extends ApiTypes> extends AugmentedCalls<ApiType> {
// when non-augmented, we need to at least have Codec results // when non-augmented, we need to at least have Codec results
[key: string]: QueryableModuleCalls<ApiType>; [key: string]: QueryableModuleCalls<ApiType>;
} }
export interface QueryableModuleCalls<ApiType extends ApiTypes> { export type QueryableModuleCalls<ApiType extends ApiTypes> = Record<string, DecoratedCallBase<ApiType>>;
[key: string]: DecoratedCallBase<ApiType>;
}
+2 -3
View File
@@ -16,11 +16,10 @@ export interface AugmentedConsts<ApiType extends ApiTypes> extends EmptyBase<Api
// augmented // augmented
} }
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
export interface QueryableConsts<ApiType extends ApiTypes> extends AugmentedConsts<ApiType> { export interface QueryableConsts<ApiType extends ApiTypes> extends AugmentedConsts<ApiType> {
// when non-augmented, we need to at least have Codec results // when non-augmented, we need to at least have Codec results
[key: string]: QueryableModuleConsts; [key: string]: QueryableModuleConsts;
} }
export interface QueryableModuleConsts { export type QueryableModuleConsts = Record<string, Codec>;
[key: string]: Codec;
}
+2 -3
View File
@@ -13,11 +13,10 @@ export interface AugmentedErrors<ApiType extends ApiTypes> extends EmptyBase<Api
// augmented // augmented
} }
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
export interface DecoratedErrors<ApiType extends ApiTypes> extends AugmentedErrors<ApiType> { export interface DecoratedErrors<ApiType extends ApiTypes> extends AugmentedErrors<ApiType> {
// when non-augmented, we need to at least have Codec results // when non-augmented, we need to at least have Codec results
[key: string]: ModuleErrors<ApiType>; [key: string]: ModuleErrors<ApiType>;
} }
export interface ModuleErrors<ApiType extends ApiTypes> { export type ModuleErrors<ApiType extends ApiTypes> = Record<string, AugmentedError<ApiType>>;
[key: string]: AugmentedError<ApiType>;
}
+2 -3
View File
@@ -14,11 +14,10 @@ export interface AugmentedEvents<ApiType extends ApiTypes> extends EmptyBase<Api
// augmented // augmented
} }
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
export interface DecoratedEvents<ApiType extends ApiTypes> extends AugmentedEvents<ApiType> { export interface DecoratedEvents<ApiType extends ApiTypes> extends AugmentedEvents<ApiType> {
// when non-augmented, we need to at least have Codec results // when non-augmented, we need to at least have Codec results
[key: string]: ModuleEvents<ApiType>; [key: string]: ModuleEvents<ApiType>;
} }
export interface ModuleEvents<ApiType extends ApiTypes> { export type ModuleEvents<ApiType extends ApiTypes> = Record<string, AugmentedEvent<ApiType>>;
[key: string]: AugmentedEvent<ApiType>;
}
+12 -18
View File
@@ -8,13 +8,11 @@ import type { StorageEntry } from '@polkadot/types/primitive/types';
import type { AnyFunction, AnyTuple, Callback, Codec, IStorageKey } from '@polkadot/types/types'; import type { AnyFunction, AnyTuple, Callback, Codec, IStorageKey } from '@polkadot/types/types';
import type { ApiTypes, DropLast, EmptyBase, MethodResult, PaginationOptions, PromiseOrObs, ReturnCodec, UnsubscribePromise } from './base.js'; import type { ApiTypes, DropLast, EmptyBase, MethodResult, PaginationOptions, PromiseOrObs, ReturnCodec, UnsubscribePromise } from './base.js';
interface StorageEntryObservableMulti<R extends Codec = Codec> { type StorageEntryObservableMulti<R extends Codec = Codec> = <T extends Codec = R>(args: unknown[]) => Observable<T[]>;
<T extends Codec = R>(args: (unknown[] | unknown)[]): Observable<T[]>;
}
interface StorageEntryPromiseMulti<R extends Codec = Codec> { interface StorageEntryPromiseMulti<R extends Codec = Codec> {
<T extends Codec = R>(args: (unknown[] | unknown)[]): Promise<T[]>; <T extends Codec = R>(args: unknown[]): Promise<T[]>;
<T extends Codec = R>(args: (unknown[] | unknown)[], callback: Callback<T[]>): UnsubscribePromise; <T extends Codec = R>(args: unknown[], callback: Callback<T[]>): UnsubscribePromise;
} }
export interface StorageEntryPromiseOverloads { export interface StorageEntryPromiseOverloads {
@@ -48,12 +46,12 @@ export interface StorageEntryBase<ApiType extends ApiTypes, F extends AnyFunctio
/** /**
* @deprecated Use api.at(<blockHash>) * @deprecated Use api.at(<blockHash>)
*/ */
at: <T extends Codec | any = ReturnCodec<F>>(hash: Hash | Uint8Array | string, ...args: Parameters<F>) => PromiseOrObs<ApiType, T>; at: <T = ReturnCodec<F>>(hash: Hash | Uint8Array | string, ...args: Parameters<F>) => PromiseOrObs<ApiType, T>;
creator: StorageEntry; creator: StorageEntry;
/** /**
* @deprecated Use api.at(<blockHash>) * @deprecated Use api.at(<blockHash>)
*/ */
entriesAt: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(hash: Hash | Uint8Array | string, ...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>; entriesAt: <T = ReturnCodec<F>, K extends AnyTuple = A>(hash: Hash | Uint8Array | string, ...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
/** /**
* @deprecated Use api.at(<blockHash>) * @deprecated Use api.at(<blockHash>)
*/ */
@@ -68,8 +66,8 @@ export interface StorageEntryBase<ApiType extends ApiTypes, F extends AnyFunctio
} }
export interface StorageEntryBaseAt<ApiType extends ApiTypes, F extends AnyFunction, A extends AnyTuple = AnyTuple> { export interface StorageEntryBaseAt<ApiType extends ApiTypes, F extends AnyFunction, A extends AnyTuple = AnyTuple> {
entries: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>; entries: <T = ReturnCodec<F>, K extends AnyTuple = A>(...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
entriesPaged: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>; entriesPaged: <T = ReturnCodec<F>, K extends AnyTuple = A>(opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
hash: (...args: Parameters<F>) => PromiseOrObs<ApiType, Hash>; hash: (...args: Parameters<F>) => PromiseOrObs<ApiType, Hash>;
is: (key: IStorageKey<AnyTuple>) => key is IStorageKey<A>; is: (key: IStorageKey<AnyTuple>) => key is IStorageKey<A>;
key: (...args: Parameters<F>) => string; key: (...args: Parameters<F>) => string;
@@ -79,21 +77,15 @@ export interface StorageEntryBaseAt<ApiType extends ApiTypes, F extends AnyFunct
size: (...args: Parameters<F>) => PromiseOrObs<ApiType, u64>; size: (...args: Parameters<F>) => PromiseOrObs<ApiType, u64>;
} }
export interface QueryableModuleStorage<ApiType extends ApiTypes> { export type QueryableModuleStorage<ApiType extends ApiTypes> = Record<string, QueryableStorageEntry<ApiType, AnyTuple>>;
[key: string]: QueryableStorageEntry<ApiType, AnyTuple>;
}
export interface QueryableModuleStorageAt<ApiType extends ApiTypes> { export type QueryableModuleStorageAt<ApiType extends ApiTypes> = Record<string, QueryableStorageEntryAt<ApiType, AnyTuple>>;
[key: string]: QueryableStorageEntryAt<ApiType, AnyTuple>;
}
export type QueryableStorageMultiArg<ApiType extends ApiTypes> = export type QueryableStorageMultiArg<ApiType extends ApiTypes> =
QueryableStorageEntry<ApiType> | QueryableStorageEntry<ApiType> |
[QueryableStorageEntry<ApiType>, ...unknown[]]; [QueryableStorageEntry<ApiType>, ...unknown[]];
export interface QueryableStorageMultiBase<ApiType extends ApiTypes> { export type QueryableStorageMultiBase<ApiType extends ApiTypes> = <T extends Codec[]>(calls: QueryableStorageMultiArg<ApiType>[]) => Observable<T>;
<T extends Codec[]>(calls: QueryableStorageMultiArg<ApiType>[]): Observable<T>;
}
export interface QueryableStorageMultiPromise<ApiType extends ApiTypes> { export interface QueryableStorageMultiPromise<ApiType extends ApiTypes> {
<T extends Codec[]>(calls: QueryableStorageMultiArg<ApiType>[], callback: Callback<T>): UnsubscribePromise; <T extends Codec[]>(calls: QueryableStorageMultiArg<ApiType>[], callback: Callback<T>): UnsubscribePromise;
@@ -119,11 +111,13 @@ export interface AugmentedQueries<ApiType extends ApiTypes> extends EmptyBase<Ap
// augmented // augmented
} }
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
export interface QueryableStorage<ApiType extends ApiTypes> extends AugmentedQueries<ApiType> { export interface QueryableStorage<ApiType extends ApiTypes> extends AugmentedQueries<ApiType> {
// when non-augmented, we need to at least have Codec results // when non-augmented, we need to at least have Codec results
[key: string]: QueryableModuleStorage<ApiType>; [key: string]: QueryableModuleStorage<ApiType>;
} }
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
export interface QueryableStorageAt<ApiType extends ApiTypes> extends AugmentedQueries<ApiType> { export interface QueryableStorageAt<ApiType extends ApiTypes> extends AugmentedQueries<ApiType> {
[key: string]: QueryableModuleStorageAt<ApiType>; [key: string]: QueryableModuleStorageAt<ApiType>;
} }
+1 -4
View File
@@ -92,7 +92,4 @@ export interface SubmittableExtrinsics<ApiType extends ApiTypes> extends Augment
[key: string]: SubmittableModuleExtrinsics<ApiType>; [key: string]: SubmittableModuleExtrinsics<ApiType>;
} }
export interface SubmittableModuleExtrinsics<ApiType extends ApiTypes> { export type SubmittableModuleExtrinsics<ApiType extends ApiTypes> = Record<string, SubmittableExtrinsicFunction<ApiType>>;
// only with is<Type> augmentation
[key: string]: SubmittableExtrinsicFunction<ApiType>;
}
+11 -10
View File
@@ -18,20 +18,21 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "10.8.1", "version": "10.10.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@polkadot/api": "10.8.1", "@polkadot/api": "10.10.1",
"@polkadot/types": "10.8.1", "@polkadot/api-augment": "10.10.1",
"@polkadot/types-codec": "10.8.1", "@polkadot/types": "10.10.1",
"@polkadot/types-create": "10.8.1", "@polkadot/types-codec": "10.10.1",
"@polkadot/util": "^12.2.2", "@polkadot/types-create": "10.10.1",
"@polkadot/util-crypto": "^12.2.2", "@polkadot/util": "^12.5.1",
"@polkadot/util-crypto": "^12.5.1",
"rxjs": "^7.8.1", "rxjs": "^7.8.1",
"tslib": "^2.5.3" "tslib": "^2.6.2"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/api-augment": "10.8.1", "@polkadot/api-augment": "10.10.1",
"@polkadot/keyring": "^12.2.2" "@polkadot/keyring": "^12.5.1"
} }
} }
+6 -10
View File
@@ -6,7 +6,6 @@
import type { Registry } from '@polkadot/types/types'; import type { Registry } from '@polkadot/types/types';
import fs from 'node:fs'; import fs from 'node:fs';
import path from 'node:path';
import process from 'node:process'; import process from 'node:process';
import { TypeDefInfo } from '@polkadot/types/types'; import { TypeDefInfo } from '@polkadot/types/types';
@@ -44,12 +43,9 @@ interface JSONAbi {
} }
} }
// FIXME When Jest is removed with ESM tests, this should be converted to use import.meta.url
const cmpPath = path.join(process.cwd(), 'packages/api-contract/src/test/compare');
function stringifyInfo (key: string, value: unknown): unknown { function stringifyInfo (key: string, value: unknown): unknown {
return key === 'info' return key === 'info' && typeof value === 'number'
? TypeDefInfo[value as number] ? TypeDefInfo[value]
: value; : value;
} }
@@ -92,7 +88,7 @@ describe('Abi', (): void => {
it(`initializes from a contract ABI: ${abiName}`, (): void => { it(`initializes from a contract ABI: ${abiName}`, (): void => {
const abi = new Abi(abiJson); const abi = new Abi(abiJson);
const registryJson = stringifyJson(abi.registry); const registryJson = stringifyJson(abi.registry);
const cmpFile = path.join(cmpPath, `${abiName}.test.json`); const cmpFile = new URL(`../test/compare/${abiName}.test.json`, import.meta.url);
try { try {
expect( expect(
@@ -101,7 +97,7 @@ describe('Abi', (): void => {
JSON.parse(fs.readFileSync(cmpFile, 'utf-8')) JSON.parse(fs.readFileSync(cmpFile, 'utf-8'))
); );
} catch (error) { } catch (error) {
if (process.env.GITHUB_REPOSITORY) { if (process.env['GITHUB_REPOSITORY']) {
console.error(registryJson); console.error(registryJson);
throw error; throw error;
@@ -114,8 +110,8 @@ describe('Abi', (): void => {
}); });
it('has the correct hash for the source', (): void => { it('has the correct hash for the source', (): void => {
const abi = new Abi(abis.ink_v0_flipperBundle); const abi = new Abi(abis['ink_v0_flipperBundle']);
const bundle = abis.ink_v0_flipperBundle as unknown as JSONAbi; const bundle = abis['ink_v0_flipperBundle'] as unknown as JSONAbi;
// manual // manual
expect(bundle.source.hash).toEqual(blake2AsHex(bundle.source.wasm)); expect(bundle.source.hash).toEqual(blake2AsHex(bundle.source.wasm));
+10 -4
View File
@@ -12,6 +12,12 @@ import { assertReturn, compactAddLength, compactStripLength, isBn, isNumber, isO
import { convertVersions, enumVersions } from './toLatest.js'; import { convertVersions, enumVersions } from './toLatest.js';
interface AbiJson {
version?: string;
[key: string]: unknown;
}
const l = logger('Abi'); const l = logger('Abi');
const PRIMITIVE_ALWAYS = ['AccountId', 'AccountIndex', 'Address', 'Balance']; const PRIMITIVE_ALWAYS = ['AccountId', 'AccountIndex', 'Address', 'Balance'];
@@ -26,12 +32,12 @@ function findMessage <T extends AbiMessage> (list: T[], messageOrId: T | string
return assertReturn(message, () => `Attempted to call an invalid contract interface, ${stringify(messageOrId)}`); return assertReturn(message, () => `Attempted to call an invalid contract interface, ${stringify(messageOrId)}`);
} }
function getLatestMeta (registry: Registry, json: Record<string, unknown>): ContractMetadataLatest { function getLatestMeta (registry: Registry, json: AbiJson): ContractMetadataLatest {
// this is for V1, V2, V3 // this is for V1, V2, V3
const vx = enumVersions.find((v) => isObject(json[v])); const vx = enumVersions.find((v) => isObject(json[v]));
// this was added in V4 // this was added in V4
const jsonVersion = json.version as string; const jsonVersion = json.version;
if (!vx && jsonVersion && !enumVersions.find((v) => v === `V${jsonVersion}`)) { if (!vx && jsonVersion && !enumVersions.find((v) => v === `V${jsonVersion}`)) {
throw new Error(`Unable to handle version ${jsonVersion}`); throw new Error(`Unable to handle version ${jsonVersion}`);
@@ -56,7 +62,7 @@ function getLatestMeta (registry: Registry, json: Record<string, unknown>): Cont
function parseJson (json: Record<string, unknown>, chainProperties?: ChainProperties): [Record<string, unknown>, Registry, ContractMetadataLatest, ContractProjectInfo] { function parseJson (json: Record<string, unknown>, chainProperties?: ChainProperties): [Record<string, unknown>, Registry, ContractMetadataLatest, ContractProjectInfo] {
const registry = new TypeRegistry(); const registry = new TypeRegistry();
const info = registry.createType('ContractProjectInfo', json) as unknown as ContractProjectInfo; const info = registry.createType('ContractProjectInfo', json) as unknown as ContractProjectInfo;
const latest = getLatestMeta(registry, json); const latest = getLatestMeta(registry, json as unknown as AbiJson);
const lookup = registry.createType('PortableRegistry', { types: latest.types }, true); const lookup = registry.createType('PortableRegistry', { types: latest.types }, true);
// attach the lookup to the registry - now the types are known // attach the lookup to the registry - now the types are known
@@ -98,7 +104,7 @@ export class Abi {
readonly messages: AbiMessage[]; readonly messages: AbiMessage[];
readonly metadata: ContractMetadataLatest; readonly metadata: ContractMetadataLatest;
readonly registry: Registry; readonly registry: Registry;
readonly environment: Map<string, TypeDef | Codec> = new Map(); readonly environment = new Map<string, TypeDef | Codec>();
constructor (abiJson: Record<string, unknown> | string, chainProperties?: ChainProperties) { constructor (abiJson: Record<string, unknown> | string, chainProperties?: ChainProperties) {
[this.json, this.registry, this.metadata, this.info] = parseJson( [this.json, this.registry, this.metadata, this.info] = parseJson(
@@ -10,7 +10,7 @@ import { v0ToLatest, v1ToLatest, v2ToLatest, v3ToLatest, v4ToLatest } from './to
describe('v0ToLatest', (): void => { describe('v0ToLatest', (): void => {
const registry = new TypeRegistry(); const registry = new TypeRegistry();
const contract = registry.createType('ContractMetadata', { V0: abis.ink_v0_erc20 }); const contract = registry.createType('ContractMetadata', { V0: abis['ink_v0_erc20'] });
const latest = v0ToLatest(registry, contract.asV0); const latest = v0ToLatest(registry, contract.asV0);
it('has the correct constructors', (): void => { it('has the correct constructors', (): void => {
@@ -52,7 +52,7 @@ describe('v0ToLatest', (): void => {
describe('v1ToLatest', (): void => { describe('v1ToLatest', (): void => {
const registry = new TypeRegistry(); const registry = new TypeRegistry();
const contract = registry.createType('ContractMetadata', { V1: abis.ink_v1_flipper.V1 }); const contract = registry.createType('ContractMetadata', { V1: abis['ink_v1_flipper']['V1'] });
const latest = v1ToLatest(registry, contract.asV1); const latest = v1ToLatest(registry, contract.asV1);
it('has the correct constructors', (): void => { it('has the correct constructors', (): void => {
@@ -68,7 +68,7 @@ describe('v1ToLatest', (): void => {
}); });
it('has the correct messages with namespaced method name', (): void => { it('has the correct messages with namespaced method name', (): void => {
const contract = registry.createType('ContractMetadata', { V1: abis.ink_v1_psp22.V1 }); const contract = registry.createType('ContractMetadata', { V1: abis['ink_v1_psp22']['V1'] });
const latest = v1ToLatest(registry, contract.asV1); const latest = v1ToLatest(registry, contract.asV1);
expect( expect(
@@ -87,7 +87,7 @@ describe('v1ToLatest', (): void => {
describe('v2ToLatest', (): void => { describe('v2ToLatest', (): void => {
const registry = new TypeRegistry(); const registry = new TypeRegistry();
const contract = registry.createType('ContractMetadata', { V2: abis.ink_v2_flipper.V2 }); const contract = registry.createType('ContractMetadata', { V2: abis['ink_v2_flipper']['V2'] });
const latest = v2ToLatest(registry, contract.asV2); const latest = v2ToLatest(registry, contract.asV2);
it('has the correct constructor flag', (): void => { it('has the correct constructor flag', (): void => {
@@ -99,7 +99,7 @@ describe('v2ToLatest', (): void => {
describe('v3ToLatest', (): void => { describe('v3ToLatest', (): void => {
const registry = new TypeRegistry(); const registry = new TypeRegistry();
const contract = registry.createType('ContractMetadata', { V3: abis.ink_v3_flipper.V3 }); const contract = registry.createType('ContractMetadata', { V3: abis['ink_v3_flipper']['V3'] });
const latest = v3ToLatest(registry, contract.asV3); const latest = v3ToLatest(registry, contract.asV3);
it('has the correct constructor flags', (): void => { it('has the correct constructor flags', (): void => {
@@ -112,7 +112,7 @@ describe('v3ToLatest', (): void => {
}); });
it('has the correct messages', (): void => { it('has the correct messages', (): void => {
const contract = registry.createType('ContractMetadata', { V3: abis.ink_v3_traitErc20.V3 }); const contract = registry.createType('ContractMetadata', { V3: abis['ink_v3_traitErc20']['V3'] });
const latest = v3ToLatest(registry, contract.asV3); const latest = v3ToLatest(registry, contract.asV3);
expect( expect(
@@ -125,7 +125,7 @@ describe('v3ToLatest', (): void => {
describe('v4ToLatest', (): void => { describe('v4ToLatest', (): void => {
const registry = new TypeRegistry(); const registry = new TypeRegistry();
const contract = registry.createType('ContractMetadata', { V4: abis.ink_v4_flipperContract }); const contract = registry.createType('ContractMetadata', { V4: abis['ink_v4_flipperContract'] });
const latest = v4ToLatest(registry, contract.asV4); const latest = v4ToLatest(registry, contract.asV4);
it('has the correct constructor flags', (): void => { it('has the correct constructor flags', (): void => {
+4
View File
@@ -0,0 +1,4 @@
// Copyright 2017-2023 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@polkadot/api-augment';
+1 -3
View File
@@ -18,9 +18,7 @@ import { Base } from './Base.js';
import { Contract } from './Contract.js'; import { Contract } from './Contract.js';
import { convertWeight, createBluePrintTx, encodeSalt } from './util.js'; import { convertWeight, createBluePrintTx, encodeSalt } from './util.js';
export interface BlueprintConstructor<ApiType extends ApiTypes> { export type BlueprintConstructor<ApiType extends ApiTypes> = new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash | Uint8Array) => Blueprint<ApiType>;
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash | Uint8Array): Blueprint<ApiType>;
}
export class BlueprintSubmittableResult<ApiType extends ApiTypes> extends SubmittableResult { export class BlueprintSubmittableResult<ApiType extends ApiTypes> extends SubmittableResult {
readonly contract?: Contract<ApiType> | undefined; readonly contract?: Contract<ApiType> | undefined;
+1 -4
View File
@@ -4,8 +4,6 @@
/// <reference types="@polkadot/dev-test/globals.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import fs from 'node:fs'; import fs from 'node:fs';
import path from 'node:path';
import process from 'node:process';
import { toPromiseMethod } from '@polkadot/api'; import { toPromiseMethod } from '@polkadot/api';
@@ -15,8 +13,7 @@ import v1contractFlipper from '../test/contracts/ink/v1/flipper.contract.json' a
import { Code } from './Code.js'; import { Code } from './Code.js';
import { mockApi } from './mock.js'; import { mockApi } from './mock.js';
// FIXME When Jest is removed with ESM tests, this should be converted to use import.meta.url const v0wasmFlipper = fs.readFileSync(new URL('../test/contracts/ink/v0/flipper.wasm', import.meta.url), 'utf-8');
const v0wasmFlipper = fs.readFileSync(path.join(process.cwd(), 'packages/api-contract/src/test/contracts/ink/v0/flipper.wasm'), 'utf-8');
describe('Code', (): void => { describe('Code', (): void => {
it('can construct with an individual ABI/WASM combo', (): void => { it('can construct with an individual ABI/WASM combo', (): void => {
+11 -7
View File
@@ -12,7 +12,7 @@ import type { AbiConstructor, BlueprintOptions } from '../types.js';
import type { MapConstructorExec } from './types.js'; import type { MapConstructorExec } from './types.js';
import { SubmittableResult } from '@polkadot/api'; import { SubmittableResult } from '@polkadot/api';
import { BN_ZERO, compactAddLength, isUndefined, isWasm, u8aToU8a } from '@polkadot/util'; import { BN_ZERO, compactAddLength, isRiscV, isUndefined, isWasm, u8aToU8a } from '@polkadot/util';
import { applyOnEvent } from '../util.js'; import { applyOnEvent } from '../util.js';
import { Base } from './Base.js'; import { Base } from './Base.js';
@@ -20,9 +20,7 @@ import { Blueprint } from './Blueprint.js';
import { Contract } from './Contract.js'; import { Contract } from './Contract.js';
import { convertWeight, createBluePrintTx, encodeSalt } from './util.js'; import { convertWeight, createBluePrintTx, encodeSalt } from './util.js';
export interface CodeConstructor<ApiType extends ApiTypes> { export type CodeConstructor<ApiType extends ApiTypes> = new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined) => Code<ApiType>;
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined): Code<ApiType>;
}
export class CodeSubmittableResult<ApiType extends ApiTypes> extends SubmittableResult { export class CodeSubmittableResult<ApiType extends ApiTypes> extends SubmittableResult {
readonly blueprint?: Blueprint<ApiType> | undefined; readonly blueprint?: Blueprint<ApiType> | undefined;
@@ -36,6 +34,12 @@ export class CodeSubmittableResult<ApiType extends ApiTypes> extends Submittable
} }
} }
// checks to see if the code (or at least the header)
// is a valid/supported format
function isValidCode (code: Uint8Array): boolean {
return isWasm(code) || isRiscV(code);
}
export class Code<ApiType extends ApiTypes> extends Base<ApiType> { export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
readonly code: Uint8Array; readonly code: Uint8Array;
@@ -44,12 +48,12 @@ export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
constructor (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined, decorateMethod: DecorateMethod<ApiType>) { constructor (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined, decorateMethod: DecorateMethod<ApiType>) {
super(api, abi, decorateMethod); super(api, abi, decorateMethod);
this.code = isWasm(this.abi.info.source.wasm) this.code = isValidCode(this.abi.info.source.wasm)
? this.abi.info.source.wasm ? this.abi.info.source.wasm
: u8aToU8a(wasm); : u8aToU8a(wasm);
if (!isWasm(this.code)) { if (!isValidCode(this.code)) {
throw new Error('No WASM code provided'); throw new Error('Invalid code provided');
} }
this.abi.constructors.forEach((c): void => { this.abi.constructors.forEach((c): void => {
+2 -4
View File
@@ -20,9 +20,7 @@ import { applyOnEvent } from '../util.js';
import { Base } from './Base.js'; import { Base } from './Base.js';
import { convertWeight, withMeta } from './util.js'; import { convertWeight, withMeta } from './util.js';
export interface ContractConstructor<ApiType extends ApiTypes> { export type ContractConstructor<ApiType extends ApiTypes> = new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, address: string | AccountId) => Contract<ApiType>;
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, address: string | AccountId): Contract<ApiType>;
}
// As per Rust, 5 * GAS_PER_SEC // As per Rust, 5 * GAS_PER_SEC
const MAX_CALL_GAS = new BN(5_000_000_000_000).isub(BN_ONE); const MAX_CALL_GAS = new BN(5_000_000_000_000).isub(BN_ONE);
@@ -97,7 +95,7 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
: convertWeight( : convertWeight(
this.api.consts.system.blockWeights this.api.consts.system.blockWeights
? (this.api.consts.system.blockWeights as unknown as { maxBlock: WeightV2 }).maxBlock ? (this.api.consts.system.blockWeights as unknown as { maxBlock: WeightV2 }).maxBlock
: this.api.consts.system.maximumBlockWeight as Weight : this.api.consts.system['maximumBlockWeight'] as Weight
).v1Weight.muln(64).div(BN_HUNDRED) ).v1Weight.muln(64).div(BN_HUNDRED)
); );
}; };
+4 -12
View File
@@ -23,9 +23,7 @@ export interface ContractTx<ApiType extends ApiTypes> extends MessageMeta {
(options: ContractOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType>; (options: ContractOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
} }
export interface ContractGeneric<O, T> { export type ContractGeneric<O, T> = (messageOrId: AbiMessage | string | number, options: O, ...params: unknown[]) => T;
(messageOrId: AbiMessage | string | number, options: O, ...params: unknown[]): T;
}
export type ContractCallResult<ApiType extends ApiTypes, T> = ApiType extends 'rxjs' export type ContractCallResult<ApiType extends ApiTypes, T> = ApiType extends 'rxjs'
? Observable<T> ? Observable<T>
@@ -35,14 +33,8 @@ export interface ContractCallSend<ApiType extends ApiTypes> {
send (account: string | AccountId | Uint8Array): ContractCallResult<ApiType, ContractCallOutcome>; send (account: string | AccountId | Uint8Array): ContractCallResult<ApiType, ContractCallOutcome>;
} }
export interface MapConstructorExec<ApiType extends ApiTypes> { export type MapConstructorExec<ApiType extends ApiTypes> = Record<string, BlueprintDeploy<ApiType>>;
[message: string]: BlueprintDeploy<ApiType>;
}
export interface MapMessageTx<ApiType extends ApiTypes> { export type MapMessageTx<ApiType extends ApiTypes> = Record<string, ContractTx<ApiType>>;
[message: string]: ContractTx<ApiType>;
}
export interface MapMessageQuery<ApiType extends ApiTypes> { export type MapMessageQuery<ApiType extends ApiTypes> = Record<string, ContractQuery<ApiType>>;
[message: string]: ContractQuery<ApiType>;
}
+1 -1
View File
@@ -35,7 +35,7 @@ export function createBluePrintWithId <T> (fn: (constructorOrId: AbiConstructor
export function encodeSalt (salt: Uint8Array | string | null = randomAsU8a()): Uint8Array { export function encodeSalt (salt: Uint8Array | string | null = randomAsU8a()): Uint8Array {
return salt instanceof Bytes return salt instanceof Bytes
? salt ? salt
: salt && salt.length : salt?.length
? compactAddLength(u8aToU8a(salt)) ? compactAddLength(u8aToU8a(salt))
: EMPTY_SALT; : EMPTY_SALT;
} }
+8 -10
View File
@@ -5,7 +5,7 @@
import '@polkadot/api-augment'; import '@polkadot/api-augment';
import type { TestKeyringMap } from '@polkadot/keyring/testingPairs'; import type { TestKeyringMapSubstrate } from '@polkadot/keyring/testingPairs';
import { ApiPromise } from '@polkadot/api'; import { ApiPromise } from '@polkadot/api';
import { BlueprintPromise, ContractPromise } from '@polkadot/api-contract'; import { BlueprintPromise, ContractPromise } from '@polkadot/api-contract';
@@ -13,21 +13,21 @@ import { createTestPairs } from '@polkadot/keyring/testingPairs';
import abiIncrementer from './test/contracts/ink/v0/incrementer.json' assert { type: '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: TestKeyringMapSubstrate): Promise<void> {
const blueprint = new BlueprintPromise(api, abiIncrementer as Record<string, unknown>, '0x1234'); const blueprint = new BlueprintPromise(api, abiIncrementer as Record<string, unknown>, '0x1234');
await blueprint.tx.new({ gasLimit: 456, salt: '0x1234', value: 123 }, 42).signAndSend(pairs.bob); await blueprint.tx['new']({ gasLimit: 456, salt: '0x1234', value: 123 }, 42).signAndSend(pairs.bob);
await blueprint.tx.new({ gasLimit: 456, value: 123 }, 42).signAndSend(pairs.bob); await blueprint.tx['new']({ gasLimit: 456, value: 123 }, 42).signAndSend(pairs.bob);
} }
async function checkContract (api: ApiPromise, pairs: TestKeyringMap): Promise<void> { async function checkContract (api: ApiPromise, pairs: TestKeyringMapSubstrate): Promise<void> {
const contract = new ContractPromise(api, abiIncrementer as Record<string, unknown>, '0x1234'); const contract = new ContractPromise(api, abiIncrementer as Record<string, unknown>, '0x1234');
// queries // queries
await contract.query.get(pairs.alice.address, {}); await contract.query['get'](pairs.alice.address, {});
// execute // execute
await contract.tx.inc({ gasLimit: 1234 }, 123).signAndSend(pairs.eve); await contract.tx['inc']({ gasLimit: 1234 }, 123).signAndSend(pairs.eve);
} }
async function main (): Promise<void> { async function main (): Promise<void> {
@@ -36,12 +36,10 @@ async function main (): Promise<void> {
}); });
const pairs = createTestPairs(); const pairs = createTestPairs();
// eslint-disable-next-line @typescript-eslint/no-floating-promises await Promise.all([
Promise.all([
checkBlueprint(api, pairs), checkBlueprint(api, pairs),
checkContract(api, pairs) checkContract(api, pairs)
]); ]);
} }
// eslint-disable-next-line @typescript-eslint/unbound-method
main().catch(console.error); main().catch(console.error);
+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: '10.8.1' }; export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '10.10.1' };
@@ -7,10 +7,14 @@ import user from './user/index.js';
const all: Record<string, Record<string, unknown>> = {}; const all: Record<string, Record<string, unknown>> = {};
Object.entries({ ink, solang, user }).forEach(([type, abis]) => Object
Object.entries(abis).forEach(([name, abi]): void => { .entries({ ink, solang, user })
all[`${type}_${name}`] = abi; .forEach(([type, abis]) =>
}) Object
); .entries(abis)
.forEach(([name, abi]): void => {
all[`${type}_${name}`] = abi;
})
);
export default all; export default all;
+2 -4
View File
@@ -49,10 +49,8 @@ export interface AbiMessage {
export type AbiConstructor = AbiMessage; export type AbiConstructor = AbiMessage;
export interface InterfaceContractCalls { // eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/ban-types export type InterfaceContractCalls = Record<string, Function>;
[index: string]: Function;
}
export interface ContractCallOutcome { export interface ContractCallOutcome {
debugMessage: Text; debugMessage: Text;
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2023 @polkadot/rpc-contract authors & contributors // Copyright 2017-2023 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import type { SubmittableResult } from '@polkadot/api'; import type { SubmittableResult } from '@polkadot/api';
@@ -14,6 +14,7 @@
], ],
"references": [ "references": [
{ "path": "../api/tsconfig.build.json" }, { "path": "../api/tsconfig.build.json" },
{ "path": "../api-augment/tsconfig.build.json" },
{ "path": "../types/tsconfig.build.json" }, { "path": "../types/tsconfig.build.json" },
{ "path": "../types-codec/tsconfig.build.json" }, { "path": "../types-codec/tsconfig.build.json" },
{ "path": "../types-create/tsconfig.build.json" } { "path": "../types-create/tsconfig.build.json" }
+15 -15
View File
@@ -18,25 +18,25 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "10.8.1", "version": "10.10.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@polkadot/api": "10.8.1", "@polkadot/api": "10.10.1",
"@polkadot/api-augment": "10.8.1", "@polkadot/api-augment": "10.10.1",
"@polkadot/api-base": "10.8.1", "@polkadot/api-base": "10.10.1",
"@polkadot/rpc-core": "10.8.1", "@polkadot/rpc-core": "10.10.1",
"@polkadot/types": "10.8.1", "@polkadot/types": "10.10.1",
"@polkadot/types-codec": "10.8.1", "@polkadot/types-codec": "10.10.1",
"@polkadot/util": "^12.2.2", "@polkadot/util": "^12.5.1",
"@polkadot/util-crypto": "^12.2.2", "@polkadot/util-crypto": "^12.5.1",
"rxjs": "^7.8.1", "rxjs": "^7.8.1",
"tslib": "^2.5.3" "tslib": "^2.6.2"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/api": "10.8.1", "@polkadot/api": "10.10.1",
"@polkadot/api-augment": "10.8.1", "@polkadot/api-augment": "10.10.1",
"@polkadot/rpc-augment": "10.8.1", "@polkadot/rpc-augment": "10.10.1",
"@polkadot/rpc-provider": "10.8.1", "@polkadot/rpc-provider": "10.10.1",
"@polkadot/types-support": "10.8.1" "@polkadot/types-support": "10.10.1"
} }
} }
+2 -2
View File
@@ -23,7 +23,7 @@ type FlagsIntermediate = [
]; ];
function parseFlags (address: AccountId | Address | string | null | undefined, [electionsMembers, councilMembers, technicalCommitteeMembers, societyMembers, sudoKey]: FlagsIntermediate): DeriveAccountFlags { function parseFlags (address: AccountId | Address | string | null | undefined, [electionsMembers, councilMembers, technicalCommitteeMembers, societyMembers, sudoKey]: FlagsIntermediate): DeriveAccountFlags {
const addrStr = address && address.toString(); const addrStr = address?.toString();
const isIncluded = (id: AccountId | Address | string) => const isIncluded = (id: AccountId | Address | string) =>
id.toString() === addrStr; id.toString() === addrStr;
@@ -39,7 +39,7 @@ export function _flags (instanceId: string, api: DeriveApi): () => Observable<Fl
return memo(instanceId, (): Observable<FlagsIntermediate> => { return memo(instanceId, (): Observable<FlagsIntermediate> => {
const results: unknown[] = [undefined, [], [], [], undefined]; const results: unknown[] = [undefined, [], [], [], undefined];
const calls = [ const calls = [
(api.query.phragmenElection || api.query.electionsPhragmen || api.query.elections)?.members, (api.query.elections || api.query['phragmenElection'] || api.query['electionsPhragmen'])?.members,
api.query.council?.members, api.query.council?.members,
api.query.technicalCommittee?.members, api.query.technicalCommittee?.members,
api.query.society?.members, api.query.society?.members,
@@ -27,7 +27,7 @@ export function idToIndex (instanceId: string, api: DeriveApi): (accountId: Acco
return memo(instanceId, (accountId: AccountId | string): Observable<AccountIndex | undefined> => return memo(instanceId, (accountId: AccountId | string): Observable<AccountIndex | undefined> =>
api.derive.accounts.indexes().pipe( api.derive.accounts.indexes().pipe(
map((indexes: AccountIndexes): AccountIndex | undefined => map((indexes: AccountIndexes): AccountIndex | undefined =>
(indexes || {})[accountId.toString()] indexes[accountId.toString()]
) )
)); ));
} }
+1 -1
View File
@@ -56,7 +56,7 @@ function extractIdentity (identityOfOpt?: Option<PalletIdentityRegistration>, su
judgements, judgements,
legal: dataAsString(info.legal), legal: dataAsString(info.legal),
other: extractOther(info.additional), other: extractOther(info.additional),
parent: superOf && superOf[0], parent: superOf?.[0],
pgp: info.pgpFingerprint.unwrapOr(UNDEF_HEX).toHex(), pgp: info.pgpFingerprint.unwrapOr(UNDEF_HEX).toHex(),
riot: dataAsString(info.riot), riot: dataAsString(info.riot),
twitter: dataAsString(info.twitter), twitter: dataAsString(info.twitter),
+3 -3
View File
@@ -15,13 +15,13 @@ import { memo } from '../util/index.js';
function retrieveNick (api: DeriveApi, accountId?: AccountId): Observable<string | undefined> { function retrieveNick (api: DeriveApi, accountId?: AccountId): Observable<string | undefined> {
return (( return ((
accountId && api.query.nicks?.nameOf accountId && api.query['nicks']?.['nameOf']
? api.query.nicks.nameOf(accountId) ? api.query['nicks']['nameOf'](accountId)
: of(undefined) : of(undefined)
) as Observable<Option<ITuple<[Bytes, Balance]>> | undefined>).pipe( ) as Observable<Option<ITuple<[Bytes, Balance]>> | undefined>).pipe(
map((nameOf): string | undefined => map((nameOf): string | undefined =>
nameOf?.isSome nameOf?.isSome
? u8aToString(nameOf.unwrap()[0]).substring(0, (api.consts.nicks.maxLength as u32).toNumber()) ? u8aToString(nameOf.unwrap()[0]).substring(0, (api.consts['nicks']['maxLength'] as u32).toNumber())
: undefined : undefined
) )
); );
+5 -7
View File
@@ -1,16 +1,14 @@
// Copyright 2017-2023 @polkadot/api-derive authors & contributors // Copyright 2017-2023 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import type { QueryableStorage } from '@polkadot/api-base/types';
import type { DeriveApi } from '../types.js'; import type { DeriveApi } from '../types.js';
export function getQueryInterface (api: DeriveApi): QueryableStorage<'rxjs'>['voterBagsList'] { export function getQueryInterface (api: DeriveApi): DeriveApi['query']['voterList'] {
return ( return (
// latest substrate (latest always first) // latest substrate & polkadot
api.query.voterBagsList || api.query.voterList ||
// previous substrate // previous substrate
api.query.bagsList || api.query['voterBagsList'] ||
// latest polkadot api.query['bagsList']
api.query.voterList
); );
} }
+11 -13
View File
@@ -17,11 +17,9 @@ type BalanceResult = [Balance, Balance, Balance, Balance];
type Result = [Index, BalanceResult[]]; type Result = [Index, BalanceResult[]];
type DeriveCustomAccount = DeriveApi['derive'] & { type DeriveCustomAccount = DeriveApi['derive'] & Record<string, {
[custom: string]: { customAccount?: DeriveApi['query']['balances']['account']
customAccount?: DeriveApi['query']['balances']['account'] }>
}
}
function zeroBalance (api: DeriveApi) { function zeroBalance (api: DeriveApi) {
return api.registry.createType('Balance'); return api.registry.createType('Balance');
@@ -50,9 +48,9 @@ function calcBalances (api: DeriveApi, [accountId, [accountNonce, [primary, ...a
// old // old
function queryBalancesFree (api: DeriveApi, accountId: AccountId): Observable<Result> { function queryBalancesFree (api: DeriveApi, accountId: AccountId): Observable<Result> {
return combineLatest([ return combineLatest([
api.query.balances.freeBalance<Balance>(accountId), api.query.balances['freeBalance']<Balance>(accountId),
api.query.balances.reservedBalance<Balance>(accountId), api.query.balances['reservedBalance']<Balance>(accountId),
api.query.system.accountNonce<Index>(accountId) api.query.system['accountNonce']<Index>(accountId)
]).pipe( ]).pipe(
map(([freeBalance, reservedBalance, accountNonce]): Result => [ map(([freeBalance, reservedBalance, accountNonce]): Result => [
accountNonce, accountNonce,
@@ -71,8 +69,8 @@ function queryNonceOnly (api: DeriveApi, accountId: AccountId): Observable<Resul
? api.query.system.account(accountId).pipe( ? api.query.system.account(accountId).pipe(
map(({ nonce }) => fill(nonce)) map(({ nonce }) => fill(nonce))
) )
: isFunction(api.query.system.accountNonce) : isFunction(api.query.system['accountNonce'])
? api.query.system.accountNonce<Index>(accountId).pipe( ? api.query.system['accountNonce']<Index>(accountId).pipe(
map((nonce) => fill(nonce)) map((nonce) => fill(nonce))
) )
: of(fill(api.registry.createType('Index'))); : of(fill(api.registry.createType('Index')));
@@ -80,7 +78,7 @@ function queryNonceOnly (api: DeriveApi, accountId: AccountId): Observable<Resul
function queryBalancesAccount (api: DeriveApi, accountId: AccountId, modules: string[] = ['balances']): Observable<Result> { function queryBalancesAccount (api: DeriveApi, accountId: AccountId, modules: string[] = ['balances']): Observable<Result> {
const balances = modules const balances = modules
.map((m): QueryableStorageEntry<'rxjs'> => (api.derive as DeriveCustomAccount)[m]?.customAccount || api.query[m]?.account) .map((m): QueryableStorageEntry<'rxjs'> => (api.derive as DeriveCustomAccount)[m]?.customAccount || api.query[m as 'balances']?.account)
.filter((q) => isFunction(q)); .filter((q) => isFunction(q));
const extract = (nonce: Index, data: AccountData[]): Result => [ const extract = (nonce: Index, data: AccountData[]): Result => [
@@ -98,7 +96,7 @@ function queryBalancesAccount (api: DeriveApi, accountId: AccountId, modules: st
map(([{ nonce }, ...balances]) => extract(nonce, balances as unknown as AccountData[])) map(([{ nonce }, ...balances]) => extract(nonce, balances as unknown as AccountData[]))
) )
: combineLatest([ : combineLatest([
api.query.system.accountNonce<Index>(accountId), api.query.system['accountNonce']<Index>(accountId),
...balances.map((c) => c(accountId)) ...balances.map((c) => c(accountId))
]).pipe( ]).pipe(
map(([nonce, ...balances]) => extract(nonce, balances as unknown as AccountData[])) map(([nonce, ...balances]) => extract(nonce, balances as unknown as AccountData[]))
@@ -164,7 +162,7 @@ export function account (instanceId: string, api: DeriveApi): (address: AccountI
? querySystemAccount(api, accountId) ? querySystemAccount(api, accountId)
: isFunction(api.query.balances?.account) : isFunction(api.query.balances?.account)
? queryBalancesAccount(api, accountId) ? queryBalancesAccount(api, accountId)
: isFunction(api.query.balances?.freeBalance) : isFunction(api.query.balances?.['freeBalance'])
? queryBalancesFree(api, accountId) ? queryBalancesFree(api, accountId)
: queryNonceOnly(api, accountId) : queryNonceOnly(api, accountId)
]) ])
+4 -6
View File
@@ -23,11 +23,9 @@ interface AllLocked {
vestingLocked: Balance vestingLocked: Balance
} }
type DeriveCustomLocks = DeriveApi['derive'] & { type DeriveCustomLocks = DeriveApi['derive'] & Record<string, {
[custom: string]: { customLocks?: DeriveApi['query']['balances']['locks']
customLocks?: DeriveApi['query']['balances']['locks'] }>
}
}
const VESTING_ID = '0x76657374696e6720'; const VESTING_ID = '0x76657374696e6720';
@@ -116,7 +114,7 @@ function calcBalances (api: DeriveApi, result: Result): DeriveBalancesAll {
function queryOld (api: DeriveApi, accountId: AccountId | string): Observable<ResultBalance> { function queryOld (api: DeriveApi, accountId: AccountId | string): Observable<ResultBalance> {
return combineLatest([ return combineLatest([
api.query.balances.locks(accountId), api.query.balances.locks(accountId),
api.query.balances.vesting<Option<VestingSchedule>>(accountId) api.query.balances['vesting']<Option<VestingSchedule>>(accountId)
]).pipe( ]).pipe(
map(([locks, optVesting]): ResultBalance => { map(([locks, optVesting]): ResultBalance => {
let vestingNew = null; let vestingNew = null;
@@ -11,7 +11,7 @@ import { memo } from '../util/index.js';
export function votingBalances (instanceId: string, api: DeriveApi): (addresses?: (AccountId | AccountIndex | Address | string)[]) => Observable<DeriveBalancesAccount[]> { export function votingBalances (instanceId: string, api: DeriveApi): (addresses?: (AccountId | AccountIndex | Address | string)[]) => Observable<DeriveBalancesAccount[]> {
return memo(instanceId, (addresses?: (AccountId | AccountIndex | Address | string)[]): Observable<DeriveBalancesAccount[]> => return memo(instanceId, (addresses?: (AccountId | AccountIndex | Address | string)[]): Observable<DeriveBalancesAccount[]> =>
!addresses || !addresses.length !addresses?.length
? of([] as DeriveBalancesAccount[]) ? of([] as DeriveBalancesAccount[])
: combineLatest( : combineLatest(
addresses.map((accountId): Observable<DeriveBalancesAccount> => addresses.map((accountId): Observable<DeriveBalancesAccount> =>
@@ -157,6 +157,6 @@ describe('bounties derive', () => {
expect(result).toHaveLength(2); expect(result).toHaveLength(2);
expect(result[0].proposals).toHaveLength(0); expect(result[0].proposals).toHaveLength(0);
expect(result[1].proposals).toHaveLength(1); expect(result[1].proposals).toHaveLength(1);
expect(result[1].proposals[0].proposal && result[1].proposals[0].proposal.method).toEqual('approveBounty'); expect(result[1].proposals[0].proposal?.method).toEqual('approveBounty');
}); });
}); });
+1
View File
@@ -7,6 +7,7 @@ export * from './bestNumberLag.js';
export * from './getBlock.js'; export * from './getBlock.js';
export * from './getBlockByNumber.js'; export * from './getBlockByNumber.js';
export * from './getHeader.js'; export * from './getHeader.js';
export * from './subscribeFinalizedBlocks.js';
export * from './subscribeFinalizedHeads.js'; export * from './subscribeFinalizedHeads.js';
export * from './subscribeNewBlocks.js'; export * from './subscribeNewBlocks.js';
export * from './subscribeNewHeads.js'; export * from './subscribeNewHeads.js';
+4 -4
View File
@@ -42,11 +42,11 @@ function getAuthorDetailsWithAt (header: Header, queryAt: QueryableStorage<'rxjs
if (loggedAuthor) { if (loggedAuthor) {
// use the author mapping pallet, if available (ie: moonbeam, moonriver), to map session (nimbus) key to author (collator/validator) key // use the author mapping pallet, if available (ie: moonbeam, moonriver), to map session (nimbus) key to author (collator/validator) key
if (queryAt.authorMapping?.mappingWithDeposit) { if (queryAt['authorMapping']?.['mappingWithDeposit']) {
return combineLatest([ return combineLatest([
of(header), of(header),
validators, validators,
queryAt.authorMapping.mappingWithDeposit<OptionMapping>(loggedAuthor).pipe( queryAt['authorMapping']['mappingWithDeposit']<OptionMapping>(loggedAuthor).pipe(
map((o) => map((o) =>
o.unwrapOr({ account: null }).account o.unwrapOr({ account: null }).account
) )
@@ -55,13 +55,13 @@ function getAuthorDetailsWithAt (header: Header, queryAt: QueryableStorage<'rxjs
} }
// fall back to session and parachain staking pallets, if available (ie: manta, calamari), to map session (nimbus) key to author (collator) key // fall back to session and parachain staking pallets, if available (ie: manta, calamari), to map session (nimbus) key to author (collator) key
if (queryAt.parachainStaking?.selectedCandidates && queryAt.session?.nextKeys) { if (queryAt['parachainStaking']?.['selectedCandidates'] && queryAt.session?.nextKeys) {
const loggedHex = loggedAuthor.toHex(); const loggedHex = loggedAuthor.toHex();
return combineLatest([ return combineLatest([
of(header), of(header),
validators, validators,
queryAt.parachainStaking.selectedCandidates<Vec<AccountId>>().pipe( queryAt['parachainStaking']['selectedCandidates']<Vec<AccountId>>().pipe(
mergeMap((selectedCandidates) => mergeMap((selectedCandidates) =>
combineLatest([ combineLatest([
of(selectedCandidates), of(selectedCandidates),
@@ -13,7 +13,7 @@ import { memo } from '../util/index.js';
export function getInstance (api: DeriveApi, section: string): DeriveApi['query']['council'] { export function getInstance (api: DeriveApi, section: string): DeriveApi['query']['council'] {
const instances = api.registry.getModuleInstances(api.runtimeVersion.specName, section); const instances = api.registry.getModuleInstances(api.runtimeVersion.specName, section);
const name = instances && instances.length const name = instances?.length
? instances[0] ? instances[0]
: section; : section;
+10 -10
View File
@@ -15,18 +15,18 @@ type ResultV2 = [BN, BN, BN, BN, BN, BN, BN, BN, BN, BN];
function queryConstants (api: DeriveApi): Observable<ResultV2> { function queryConstants (api: DeriveApi): Observable<ResultV2> {
return of([ return of([
// deprecated // deprecated
api.consts.contracts.callBaseFee || api.registry.createType('Balance'), api.consts.contracts['callBaseFee'] || api.registry.createType('Balance'),
api.consts.contracts.contractFee || api.registry.createType('Balance'), api.consts.contracts['contractFee'] || api.registry.createType('Balance'),
api.consts.contracts.creationFee || api.registry.createType('Balance'), api.consts.contracts['creationFee'] || api.registry.createType('Balance'),
api.consts.contracts.transactionBaseFee || api.registry.createType('Balance'), api.consts.contracts['transactionBaseFee'] || api.registry.createType('Balance'),
api.consts.contracts.transactionByteFee || api.registry.createType('Balance'), api.consts.contracts['transactionByteFee'] || api.registry.createType('Balance'),
api.consts.contracts.transferFee || api.registry.createType('Balance'), api.consts.contracts['transferFee'] || api.registry.createType('Balance'),
// current // current
api.consts.contracts.rentByteFee, api.consts.contracts['rentByteFee'] || api.registry.createType('Balance'),
api.consts.contracts.rentDepositOffset, api.consts.contracts['rentDepositOffset'] || api.registry.createType('Balance'),
api.consts.contracts.surchargeReward, api.consts.contracts['surchargeReward'] || api.registry.createType('Balance'),
api.consts.contracts.tombstoneDeposit api.consts.contracts['tombstoneDeposit'] || api.registry.createType('Balance')
]) as unknown as Observable<ResultV2>; ]) as unknown as Observable<ResultV2>;
} }
+7 -7
View File
@@ -21,22 +21,22 @@ function isVoter (value: VoteEntry): value is PalletElectionsPhragmenVoter {
} }
function retrieveStakeOf (elections: QueryableModuleStorage<'rxjs'>): Observable<[AccountId, Balance][]> { function retrieveStakeOf (elections: QueryableModuleStorage<'rxjs'>): Observable<[AccountId, Balance][]> {
return elections.stakeOf.entries<Balance, [AccountId]>().pipe( return elections['stakeOf'].entries<Balance, [AccountId]>().pipe(
map((entries) => map((entries) =>
entries.map(([{ args: [accountId] }, stake]) => [accountId, stake]) entries.map(([{ args: [accountId] }, stake]) => [accountId, stake])
) )
); );
} }
function retrieveVoteOf (elections: QueryableModuleStorage<'rxjs'>): Observable<[AccountId, AccountId[]][]> { function retrieveVoteOf (elections: DeriveApi['query']['elections']): Observable<[AccountId, AccountId[]][]> {
return elections.votesOf.entries<Vec<AccountId>, [AccountId]>().pipe( return elections['votesOf'].entries<Vec<AccountId>, [AccountId]>().pipe(
map((entries) => map((entries) =>
entries.map(([{ args: [accountId] }, votes]) => [accountId, votes]) entries.map(([{ args: [accountId] }, votes]) => [accountId, votes])
) )
); );
} }
function retrievePrev (api: DeriveApi, elections: QueryableModuleStorage<'rxjs'>): Observable<DeriveCouncilVotes> { function retrievePrev (api: DeriveApi, elections: DeriveApi['query']['elections']): Observable<DeriveCouncilVotes> {
return combineLatest([ return combineLatest([
retrieveStakeOf(elections), retrieveStakeOf(elections),
retrieveVoteOf(elections) retrieveVoteOf(elections)
@@ -63,7 +63,7 @@ function retrievePrev (api: DeriveApi, elections: QueryableModuleStorage<'rxjs'>
); );
} }
function retrieveCurrent (elections: QueryableModuleStorage<'rxjs'>): Observable<DeriveCouncilVotes> { function retrieveCurrent (elections: DeriveApi['query']['elections']): Observable<DeriveCouncilVotes> {
return elections.voting.entries<VoteEntry, [AccountId]>().pipe( return elections.voting.entries<VoteEntry, [AccountId]>().pipe(
map((entries): DeriveCouncilVotes => map((entries): DeriveCouncilVotes =>
entries.map(([{ args: [accountId] }, value]): [AccountId, DeriveCouncilVote] => [ entries.map(([{ args: [accountId] }, value]): [AccountId, DeriveCouncilVote] => [
@@ -77,11 +77,11 @@ function retrieveCurrent (elections: QueryableModuleStorage<'rxjs'>): Observable
} }
export function votes (instanceId: string, api: DeriveApi): () => Observable<DeriveCouncilVotes> { export function votes (instanceId: string, api: DeriveApi): () => Observable<DeriveCouncilVotes> {
const elections = api.query.phragmenElection || api.query.electionsPhragmen || api.query.elections; const elections = api.query.elections || api.query['phragmenElection'] || api.query['electionsPhragmen'];
return memo(instanceId, (): Observable<DeriveCouncilVotes> => return memo(instanceId, (): Observable<DeriveCouncilVotes> =>
elections elections
? elections.stakeOf ? elections['stakeOf']
? retrievePrev(api, elections) ? retrievePrev(api, elections)
: retrieveCurrent(elections) : retrieveCurrent(elections)
: of([]) : of([])
@@ -35,7 +35,7 @@ function createChildKey (info: AllInfo): string {
export function childKey (instanceId: string, api: DeriveApi): (paraId: string | number | BN) => Observable<string | null> { export function childKey (instanceId: string, api: DeriveApi): (paraId: string | number | BN) => Observable<string | null> {
return memo(instanceId, (paraId: string | number | BN): Observable<string | null> => return memo(instanceId, (paraId: string | number | BN): Observable<string | null> =>
api.query.crowdloan.funds<Option<PolkadotRuntimeCommonCrowdloanFundInfo>>(paraId).pipe( api.query['crowdloan']['funds']<Option<PolkadotRuntimeCommonCrowdloanFundInfo>>(paraId).pipe(
map((optInfo) => map((optInfo) =>
optInfo.isSome optInfo.isSome
? createChildKey(optInfo.unwrap()) ? createChildKey(optInfo.unwrap())
@@ -53,7 +53,7 @@ function isBounded (call: FrameSupportPreimagesBounded | FrameSupportScheduleMay
} }
function queryQueue (api: DeriveApi): Observable<DeriveDispatch[]> { function queryQueue (api: DeriveApi): Observable<DeriveDispatch[]> {
return api.query.democracy.dispatchQueue<Vec<ITuple<[BlockNumber, Hash, ReferendumIndex]>>>().pipe( return api.query.democracy['dispatchQueue']<Vec<ITuple<[BlockNumber, Hash, ReferendumIndex]>>>().pipe(
switchMap((dispatches) => switchMap((dispatches) =>
combineLatest([ combineLatest([
of(dispatches), of(dispatches),
@@ -142,7 +142,7 @@ export function dispatchQueue (instanceId: string, api: DeriveApi): () => Observ
return memo(instanceId, (): Observable<DeriveDispatch[]> => return memo(instanceId, (): Observable<DeriveDispatch[]> =>
isFunction(api.query.scheduler?.agenda) isFunction(api.query.scheduler?.agenda)
? queryScheduler(api) ? queryScheduler(api)
: api.query.democracy.dispatchQueue : api.query.democracy['dispatchQueue']
? queryQueue(api) ? queryQueue(api)
: of([]) : of([])
); );
@@ -20,7 +20,7 @@ type PreimageInfo = [Bytes, AccountId, Balance, BlockNumber];
type OldPreimage = ITuple<PreimageInfo>; type OldPreimage = ITuple<PreimageInfo>;
function isDemocracyPreimage (api: DeriveApi, imageOpt: Option<OldPreimage> | Option<PreimageStatus>): imageOpt is Option<PreimageStatus> { function isDemocracyPreimage (api: DeriveApi, imageOpt: Option<OldPreimage> | Option<PreimageStatus>): imageOpt is Option<PreimageStatus> {
return !!imageOpt && !api.query.democracy.dispatchQueue; return !!imageOpt && !api.query.democracy['dispatchQueue'];
} }
function constructProposal (api: DeriveApi, [bytes, proposer, balance, at]: PreimageInfo): DeriveProposalImage { function constructProposal (api: DeriveApi, [bytes, proposer, balance, at]: PreimageInfo): DeriveProposalImage {
@@ -79,7 +79,7 @@ function parseImage (api: DeriveApi, [proposalHash, status, bytes]: [HexString,
function getDemocracyImages (api: DeriveApi, bounded: (Hash | Uint8Array | string | FrameSupportPreimagesBounded)[]): Observable<(DeriveProposalImage | undefined)[]> { function getDemocracyImages (api: DeriveApi, bounded: (Hash | Uint8Array | string | FrameSupportPreimagesBounded)[]): Observable<(DeriveProposalImage | undefined)[]> {
const hashes = bounded.map((b) => getImageHashBounded(b)); const hashes = bounded.map((b) => getImageHashBounded(b));
return api.query.democracy.preimages.multi<Option<PreimageStatus>>(hashes).pipe( return api.query.democracy['preimages'].multi<Option<PreimageStatus>>(hashes).pipe(
map((images): (DeriveProposalImage | undefined)[] => map((images): (DeriveProposalImage | undefined)[] =>
images.map((imageOpt) => parseDemocracy(api, imageOpt)) images.map((imageOpt) => parseDemocracy(api, imageOpt))
) )
@@ -127,7 +127,7 @@ function getImages (api: DeriveApi, bounded: (FrameSupportPreimagesBounded | Uin
export function preimages (instanceId: string, api: DeriveApi): (hashes: (Hash | Uint8Array | string | FrameSupportPreimagesBounded)[]) => Observable<(DeriveProposalImage | undefined)[]> { export function preimages (instanceId: string, api: DeriveApi): (hashes: (Hash | Uint8Array | string | FrameSupportPreimagesBounded)[]) => Observable<(DeriveProposalImage | undefined)[]> {
return memo(instanceId, (hashes: (Hash | Uint8Array | string | FrameSupportPreimagesBounded)[]): Observable<(DeriveProposalImage | undefined)[]> => return memo(instanceId, (hashes: (Hash | Uint8Array | string | FrameSupportPreimagesBounded)[]): Observable<(DeriveProposalImage | undefined)[]> =>
hashes.length hashes.length
? isFunction(api.query.democracy.preimages) ? isFunction(api.query.democracy['preimages'])
? getDemocracyImages(api, hashes) ? getDemocracyImages(api, hashes)
: isFunction(api.query.preimage.preimageFor) : isFunction(api.query.preimage.preimageFor)
? getImages(api, hashes) ? getImages(api, hashes)
@@ -23,7 +23,6 @@ type Result = [Proposals, (DeriveProposalImage | undefined)[], Depositors[]];
function isNewDepositors (depositors: ITuple<[Vec<AccountId>, Balance]> | ITuple<[Balance, Vec<AccountId>]>): depositors is ITuple<[Vec<AccountId>, Balance]> { function isNewDepositors (depositors: ITuple<[Vec<AccountId>, Balance]> | ITuple<[Balance, Vec<AccountId>]>): depositors is ITuple<[Vec<AccountId>, Balance]> {
// Detect balance... // Detect balance...
// eslint-disable-next-line @typescript-eslint/unbound-method
return isFunction((depositors[1] as Balance).mul); return isFunction((depositors[1] as Balance).mul);
} }
@@ -20,12 +20,12 @@ type VotingDirect = PalletDemocracyVoteVoting['asDirect'];
type VotingDirectVote = VotingDirect['votes'][0]; type VotingDirectVote = VotingDirect['votes'][0];
function votesPrev (api: DeriveApi, referendumId: BN): Observable<DeriveReferendumVote[]> { function votesPrev (api: DeriveApi, referendumId: BN): Observable<DeriveReferendumVote[]> {
return api.query.democracy.votersFor<Vec<AccountId>>(referendumId).pipe( return api.query.democracy['votersFor']<Vec<AccountId>>(referendumId).pipe(
switchMap((votersFor): Observable<[Vec<AccountId>, Vote[], DeriveBalancesAccount[]]> => switchMap((votersFor): Observable<[Vec<AccountId>, Vote[], DeriveBalancesAccount[]]> =>
combineLatest([ combineLatest([
of(votersFor), of(votersFor),
votersFor.length votersFor.length
? api.query.democracy.voteOf.multi<Vote>( ? api.query.democracy['voteOf'].multi<Vote>(
votersFor.map((accountId): [BN | number, AccountId] => votersFor.map((accountId): [BN | number, AccountId] =>
[referendumId, accountId] [referendumId, accountId]
) )
+12 -10
View File
@@ -47,20 +47,22 @@ function sortAccounts ([, balanceA]: [AccountId32, Balance], [, balanceB]: [Acco
function getConstants (api: DeriveApi, elections: string | null): Partial<DeriveElectionsInfo> { function getConstants (api: DeriveApi, elections: string | null): Partial<DeriveElectionsInfo> {
return elections return elections
? { ? {
candidacyBond: api.consts[elections].candidacyBond as Balance, candidacyBond: api.consts[elections as 'elections'].candidacyBond as Balance,
desiredRunnersUp: api.consts[elections].desiredRunnersUp as u32, desiredRunnersUp: api.consts[elections as 'elections'].desiredRunnersUp as u32,
desiredSeats: api.consts[elections].desiredMembers as u32, desiredSeats: api.consts[elections as 'elections'].desiredMembers as u32,
termDuration: api.consts[elections].termDuration as BlockNumber, termDuration: api.consts[elections as 'elections'].termDuration as BlockNumber,
votingBond: api.consts[elections].votingBond as Balance votingBond: api.consts[elections as 'elections']['votingBond'] as Balance,
votingBondBase: api.consts[elections as 'elections'].votingBondBase as Balance,
votingBondFactor: api.consts[elections as 'elections'].votingBondFactor as Balance
} }
: {}; : {};
} }
function getModules (api: DeriveApi): [string, string | null] { function getModules (api: DeriveApi): [string, string | null] {
const [council] = api.registry.getModuleInstances(api.runtimeVersion.specName, 'council') || ['council']; const [council] = api.registry.getModuleInstances(api.runtimeVersion.specName, 'council') || ['council'];
const elections = api.query.phragmenElection const elections = api.query['phragmenElection']
? 'phragmenElection' ? 'phragmenElection'
: api.query.electionsPhragmen : api.query['electionsPhragmen']
? 'electionsPhragmen' ? 'electionsPhragmen'
: api.query.elections : api.query.elections
? 'elections' ? 'elections'
@@ -72,9 +74,9 @@ function getModules (api: DeriveApi): [string, string | null] {
function queryAll (api: DeriveApi, council: string, elections: string): Observable<[AccountId32[], Candidate[], Member[], Member[]]> { function queryAll (api: DeriveApi, council: string, elections: string): Observable<[AccountId32[], Candidate[], Member[], Member[]]> {
return api.queryMulti<[Vec<AccountId32>, Vec<Candidate>, Vec<Member>, Vec<Member>]>([ return api.queryMulti<[Vec<AccountId32>, Vec<Candidate>, Vec<Member>, Vec<Member>]>([
api.query[council as 'council'].members, api.query[council as 'council'].members,
api.query[elections as 'phragmenElection'].candidates, api.query[elections as 'elections'].candidates,
api.query[elections as 'phragmenElection'].members, api.query[elections as 'elections'].members,
api.query[elections as 'phragmenElection'].runnersUp api.query[elections as 'elections'].runnersUp
]); ]);
} }
@@ -17,4 +17,6 @@ export interface DeriveElectionsInfo {
voteCount?: VoteIndex; voteCount?: VoteIndex;
voterCount?: SetIndex; voterCount?: SetIndex;
votingBond?: Balance; votingBond?: Balance;
votingBondBase?: Balance;
votingBondFactor?: Balance;
} }
@@ -2,9 +2,9 @@
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs'; import type { Observable } from 'rxjs';
import type { Option, u32, WrapperOpaque } from '@polkadot/types'; import type { Option, u32 } from '@polkadot/types';
import type { AccountId } from '@polkadot/types/interfaces'; import type { AccountId } from '@polkadot/types/interfaces';
import type { PalletImOnlineBoundedOpaqueNetworkState } from '@polkadot/types/lookup'; import type { Codec } from '@polkadot/types/types';
import type { DeriveApi, DeriveHeartbeats } from '../types.js'; import type { DeriveApi, DeriveHeartbeats } from '../types.js';
import { combineLatest, map, of, switchMap } from 'rxjs'; import { combineLatest, map, of, switchMap } from 'rxjs';
@@ -13,9 +13,9 @@ import { BN_ZERO } from '@polkadot/util';
import { memo } from '../util/index.js'; import { memo } from '../util/index.js';
type HeartbeatsOpt = Option<WrapperOpaque<PalletImOnlineBoundedOpaqueNetworkState>>; type Result = [DeriveHeartbeats, AccountId[], Option<Codec>[], u32[]];
function mapResult ([result, validators, heartbeats, numBlocks]: [DeriveHeartbeats, AccountId[], HeartbeatsOpt[], u32[]]): DeriveHeartbeats { function mapResult ([result, validators, heartbeats, numBlocks]: Result): DeriveHeartbeats {
validators.forEach((validator, index): void => { validators.forEach((validator, index): void => {
const validatorId = validator.toString(); const validatorId = validator.toString();
const blockCount = numBlocks[index]; const blockCount = numBlocks[index];
@@ -41,7 +41,7 @@ export function receivedHeartbeats (instanceId: string, api: DeriveApi): () => O
return memo(instanceId, (): Observable<DeriveHeartbeats> => return memo(instanceId, (): Observable<DeriveHeartbeats> =>
api.query.imOnline?.receivedHeartbeats api.query.imOnline?.receivedHeartbeats
? api.derive.staking.overview().pipe( ? api.derive.staking.overview().pipe(
switchMap(({ currentIndex, validators }): Observable<[DeriveHeartbeats, AccountId[], HeartbeatsOpt[], u32[]]> => switchMap(({ currentIndex, validators }): Observable<Result> =>
combineLatest([ combineLatest([
of({}), of({}),
of(validators), of(validators),
+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: '10.8.1' }; export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '10.10.1' };
+9 -9
View File
@@ -75,16 +75,16 @@ function parse (id: ParaId, [active, retryQueue, selectedThreads, didUpdate, inf
export function info (instanceId: string, api: DeriveApi): (id: ParaId | number) => Observable<DeriveParachainFull | null> { export function info (instanceId: string, api: DeriveApi): (id: ParaId | number) => Observable<DeriveParachainFull | null> {
return memo(instanceId, (id: ParaId | number): Observable<DeriveParachainFull | null> => return memo(instanceId, (id: ParaId | number): Observable<DeriveParachainFull | null> =>
api.query.registrar && api.query.parachains api.query['registrar'] && api.query['parachains']
? api.queryMulti<Result>([ ? api.queryMulti<Result>([
api.query.registrar.active, api.query['registrar']['active'],
api.query.registrar.retryQueue, api.query['registrar']['retryQueue'],
api.query.registrar.selectedThreads, api.query['registrar']['selectedThreads'],
api.query.parachains.didUpdate, api.query['parachains']['didUpdate'],
[api.query.registrar.paras, id], [api.query['registrar']['paras'], id],
[api.query.registrar.pendingSwap, id], [api.query['registrar']['pendingSwap'], id],
[api.query.parachains.heads, id], [api.query['parachains']['heads'], id],
[api.query.parachains.relayDispatchQueue, id] [api.query['parachains']['relayDispatchQueue'], id]
]) ])
.pipe( .pipe(
map((result: Result): DeriveParachainFull | null => map((result: Result): DeriveParachainFull | null =>
@@ -16,12 +16,12 @@ import { didUpdateToBool } from './util.js';
type Result = [ type Result = [
ParaId[], ParaId[],
DidUpdate, DidUpdate,
RelayDispatchQueueSize[],
ParaInfoResult[], ParaInfoResult[],
PendingSwap[], PendingSwap[]
RelayDispatchQueueSize[]
]; ];
function parse ([ids, didUpdate, infos, pendingSwaps, relayDispatchQueueSizes]: Result): DeriveParachain[] { function parse ([ids, didUpdate, relayDispatchQueueSizes, infos, pendingSwaps]: Result): DeriveParachain[] {
return ids.map((id, index): DeriveParachain => ({ return ids.map((id, index): DeriveParachain => ({
didUpdate: didUpdateToBool(didUpdate, id), didUpdate: didUpdateToBool(didUpdate, id),
id, id,
@@ -33,15 +33,15 @@ function parse ([ids, didUpdate, infos, pendingSwaps, relayDispatchQueueSizes]:
export function overview (instanceId: string, api: DeriveApi): () => Observable<DeriveParachain[]> { export function overview (instanceId: string, api: DeriveApi): () => Observable<DeriveParachain[]> {
return memo(instanceId, (): Observable<DeriveParachain[]> => return memo(instanceId, (): Observable<DeriveParachain[]> =>
api.query.registrar?.parachains && api.query.parachains api.query['registrar']?.['parachains'] && api.query['parachains']
? api.query.registrar.parachains<ParaId[]>().pipe( ? api.query['registrar']['parachains']<ParaId[]>().pipe(
switchMap((paraIds) => switchMap((paraIds) =>
combineLatest([ combineLatest([
of(paraIds), of(paraIds),
api.query.parachains.didUpdate<DidUpdate>(), api.query['parachains']['didUpdate']<DidUpdate>(),
api.query.registrar.paras.multi<ParaInfoResult>(paraIds), api.query['parachains']['relayDispatchQueueSize'].multi<RelayDispatchQueueSize>(paraIds),
api.query.registrar.pendingSwap.multi<PendingSwap>(paraIds), api.query['registrar']['paras'].multi<ParaInfoResult>(paraIds),
api.query.parachains.relayDispatchQueueSize.multi<RelayDispatchQueueSize>(paraIds) api.query['registrar']['pendingSwap'].multi<PendingSwap>(paraIds)
]) ])
), ),
map(parse) map(parse)
+44 -21
View File
@@ -2,10 +2,10 @@
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs'; import type { Observable } from 'rxjs';
import type { BalanceOf } from '@polkadot/types/interfaces'; import type { AccountId32, BalanceOf } from '@polkadot/types/interfaces';
import type { PalletSocietyBid, PalletSocietyBidKind } from '@polkadot/types/lookup'; import type { PalletSocietyBid, PalletSocietyBidKind, PalletSocietyCandidacy } from '@polkadot/types/lookup';
import type { ITuple } from '@polkadot/types/types'; import type { ITuple } from '@polkadot/types/types';
import type { Option } from '@polkadot/types-codec'; import type { Option, Vec } from '@polkadot/types-codec';
import type { DeriveApi, DeriveSocietyCandidate } from '../types.js'; import type { DeriveApi, DeriveSocietyCandidate } from '../types.js';
import { combineLatest, map, of, switchMap } from 'rxjs'; import { combineLatest, map, of, switchMap } from 'rxjs';
@@ -15,28 +15,51 @@ import { memo } from '../util/index.js';
type ResultSuspend = Option<ITuple<[BalanceOf, PalletSocietyBidKind]>>; type ResultSuspend = Option<ITuple<[BalanceOf, PalletSocietyBidKind]>>;
type Result = [PalletSocietyBid[], ResultSuspend[]] type Result = [PalletSocietyBid[], ResultSuspend[]]
function getPrev (api: DeriveApi): Observable<DeriveSocietyCandidate[]> {
return api.query.society.candidates<Vec<PalletSocietyBid>>().pipe(
switchMap((candidates): Observable<Result> =>
combineLatest([
of(candidates),
api.query.society['suspendedCandidates'].multi<Option<ITuple<[BalanceOf, PalletSocietyBidKind]>>>(
candidates.map(({ who }) => who)
)
])
),
map(([candidates, suspended]: Result): DeriveSocietyCandidate[] =>
candidates.map(({ kind, value, who }, index) => ({
accountId: who,
isSuspended: suspended[index].isSome,
kind,
value
}))
)
);
}
function getCurr (api: DeriveApi) {
return api.query.society.candidates.entries().pipe(
map((entries) =>
entries
.filter(([, opt]) => opt.isSome)
.map(([{ args: [accountId] }, opt]): [AccountId32, PalletSocietyCandidacy] => [accountId, opt.unwrap()])
// FIXME We are missing the new fields from the candidate record
.map(([accountId, { bid, kind }]) => ({
accountId,
isSuspended: false,
kind,
value: bid
}))
)
);
}
/** /**
* @description Get the candidate info for a society * @description Get the candidate info for a society
*/ */
export function candidates (instanceId: string, api: DeriveApi): () => Observable<DeriveSocietyCandidate[]> { export function candidates (instanceId: string, api: DeriveApi): () => Observable<DeriveSocietyCandidate[]> {
return memo(instanceId, (): Observable<DeriveSocietyCandidate[]> => return memo(instanceId, (): Observable<DeriveSocietyCandidate[]> =>
api.query.society.candidates().pipe( api.query.society['suspendedCandidates'] && api.query.society.candidates.creator.meta.type.isPlain
switchMap((candidates): Observable<Result> => ? getPrev(api)
combineLatest([ : getCurr(api)
of(candidates),
api.query.society.suspendedCandidates.multi(
candidates.map(({ who }) => who)
)
])
),
map(([candidates, suspended]: Result): DeriveSocietyCandidate[] =>
candidates.map(({ kind, value, who }, index) => ({
accountId: who,
isSuspended: suspended[index].isSome,
kind,
value
}))
)
)
); );
} }
+15 -11
View File
@@ -7,30 +7,34 @@ import type { AccountId, BalanceOf } from '@polkadot/types/interfaces';
import type { PalletSocietyBid } from '@polkadot/types/lookup'; import type { PalletSocietyBid } from '@polkadot/types/lookup';
import type { DeriveApi, DeriveSociety } from '../types.js'; import type { DeriveApi, DeriveSociety } from '../types.js';
import { map } from 'rxjs'; import { combineLatest, map, of } from 'rxjs';
import { memo } from '../util/index.js'; import { memo } from '../util/index.js';
type Result = [Vec<PalletSocietyBid>, Option<AccountId>, Option<AccountId>, Option<AccountId>, u32, BalanceOf] type Result = [Vec<PalletSocietyBid>, Option<AccountId> | undefined, Option<AccountId>, Option<AccountId>, u32 | undefined, BalanceOf]
/** /**
* @description Get the overall info for a society * @description Get the overall info for a society
*/ */
export function info (instanceId: string, api: DeriveApi): () => Observable<DeriveSociety> { export function info (instanceId: string, api: DeriveApi): () => Observable<DeriveSociety> {
return memo(instanceId, (): Observable<DeriveSociety> => return memo(instanceId, (): Observable<DeriveSociety> =>
api.queryMulti<Result>([ combineLatest<Result>([
api.query.society.bids, api.query.society.bids(),
api.query.society.defender, api.query.society['defender']
api.query.society.founder, ? api.query.society['defender']<Option<AccountId>>()
api.query.society.head, : of(undefined),
api.query.society.maxMembers, api.query.society.founder(),
api.query.society.pot api.query.society.head(),
api.query.society['maxMembers']
? api.query.society['maxMembers']<u32>()
: of(undefined),
api.query.society.pot()
]).pipe( ]).pipe(
map(([bids, defender, founder, head, maxMembers, pot]: Result): DeriveSociety => ({ map(([bids, defender, founder, head, maxMembers, pot]: Result): DeriveSociety => ({
bids, bids,
defender: defender.unwrapOr(undefined), defender: defender?.unwrapOr(undefined),
founder: founder.unwrapOr(undefined), founder: founder.unwrapOr(undefined),
hasDefender: (defender.isSome && head.isSome && !head.eq(defender)) || false, hasDefender: (defender?.isSome && head.isSome && !head.eq(defender)) || false,
head: head.unwrapOr(undefined), head: head.unwrapOr(undefined),
maxMembers, maxMembers,
pot pot
+76 -23
View File
@@ -3,34 +3,79 @@
import type { Observable } from 'rxjs'; import type { Observable } from 'rxjs';
import type { AccountId } from '@polkadot/types/interfaces'; import type { AccountId } from '@polkadot/types/interfaces';
import type { PalletSocietyVote, PalletSocietyVouchingStatus } from '@polkadot/types/lookup';
import type { ITuple } from '@polkadot/types/types';
import type { bool, Option, u32, u128, Vec } from '@polkadot/types-codec';
import type { DeriveApi, DeriveSocietyMember } from '../types.js'; import type { DeriveApi, DeriveSocietyMember } from '../types.js';
import { combineLatest, map, of, switchMap } from 'rxjs'; import { combineLatest, map, of, switchMap } from 'rxjs';
import { memo } from '../util/index.js'; import { memo } from '../util/index.js';
function _membersPrev (api: DeriveApi, accountIds: AccountId[]): Observable<DeriveSocietyMember[]> {
return combineLatest([
of(accountIds),
api.query.society.payouts.multi<Vec<ITuple<[u32, u128]>>>(accountIds),
api.query.society['strikes'].multi<u32>(accountIds),
api.query.society.defenderVotes.multi<Option<PalletSocietyVote>>(accountIds),
api.query.society.suspendedMembers.multi<bool>(accountIds),
api.query.society['vouching'].multi<Option<PalletSocietyVouchingStatus>>(accountIds)
]).pipe(
map(([accountIds, payouts, strikes, defenderVotes, suspended, vouching]) =>
accountIds.map((accountId, index) => ({
accountId,
isDefenderVoter: defenderVotes[index].isSome,
isSuspended: suspended[index].isTrue,
payouts: payouts[index],
strikes: strikes[index],
vote: defenderVotes[index].unwrapOr(undefined),
vouching: vouching[index].unwrapOr(undefined)
}))
)
);
}
function _membersCurr (api: DeriveApi, accountIds: AccountId[]): Observable<DeriveSocietyMember[]> {
return combineLatest([
of(accountIds),
api.query.society.members.multi(accountIds),
api.query.society.payouts.multi(accountIds),
api.query.society.defenderVotes.multi(accountIds),
api.query.society.suspendedMembers.multi(accountIds)
]).pipe(
map(([accountIds, members, payouts, defenderVotes, suspendedMembers]) =>
accountIds
.map((accountId, index) =>
members[index].isSome
? {
accountId,
isDefenderVoter: defenderVotes[index].isSome
? defenderVotes[index].unwrap().approve.isTrue
: false,
isSuspended: suspendedMembers[index].isSome,
member: members[index].unwrap(),
payouts: payouts[index].payouts
}
: null
)
.filter((m): m is NonNullable<typeof m> => !!m)
.map(({ accountId, isDefenderVoter, isSuspended, member, payouts }) => ({
accountId,
isDefenderVoter,
isSuspended,
payouts,
strikes: member.strikes,
vouching: member.vouching.unwrapOr(undefined)
}))
)
);
}
export function _members (instanceId: string, api: DeriveApi): (accountIds: AccountId[]) => Observable<DeriveSocietyMember[]> { export function _members (instanceId: string, api: DeriveApi): (accountIds: AccountId[]) => Observable<DeriveSocietyMember[]> {
return memo(instanceId, (accountIds: AccountId[]): Observable<DeriveSocietyMember[]> => return memo(instanceId, (accountIds: AccountId[]): Observable<DeriveSocietyMember[]> =>
combineLatest([ api.query.society.members.creator.meta.type.isMap
of(accountIds), ? _membersCurr(api, accountIds)
api.query.society.payouts.multi(accountIds), : _membersPrev(api, accountIds)
api.query.society.strikes.multi(accountIds),
api.query.society.defenderVotes.multi(accountIds),
api.query.society.suspendedMembers.multi(accountIds),
api.query.society.vouching.multi(accountIds)
]).pipe(
map(([accountIds, payouts, strikes, defenderVotes, suspended, vouching]) =>
accountIds.map((accountId, index) => ({
accountId,
isDefenderVoter: defenderVotes[index].isSome,
isSuspended: suspended[index].isTrue,
payouts: payouts[index],
strikes: strikes[index],
vote: defenderVotes[index].unwrapOr(undefined),
vouching: vouching[index].unwrapOr(undefined)
}))
)
)
); );
} }
@@ -39,8 +84,16 @@ export function _members (instanceId: string, api: DeriveApi): (accountIds: Acco
*/ */
export function members (instanceId: string, api: DeriveApi): () => Observable<DeriveSocietyMember[]> { export function members (instanceId: string, api: DeriveApi): () => Observable<DeriveSocietyMember[]> {
return memo(instanceId, (): Observable<DeriveSocietyMember[]> => return memo(instanceId, (): Observable<DeriveSocietyMember[]> =>
api.query.society.members().pipe( api.query.society.members.creator.meta.type.isMap
switchMap((members) => api.derive.society._members(members)) ? api.query.society.members.keys().pipe(
) switchMap((keys) =>
api.derive.society._members(
keys.map(({ args: [accountId] }) => accountId)
)
)
)
: api.query.society.members<Vec<AccountId>>().pipe(
switchMap((members) => api.derive.society._members(members))
)
); );
} }
+1 -1
View File
@@ -11,7 +11,7 @@ export interface DeriveSociety {
hasDefender: boolean; hasDefender: boolean;
head?: AccountId | undefined; head?: AccountId | undefined;
founder?: AccountId | undefined; founder?: AccountId | undefined;
maxMembers: u32; maxMembers?: u32 | undefined;
pot: BalanceOf; pot: BalanceOf;
} }
+6 -4
View File
@@ -39,8 +39,10 @@ export function setEraMultiCache <T extends { era: EraIndex }> (CACHE_KEY: strin
} }
export function filterCachedEras <T extends { era: EraIndex }> (eras: EraIndex[], cached: T[], query: T[]): T[] { export function filterCachedEras <T extends { era: EraIndex }> (eras: EraIndex[], cached: T[], query: T[]): T[] {
return eras.map((e) => return eras
cached.find(({ era }) => e.eq(era)) || .map((e) =>
query.find(({ era }) => e.eq(era)) as T cached.find(({ era }) => e.eq(era)) ||
); query.find(({ era }) => e.eq(era))
)
.filter((e): e is T => !!e);
} }
@@ -19,7 +19,7 @@ export function erasHistoric (instanceId: string, api: DeriveApi): (withActive?:
api.query.staking.activeEra(), api.query.staking.activeEra(),
api.consts.staking.historyDepth api.consts.staking.historyDepth
? of(api.consts.staking.historyDepth) ? of(api.consts.staking.historyDepth)
: api.query.staking.historyDepth<u32>() : api.query.staking['historyDepth']<u32>()
]).pipe( ]).pipe(
map(([activeEraOpt, historyDepth]): EraIndex[] => { map(([activeEraOpt, historyDepth]): EraIndex[] => {
const result: EraIndex[] = []; const result: EraIndex[] = [];
+2 -2
View File
@@ -38,8 +38,8 @@ export function keysMulti (instanceId: string, api: DeriveApi): (stashIds: (Uint
switchMap((queuedKeys) => switchMap((queuedKeys) =>
combineLatest([ combineLatest([
of(queuedKeys), of(queuedKeys),
api.consts.session?.dedupKeyPrefix api.consts['session']?.['dedupKeyPrefix']
? api.query.session.nextKeys.multi(stashIds.map((s) => [api.consts.session.dedupKeyPrefix, s])) ? api.query.session.nextKeys.multi(stashIds.map((s) => [api.consts['session']['dedupKeyPrefix'], s]))
: combineLatest(stashIds.map((s) => api.query.session.nextKeys(s))) : combineLatest(stashIds.map((s) => api.query.session.nextKeys(s)))
]) ])
), ),
+1 -1
View File
@@ -14,7 +14,7 @@ import { firstMemo, memo } from '../util/index.js';
function parseDetails (stashId: AccountId, controllerIdOpt: Option<AccountId> | null, nominatorsOpt: Option<PalletStakingNominations>, rewardDestination: PalletStakingRewardDestination, validatorPrefs: PalletStakingValidatorPrefs, exposure: PalletStakingExposure, stakingLedgerOpt: Option<PalletStakingStakingLedger>): DeriveStakingQuery { function parseDetails (stashId: AccountId, controllerIdOpt: Option<AccountId> | null, nominatorsOpt: Option<PalletStakingNominations>, rewardDestination: PalletStakingRewardDestination, validatorPrefs: PalletStakingValidatorPrefs, exposure: PalletStakingExposure, stakingLedgerOpt: Option<PalletStakingStakingLedger>): DeriveStakingQuery {
return { return {
accountId: stashId, accountId: stashId,
controllerId: controllerIdOpt && controllerIdOpt.unwrapOr(null), controllerId: controllerIdOpt?.unwrapOr(null) || null,
exposure, exposure,
nominators: nominatorsOpt.isSome nominators: nominatorsOpt.isSome
? nominatorsOpt.unwrap().targets ? nominatorsOpt.unwrap().targets
@@ -167,10 +167,12 @@ export function _stakerRewards (instanceId: string, api: DeriveApi): (accountIds
queries.map(({ stakingLedger }, index): DeriveStakerReward[] => queries.map(({ stakingLedger }, index): DeriveStakerReward[] =>
filterRewards( filterRewards(
eras, eras,
stashValidators[index].map((validatorId): [string, DeriveStakingQuery] => [ stashValidators[index]
validatorId, .map((validatorId): [string, DeriveStakingQuery | undefined] => [
queriedVals.find((q) => q.accountId.eq(validatorId)) as DeriveStakingQuery validatorId,
]), queriedVals.find((q) => q.accountId.eq(validatorId))
])
.filter((v): v is [string, DeriveStakingQuery] => !!v[1]),
{ {
rewards: allRewards[index], rewards: allRewards[index],
stakingLedger stakingLedger
@@ -18,7 +18,7 @@ export function nextElected (instanceId: string, api: DeriveApi): () => Observab
switchMap(({ currentEra }) => api.query.staking.erasStakers.keys(currentEra)), switchMap(({ currentEra }) => api.query.staking.erasStakers.keys(currentEra)),
map((keys) => keys.map(({ args: [, accountId] }) => accountId)) map((keys) => keys.map(({ args: [, accountId] }) => accountId))
) )
: api.query.staking.currentElected<AccountId[]>() : api.query.staking['currentElected']<AccountId[]>()
); );
} }
@@ -3,7 +3,7 @@
import type { ApiPromise } from '@polkadot/api'; import type { ApiPromise } from '@polkadot/api';
import type { Bounty, BountyIndex } from '@polkadot/types/interfaces'; import type { Bounty, BountyIndex } from '@polkadot/types/interfaces';
import type { Codec, Constructor, InterfaceTypes, Registry } from '@polkadot/types/types'; import type { Codec, CodecClass, InterfaceTypes, Registry } from '@polkadot/types/types';
import { Option, StorageKey } from '@polkadot/types'; import { Option, StorageKey } from '@polkadot/types';
@@ -29,7 +29,7 @@ export class BountyFactory {
this.#registry.createType('Bounty'); this.#registry.createType('Bounty');
public optionOf = <T extends Codec>(value: T): Option<T> => { public optionOf = <T extends Codec>(value: T): Option<T> => {
const typeName = this.#registry.getClassName(value.constructor as Constructor<T>); const typeName = this.#registry.getClassName(value.constructor as CodecClass<T>);
return new Option<T>(this.#registry, typeName as keyof InterfaceTypes, value); return new Option<T>(this.#registry, typeName as keyof InterfaceTypes, value);
}; };
+1 -1
View File
@@ -6,7 +6,7 @@ import type { BlockNumber } from '@polkadot/types/interfaces';
import { isCompact } from '@polkadot/util'; import { isCompact } from '@polkadot/util';
type CompatHeader = { number: Compact<BlockNumber> | BlockNumber }; interface CompatHeader { number: Compact<BlockNumber> | BlockNumber }
export function unwrapBlockNumber (hdr: CompatHeader): BlockNumber { export function unwrapBlockNumber (hdr: CompatHeader): BlockNumber {
return isCompact<BlockNumber>(hdr.number) return isCompact<BlockNumber>(hdr.number)
+18 -18
View File
@@ -18,29 +18,29 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "10.8.1", "version": "10.10.1",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@polkadot/api-augment": "10.8.1", "@polkadot/api-augment": "10.10.1",
"@polkadot/api-base": "10.8.1", "@polkadot/api-base": "10.10.1",
"@polkadot/api-derive": "10.8.1", "@polkadot/api-derive": "10.10.1",
"@polkadot/keyring": "^12.2.2", "@polkadot/keyring": "^12.5.1",
"@polkadot/rpc-augment": "10.8.1", "@polkadot/rpc-augment": "10.10.1",
"@polkadot/rpc-core": "10.8.1", "@polkadot/rpc-core": "10.10.1",
"@polkadot/rpc-provider": "10.8.1", "@polkadot/rpc-provider": "10.10.1",
"@polkadot/types": "10.8.1", "@polkadot/types": "10.10.1",
"@polkadot/types-augment": "10.8.1", "@polkadot/types-augment": "10.10.1",
"@polkadot/types-codec": "10.8.1", "@polkadot/types-codec": "10.10.1",
"@polkadot/types-create": "10.8.1", "@polkadot/types-create": "10.10.1",
"@polkadot/types-known": "10.8.1", "@polkadot/types-known": "10.10.1",
"@polkadot/util": "^12.2.2", "@polkadot/util": "^12.5.1",
"@polkadot/util-crypto": "^12.2.2", "@polkadot/util-crypto": "^12.5.1",
"eventemitter3": "^5.0.1", "eventemitter3": "^5.0.1",
"rxjs": "^7.8.1", "rxjs": "^7.8.1",
"tslib": "^2.5.3" "tslib": "^2.6.2"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/api-augment": "10.8.1", "@polkadot/api-augment": "10.10.1",
"@polkadot/types-support": "10.8.1" "@polkadot/types-support": "10.10.1"
} }
} }
+4
View File
@@ -0,0 +1,4 @@
// Copyright 2017-2023 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@polkadot/api-augment';
+4 -1
View File
@@ -404,7 +404,10 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
const decorateFn = (section: string, method: string): unknown => { const decorateFn = (section: string, method: string): unknown => {
const source = rpc[section as 'chain'][method as 'getHeader']; const source = rpc[section as 'chain'][method as 'getHeader'];
const fn = decorateMethod(source, { methodName: method }) as Record<string, unknown>; const fn = decorateMethod(source, { methodName: method }) as {
meta: unknown;
raw: unknown;
};
fn.meta = source.meta; fn.meta = source.meta;
fn.raw = decorateMethod(source.raw, { methodName: method }) as unknown; fn.raw = decorateMethod(source.raw, { methodName: method }) as unknown;
+3 -4
View File
@@ -1,8 +1,7 @@
// Copyright 2017-2023 @polkadot/api authors & contributors // Copyright 2017-2023 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import type { RpcInterface } from '@polkadot/rpc-core/types'; import type { RpcCoreStats, RpcInterface } from '@polkadot/rpc-core/types';
import type { ProviderInterface } from '@polkadot/rpc-provider/types';
import type { Text } from '@polkadot/types'; import type { Text } from '@polkadot/types';
import type { Hash, RuntimeVersion } from '@polkadot/types/interfaces'; import type { Hash, RuntimeVersion } from '@polkadot/types/interfaces';
import type { Metadata } from '@polkadot/types/metadata'; import type { Metadata } from '@polkadot/types/metadata';
@@ -201,8 +200,8 @@ export abstract class Getters<ApiType extends ApiTypes> extends Init<ApiType> im
/** /**
* @description Returns the underlying provider stats * @description Returns the underlying provider stats
*/ */
public get stats (): ProviderInterface['stats'] | undefined { public get stats (): RpcCoreStats | undefined {
return this._rpcCore.provider.stats; return this._rpcCore.stats;
} }
/** /**
+23 -8
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 { assertReturn, BN_ZERO, isUndefined, logger, objectSpread, u8aEq, u8aToHex, u8aToU8a } from '@polkadot/util'; import { assertReturn, BN_ZERO, isUndefined, logger, noop, objectSpread, u8aEq, u8aToHex, u8aToU8a } from '@polkadot/util';
import { cryptoWaitReady } from '@polkadot/util-crypto'; import { cryptoWaitReady } from '@polkadot/util-crypto';
import { Decorate } from './Decorate.js'; import { Decorate } from './Decorate.js';
@@ -77,8 +77,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
// 'connected' event, then the `on('connected')` won't fire anymore. To // 'connected' event, then the `on('connected')` won't fire anymore. To
// cater for this case, we call manually `this._onProviderConnect`. // cater for this case, we call manually `this._onProviderConnect`.
if (this._rpcCore.provider.isConnected) { if (this._rpcCore.provider.isConnected) {
// eslint-disable-next-line @typescript-eslint/no-floating-promises this.#onProviderConnect().catch(noop);
this.#onProviderConnect();
} }
} }
@@ -129,8 +128,13 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
const metadata = new Metadata(registry, const metadata = new Metadata(registry,
await firstValueFrom(this._rpcCore.state.getMetadata.raw<HexString>(header.parentHash)) await firstValueFrom(this._rpcCore.state.getMetadata.raw<HexString>(header.parentHash))
); );
const runtimeChain = this._runtimeChain;
this._initRegistry(registry, this._runtimeChain as Text, version, metadata); if (!runtimeChain) {
throw new Error('Invalid initializion order, runtimeChain is not available');
}
this._initRegistry(registry, runtimeChain, version, metadata);
// add our new registry // add our new registry
const result = { counter: 0, lastBlockHash: blockHash, metadata, registry, runtimeVersion: version }; const result = { counter: 0, lastBlockHash: blockHash, metadata, registry, runtimeVersion: version };
@@ -300,12 +304,17 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
// update the default registry version // update the default registry version
const thisRegistry = this._getDefaultRegistry(); const thisRegistry = this._getDefaultRegistry();
const runtimeChain = this._runtimeChain;
if (!runtimeChain) {
throw new Error('Invalid initializion order, runtimeChain is not available');
}
// setup the data as per the current versions // setup the data as per the current versions
thisRegistry.metadata = metadata; thisRegistry.metadata = metadata;
thisRegistry.runtimeVersion = version; thisRegistry.runtimeVersion = version;
this._initRegistry(this.registry, this._runtimeChain as Text, version, metadata); this._initRegistry(this.registry, runtimeChain, version, metadata);
this._injectMetadata(thisRegistry, true); this._injectMetadata(thisRegistry, true);
return true; return true;
@@ -335,7 +344,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
// retrieve metadata, either from chain or as pass-in via options // retrieve metadata, either from chain or as pass-in via options
const metadataKey = `${genesisHash.toHex() || '0x'}-${runtimeVersion.specVersion.toString()}`; const metadataKey = `${genesisHash.toHex() || '0x'}-${runtimeVersion.specVersion.toString()}`;
const metadata = chainMetadata || ( const metadata = chainMetadata || (
optMetadata && optMetadata[metadataKey] optMetadata?.[metadataKey]
? new Metadata(this.registry, optMetadata[metadataKey]) ? new Metadata(this.registry, optMetadata[metadataKey])
: await firstValueFrom(this._rpcCore.state.getMetadata()) : await firstValueFrom(this._rpcCore.state.getMetadata())
); );
@@ -357,10 +366,16 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
} }
private _initFromMeta (metadata: Metadata): boolean { private _initFromMeta (metadata: Metadata): boolean {
const runtimeVersion = this._runtimeVersion;
if (!runtimeVersion) {
throw new Error('Invalid initializion order, runtimeVersion is not available');
}
this._extrinsicType = metadata.asLatest.extrinsic.version.toNumber(); this._extrinsicType = metadata.asLatest.extrinsic.version.toNumber();
this._rx.extrinsicType = this._extrinsicType; this._rx.extrinsicType = this._extrinsicType;
this._rx.genesisHash = this._genesisHash; this._rx.genesisHash = this._genesisHash;
this._rx.runtimeVersion = this._runtimeVersion as RuntimeVersion; // must be set here this._rx.runtimeVersion = runtimeVersion;
// inject metadata and adjust the types as detected // inject metadata and adjust the types as detected
this._injectMetadata(this._getDefaultRegistry(), true); this._injectMetadata(this._getDefaultRegistry(), true);
@@ -378,7 +393,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
// Only enable the health keepalive on WS, not needed on HTTP // Only enable the health keepalive on WS, not needed on HTTP
this.#healthTimer = this.hasSubscriptions this.#healthTimer = this.hasSubscriptions
? setInterval((): void => { ? setInterval((): void => {
firstValueFrom(this._rpcCore.system.health.raw()).catch(() => undefined); firstValueFrom(this._rpcCore.system.health.raw()).catch(noop);
}, KEEPALIVE_INTERVAL) }, KEEPALIVE_INTERVAL)
: null; : null;
} }
+1 -1
View File
@@ -69,7 +69,7 @@ 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;
if (!_signer || !_signer.signRaw) { if (!_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.'); 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.');
} }
+17 -20
View File
@@ -6,7 +6,7 @@
import '@polkadot/api-augment'; import '@polkadot/api-augment';
import type { HeaderExtended } from '@polkadot/api-derive/types'; import type { HeaderExtended } from '@polkadot/api-derive/types';
import type { TestKeyringMap } from '@polkadot/keyring/testingPairs'; import type { TestKeyringMapSubstrate } from '@polkadot/keyring/testingPairs';
import type { StorageKey } from '@polkadot/types'; import type { StorageKey } from '@polkadot/types';
import type { AccountId, Balance, DispatchErrorModule, Event, Header, Index } from '@polkadot/types/interfaces'; import type { AccountId, Balance, DispatchErrorModule, Event, Header, Index } from '@polkadot/types/interfaces';
import type { FrameSystemAccountInfo } from '@polkadot/types/lookup'; import type { FrameSystemAccountInfo } from '@polkadot/types/lookup';
@@ -35,7 +35,7 @@ async function calls (api: ApiPromise): Promise<void> {
function consts (api: ApiPromise): void { function consts (api: ApiPromise): void {
// constants has actual value & metadata // constants has actual value & metadata
console.log( console.log(
api.consts.foo.bar, api.consts['notIn']['augmentation'],
api.consts.balances.existentialDeposit.toNumber(), api.consts.balances.existentialDeposit.toNumber(),
api.consts.balances.existentialDeposit.meta.docs.map((s) => s.toString()).join(''), api.consts.balances.existentialDeposit.meta.docs.map((s) => s.toString()).join(''),
api.consts.system.blockWeights.maxBlock.refTime.toNumber() api.consts.system.blockWeights.maxBlock.refTime.toNumber()
@@ -59,10 +59,10 @@ function errors (api: ApiPromise): void {
console.log(api.errors.vesting.AmountLow.is(someError)); console.log(api.errors.vesting.AmountLow.is(someError));
// non-existing error, existing module // non-existing error, existing module
console.log(api.errors.vesting.Something.is(someError)); console.log(api.errors.vesting['NonAugmented'].is(someError));
// something random // something random
console.log(api.errors.something.Random.is(someError)); console.log(api.errors['thisIsNot']['Augmented'].is(someError));
} }
function events (api: ApiPromise): void { function events (api: ApiPromise): void {
@@ -97,20 +97,20 @@ function events (api: ApiPromise): void {
} }
// something random, just codec[] // something random, just codec[]
if (api.events.something.Random.is(event)) { if (api.events['not']['Augmented'].is(event)) {
const [a, b] = event.data; const [a, b] = event.data;
console.log(a.toHuman(), b.toHuman()); console.log(a.toHuman(), b.toHuman());
} }
} }
async function query (api: ApiPromise, pairs: TestKeyringMap): Promise<void> { async function query (api: ApiPromise, pairs: TestKeyringMapSubstrate): Promise<void> {
const intentions = await api.query.staking.bonded(); const intentions = await api.query.staking.bonded();
console.log('intentions:', intentions); console.log('intentions:', intentions);
// api.query.*.* is well-typed // api.query.*.* is well-typed
const bar = await api.query.foo.bar(); // bar is Codec (unknown module) const bar = await api.query['notIn']['augmentation'](); // bar is Codec (unknown module)
const bal = await api.query.balances.totalIssuance(); // bal is Balance const bal = await api.query.balances.totalIssuance(); // bal is Balance
const bal2 = await api.query.balances.totalIssuance('WRONG_ARG'); // bal2 is Codec (wrong args) const bal2 = await api.query.balances.totalIssuance('WRONG_ARG'); // bal2 is Codec (wrong args)
const override = await api.query.balances.totalIssuance<Header>(); // override is still available const override = await api.query.balances.totalIssuance<Header>(); // override is still available
@@ -119,7 +119,7 @@ async function query (api: ApiPromise, pairs: TestKeyringMap): Promise<void> {
const oldBal = await api.query.balances.totalIssuance.at('abcd'); const oldBal = await api.query.balances.totalIssuance.at('abcd');
// For older queries we can cast with `<Balance>` (newer chain have multi typed) // For older queries we can cast with `<Balance>` (newer chain have multi typed)
const multia = await api.query.balances.freeBalance.multi<Balance>([pairs.alice.address, pairs.bob.address]); const multia = await api.query.balances['freeBalance'].multi<Balance>([pairs.alice.address, pairs.bob.address]);
const multib = await api.query.system.account.multi([pairs.alice.address, pairs.bob.address]); const multib = await api.query.system.account.multi([pairs.alice.address, pairs.bob.address]);
await api.query.system.account(pairs.alice.address); await api.query.system.account(pairs.alice.address);
@@ -157,7 +157,7 @@ async function queryExtra (api: ApiPromise): Promise<void> {
await api.query.assets.approvals.keys(123, 'blah'); await api.query.assets.approvals.keys(123, 'blah');
await api.query.assets.account.keys(123); await api.query.assets.account.keys(123);
await api.query.assets.account.entries(123); await api.query.assets.account.entries(123);
await api.query.assets.blah.keys(); await api.query.assets['notAugmented'].keys();
// is // is
const key = {} as StorageKey; const key = {} as StorageKey;
@@ -170,7 +170,7 @@ async function queryExtra (api: ApiPromise): Promise<void> {
} }
} }
async function queryMulti (api: ApiPromise, pairs: TestKeyringMap): Promise<void> { async function queryMulti (api: ApiPromise, pairs: TestKeyringMapSubstrate): Promise<void> {
// check multi for unsub // check multi for unsub
const multiUnsub = await api.queryMulti([ const multiUnsub = await api.queryMulti([
[api.query.staking.validators], [api.query.staking.validators],
@@ -185,7 +185,7 @@ async function queryMulti (api: ApiPromise, pairs: TestKeyringMap): Promise<void
const multiRes = await api.queryMulti([ const multiRes = await api.queryMulti([
[api.query.system.account, pairs.eve.address], [api.query.system.account, pairs.eve.address],
// older chains only // older chains only
[api.query.system.accountNonce, pairs.eve.address] [api.query.system['accountNonce'], pairs.eve.address]
]); ]);
console.log(multiRes); console.log(multiRes);
@@ -241,7 +241,7 @@ function types (api: ApiPromise): void {
console.log(balance, gas, compact, gasUnsafe, overriddenUnsafe, u32.toNumber(), f32.toNumber(), api.createType('AccountData'), raw.subarray(0, 10)); console.log(balance, gas, compact, gasUnsafe, overriddenUnsafe, u32.toNumber(), f32.toNumber(), api.createType('AccountData'), raw.subarray(0, 10));
} }
async function tx (api: ApiPromise, pairs: TestKeyringMap): Promise<void> { async function tx (api: ApiPromise, pairs: TestKeyringMapSubstrate): Promise<void> {
// transfer, also allows for bigint inputs here // transfer, also allows for bigint inputs here
const transfer = api.tx.balances.transfer(pairs.bob.address, BigInt(123456789)); const transfer = api.tx.balances.transfer(pairs.bob.address, BigInt(123456789));
@@ -251,7 +251,7 @@ async function tx (api: ApiPromise, pairs: TestKeyringMap): Promise<void> {
console.log('hash:', (await transfer.signAndSend(pairs.alice)).toHex()); console.log('hash:', (await transfer.signAndSend(pairs.alice)).toHex());
// passing options, but waiting for hash // passing options, but waiting for hash
const nonce = await api.query.system.accountNonce<Index>(pairs.alice.address); const nonce = await api.query.system['accountNonce']<Index>(pairs.alice.address);
(await api.tx.balances (await api.tx.balances
.transfer(pairs.bob.address, 12345) .transfer(pairs.bob.address, 12345)
@@ -264,7 +264,7 @@ async function tx (api: ApiPromise, pairs: TestKeyringMap): Promise<void> {
.signAndSend(pairs.alice, ({ status }: SubmittableResult) => console.log(status.type)); .signAndSend(pairs.alice, ({ status }: SubmittableResult) => console.log(status.type));
// with options and the callback // with options and the callback
const nonce2 = await api.query.system.accountNonce(pairs.alice.address); const nonce2 = await api.query.system['accountNonce'](pairs.alice.address);
const unsub2 = await api.tx.balances const unsub2 = await api.tx.balances
.transfer(pairs.bob.address, 12345) .transfer(pairs.bob.address, 12345)
.signAndSend(pairs.alice, { nonce: nonce2 }, ({ status }: SubmittableResult): void => { .signAndSend(pairs.alice, { nonce: nonce2 }, ({ status }: SubmittableResult): void => {
@@ -276,11 +276,10 @@ async function tx (api: ApiPromise, pairs: TestKeyringMap): Promise<void> {
// it allows for query & then using the submittable // it allows for query & then using the submittable
const second = api.tx.democracy.second(123); const second = api.tx.democracy.second(123);
// eslint-disable-next-line @typescript-eslint/no-floating-promises
await second.signAndSend('123', (result) => console.log(result)); await second.signAndSend('123', (result) => console.log(result));
// it handles enum inputs correctly // it handles enum inputs correctly
await api.tx.democracy.proxyVote(123, { Split: { nay: 456, yay: 123 } }).signAndSend(pairs.alice); await api.tx.democracy['proxyVote'](123, { Split: { nay: 456, yay: 123 } }).signAndSend(pairs.alice);
// is // is
if (api.tx.balances.transfer.is(second)) { if (api.tx.balances.transfer.is(second)) {
@@ -295,7 +294,7 @@ async function at (api: ApiPromise): Promise<void> {
const apiAt = await api.at('0x1234'); const apiAt = await api.at('0x1234');
// get old balances // get old balances
console.log(await apiAt.query.balances.freeBalance('0x1234')); console.log(await apiAt.query.balances['freeBalance']('0x1234'));
// get some constants // get some constants
console.log(apiAt.consts.balances.existentialDeposit); console.log(apiAt.consts.balances.existentialDeposit);
@@ -305,8 +304,7 @@ async function main (): Promise<void> {
const api = await ApiPromise.create(); const api = await ApiPromise.create();
const pairs = createTestPairs(); const pairs = createTestPairs();
// eslint-disable-next-line @typescript-eslint/no-floating-promises await Promise.all([
Promise.all([
calls(api), calls(api),
consts(api), consts(api),
derive(api), derive(api),
@@ -322,5 +320,4 @@ async function main (): Promise<void> {
]); ]);
} }
// eslint-disable-next-line @typescript-eslint/unbound-method
main().catch(console.error); main().catch(console.error);
+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: '10.8.1' }; export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '10.10.1' };
+2 -4
View File
@@ -4,7 +4,7 @@
import type { ApiOptions, UnsubscribePromise } from '../types/index.js'; import type { ApiOptions, UnsubscribePromise } from '../types/index.js';
import type { CombinatorCallback, CombinatorFunction } from './Combinator.js'; import type { CombinatorCallback, CombinatorFunction } from './Combinator.js';
import { objectSpread } from '@polkadot/util'; import { noop, objectSpread } from '@polkadot/util';
import { ApiBase } from '../base/index.js'; import { ApiBase } from '../base/index.js';
import { Combinator } from './Combinator.js'; import { Combinator } from './Combinator.js';
@@ -156,9 +156,7 @@ export class ApiPromise extends ApiBase<'promise'> {
// Swallow any rejections on isReadyOrError // Swallow any rejections on isReadyOrError
// (in Node 15.x this creates issues, when not being looked at) // (in Node 15.x this creates issues, when not being looked at)
instance.isReadyOrError.catch(() => { instance.isReadyOrError.catch(noop);
// ignore
});
return instance.isReady; return instance.isReady;
} }
+6 -8
View File
@@ -4,13 +4,11 @@
import type { Callback } from '@polkadot/types/types'; import type { Callback } from '@polkadot/types/types';
import type { UnsubscribePromise } from '../types/index.js'; import type { UnsubscribePromise } from '../types/index.js';
import { isFunction } from '@polkadot/util'; import { isFunction, noop } from '@polkadot/util';
export type CombinatorCallback <T extends unknown[]> = Callback<T>; export type CombinatorCallback <T extends unknown[]> = Callback<T>;
export interface CombinatorFunction { export type CombinatorFunction = (cb: Callback<any>) => UnsubscribePromise;
(cb: Callback<any>): UnsubscribePromise;
}
export class Combinator<T extends unknown[] = unknown[]> { export class Combinator<T extends unknown[] = unknown[]> {
#allHasFired = false; #allHasFired = false;
@@ -60,8 +58,9 @@ export class Combinator<T extends unknown[] = unknown[]> {
} }
try { try {
// eslint-disable-next-line @typescript-eslint/no-floating-promises Promise
this.#callback(this.#results as T); .resolve(this.#callback(this.#results as T))
.catch(noop);
} catch { } catch {
// swallow, we don't want the handler to trip us up // swallow, we don't want the handler to trip us up
} }
@@ -74,8 +73,7 @@ export class Combinator<T extends unknown[] = unknown[]> {
this.#isActive = false; this.#isActive = false;
// eslint-disable-next-line @typescript-eslint/no-misused-promises this.#subscriptions.map(async (subscription): Promise<void> => {
this.#subscriptions.forEach(async (subscription): Promise<void> => {
try { try {
const unsubscribe = await subscription; const unsubscribe = await subscription;
+1 -1
View File
@@ -106,7 +106,7 @@ function decorateSubscribe<M extends DecorateFn<CodecReturnType<M>>> (method: M,
* @description Decorate method for ApiPromise, where the results are converted to the Promise equivalent * @description Decorate method for ApiPromise, where the results are converted to the Promise equivalent
*/ */
export function toPromiseMethod<M extends DecorateFn<CodecReturnType<M>>> (method: M, options?: DecorateMethodOptions): StorageEntryPromiseOverloads { export function toPromiseMethod<M extends DecorateFn<CodecReturnType<M>>> (method: M, options?: DecorateMethodOptions): StorageEntryPromiseOverloads {
const needsCallback = !!(options && options.methodName && options.methodName.includes('subscribe')); const needsCallback = !!(options?.methodName && options.methodName.includes('subscribe'));
return function (...args: unknown[]): Promise<CodecReturnType<M>> | UnsubscribePromise { return function (...args: unknown[]): Promise<CodecReturnType<M>> | UnsubscribePromise {
const [actualArgs, resultCb] = extractArgs(args, needsCallback); const [actualArgs, resultCb] = extractArgs(args, needsCallback);

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