Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2da085afb8 | ||
|
|
973cc13873 | ||
|
|
61e5f91e5b | ||
|
|
8c52f050fe | ||
|
|
d1bf4402cf | ||
|
|
d3eb1de49b | ||
|
|
46076c5595 | ||
|
|
ba4e74f67c | ||
|
|
d303f553a1 | ||
|
|
ad71405fd8 | ||
|
|
3f6127d854 | ||
|
|
9353536db0 | ||
|
|
dcc4583c32 | ||
|
|
2c96b71c30 | ||
|
|
9b3258a65a | ||
|
|
d191d07782 | ||
|
|
fe2103e5d4 | ||
|
|
ee42e3a86c | ||
|
|
12fd31def5 | ||
|
|
a3901ca7ad | ||
|
|
d22a2918ce | ||
|
|
62cbf7b8b6 | ||
|
|
c874a22c78 | ||
|
|
b21cc0ae06 | ||
|
|
cad2b0fefe | ||
|
|
dd6dd83af7 | ||
|
|
e0e86b1383 | ||
|
|
d8446d535a | ||
|
|
225ae80b95 | ||
|
|
71d3d10f0e | ||
|
|
aa82c74493 | ||
|
|
3cd75c74a7 | ||
|
|
b90a1e388f | ||
|
|
b2f67ffae1 | ||
|
|
9aa696dbb6 | ||
|
|
6b80d3415b | ||
|
|
e23401092f | ||
|
|
a34e14a89f | ||
|
|
8dd13e181a | ||
|
|
3525070d92 | ||
|
|
744a2f7325 | ||
|
|
135e2b2ccc | ||
|
|
521fa2026d | ||
|
|
5c81e4fd3b | ||
|
|
27d21ce117 | ||
|
|
417e46016b | ||
|
|
fc7bb681f5 | ||
|
|
a0592986fa | ||
|
|
d9aa61c786 | ||
|
|
8883d355ff | ||
|
|
2ca657257c | ||
|
|
482471b878 | ||
|
|
627f990166 | ||
|
|
a73603cf0a | ||
|
|
1744544552 | ||
|
|
408de16495 | ||
|
|
2822c43df3 | ||
|
|
4fd3ac4097 | ||
|
|
2c33d3d452 | ||
|
|
65c1b8b26d | ||
|
|
7c6012ab07 | ||
|
|
0da2c25abd | ||
|
|
2f0036e34a | ||
|
|
bf4cff113a | ||
|
|
3f3c51d652 | ||
|
|
0caae6beb5 | ||
|
|
7f92bb33bc | ||
|
|
20b39c18f6 | ||
|
|
f6907eb5de | ||
|
|
8880785951 | ||
|
|
c4a4e1acd7 | ||
|
|
e1cf75288c | ||
|
|
be95356999 | ||
|
|
b66d62548a | ||
|
|
bee7db805a | ||
|
|
ca7a382c5b | ||
|
|
40393ddc1e | ||
|
|
5bd2a664ec | ||
|
|
52ef27806b | ||
|
|
8e234f8a98 | ||
|
|
5e9ba771b5 | ||
|
|
e855dca167 | ||
|
|
3da1bbe403 | ||
|
|
5740c00259 | ||
|
|
8bb8fa0f32 | ||
|
|
30bd10c3b3 | ||
|
|
f7b647f4c6 | ||
|
|
3ae8e32c84 | ||
|
|
3dbba5e5ba | ||
|
|
7e3b8bf5fc | ||
|
|
14b8d25fb1 | ||
|
|
d64a1fcfd3 | ||
|
|
41bf6fa8ea | ||
|
|
faa28f2822 | ||
|
|
528a2b041b | ||
|
|
7a0f103545 | ||
|
|
0565492ae8 | ||
|
|
af7820a0a2 | ||
|
|
69e754105d | ||
|
|
8fc143ceab | ||
|
|
af072be808 | ||
|
|
8d86def88b | ||
|
|
a99f848adb | ||
|
|
f53db7dbf0 | ||
|
|
26d1d0d695 | ||
|
|
ed33850c62 | ||
|
|
6983f8c883 | ||
|
|
71ddc66515 | ||
|
|
e3ba160935 | ||
|
|
b824edd281 | ||
|
|
b397486fe8 | ||
|
|
28d1d8193b | ||
|
|
6cb0c5c5be | ||
|
|
f4072b9202 | ||
|
|
8d300a73b8 | ||
|
|
d6d24d5b61 | ||
|
|
0ef93c3b94 | ||
|
|
a6b48f8eec | ||
|
|
a92bfca548 | ||
|
|
7701205d58 | ||
|
|
2d09e8d94e | ||
|
|
7b0fd81b4e | ||
|
|
c1a6f3f302 | ||
|
|
62df7e4ead | ||
|
|
f2cb628e25 | ||
|
|
5b0eb1b67b | ||
|
|
87affdcbb3 | ||
|
|
4afd550db7 | ||
|
|
cebcc054da | ||
|
|
dc9c225eb8 | ||
|
|
a3b0d9a794 | ||
|
|
43efff7ade | ||
|
|
a81d83a25c | ||
|
|
6dea8d9a07 | ||
|
|
4677ecc55f | ||
|
|
4038260b37 | ||
|
|
ec87b5b244 | ||
|
|
421f767b0d | ||
|
|
cfc7e2490c | ||
|
|
2051a3d772 | ||
|
|
44590fd235 | ||
|
|
fdd4d3a16d | ||
|
|
c8307138a9 | ||
|
|
6e5697fc8e | ||
|
|
0dc114227c | ||
|
|
006c6b02b1 | ||
|
|
6984329a2b | ||
|
|
954a6f11de | ||
|
|
9247a40a15 | ||
|
|
85ddffde61 | ||
|
|
4dff632fa6 | ||
|
|
a7e3e15a7a | ||
|
|
385068e542 | ||
|
|
210454dfe6 | ||
|
|
8264c5db11 | ||
|
|
9e66524714 | ||
|
|
77202c4dd3 | ||
|
|
9d61aaa1f3 | ||
|
|
a147a7c769 | ||
|
|
a8b180b387 | ||
|
|
266427c8f4 | ||
|
|
e94af85e69 | ||
|
|
9be16a40ef | ||
|
|
2b92fd94af | ||
|
|
0b6f786108 | ||
|
|
b0a3c206ab | ||
|
|
98ae45c64b | ||
|
|
116501f89a | ||
|
|
3cf456f3fa | ||
|
|
63e917ca09 | ||
|
|
76c6b63f29 | ||
|
|
65dbe9043a | ||
|
|
ce5ec004b4 | ||
|
|
196f91bc92 | ||
|
|
159ec48029 | ||
|
|
993e16240d | ||
|
|
ae6c2aa750 | ||
|
|
79da77234e | ||
|
|
8992e7f2e8 | ||
|
|
9b1e5f2f25 | ||
|
|
a94c0ff11c | ||
|
|
0db40bc98b | ||
|
|
4fd5e56af3 | ||
|
|
38cb10fb24 | ||
|
|
b5ab09fdb1 | ||
|
|
517baddb25 | ||
|
|
e445a26d5d | ||
|
|
f523325c0a | ||
|
|
55cb602a71 | ||
|
|
904b2aafe7 | ||
|
|
3dee6a9cb4 | ||
|
|
bd113b124e | ||
|
|
580039a23c | ||
|
|
2472ef8c98 | ||
|
|
020fb1cd09 | ||
|
|
3cbebb6d71 | ||
|
|
138a64c5fb | ||
|
|
efd76e3e20 | ||
|
|
2b562c80b9 | ||
|
|
f9ab3e7029 | ||
|
|
fdc30fd2c2 | ||
|
|
d2b40660ad | ||
|
|
c545cffec0 | ||
|
|
479719fdcc | ||
|
|
8a3f938392 | ||
|
|
0ccf9ad96f | ||
|
|
a41d292fc1 | ||
|
|
aacebcabb5 | ||
|
|
17c6ef7527 | ||
|
|
b252f13210 | ||
|
|
64360b3598 | ||
|
|
0acb0ab226 | ||
|
|
d32e219d7e | ||
|
|
a1029dc0ba | ||
|
|
eef50a759d | ||
|
|
2bad0f4799 | ||
|
|
9756d33664 | ||
|
|
1ea50757c6 | ||
|
|
26e550fe6c | ||
|
|
69c129595e | ||
|
|
3f79415e02 | ||
|
|
8747cd4682 | ||
|
|
dd9e96c3e7 | ||
|
|
1c93388de7 | ||
|
|
7a87034f0e | ||
|
|
9e4db51dd7 | ||
|
|
5382cb60b0 |
@@ -25,3 +25,4 @@ exclude_patterns:
|
||||
- "packages/typegen/src"
|
||||
- "packages/types/src/interfaces/"
|
||||
- "packages/types/src/augment/"
|
||||
- "packages/types-known/src/upgrades/e2e/"
|
||||
|
||||
@@ -9,7 +9,7 @@ jobs:
|
||||
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && (!github.event.pull_request || github.event.pull_request.head.repo.full_name == github.repository)"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: jacogr/action-approve@master
|
||||
- uses: jacogr/action-approve@9d6ce78d26f23ad29d009d034822cf773f2cb50e
|
||||
with:
|
||||
authors: jacogr
|
||||
labels: -auto
|
||||
|
||||
@@ -8,7 +8,7 @@ jobs:
|
||||
merge:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: jacogr/action-merge@master
|
||||
- uses: jacogr/action-merge@3b4b49af8a8644bf5cbb5409ee236abe04eeb1b0
|
||||
with:
|
||||
checks: build,lint,test
|
||||
labels: -auto
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
env:
|
||||
YARN_ENABLE_SCRIPTS: false
|
||||
steps:
|
||||
- uses: dessant/lock-threads@v2
|
||||
- uses: dessant/lock-threads@f1a42f0f44eb83361d617a014663e1a76cf282d2
|
||||
with:
|
||||
github-token: ${{ secrets.GH_PAT_BOT }}
|
||||
issue-lock-inactive-days: '7'
|
||||
|
||||
@@ -11,8 +11,8 @@ jobs:
|
||||
env:
|
||||
YARN_ENABLE_SCRIPTS: false
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: denoland/setup-deno@v1
|
||||
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e
|
||||
- uses: denoland/setup-deno@004814556e37c54a2f6e31384c9e18e983317366
|
||||
with:
|
||||
deno-version: vx.x.x
|
||||
- name: ${{ matrix.step }}
|
||||
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GH_PAT }}
|
||||
|
||||
@@ -12,8 +12,8 @@ jobs:
|
||||
env:
|
||||
YARN_ENABLE_SCRIPTS: false
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: returntocorp/semgrep-action@v1
|
||||
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e
|
||||
- uses: returntocorp/semgrep-action@aeafd770072c4f48798b991e3449592bddc2c435
|
||||
with:
|
||||
auditOn: push
|
||||
publishToken: ${{ secrets.SEMGREP_APP_TOKEN }}
|
||||
|
||||
@@ -9,7 +9,7 @@ jobs:
|
||||
env:
|
||||
YARN_ENABLE_SCRIPTS: false
|
||||
steps:
|
||||
- uses: actions/stale@v3
|
||||
- uses: actions/stale@98ed4cb500039dbcccf4bd9bedada4d0187f2757
|
||||
with:
|
||||
repo-token: ${{ secrets.GH_PAT_BOT }}
|
||||
stale-issue-message: 'This issue has been open for 21 days with no activity and is not labelled as an enhancement. It will be closed in 7 days.'
|
||||
|
||||
+194
@@ -1,5 +1,199 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 9.9.2 Nov 27, 2022
|
||||
|
||||
Changes:
|
||||
|
||||
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||
|
||||
|
||||
## 9.9.1 Nov 20, 2022
|
||||
|
||||
Changes:
|
||||
|
||||
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||
- Adjust code for latest Eslint & TS released versions
|
||||
|
||||
|
||||
## 9.8.2 Nov 16, 2022
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust `api.rpc.payment.queryInfo` to always return `WeightV1` responses
|
||||
- Mark `api.rpc.payment.queryInfo` as deprecated (will be in a future Substrate version)
|
||||
|
||||
|
||||
## 9.8.1 Nov 13, 2022
|
||||
|
||||
Contributed:
|
||||
|
||||
- Params encoding fix for `api.rpc(...)` (Thanks to https://github.com/xlc)
|
||||
- Support for `WeightV2` contract interfaces (Thanks to https://github.com/jasl)
|
||||
|
||||
Changes:
|
||||
|
||||
- Cater for `TransactionPaymentApi/2` runtime calls
|
||||
- Add getters for `has{DryRun, PaymentInfo}` on submittables (feature detection)
|
||||
- Polkadot 9300, Kusama 9300 & Westend 9310/9320 upgrade blocks
|
||||
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||
|
||||
|
||||
## 9.7.1 Nov 6, 2022
|
||||
|
||||
Contributed:
|
||||
|
||||
- Update `@substrate/connect` to latest (Thanks to https://github.com/wirednkod)
|
||||
- Add `api.rpc(method, ...params)` support (Thanks to https://github.com/xlc)
|
||||
|
||||
Changes:
|
||||
|
||||
- Align `ScProvider` code structure with other providers
|
||||
- Add `isClonable` getter on providers (some, e.g. sc doesn't support this)
|
||||
- Update to latest Substrate metadata
|
||||
|
||||
|
||||
## 9.6.2 Oct 30, 2022
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust historic `DispatchError` type for `statemint/statemine`
|
||||
|
||||
|
||||
## 9.6.1 Oct 23, 2022
|
||||
|
||||
Contributed:
|
||||
|
||||
- Update `@substrate/connect` to latest (Thanks to https://github.com/wirednkod)
|
||||
- Use `.?` operators in submittable class (Thanks to https://github.com/shunjizhan)
|
||||
|
||||
Changes:
|
||||
|
||||
- Cater for latest Substrate `DispatchError` (additional preimage statuses)
|
||||
- Adjust `api.derive.democracy.*` to return `imageHash` as `HexString` (as applicable, supports current-gen preimages)
|
||||
- Adjust `api.derive.preimages.*` to retrieve via `democracy` or `preimage` pallets
|
||||
- Ensure `apiAt.<section>.<method>.key(...)` passes through the correct arguments
|
||||
- Apply fallback for Weight downgrades (V2 >> V1 detection)
|
||||
- Update to latest Substrate metadata
|
||||
- Polkadot 9291 & Westend 9300 upgrade blocks
|
||||
|
||||
|
||||
## 9.5.2 Oct 16, 2022
|
||||
|
||||
Changes:
|
||||
|
||||
- Add `ParachainHost` version 3 runtime calls
|
||||
|
||||
|
||||
## 9.5.1 Oct 8, 2022
|
||||
|
||||
- **Important** While the API witll detect and decorate the weight type based on V1 or V2, the default `Weight` type (used in runtime calls and RPCs) has not been swapped from the old `u64` variant. This means that on new chains using `WeightV2`, the TS decorated type will still reflect the old version.
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust handling of `Weight` type for V2 structures
|
||||
- Add alis definitions for `Weight{V1, V2}` (used for type overrides)
|
||||
- Cater for weight v2 (along with v1 pass-through) extrinsics in `api-contract`
|
||||
- Update to latest Substrate, Polkadot & Kusama metadata
|
||||
|
||||
|
||||
## 9.4.3 Oct 2, 2022
|
||||
|
||||
Contributed:
|
||||
|
||||
- Allow for new `ink_primitives` types (Thanks to https://github.com/statictype)
|
||||
- Fix contracts runtime `instantiate` call params (Thanks to https://github.com/statictype)
|
||||
|
||||
Changes:
|
||||
|
||||
- Align staking derive redeemableSum with Rust source (`currentEra` vs `activeEra` usage)
|
||||
- Add `@deprecated` flag to RPC interface generation (`contracts_*` & `state_get{Pairs/Keys}`)
|
||||
- Polkadot 9280/9281, Kusama 9291 upgrade blocks
|
||||
|
||||
|
||||
## 9.4.2 Sep 24, 2022
|
||||
|
||||
Contributed:
|
||||
|
||||
- Allow for re-subscriptions on `ScProvider` (Thanks to https://github.com/wirednkod)
|
||||
|
||||
Changes:
|
||||
|
||||
- Align derives to cater for latest (& previous) Substrate interfaces
|
||||
- Update to latest Substrate, Polkadot & Kusama metadata
|
||||
|
||||
|
||||
## 9.4.1 Sep 17, 2022
|
||||
|
||||
Contributed:
|
||||
|
||||
- Update `@substrate/connect` to latest (Thanks to https://github.com/wirednkod)
|
||||
|
||||
Changes:
|
||||
|
||||
- Cater for v1.5 Weight JSON representation (via RPC)
|
||||
- Polkadot 9270, Kusama 9280 & Westend 9290 upgrade blocks
|
||||
- Update to latest Substrate, Polkadot & Kusama metadata
|
||||
|
||||
|
||||
## 9.3.3 Sep 6, 2022
|
||||
|
||||
Contributed:
|
||||
|
||||
- Ensure JS reserved words are aliassed in types (Thanks to https://github.com/dqbd)
|
||||
|
||||
Changes:
|
||||
|
||||
- Fix and adjust tests for `AccountId{32, 33}`
|
||||
|
||||
|
||||
## 9.3.2 Sep 4, 2022
|
||||
|
||||
Changes:
|
||||
|
||||
- Cater for v1.5 Weight types (structure to inner value)
|
||||
- Westend 9280 & Kusama 9271 upgrade blocks
|
||||
- Update to latest Substrate, Polkadot & Kusama metadata
|
||||
|
||||
|
||||
## 9.3.1 Sep 3, 2022
|
||||
|
||||
Changes:
|
||||
|
||||
- Support for ink! v4 metadata
|
||||
- Adjust pool runtime call `pendingRewards` return type
|
||||
- Support for `AccountId33` (raw/compressed 33-byte ecdsa)
|
||||
- Update to latest Substrate, Polkadot & Kusama metadata
|
||||
|
||||
|
||||
## 9.2.4 Aug 27, 2022
|
||||
|
||||
Changes:
|
||||
|
||||
- Remove extra error logging in internal rpc-core Observable
|
||||
- Allow for embebbed `Enum` in `Struct` typegen (no `lookupName`)
|
||||
|
||||
|
||||
## 9.2.3 Aug 21, 2022
|
||||
|
||||
Contributed:
|
||||
|
||||
- Update `@substrate/connect` to latest (Thanks to https://github.com/wirednkod)
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust `StakingLedger` with fallback for Kusama 1050 (2 different structures on-chain)
|
||||
- Remove `TryRuntime` state call definitions (only off-chain usage)
|
||||
- Update to latest Substrate, Polkadot & Kusama metadata
|
||||
|
||||
|
||||
## 9.2.2 Aug 16, 2022
|
||||
|
||||
Changes:
|
||||
|
||||
- Replace `rpc.payment.queryInfo` usage with `call.transactionPaymentApi.queryInfo`
|
||||
- Ensure that `api.call.*` is decorated on historic blocks
|
||||
|
||||
|
||||
## 9.2.1 Aug 13, 2022
|
||||
|
||||
- **Important** If using `import { WellKnownChain } from '@polkadot/rpc-provider'` it is recommended that you rather use `ScProvider.WellKnownChain` (the import may be dropped in a future major version)
|
||||
|
||||
+7
-4
@@ -1,13 +1,13 @@
|
||||
3188 Jaco 9.2.1 (#5158)
|
||||
3290 Jaco 9.9.2 (#5355)
|
||||
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
|
||||
37 Keith Ingram Update contract types and rpc (#4541)
|
||||
35 Stefanie Doll Updated child storage parameters (#1709)
|
||||
20 Luke Schoen fix: Fixes TypeError: Cannot read property 'vesting' of undefined (#1970)
|
||||
16 Xiliang Chen implement entriesPaged and keysPages for query at (#4701)
|
||||
18 Xiliang Chen fix unkown rpc (#5325)
|
||||
15 Jeremías Díaz feat(types): add correct tuple type to storage key (#3054)
|
||||
14 Nikos Kontakis Bump substrate connect to 0.7.16 (#5307)
|
||||
11 Ian He HttpProvider support clone() (#3949)
|
||||
10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954)
|
||||
8 Nikos Kontakis Bump substrate connect to 0.7.10; Fixes #5120 (#5123)
|
||||
5 Chevdor Fix metadata package link (#3458)
|
||||
5 Jake Naviasky Fixing approvalFlagsToBools. (#1250)
|
||||
4 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
|
||||
@@ -18,6 +18,7 @@
|
||||
4 Scott Twiname Add support for historical BlockNumber rpc methods (#4574)
|
||||
4 Thibaut Sardan no subscription for http (#3127)
|
||||
3 André Silva add support for ValidationCodeHash (#3640)
|
||||
3 Andreea Eftene Fix code source type (#5236)
|
||||
3 Antoine Estienne Adapted to display moonbeam author (#3108)
|
||||
3 Arjan Zijderveld Added `Emergency` to `ElectionPhase` (#3707)
|
||||
3 Ewa Kowalska Handle no council for bounties proposals (#3062)
|
||||
@@ -45,7 +46,6 @@
|
||||
2 Zannis Kalampoukis fix: Typegen handles structs and vectors of structs without erroring (#4743)
|
||||
2 扩散性百万甜面包 Typo, deocrateMethod -> decorateMethod (#1594)
|
||||
1 Alan Sapede Adds Eth feeHistory & maxPriorityFeePerGas rpc (#4956)
|
||||
1 Andreea Eftene Add storage deposit support (#4304)
|
||||
1 Brad Larson [NEW] Support for custom headers with providers (#2423)
|
||||
1 Btwiuse Arch Add side effect check workaround (#4994) (#5009)
|
||||
1 chriswmercer little readme tweak (#279)
|
||||
@@ -55,6 +55,7 @@
|
||||
1 Daniel Maricic Fixed typo in README (#2402)
|
||||
1 Daniel Savu fix: Generate custom type definitions (#4224)
|
||||
1 David Don't log full error (#2952)
|
||||
1 David Duong Avoid reserved words during named enum fields augmentation (#5203)
|
||||
1 Denis Tsai realign AccountKey20Junction to polkadot xcm's Junction enum (#3770)
|
||||
1 djuanito.eth Update fees to current constants (#2320)
|
||||
1 Drew Stone Update evm definitions to include vicinity (#2279)
|
||||
@@ -72,6 +73,7 @@
|
||||
1 Joey don't throw error at `onSocketClose` (#4363)
|
||||
1 Jordan Allow typegen for custom RPCs (#2876)
|
||||
1 JQQQ Allow rpc expose definition/ metadata (#3488)
|
||||
1 Jun Jiang Update contract' gas to Weight type (#5324)
|
||||
1 Kian Paimani Update definitions.ts (#2514)
|
||||
1 Krzysztof Jelski Derive for bounties and descriptions (#2925)
|
||||
1 Lae Make sure awaiting on an api object won't stuck forever on error (#1763)
|
||||
@@ -100,6 +102,7 @@
|
||||
1 Sean Young Solang requires u256 and i256 types (#2752)
|
||||
1 serge make WS provider timeout configurable (#4758)
|
||||
1 Sergei Pepyakin INK! -> ink! (#1347)
|
||||
1 Shunji Zhan small polish (#5276)
|
||||
1 WoeOm adapt Darwinia, Crab Network types (#3498)
|
||||
1 Xat_MassacrE Fix packages/types/src/codec/utils/encodeTypes.ts encodeSubTypes bug (#1544)
|
||||
1 yjh fix MetadataVersioned.asV12 (#2983)
|
||||
|
||||
+9
-8
@@ -11,10 +11,10 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"version": "9.2.1",
|
||||
"version": "9.9.2",
|
||||
"versions": {
|
||||
"git": "9.2.1",
|
||||
"npm": "9.2.1"
|
||||
"git": "9.9.2",
|
||||
"npm": "9.9.2"
|
||||
},
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
@@ -26,6 +26,7 @@
|
||||
"build:metadata": "yarn build:interfaces && yarn test:one packages/types/src/metadata/v14",
|
||||
"build:release": "polkadot-ci-ghact-build",
|
||||
"build:rollup": "polkadot-exec-rollup --config",
|
||||
"build:upgrades": "yarn test:one packages/types-known/src/upgrades/e2e",
|
||||
"chain:info": "polkadot-types-chain-info",
|
||||
"clean": "polkadot-dev-clean-build",
|
||||
"deno": "yarn polkadot-dev-deno-map && yarn build && deno check --import-map=import_map.json mod.ts",
|
||||
@@ -35,15 +36,15 @@
|
||||
"test:one": "NODE_OPTIONS=--experimental-vm-modules polkadot-dev-run-test --detectOpenHandles --forceExit"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.18.10",
|
||||
"@babel/core": "^7.20.2",
|
||||
"@babel/register": "^7.18.9",
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/dev": "^0.67.94",
|
||||
"@babel/runtime": "^7.20.1",
|
||||
"@polkadot/dev": "^0.67.163",
|
||||
"@polkadot/typegen": "workspace:packages/typegen",
|
||||
"@types/jest": "^28.1.6",
|
||||
"@types/jest": "^29.2.3",
|
||||
"copyfiles": "^2.4.1"
|
||||
},
|
||||
"resolutions": {
|
||||
"typescript": "^4.7.4"
|
||||
"typescript": "^4.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,18 +20,18 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.1",
|
||||
"version": "9.9.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/api-base": "9.2.1",
|
||||
"@polkadot/rpc-augment": "9.2.1",
|
||||
"@polkadot/types": "9.2.1",
|
||||
"@polkadot/types-augment": "9.2.1",
|
||||
"@polkadot/types-codec": "9.2.1",
|
||||
"@polkadot/util": "^10.1.4"
|
||||
"@babel/runtime": "^7.20.1",
|
||||
"@polkadot/api-base": "9.9.2",
|
||||
"@polkadot/rpc-augment": "9.9.2",
|
||||
"@polkadot/types": "9.9.2",
|
||||
"@polkadot/types-augment": "9.9.2",
|
||||
"@polkadot/types-codec": "9.9.2",
|
||||
"@polkadot/util": "^10.1.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/types-support": "9.2.1"
|
||||
"@polkadot/types-support": "9.9.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,9 +7,9 @@ import '@polkadot/api-base/types/consts';
|
||||
|
||||
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 { Codec } 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 { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } 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>;
|
||||
|
||||
@@ -156,6 +156,26 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
convictionVoting: {
|
||||
/**
|
||||
* The maximum number of concurrent votes an account may have.
|
||||
*
|
||||
* Also used to compute weight, an overly large value can lead to extrinsics with large
|
||||
* weight estimation: see `delegate` for instance.
|
||||
**/
|
||||
maxVotes: u32 & 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>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
crowdloan: {
|
||||
/**
|
||||
* The minimum amount that may be contributed into a crowdloan. Should almost certainly be at
|
||||
@@ -202,6 +222,14 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* How often (in blocks) new public referenda are launched.
|
||||
**/
|
||||
launchPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of items which can be blacklisted.
|
||||
**/
|
||||
maxBlacklisted: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of deposits a public proposal may have at any time.
|
||||
**/
|
||||
maxDeposits: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of public proposals that can exist at any time.
|
||||
**/
|
||||
@@ -217,10 +245,6 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* The minimum amount to be used as a deposit for a public referendum proposal.
|
||||
**/
|
||||
minimumDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of balance that must be deposited per byte of preimage stored.
|
||||
**/
|
||||
preimageByteDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum period of vote locking.
|
||||
*
|
||||
@@ -258,6 +282,16 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* take place over multiple blocks.
|
||||
**/
|
||||
maxElectingVoters: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of winners that can be elected by this `ElectionProvider`
|
||||
* implementation.
|
||||
*
|
||||
* Note: This must always be greater or equal to `T::DataProvider::desired_targets()`.
|
||||
**/
|
||||
maxWinners: u32 & AugmentedConst<ApiType>;
|
||||
minerMaxLength: u32 & AugmentedConst<ApiType>;
|
||||
minerMaxVotesPerVoter: u32 & AugmentedConst<ApiType>;
|
||||
minerMaxWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The priority of the unsigned transaction submitted in the unsigned-phase
|
||||
**/
|
||||
@@ -302,7 +336,7 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* this pallet), then [`MinerConfig::solution_weight`] is used to compare against
|
||||
* this value.
|
||||
**/
|
||||
signedMaxWeight: u64 & AugmentedConst<ApiType>;
|
||||
signedMaxWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Duration of the signed phase.
|
||||
**/
|
||||
@@ -320,6 +354,46 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
fastUnstake: {
|
||||
/**
|
||||
* Deposit to take for unstaking, to make sure we're able to slash the it in order to cover
|
||||
* the costs of resources on unsuccessful unstake.
|
||||
**/
|
||||
deposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
fellowshipReferenda: {
|
||||
/**
|
||||
* Quantization level for the referendum wakeup scheduler. A higher number will result in
|
||||
* fewer storage reads/writes needed for smaller voters, but also result in delays to the
|
||||
* automatic referendum status changes. Explicit servicing instructions are unaffected.
|
||||
**/
|
||||
alarmInterval: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum size of the referendum queue for a single track.
|
||||
**/
|
||||
maxQueued: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum amount to be used as a deposit for a public referendum proposal.
|
||||
**/
|
||||
submissionDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Information concerning the different referendum tracks.
|
||||
**/
|
||||
tracks: Vec<ITuple<[u16, PalletReferendaTrackInfo]>> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The number of blocks after submission that a referendum must begin being decided by.
|
||||
* Once this passes, then anyone may cancel the referendum.
|
||||
**/
|
||||
undecidingTimeout: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
gilt: {
|
||||
/**
|
||||
* Portion of the queue which is free from ordering and just a FIFO.
|
||||
@@ -455,7 +529,7 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
/**
|
||||
* The maximum amount of signatories allowed in the multisig.
|
||||
**/
|
||||
maxSignatories: u16 & AugmentedConst<ApiType>;
|
||||
maxSignatories: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -506,6 +580,21 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Number of runners_up to keep.
|
||||
**/
|
||||
desiredRunnersUp: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of candidates in a phragmen election.
|
||||
*
|
||||
* Warning: The election happens onchain, and this value will determine
|
||||
* the size of the election. 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.
|
||||
* When the limit is reached the new voters are ignored.
|
||||
**/
|
||||
maxVoters: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Identifier for the elections-phragmen pallet's lock
|
||||
**/
|
||||
@@ -615,6 +704,35 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
referenda: {
|
||||
/**
|
||||
* Quantization level for the referendum wakeup scheduler. A higher number will result in
|
||||
* fewer storage reads/writes needed for smaller voters, but also result in delays to the
|
||||
* automatic referendum status changes. Explicit servicing instructions are unaffected.
|
||||
**/
|
||||
alarmInterval: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum size of the referendum queue for a single track.
|
||||
**/
|
||||
maxQueued: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum amount to be used as a deposit for a public referendum proposal.
|
||||
**/
|
||||
submissionDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Information concerning the different referendum tracks.
|
||||
**/
|
||||
tracks: Vec<ITuple<[u16, PalletReferendaTrackInfo]>> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The number of blocks after submission that a referendum must begin being decided by.
|
||||
* Once this passes, then anyone may cancel the referendum.
|
||||
**/
|
||||
undecidingTimeout: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
registrar: {
|
||||
/**
|
||||
* The deposit to be paid per byte stored on chain.
|
||||
@@ -632,13 +750,11 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
};
|
||||
scheduler: {
|
||||
/**
|
||||
* The maximum weight that may be scheduled per block for any dispatchables of less
|
||||
* priority than `schedule::HARD_DEADLINE`.
|
||||
* The maximum weight that may be scheduled per block for any dispatchables.
|
||||
**/
|
||||
maximumWeight: u64 & AugmentedConst<ApiType>;
|
||||
maximumWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of scheduled calls in the queue for a single block.
|
||||
* Not strictly enforced, but used for weight estimation.
|
||||
**/
|
||||
maxScheduledPerBlock: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -709,6 +825,29 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Number of eras that staked funds must remain bonded for.
|
||||
**/
|
||||
bondingDuration: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Number of eras to keep in history.
|
||||
*
|
||||
* Following information is kept for eras in `[current_era -
|
||||
* HistoryDepth, current_era]`: `ErasStakers`, `ErasStakersClipped`,
|
||||
* `ErasValidatorPrefs`, `ErasValidatorReward`, `ErasRewardPoints`,
|
||||
* `ErasTotalStake`, `ErasStartSessionIndex`,
|
||||
* `StakingLedger.claimed_rewards`.
|
||||
*
|
||||
* Must be more than the number of eras delayed by session.
|
||||
* I.e. active era must always be in history. I.e. `active_era >
|
||||
* current_era - history_depth` must be guaranteed.
|
||||
*
|
||||
* If migrating an existing pallet from storage value to config value,
|
||||
* this should be set to same value or greater as in storage.
|
||||
*
|
||||
* Note: `HistoryDepth` is used as the upper bound for the `BoundedVec`
|
||||
* item `StakingLedger.claimed_rewards`. Setting this value lower than
|
||||
* the existing value can lead to inconsistencies in the
|
||||
* `StakingLedger` and will need to be handled properly in a migration.
|
||||
* The test `reducing_history_depth_abrupt` shows this effect.
|
||||
**/
|
||||
historyDepth: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum number of nominations per nominator.
|
||||
**/
|
||||
@@ -721,8 +860,16 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of `unlocking` chunks a [`StakingLedger`] can have. Effectively
|
||||
* determines how many unique eras a staker may be unbonding in.
|
||||
* The maximum number of `unlocking` chunks a [`StakingLedger`] can
|
||||
* have. Effectively determines how many unique eras a staker may be
|
||||
* unbonding in.
|
||||
*
|
||||
* Note: `MaxUnlockingChunks` is used as the upper bound for the
|
||||
* `BoundedVec` item `StakingLedger.unlocking`. Setting this value
|
||||
* lower than the existing value can lead to inconsistencies in the
|
||||
* `StakingLedger` and will need to be handled properly in a runtime
|
||||
* migration. The test `reducing_max_unlocking_chunks_abrupt` shows
|
||||
* this effect.
|
||||
**/
|
||||
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -757,9 +904,9 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
/**
|
||||
* The weight of runtime database operations the runtime can invoke.
|
||||
**/
|
||||
dbWeight: FrameSupportWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
|
||||
dbWeight: SpWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The designated SS85 prefix of this chain.
|
||||
* The designated SS58 prefix of this chain.
|
||||
*
|
||||
* This replaces the "ss58Format" property declared in the chain spec. Reason is
|
||||
* that the runtime should know about the prefix in order to make use of it as
|
||||
|
||||
@@ -115,7 +115,7 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
ExistingVestingSchedule: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Balance too low to send value
|
||||
* Balance too low to send value.
|
||||
**/
|
||||
InsufficientBalance: AugmentedError<ApiType>;
|
||||
/**
|
||||
@@ -249,6 +249,61 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
convictionVoting: {
|
||||
/**
|
||||
* The account is already delegating.
|
||||
**/
|
||||
AlreadyDelegating: 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`.
|
||||
**/
|
||||
AlreadyVoting: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The class ID supplied is invalid.
|
||||
**/
|
||||
BadClass: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The class must be supplied since it is not easily determinable from the state.
|
||||
**/
|
||||
ClassNeeded: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Too high a balance was provided that the account cannot afford.
|
||||
**/
|
||||
InsufficientFunds: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Maximum number of votes reached.
|
||||
**/
|
||||
MaxVotesReached: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Delegation to oneself makes no sense.
|
||||
**/
|
||||
Nonsense: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The actor has no permission to conduct the action.
|
||||
**/
|
||||
NoPermission: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The actor has no permission to conduct the action right now but will do in the future.
|
||||
**/
|
||||
NoPermissionYet: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The account is not currently delegating.
|
||||
**/
|
||||
NotDelegating: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Poll is not ongoing.
|
||||
**/
|
||||
NotOngoing: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The given account did not vote on the poll.
|
||||
**/
|
||||
NotVoter: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
council: {
|
||||
/**
|
||||
* Members are already initialized!
|
||||
@@ -406,18 +461,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Identity may not veto a proposal twice
|
||||
**/
|
||||
AlreadyVetoed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Preimage already noted
|
||||
**/
|
||||
DuplicatePreimage: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Proposal already made
|
||||
**/
|
||||
DuplicateProposal: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Imminent
|
||||
**/
|
||||
Imminent: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The instant referendum origin is currently disallowed.
|
||||
**/
|
||||
@@ -454,10 +501,6 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The account is not currently delegating.
|
||||
**/
|
||||
NotDelegating: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Not imminent
|
||||
**/
|
||||
NotImminent: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Next external proposal not simple majority
|
||||
**/
|
||||
@@ -466,14 +509,6 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The given account did not vote on the referendum.
|
||||
**/
|
||||
NotVoter: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Invalid preimage
|
||||
**/
|
||||
PreimageInvalid: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Preimage not found
|
||||
**/
|
||||
PreimageMissing: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Proposal still blacklisted
|
||||
**/
|
||||
@@ -487,13 +522,9 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
ReferendumInvalid: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Too early
|
||||
* Maximum number of items reached.
|
||||
**/
|
||||
TooEarly: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Maximum number of proposals reached.
|
||||
**/
|
||||
TooManyProposals: AugmentedError<ApiType>;
|
||||
TooMany: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Value too low
|
||||
**/
|
||||
@@ -517,6 +548,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
/**
|
||||
* Some bound not met
|
||||
**/
|
||||
BoundNotMet: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The call is not allowed at this point.
|
||||
**/
|
||||
@@ -565,6 +600,134 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The signed submission consumes too much weight
|
||||
**/
|
||||
SignedTooMuchWeight: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Submitted solution has too many winners
|
||||
**/
|
||||
TooManyWinners: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
fastUnstake: {
|
||||
/**
|
||||
* The provided un-staker is already in Head, and cannot deregister.
|
||||
**/
|
||||
AlreadyHead: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The bonded account has already been queued.
|
||||
**/
|
||||
AlreadyQueued: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The call is not allowed at this point because the pallet is not active.
|
||||
**/
|
||||
CallNotAllowed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The provided Controller account was not found.
|
||||
*
|
||||
* This means that the given account is not bonded.
|
||||
**/
|
||||
NotController: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The bonded account has active unlocking chunks.
|
||||
**/
|
||||
NotFullyBonded: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The provided un-staker is not in the `Queue`.
|
||||
**/
|
||||
NotQueued: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
fellowshipCollective: {
|
||||
/**
|
||||
* Account is already a member.
|
||||
**/
|
||||
AlreadyMember: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Unexpected error in state.
|
||||
**/
|
||||
Corruption: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The information provided is incorrect.
|
||||
**/
|
||||
InvalidWitness: AugmentedError<ApiType>;
|
||||
/**
|
||||
* There are no further records to be removed.
|
||||
**/
|
||||
NoneRemaining: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The origin is not sufficiently privileged to do the operation.
|
||||
**/
|
||||
NoPermission: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Account is not a member.
|
||||
**/
|
||||
NotMember: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The given poll index is unknown or has closed.
|
||||
**/
|
||||
NotPolling: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The given poll is still ongoing.
|
||||
**/
|
||||
Ongoing: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The member's rank is too low to vote.
|
||||
**/
|
||||
RankTooLow: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
fellowshipReferenda: {
|
||||
/**
|
||||
* The referendum index provided is invalid in this context.
|
||||
**/
|
||||
BadReferendum: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The track identifier given was invalid.
|
||||
**/
|
||||
BadTrack: AugmentedError<ApiType>;
|
||||
/**
|
||||
* There are already a full complement of referenda in progress for this track.
|
||||
**/
|
||||
Full: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Referendum's decision deposit is already paid.
|
||||
**/
|
||||
HasDeposit: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The deposit cannot be refunded since none was made.
|
||||
**/
|
||||
NoDeposit: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The deposit refunder is not the depositor.
|
||||
**/
|
||||
NoPermission: AugmentedError<ApiType>;
|
||||
/**
|
||||
* There was nothing to do in the advancement.
|
||||
**/
|
||||
NothingToDo: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Referendum is not ongoing.
|
||||
**/
|
||||
NotOngoing: AugmentedError<ApiType>;
|
||||
/**
|
||||
* No track exists for the proposal origin.
|
||||
**/
|
||||
NoTrack: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The queue of the track is empty.
|
||||
**/
|
||||
QueueEmpty: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Any deposit cannot be refunded until after the decision is over.
|
||||
**/
|
||||
Unfinished: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
@@ -752,10 +915,18 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The target is invalid.
|
||||
**/
|
||||
InvalidTarget: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The provided judgement was for a different identity.
|
||||
**/
|
||||
JudgementForDifferentIdentity: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Judgement given.
|
||||
**/
|
||||
JudgementGiven: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Error that occurs when there is an issue paying for judgement.
|
||||
**/
|
||||
JudgementPaymentFailed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* No identity found.
|
||||
**/
|
||||
@@ -927,6 +1098,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* anymore to, for example, collect rewards).
|
||||
**/
|
||||
FullyUnbonding: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Pool id provided is not correct/usable.
|
||||
**/
|
||||
InvalidPoolId: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Too many members in the pool or system.
|
||||
**/
|
||||
@@ -976,6 +1151,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Partial unbonding now allowed permissionlessly.
|
||||
**/
|
||||
PartialUnbondNotAllowedPermissionlessly: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Pool id currently in use.
|
||||
**/
|
||||
PoolIdInUse: AugmentedError<ApiType>;
|
||||
/**
|
||||
* An account is not a member.
|
||||
**/
|
||||
@@ -1170,6 +1349,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Para cannot be upgraded to a parachain.
|
||||
**/
|
||||
CannotUpgrade: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Parachain cannot currently schedule a code upgrade.
|
||||
**/
|
||||
CannotUpgradeCode: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Para is not registered in our system.
|
||||
**/
|
||||
@@ -1340,7 +1523,7 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
/**
|
||||
* Preimage is too large to store on-chain.
|
||||
**/
|
||||
TooLarge: AugmentedError<ApiType>;
|
||||
TooBig: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
@@ -1454,6 +1637,56 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
referenda: {
|
||||
/**
|
||||
* The referendum index provided is invalid in this context.
|
||||
**/
|
||||
BadReferendum: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The track identifier given was invalid.
|
||||
**/
|
||||
BadTrack: AugmentedError<ApiType>;
|
||||
/**
|
||||
* There are already a full complement of referenda in progress for this track.
|
||||
**/
|
||||
Full: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Referendum's decision deposit is already paid.
|
||||
**/
|
||||
HasDeposit: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The deposit cannot be refunded since none was made.
|
||||
**/
|
||||
NoDeposit: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The deposit refunder is not the depositor.
|
||||
**/
|
||||
NoPermission: AugmentedError<ApiType>;
|
||||
/**
|
||||
* There was nothing to do in the advancement.
|
||||
**/
|
||||
NothingToDo: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Referendum is not ongoing.
|
||||
**/
|
||||
NotOngoing: AugmentedError<ApiType>;
|
||||
/**
|
||||
* No track exists for the proposal origin.
|
||||
**/
|
||||
NoTrack: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The queue of the track is empty.
|
||||
**/
|
||||
QueueEmpty: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Any deposit cannot be refunded until after the decision is over.
|
||||
**/
|
||||
Unfinished: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
registrar: {
|
||||
/**
|
||||
* The ID is already registered.
|
||||
@@ -1522,6 +1755,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Failed to schedule a call
|
||||
**/
|
||||
FailedToSchedule: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Attempt to use a non-named function on a named task.
|
||||
**/
|
||||
Named: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Cannot find the scheduled call.
|
||||
**/
|
||||
@@ -1678,6 +1915,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* A nomination target was supplied that was blocked or otherwise not a validator.
|
||||
**/
|
||||
BadTarget: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Some bound is not met.
|
||||
**/
|
||||
BoundNotMet: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The user has enough bond and thus cannot be chilled forcefully by an external person.
|
||||
**/
|
||||
@@ -1754,8 +1995,8 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
TooManyTargets: AugmentedError<ApiType>;
|
||||
/**
|
||||
* There are too many validators in the system. Governance needs to adjust the staking
|
||||
* settings to keep things safe for the runtime.
|
||||
* There are too many validator candidates in the system. Governance needs to adjust the
|
||||
* staking settings to keep things safe for the runtime.
|
||||
**/
|
||||
TooManyValidators: AugmentedError<ApiType>;
|
||||
/**
|
||||
@@ -1979,6 +2220,32 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
whitelist: {
|
||||
/**
|
||||
* The call was already whitelisted; No-Op.
|
||||
**/
|
||||
CallAlreadyWhitelisted: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The call was not whitelisted.
|
||||
**/
|
||||
CallIsNotWhitelisted: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The weight of the decoded call was higher than the witness.
|
||||
**/
|
||||
InvalidCallWeightWitness: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The preimage of the call hash could not be loaded.
|
||||
**/
|
||||
UnavailablePreImage: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The call could not be decoded.
|
||||
**/
|
||||
UndecodableCall: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
xcmPallet: {
|
||||
/**
|
||||
* The location is invalid since it already has a subscription from us.
|
||||
|
||||
@@ -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 { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, KusamaRuntimeProxyType, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletStakingExposure, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, KusamaRuntimeProxyType, PalletConvictionVotingTally, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletStakingExposure, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, SpFinalityGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo, SpWeightsWeightV2Weight, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
|
||||
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
|
||||
|
||||
@@ -167,6 +167,20 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
convictionVoting: {
|
||||
/**
|
||||
* An account has delegated their vote to another account. \[who, target\]
|
||||
**/
|
||||
Delegated: AugmentedEvent<ApiType, [AccountId32, AccountId32]>;
|
||||
/**
|
||||
* An \[account\] has cancelled a previous delegation operation.
|
||||
**/
|
||||
Undelegated: AugmentedEvent<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
council: {
|
||||
/**
|
||||
* A motion was approved by the required threshold.
|
||||
@@ -263,10 +277,6 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* An account has delegated their vote to another account.
|
||||
**/
|
||||
Delegated: AugmentedEvent<ApiType, [who: AccountId32, target: AccountId32], { who: AccountId32, target: AccountId32 }>;
|
||||
/**
|
||||
* A proposal has been enacted.
|
||||
**/
|
||||
Executed: AugmentedEvent<ApiType, [refIndex: u32, result: Result<Null, SpRuntimeDispatchError>], { refIndex: u32, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||
/**
|
||||
* An external proposal has been tabled.
|
||||
**/
|
||||
@@ -279,26 +289,6 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* A proposal has been approved by referendum.
|
||||
**/
|
||||
Passed: AugmentedEvent<ApiType, [refIndex: u32], { refIndex: u32 }>;
|
||||
/**
|
||||
* A proposal could not be executed because its preimage was invalid.
|
||||
**/
|
||||
PreimageInvalid: AugmentedEvent<ApiType, [proposalHash: H256, refIndex: u32], { proposalHash: H256, refIndex: u32 }>;
|
||||
/**
|
||||
* A proposal could not be executed because its preimage was missing.
|
||||
**/
|
||||
PreimageMissing: AugmentedEvent<ApiType, [proposalHash: H256, refIndex: u32], { proposalHash: H256, refIndex: u32 }>;
|
||||
/**
|
||||
* A proposal's preimage was noted, and the deposit taken.
|
||||
**/
|
||||
PreimageNoted: AugmentedEvent<ApiType, [proposalHash: H256, who: AccountId32, deposit: u128], { proposalHash: H256, who: AccountId32, deposit: u128 }>;
|
||||
/**
|
||||
* A registered preimage was removed and the deposit collected by the reaper.
|
||||
**/
|
||||
PreimageReaped: AugmentedEvent<ApiType, [proposalHash: H256, provider: AccountId32, deposit: u128, reaper: AccountId32], { proposalHash: H256, provider: AccountId32, deposit: u128, reaper: AccountId32 }>;
|
||||
/**
|
||||
* A proposal preimage was removed and used (the deposit was returned).
|
||||
**/
|
||||
PreimageUsed: AugmentedEvent<ApiType, [proposalHash: H256, provider: AccountId32, deposit: u128], { proposalHash: H256, provider: AccountId32, deposit: u128 }>;
|
||||
/**
|
||||
* A proposal got canceled.
|
||||
**/
|
||||
@@ -318,7 +308,7 @@ declare module '@polkadot/api-base/types/events' {
|
||||
/**
|
||||
* A public proposal has been tabled for referendum vote.
|
||||
**/
|
||||
Tabled: AugmentedEvent<ApiType, [proposalIndex: u32, deposit: u128, depositors: Vec<AccountId32>], { proposalIndex: u32, deposit: u128, depositors: Vec<AccountId32> }>;
|
||||
Tabled: AugmentedEvent<ApiType, [proposalIndex: u32, deposit: u128], { proposalIndex: u32, deposit: u128 }>;
|
||||
/**
|
||||
* An account has cancelled a previous delegation operation.
|
||||
**/
|
||||
@@ -338,10 +328,15 @@ declare module '@polkadot/api-base/types/events' {
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
/**
|
||||
* The election has been finalized, with `Some` of the given computation, or else if the
|
||||
* election failed, `None`.
|
||||
* An election failed.
|
||||
*
|
||||
* Not much can be said about which computes failed in the process.
|
||||
**/
|
||||
ElectionFinalized: AugmentedEvent<ApiType, [electionCompute: Option<PalletElectionProviderMultiPhaseElectionCompute>], { electionCompute: Option<PalletElectionProviderMultiPhaseElectionCompute> }>;
|
||||
ElectionFailed: AugmentedEvent<ApiType, []>;
|
||||
/**
|
||||
* The election has been finalized, with the given computation and score.
|
||||
**/
|
||||
ElectionFinalized: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore], { compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore }>;
|
||||
/**
|
||||
* An account has been rewarded for their signed submission being finalized.
|
||||
**/
|
||||
@@ -362,7 +357,7 @@ declare module '@polkadot/api-base/types/events' {
|
||||
*
|
||||
* The `bool` is `true` when a previous solution was ejected to make room for this one.
|
||||
**/
|
||||
SolutionStored: AugmentedEvent<ApiType, [electionCompute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool], { electionCompute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool }>;
|
||||
SolutionStored: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool], { compute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool }>;
|
||||
/**
|
||||
* The unsigned phase of the given round has started.
|
||||
**/
|
||||
@@ -372,6 +367,110 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
fastUnstake: {
|
||||
/**
|
||||
* A batch was partially checked for the given eras, but the process did not finish.
|
||||
**/
|
||||
BatchChecked: AugmentedEvent<ApiType, [eras: Vec<u32>], { eras: Vec<u32> }>;
|
||||
/**
|
||||
* A batch was terminated.
|
||||
*
|
||||
* This is always follows by a number of `Unstaked` or `Slashed` events, marking the end
|
||||
* of the batch. A new batch will be created upon next block.
|
||||
**/
|
||||
BatchFinished: AugmentedEvent<ApiType, []>;
|
||||
/**
|
||||
* An internal error happened. Operations will be paused now.
|
||||
**/
|
||||
InternalError: AugmentedEvent<ApiType, []>;
|
||||
/**
|
||||
* A staker was slashed for requesting fast-unstake whilst being exposed.
|
||||
**/
|
||||
Slashed: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* A staker was unstaked.
|
||||
**/
|
||||
Unstaked: AugmentedEvent<ApiType, [stash: AccountId32, result: Result<Null, SpRuntimeDispatchError>], { stash: AccountId32, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
fellowshipCollective: {
|
||||
/**
|
||||
* A member `who` has been added.
|
||||
**/
|
||||
MemberAdded: AugmentedEvent<ApiType, [who: AccountId32], { who: AccountId32 }>;
|
||||
/**
|
||||
* The member `who` of given `rank` has been removed from the collective.
|
||||
**/
|
||||
MemberRemoved: AugmentedEvent<ApiType, [who: AccountId32, rank: u16], { who: AccountId32, rank: u16 }>;
|
||||
/**
|
||||
* The member `who`se rank has been changed to the given `rank`.
|
||||
**/
|
||||
RankChanged: AugmentedEvent<ApiType, [who: AccountId32, rank: u16], { who: AccountId32, rank: u16 }>;
|
||||
/**
|
||||
* The member `who` has voted for the `poll` with the given `vote` leading to an updated
|
||||
* `tally`.
|
||||
**/
|
||||
Voted: AugmentedEvent<ApiType, [who: AccountId32, poll: u32, vote: PalletRankedCollectiveVoteRecord, tally: PalletRankedCollectiveTally], { who: AccountId32, poll: u32, vote: PalletRankedCollectiveVoteRecord, tally: PalletRankedCollectiveTally }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
fellowshipReferenda: {
|
||||
/**
|
||||
* A referendum has been approved and its proposal has been scheduled.
|
||||
**/
|
||||
Approved: AugmentedEvent<ApiType, [index: u32], { index: u32 }>;
|
||||
/**
|
||||
* A referendum has been cancelled.
|
||||
**/
|
||||
Cancelled: AugmentedEvent<ApiType, [index: u32, tally: PalletRankedCollectiveTally], { index: u32, tally: PalletRankedCollectiveTally }>;
|
||||
ConfirmAborted: AugmentedEvent<ApiType, [index: u32], { index: u32 }>;
|
||||
/**
|
||||
* A referendum has ended its confirmation phase and is ready for approval.
|
||||
**/
|
||||
Confirmed: AugmentedEvent<ApiType, [index: u32, tally: PalletRankedCollectiveTally], { index: u32, tally: PalletRankedCollectiveTally }>;
|
||||
ConfirmStarted: AugmentedEvent<ApiType, [index: u32], { index: u32 }>;
|
||||
/**
|
||||
* The decision deposit has been placed.
|
||||
**/
|
||||
DecisionDepositPlaced: AugmentedEvent<ApiType, [index: u32, who: AccountId32, amount: u128], { index: u32, who: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* The decision deposit has been refunded.
|
||||
**/
|
||||
DecisionDepositRefunded: AugmentedEvent<ApiType, [index: u32, who: AccountId32, amount: u128], { index: u32, who: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* A referendum has moved into the deciding phase.
|
||||
**/
|
||||
DecisionStarted: AugmentedEvent<ApiType, [index: u32, track: u16, proposal: FrameSupportPreimagesBounded, tally: PalletRankedCollectiveTally], { index: u32, track: u16, proposal: FrameSupportPreimagesBounded, tally: PalletRankedCollectiveTally }>;
|
||||
/**
|
||||
* A deposit has been slashaed.
|
||||
**/
|
||||
DepositSlashed: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* A referendum has been killed.
|
||||
**/
|
||||
Killed: AugmentedEvent<ApiType, [index: u32, tally: PalletRankedCollectiveTally], { index: u32, tally: PalletRankedCollectiveTally }>;
|
||||
/**
|
||||
* A proposal has been rejected by referendum.
|
||||
**/
|
||||
Rejected: AugmentedEvent<ApiType, [index: u32, tally: PalletRankedCollectiveTally], { index: u32, tally: PalletRankedCollectiveTally }>;
|
||||
/**
|
||||
* A referendum has been submitted.
|
||||
**/
|
||||
Submitted: AugmentedEvent<ApiType, [index: u32, track: u16, proposal: FrameSupportPreimagesBounded], { index: u32, track: u16, proposal: FrameSupportPreimagesBounded }>;
|
||||
/**
|
||||
* A referendum has been timed out without being decided.
|
||||
**/
|
||||
TimedOut: AugmentedEvent<ApiType, [index: u32, tally: PalletRankedCollectiveTally], { index: u32, tally: PalletRankedCollectiveTally }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
gilt: {
|
||||
/**
|
||||
* A bid was successfully placed.
|
||||
@@ -417,6 +516,11 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* HRMP channel closed. `[by_parachain, channel_id]`
|
||||
**/
|
||||
ChannelClosed: AugmentedEvent<ApiType, [u32, PolkadotParachainPrimitivesHrmpChannelId]>;
|
||||
/**
|
||||
* An HRMP channel was opened via Root origin.
|
||||
* `[sender, recipient, proposed_max_capacity, proposed_max_message_size]`
|
||||
**/
|
||||
HrmpChannelForceOpened: AugmentedEvent<ApiType, [u32, u32, u32, u32]>;
|
||||
/**
|
||||
* Open HRMP channel accepted. `[sender, recipient]`
|
||||
**/
|
||||
@@ -773,11 +877,6 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* An announcement was placed to make a call in the future.
|
||||
**/
|
||||
Announced: AugmentedEvent<ApiType, [real: AccountId32, proxy: AccountId32, callHash: H256], { real: AccountId32, proxy: AccountId32, callHash: H256 }>;
|
||||
/**
|
||||
* Anonymous account has been created by new proxy with given
|
||||
* disambiguation index and proxy type.
|
||||
**/
|
||||
AnonymousCreated: AugmentedEvent<ApiType, [anonymous: AccountId32, who: AccountId32, proxyType: KusamaRuntimeProxyType, disambiguationIndex: u16], { anonymous: AccountId32, who: AccountId32, proxyType: KusamaRuntimeProxyType, disambiguationIndex: u16 }>;
|
||||
/**
|
||||
* A proxy was added.
|
||||
**/
|
||||
@@ -790,6 +889,11 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* A proxy was removed.
|
||||
**/
|
||||
ProxyRemoved: AugmentedEvent<ApiType, [delegator: AccountId32, delegatee: AccountId32, proxyType: KusamaRuntimeProxyType, delay: u32], { delegator: AccountId32, delegatee: AccountId32, proxyType: KusamaRuntimeProxyType, delay: u32 }>;
|
||||
/**
|
||||
* A pure account has been created by new proxy with given
|
||||
* disambiguation index and proxy type.
|
||||
**/
|
||||
PureCreated: AugmentedEvent<ApiType, [pure: AccountId32, who: AccountId32, proxyType: KusamaRuntimeProxyType, disambiguationIndex: u16], { pure: AccountId32, who: AccountId32, proxyType: KusamaRuntimeProxyType, disambiguationIndex: u16 }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
@@ -825,6 +929,58 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
referenda: {
|
||||
/**
|
||||
* A referendum has been approved and its proposal has been scheduled.
|
||||
**/
|
||||
Approved: AugmentedEvent<ApiType, [index: u32], { index: u32 }>;
|
||||
/**
|
||||
* A referendum has been cancelled.
|
||||
**/
|
||||
Cancelled: AugmentedEvent<ApiType, [index: u32, tally: PalletConvictionVotingTally], { index: u32, tally: PalletConvictionVotingTally }>;
|
||||
ConfirmAborted: AugmentedEvent<ApiType, [index: u32], { index: u32 }>;
|
||||
/**
|
||||
* A referendum has ended its confirmation phase and is ready for approval.
|
||||
**/
|
||||
Confirmed: AugmentedEvent<ApiType, [index: u32, tally: PalletConvictionVotingTally], { index: u32, tally: PalletConvictionVotingTally }>;
|
||||
ConfirmStarted: AugmentedEvent<ApiType, [index: u32], { index: u32 }>;
|
||||
/**
|
||||
* The decision deposit has been placed.
|
||||
**/
|
||||
DecisionDepositPlaced: AugmentedEvent<ApiType, [index: u32, who: AccountId32, amount: u128], { index: u32, who: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* The decision deposit has been refunded.
|
||||
**/
|
||||
DecisionDepositRefunded: AugmentedEvent<ApiType, [index: u32, who: AccountId32, amount: u128], { index: u32, who: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* A referendum has moved into the deciding phase.
|
||||
**/
|
||||
DecisionStarted: AugmentedEvent<ApiType, [index: u32, track: u16, proposal: FrameSupportPreimagesBounded, tally: PalletConvictionVotingTally], { index: u32, track: u16, proposal: FrameSupportPreimagesBounded, tally: PalletConvictionVotingTally }>;
|
||||
/**
|
||||
* A deposit has been slashaed.
|
||||
**/
|
||||
DepositSlashed: AugmentedEvent<ApiType, [who: AccountId32, amount: u128], { who: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* A referendum has been killed.
|
||||
**/
|
||||
Killed: AugmentedEvent<ApiType, [index: u32, tally: PalletConvictionVotingTally], { index: u32, tally: PalletConvictionVotingTally }>;
|
||||
/**
|
||||
* A proposal has been rejected by referendum.
|
||||
**/
|
||||
Rejected: AugmentedEvent<ApiType, [index: u32, tally: PalletConvictionVotingTally], { index: u32, tally: PalletConvictionVotingTally }>;
|
||||
/**
|
||||
* A referendum has been submitted.
|
||||
**/
|
||||
Submitted: AugmentedEvent<ApiType, [index: u32, track: u16, proposal: FrameSupportPreimagesBounded], { index: u32, track: u16, proposal: FrameSupportPreimagesBounded }>;
|
||||
/**
|
||||
* A referendum has been timed out without being decided.
|
||||
**/
|
||||
TimedOut: AugmentedEvent<ApiType, [index: u32, tally: PalletConvictionVotingTally], { index: u32, tally: PalletConvictionVotingTally }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
registrar: {
|
||||
Deregistered: AugmentedEvent<ApiType, [paraId: u32], { paraId: u32 }>;
|
||||
Registered: AugmentedEvent<ApiType, [paraId: u32, manager: AccountId32], { paraId: u32, manager: AccountId32 }>;
|
||||
@@ -838,7 +994,7 @@ declare module '@polkadot/api-base/types/events' {
|
||||
/**
|
||||
* The call for the provided hash was not found so the task has been aborted.
|
||||
**/
|
||||
CallLookupFailed: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<Bytes>, error: FrameSupportScheduleLookupError], { task: ITuple<[u32, u32]>, id: Option<Bytes>, error: FrameSupportScheduleLookupError }>;
|
||||
CallUnavailable: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed> }>;
|
||||
/**
|
||||
* Canceled some task.
|
||||
**/
|
||||
@@ -846,7 +1002,15 @@ declare module '@polkadot/api-base/types/events' {
|
||||
/**
|
||||
* Dispatched some task.
|
||||
**/
|
||||
Dispatched: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<Bytes>, result: Result<Null, SpRuntimeDispatchError>], { task: ITuple<[u32, u32]>, id: Option<Bytes>, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||
Dispatched: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>, result: Result<Null, SpRuntimeDispatchError>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed>, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||
/**
|
||||
* The given task was unable to be renewed since the agenda is full at that block.
|
||||
**/
|
||||
PeriodicFailed: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed> }>;
|
||||
/**
|
||||
* The given task can never be executed since it is overweight.
|
||||
**/
|
||||
PermanentlyOverweight: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed> }>;
|
||||
/**
|
||||
* Scheduled some task.
|
||||
**/
|
||||
@@ -963,40 +1127,37 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,
|
||||
* it will not be emitted for staking rewards when they are added to stake.
|
||||
**/
|
||||
Bonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||
Bonded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* An account has stopped participating as either a validator or nominator.
|
||||
* \[stash\]
|
||||
**/
|
||||
Chilled: AugmentedEvent<ApiType, [AccountId32]>;
|
||||
Chilled: AugmentedEvent<ApiType, [stash: AccountId32], { stash: AccountId32 }>;
|
||||
/**
|
||||
* The era payout has been set; the first balance is the validator-payout; the second is
|
||||
* the remainder from the maximum amount of reward.
|
||||
* \[era_index, validator_payout, remainder\]
|
||||
**/
|
||||
EraPaid: AugmentedEvent<ApiType, [u32, u128, u128]>;
|
||||
EraPaid: AugmentedEvent<ApiType, [eraIndex: u32, validatorPayout: u128, remainder: u128], { eraIndex: u32, validatorPayout: u128, remainder: u128 }>;
|
||||
/**
|
||||
* A nominator has been kicked from a validator. \[nominator, stash\]
|
||||
* A nominator has been kicked from a validator.
|
||||
**/
|
||||
Kicked: AugmentedEvent<ApiType, [AccountId32, AccountId32]>;
|
||||
Kicked: AugmentedEvent<ApiType, [nominator: AccountId32, stash: AccountId32], { nominator: AccountId32, stash: AccountId32 }>;
|
||||
/**
|
||||
* An old slashing report from a prior era was discarded because it could
|
||||
* not be processed. \[session_index\]
|
||||
* not be processed.
|
||||
**/
|
||||
OldSlashingReportDiscarded: AugmentedEvent<ApiType, [u32]>;
|
||||
OldSlashingReportDiscarded: AugmentedEvent<ApiType, [sessionIndex: u32], { sessionIndex: u32 }>;
|
||||
/**
|
||||
* The stakers' rewards are getting paid. \[era_index, validator_stash\]
|
||||
* The stakers' rewards are getting paid.
|
||||
**/
|
||||
PayoutStarted: AugmentedEvent<ApiType, [u32, AccountId32]>;
|
||||
PayoutStarted: AugmentedEvent<ApiType, [eraIndex: u32, validatorStash: AccountId32], { eraIndex: u32, validatorStash: AccountId32 }>;
|
||||
/**
|
||||
* The nominator has been rewarded by this amount. \[stash, amount\]
|
||||
* The nominator has been rewarded by this amount.
|
||||
**/
|
||||
Rewarded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||
Rewarded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* One validator (and its nominators) has been slashed by the given amount.
|
||||
* \[validator, amount\]
|
||||
* One staker (and potentially its nominators) has been slashed by the given amount.
|
||||
**/
|
||||
Slashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||
Slashed: AugmentedEvent<ApiType, [staker: AccountId32, amount: u128], { staker: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* A new set of stakers was elected.
|
||||
**/
|
||||
@@ -1006,18 +1167,18 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
StakingElectionFailed: AugmentedEvent<ApiType, []>;
|
||||
/**
|
||||
* An account has unbonded this amount. \[stash, amount\]
|
||||
* An account has unbonded this amount.
|
||||
**/
|
||||
Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||
Unbonded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* A validator has set their preferences.
|
||||
**/
|
||||
ValidatorPrefsSet: AugmentedEvent<ApiType, [AccountId32, PalletStakingValidatorPrefs]>;
|
||||
ValidatorPrefsSet: AugmentedEvent<ApiType, [stash: AccountId32, prefs: PalletStakingValidatorPrefs], { stash: AccountId32, prefs: PalletStakingValidatorPrefs }>;
|
||||
/**
|
||||
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
|
||||
* from the unlocking queue. \[stash, amount\]
|
||||
* from the unlocking queue.
|
||||
**/
|
||||
Withdrawn: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||
Withdrawn: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
@@ -1031,11 +1192,11 @@ declare module '@polkadot/api-base/types/events' {
|
||||
/**
|
||||
* An extrinsic failed.
|
||||
**/
|
||||
ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo }>;
|
||||
ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportDispatchDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportDispatchDispatchInfo }>;
|
||||
/**
|
||||
* An extrinsic completed successfully.
|
||||
**/
|
||||
ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchInfo: FrameSupportWeightsDispatchInfo }>;
|
||||
ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportDispatchDispatchInfo], { dispatchInfo: FrameSupportDispatchDispatchInfo }>;
|
||||
/**
|
||||
* An account was reaped.
|
||||
**/
|
||||
@@ -1213,14 +1374,14 @@ declare module '@polkadot/api-base/types/events' {
|
||||
*
|
||||
* \[ para, id, overweight_index, required \]
|
||||
**/
|
||||
OverweightEnqueued: AugmentedEvent<ApiType, [u32, U8aFixed, u64, u64]>;
|
||||
OverweightEnqueued: AugmentedEvent<ApiType, [u32, U8aFixed, u64, SpWeightsWeightV2Weight]>;
|
||||
/**
|
||||
* Upward message from the overweight queue was executed with the given actual weight
|
||||
* used.
|
||||
*
|
||||
* \[ overweight_index, used \]
|
||||
**/
|
||||
OverweightServiced: AugmentedEvent<ApiType, [u64, u64]>;
|
||||
OverweightServiced: AugmentedEvent<ApiType, [u64, SpWeightsWeightV2Weight]>;
|
||||
/**
|
||||
* Upward message is unsupported version of XCM.
|
||||
* \[ id \]
|
||||
@@ -1235,7 +1396,7 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* The weight limit for handling upward messages was reached.
|
||||
* \[ id, remaining, required \]
|
||||
**/
|
||||
WeightExhausted: AugmentedEvent<ApiType, [U8aFixed, u64, u64]>;
|
||||
WeightExhausted: AugmentedEvent<ApiType, [U8aFixed, SpWeightsWeightV2Weight, SpWeightsWeightV2Weight]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
@@ -1301,7 +1462,22 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
whitelist: {
|
||||
CallWhitelisted: AugmentedEvent<ApiType, [callHash: H256], { callHash: H256 }>;
|
||||
WhitelistedCallDispatched: AugmentedEvent<ApiType, [callHash: H256, result: Result<FrameSupportDispatchPostDispatchInfo, SpRuntimeDispatchErrorWithPostInfo>], { callHash: H256, result: Result<FrameSupportDispatchPostDispatchInfo, SpRuntimeDispatchErrorWithPostInfo> }>;
|
||||
WhitelistedCallRemoved: AugmentedEvent<ApiType, [callHash: H256], { callHash: H256 }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
xcmPallet: {
|
||||
/**
|
||||
* Some assets have been claimed from an asset trap
|
||||
*
|
||||
* \[ hash, origin, assets \]
|
||||
**/
|
||||
AssetsClaimed: AugmentedEvent<ApiType, [H256, XcmV1MultiLocation, XcmVersionedMultiAssets]>;
|
||||
/**
|
||||
* Some assets have been placed in an asset trap.
|
||||
*
|
||||
@@ -1363,7 +1539,7 @@ declare module '@polkadot/api-base/types/events' {
|
||||
*
|
||||
* \[ id, pallet index, call index, actual weight, max budgeted weight \]
|
||||
**/
|
||||
NotifyOverweight: AugmentedEvent<ApiType, [u64, u8, u8, u64, u64]>;
|
||||
NotifyOverweight: AugmentedEvent<ApiType, [u64, u8, u8, SpWeightsWeightV2Weight, SpWeightsWeightV2Weight]>;
|
||||
/**
|
||||
* A given location which had a version change subscription was dropped owing to an error
|
||||
* migrating the location to our new XCM format.
|
||||
|
||||
@@ -7,11 +7,11 @@ import '@polkadot/api-base/types/storage';
|
||||
|
||||
import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';
|
||||
import type { Data } from '@polkadot/types';
|
||||
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, WrapperOpaque, bool, u128, u32, u64 } from '@polkadot/types-codec';
|
||||
import type { Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u16, u32, u64 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeSessionKeys, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeSessionKeys, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletConvictionVotingVoteVoting, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
import type { Observable } from '@polkadot/types/types';
|
||||
|
||||
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
||||
@@ -317,6 +317,23 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
convictionVoting: {
|
||||
/**
|
||||
* The voting classes which have a non-zero lock requirement and the lock amounts which they
|
||||
* require. The actual amount locked on behalf of this pallet should always be the maximum of
|
||||
* this list.
|
||||
**/
|
||||
classLocksFor: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<ITuple<[u16, u128]>>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* All voting for a particular voter in a particular voting class. We store the balance for the
|
||||
* number of votes that we have recorded.
|
||||
**/
|
||||
votingFor: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u16 | AnyNumber | Uint8Array) => Observable<PalletConvictionVotingVoteVoting>, [AccountId32, u16]> & QueryableStorageEntry<ApiType, [AccountId32, u16]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
council: {
|
||||
/**
|
||||
* The current members of the collective. This is stored sorted (just by value).
|
||||
@@ -402,20 +419,15 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* - `LastTabledWasExternal` is `false`; or
|
||||
* - `PublicProps` is empty.
|
||||
**/
|
||||
nextExternal: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[H256, PalletDemocracyVoteThreshold]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Map of hashes to the proposal preimage, along with who registered it and their deposit.
|
||||
* The block number is the block at which it was deposited.
|
||||
**/
|
||||
preimages: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<PalletDemocracyPreimageStatus>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
|
||||
nextExternal: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[FrameSupportPreimagesBounded, PalletDemocracyVoteThreshold]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The number of (public) proposals that have been made so far.
|
||||
**/
|
||||
publicPropCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The public proposals. Unsorted. The second item is the proposal's hash.
|
||||
* The public proposals. Unsorted. The second item is the proposal.
|
||||
**/
|
||||
publicProps: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, H256, AccountId32]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
publicProps: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, FrameSupportPreimagesBounded, AccountId32]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The next free referendum index, aka the number of referenda started so far.
|
||||
**/
|
||||
@@ -426,12 +438,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* TWOX-NOTE: SAFE as indexes are not under an attacker’s control.
|
||||
**/
|
||||
referendumInfoOf: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletDemocracyReferendumInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Storage version of the pallet.
|
||||
*
|
||||
* New networks start with last version.
|
||||
**/
|
||||
storageVersion: AugmentedQuery<ApiType, () => Observable<Option<PalletDemocracyReleases>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* All votes for a particular voter. We store the balance for the number of votes that we
|
||||
* have recorded. The second item is the total amount of delegations, that will be added.
|
||||
@@ -496,14 +502,14 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
round: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* A sorted, bounded set of `(score, index)`, where each `index` points to a value in
|
||||
* `SignedSubmissions`.
|
||||
* A sorted, bounded vector of `(score, block_number, index)`, where each `index` points to a
|
||||
* value in `SignedSubmissions`.
|
||||
*
|
||||
* We never need to process more than a single signed submission at a time. Signed submissions
|
||||
* can be quite large, so we're willing to pay the cost of multiple database accesses to access
|
||||
* them one at a time instead of reading and decoding all of them at once.
|
||||
**/
|
||||
signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<BTreeMap<SpNposElectionsElectionScore, u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[SpNposElectionsElectionScore, u32, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The next index to be assigned to an incoming signed submission.
|
||||
*
|
||||
@@ -543,6 +549,89 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
fastUnstake: {
|
||||
/**
|
||||
* Counter for the related counted storage map
|
||||
**/
|
||||
counterForQueue: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Number of eras to check per block.
|
||||
*
|
||||
* If set to 0, this pallet does absolutely nothing.
|
||||
*
|
||||
* Based on the amount of weight available at `on_idle`, up to this many eras of a single
|
||||
* nominator might be checked.
|
||||
**/
|
||||
erasToCheckPerBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The current "head of the queue" being unstaked.
|
||||
**/
|
||||
head: AugmentedQuery<ApiType, () => Observable<Option<PalletFastUnstakeUnstakeRequest>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The map of all accounts wishing to be unstaked.
|
||||
*
|
||||
* Keeps track of `AccountId` wishing to unstake and it's corresponding deposit.
|
||||
**/
|
||||
queue: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u128>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
fellowshipCollective: {
|
||||
/**
|
||||
* The index of each ranks's member into the group of members who have at least that rank.
|
||||
**/
|
||||
idToIndex: AugmentedQuery<ApiType, (arg1: u16 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [u16, AccountId32]> & QueryableStorageEntry<ApiType, [u16, AccountId32]>;
|
||||
/**
|
||||
* The members in the collective by index. All indices in the range `0..MemberCount` will
|
||||
* return `Some`, however a member's index is not guaranteed to remain unchanged over time.
|
||||
**/
|
||||
indexToId: AugmentedQuery<ApiType, (arg1: u16 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<AccountId32>>, [u16, u32]> & QueryableStorageEntry<ApiType, [u16, u32]>;
|
||||
/**
|
||||
* The number of members in the collective who have at least the rank according to the index
|
||||
* of the vec.
|
||||
**/
|
||||
memberCount: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<u32>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
|
||||
/**
|
||||
* The current members of the collective.
|
||||
**/
|
||||
members: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletRankedCollectiveMemberRecord>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Votes on a given proposal, if it is ongoing.
|
||||
**/
|
||||
voting: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<PalletRankedCollectiveVoteRecord>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;
|
||||
votingCleanup: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
fellowshipReferenda: {
|
||||
/**
|
||||
* The number of referenda being decided currently.
|
||||
**/
|
||||
decidingCount: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<u32>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
|
||||
/**
|
||||
* 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.
|
||||
**/
|
||||
referendumInfoFor: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletReferendaReferendumInfoRankedCollectiveTally>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* The sorted list of referenda ready to be decided but not yet being decided, ordered by
|
||||
* conviction-weighted approvals.
|
||||
*
|
||||
* This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`.
|
||||
**/
|
||||
trackQueue: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[u32, u32]>>>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
gilt: {
|
||||
/**
|
||||
* The currently active gilts, indexed according to the order of creation.
|
||||
@@ -789,7 +878,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
multisig: {
|
||||
calls: AugmentedQuery<ApiType, (arg: U8aFixed | string | Uint8Array) => Observable<Option<ITuple<[WrapperKeepOpaque<Call>, AccountId32, u128]>>>, [U8aFixed]> & QueryableStorageEntry<ApiType, [U8aFixed]>;
|
||||
/**
|
||||
* The set of open multisig operations.
|
||||
**/
|
||||
@@ -1259,10 +1347,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
preimage: {
|
||||
/**
|
||||
* The preimages stored by this pallet.
|
||||
**/
|
||||
preimageFor: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<Bytes>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
|
||||
preimageFor: AugmentedQuery<ApiType, (arg: ITuple<[H256, u32]> | [H256 | string | Uint8Array, u32 | AnyNumber | Uint8Array]) => Observable<Option<Bytes>>, [ITuple<[H256, u32]>]> & QueryableStorageEntry<ApiType, [ITuple<[H256, u32]>]>;
|
||||
/**
|
||||
* The request status of a given hash.
|
||||
**/
|
||||
@@ -1310,6 +1395,31 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
referenda: {
|
||||
/**
|
||||
* The number of referenda being decided currently.
|
||||
**/
|
||||
decidingCount: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<u32>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
|
||||
/**
|
||||
* 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.
|
||||
**/
|
||||
referendumInfoFor: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletReferendaReferendumInfoConvictionVotingTally>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* The sorted list of referenda ready to be decided but not yet being decided, ordered by
|
||||
* conviction-weighted approvals.
|
||||
*
|
||||
* This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`.
|
||||
**/
|
||||
trackQueue: AugmentedQuery<ApiType, (arg: u16 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[u32, u128]>>>, [u16]> & QueryableStorageEntry<ApiType, [u16]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
registrar: {
|
||||
/**
|
||||
* The next free `ParaId`.
|
||||
@@ -1335,11 +1445,15 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Items to be executed, indexed by the block number that they should be executed on.
|
||||
**/
|
||||
agenda: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Option<PalletSchedulerScheduledV3>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
agenda: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Option<PalletSchedulerScheduled>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
incompleteSince: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Lookup from identity to the block number and index of the task.
|
||||
* Lookup from a name to the block number and index of the task.
|
||||
*
|
||||
* For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4
|
||||
* identities.
|
||||
**/
|
||||
lookup: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>;
|
||||
lookup: AugmentedQuery<ApiType, (arg: U8aFixed | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [U8aFixed]> & QueryableStorageEntry<ApiType, [U8aFixed]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -1590,16 +1704,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* Mode of era forcing.
|
||||
**/
|
||||
forceEra: AugmentedQuery<ApiType, () => Observable<PalletStakingForcing>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Number of eras to keep in history.
|
||||
*
|
||||
* Information is kept for eras in `[current_era - history_depth; current_era]`.
|
||||
*
|
||||
* Must be more than the number of eras delayed by session otherwise. I.e. active era must
|
||||
* always be in history. I.e. `active_era > current_era - history_depth` must be
|
||||
* guaranteed.
|
||||
**/
|
||||
historyDepth: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Any validators that may never be slashed or forcibly kicked. It's a Vec since they're
|
||||
* easy to initialize and the performance hit is minimal (we expect no more than four
|
||||
@@ -1706,7 +1810,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
unappliedSlashes: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<PalletStakingUnappliedSlash>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* The ideal number of staking participants.
|
||||
* The ideal number of active validators.
|
||||
**/
|
||||
validatorCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
@@ -1739,7 +1843,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* The current weight for the block.
|
||||
**/
|
||||
blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportWeightsPerDispatchClassU64>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportDispatchPerDispatchClassWeight>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Digest of the current block, also part of the block header.
|
||||
**/
|
||||
@@ -2004,6 +2108,13 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
whitelist: {
|
||||
whitelistedCall: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<Null>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
xcmPallet: {
|
||||
/**
|
||||
* The existing asset traps.
|
||||
|
||||
@@ -7,7 +7,7 @@ import '@polkadot/api-base/types/calls';
|
||||
|
||||
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
|
||||
import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, 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 { ValidatorSet } from '@polkadot/types/interfaces/beefy';
|
||||
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
|
||||
@@ -17,10 +17,9 @@ import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
||||
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
|
||||
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||
import type { NpApiError } from '@polkadot/types/interfaces/nompools';
|
||||
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
|
||||
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import type { AccountId, Balance, Block, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
||||
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
||||
import type { SessionIndex } from '@polkadot/types/interfaces/session';
|
||||
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
||||
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
|
||||
@@ -212,7 +211,7 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
/**
|
||||
* Returns the pending rewards for the given member.
|
||||
**/
|
||||
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Result<Balance, NpApiError>>>;
|
||||
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
@@ -334,7 +333,7 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x37c8bb1350a9a2a8/1 */
|
||||
/** 0x37c8bb1350a9a2a8/2 */
|
||||
transactionPaymentApi: {
|
||||
/**
|
||||
* The transaction fee details
|
||||
@@ -349,5 +348,20 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xf3ff14d5ab527059/2 */
|
||||
transactionPaymentCallApi: {
|
||||
/**
|
||||
* The call fee details
|
||||
**/
|
||||
queryCallFeeDetails: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<FeeDetails>>;
|
||||
/**
|
||||
* The call info
|
||||
**/
|
||||
queryCallInfo: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
} // AugmentedCalls
|
||||
} // declare module
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '9.2.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '9.9.2' };
|
||||
|
||||
@@ -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 { Codec } from '@polkadot/types-codec/types';
|
||||
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
|
||||
|
||||
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
|
||||
|
||||
@@ -202,6 +202,14 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* How often (in blocks) new public referenda are launched.
|
||||
**/
|
||||
launchPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of items which can be blacklisted.
|
||||
**/
|
||||
maxBlacklisted: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of deposits a public proposal may have at any time.
|
||||
**/
|
||||
maxDeposits: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of public proposals that can exist at any time.
|
||||
**/
|
||||
@@ -217,10 +225,6 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* The minimum amount to be used as a deposit for a public referendum proposal.
|
||||
**/
|
||||
minimumDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of balance that must be deposited per byte of preimage stored.
|
||||
**/
|
||||
preimageByteDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum period of vote locking.
|
||||
*
|
||||
@@ -258,6 +262,16 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* take place over multiple blocks.
|
||||
**/
|
||||
maxElectingVoters: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of winners that can be elected by this `ElectionProvider`
|
||||
* implementation.
|
||||
*
|
||||
* Note: This must always be greater or equal to `T::DataProvider::desired_targets()`.
|
||||
**/
|
||||
maxWinners: u32 & AugmentedConst<ApiType>;
|
||||
minerMaxLength: u32 & AugmentedConst<ApiType>;
|
||||
minerMaxVotesPerVoter: u32 & AugmentedConst<ApiType>;
|
||||
minerMaxWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The priority of the unsigned transaction submitted in the unsigned-phase
|
||||
**/
|
||||
@@ -302,7 +316,7 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* this pallet), then [`MinerConfig::solution_weight`] is used to compare against
|
||||
* this value.
|
||||
**/
|
||||
signedMaxWeight: u64 & AugmentedConst<ApiType>;
|
||||
signedMaxWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Duration of the signed phase.
|
||||
**/
|
||||
@@ -320,6 +334,17 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
fastUnstake: {
|
||||
/**
|
||||
* Deposit to take for unstaking, to make sure we're able to slash the it in order to cover
|
||||
* the costs of resources on unsuccessful unstake.
|
||||
**/
|
||||
deposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
grandpa: {
|
||||
/**
|
||||
* Max Authorities in use
|
||||
@@ -406,7 +431,32 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
/**
|
||||
* The maximum amount of signatories allowed in the multisig.
|
||||
**/
|
||||
maxSignatories: u16 & AugmentedConst<ApiType>;
|
||||
maxSignatories: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
nominationPools: {
|
||||
/**
|
||||
* The maximum pool points-to-balance ratio that an `open` pool can have.
|
||||
*
|
||||
* This is important in the event slashing takes place and the pool's points-to-balance
|
||||
* ratio becomes disproportional.
|
||||
*
|
||||
* Moreover, this relates to the `RewardCounter` type as well, as the arithmetic operations
|
||||
* are a function of number of points, and by setting this value to e.g. 10, you ensure
|
||||
* that the total number of points in the system are at most 10 times the total_issuance of
|
||||
* the chain, in the absolute worse case.
|
||||
*
|
||||
* For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1.
|
||||
* Such a scenario would also be the equivalent of the pool being 90% slashed.
|
||||
**/
|
||||
maxPointsToBalance: u8 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The nomination pool's pallet id.
|
||||
**/
|
||||
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -432,6 +482,21 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Number of runners_up to keep.
|
||||
**/
|
||||
desiredRunnersUp: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of candidates in a phragmen election.
|
||||
*
|
||||
* Warning: The election happens onchain, and this value will determine
|
||||
* the size of the election. 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.
|
||||
* When the limit is reached the new voters are ignored.
|
||||
**/
|
||||
maxVoters: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Identifier for the elections-phragmen pallet's lock
|
||||
**/
|
||||
@@ -518,13 +583,11 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
};
|
||||
scheduler: {
|
||||
/**
|
||||
* The maximum weight that may be scheduled per block for any dispatchables of less
|
||||
* priority than `schedule::HARD_DEADLINE`.
|
||||
* The maximum weight that may be scheduled per block for any dispatchables.
|
||||
**/
|
||||
maximumWeight: u64 & AugmentedConst<ApiType>;
|
||||
maximumWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of scheduled calls in the queue for a single block.
|
||||
* Not strictly enforced, but used for weight estimation.
|
||||
**/
|
||||
maxScheduledPerBlock: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -551,6 +614,29 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Number of eras that staked funds must remain bonded for.
|
||||
**/
|
||||
bondingDuration: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Number of eras to keep in history.
|
||||
*
|
||||
* Following information is kept for eras in `[current_era -
|
||||
* HistoryDepth, current_era]`: `ErasStakers`, `ErasStakersClipped`,
|
||||
* `ErasValidatorPrefs`, `ErasValidatorReward`, `ErasRewardPoints`,
|
||||
* `ErasTotalStake`, `ErasStartSessionIndex`,
|
||||
* `StakingLedger.claimed_rewards`.
|
||||
*
|
||||
* Must be more than the number of eras delayed by session.
|
||||
* I.e. active era must always be in history. I.e. `active_era >
|
||||
* current_era - history_depth` must be guaranteed.
|
||||
*
|
||||
* If migrating an existing pallet from storage value to config value,
|
||||
* this should be set to same value or greater as in storage.
|
||||
*
|
||||
* Note: `HistoryDepth` is used as the upper bound for the `BoundedVec`
|
||||
* item `StakingLedger.claimed_rewards`. Setting this value lower than
|
||||
* the existing value can lead to inconsistencies in the
|
||||
* `StakingLedger` and will need to be handled properly in a migration.
|
||||
* The test `reducing_history_depth_abrupt` shows this effect.
|
||||
**/
|
||||
historyDepth: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum number of nominations per nominator.
|
||||
**/
|
||||
@@ -563,8 +649,16 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of `unlocking` chunks a [`StakingLedger`] can have. Effectively
|
||||
* determines how many unique eras a staker may be unbonding in.
|
||||
* The maximum number of `unlocking` chunks a [`StakingLedger`] can
|
||||
* have. Effectively determines how many unique eras a staker may be
|
||||
* unbonding in.
|
||||
*
|
||||
* Note: `MaxUnlockingChunks` is used as the upper bound for the
|
||||
* `BoundedVec` item `StakingLedger.unlocking`. Setting this value
|
||||
* lower than the existing value can lead to inconsistencies in the
|
||||
* `StakingLedger` and will need to be handled properly in a runtime
|
||||
* migration. The test `reducing_max_unlocking_chunks_abrupt` shows
|
||||
* this effect.
|
||||
**/
|
||||
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -599,9 +693,9 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
/**
|
||||
* The weight of runtime database operations the runtime can invoke.
|
||||
**/
|
||||
dbWeight: FrameSupportWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
|
||||
dbWeight: SpWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The designated SS85 prefix of this chain.
|
||||
* The designated SS58 prefix of this chain.
|
||||
*
|
||||
* This replaces the "ss58Format" property declared in the chain spec. Reason is
|
||||
* that the runtime should know about the prefix in order to make use of it as
|
||||
|
||||
@@ -115,7 +115,7 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
ExistingVestingSchedule: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Balance too low to send value
|
||||
* Balance too low to send value.
|
||||
**/
|
||||
InsufficientBalance: AugmentedError<ApiType>;
|
||||
/**
|
||||
@@ -406,18 +406,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Identity may not veto a proposal twice
|
||||
**/
|
||||
AlreadyVetoed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Preimage already noted
|
||||
**/
|
||||
DuplicatePreimage: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Proposal already made
|
||||
**/
|
||||
DuplicateProposal: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Imminent
|
||||
**/
|
||||
Imminent: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The instant referendum origin is currently disallowed.
|
||||
**/
|
||||
@@ -454,10 +446,6 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The account is not currently delegating.
|
||||
**/
|
||||
NotDelegating: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Not imminent
|
||||
**/
|
||||
NotImminent: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Next external proposal not simple majority
|
||||
**/
|
||||
@@ -466,14 +454,6 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The given account did not vote on the referendum.
|
||||
**/
|
||||
NotVoter: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Invalid preimage
|
||||
**/
|
||||
PreimageInvalid: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Preimage not found
|
||||
**/
|
||||
PreimageMissing: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Proposal still blacklisted
|
||||
**/
|
||||
@@ -487,13 +467,9 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
ReferendumInvalid: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Too early
|
||||
* Maximum number of items reached.
|
||||
**/
|
||||
TooEarly: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Maximum number of proposals reached.
|
||||
**/
|
||||
TooManyProposals: AugmentedError<ApiType>;
|
||||
TooMany: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Value too low
|
||||
**/
|
||||
@@ -517,6 +493,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
/**
|
||||
* Some bound not met
|
||||
**/
|
||||
BoundNotMet: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The call is not allowed at this point.
|
||||
**/
|
||||
@@ -565,6 +545,42 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The signed submission consumes too much weight
|
||||
**/
|
||||
SignedTooMuchWeight: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Submitted solution has too many winners
|
||||
**/
|
||||
TooManyWinners: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
fastUnstake: {
|
||||
/**
|
||||
* The provided un-staker is already in Head, and cannot deregister.
|
||||
**/
|
||||
AlreadyHead: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The bonded account has already been queued.
|
||||
**/
|
||||
AlreadyQueued: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The call is not allowed at this point because the pallet is not active.
|
||||
**/
|
||||
CallNotAllowed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The provided Controller account was not found.
|
||||
*
|
||||
* This means that the given account is not bonded.
|
||||
**/
|
||||
NotController: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The bonded account has active unlocking chunks.
|
||||
**/
|
||||
NotFullyBonded: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The provided un-staker is not in the `Queue`.
|
||||
**/
|
||||
NotQueued: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
@@ -713,10 +729,18 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The target is invalid.
|
||||
**/
|
||||
InvalidTarget: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The provided judgement was for a different identity.
|
||||
**/
|
||||
JudgementForDifferentIdentity: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Judgement given.
|
||||
**/
|
||||
JudgementGiven: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Error that occurs when there is an issue paying for judgement.
|
||||
**/
|
||||
JudgementPaymentFailed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* No identity found.
|
||||
**/
|
||||
@@ -860,6 +884,112 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
nominationPools: {
|
||||
/**
|
||||
* An account is already delegating in another pool. An account may only belong to one
|
||||
* pool at a time.
|
||||
**/
|
||||
AccountBelongsToOtherPool: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The pools state cannot be changed.
|
||||
**/
|
||||
CanNotChangeState: AugmentedError<ApiType>;
|
||||
/**
|
||||
* None of the funds can be withdrawn yet because the bonding duration has not passed.
|
||||
**/
|
||||
CannotWithdrawAny: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Some error occurred that should never happen. This should be reported to the
|
||||
* maintainers.
|
||||
**/
|
||||
Defensive: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The caller does not have adequate permissions.
|
||||
**/
|
||||
DoesNotHavePermission: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The member is fully unbonded (and thus cannot access the bonded and reward pool
|
||||
* anymore to, for example, collect rewards).
|
||||
**/
|
||||
FullyUnbonding: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Pool id provided is not correct/usable.
|
||||
**/
|
||||
InvalidPoolId: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Too many members in the pool or system.
|
||||
**/
|
||||
MaxPoolMembers: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The system is maxed out on pools.
|
||||
**/
|
||||
MaxPools: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The member cannot unbond further chunks due to reaching the limit.
|
||||
**/
|
||||
MaxUnbondingLimit: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Metadata exceeds [`Config::MaxMetadataLen`]
|
||||
**/
|
||||
MetadataExceedsMaxLen: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The amount does not meet the minimum bond to either join or create a pool.
|
||||
*
|
||||
* The depositor can never unbond to a value less than
|
||||
* `Pallet::depositor_min_bond`. The caller does not have nominating
|
||||
* permissions for the pool. Members can never unbond to a value below `MinJoinBond`.
|
||||
**/
|
||||
MinimumBondNotMet: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A pool must be in [`PoolState::Destroying`] in order for the depositor to unbond or for
|
||||
* other members to be permissionlessly unbonded.
|
||||
**/
|
||||
NotDestroying: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Either a) the caller cannot make a valid kick or b) the pool is not destroying.
|
||||
**/
|
||||
NotKickerOrDestroying: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The caller does not have nominating permissions for the pool.
|
||||
**/
|
||||
NotNominator: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The pool is not open to join
|
||||
**/
|
||||
NotOpen: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The transaction could not be executed due to overflow risk for the pool.
|
||||
**/
|
||||
OverflowRisk: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Partial unbonding now allowed permissionlessly.
|
||||
**/
|
||||
PartialUnbondNotAllowedPermissionlessly: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Pool id currently in use.
|
||||
**/
|
||||
PoolIdInUse: AugmentedError<ApiType>;
|
||||
/**
|
||||
* An account is not a member.
|
||||
**/
|
||||
PoolMemberNotFound: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A (bonded) pool id does not exist.
|
||||
**/
|
||||
PoolNotFound: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A reward pool does not exist. In all cases this is a system logic error.
|
||||
**/
|
||||
RewardPoolNotFound: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A sub pool does not exist.
|
||||
**/
|
||||
SubPoolsNotFound: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
paraInclusion: {
|
||||
/**
|
||||
* Bitfield consists of zeros only.
|
||||
@@ -1033,6 +1163,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Para cannot be upgraded to a parachain.
|
||||
**/
|
||||
CannotUpgrade: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Parachain cannot currently schedule a code upgrade.
|
||||
**/
|
||||
CannotUpgradeCode: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Para is not registered in our system.
|
||||
**/
|
||||
@@ -1203,7 +1337,7 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
/**
|
||||
* Preimage is too large to store on-chain.
|
||||
**/
|
||||
TooLarge: AugmentedError<ApiType>;
|
||||
TooBig: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
@@ -1315,6 +1449,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Failed to schedule a call
|
||||
**/
|
||||
FailedToSchedule: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Attempt to use a non-named function on a named task.
|
||||
**/
|
||||
Named: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Cannot find the scheduled call.
|
||||
**/
|
||||
@@ -1393,6 +1531,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* A nomination target was supplied that was blocked or otherwise not a validator.
|
||||
**/
|
||||
BadTarget: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Some bound is not met.
|
||||
**/
|
||||
BoundNotMet: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The user has enough bond and thus cannot be chilled forcefully by an external person.
|
||||
**/
|
||||
@@ -1469,8 +1611,8 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
TooManyTargets: AugmentedError<ApiType>;
|
||||
/**
|
||||
* There are too many validators in the system. Governance needs to adjust the staking
|
||||
* settings to keep things safe for the runtime.
|
||||
* There are too many validator candidates in the system. Governance needs to adjust the
|
||||
* staking settings to keep things safe for the runtime.
|
||||
**/
|
||||
TooManyValidators: AugmentedError<ApiType>;
|
||||
/**
|
||||
|
||||
@@ -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 { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletStakingExposure, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeProxyType, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportDispatchDispatchInfo, FrameSupportTokensMiscBalanceStatus, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletStakingExposure, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeProxyType, SpFinalityGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpWeightsWeightV2Weight, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
|
||||
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
|
||||
|
||||
@@ -263,10 +263,6 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* An account has delegated their vote to another account.
|
||||
**/
|
||||
Delegated: AugmentedEvent<ApiType, [who: AccountId32, target: AccountId32], { who: AccountId32, target: AccountId32 }>;
|
||||
/**
|
||||
* A proposal has been enacted.
|
||||
**/
|
||||
Executed: AugmentedEvent<ApiType, [refIndex: u32, result: Result<Null, SpRuntimeDispatchError>], { refIndex: u32, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||
/**
|
||||
* An external proposal has been tabled.
|
||||
**/
|
||||
@@ -279,26 +275,6 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* A proposal has been approved by referendum.
|
||||
**/
|
||||
Passed: AugmentedEvent<ApiType, [refIndex: u32], { refIndex: u32 }>;
|
||||
/**
|
||||
* A proposal could not be executed because its preimage was invalid.
|
||||
**/
|
||||
PreimageInvalid: AugmentedEvent<ApiType, [proposalHash: H256, refIndex: u32], { proposalHash: H256, refIndex: u32 }>;
|
||||
/**
|
||||
* A proposal could not be executed because its preimage was missing.
|
||||
**/
|
||||
PreimageMissing: AugmentedEvent<ApiType, [proposalHash: H256, refIndex: u32], { proposalHash: H256, refIndex: u32 }>;
|
||||
/**
|
||||
* A proposal's preimage was noted, and the deposit taken.
|
||||
**/
|
||||
PreimageNoted: AugmentedEvent<ApiType, [proposalHash: H256, who: AccountId32, deposit: u128], { proposalHash: H256, who: AccountId32, deposit: u128 }>;
|
||||
/**
|
||||
* A registered preimage was removed and the deposit collected by the reaper.
|
||||
**/
|
||||
PreimageReaped: AugmentedEvent<ApiType, [proposalHash: H256, provider: AccountId32, deposit: u128, reaper: AccountId32], { proposalHash: H256, provider: AccountId32, deposit: u128, reaper: AccountId32 }>;
|
||||
/**
|
||||
* A proposal preimage was removed and used (the deposit was returned).
|
||||
**/
|
||||
PreimageUsed: AugmentedEvent<ApiType, [proposalHash: H256, provider: AccountId32, deposit: u128], { proposalHash: H256, provider: AccountId32, deposit: u128 }>;
|
||||
/**
|
||||
* A proposal got canceled.
|
||||
**/
|
||||
@@ -318,7 +294,7 @@ declare module '@polkadot/api-base/types/events' {
|
||||
/**
|
||||
* A public proposal has been tabled for referendum vote.
|
||||
**/
|
||||
Tabled: AugmentedEvent<ApiType, [proposalIndex: u32, deposit: u128, depositors: Vec<AccountId32>], { proposalIndex: u32, deposit: u128, depositors: Vec<AccountId32> }>;
|
||||
Tabled: AugmentedEvent<ApiType, [proposalIndex: u32, deposit: u128], { proposalIndex: u32, deposit: u128 }>;
|
||||
/**
|
||||
* An account has cancelled a previous delegation operation.
|
||||
**/
|
||||
@@ -338,10 +314,15 @@ declare module '@polkadot/api-base/types/events' {
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
/**
|
||||
* The election has been finalized, with `Some` of the given computation, or else if the
|
||||
* election failed, `None`.
|
||||
* An election failed.
|
||||
*
|
||||
* Not much can be said about which computes failed in the process.
|
||||
**/
|
||||
ElectionFinalized: AugmentedEvent<ApiType, [electionCompute: Option<PalletElectionProviderMultiPhaseElectionCompute>], { electionCompute: Option<PalletElectionProviderMultiPhaseElectionCompute> }>;
|
||||
ElectionFailed: AugmentedEvent<ApiType, []>;
|
||||
/**
|
||||
* The election has been finalized, with the given computation and score.
|
||||
**/
|
||||
ElectionFinalized: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore], { compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore }>;
|
||||
/**
|
||||
* An account has been rewarded for their signed submission being finalized.
|
||||
**/
|
||||
@@ -362,7 +343,7 @@ declare module '@polkadot/api-base/types/events' {
|
||||
*
|
||||
* The `bool` is `true` when a previous solution was ejected to make room for this one.
|
||||
**/
|
||||
SolutionStored: AugmentedEvent<ApiType, [electionCompute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool], { electionCompute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool }>;
|
||||
SolutionStored: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool], { compute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool }>;
|
||||
/**
|
||||
* The unsigned phase of the given round has started.
|
||||
**/
|
||||
@@ -372,6 +353,35 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
fastUnstake: {
|
||||
/**
|
||||
* A batch was partially checked for the given eras, but the process did not finish.
|
||||
**/
|
||||
BatchChecked: AugmentedEvent<ApiType, [eras: Vec<u32>], { eras: Vec<u32> }>;
|
||||
/**
|
||||
* A batch was terminated.
|
||||
*
|
||||
* This is always follows by a number of `Unstaked` or `Slashed` events, marking the end
|
||||
* of the batch. A new batch will be created upon next block.
|
||||
**/
|
||||
BatchFinished: AugmentedEvent<ApiType, []>;
|
||||
/**
|
||||
* An internal error happened. Operations will be paused now.
|
||||
**/
|
||||
InternalError: AugmentedEvent<ApiType, []>;
|
||||
/**
|
||||
* A staker was slashed for requesting fast-unstake whilst being exposed.
|
||||
**/
|
||||
Slashed: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* A staker was unstaked.
|
||||
**/
|
||||
Unstaked: AugmentedEvent<ApiType, [stash: AccountId32, result: Result<Null, SpRuntimeDispatchError>], { stash: AccountId32, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
grandpa: {
|
||||
/**
|
||||
* New authority set has been applied.
|
||||
@@ -395,6 +405,11 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* HRMP channel closed. `[by_parachain, channel_id]`
|
||||
**/
|
||||
ChannelClosed: AugmentedEvent<ApiType, [u32, PolkadotParachainPrimitivesHrmpChannelId]>;
|
||||
/**
|
||||
* An HRMP channel was opened via Root origin.
|
||||
* `[sender, recipient, proposed_max_capacity, proposed_max_message_size]`
|
||||
**/
|
||||
HrmpChannelForceOpened: AugmentedEvent<ApiType, [u32, u32, u32, u32]>;
|
||||
/**
|
||||
* Open HRMP channel accepted. `[sender, recipient]`
|
||||
**/
|
||||
@@ -519,6 +534,74 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
nominationPools: {
|
||||
/**
|
||||
* A member has became bonded in a pool.
|
||||
**/
|
||||
Bonded: AugmentedEvent<ApiType, [member: AccountId32, poolId: u32, bonded: u128, joined: bool], { member: AccountId32, poolId: u32, bonded: u128, joined: bool }>;
|
||||
/**
|
||||
* A pool has been created.
|
||||
**/
|
||||
Created: AugmentedEvent<ApiType, [depositor: AccountId32, poolId: u32], { depositor: AccountId32, poolId: u32 }>;
|
||||
/**
|
||||
* A pool has been destroyed.
|
||||
**/
|
||||
Destroyed: AugmentedEvent<ApiType, [poolId: u32], { poolId: u32 }>;
|
||||
/**
|
||||
* A member has been removed from a pool.
|
||||
*
|
||||
* The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked).
|
||||
**/
|
||||
MemberRemoved: AugmentedEvent<ApiType, [poolId: u32, member: AccountId32], { poolId: u32, member: AccountId32 }>;
|
||||
/**
|
||||
* A payout has been made to a member.
|
||||
**/
|
||||
PaidOut: AugmentedEvent<ApiType, [member: AccountId32, poolId: u32, payout: u128], { member: AccountId32, poolId: u32, payout: u128 }>;
|
||||
/**
|
||||
* The active balance of pool `pool_id` has been slashed to `balance`.
|
||||
**/
|
||||
PoolSlashed: AugmentedEvent<ApiType, [poolId: u32, balance: u128], { poolId: u32, balance: u128 }>;
|
||||
/**
|
||||
* The roles of a pool have been updated to the given new roles. Note that the depositor
|
||||
* can never change.
|
||||
**/
|
||||
RolesUpdated: AugmentedEvent<ApiType, [root: Option<AccountId32>, stateToggler: Option<AccountId32>, nominator: Option<AccountId32>], { root: Option<AccountId32>, stateToggler: Option<AccountId32>, nominator: Option<AccountId32> }>;
|
||||
/**
|
||||
* The state of a pool has changed
|
||||
**/
|
||||
StateChanged: AugmentedEvent<ApiType, [poolId: u32, newState: PalletNominationPoolsPoolState], { poolId: u32, newState: PalletNominationPoolsPoolState }>;
|
||||
/**
|
||||
* A member has unbonded from their pool.
|
||||
*
|
||||
* - `balance` is the corresponding balance of the number of points that has been
|
||||
* requested to be unbonded (the argument of the `unbond` transaction) from the bonded
|
||||
* pool.
|
||||
* - `points` is the number of points that are issued as a result of `balance` being
|
||||
* dissolved into the corresponding unbonding pool.
|
||||
* - `era` is the era in which the balance will be unbonded.
|
||||
* In the absence of slashing, these values will match. In the presence of slashing, the
|
||||
* number of points that are issued in the unbonding pool will be less than the amount
|
||||
* requested to be unbonded.
|
||||
**/
|
||||
Unbonded: AugmentedEvent<ApiType, [member: AccountId32, poolId: u32, balance: u128, points: u128, era: u32], { member: AccountId32, poolId: u32, balance: u128, points: u128, era: u32 }>;
|
||||
/**
|
||||
* The unbond pool at `era` of pool `pool_id` has been slashed to `balance`.
|
||||
**/
|
||||
UnbondingPoolSlashed: AugmentedEvent<ApiType, [poolId: u32, era: u32, balance: u128], { poolId: u32, era: u32, balance: u128 }>;
|
||||
/**
|
||||
* A member has withdrawn from their pool.
|
||||
*
|
||||
* The given number of `points` have been dissolved in return of `balance`.
|
||||
*
|
||||
* Similar to `Unbonded` event, in the absence of slashing, the ratio of point to balance
|
||||
* will be 1.
|
||||
**/
|
||||
Withdrawn: AugmentedEvent<ApiType, [member: AccountId32, poolId: u32, balance: u128, points: u128], { member: AccountId32, poolId: u32, balance: u128, points: u128 }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
offences: {
|
||||
/**
|
||||
* There is an offence reported of the given `kind` happened at the `session_index` and
|
||||
@@ -683,11 +766,6 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* An announcement was placed to make a call in the future.
|
||||
**/
|
||||
Announced: AugmentedEvent<ApiType, [real: AccountId32, proxy: AccountId32, callHash: H256], { real: AccountId32, proxy: AccountId32, callHash: H256 }>;
|
||||
/**
|
||||
* Anonymous account has been created by new proxy with given
|
||||
* disambiguation index and proxy type.
|
||||
**/
|
||||
AnonymousCreated: AugmentedEvent<ApiType, [anonymous: AccountId32, who: AccountId32, proxyType: PolkadotRuntimeProxyType, disambiguationIndex: u16], { anonymous: AccountId32, who: AccountId32, proxyType: PolkadotRuntimeProxyType, disambiguationIndex: u16 }>;
|
||||
/**
|
||||
* A proxy was added.
|
||||
**/
|
||||
@@ -700,6 +778,11 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* A proxy was removed.
|
||||
**/
|
||||
ProxyRemoved: AugmentedEvent<ApiType, [delegator: AccountId32, delegatee: AccountId32, proxyType: PolkadotRuntimeProxyType, delay: u32], { delegator: AccountId32, delegatee: AccountId32, proxyType: PolkadotRuntimeProxyType, delay: u32 }>;
|
||||
/**
|
||||
* A pure account has been created by new proxy with given
|
||||
* disambiguation index and proxy type.
|
||||
**/
|
||||
PureCreated: AugmentedEvent<ApiType, [pure: AccountId32, who: AccountId32, proxyType: PolkadotRuntimeProxyType, disambiguationIndex: u16], { pure: AccountId32, who: AccountId32, proxyType: PolkadotRuntimeProxyType, disambiguationIndex: u16 }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
@@ -718,7 +801,7 @@ declare module '@polkadot/api-base/types/events' {
|
||||
/**
|
||||
* The call for the provided hash was not found so the task has been aborted.
|
||||
**/
|
||||
CallLookupFailed: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<Bytes>, error: FrameSupportScheduleLookupError], { task: ITuple<[u32, u32]>, id: Option<Bytes>, error: FrameSupportScheduleLookupError }>;
|
||||
CallUnavailable: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed> }>;
|
||||
/**
|
||||
* Canceled some task.
|
||||
**/
|
||||
@@ -726,7 +809,15 @@ declare module '@polkadot/api-base/types/events' {
|
||||
/**
|
||||
* Dispatched some task.
|
||||
**/
|
||||
Dispatched: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<Bytes>, result: Result<Null, SpRuntimeDispatchError>], { task: ITuple<[u32, u32]>, id: Option<Bytes>, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||
Dispatched: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>, result: Result<Null, SpRuntimeDispatchError>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed>, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||
/**
|
||||
* The given task was unable to be renewed since the agenda is full at that block.
|
||||
**/
|
||||
PeriodicFailed: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed> }>;
|
||||
/**
|
||||
* The given task can never be executed since it is overweight.
|
||||
**/
|
||||
PermanentlyOverweight: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed> }>;
|
||||
/**
|
||||
* Scheduled some task.
|
||||
**/
|
||||
@@ -770,40 +861,37 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,
|
||||
* it will not be emitted for staking rewards when they are added to stake.
|
||||
**/
|
||||
Bonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||
Bonded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* An account has stopped participating as either a validator or nominator.
|
||||
* \[stash\]
|
||||
**/
|
||||
Chilled: AugmentedEvent<ApiType, [AccountId32]>;
|
||||
Chilled: AugmentedEvent<ApiType, [stash: AccountId32], { stash: AccountId32 }>;
|
||||
/**
|
||||
* The era payout has been set; the first balance is the validator-payout; the second is
|
||||
* the remainder from the maximum amount of reward.
|
||||
* \[era_index, validator_payout, remainder\]
|
||||
**/
|
||||
EraPaid: AugmentedEvent<ApiType, [u32, u128, u128]>;
|
||||
EraPaid: AugmentedEvent<ApiType, [eraIndex: u32, validatorPayout: u128, remainder: u128], { eraIndex: u32, validatorPayout: u128, remainder: u128 }>;
|
||||
/**
|
||||
* A nominator has been kicked from a validator. \[nominator, stash\]
|
||||
* A nominator has been kicked from a validator.
|
||||
**/
|
||||
Kicked: AugmentedEvent<ApiType, [AccountId32, AccountId32]>;
|
||||
Kicked: AugmentedEvent<ApiType, [nominator: AccountId32, stash: AccountId32], { nominator: AccountId32, stash: AccountId32 }>;
|
||||
/**
|
||||
* An old slashing report from a prior era was discarded because it could
|
||||
* not be processed. \[session_index\]
|
||||
* not be processed.
|
||||
**/
|
||||
OldSlashingReportDiscarded: AugmentedEvent<ApiType, [u32]>;
|
||||
OldSlashingReportDiscarded: AugmentedEvent<ApiType, [sessionIndex: u32], { sessionIndex: u32 }>;
|
||||
/**
|
||||
* The stakers' rewards are getting paid. \[era_index, validator_stash\]
|
||||
* The stakers' rewards are getting paid.
|
||||
**/
|
||||
PayoutStarted: AugmentedEvent<ApiType, [u32, AccountId32]>;
|
||||
PayoutStarted: AugmentedEvent<ApiType, [eraIndex: u32, validatorStash: AccountId32], { eraIndex: u32, validatorStash: AccountId32 }>;
|
||||
/**
|
||||
* The nominator has been rewarded by this amount. \[stash, amount\]
|
||||
* The nominator has been rewarded by this amount.
|
||||
**/
|
||||
Rewarded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||
Rewarded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* One validator (and its nominators) has been slashed by the given amount.
|
||||
* \[validator, amount\]
|
||||
* One staker (and potentially its nominators) has been slashed by the given amount.
|
||||
**/
|
||||
Slashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||
Slashed: AugmentedEvent<ApiType, [staker: AccountId32, amount: u128], { staker: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* A new set of stakers was elected.
|
||||
**/
|
||||
@@ -813,18 +901,18 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
StakingElectionFailed: AugmentedEvent<ApiType, []>;
|
||||
/**
|
||||
* An account has unbonded this amount. \[stash, amount\]
|
||||
* An account has unbonded this amount.
|
||||
**/
|
||||
Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||
Unbonded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* A validator has set their preferences.
|
||||
**/
|
||||
ValidatorPrefsSet: AugmentedEvent<ApiType, [AccountId32, PalletStakingValidatorPrefs]>;
|
||||
ValidatorPrefsSet: AugmentedEvent<ApiType, [stash: AccountId32, prefs: PalletStakingValidatorPrefs], { stash: AccountId32, prefs: PalletStakingValidatorPrefs }>;
|
||||
/**
|
||||
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
|
||||
* from the unlocking queue. \[stash, amount\]
|
||||
* from the unlocking queue.
|
||||
**/
|
||||
Withdrawn: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||
Withdrawn: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
@@ -838,11 +926,11 @@ declare module '@polkadot/api-base/types/events' {
|
||||
/**
|
||||
* An extrinsic failed.
|
||||
**/
|
||||
ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo }>;
|
||||
ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportDispatchDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportDispatchDispatchInfo }>;
|
||||
/**
|
||||
* An extrinsic completed successfully.
|
||||
**/
|
||||
ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchInfo: FrameSupportWeightsDispatchInfo }>;
|
||||
ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportDispatchDispatchInfo], { dispatchInfo: FrameSupportDispatchDispatchInfo }>;
|
||||
/**
|
||||
* An account was reaped.
|
||||
**/
|
||||
@@ -1020,14 +1108,14 @@ declare module '@polkadot/api-base/types/events' {
|
||||
*
|
||||
* \[ para, id, overweight_index, required \]
|
||||
**/
|
||||
OverweightEnqueued: AugmentedEvent<ApiType, [u32, U8aFixed, u64, u64]>;
|
||||
OverweightEnqueued: AugmentedEvent<ApiType, [u32, U8aFixed, u64, SpWeightsWeightV2Weight]>;
|
||||
/**
|
||||
* Upward message from the overweight queue was executed with the given actual weight
|
||||
* used.
|
||||
*
|
||||
* \[ overweight_index, used \]
|
||||
**/
|
||||
OverweightServiced: AugmentedEvent<ApiType, [u64, u64]>;
|
||||
OverweightServiced: AugmentedEvent<ApiType, [u64, SpWeightsWeightV2Weight]>;
|
||||
/**
|
||||
* Upward message is unsupported version of XCM.
|
||||
* \[ id \]
|
||||
@@ -1042,7 +1130,7 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* The weight limit for handling upward messages was reached.
|
||||
* \[ id, remaining, required \]
|
||||
**/
|
||||
WeightExhausted: AugmentedEvent<ApiType, [U8aFixed, u64, u64]>;
|
||||
WeightExhausted: AugmentedEvent<ApiType, [U8aFixed, SpWeightsWeightV2Weight, SpWeightsWeightV2Weight]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
@@ -1109,6 +1197,12 @@ declare module '@polkadot/api-base/types/events' {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
xcmPallet: {
|
||||
/**
|
||||
* Some assets have been claimed from an asset trap
|
||||
*
|
||||
* \[ hash, origin, assets \]
|
||||
**/
|
||||
AssetsClaimed: AugmentedEvent<ApiType, [H256, XcmV1MultiLocation, XcmVersionedMultiAssets]>;
|
||||
/**
|
||||
* Some assets have been placed in an asset trap.
|
||||
*
|
||||
@@ -1170,7 +1264,7 @@ declare module '@polkadot/api-base/types/events' {
|
||||
*
|
||||
* \[ id, pallet index, call index, actual weight, max budgeted weight \]
|
||||
**/
|
||||
NotifyOverweight: AugmentedEvent<ApiType, [u64, u8, u8, u64, u64]>;
|
||||
NotifyOverweight: AugmentedEvent<ApiType, [u64, u8, u8, SpWeightsWeightV2Weight, SpWeightsWeightV2Weight]>;
|
||||
/**
|
||||
* A given location which had a version change subscription was dropped owing to an error
|
||||
* migrating the location to our new XCM format.
|
||||
|
||||
@@ -7,11 +7,11 @@ import '@polkadot/api-base/types/storage';
|
||||
|
||||
import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';
|
||||
import type { Data } from '@polkadot/types';
|
||||
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, WrapperOpaque, bool, u128, u32, u64 } from '@polkadot/types-codec';
|
||||
import type { Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u32, u64 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerScheduledV3, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerScheduled, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
import type { Observable } from '@polkadot/types/types';
|
||||
|
||||
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
||||
@@ -402,20 +402,15 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* - `LastTabledWasExternal` is `false`; or
|
||||
* - `PublicProps` is empty.
|
||||
**/
|
||||
nextExternal: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[H256, PalletDemocracyVoteThreshold]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Map of hashes to the proposal preimage, along with who registered it and their deposit.
|
||||
* The block number is the block at which it was deposited.
|
||||
**/
|
||||
preimages: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<PalletDemocracyPreimageStatus>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
|
||||
nextExternal: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[FrameSupportPreimagesBounded, PalletDemocracyVoteThreshold]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The number of (public) proposals that have been made so far.
|
||||
**/
|
||||
publicPropCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The public proposals. Unsorted. The second item is the proposal's hash.
|
||||
* The public proposals. Unsorted. The second item is the proposal.
|
||||
**/
|
||||
publicProps: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, H256, AccountId32]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
publicProps: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, FrameSupportPreimagesBounded, AccountId32]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The next free referendum index, aka the number of referenda started so far.
|
||||
**/
|
||||
@@ -426,12 +421,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* TWOX-NOTE: SAFE as indexes are not under an attacker’s control.
|
||||
**/
|
||||
referendumInfoOf: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletDemocracyReferendumInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Storage version of the pallet.
|
||||
*
|
||||
* New networks start with last version.
|
||||
**/
|
||||
storageVersion: AugmentedQuery<ApiType, () => Observable<Option<PalletDemocracyReleases>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* All votes for a particular voter. We store the balance for the number of votes that we
|
||||
* have recorded. The second item is the total amount of delegations, that will be added.
|
||||
@@ -496,14 +485,14 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
round: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* A sorted, bounded set of `(score, index)`, where each `index` points to a value in
|
||||
* `SignedSubmissions`.
|
||||
* A sorted, bounded vector of `(score, block_number, index)`, where each `index` points to a
|
||||
* value in `SignedSubmissions`.
|
||||
*
|
||||
* We never need to process more than a single signed submission at a time. Signed submissions
|
||||
* can be quite large, so we're willing to pay the cost of multiple database accesses to access
|
||||
* them one at a time instead of reading and decoding all of them at once.
|
||||
**/
|
||||
signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<BTreeMap<SpNposElectionsElectionScore, u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[SpNposElectionsElectionScore, u32, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The next index to be assigned to an incoming signed submission.
|
||||
*
|
||||
@@ -543,6 +532,35 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
fastUnstake: {
|
||||
/**
|
||||
* Counter for the related counted storage map
|
||||
**/
|
||||
counterForQueue: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Number of eras to check per block.
|
||||
*
|
||||
* If set to 0, this pallet does absolutely nothing.
|
||||
*
|
||||
* Based on the amount of weight available at `on_idle`, up to this many eras of a single
|
||||
* nominator might be checked.
|
||||
**/
|
||||
erasToCheckPerBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The current "head of the queue" being unstaked.
|
||||
**/
|
||||
head: AugmentedQuery<ApiType, () => Observable<Option<PalletFastUnstakeUnstakeRequest>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The map of all accounts wishing to be unstaked.
|
||||
*
|
||||
* Keeps track of `AccountId` wishing to unstake and it's corresponding deposit.
|
||||
**/
|
||||
queue: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u128>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
grandpa: {
|
||||
/**
|
||||
* The number of changes (both in terms of keys and underlying economic responsibilities)
|
||||
@@ -763,7 +781,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
multisig: {
|
||||
calls: AugmentedQuery<ApiType, (arg: U8aFixed | string | Uint8Array) => Observable<Option<ITuple<[WrapperKeepOpaque<Call>, AccountId32, u128]>>>, [U8aFixed]> & QueryableStorageEntry<ApiType, [U8aFixed]>;
|
||||
/**
|
||||
* The set of open multisig operations.
|
||||
**/
|
||||
@@ -773,6 +790,98 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
nominationPools: {
|
||||
/**
|
||||
* Storage for bonded pools.
|
||||
**/
|
||||
bondedPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsBondedPoolInner>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Counter for the related counted storage map
|
||||
**/
|
||||
counterForBondedPools: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Counter for the related counted storage map
|
||||
**/
|
||||
counterForMetadata: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Counter for the related counted storage map
|
||||
**/
|
||||
counterForPoolMembers: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Counter for the related counted storage map
|
||||
**/
|
||||
counterForReversePoolIdLookup: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Counter for the related counted storage map
|
||||
**/
|
||||
counterForRewardPools: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Counter for the related counted storage map
|
||||
**/
|
||||
counterForSubPoolsStorage: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Ever increasing number of all pools created so far.
|
||||
**/
|
||||
lastPoolId: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Maximum number of members that can exist in the system. If `None`, then the count
|
||||
* members are not bound on a system wide basis.
|
||||
**/
|
||||
maxPoolMembers: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Maximum number of members that may belong to pool. If `None`, then the count of
|
||||
* members is not bound on a per pool basis.
|
||||
**/
|
||||
maxPoolMembersPerPool: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Maximum number of nomination pools that can exist. If `None`, then an unbounded number of
|
||||
* pools can exist.
|
||||
**/
|
||||
maxPools: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Metadata for the pool.
|
||||
**/
|
||||
metadata: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Minimum bond required to create a pool.
|
||||
*
|
||||
* This is the amount that the depositor must put as their initial stake in the pool, as an
|
||||
* indication of "skin in the game".
|
||||
*
|
||||
* This is the value that will always exist in the staking ledger of the pool bonded account
|
||||
* while all other accounts leave.
|
||||
**/
|
||||
minCreateBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Minimum amount to bond to join a pool.
|
||||
**/
|
||||
minJoinBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Active members.
|
||||
**/
|
||||
poolMembers: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletNominationPoolsPoolMember>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* A reverse lookup from the pool's account id to its id.
|
||||
*
|
||||
* This is only used for slashing. In all other instances, the pool id is used, and the
|
||||
* accounts are deterministically derived from it.
|
||||
**/
|
||||
reversePoolIdLookup: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Reward pools. This is where there rewards for each pool accumulate. When a members payout
|
||||
* is claimed, the balance comes out fo the reward pool. Keyed by the bonded pools account.
|
||||
**/
|
||||
rewardPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsRewardPool>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Groups of unbonding pools. Each group of unbonding pools belongs to a bonded pool,
|
||||
* hence the name sub-pools. Keyed by the bonded pools account.
|
||||
**/
|
||||
subPoolsStorage: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsSubPools>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
offences: {
|
||||
/**
|
||||
* A vector of reports of the same kind that happened at the same time slot.
|
||||
@@ -1141,10 +1250,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
preimage: {
|
||||
/**
|
||||
* The preimages stored by this pallet.
|
||||
**/
|
||||
preimageFor: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<Bytes>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
|
||||
preimageFor: AugmentedQuery<ApiType, (arg: ITuple<[H256, u32]> | [H256 | string | Uint8Array, u32 | AnyNumber | Uint8Array]) => Observable<Option<Bytes>>, [ITuple<[H256, u32]>]> & QueryableStorageEntry<ApiType, [ITuple<[H256, u32]>]>;
|
||||
/**
|
||||
* The request status of a given hash.
|
||||
**/
|
||||
@@ -1194,11 +1300,15 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Items to be executed, indexed by the block number that they should be executed on.
|
||||
**/
|
||||
agenda: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Option<PalletSchedulerScheduledV3>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
agenda: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Option<PalletSchedulerScheduled>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
incompleteSince: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Lookup from identity to the block number and index of the task.
|
||||
* Lookup from a name to the block number and index of the task.
|
||||
*
|
||||
* For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4
|
||||
* identities.
|
||||
**/
|
||||
lookup: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>;
|
||||
lookup: AugmentedQuery<ApiType, (arg: U8aFixed | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [U8aFixed]> & QueryableStorageEntry<ApiType, [U8aFixed]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -1378,16 +1488,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* Mode of era forcing.
|
||||
**/
|
||||
forceEra: AugmentedQuery<ApiType, () => Observable<PalletStakingForcing>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Number of eras to keep in history.
|
||||
*
|
||||
* Information is kept for eras in `[current_era - history_depth; current_era]`.
|
||||
*
|
||||
* Must be more than the number of eras delayed by session otherwise. I.e. active era must
|
||||
* always be in history. I.e. `active_era > current_era - history_depth` must be
|
||||
* guaranteed.
|
||||
**/
|
||||
historyDepth: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Any validators that may never be slashed or forcibly kicked. It's a Vec since they're
|
||||
* easy to initialize and the performance hit is minimal (we expect no more than four
|
||||
@@ -1494,7 +1594,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
unappliedSlashes: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<PalletStakingUnappliedSlash>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* The ideal number of staking participants.
|
||||
* The ideal number of active validators.
|
||||
**/
|
||||
validatorCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
@@ -1527,7 +1627,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* The current weight for the block.
|
||||
**/
|
||||
blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportWeightsPerDispatchClassU64>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportDispatchPerDispatchClassWeight>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Digest of the current block, also part of the block header.
|
||||
**/
|
||||
|
||||
@@ -7,7 +7,7 @@ import '@polkadot/api-base/types/calls';
|
||||
|
||||
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
|
||||
import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, 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 { ValidatorSet } from '@polkadot/types/interfaces/beefy';
|
||||
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
|
||||
@@ -19,7 +19,7 @@ import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
|
||||
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import type { AccountId, Block, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
||||
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
||||
import type { SessionIndex } from '@polkadot/types/interfaces/session';
|
||||
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
||||
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
|
||||
@@ -206,6 +206,17 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x17a6bc0d0062aeb3/1 */
|
||||
nominationPoolsApi: {
|
||||
/**
|
||||
* Returns the pending rewards for the given member.
|
||||
**/
|
||||
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xf78b278be53f454c/2 */
|
||||
offchainWorkerApi: {
|
||||
/**
|
||||
@@ -322,7 +333,7 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x37c8bb1350a9a2a8/1 */
|
||||
/** 0x37c8bb1350a9a2a8/2 */
|
||||
transactionPaymentApi: {
|
||||
/**
|
||||
* The transaction fee details
|
||||
@@ -337,5 +348,20 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xf3ff14d5ab527059/2 */
|
||||
transactionPaymentCallApi: {
|
||||
/**
|
||||
* The call fee details
|
||||
**/
|
||||
queryCallFeeDetails: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<FeeDetails>>;
|
||||
/**
|
||||
* The call info
|
||||
**/
|
||||
queryCallInfo: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
} // AugmentedCalls
|
||||
} // declare module
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,9 +7,9 @@ import '@polkadot/api-base/types/consts';
|
||||
|
||||
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
|
||||
import type { Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { Codec } 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 { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletContractsSchedule, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletContractsSchedule, PalletReferendaTrackInfo, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
|
||||
|
||||
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
|
||||
|
||||
@@ -25,8 +25,7 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
maxAnnouncementsCount: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of members per member role. Should not exceed the sum of
|
||||
* `MaxFounders` and `MaxFellows`.
|
||||
* The maximum number of members per member role.
|
||||
**/
|
||||
maxMembersCount: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -65,6 +64,12 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* metadata.
|
||||
**/
|
||||
metadataDepositPerByte: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Max number of items to destroy per `destroy_accounts` and `destroy_approvals` call.
|
||||
*
|
||||
* Must be configured to result in a weight that makes each call fit in a block.
|
||||
**/
|
||||
removeItemsLimit: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of a name or symbol stored on-chain.
|
||||
**/
|
||||
@@ -110,58 +115,6 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
bagsList: {
|
||||
/**
|
||||
* The list of thresholds separating the various bags.
|
||||
*
|
||||
* Ids are separated into unsorted bags according to their score. This specifies the
|
||||
* thresholds separating the bags. An id's bag is the largest bag for which the id's score
|
||||
* is less than or equal to its upper threshold.
|
||||
*
|
||||
* When ids are iterated, higher bags are iterated completely before lower bags. This means
|
||||
* that iteration is _semi-sorted_: ids of higher score tend to come before ids of lower
|
||||
* score, but peer ids within a particular bag are sorted in insertion order.
|
||||
*
|
||||
* # Expressing the constant
|
||||
*
|
||||
* This constant must be sorted in strictly increasing order. Duplicate items are not
|
||||
* permitted.
|
||||
*
|
||||
* There is an implied upper limit of `Score::MAX`; that value does not need to be
|
||||
* specified within the bag. For any two threshold lists, if one ends with
|
||||
* `Score::MAX`, the other one does not, and they are otherwise equal, the two
|
||||
* lists will behave identically.
|
||||
*
|
||||
* # Calculation
|
||||
*
|
||||
* It is recommended to generate the set of thresholds in a geometric series, such that
|
||||
* there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *
|
||||
* constant_ratio).max(threshold[k] + 1)` for all `k`.
|
||||
*
|
||||
* The helpers in the `/utils/frame/generate-bags` module can simplify this calculation.
|
||||
*
|
||||
* # Examples
|
||||
*
|
||||
* - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and
|
||||
* iteration is strictly in insertion order.
|
||||
* - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to
|
||||
* the procedure given above, then the constant ratio is equal to 2.
|
||||
* - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to
|
||||
* the procedure given above, then the constant ratio is approximately equal to 1.248.
|
||||
* - If the threshold list begins `[1, 2, 3, ...]`, then an id with score 0 or 1 will fall
|
||||
* into bag 0, an id with score 2 will fall into bag 1, etc.
|
||||
*
|
||||
* # Migration
|
||||
*
|
||||
* In the event that this list ever changes, a copy of the old bags list must be retained.
|
||||
* With that `List::migrate` can be called, which will perform the appropriate migration.
|
||||
**/
|
||||
bagThresholds: Vec<u64> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
balances: {
|
||||
/**
|
||||
* The minimum amount required to keep an account open.
|
||||
@@ -243,27 +196,6 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
[key: string]: Codec;
|
||||
};
|
||||
contracts: {
|
||||
/**
|
||||
* The weight per byte of code that is charged when loading a contract from storage.
|
||||
*
|
||||
* Currently, FRAME only charges fees for computation incurred but not for PoV
|
||||
* consumption caused for storage access. This is usually not exploitable because
|
||||
* accessing storage carries some substantial weight costs, too. However in case
|
||||
* of contract code very much PoV consumption can be caused while consuming very little
|
||||
* computation. This could be used to keep the chain busy without paying the
|
||||
* proper fee for it. Until this is resolved we charge from the weight meter for
|
||||
* contract access.
|
||||
*
|
||||
* For more information check out: <https://github.com/paritytech/substrate/issues/10301>
|
||||
*
|
||||
* [`DefaultContractAccessWeight`] is a safe default to be used for Polkadot or Kusama
|
||||
* parachains.
|
||||
*
|
||||
* # Note
|
||||
*
|
||||
* This is only relevant for parachains. Set to zero in case of a standalone chain.
|
||||
**/
|
||||
contractAccessWeight: u64 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of contracts that can be pending for deletion.
|
||||
*
|
||||
@@ -290,7 +222,7 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* weight that is left for transactions. See [`Self::DeletionQueueDepth`] for more
|
||||
* information about the deletion queue.
|
||||
**/
|
||||
deletionWeightLimit: u64 & AugmentedConst<ApiType>;
|
||||
deletionWeightLimit: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of balance a caller has to pay for each byte of storage.
|
||||
*
|
||||
@@ -320,8 +252,8 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
/**
|
||||
* The maximum number of concurrent votes an account may have.
|
||||
*
|
||||
* Also used to compute weight, an overly large value can
|
||||
* lead to extrinsic with large weight estimation: see `delegate` for instance.
|
||||
* Also used to compute weight, an overly large value can lead to extrinsics with large
|
||||
* weight estimation: see `delegate` for instance.
|
||||
**/
|
||||
maxVotes: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -363,6 +295,14 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* How often (in blocks) new public referenda are launched.
|
||||
**/
|
||||
launchPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of items which can be blacklisted.
|
||||
**/
|
||||
maxBlacklisted: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of deposits a public proposal may have at any time.
|
||||
**/
|
||||
maxDeposits: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of public proposals that can exist at any time.
|
||||
**/
|
||||
@@ -378,10 +318,6 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* The minimum amount to be used as a deposit for a public referendum proposal.
|
||||
**/
|
||||
minimumDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of balance that must be deposited per byte of preimage stored.
|
||||
**/
|
||||
preimageByteDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum period of vote locking.
|
||||
*
|
||||
@@ -419,6 +355,16 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* take place over multiple blocks.
|
||||
**/
|
||||
maxElectingVoters: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of winners that can be elected by this `ElectionProvider`
|
||||
* implementation.
|
||||
*
|
||||
* Note: This must always be greater or equal to `T::DataProvider::desired_targets()`.
|
||||
**/
|
||||
maxWinners: u32 & AugmentedConst<ApiType>;
|
||||
minerMaxLength: u32 & AugmentedConst<ApiType>;
|
||||
minerMaxVotesPerVoter: u32 & AugmentedConst<ApiType>;
|
||||
minerMaxWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The priority of the unsigned transaction submitted in the unsigned-phase
|
||||
**/
|
||||
@@ -463,7 +409,7 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* this pallet), then [`MinerConfig::solution_weight`] is used to compare against
|
||||
* this value.
|
||||
**/
|
||||
signedMaxWeight: u64 & AugmentedConst<ApiType>;
|
||||
signedMaxWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Duration of the signed phase.
|
||||
**/
|
||||
@@ -494,6 +440,21 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Number of runners_up to keep.
|
||||
**/
|
||||
desiredRunnersUp: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of candidates in a phragmen election.
|
||||
*
|
||||
* Warning: The election happens onchain, and this value will determine
|
||||
* the size of the election. 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.
|
||||
* When the limit is reached the new voters are ignored.
|
||||
**/
|
||||
maxVoters: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Identifier for the elections-phragmen pallet's lock
|
||||
**/
|
||||
@@ -520,6 +481,17 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
fastUnstake: {
|
||||
/**
|
||||
* Deposit to take for unstaking, to make sure we're able to slash the it in order to cover
|
||||
* the costs of resources on unsuccessful unstake.
|
||||
**/
|
||||
deposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
gilt: {
|
||||
/**
|
||||
* Portion of the queue which is free from ordering and just a FIFO.
|
||||
@@ -675,7 +647,7 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
/**
|
||||
* The maximum amount of signatories allowed in the multisig.
|
||||
**/
|
||||
maxSignatories: u16 & AugmentedConst<ApiType>;
|
||||
maxSignatories: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -764,6 +736,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* The minimum amount to be used as a deposit for a public referendum proposal.
|
||||
**/
|
||||
submissionDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Information concerning the different referendum tracks.
|
||||
**/
|
||||
tracks: Vec<ITuple<[u16, PalletReferendaTrackInfo]>> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The number of blocks after submission that a referendum must begin being decided by.
|
||||
* Once this passes, then anyone may cancel the referendum.
|
||||
@@ -829,6 +805,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* The minimum amount to be used as a deposit for a public referendum proposal.
|
||||
**/
|
||||
submissionDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Information concerning the different referendum tracks.
|
||||
**/
|
||||
tracks: Vec<ITuple<[u16, PalletReferendaTrackInfo]>> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The number of blocks after submission that a referendum must begin being decided by.
|
||||
* Once this passes, then anyone may cancel the referendum.
|
||||
@@ -841,13 +821,11 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
};
|
||||
scheduler: {
|
||||
/**
|
||||
* The maximum weight that may be scheduled per block for any dispatchables of less
|
||||
* priority than `schedule::HARD_DEADLINE`.
|
||||
* The maximum weight that may be scheduled per block for any dispatchables.
|
||||
**/
|
||||
maximumWeight: u64 & AugmentedConst<ApiType>;
|
||||
maximumWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of scheduled calls in the queue for a single block.
|
||||
* Not strictly enforced, but used for weight estimation.
|
||||
**/
|
||||
maxScheduledPerBlock: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -904,6 +882,29 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Number of eras that staked funds must remain bonded for.
|
||||
**/
|
||||
bondingDuration: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Number of eras to keep in history.
|
||||
*
|
||||
* Following information is kept for eras in `[current_era -
|
||||
* HistoryDepth, current_era]`: `ErasStakers`, `ErasStakersClipped`,
|
||||
* `ErasValidatorPrefs`, `ErasValidatorReward`, `ErasRewardPoints`,
|
||||
* `ErasTotalStake`, `ErasStartSessionIndex`,
|
||||
* `StakingLedger.claimed_rewards`.
|
||||
*
|
||||
* Must be more than the number of eras delayed by session.
|
||||
* I.e. active era must always be in history. I.e. `active_era >
|
||||
* current_era - history_depth` must be guaranteed.
|
||||
*
|
||||
* If migrating an existing pallet from storage value to config value,
|
||||
* this should be set to same value or greater as in storage.
|
||||
*
|
||||
* Note: `HistoryDepth` is used as the upper bound for the `BoundedVec`
|
||||
* item `StakingLedger.claimed_rewards`. Setting this value lower than
|
||||
* the existing value can lead to inconsistencies in the
|
||||
* `StakingLedger` and will need to be handled properly in a migration.
|
||||
* The test `reducing_history_depth_abrupt` shows this effect.
|
||||
**/
|
||||
historyDepth: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum number of nominations per nominator.
|
||||
**/
|
||||
@@ -916,8 +917,16 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of `unlocking` chunks a [`StakingLedger`] can have. Effectively
|
||||
* determines how many unique eras a staker may be unbonding in.
|
||||
* The maximum number of `unlocking` chunks a [`StakingLedger`] can
|
||||
* have. Effectively determines how many unique eras a staker may be
|
||||
* unbonding in.
|
||||
*
|
||||
* Note: `MaxUnlockingChunks` is used as the upper bound for the
|
||||
* `BoundedVec` item `StakingLedger.unlocking`. Setting this value
|
||||
* lower than the existing value can lead to inconsistencies in the
|
||||
* `StakingLedger` and will need to be handled properly in a runtime
|
||||
* migration. The test `reducing_max_unlocking_chunks_abrupt` shows
|
||||
* this effect.
|
||||
**/
|
||||
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -982,9 +991,9 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
/**
|
||||
* The weight of runtime database operations the runtime can invoke.
|
||||
**/
|
||||
dbWeight: FrameSupportWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
|
||||
dbWeight: SpWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The designated SS85 prefix of this chain.
|
||||
* The designated SS58 prefix of this chain.
|
||||
*
|
||||
* This replaces the "ss58Format" property declared in the chain spec. Reason is
|
||||
* that the runtime should know about the prefix in order to make use of it as
|
||||
@@ -1168,5 +1177,57 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
voterList: {
|
||||
/**
|
||||
* The list of thresholds separating the various bags.
|
||||
*
|
||||
* Ids are separated into unsorted bags according to their score. This specifies the
|
||||
* thresholds separating the bags. An id's bag is the largest bag for which the id's score
|
||||
* is less than or equal to its upper threshold.
|
||||
*
|
||||
* When ids are iterated, higher bags are iterated completely before lower bags. This means
|
||||
* that iteration is _semi-sorted_: ids of higher score tend to come before ids of lower
|
||||
* score, but peer ids within a particular bag are sorted in insertion order.
|
||||
*
|
||||
* # Expressing the constant
|
||||
*
|
||||
* This constant must be sorted in strictly increasing order. Duplicate items are not
|
||||
* permitted.
|
||||
*
|
||||
* There is an implied upper limit of `Score::MAX`; that value does not need to be
|
||||
* specified within the bag. For any two threshold lists, if one ends with
|
||||
* `Score::MAX`, the other one does not, and they are otherwise equal, the two
|
||||
* lists will behave identically.
|
||||
*
|
||||
* # Calculation
|
||||
*
|
||||
* It is recommended to generate the set of thresholds in a geometric series, such that
|
||||
* there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *
|
||||
* constant_ratio).max(threshold[k] + 1)` for all `k`.
|
||||
*
|
||||
* The helpers in the `/utils/frame/generate-bags` module can simplify this calculation.
|
||||
*
|
||||
* # Examples
|
||||
*
|
||||
* - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and
|
||||
* iteration is strictly in insertion order.
|
||||
* - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to
|
||||
* the procedure given above, then the constant ratio is equal to 2.
|
||||
* - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to
|
||||
* the procedure given above, then the constant ratio is approximately equal to 1.248.
|
||||
* - If the threshold list begins `[1, 2, 3, ...]`, then an id with score 0 or 1 will fall
|
||||
* into bag 0, an id with score 2 will fall into bag 1, etc.
|
||||
*
|
||||
* # Migration
|
||||
*
|
||||
* In the event that this list ever changes, a copy of the old bags list must be retained.
|
||||
* With that `List::migrate` can be called, which will perform the appropriate migration.
|
||||
**/
|
||||
bagThresholds: Vec<u64> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
} // AugmentedConsts
|
||||
} // declare module
|
||||
|
||||
@@ -18,7 +18,7 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
AccountNonGrata: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The founders/fellows/allies have already been initialized.
|
||||
* The Alliance has been initialized, therefore cannot be initialized again.
|
||||
**/
|
||||
AllianceAlreadyInitialized: AugmentedError<ApiType>;
|
||||
/**
|
||||
@@ -33,10 +33,22 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Account is already a member.
|
||||
**/
|
||||
AlreadyMember: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Account already gave retirement notice
|
||||
**/
|
||||
AlreadyRetiring: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Item is already listed as unscrupulous.
|
||||
**/
|
||||
AlreadyUnscrupulous: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Invalid witness data given.
|
||||
**/
|
||||
BadWitness: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Fellows must be provided to initialize the Alliance.
|
||||
**/
|
||||
FellowsMissing: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Balance is insufficient for the required deposit.
|
||||
**/
|
||||
@@ -53,10 +65,6 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Account is not an ally.
|
||||
**/
|
||||
NotAlly: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Account is not a founder.
|
||||
**/
|
||||
NotFounder: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Item has not been deemed unscrupulous.
|
||||
**/
|
||||
@@ -65,14 +73,18 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Account is not a member.
|
||||
**/
|
||||
NotMember: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The proposal is not vetoable.
|
||||
**/
|
||||
NotVetoableProposal: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Account does not have voting rights.
|
||||
**/
|
||||
NoVotingRights: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Account did not give a retirement notice required to retire.
|
||||
**/
|
||||
RetirementNoticeNotGiven: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Retirement period has not passed.
|
||||
**/
|
||||
RetirementPeriodNotPassed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Length of website URL exceeds `MaxWebsiteUrlLength`.
|
||||
**/
|
||||
@@ -89,10 +101,6 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The number of unscrupulous items exceeds `MaxUnscrupulousItems`.
|
||||
**/
|
||||
TooManyUnscrupulousItems: AugmentedError<ApiType>;
|
||||
/**
|
||||
* This member is up for being kicked from the Alliance and cannot perform this operation.
|
||||
**/
|
||||
UpForKicking: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The account's identity has no good judgement.
|
||||
**/
|
||||
@@ -157,6 +165,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The asset-account already exists.
|
||||
**/
|
||||
AlreadyExists: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The asset is not live, and likely being destroyed.
|
||||
**/
|
||||
AssetNotLive: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Invalid metadata given.
|
||||
**/
|
||||
@@ -173,10 +185,19 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The origin account is frozen.
|
||||
**/
|
||||
Frozen: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The asset status is not the expected status.
|
||||
**/
|
||||
IncorrectStatus: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The asset ID is already taken.
|
||||
**/
|
||||
InUse: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The asset is a live asset and is actively being used. Usually emit for operations such
|
||||
* as `start_destroy` which require the asset to be in a destroying state.
|
||||
**/
|
||||
LiveAsset: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Minimum balance should be non-zero.
|
||||
**/
|
||||
@@ -199,6 +220,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* maximum number of consumers has been reached.
|
||||
**/
|
||||
NoProvider: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The asset should be frozen before the given operation.
|
||||
**/
|
||||
NotFrozen: AugmentedError<ApiType>;
|
||||
/**
|
||||
* No approval exists that would allow the transfer.
|
||||
**/
|
||||
@@ -276,16 +301,6 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
bagsList: {
|
||||
/**
|
||||
* A error in the list interface implementation.
|
||||
**/
|
||||
List: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
balances: {
|
||||
/**
|
||||
* Beneficiary account must pre-exist
|
||||
@@ -300,7 +315,7 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
ExistingVestingSchedule: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Balance too low to send value
|
||||
* Balance too low to send value.
|
||||
**/
|
||||
InsufficientBalance: AugmentedError<ApiType>;
|
||||
/**
|
||||
@@ -404,8 +419,13 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
CodeNotFound: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The contract's code was found to be invalid during validation or instrumentation.
|
||||
*
|
||||
* The most likely cause of this is that an API was used which is not supported by the
|
||||
* node. This hapens if an older node is used with a new version of ink!. Try updating
|
||||
* your node to the newest available version.
|
||||
*
|
||||
* A more detailed error can be found on the node console if debug messages are enabled
|
||||
* or in the debug buffer which is returned to RPC clients.
|
||||
* by supplying `-lruntime::contracts=debug`.
|
||||
**/
|
||||
CodeRejected: AugmentedError<ApiType>;
|
||||
/**
|
||||
@@ -452,6 +472,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The topics passed to `seal_deposit_events` contains at least one duplicate.
|
||||
**/
|
||||
DuplicateTopics: AugmentedError<ApiType>;
|
||||
/**
|
||||
* An indetermistic code was used in a context where this is not permitted.
|
||||
**/
|
||||
Indeterministic: AugmentedError<ApiType>;
|
||||
/**
|
||||
* `seal_call` forwarded this contracts input. It therefore is no longer available.
|
||||
**/
|
||||
@@ -646,18 +670,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Identity may not veto a proposal twice
|
||||
**/
|
||||
AlreadyVetoed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Preimage already noted
|
||||
**/
|
||||
DuplicatePreimage: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Proposal already made
|
||||
**/
|
||||
DuplicateProposal: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Imminent
|
||||
**/
|
||||
Imminent: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The instant referendum origin is currently disallowed.
|
||||
**/
|
||||
@@ -694,10 +710,6 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The account is not currently delegating.
|
||||
**/
|
||||
NotDelegating: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Not imminent
|
||||
**/
|
||||
NotImminent: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Next external proposal not simple majority
|
||||
**/
|
||||
@@ -706,14 +718,6 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The given account did not vote on the referendum.
|
||||
**/
|
||||
NotVoter: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Invalid preimage
|
||||
**/
|
||||
PreimageInvalid: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Preimage not found
|
||||
**/
|
||||
PreimageMissing: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Proposal still blacklisted
|
||||
**/
|
||||
@@ -727,13 +731,9 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
ReferendumInvalid: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Too early
|
||||
* Maximum number of items reached.
|
||||
**/
|
||||
TooEarly: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Maximum number of proposals reached.
|
||||
**/
|
||||
TooManyProposals: AugmentedError<ApiType>;
|
||||
TooMany: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Value too low
|
||||
**/
|
||||
@@ -757,6 +757,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
/**
|
||||
* Some bound not met
|
||||
**/
|
||||
BoundNotMet: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The call is not allowed at this point.
|
||||
**/
|
||||
@@ -805,6 +809,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The signed submission consumes too much weight
|
||||
**/
|
||||
SignedTooMuchWeight: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Submitted solution has too many winners
|
||||
**/
|
||||
TooManyWinners: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
@@ -884,6 +892,38 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
fastUnstake: {
|
||||
/**
|
||||
* The provided un-staker is already in Head, and cannot deregister.
|
||||
**/
|
||||
AlreadyHead: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The bonded account has already been queued.
|
||||
**/
|
||||
AlreadyQueued: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The call is not allowed at this point because the pallet is not active.
|
||||
**/
|
||||
CallNotAllowed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The provided Controller account was not found.
|
||||
*
|
||||
* This means that the given account is not bonded.
|
||||
**/
|
||||
NotController: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The bonded account has active unlocking chunks.
|
||||
**/
|
||||
NotFullyBonded: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The provided un-staker is not in the `Queue`.
|
||||
**/
|
||||
NotQueued: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
gilt: {
|
||||
/**
|
||||
* The amount of the bid is less than the minimum allowed.
|
||||
@@ -984,10 +1024,18 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The target is invalid.
|
||||
**/
|
||||
InvalidTarget: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The provided judgement was for a different identity.
|
||||
**/
|
||||
JudgementForDifferentIdentity: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Judgement given.
|
||||
**/
|
||||
JudgementGiven: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Error that occurs when there is an issue paying for judgement.
|
||||
**/
|
||||
JudgementPaymentFailed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* No identity found.
|
||||
**/
|
||||
@@ -1193,6 +1241,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* anymore to, for example, collect rewards).
|
||||
**/
|
||||
FullyUnbonding: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Pool id provided is not correct/usable.
|
||||
**/
|
||||
InvalidPoolId: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Too many members in the pool or system.
|
||||
**/
|
||||
@@ -1242,6 +1294,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Partial unbonding now allowed permissionlessly.
|
||||
**/
|
||||
PartialUnbondNotAllowedPermissionlessly: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Pool id currently in use.
|
||||
**/
|
||||
PoolIdInUse: AugmentedError<ApiType>;
|
||||
/**
|
||||
* An account is not a member.
|
||||
**/
|
||||
@@ -1287,7 +1343,7 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
/**
|
||||
* Preimage is too large to store on-chain.
|
||||
**/
|
||||
TooLarge: AugmentedError<ApiType>;
|
||||
TooBig: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
@@ -1383,7 +1439,7 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
BadTrack: AugmentedError<ApiType>;
|
||||
/**
|
||||
* There are already a full complement of referendums in progress for this track.
|
||||
* There are already a full complement of referenda in progress for this track.
|
||||
**/
|
||||
Full: AugmentedError<ApiType>;
|
||||
/**
|
||||
@@ -1503,7 +1559,7 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
BadTrack: AugmentedError<ApiType>;
|
||||
/**
|
||||
* There are already a full complement of referendums in progress for this track.
|
||||
* There are already a full complement of referenda in progress for this track.
|
||||
**/
|
||||
Full: AugmentedError<ApiType>;
|
||||
/**
|
||||
@@ -1562,6 +1618,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Failed to schedule a call
|
||||
**/
|
||||
FailedToSchedule: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Attempt to use a non-named function on a named task.
|
||||
**/
|
||||
Named: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Cannot find the scheduled call.
|
||||
**/
|
||||
@@ -1704,6 +1764,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* A nomination target was supplied that was blocked or otherwise not a validator.
|
||||
**/
|
||||
BadTarget: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Some bound is not met.
|
||||
**/
|
||||
BoundNotMet: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The user has enough bond and thus cannot be chilled forcefully by an external person.
|
||||
**/
|
||||
@@ -1780,8 +1844,8 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
TooManyTargets: AugmentedError<ApiType>;
|
||||
/**
|
||||
* There are too many validators in the system. Governance needs to adjust the staking
|
||||
* settings to keep things safe for the runtime.
|
||||
* There are too many validator candidates in the system. Governance needs to adjust the
|
||||
* staking settings to keep things safe for the runtime.
|
||||
**/
|
||||
TooManyValidators: AugmentedError<ApiType>;
|
||||
/**
|
||||
@@ -2085,12 +2149,6 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The provided max supply is less to the amount of items a collection already has.
|
||||
**/
|
||||
MaxSupplyTooSmall: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The `CollectionId` in `NextCollectionId` is not being used.
|
||||
*
|
||||
* This means that you can directly proceed to call `create`.
|
||||
**/
|
||||
NextIdNotUsed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* There is no delegate approved.
|
||||
**/
|
||||
@@ -2169,6 +2227,16 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
voterList: {
|
||||
/**
|
||||
* A error in the list interface implementation.
|
||||
**/
|
||||
List: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
whitelist: {
|
||||
/**
|
||||
* The call was already whitelisted; No-Op.
|
||||
|
||||
@@ -9,13 +9,17 @@ import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';
|
||||
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { ITuple } from '@polkadot/types-codec/types';
|
||||
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPostDispatchInfo, KitchensinkRuntimeProxyType, PalletAllianceCid, PalletAllianceUnscrupulousItem, PalletConvictionVotingTally, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletStakingExposure, PalletStakingValidatorPrefs, PalletStateTrieMigrationError, PalletStateTrieMigrationMigrationCompute, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportPreimagesBounded, FrameSupportTokensMiscBalanceStatus, KitchensinkRuntimeProxyType, PalletAllianceCid, PalletAllianceUnscrupulousItem, PalletConvictionVotingTally, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletStakingExposure, PalletStakingValidatorPrefs, PalletStateTrieMigrationError, PalletStateTrieMigrationMigrationCompute, SpFinalityGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo } from '@polkadot/types/lookup';
|
||||
|
||||
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
|
||||
|
||||
declare module '@polkadot/api-base/types/events' {
|
||||
interface AugmentedEvents<ApiType extends ApiTypes> {
|
||||
alliance: {
|
||||
/**
|
||||
* Alliance disbanded. Includes number deleted members and unreserved deposits.
|
||||
**/
|
||||
AllianceDisbanded: AugmentedEvent<ApiType, [fellowMembers: u32, allyMembers: u32, unreserved: u32], { fellowMembers: u32, allyMembers: u32, unreserved: u32 }>;
|
||||
/**
|
||||
* An ally has been elevated to Fellow.
|
||||
**/
|
||||
@@ -28,6 +32,10 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* An on-chain announcement has been removed.
|
||||
**/
|
||||
AnnouncementRemoved: AugmentedEvent<ApiType, [announcement: PalletAllianceCid], { announcement: PalletAllianceCid }>;
|
||||
/**
|
||||
* A Fellow abdicated their voting rights. They are now an Ally.
|
||||
**/
|
||||
FellowAbdicated: AugmentedEvent<ApiType, [fellow: AccountId32], { fellow: AccountId32 }>;
|
||||
/**
|
||||
* A member has been kicked out with its deposit slashed.
|
||||
**/
|
||||
@@ -37,9 +45,13 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
MemberRetired: AugmentedEvent<ApiType, [member: AccountId32, unreserved: Option<u128>], { member: AccountId32, unreserved: Option<u128> }>;
|
||||
/**
|
||||
* Some accounts have been initialized as members (founders/fellows/allies).
|
||||
* A member gave retirement notice and their retirement period started.
|
||||
**/
|
||||
MembersInitialized: AugmentedEvent<ApiType, [founders: Vec<AccountId32>, fellows: Vec<AccountId32>, allies: Vec<AccountId32>], { founders: Vec<AccountId32>, fellows: Vec<AccountId32>, allies: Vec<AccountId32> }>;
|
||||
MemberRetirementPeriodStarted: AugmentedEvent<ApiType, [member: AccountId32], { member: AccountId32 }>;
|
||||
/**
|
||||
* Some accounts have been initialized as members (fellows/allies).
|
||||
**/
|
||||
MembersInitialized: AugmentedEvent<ApiType, [fellows: Vec<AccountId32>, allies: Vec<AccountId32>], { fellows: Vec<AccountId32>, allies: Vec<AccountId32> }>;
|
||||
/**
|
||||
* An account has been added as an Ally and reserved its deposit.
|
||||
**/
|
||||
@@ -98,10 +110,18 @@ declare module '@polkadot/api-base/types/events' {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
assets: {
|
||||
/**
|
||||
* Accounts were destroyed for given asset.
|
||||
**/
|
||||
AccountsDestroyed: AugmentedEvent<ApiType, [assetId: u32, accountsDestroyed: u32, accountsRemaining: u32], { assetId: u32, accountsDestroyed: u32, accountsRemaining: u32 }>;
|
||||
/**
|
||||
* An approval for account `delegate` was cancelled by `owner`.
|
||||
**/
|
||||
ApprovalCancelled: AugmentedEvent<ApiType, [assetId: u32, owner: AccountId32, delegate: AccountId32], { assetId: u32, owner: AccountId32, delegate: AccountId32 }>;
|
||||
/**
|
||||
* Approvals were destroyed for given asset.
|
||||
**/
|
||||
ApprovalsDestroyed: AugmentedEvent<ApiType, [assetId: u32, approvalsDestroyed: u32, approvalsRemaining: u32], { assetId: u32, approvalsDestroyed: u32, approvalsRemaining: u32 }>;
|
||||
/**
|
||||
* (Additional) funds have been approved for transfer to a destination account.
|
||||
**/
|
||||
@@ -130,6 +150,10 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* An asset class was destroyed.
|
||||
**/
|
||||
Destroyed: AugmentedEvent<ApiType, [assetId: u32], { assetId: u32 }>;
|
||||
/**
|
||||
* An asset class is in the process of being destroyed.
|
||||
**/
|
||||
DestructionStarted: AugmentedEvent<ApiType, [assetId: u32], { assetId: u32 }>;
|
||||
/**
|
||||
* Some asset class was force-created.
|
||||
**/
|
||||
@@ -187,20 +211,6 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
bagsList: {
|
||||
/**
|
||||
* Moved an account from one bag to another.
|
||||
**/
|
||||
Rebagged: AugmentedEvent<ApiType, [who: AccountId32, from: u64, to: u64], { who: AccountId32, from: u64, to: u64 }>;
|
||||
/**
|
||||
* Updated the score of some account to the given amount.
|
||||
**/
|
||||
ScoreUpdated: AugmentedEvent<ApiType, [who: AccountId32, newScore: u64], { who: AccountId32, newScore: u64 }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
balances: {
|
||||
/**
|
||||
* A balance was set by root.
|
||||
@@ -306,6 +316,16 @@ declare module '@polkadot/api-base/types/events' {
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
contracts: {
|
||||
/**
|
||||
* A contract was called either by a plain account or another contract.
|
||||
*
|
||||
* # Note
|
||||
*
|
||||
* Please keep in mind that like all events this is only emitted for successful
|
||||
* calls. This is because on failure all storage changes including events are
|
||||
* rolled back.
|
||||
**/
|
||||
Called: AugmentedEvent<ApiType, [caller: AccountId32, contract: AccountId32], { caller: AccountId32, contract: AccountId32 }>;
|
||||
/**
|
||||
* A code with the specified hash was removed.
|
||||
**/
|
||||
@@ -322,6 +342,16 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* A custom event emitted by the contract.
|
||||
**/
|
||||
ContractEmitted: AugmentedEvent<ApiType, [contract: AccountId32, data: Bytes], { contract: AccountId32, data: Bytes }>;
|
||||
/**
|
||||
* A contract delegate called a code hash.
|
||||
*
|
||||
* # Note
|
||||
*
|
||||
* Please keep in mind that like all events this is only emitted for successful
|
||||
* calls. This is because on failure all storage changes including events are
|
||||
* rolled back.
|
||||
**/
|
||||
DelegateCalled: AugmentedEvent<ApiType, [contract: AccountId32, codeHash: H256], { contract: AccountId32, codeHash: H256 }>;
|
||||
/**
|
||||
* Contract deployed by address at the specified address.
|
||||
**/
|
||||
@@ -403,10 +433,6 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* An account has delegated their vote to another account.
|
||||
**/
|
||||
Delegated: AugmentedEvent<ApiType, [who: AccountId32, target: AccountId32], { who: AccountId32, target: AccountId32 }>;
|
||||
/**
|
||||
* A proposal has been enacted.
|
||||
**/
|
||||
Executed: AugmentedEvent<ApiType, [refIndex: u32, result: Result<Null, SpRuntimeDispatchError>], { refIndex: u32, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||
/**
|
||||
* An external proposal has been tabled.
|
||||
**/
|
||||
@@ -419,26 +445,6 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* A proposal has been approved by referendum.
|
||||
**/
|
||||
Passed: AugmentedEvent<ApiType, [refIndex: u32], { refIndex: u32 }>;
|
||||
/**
|
||||
* A proposal could not be executed because its preimage was invalid.
|
||||
**/
|
||||
PreimageInvalid: AugmentedEvent<ApiType, [proposalHash: H256, refIndex: u32], { proposalHash: H256, refIndex: u32 }>;
|
||||
/**
|
||||
* A proposal could not be executed because its preimage was missing.
|
||||
**/
|
||||
PreimageMissing: AugmentedEvent<ApiType, [proposalHash: H256, refIndex: u32], { proposalHash: H256, refIndex: u32 }>;
|
||||
/**
|
||||
* A proposal's preimage was noted, and the deposit taken.
|
||||
**/
|
||||
PreimageNoted: AugmentedEvent<ApiType, [proposalHash: H256, who: AccountId32, deposit: u128], { proposalHash: H256, who: AccountId32, deposit: u128 }>;
|
||||
/**
|
||||
* A registered preimage was removed and the deposit collected by the reaper.
|
||||
**/
|
||||
PreimageReaped: AugmentedEvent<ApiType, [proposalHash: H256, provider: AccountId32, deposit: u128, reaper: AccountId32], { proposalHash: H256, provider: AccountId32, deposit: u128, reaper: AccountId32 }>;
|
||||
/**
|
||||
* A proposal preimage was removed and used (the deposit was returned).
|
||||
**/
|
||||
PreimageUsed: AugmentedEvent<ApiType, [proposalHash: H256, provider: AccountId32, deposit: u128], { proposalHash: H256, provider: AccountId32, deposit: u128 }>;
|
||||
/**
|
||||
* A proposal got canceled.
|
||||
**/
|
||||
@@ -458,7 +464,7 @@ declare module '@polkadot/api-base/types/events' {
|
||||
/**
|
||||
* A public proposal has been tabled for referendum vote.
|
||||
**/
|
||||
Tabled: AugmentedEvent<ApiType, [proposalIndex: u32, deposit: u128, depositors: Vec<AccountId32>], { proposalIndex: u32, deposit: u128, depositors: Vec<AccountId32> }>;
|
||||
Tabled: AugmentedEvent<ApiType, [proposalIndex: u32, deposit: u128], { proposalIndex: u32, deposit: u128 }>;
|
||||
/**
|
||||
* An account has cancelled a previous delegation operation.
|
||||
**/
|
||||
@@ -478,10 +484,15 @@ declare module '@polkadot/api-base/types/events' {
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
/**
|
||||
* The election has been finalized, with `Some` of the given computation, or else if the
|
||||
* election failed, `None`.
|
||||
* An election failed.
|
||||
*
|
||||
* Not much can be said about which computes failed in the process.
|
||||
**/
|
||||
ElectionFinalized: AugmentedEvent<ApiType, [electionCompute: Option<PalletElectionProviderMultiPhaseElectionCompute>], { electionCompute: Option<PalletElectionProviderMultiPhaseElectionCompute> }>;
|
||||
ElectionFailed: AugmentedEvent<ApiType, []>;
|
||||
/**
|
||||
* The election has been finalized, with the given computation and score.
|
||||
**/
|
||||
ElectionFinalized: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore], { compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore }>;
|
||||
/**
|
||||
* An account has been rewarded for their signed submission being finalized.
|
||||
**/
|
||||
@@ -502,7 +513,7 @@ declare module '@polkadot/api-base/types/events' {
|
||||
*
|
||||
* The `bool` is `true` when a previous solution was ejected to make room for this one.
|
||||
**/
|
||||
SolutionStored: AugmentedEvent<ApiType, [electionCompute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool], { electionCompute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool }>;
|
||||
SolutionStored: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool], { compute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool }>;
|
||||
/**
|
||||
* The unsigned phase of the given round has started.
|
||||
**/
|
||||
@@ -555,6 +566,35 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
fastUnstake: {
|
||||
/**
|
||||
* A batch was partially checked for the given eras, but the process did not finish.
|
||||
**/
|
||||
BatchChecked: AugmentedEvent<ApiType, [eras: Vec<u32>], { eras: Vec<u32> }>;
|
||||
/**
|
||||
* A batch was terminated.
|
||||
*
|
||||
* This is always follows by a number of `Unstaked` or `Slashed` events, marking the end
|
||||
* of the batch. A new batch will be created upon next block.
|
||||
**/
|
||||
BatchFinished: AugmentedEvent<ApiType, []>;
|
||||
/**
|
||||
* An internal error happened. Operations will be paused now.
|
||||
**/
|
||||
InternalError: AugmentedEvent<ApiType, []>;
|
||||
/**
|
||||
* A staker was slashed for requesting fast-unstake whilst being exposed.
|
||||
**/
|
||||
Slashed: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* A staker was unstaked.
|
||||
**/
|
||||
Unstaked: AugmentedEvent<ApiType, [stash: AccountId32, result: Result<Null, SpRuntimeDispatchError>], { stash: AccountId32, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
gilt: {
|
||||
/**
|
||||
* A bid was successfully placed.
|
||||
@@ -825,11 +865,6 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* An announcement was placed to make a call in the future.
|
||||
**/
|
||||
Announced: AugmentedEvent<ApiType, [real: AccountId32, proxy: AccountId32, callHash: H256], { real: AccountId32, proxy: AccountId32, callHash: H256 }>;
|
||||
/**
|
||||
* Anonymous account has been created by new proxy with given
|
||||
* disambiguation index and proxy type.
|
||||
**/
|
||||
AnonymousCreated: AugmentedEvent<ApiType, [anonymous: AccountId32, who: AccountId32, proxyType: KitchensinkRuntimeProxyType, disambiguationIndex: u16], { anonymous: AccountId32, who: AccountId32, proxyType: KitchensinkRuntimeProxyType, disambiguationIndex: u16 }>;
|
||||
/**
|
||||
* A proxy was added.
|
||||
**/
|
||||
@@ -842,6 +877,11 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* A proxy was removed.
|
||||
**/
|
||||
ProxyRemoved: AugmentedEvent<ApiType, [delegator: AccountId32, delegatee: AccountId32, proxyType: KitchensinkRuntimeProxyType, delay: u32], { delegator: AccountId32, delegatee: AccountId32, proxyType: KitchensinkRuntimeProxyType, delay: u32 }>;
|
||||
/**
|
||||
* A pure account has been created by new proxy with given
|
||||
* disambiguation index and proxy type.
|
||||
**/
|
||||
PureCreated: AugmentedEvent<ApiType, [pure: AccountId32, who: AccountId32, proxyType: KitchensinkRuntimeProxyType, disambiguationIndex: u16], { pure: AccountId32, who: AccountId32, proxyType: KitchensinkRuntimeProxyType, disambiguationIndex: u16 }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
@@ -857,7 +897,7 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
MemberRemoved: AugmentedEvent<ApiType, [who: AccountId32, rank: u16], { who: AccountId32, rank: u16 }>;
|
||||
/**
|
||||
* The member `who`'s rank has been changed to the given `rank`.
|
||||
* The member `who`se rank has been changed to the given `rank`.
|
||||
**/
|
||||
RankChanged: AugmentedEvent<ApiType, [who: AccountId32, rank: u16], { who: AccountId32, rank: u16 }>;
|
||||
/**
|
||||
@@ -896,7 +936,7 @@ declare module '@polkadot/api-base/types/events' {
|
||||
/**
|
||||
* A referendum has moved into the deciding phase.
|
||||
**/
|
||||
DecisionStarted: AugmentedEvent<ApiType, [index: u32, track: u16, proposalHash: H256, tally: PalletRankedCollectiveTally], { index: u32, track: u16, proposalHash: H256, tally: PalletRankedCollectiveTally }>;
|
||||
DecisionStarted: AugmentedEvent<ApiType, [index: u32, track: u16, proposal: FrameSupportPreimagesBounded, tally: PalletRankedCollectiveTally], { index: u32, track: u16, proposal: FrameSupportPreimagesBounded, tally: PalletRankedCollectiveTally }>;
|
||||
/**
|
||||
* A deposit has been slashaed.
|
||||
**/
|
||||
@@ -910,9 +950,9 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
Rejected: AugmentedEvent<ApiType, [index: u32, tally: PalletRankedCollectiveTally], { index: u32, tally: PalletRankedCollectiveTally }>;
|
||||
/**
|
||||
* A referendum has being submitted.
|
||||
* A referendum has been submitted.
|
||||
**/
|
||||
Submitted: AugmentedEvent<ApiType, [index: u32, track: u16, proposalHash: H256], { index: u32, track: u16, proposalHash: H256 }>;
|
||||
Submitted: AugmentedEvent<ApiType, [index: u32, track: u16, proposal: FrameSupportPreimagesBounded], { index: u32, track: u16, proposal: FrameSupportPreimagesBounded }>;
|
||||
/**
|
||||
* A referendum has been timed out without being decided.
|
||||
**/
|
||||
@@ -978,7 +1018,7 @@ declare module '@polkadot/api-base/types/events' {
|
||||
/**
|
||||
* A referendum has moved into the deciding phase.
|
||||
**/
|
||||
DecisionStarted: AugmentedEvent<ApiType, [index: u32, track: u16, proposalHash: H256, tally: PalletConvictionVotingTally], { index: u32, track: u16, proposalHash: H256, tally: PalletConvictionVotingTally }>;
|
||||
DecisionStarted: AugmentedEvent<ApiType, [index: u32, track: u16, proposal: FrameSupportPreimagesBounded, tally: PalletConvictionVotingTally], { index: u32, track: u16, proposal: FrameSupportPreimagesBounded, tally: PalletConvictionVotingTally }>;
|
||||
/**
|
||||
* A deposit has been slashaed.
|
||||
**/
|
||||
@@ -992,9 +1032,9 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
Rejected: AugmentedEvent<ApiType, [index: u32, tally: PalletConvictionVotingTally], { index: u32, tally: PalletConvictionVotingTally }>;
|
||||
/**
|
||||
* A referendum has being submitted.
|
||||
* A referendum has been submitted.
|
||||
**/
|
||||
Submitted: AugmentedEvent<ApiType, [index: u32, track: u16, proposalHash: H256], { index: u32, track: u16, proposalHash: H256 }>;
|
||||
Submitted: AugmentedEvent<ApiType, [index: u32, track: u16, proposal: FrameSupportPreimagesBounded], { index: u32, track: u16, proposal: FrameSupportPreimagesBounded }>;
|
||||
/**
|
||||
* A referendum has been timed out without being decided.
|
||||
**/
|
||||
@@ -1018,7 +1058,7 @@ declare module '@polkadot/api-base/types/events' {
|
||||
/**
|
||||
* The call for the provided hash was not found so the task has been aborted.
|
||||
**/
|
||||
CallLookupFailed: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<Bytes>, error: FrameSupportScheduleLookupError], { task: ITuple<[u32, u32]>, id: Option<Bytes>, error: FrameSupportScheduleLookupError }>;
|
||||
CallUnavailable: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed> }>;
|
||||
/**
|
||||
* Canceled some task.
|
||||
**/
|
||||
@@ -1026,7 +1066,15 @@ declare module '@polkadot/api-base/types/events' {
|
||||
/**
|
||||
* Dispatched some task.
|
||||
**/
|
||||
Dispatched: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<Bytes>, result: Result<Null, SpRuntimeDispatchError>], { task: ITuple<[u32, u32]>, id: Option<Bytes>, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||
Dispatched: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>, result: Result<Null, SpRuntimeDispatchError>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed>, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||
/**
|
||||
* The given task was unable to be renewed since the agenda is full at that block.
|
||||
**/
|
||||
PeriodicFailed: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed> }>;
|
||||
/**
|
||||
* The given task can never be executed since it is overweight.
|
||||
**/
|
||||
PermanentlyOverweight: AugmentedEvent<ApiType, [task: ITuple<[u32, u32]>, id: Option<U8aFixed>], { task: ITuple<[u32, u32]>, id: Option<U8aFixed> }>;
|
||||
/**
|
||||
* Scheduled some task.
|
||||
**/
|
||||
@@ -1127,40 +1175,37 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,
|
||||
* it will not be emitted for staking rewards when they are added to stake.
|
||||
**/
|
||||
Bonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||
Bonded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* An account has stopped participating as either a validator or nominator.
|
||||
* \[stash\]
|
||||
**/
|
||||
Chilled: AugmentedEvent<ApiType, [AccountId32]>;
|
||||
Chilled: AugmentedEvent<ApiType, [stash: AccountId32], { stash: AccountId32 }>;
|
||||
/**
|
||||
* The era payout has been set; the first balance is the validator-payout; the second is
|
||||
* the remainder from the maximum amount of reward.
|
||||
* \[era_index, validator_payout, remainder\]
|
||||
**/
|
||||
EraPaid: AugmentedEvent<ApiType, [u32, u128, u128]>;
|
||||
EraPaid: AugmentedEvent<ApiType, [eraIndex: u32, validatorPayout: u128, remainder: u128], { eraIndex: u32, validatorPayout: u128, remainder: u128 }>;
|
||||
/**
|
||||
* A nominator has been kicked from a validator. \[nominator, stash\]
|
||||
* A nominator has been kicked from a validator.
|
||||
**/
|
||||
Kicked: AugmentedEvent<ApiType, [AccountId32, AccountId32]>;
|
||||
Kicked: AugmentedEvent<ApiType, [nominator: AccountId32, stash: AccountId32], { nominator: AccountId32, stash: AccountId32 }>;
|
||||
/**
|
||||
* An old slashing report from a prior era was discarded because it could
|
||||
* not be processed. \[session_index\]
|
||||
* not be processed.
|
||||
**/
|
||||
OldSlashingReportDiscarded: AugmentedEvent<ApiType, [u32]>;
|
||||
OldSlashingReportDiscarded: AugmentedEvent<ApiType, [sessionIndex: u32], { sessionIndex: u32 }>;
|
||||
/**
|
||||
* The stakers' rewards are getting paid. \[era_index, validator_stash\]
|
||||
* The stakers' rewards are getting paid.
|
||||
**/
|
||||
PayoutStarted: AugmentedEvent<ApiType, [u32, AccountId32]>;
|
||||
PayoutStarted: AugmentedEvent<ApiType, [eraIndex: u32, validatorStash: AccountId32], { eraIndex: u32, validatorStash: AccountId32 }>;
|
||||
/**
|
||||
* The nominator has been rewarded by this amount. \[stash, amount\]
|
||||
* The nominator has been rewarded by this amount.
|
||||
**/
|
||||
Rewarded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||
Rewarded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* One validator (and its nominators) has been slashed by the given amount.
|
||||
* \[validator, amount\]
|
||||
* One staker (and potentially its nominators) has been slashed by the given amount.
|
||||
**/
|
||||
Slashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||
Slashed: AugmentedEvent<ApiType, [staker: AccountId32, amount: u128], { staker: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* A new set of stakers was elected.
|
||||
**/
|
||||
@@ -1170,18 +1215,18 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
StakingElectionFailed: AugmentedEvent<ApiType, []>;
|
||||
/**
|
||||
* An account has unbonded this amount. \[stash, amount\]
|
||||
* An account has unbonded this amount.
|
||||
**/
|
||||
Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||
Unbonded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* A validator has set their preferences.
|
||||
**/
|
||||
ValidatorPrefsSet: AugmentedEvent<ApiType, [AccountId32, PalletStakingValidatorPrefs]>;
|
||||
ValidatorPrefsSet: AugmentedEvent<ApiType, [stash: AccountId32, prefs: PalletStakingValidatorPrefs], { stash: AccountId32, prefs: PalletStakingValidatorPrefs }>;
|
||||
/**
|
||||
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
|
||||
* from the unlocking queue. \[stash, amount\]
|
||||
* from the unlocking queue.
|
||||
**/
|
||||
Withdrawn: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||
Withdrawn: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
@@ -1236,11 +1281,11 @@ declare module '@polkadot/api-base/types/events' {
|
||||
/**
|
||||
* An extrinsic failed.
|
||||
**/
|
||||
ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo }>;
|
||||
ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportDispatchDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportDispatchDispatchInfo }>;
|
||||
/**
|
||||
* An extrinsic completed successfully.
|
||||
**/
|
||||
ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchInfo: FrameSupportWeightsDispatchInfo }>;
|
||||
ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportDispatchDispatchInfo], { dispatchInfo: FrameSupportDispatchDispatchInfo }>;
|
||||
/**
|
||||
* An account was reaped.
|
||||
**/
|
||||
@@ -1504,10 +1549,6 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* New metadata has been set for an item.
|
||||
**/
|
||||
MetadataSet: AugmentedEvent<ApiType, [collection: u32, item: u32, data: Bytes, isFrozen: bool], { collection: u32, item: u32, data: Bytes, isFrozen: bool }>;
|
||||
/**
|
||||
* Event gets emmited when the `NextCollectionId` gets incremented.
|
||||
**/
|
||||
NextCollectionIdIncremented: AugmentedEvent<ApiType, [nextId: u32], { nextId: u32 }>;
|
||||
/**
|
||||
* The owner changed.
|
||||
**/
|
||||
@@ -1583,9 +1624,23 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
voterList: {
|
||||
/**
|
||||
* Moved an account from one bag to another.
|
||||
**/
|
||||
Rebagged: AugmentedEvent<ApiType, [who: AccountId32, from: u64, to: u64], { who: AccountId32, from: u64, to: u64 }>;
|
||||
/**
|
||||
* Updated the score of some account to the given amount.
|
||||
**/
|
||||
ScoreUpdated: AugmentedEvent<ApiType, [who: AccountId32, newScore: u64], { who: AccountId32, newScore: u64 }>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
whitelist: {
|
||||
CallWhitelisted: AugmentedEvent<ApiType, [callHash: H256], { callHash: H256 }>;
|
||||
WhitelistedCallDispatched: AugmentedEvent<ApiType, [callHash: H256, result: Result<FrameSupportWeightsPostDispatchInfo, SpRuntimeDispatchErrorWithPostInfo>], { callHash: H256, result: Result<FrameSupportWeightsPostDispatchInfo, SpRuntimeDispatchErrorWithPostInfo> }>;
|
||||
WhitelistedCallDispatched: AugmentedEvent<ApiType, [callHash: H256, result: Result<FrameSupportDispatchPostDispatchInfo, SpRuntimeDispatchErrorWithPostInfo>], { callHash: H256, result: Result<FrameSupportDispatchPostDispatchInfo, SpRuntimeDispatchErrorWithPostInfo> }>;
|
||||
WhitelistedCallRemoved: AugmentedEvent<ApiType, [callHash: H256], { callHash: H256 }>;
|
||||
/**
|
||||
* Generic event
|
||||
|
||||
@@ -7,10 +7,10 @@ import '@polkadot/api-base/types/storage';
|
||||
|
||||
import type { ApiTypes, AugmentedQuery, QueryableStorageEntry } from '@polkadot/api-base/types';
|
||||
import type { Data } from '@polkadot/types';
|
||||
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, WrapperOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceMemberRole, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageDeletedContract, PalletContractsStorageRawContractInfo, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletConvictionVotingVoteVoting, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata, PalletUniquesItemDetails, PalletUniquesItemMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSupportPreimagesBounded, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceMemberRole, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageContractInfo, PalletContractsStorageDeletedContract, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletConvictionVotingVoteVoting, PalletDemocracyReferendumInfo, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata, PalletUniquesItemDetails, PalletUniquesItemMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
|
||||
import type { Observable } from '@polkadot/types/types';
|
||||
|
||||
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
||||
@@ -30,12 +30,15 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Maps member type to members of each type.
|
||||
**/
|
||||
members: AugmentedQuery<ApiType, (arg: PalletAllianceMemberRole | 'Founder' | 'Fellow' | 'Ally' | number | Uint8Array) => Observable<Vec<AccountId32>>, [PalletAllianceMemberRole]> & QueryableStorageEntry<ApiType, [PalletAllianceMemberRole]>;
|
||||
members: AugmentedQuery<ApiType, (arg: PalletAllianceMemberRole | 'Fellow' | 'Ally' | 'Retiring' | number | Uint8Array) => Observable<Vec<AccountId32>>, [PalletAllianceMemberRole]> & QueryableStorageEntry<ApiType, [PalletAllianceMemberRole]>;
|
||||
/**
|
||||
* A set of members who gave a retirement notice. They can retire after the end of retirement
|
||||
* period stored as a future block number.
|
||||
**/
|
||||
retiringMembers: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* The IPFS CID of the alliance rule.
|
||||
* Founders and fellows can propose a new rule with a super-majority.
|
||||
*
|
||||
* Any founder has a special one-vote veto right to the rule setting.
|
||||
* Fellows can propose a new rule with a super-majority.
|
||||
**/
|
||||
rule: AugmentedQuery<ApiType, () => Observable<Option<PalletAllianceCid>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
@@ -47,11 +50,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* The current list of websites deemed unscrupulous.
|
||||
**/
|
||||
unscrupulousWebsites: AugmentedQuery<ApiType, () => Observable<Vec<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* A set of members that are (potentially) being kicked out. They cannot retire until the
|
||||
* motion is settled.
|
||||
**/
|
||||
upForKicking: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<bool>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -245,28 +243,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
bagsList: {
|
||||
/**
|
||||
* Counter for the related counted storage map
|
||||
**/
|
||||
counterForListNodes: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* A bag stored in storage.
|
||||
*
|
||||
* Stores a `Bag` struct, which stores head and tail pointers to itself.
|
||||
**/
|
||||
listBags: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletBagsListListBag>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
|
||||
/**
|
||||
* A single node, within some bag.
|
||||
*
|
||||
* Nodes store links forward and back within their respective bags.
|
||||
**/
|
||||
listNodes: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletBagsListListNode>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
balances: {
|
||||
/**
|
||||
* The Balances pallet example of storing the balance of an account.
|
||||
@@ -378,7 +354,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
*
|
||||
* TWOX-NOTE: SAFE since `AccountId` is a secure hash.
|
||||
**/
|
||||
contractInfoOf: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletContractsStorageRawContractInfo>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
contractInfoOf: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletContractsStorageContractInfo>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Evicted contracts that await child trie deletion.
|
||||
*
|
||||
@@ -503,20 +479,15 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* - `LastTabledWasExternal` is `false`; or
|
||||
* - `PublicProps` is empty.
|
||||
**/
|
||||
nextExternal: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[H256, PalletDemocracyVoteThreshold]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Map of hashes to the proposal preimage, along with who registered it and their deposit.
|
||||
* The block number is the block at which it was deposited.
|
||||
**/
|
||||
preimages: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<PalletDemocracyPreimageStatus>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
|
||||
nextExternal: AugmentedQuery<ApiType, () => Observable<Option<ITuple<[FrameSupportPreimagesBounded, PalletDemocracyVoteThreshold]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The number of (public) proposals that have been made so far.
|
||||
**/
|
||||
publicPropCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The public proposals. Unsorted. The second item is the proposal's hash.
|
||||
* The public proposals. Unsorted. The second item is the proposal.
|
||||
**/
|
||||
publicProps: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, H256, AccountId32]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
publicProps: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u32, FrameSupportPreimagesBounded, AccountId32]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The next free referendum index, aka the number of referenda started so far.
|
||||
**/
|
||||
@@ -527,12 +498,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* TWOX-NOTE: SAFE as indexes are not under an attacker’s control.
|
||||
**/
|
||||
referendumInfoOf: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletDemocracyReferendumInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Storage version of the pallet.
|
||||
*
|
||||
* New networks start with last version.
|
||||
**/
|
||||
storageVersion: AugmentedQuery<ApiType, () => Observable<Option<PalletDemocracyReleases>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* All votes for a particular voter. We store the balance for the number of votes that we
|
||||
* have recorded. The second item is the total amount of delegations, that will be added.
|
||||
@@ -577,14 +542,14 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
round: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* A sorted, bounded set of `(score, index)`, where each `index` points to a value in
|
||||
* `SignedSubmissions`.
|
||||
* A sorted, bounded vector of `(score, block_number, index)`, where each `index` points to a
|
||||
* value in `SignedSubmissions`.
|
||||
*
|
||||
* We never need to process more than a single signed submission at a time. Signed submissions
|
||||
* can be quite large, so we're willing to pay the cost of multiple database accesses to access
|
||||
* them one at a time instead of reading and decoding all of them at once.
|
||||
**/
|
||||
signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<BTreeMap<SpNposElectionsElectionScore, u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[SpNposElectionsElectionScore, u32, u32]>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The next index to be assigned to an incoming signed submission.
|
||||
*
|
||||
@@ -662,6 +627,35 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
fastUnstake: {
|
||||
/**
|
||||
* Counter for the related counted storage map
|
||||
**/
|
||||
counterForQueue: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Number of eras to check per block.
|
||||
*
|
||||
* If set to 0, this pallet does absolutely nothing.
|
||||
*
|
||||
* Based on the amount of weight available at `on_idle`, up to this many eras of a single
|
||||
* nominator might be checked.
|
||||
**/
|
||||
erasToCheckPerBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The current "head of the queue" being unstaked.
|
||||
**/
|
||||
head: AugmentedQuery<ApiType, () => Observable<Option<PalletFastUnstakeUnstakeRequest>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The map of all accounts wishing to be unstaked.
|
||||
*
|
||||
* Keeps track of `AccountId` wishing to unstake and it's corresponding deposit.
|
||||
**/
|
||||
queue: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u128>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
gilt: {
|
||||
/**
|
||||
* The currently active gilts, indexed according to the order of creation.
|
||||
@@ -851,7 +845,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
multisig: {
|
||||
calls: AugmentedQuery<ApiType, (arg: U8aFixed | string | Uint8Array) => Observable<Option<ITuple<[WrapperKeepOpaque<Call>, AccountId32, u128]>>>, [U8aFixed]> & QueryableStorageEntry<ApiType, [U8aFixed]>;
|
||||
/**
|
||||
* The set of open multisig operations.
|
||||
**/
|
||||
@@ -977,10 +970,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
preimage: {
|
||||
/**
|
||||
* The preimages stored by this pallet.
|
||||
**/
|
||||
preimageFor: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<Bytes>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
|
||||
preimageFor: AugmentedQuery<ApiType, (arg: ITuple<[H256, u32]> | [H256 | string | Uint8Array, u32 | AnyNumber | Uint8Array]) => Observable<Option<Bytes>>, [ITuple<[H256, u32]>]> & QueryableStorageEntry<ApiType, [ITuple<[H256, u32]>]>;
|
||||
/**
|
||||
* The request status of a given hash.
|
||||
**/
|
||||
@@ -1123,11 +1113,15 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Items to be executed, indexed by the block number that they should be executed on.
|
||||
**/
|
||||
agenda: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Option<PalletSchedulerScheduledV3>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
agenda: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Option<PalletSchedulerScheduled>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
incompleteSince: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Lookup from identity to the block number and index of the task.
|
||||
* Lookup from a name to the block number and index of the task.
|
||||
*
|
||||
* For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4
|
||||
* identities.
|
||||
**/
|
||||
lookup: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>;
|
||||
lookup: AugmentedQuery<ApiType, (arg: U8aFixed | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [U8aFixed]> & QueryableStorageEntry<ApiType, [U8aFixed]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -1353,16 +1347,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* Mode of era forcing.
|
||||
**/
|
||||
forceEra: AugmentedQuery<ApiType, () => Observable<PalletStakingForcing>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Number of eras to keep in history.
|
||||
*
|
||||
* Information is kept for eras in `[current_era - history_depth; current_era]`.
|
||||
*
|
||||
* Must be more than the number of eras delayed by session otherwise. I.e. active era must
|
||||
* always be in history. I.e. `active_era > current_era - history_depth` must be
|
||||
* guaranteed.
|
||||
**/
|
||||
historyDepth: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Any validators that may never be slashed or forcibly kicked. It's a Vec since they're
|
||||
* easy to initialize and the performance hit is minimal (we expect no more than four
|
||||
@@ -1469,7 +1453,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
unappliedSlashes: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<PalletStakingUnappliedSlash>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* The ideal number of staking participants.
|
||||
* The ideal number of active validators.
|
||||
**/
|
||||
validatorCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
@@ -1537,7 +1521,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* The current weight for the block.
|
||||
**/
|
||||
blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportWeightsPerDispatchClassU64>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportDispatchPerDispatchClassWeight>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Digest of the current block, also part of the block header.
|
||||
**/
|
||||
@@ -1779,11 +1763,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* Price of an asset instance.
|
||||
**/
|
||||
itemPriceOf: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<ITuple<[u128, Option<AccountId32>]>>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
||||
/**
|
||||
* Stores the `CollectionId` that is going to be used for the next collection.
|
||||
* This gets incremented by 1 whenever a new collection is created.
|
||||
**/
|
||||
nextCollectionId: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The collection, if any, of which an account is willing to take ownership.
|
||||
**/
|
||||
@@ -1809,6 +1788,28 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
voterList: {
|
||||
/**
|
||||
* Counter for the related counted storage map
|
||||
**/
|
||||
counterForListNodes: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* A bag stored in storage.
|
||||
*
|
||||
* Stores a `Bag` struct, which stores head and tail pointers to itself.
|
||||
**/
|
||||
listBags: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletBagsListListBag>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
|
||||
/**
|
||||
* A single node, within some bag.
|
||||
*
|
||||
* Nodes store links forward and back within their respective bags.
|
||||
**/
|
||||
listNodes: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletBagsListListNode>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
whitelist: {
|
||||
whitelistedCall: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<Null>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
|
||||
/**
|
||||
|
||||
@@ -6,20 +6,19 @@
|
||||
import '@polkadot/api-base/types/calls';
|
||||
|
||||
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
|
||||
import type { Bytes, Null, Option, Result, Vec, u32, u64 } from '@polkadot/types-codec';
|
||||
import type { Bytes, Null, Option, Result, Vec, u32 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
|
||||
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
|
||||
import type { BlockHash } from '@polkadot/types/interfaces/chain';
|
||||
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||
import type { CodeUploadResult, ContractExecResult, ContractInstantiateResult } from '@polkadot/types/interfaces/contracts';
|
||||
import type { CodeSource, CodeUploadResult, ContractExecResult, ContractInstantiateResult } from '@polkadot/types/interfaces/contracts';
|
||||
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
||||
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
|
||||
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||
import type { NpApiError } from '@polkadot/types/interfaces/nompools';
|
||||
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot } from '@polkadot/types/interfaces/runtime';
|
||||
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, WeightV2 } from '@polkadot/types/interfaces/runtime';
|
||||
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
||||
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
|
||||
import type { TransactionSource, TransactionValidity } from '@polkadot/types/interfaces/txqueue';
|
||||
@@ -106,12 +105,12 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x68b66ba122c93fa7/1 */
|
||||
/** 0x68b66ba122c93fa7/2 */
|
||||
contractsApi: {
|
||||
/**
|
||||
* Perform a call from a specified account to a given contract.
|
||||
**/
|
||||
call: AugmentedCall<ApiType, (origin: AccountId | string | Uint8Array, dest: AccountId | string | Uint8Array, value: Balance | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, storageDepositLimit: Option<Balance> | null | Uint8Array | Balance | AnyNumber, inputData: Bytes | string | Uint8Array) => Observable<ContractExecResult>>;
|
||||
call: AugmentedCall<ApiType, (origin: AccountId | string | Uint8Array, dest: AccountId | string | Uint8Array, value: Balance | AnyNumber | Uint8Array, gasLimit: Option<WeightV2> | null | Uint8Array | WeightV2 | { refTime?: any; proofSize?: any } | string, storageDepositLimit: Option<Balance> | null | Uint8Array | Balance | AnyNumber, inputData: Bytes | string | Uint8Array) => Observable<ContractExecResult>>;
|
||||
/**
|
||||
* Query a given storage key in a given contract.
|
||||
**/
|
||||
@@ -119,7 +118,7 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
/**
|
||||
* Instantiate a new contract.
|
||||
**/
|
||||
instantiate: AugmentedCall<ApiType, (origin: AccountId | string | Uint8Array, value: Balance | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, storageDepositLimit: Option<Balance> | null | Uint8Array | Balance | AnyNumber, code: Bytes | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => Observable<ContractInstantiateResult>>;
|
||||
instantiate: AugmentedCall<ApiType, (origin: AccountId | string | Uint8Array, value: Balance | AnyNumber | Uint8Array, gasLimit: Option<WeightV2> | null | Uint8Array | WeightV2 | { refTime?: any; proofSize?: any } | string, storageDepositLimit: Option<Balance> | null | Uint8Array | Balance | AnyNumber, code: CodeSource | { Upload: any } | { Existing: any } | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => Observable<ContractInstantiateResult>>;
|
||||
/**
|
||||
* Upload new code without instantiating a contract from it.
|
||||
**/
|
||||
@@ -222,7 +221,7 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
/**
|
||||
* Returns the pending rewards for the given member.
|
||||
**/
|
||||
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Result<Balance, NpApiError>>>;
|
||||
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>;
|
||||
/**
|
||||
* Generic call
|
||||
**/
|
||||
@@ -265,7 +264,7 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0x37c8bb1350a9a2a8/1 */
|
||||
/** 0x37c8bb1350a9a2a8/2 */
|
||||
transactionPaymentApi: {
|
||||
/**
|
||||
* The transaction fee details
|
||||
@@ -280,7 +279,7 @@ declare module '@polkadot/api-base/types/calls' {
|
||||
**/
|
||||
[key: string]: DecoratedCallBase<ApiType>;
|
||||
};
|
||||
/** 0xf3ff14d5ab527059/1 */
|
||||
/** 0xf3ff14d5ab527059/2 */
|
||||
transactionPaymentCallApi: {
|
||||
/**
|
||||
* The call fee details
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -20,13 +20,13 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.1",
|
||||
"version": "9.9.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/rpc-core": "9.2.1",
|
||||
"@polkadot/types": "9.2.1",
|
||||
"@polkadot/util": "^10.1.4",
|
||||
"rxjs": "^7.5.6"
|
||||
"@babel/runtime": "^7.20.1",
|
||||
"@polkadot/rpc-core": "9.9.2",
|
||||
"@polkadot/types": "9.9.2",
|
||||
"@polkadot/util": "^10.1.14",
|
||||
"rxjs": "^7.5.7"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||
// Copyright 2017-2022 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { packageInfo } from './packageInfo';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||
// Copyright 2017-2022 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { packageInfo as rpcInfo } from '@polkadot/rpc-core/packageInfo';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||
// Copyright 2017-2022 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import './detectPackage';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||
// Copyright 2017-2022 @polkadot/api-base authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export * from './index';
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '9.2.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '9.9.2' };
|
||||
|
||||
@@ -10,7 +10,7 @@ import type { Registry, Signer } from '@polkadot/types/types';
|
||||
|
||||
// A smaller interface of ApiRx, used in derive and in SubmittableExtrinsic
|
||||
export interface ApiInterfaceRx {
|
||||
call: QueryableCalls<'rxjs'>,
|
||||
call: QueryableCalls<'rxjs'>;
|
||||
consts: QueryableConsts<'rxjs'>;
|
||||
extrinsicType: number;
|
||||
genesisHash?: Hash;
|
||||
@@ -19,9 +19,11 @@ export interface ApiInterfaceRx {
|
||||
runtimeMetadata: Metadata;
|
||||
runtimeVersion: RuntimeVersion;
|
||||
query: QueryableStorage<'rxjs'>;
|
||||
queryAt: (blockHash: Uint8Array | string, knownVersion?: RuntimeVersion) => Observable<QueryableStorage<'rxjs'>>;
|
||||
queryMulti: QueryableStorageMulti<'rxjs'>;
|
||||
rpc: DecoratedRpc<'rxjs', RpcInterface>;
|
||||
tx: SubmittableExtrinsics<'rxjs'>;
|
||||
signer?: Signer;
|
||||
|
||||
callAt: (blockHash: Uint8Array | string, knownVersion?: RuntimeVersion) => Observable<QueryableCalls<'rxjs'>>;
|
||||
queryAt: (blockHash: Uint8Array | string, knownVersion?: RuntimeVersion) => Observable<QueryableStorage<'rxjs'>>;
|
||||
}
|
||||
|
||||
@@ -11,8 +11,10 @@ export type DecoratedCallBase<ApiType extends ApiTypes, F extends AnyFunction =
|
||||
: <T extends Codec | any = ReturnCodec<F>> (...args: Parameters<F>) => Promise<T>;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export type AugmentedCall<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> =
|
||||
DecoratedCallBase<ApiType, F> & { meta: DefinitionCallNamed };
|
||||
export type AugmentedCall<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> = DecoratedCallBase<ApiType, F> & {
|
||||
/** The metadata/description/definition for this method */
|
||||
meta: DefinitionCallNamed
|
||||
};
|
||||
|
||||
// augmented interfaces
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { AnyFunction, Callback, DefinitionRpc } from '@polkadot/types/types';
|
||||
import type { AnyFunction, AnyJson, Callback, DefinitionRpc } from '@polkadot/types/types';
|
||||
|
||||
import { ApiTypes, PromiseResult, Push, RxResult, UnsubscribePromise } from './base';
|
||||
|
||||
@@ -29,6 +29,8 @@ export type DecoratedRpcSection<ApiType extends ApiTypes, Section> = {
|
||||
: never
|
||||
}
|
||||
|
||||
export type RawRpcType<ApiType extends ApiTypes> = (method: string, ...params: unknown[]) => ApiType extends 'rxjs' ? Observable<AnyJson> : Promise<AnyJson>;
|
||||
|
||||
export type DecoratedRpc<ApiType extends ApiTypes, AllSections> = {
|
||||
[S in keyof AllSections]: DecoratedRpcSection<ApiType, AllSections[S]>
|
||||
}
|
||||
} & RawRpcType<ApiType>
|
||||
|
||||
@@ -50,6 +50,11 @@ export interface SubmittableResultValue {
|
||||
}
|
||||
|
||||
export interface SubmittableExtrinsic<ApiType extends ApiTypes, R extends ISubmittableResult = ISubmittableResult> extends Extrinsic {
|
||||
/** true if api.rpc.system.dryRun is available, enabling dryRun(...) */
|
||||
hasDryRun: boolean;
|
||||
/** true if api.call.transactionPaymentApi.queryInfo is available, enabling paymentInfo(...) */
|
||||
hasPaymentInfo: boolean;
|
||||
|
||||
dryRun (account: AddressOrPair, options?: Partial<SignerOptions>): SubmittableDryRunResult<ApiType>;
|
||||
|
||||
paymentInfo (account: AddressOrPair, options?: Partial<SignerOptions>): SubmittablePaymentResult<ApiType>;
|
||||
|
||||
@@ -20,20 +20,20 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.1",
|
||||
"version": "9.9.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/api": "9.2.1",
|
||||
"@polkadot/types": "9.2.1",
|
||||
"@polkadot/types-codec": "9.2.1",
|
||||
"@polkadot/types-create": "9.2.1",
|
||||
"@polkadot/util": "^10.1.4",
|
||||
"@polkadot/util-crypto": "^10.1.4",
|
||||
"rxjs": "^7.5.6"
|
||||
"@babel/runtime": "^7.20.1",
|
||||
"@polkadot/api": "9.9.2",
|
||||
"@polkadot/types": "9.9.2",
|
||||
"@polkadot/types-codec": "9.9.2",
|
||||
"@polkadot/types-create": "9.9.2",
|
||||
"@polkadot/util": "^10.1.14",
|
||||
"@polkadot/util-crypto": "^10.1.14",
|
||||
"rxjs": "^7.5.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api-augment": "9.2.1",
|
||||
"@polkadot/keyring": "^10.1.4"
|
||||
"@polkadot/api-augment": "9.9.2",
|
||||
"@polkadot/keyring": "^10.1.14"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,9 @@ interface JSONAbi {
|
||||
},
|
||||
V3: {
|
||||
spec: SpecDef;
|
||||
},
|
||||
V4: {
|
||||
spec: SpecDef;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +62,7 @@ describe('Abi', (): void => {
|
||||
|
||||
it(`initializes from a contract ABI (${abiName})`, (): void => {
|
||||
try {
|
||||
const messageIds = (abi.V3 || abi.V2 || abi.V1 || abi).spec.messages.map(({ label, name }) =>
|
||||
const messageIds = (abi.V4 || abi.V3 || abi.V2 || abi.V1 || abi).spec.messages.map(({ label, name }) =>
|
||||
label || (
|
||||
Array.isArray(name)
|
||||
? name.join('::')
|
||||
|
||||
@@ -27,12 +27,23 @@ function findMessage <T extends AbiMessage> (list: T[], messageOrId: T | string
|
||||
}
|
||||
|
||||
function getLatestMeta (registry: Registry, json: Record<string, unknown>): ContractMetadataLatest {
|
||||
// this is for V1, V2, V3
|
||||
const vx = enumVersions.find((v) => isObject(json[v]));
|
||||
const metadata = registry.createType('ContractMetadata',
|
||||
|
||||
// this was added in V4
|
||||
const jsonVersion = json.version as string;
|
||||
|
||||
if (!vx && jsonVersion && !enumVersions.find((v) => v === `V${jsonVersion}`)) {
|
||||
throw new Error(`Unable to handle version ${jsonVersion}`);
|
||||
}
|
||||
|
||||
const metadata = registry.createType<ContractMetadata>('ContractMetadata',
|
||||
vx
|
||||
? { [vx]: json[vx] }
|
||||
: { V0: json }
|
||||
) as unknown as ContractMetadata;
|
||||
: jsonVersion
|
||||
? { [`V${jsonVersion}`]: json }
|
||||
: { V0: json }
|
||||
);
|
||||
const converter = convertVersions.find(([v]) => metadata[`is${v}`]);
|
||||
|
||||
if (!converter) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { v0ToLatest, v1ToLatest, v2ToLatest, v3ToLatest } from '@polkadot/api-contract/Abi/toLatest';
|
||||
import { TypeRegistry } from '@polkadot/types';
|
||||
|
||||
import abis from '../test/contracts';
|
||||
import { v0ToLatest, v1ToLatest, v2ToLatest, v3ToLatest, v4ToLatest } from './toLatest';
|
||||
|
||||
describe('v0ToLatest', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
@@ -120,3 +120,18 @@ describe('v3ToLatest', (): void => {
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('v4ToLatest', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V4: abis.ink_v4_flipperContract });
|
||||
const latest = v4ToLatest(registry, contract.asV4);
|
||||
|
||||
it('has the correct constructor flags', (): void => {
|
||||
expect(
|
||||
latest.spec.constructors[0].payable.isTrue
|
||||
).toEqual(false);
|
||||
expect(
|
||||
latest.spec.constructors[1].payable.isTrue
|
||||
).toEqual(false);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ContractMetadataLatest, ContractMetadataV3 } from '@polkadot/types/interfaces';
|
||||
import type { ContractMetadataLatest, ContractMetadataV4 } from '@polkadot/types/interfaces';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
|
||||
import { v0ToV1 } from './toV1';
|
||||
import { v1ToV2 } from './toV2';
|
||||
import { v2ToV3 } from './toV3';
|
||||
import { v3ToV4 } from './toV4';
|
||||
|
||||
// The versions where an enum is used, aka V0 is missing
|
||||
// (Order from newest, i.e. we expect more on newest vs oldest)
|
||||
export const enumVersions = <const> ['V3', 'V2', 'V1'];
|
||||
export const enumVersions = <const> ['V4', 'V3', 'V2', 'V1'];
|
||||
|
||||
type Versions = typeof enumVersions[number] | 'V0';
|
||||
|
||||
@@ -22,15 +23,17 @@ function createConverter <I, O> (next: (registry: Registry, input: O) => Contrac
|
||||
next(registry, step(registry, input));
|
||||
}
|
||||
|
||||
export function v3ToLatest (registry: Registry, v3: ContractMetadataV3): ContractMetadataLatest {
|
||||
return v3;
|
||||
export function v4ToLatest (registry: Registry, v4: ContractMetadataV4): ContractMetadataLatest {
|
||||
return v4;
|
||||
}
|
||||
|
||||
export const v3ToLatest = createConverter(v4ToLatest, v3ToV4);
|
||||
export const v2ToLatest = createConverter(v3ToLatest, v2ToV3);
|
||||
export const v1ToLatest = createConverter(v2ToLatest, v1ToV2);
|
||||
export const v0ToLatest = createConverter(v1ToLatest, v0ToV1);
|
||||
|
||||
export const convertVersions: [Versions, Converter][] = [
|
||||
['V4', v4ToLatest],
|
||||
['V3', v3ToLatest],
|
||||
['V2', v2ToLatest],
|
||||
['V1', v1ToLatest],
|
||||
|
||||
@@ -21,6 +21,10 @@ function v0ToV1Names (all: Named[]): unknown[] {
|
||||
}
|
||||
|
||||
export function v0ToV1 (registry: Registry, v0: ContractMetadataV0): ContractMetadataV1 {
|
||||
if (!v0.metadataVersion.length) {
|
||||
throw new Error('Invalid format for V0 (detected) contract metadata');
|
||||
}
|
||||
|
||||
return registry.createType('ContractMetadataV1', objectSpread({}, v0, {
|
||||
spec: objectSpread({}, v0.spec, {
|
||||
constructors: v0ToV1Names(v0.spec.constructors),
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ContractMetadataV3, ContractMetadataV4 } from '@polkadot/types/interfaces';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
|
||||
export function v3ToV4 (registry: Registry, v3: ContractMetadataV3): ContractMetadataV4 {
|
||||
return v3;
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
|
||||
import type { WeightV2 } from '@polkadot/types/interfaces';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
|
||||
import { ApiBase } from '@polkadot/api/base';
|
||||
@@ -16,14 +17,9 @@ export abstract class Base<ApiType extends ApiTypes> {
|
||||
|
||||
protected readonly _decorateMethod: DecorateMethod<ApiType>;
|
||||
|
||||
protected readonly _isWeightV1: boolean;
|
||||
|
||||
constructor (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, decorateMethod: DecorateMethod<ApiType>) {
|
||||
this.abi = abi instanceof Abi
|
||||
? abi
|
||||
: new Abi(abi, api.registry.getChainProperties());
|
||||
this.api = api;
|
||||
|
||||
this._decorateMethod = decorateMethod;
|
||||
|
||||
if (!api || !api.isConnected || !api.tx) {
|
||||
throw new Error('Your API has not been initialized correctly and is not connected to a chain');
|
||||
} else if (!api.tx.contracts || !isFunction(api.tx.contracts.instantiateWithCode) || api.tx.contracts.instantiateWithCode.meta.args.length !== 6) {
|
||||
@@ -31,6 +27,13 @@ export abstract class Base<ApiType extends ApiTypes> {
|
||||
} else if (!api.call.contractsApi || !isFunction(api.call.contractsApi.call)) {
|
||||
throw new Error('Your runtime does not expose the api.call.contractsApi.call runtime interfaces');
|
||||
}
|
||||
|
||||
this.abi = abi instanceof Abi
|
||||
? abi
|
||||
: new Abi(abi, api.registry.getChainProperties());
|
||||
this.api = api;
|
||||
this._decorateMethod = decorateMethod;
|
||||
this._isWeightV1 = !api.registry.createType<WeightV2>('Weight').proofSize;
|
||||
}
|
||||
|
||||
public get registry (): Registry {
|
||||
|
||||
@@ -16,7 +16,7 @@ import { Abi } from '../Abi';
|
||||
import { applyOnEvent } from '../util';
|
||||
import { Base } from './Base';
|
||||
import { Contract } from './Contract';
|
||||
import { createBluePrintTx, encodeSalt } from './util';
|
||||
import { convertWeight, createBluePrintTx, encodeSalt } from './util';
|
||||
|
||||
export interface BlueprintConstructor<ApiType extends ApiTypes> {
|
||||
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash | Uint8Array): Blueprint<ApiType>;
|
||||
@@ -57,16 +57,22 @@ export class Blueprint<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
}
|
||||
|
||||
#deploy = (constructorOrId: AbiConstructor | string | number, { gasLimit = BN_ZERO, salt, storageDepositLimit = null, value = BN_ZERO }: BlueprintOptions, params: unknown[]): SubmittableExtrinsic<ApiType, BlueprintSubmittableResult<ApiType>> => {
|
||||
const encParams = this.abi.findConstructor(constructorOrId).toU8a(params);
|
||||
const encSalt = encodeSalt(salt);
|
||||
|
||||
return this.api.tx.contracts
|
||||
.instantiate(value, gasLimit, storageDepositLimit, this.codeHash, encParams, encSalt)
|
||||
.withResultTransform((result: ISubmittableResult) =>
|
||||
new BlueprintSubmittableResult(result, applyOnEvent(result, ['Instantiated'], ([record]: EventRecord[]) =>
|
||||
new Contract<ApiType>(this.api, this.abi, record.event.data[1] as AccountId, this._decorateMethod)
|
||||
))
|
||||
);
|
||||
return this.api.tx.contracts.instantiate(
|
||||
value,
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore jiggle v1 weights, metadata points to latest
|
||||
this._isWeightV1
|
||||
? convertWeight(gasLimit).v1Weight
|
||||
: convertWeight(gasLimit).v2Weight,
|
||||
storageDepositLimit,
|
||||
this.codeHash,
|
||||
this.abi.findConstructor(constructorOrId).toU8a(params),
|
||||
encodeSalt(salt)
|
||||
).withResultTransform((result: ISubmittableResult) =>
|
||||
new BlueprintSubmittableResult(result, applyOnEvent(result, ['Instantiated'], ([record]: EventRecord[]) =>
|
||||
new Contract<ApiType>(this.api, this.abi, record.event.data[1] as AccountId, this._decorateMethod)
|
||||
))
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import { applyOnEvent } from '../util';
|
||||
import { Base } from './Base';
|
||||
import { Blueprint } from './Blueprint';
|
||||
import { Contract } from './Contract';
|
||||
import { createBluePrintTx, encodeSalt } from './util';
|
||||
import { convertWeight, createBluePrintTx, encodeSalt } from './util';
|
||||
|
||||
export interface CodeConstructor<ApiType extends ApiTypes> {
|
||||
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined): Code<ApiType>;
|
||||
@@ -64,23 +64,28 @@ export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
}
|
||||
|
||||
#instantiate = (constructorOrId: AbiConstructor | string | number, { gasLimit = BN_ZERO, salt, storageDepositLimit = null, value = BN_ZERO }: BlueprintOptions, params: unknown[]): SubmittableExtrinsic<ApiType, CodeSubmittableResult<ApiType>> => {
|
||||
const encCode = compactAddLength(this.code);
|
||||
const encParams = this.abi.findConstructor(constructorOrId).toU8a(params);
|
||||
const encSalt = encodeSalt(salt);
|
||||
|
||||
return this.api.tx.contracts
|
||||
.instantiateWithCode(value, gasLimit, storageDepositLimit, encCode, encParams, encSalt)
|
||||
.withResultTransform((result: ISubmittableResult) =>
|
||||
new CodeSubmittableResult(result, ...(applyOnEvent(result, ['CodeStored', 'Instantiated'], (records: EventRecord[]) =>
|
||||
records.reduce<[Blueprint<ApiType>?, Contract<ApiType>?]>(([blueprint, contract], { event }) =>
|
||||
this.api.events.contracts.Instantiated.is(event)
|
||||
? [blueprint, new Contract<ApiType>(this.api, this.abi, (event as unknown as { data: [Codec, AccountId] }).data[1], this._decorateMethod)]
|
||||
: this.api.events.contracts.CodeStored.is(event)
|
||||
? [new Blueprint<ApiType>(this.api, this.abi, (event as unknown as { data: [AccountId] }).data[0], this._decorateMethod), contract]
|
||||
: [blueprint, contract],
|
||||
[])
|
||||
) || []))
|
||||
);
|
||||
return this.api.tx.contracts.instantiateWithCode(
|
||||
value,
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore jiggle v1 weights, metadata points to latest
|
||||
this._isWeightV1
|
||||
? convertWeight(gasLimit).v1Weight
|
||||
: convertWeight(gasLimit).v2Weight,
|
||||
storageDepositLimit,
|
||||
compactAddLength(this.code),
|
||||
this.abi.findConstructor(constructorOrId).toU8a(params),
|
||||
encodeSalt(salt)
|
||||
).withResultTransform((result: ISubmittableResult) =>
|
||||
new CodeSubmittableResult(result, ...(applyOnEvent(result, ['CodeStored', 'Instantiated'], (records: EventRecord[]) =>
|
||||
records.reduce<[Blueprint<ApiType>?, Contract<ApiType>?]>(([blueprint, contract], { event }) =>
|
||||
this.api.events.contracts.Instantiated.is(event)
|
||||
? [blueprint, new Contract<ApiType>(this.api, this.abi, (event as unknown as { data: [Codec, AccountId] }).data[1], this._decorateMethod)]
|
||||
: this.api.events.contracts.CodeStored.is(event)
|
||||
? [new Blueprint<ApiType>(this.api, this.abi, (event as unknown as { data: [AccountId] }).data[0], this._decorateMethod), contract]
|
||||
: [blueprint, contract],
|
||||
[])
|
||||
) || []))
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -4,21 +4,21 @@
|
||||
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
|
||||
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
|
||||
import type { Bytes } from '@polkadot/types';
|
||||
import type { AccountId, ContractExecResult, EventRecord, Weight } from '@polkadot/types/interfaces';
|
||||
import type { AccountId, ContractExecResult, EventRecord, Weight, WeightV2 } from '@polkadot/types/interfaces';
|
||||
import type { ISubmittableResult } from '@polkadot/types/types';
|
||||
import type { AbiMessage, ContractCallOutcome, ContractOptions, DecodedEvent } from '../types';
|
||||
import type { AbiMessage, ContractCallOutcome, ContractOptions, DecodedEvent, WeightAll } from '../types';
|
||||
import type { ContractCallResult, ContractCallSend, ContractQuery, ContractTx, MapMessageQuery, MapMessageTx } from './types';
|
||||
|
||||
import { map } from 'rxjs';
|
||||
|
||||
import { SubmittableResult } from '@polkadot/api';
|
||||
import { ApiBase } from '@polkadot/api/base';
|
||||
import { BN, BN_HUNDRED, BN_ONE, BN_ZERO, bnToBn, isUndefined, logger } from '@polkadot/util';
|
||||
import { BN, BN_HUNDRED, BN_ONE, BN_ZERO, isUndefined, logger } from '@polkadot/util';
|
||||
|
||||
import { Abi } from '../Abi';
|
||||
import { applyOnEvent } from '../util';
|
||||
import { Base } from './Base';
|
||||
import { withMeta } from './util';
|
||||
import { convertWeight, withMeta } from './util';
|
||||
|
||||
export interface ContractConstructor<ApiType extends ApiTypes> {
|
||||
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, address: string | AccountId): Contract<ApiType>;
|
||||
@@ -85,41 +85,51 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
return this.#tx;
|
||||
}
|
||||
|
||||
#getGas = (_gasLimit: bigint | BN | string | number, isCall = false): BN => {
|
||||
const gasLimit = bnToBn(_gasLimit);
|
||||
#getGas = (_gasLimit: bigint | BN | string | number | WeightV2, isCall = false): WeightAll => {
|
||||
const weight = convertWeight(_gasLimit);
|
||||
|
||||
return gasLimit.lte(BN_ZERO)
|
||||
? isCall
|
||||
if (weight.v1Weight.gt(BN_ZERO)) {
|
||||
return weight;
|
||||
}
|
||||
|
||||
return convertWeight(
|
||||
isCall
|
||||
? MAX_CALL_GAS
|
||||
: (this.api.consts.system.blockWeights
|
||||
? (this.api.consts.system.blockWeights as unknown as { maxBlock: Weight }).maxBlock
|
||||
: this.api.consts.system.maximumBlockWeight as Weight
|
||||
).muln(64).div(BN_HUNDRED)
|
||||
: gasLimit;
|
||||
: convertWeight(
|
||||
this.api.consts.system.blockWeights
|
||||
? (this.api.consts.system.blockWeights as unknown as { maxBlock: WeightV2 }).maxBlock
|
||||
: this.api.consts.system.maximumBlockWeight as Weight
|
||||
).v1Weight.muln(64).div(BN_HUNDRED)
|
||||
);
|
||||
};
|
||||
|
||||
#exec = (messageOrId: AbiMessage | string | number, { gasLimit = BN_ZERO, storageDepositLimit = null, value = BN_ZERO }: ContractOptions, params: unknown[]): SubmittableExtrinsic<ApiType> => {
|
||||
const gas = this.#getGas(gasLimit);
|
||||
const encParams = this.abi.findMessage(messageOrId).toU8a(params);
|
||||
return this.api.tx.contracts.call(
|
||||
this.address,
|
||||
value,
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore jiggle v1 weights, metadata points to latest
|
||||
this._isWeightV1
|
||||
? convertWeight(gasLimit).v1Weight
|
||||
: convertWeight(gasLimit).v2Weight,
|
||||
storageDepositLimit,
|
||||
this.abi.findMessage(messageOrId).toU8a(params)
|
||||
).withResultTransform((result: ISubmittableResult) =>
|
||||
// ContractEmitted is the current generation, ContractExecution is the previous generation
|
||||
new ContractSubmittableResult(result, applyOnEvent(result, ['ContractEmitted', 'ContractExecution'], (records: EventRecord[]) =>
|
||||
records
|
||||
.map(({ event: { data: [, data] } }): DecodedEvent | null => {
|
||||
try {
|
||||
return this.abi.decodeEvent(data as Bytes);
|
||||
} catch (error) {
|
||||
l.error(`Unable to decode contract event: ${(error as Error).message}`);
|
||||
|
||||
return this.api.tx.contracts
|
||||
.call(this.address, value, gas, storageDepositLimit, encParams)
|
||||
.withResultTransform((result: ISubmittableResult) =>
|
||||
// ContractEmitted is the current generation, ContractExecution is the previous generation
|
||||
new ContractSubmittableResult(result, applyOnEvent(result, ['ContractEmitted', 'ContractExecution'], (records: EventRecord[]) =>
|
||||
records
|
||||
.map(({ event: { data: [, data] } }): DecodedEvent | null => {
|
||||
try {
|
||||
return this.abi.decodeEvent(data as Bytes);
|
||||
} catch (error) {
|
||||
l.error(`Unable to decode contract event: ${(error as Error).message}`);
|
||||
|
||||
return null;
|
||||
}
|
||||
})
|
||||
.filter((decoded): decoded is DecodedEvent => !!decoded)
|
||||
))
|
||||
);
|
||||
return null;
|
||||
}
|
||||
})
|
||||
.filter((decoded): decoded is DecodedEvent => !!decoded)
|
||||
))
|
||||
);
|
||||
};
|
||||
|
||||
#read = (messageOrId: AbiMessage | string | number, { gasLimit = BN_ZERO, storageDepositLimit = null, value = BN_ZERO }: ContractOptions, params: unknown[]): ContractCallSend<ApiType> => {
|
||||
@@ -128,22 +138,31 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
return {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
send: this._decorateMethod((origin: string | AccountId | Uint8Array) =>
|
||||
this.api.rx.call.contractsApi
|
||||
.call<ContractExecResult>(origin, this.address, value, this.#getGas(gasLimit, true), storageDepositLimit, message.toU8a(params))
|
||||
.pipe(
|
||||
map(({ debugMessage, gasConsumed, gasRequired, result, storageDeposit }): ContractCallOutcome => ({
|
||||
debugMessage,
|
||||
gasConsumed,
|
||||
gasRequired: gasRequired && !gasRequired.isZero()
|
||||
? gasRequired
|
||||
: gasConsumed,
|
||||
output: result.isOk && message.returnType
|
||||
? this.abi.registry.createTypeUnsafe(message.returnType.lookupName || message.returnType.type, [result.asOk.data.toU8a(true)], { isPedantic: true })
|
||||
: null,
|
||||
result,
|
||||
storageDeposit
|
||||
}))
|
||||
)
|
||||
this.api.rx.call.contractsApi.call<ContractExecResult>(
|
||||
origin,
|
||||
this.address,
|
||||
value,
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore jiggle v1 weights, metadata points to latest
|
||||
this._isWeightV1
|
||||
? this.#getGas(gasLimit, true).v1Weight
|
||||
: this.#getGas(gasLimit, true).v2Weight,
|
||||
storageDepositLimit,
|
||||
message.toU8a(params)
|
||||
).pipe(
|
||||
map(({ debugMessage, gasConsumed, gasRequired, result, storageDeposit }): ContractCallOutcome => ({
|
||||
debugMessage,
|
||||
gasConsumed,
|
||||
gasRequired: gasRequired && !convertWeight(gasRequired).v1Weight.isZero()
|
||||
? gasRequired
|
||||
: gasConsumed,
|
||||
output: result.isOk && message.returnType
|
||||
? this.abi.registry.createTypeUnsafe(message.returnType.lookupName || message.returnType.type, [result.asOk.data.toU8a(true)], { isPedantic: true })
|
||||
: null,
|
||||
result,
|
||||
storageDeposit
|
||||
}))
|
||||
)
|
||||
)
|
||||
};
|
||||
};
|
||||
|
||||
@@ -4,11 +4,13 @@
|
||||
import type { SubmittableResult } from '@polkadot/api';
|
||||
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
|
||||
import type { ApiTypes } from '@polkadot/api/types';
|
||||
import type { AbiConstructor, AbiMessage, BlueprintOptions } from '../types';
|
||||
import type { WeightV1, WeightV2 } from '@polkadot/types/interfaces';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { AbiConstructor, AbiMessage, BlueprintOptions, WeightAll } from '../types';
|
||||
import type { BlueprintDeploy, ContractGeneric } from './types';
|
||||
|
||||
import { Bytes } from '@polkadot/types';
|
||||
import { compactAddLength, u8aToU8a } from '@polkadot/util';
|
||||
import { bnToBn, compactAddLength, u8aToU8a } from '@polkadot/util';
|
||||
import { randomAsU8a } from '@polkadot/util-crypto';
|
||||
|
||||
export const EMPTY_SALT = new Uint8Array();
|
||||
@@ -37,3 +39,18 @@ export function encodeSalt (salt: Uint8Array | string | null = randomAsU8a()): U
|
||||
? compactAddLength(u8aToU8a(salt))
|
||||
: EMPTY_SALT;
|
||||
}
|
||||
|
||||
export function convertWeight (weight: WeightV1 | WeightV2 | bigint | string | number | BN): WeightAll {
|
||||
const [refTime, proofSize] = isWeightV2(weight)
|
||||
? [weight.refTime.toBn(), weight.proofSize.toBn()]
|
||||
: [bnToBn(weight), undefined];
|
||||
|
||||
return {
|
||||
v1Weight: refTime,
|
||||
v2Weight: { proofSize, refTime }
|
||||
};
|
||||
}
|
||||
|
||||
export function isWeightV2 (weight: WeightV1 | WeightV2 | bigint | string | number | BN): weight is WeightV2 {
|
||||
return !!(weight as WeightV2).proofSize;
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '9.2.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '9.9.2' };
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
]
|
||||
@@ -6,5 +6,6 @@ import * as v0 from './v0';
|
||||
import * as v1 from './v1';
|
||||
import * as v2 from './v2';
|
||||
import * as v3 from './v3';
|
||||
import * as v4 from './v4';
|
||||
|
||||
export default createVersionedExport({ v0, v1, v2, v3 });
|
||||
export default createVersionedExport({ v0, v1, v2, v3, v4 });
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,103 @@
|
||||
{
|
||||
"source": {
|
||||
"hash": "0xf051c631190ac47f82e280ba763df932210f6e2447978e24cbe0dcc6d6903c7a",
|
||||
"language": "ink! 4.0.0-alpha.1",
|
||||
"compiler": "rustc 1.63.0"
|
||||
},
|
||||
"contract": {
|
||||
"name": "flipper",
|
||||
"version": "4.0.0-alpha.1",
|
||||
"authors": [
|
||||
"Parity Technologies <admin@parity.io>"
|
||||
]
|
||||
},
|
||||
"spec": {
|
||||
"constructors": [
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"label": "init_value",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"bool"
|
||||
],
|
||||
"type": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
"Creates a new flipper smart contract initialized with the given value."
|
||||
],
|
||||
"label": "new",
|
||||
"payable": false,
|
||||
"selector": "0x9bae9d5e"
|
||||
},
|
||||
{
|
||||
"args": [],
|
||||
"docs": [
|
||||
"Creates a new flipper smart contract initialized to `false`."
|
||||
],
|
||||
"label": "default",
|
||||
"payable": false,
|
||||
"selector": "0xed4b9d1b"
|
||||
}
|
||||
],
|
||||
"docs": [],
|
||||
"events": [],
|
||||
"messages": [
|
||||
{
|
||||
"args": [],
|
||||
"docs": [
|
||||
" Flips the current value of the Flipper's boolean."
|
||||
],
|
||||
"label": "flip",
|
||||
"mutates": true,
|
||||
"payable": false,
|
||||
"returnType": null,
|
||||
"selector": "0x633aa551"
|
||||
},
|
||||
{
|
||||
"args": [],
|
||||
"docs": [
|
||||
" Returns the current value of the Flipper's boolean."
|
||||
],
|
||||
"label": "get",
|
||||
"mutates": false,
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"bool"
|
||||
],
|
||||
"type": 0
|
||||
},
|
||||
"selector": "0x2f865bd9"
|
||||
}
|
||||
]
|
||||
},
|
||||
"storage": {
|
||||
"struct": {
|
||||
"fields": [
|
||||
{
|
||||
"layout": {
|
||||
"cell": {
|
||||
"key": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"ty": 0
|
||||
}
|
||||
},
|
||||
"name": "value"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"types": [
|
||||
{
|
||||
"id": 0,
|
||||
"type": {
|
||||
"def": {
|
||||
"primitive": "bool"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"version": "4"
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as flipperContract } from './flipper.contract.json' assert { type: 'json' };
|
||||
export { default as flipperMetadata } from './flipper.json' assert { type: 'json' };
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
import type { ApiBase } from '@polkadot/api/base';
|
||||
import type { ApiTypes } from '@polkadot/api/types';
|
||||
import type { Text, u64 } from '@polkadot/types';
|
||||
import type { ContractExecResultResult, ContractSelector, StorageDeposit } from '@polkadot/types/interfaces';
|
||||
import type { Text } from '@polkadot/types';
|
||||
import type { ContractExecResultResult, ContractSelector, StorageDeposit, Weight, WeightV2 } from '@polkadot/types/interfaces';
|
||||
import type { Codec, TypeDef } from '@polkadot/types/types';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { Abi } from '.';
|
||||
@@ -55,8 +55,8 @@ export interface InterfaceContractCalls {
|
||||
|
||||
export interface ContractCallOutcome {
|
||||
debugMessage: Text;
|
||||
gasConsumed: u64;
|
||||
gasRequired: u64;
|
||||
gasConsumed: Weight;
|
||||
gasRequired: Weight;
|
||||
output: Codec | null;
|
||||
result: ContractExecResultResult;
|
||||
storageDeposit: StorageDeposit;
|
||||
@@ -73,7 +73,7 @@ export interface DecodedMessage {
|
||||
}
|
||||
|
||||
export interface ContractOptions {
|
||||
gasLimit?: bigint | string | number | BN;
|
||||
gasLimit?: bigint | string | number | BN | WeightV2;
|
||||
storageDepositLimit?: bigint | string | number | BN | null;
|
||||
value?: bigint | BN | string | number;
|
||||
}
|
||||
@@ -81,3 +81,11 @@ export interface ContractOptions {
|
||||
export interface BlueprintOptions extends ContractOptions {
|
||||
salt?: Uint8Array | string | null;
|
||||
}
|
||||
|
||||
export interface WeightAll {
|
||||
v1Weight: BN;
|
||||
v2Weight: {
|
||||
refTime: BN;
|
||||
proofSize?: BN;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -20,25 +20,25 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.1",
|
||||
"version": "9.9.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/api": "9.2.1",
|
||||
"@polkadot/api-augment": "9.2.1",
|
||||
"@polkadot/api-base": "9.2.1",
|
||||
"@polkadot/rpc-core": "9.2.1",
|
||||
"@polkadot/types": "9.2.1",
|
||||
"@polkadot/types-codec": "9.2.1",
|
||||
"@polkadot/util": "^10.1.4",
|
||||
"@polkadot/util-crypto": "^10.1.4",
|
||||
"rxjs": "^7.5.6"
|
||||
"@babel/runtime": "^7.20.1",
|
||||
"@polkadot/api": "9.9.2",
|
||||
"@polkadot/api-augment": "9.9.2",
|
||||
"@polkadot/api-base": "9.9.2",
|
||||
"@polkadot/rpc-core": "9.9.2",
|
||||
"@polkadot/types": "9.9.2",
|
||||
"@polkadot/types-codec": "9.9.2",
|
||||
"@polkadot/util": "^10.1.14",
|
||||
"@polkadot/util-crypto": "^10.1.14",
|
||||
"rxjs": "^7.5.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api": "9.2.1",
|
||||
"@polkadot/api-augment": "9.2.1",
|
||||
"@polkadot/rpc-augment": "9.2.1",
|
||||
"@polkadot/rpc-provider": "9.2.1",
|
||||
"@polkadot/types-support": "9.2.1"
|
||||
"@polkadot/api": "9.9.2",
|
||||
"@polkadot/api-augment": "9.9.2",
|
||||
"@polkadot/rpc-augment": "9.9.2",
|
||||
"@polkadot/rpc-provider": "9.9.2",
|
||||
"@polkadot/types-support": "9.9.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import { map, of, switchMap } from 'rxjs';
|
||||
import { BN_ZERO, bnToBn, objectSpread } from '@polkadot/util';
|
||||
|
||||
import { memo } from '../util';
|
||||
import { getQueryInterface } from './util';
|
||||
|
||||
function orderBags (ids: BN[], bags: Option<PalletBagsListListBag>[]): Bag[] {
|
||||
const sorted = ids
|
||||
@@ -36,11 +37,13 @@ function orderBags (ids: BN[], bags: Option<PalletBagsListListBag>[]): Bag[] {
|
||||
}
|
||||
|
||||
export function _getIds (instanceId: string, api: DeriveApi): (ids: (BN | number)[]) => Observable<Bag[]> {
|
||||
const query = getQueryInterface(api);
|
||||
|
||||
return memo(instanceId, (_ids: (BN | number)[]): Observable<Bag[]> => {
|
||||
const ids = _ids.map((id) => bnToBn(id));
|
||||
|
||||
return ids.length
|
||||
? (api.query.voterList || api.query.bagsList).listBags.multi<Option<PalletBagsListListBag>>(ids).pipe(
|
||||
? query.listBags.multi<Option<PalletBagsListListBag>>(ids).pipe(
|
||||
map((bags) => orderBags(ids, bags))
|
||||
)
|
||||
: of([]);
|
||||
@@ -48,8 +51,10 @@ export function _getIds (instanceId: string, api: DeriveApi): (ids: (BN | number
|
||||
}
|
||||
|
||||
export function all (instanceId: string, api: DeriveApi): () => Observable<Bag[]> {
|
||||
const query = getQueryInterface(api);
|
||||
|
||||
return memo(instanceId, (): Observable<Bag[]> =>
|
||||
(api.query.voterList || api.query.bagsList).listBags.keys<[u64]>().pipe(
|
||||
query.listBags.keys<[u64]>().pipe(
|
||||
switchMap((keys) =>
|
||||
api.derive.bagsList._getIds(keys.map(({ args: [id] }) => id))
|
||||
),
|
||||
|
||||
@@ -12,13 +12,15 @@ import { BehaviorSubject, map, of, switchMap, tap, toArray } from 'rxjs';
|
||||
import { nextTick } from '@polkadot/util';
|
||||
|
||||
import { memo } from '../util';
|
||||
import { getQueryInterface } from './util';
|
||||
|
||||
function traverseLinks (api: DeriveApi, head: AccountId32 | string): Observable<PalletBagsListListNode[]> {
|
||||
const subject = new BehaviorSubject<AccountId32 | string>(head);
|
||||
const query = getQueryInterface(api);
|
||||
|
||||
return subject.pipe(
|
||||
switchMap((account) =>
|
||||
(api.query.voterList || api.query.bagsList).listNodes<Option<PalletBagsListListNode>>(account)
|
||||
query.listNodes<Option<PalletBagsListListNode>>(account)
|
||||
),
|
||||
tap((node: Option<PalletBagsListListNode>): void => {
|
||||
nextTick((): void => {
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { QueryableStorage } from '@polkadot/api-base/types';
|
||||
import type { DeriveApi } from '../types';
|
||||
|
||||
export function getQueryInterface (api: DeriveApi): QueryableStorage<'rxjs'>['voterBagsList'] {
|
||||
return (
|
||||
// latest substrate (latest always first)
|
||||
api.query.voterBagsList ||
|
||||
// previous substrate
|
||||
api.query.bagsList ||
|
||||
// latest polkadot
|
||||
api.query.voterList
|
||||
);
|
||||
}
|
||||
@@ -27,7 +27,7 @@ const checks: Record<string, Avail> = {
|
||||
methods: []
|
||||
},
|
||||
bagsList: {
|
||||
instances: ['voterList', 'bagsList'],
|
||||
instances: ['voterBagsList', 'voterList', 'bagsList'],
|
||||
methods: [],
|
||||
withDetect: true
|
||||
},
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { Option, Vec } from '@polkadot/types';
|
||||
import type { Bytes, Option, u8, u32, Vec } from '@polkadot/types';
|
||||
import type { BlockNumber, Call, Hash, ReferendumIndex, Scheduled } from '@polkadot/types/interfaces';
|
||||
import type { FrameSupportScheduleMaybeHashed, PalletSchedulerScheduledV3 } from '@polkadot/types/lookup';
|
||||
import type { ITuple } from '@polkadot/types/types';
|
||||
import type { FrameSupportPreimagesBounded, PalletSchedulerScheduled } from '@polkadot/types/lookup';
|
||||
import type { Codec, ITuple } from '@polkadot/types/types';
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { DeriveApi, DeriveDispatch, DeriveProposalImage } from '../types';
|
||||
|
||||
import { catchError, combineLatest, map, of, switchMap } from 'rxjs';
|
||||
@@ -14,20 +15,43 @@ import { Enum } from '@polkadot/types';
|
||||
import { isFunction, objectSpread, stringToHex } from '@polkadot/util';
|
||||
|
||||
import { memo } from '../util';
|
||||
import { getImageHashBounded } from './util';
|
||||
|
||||
const DEMOCRACY_ID = stringToHex('democrac');
|
||||
|
||||
// included here for backwards compat
|
||||
interface PalletSchedulerScheduledV3 extends Codec {
|
||||
maybeId: Option<Bytes>;
|
||||
priority: u8;
|
||||
call: FrameSupportScheduleMaybeHashed;
|
||||
maybePeriodic: Option<ITuple<[u32, u32]>>;
|
||||
origin: Codec;
|
||||
}
|
||||
|
||||
// included here for backwards compat
|
||||
interface FrameSupportScheduleMaybeHashed extends Codec {
|
||||
isHash: boolean;
|
||||
isValue: boolean;
|
||||
asValue: Call;
|
||||
asHash: Hash;
|
||||
}
|
||||
|
||||
interface SchedulerInfo {
|
||||
at: BlockNumber;
|
||||
imageHash: Hash;
|
||||
imageHash: HexString;
|
||||
index: ReferendumIndex;
|
||||
}
|
||||
|
||||
function isMaybeHashed (call: FrameSupportScheduleMaybeHashed | Call): call is FrameSupportScheduleMaybeHashed {
|
||||
function isMaybeHashedOrBounded (call: FrameSupportPreimagesBounded | FrameSupportScheduleMaybeHashed | Call): call is FrameSupportScheduleMaybeHashed | FrameSupportPreimagesBounded {
|
||||
// check for enum
|
||||
return call instanceof Enum;
|
||||
}
|
||||
|
||||
function isBounded (call: FrameSupportPreimagesBounded | FrameSupportScheduleMaybeHashed): call is FrameSupportPreimagesBounded {
|
||||
// check for type
|
||||
return (call as FrameSupportPreimagesBounded).isInline || (call as FrameSupportPreimagesBounded).isLegacy || (call as FrameSupportPreimagesBounded).isLookup;
|
||||
}
|
||||
|
||||
function queryQueue (api: DeriveApi): Observable<DeriveDispatch[]> {
|
||||
return api.query.democracy.dispatchQueue<Vec<ITuple<[BlockNumber, Hash, ReferendumIndex]>>>().pipe(
|
||||
switchMap((dispatches) =>
|
||||
@@ -41,14 +65,14 @@ function queryQueue (api: DeriveApi): Observable<DeriveDispatch[]> {
|
||||
dispatches.map(([at, imageHash, index], dispatchIndex): DeriveDispatch => ({
|
||||
at,
|
||||
image: images[dispatchIndex],
|
||||
imageHash,
|
||||
imageHash: getImageHashBounded(imageHash),
|
||||
index
|
||||
}))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
function schedulerEntries (api: DeriveApi): Observable<[BlockNumber[], Option<PalletSchedulerScheduledV3 | Scheduled>[][]]> {
|
||||
function schedulerEntries (api: DeriveApi): Observable<[BlockNumber[], Option<PalletSchedulerScheduled | PalletSchedulerScheduledV3 | Scheduled>[][]]> {
|
||||
// We don't get entries, but rather we get the keys (triggered via finished referendums) and
|
||||
// the subscribe to those keys - this means we pickup when the schedulers actually executes
|
||||
// at a block, the entry for that block will become empty
|
||||
@@ -87,11 +111,13 @@ function queryScheduler (api: DeriveApi): Observable<DeriveDispatch[]> {
|
||||
const id = scheduled.maybeId.unwrap().toHex();
|
||||
|
||||
if (id.startsWith(DEMOCRACY_ID)) {
|
||||
const imageHash = isMaybeHashed(scheduled.call)
|
||||
? scheduled.call.isHash
|
||||
? scheduled.call.asHash
|
||||
: scheduled.call.asValue.args[0] as Hash
|
||||
: scheduled.call.args[0] as Hash;
|
||||
const imageHash = isMaybeHashedOrBounded(scheduled.call)
|
||||
? isBounded(scheduled.call)
|
||||
? getImageHashBounded(scheduled.call)
|
||||
: scheduled.call.isHash
|
||||
? scheduled.call.asHash.toHex()
|
||||
: scheduled.call.asValue.args[0].toHex()
|
||||
: scheduled.call.args[0].toHex();
|
||||
|
||||
result.push({ at, imageHash, index: api.registry.createType('(u64, ReferendumIndex)', id)[1] });
|
||||
}
|
||||
|
||||
@@ -4,25 +4,26 @@
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { Option } from '@polkadot/types';
|
||||
import type { H256 } from '@polkadot/types/interfaces';
|
||||
import type { PalletDemocracyVoteThreshold } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportPreimagesBounded, PalletDemocracyVoteThreshold } from '@polkadot/types/lookup';
|
||||
import type { ITuple } from '@polkadot/types/types';
|
||||
import type { DeriveApi, DeriveProposalExternal } from '../types';
|
||||
|
||||
import { map, of, switchMap } from 'rxjs';
|
||||
|
||||
import { memo } from '../util';
|
||||
import { getImageHashBounded } from './util';
|
||||
|
||||
function withImage (api: DeriveApi, nextOpt: Option<ITuple<[H256, PalletDemocracyVoteThreshold]>>): Observable<DeriveProposalExternal | null> {
|
||||
function withImage (api: DeriveApi, nextOpt: Option<ITuple<[H256 | FrameSupportPreimagesBounded, PalletDemocracyVoteThreshold]>>): Observable<DeriveProposalExternal | null> {
|
||||
if (nextOpt.isNone) {
|
||||
return of(null);
|
||||
}
|
||||
|
||||
const [imageHash, threshold] = nextOpt.unwrap();
|
||||
const [hash, threshold] = nextOpt.unwrap();
|
||||
|
||||
return api.derive.democracy.preimage(imageHash).pipe(
|
||||
return api.derive.democracy.preimage(hash).pipe(
|
||||
map((image): DeriveProposalExternal => ({
|
||||
image,
|
||||
imageHash,
|
||||
imageHash: getImageHashBounded(hash),
|
||||
threshold
|
||||
}))
|
||||
);
|
||||
|
||||
@@ -2,16 +2,19 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { AccountId, Balance, BlockNumber, Hash, PreimageStatus, Proposal } from '@polkadot/types/interfaces';
|
||||
import type { AccountId, Balance, BlockNumber, Call, Hash, PreimageStatus } from '@polkadot/types/interfaces';
|
||||
import type { FrameSupportPreimagesBounded, PalletPreimageRequestStatus } from '@polkadot/types/lookup';
|
||||
import type { Bytes, Option } from '@polkadot/types-codec';
|
||||
import type { ITuple } from '@polkadot/types-codec/types';
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { DeriveApi, DeriveProposalImage } from '../types';
|
||||
|
||||
import { map, of } from 'rxjs';
|
||||
import { map, of, switchMap } from 'rxjs';
|
||||
|
||||
import { isFunction } from '@polkadot/util';
|
||||
import { BN_ZERO, isFunction } from '@polkadot/util';
|
||||
|
||||
import { firstMemo, memo } from '../util';
|
||||
import { getImageHashBounded } from './util';
|
||||
|
||||
type PreimageInfo = [Bytes, AccountId, Balance, BlockNumber];
|
||||
type OldPreimage = ITuple<PreimageInfo>;
|
||||
@@ -21,10 +24,10 @@ function isDemocracyPreimage (api: DeriveApi, imageOpt: Option<OldPreimage> | Op
|
||||
}
|
||||
|
||||
function constructProposal (api: DeriveApi, [bytes, proposer, balance, at]: PreimageInfo): DeriveProposalImage {
|
||||
let proposal: Proposal | undefined;
|
||||
let proposal: Call | undefined;
|
||||
|
||||
try {
|
||||
proposal = api.registry.createType('Proposal', bytes.toU8a(true));
|
||||
proposal = api.registry.createType('Call', bytes.toU8a(true));
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
@@ -52,25 +55,81 @@ function parseDemocracy (api: DeriveApi, imageOpt: Option<OldPreimage> | Option<
|
||||
return constructProposal(api, imageOpt.unwrap());
|
||||
}
|
||||
|
||||
function parseImage (api: DeriveApi, [proposalHash, status, bytes]: [HexString, PalletPreimageRequestStatus | null, Bytes | null]): DeriveProposalImage | undefined {
|
||||
if (!status) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const [proposer, balance] = status.isUnrequested
|
||||
? status.asUnrequested.deposit
|
||||
: status.asRequested.deposit.unwrapOrDefault();
|
||||
let proposal: Call | undefined;
|
||||
|
||||
if (bytes) {
|
||||
try {
|
||||
proposal = api.registry.createType('Call', bytes.toU8a(true));
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
return { at: BN_ZERO, balance, proposal, proposalHash, proposer };
|
||||
}
|
||||
|
||||
function getDemocracyImages (api: DeriveApi, hashes: (Hash | Uint8Array | string)[]): Observable<(DeriveProposalImage | undefined)[]> {
|
||||
return api.query.democracy.preimages.multi(hashes).pipe(
|
||||
return api.query.democracy.preimages.multi<Option<PreimageStatus>>(hashes).pipe(
|
||||
map((images): (DeriveProposalImage | undefined)[] =>
|
||||
images.map((imageOpt) => parseDemocracy(api, imageOpt))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
export function preimages (instanceId: string, api: DeriveApi): (hashes: (Hash | Uint8Array | string)[]) => Observable<(DeriveProposalImage | undefined)[]> {
|
||||
return memo(instanceId, (hashes: (Hash | Uint8Array | string)[]): Observable<(DeriveProposalImage | undefined)[]> =>
|
||||
function getImages (api: DeriveApi, bounded: FrameSupportPreimagesBounded[]): Observable<(DeriveProposalImage | undefined)[]> {
|
||||
const hashes = bounded.map((b) => getImageHashBounded(b));
|
||||
|
||||
return api.query.preimage.statusFor.multi(hashes).pipe(
|
||||
switchMap((optStatus) => {
|
||||
const statuses = optStatus.map((o) => o.unwrapOr(null));
|
||||
const keys = statuses
|
||||
.map((s, i) =>
|
||||
s
|
||||
? s.isRequested
|
||||
? [hashes[i], s.asRequested.len.unwrapOr(0)]
|
||||
: [hashes[i], s.asUnrequested.len]
|
||||
: null
|
||||
)
|
||||
.filter((p) => !!p);
|
||||
|
||||
return api.query.preimage.preimageFor.multi(keys).pipe(
|
||||
map((optBytes) => {
|
||||
let ptr = -1;
|
||||
|
||||
return statuses
|
||||
.map((s, i): [HexString, PalletPreimageRequestStatus | null, Bytes | null] =>
|
||||
s
|
||||
? [hashes[i], s, optBytes[++ptr].unwrapOr(null)]
|
||||
: [hashes[i], null, null]
|
||||
)
|
||||
.map((v) => parseImage(api, v));
|
||||
})
|
||||
);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
export function preimages (instanceId: string, api: DeriveApi): (hashes: (Hash | Uint8Array | string | FrameSupportPreimagesBounded)[]) => Observable<(DeriveProposalImage | undefined)[]> {
|
||||
return memo(instanceId, (hashes: (Hash | Uint8Array | string | FrameSupportPreimagesBounded)[]): Observable<(DeriveProposalImage | undefined)[]> =>
|
||||
hashes.length
|
||||
? isFunction(api.query.democracy.preimages)
|
||||
? getDemocracyImages(api, hashes)
|
||||
: of([])
|
||||
? getDemocracyImages(api, hashes as string[])
|
||||
: isFunction(api.query.preimage.preimageFor)
|
||||
? getImages(api, hashes as FrameSupportPreimagesBounded[])
|
||||
: of([])
|
||||
: of([])
|
||||
);
|
||||
}
|
||||
|
||||
export const preimage = firstMemo(
|
||||
(api: DeriveApi, hash: Hash | Uint8Array | string) =>
|
||||
(api: DeriveApi, hash: Hash | Uint8Array | string | FrameSupportPreimagesBounded) =>
|
||||
api.derive.democracy.preimages([hash])
|
||||
);
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { Option, Vec } from '@polkadot/types';
|
||||
import type { AccountId, Balance, Hash, PropIndex } from '@polkadot/types/interfaces';
|
||||
import type { FrameSupportPreimagesBounded } from '@polkadot/types/lookup';
|
||||
import type { ITuple } from '@polkadot/types/types';
|
||||
import type { DeriveApi, DeriveProposal, DeriveProposalImage } from '../types';
|
||||
|
||||
@@ -12,11 +13,12 @@ import { combineLatest, map, of, switchMap } from 'rxjs';
|
||||
import { isFunction, objectSpread } from '@polkadot/util';
|
||||
|
||||
import { memo } from '../util';
|
||||
import { getImageHashBounded } from './util';
|
||||
|
||||
type DepositorsNew = Option<ITuple<[Vec<AccountId>, Balance]>>;
|
||||
type DepositorsOld = Option<ITuple<[Balance, Vec<AccountId>]>>;
|
||||
type Depositors = DepositorsNew | DepositorsOld;
|
||||
type Proposals = ITuple<[PropIndex, Hash, AccountId]>[];
|
||||
type Proposals = ITuple<[PropIndex, Hash | FrameSupportPreimagesBounded, AccountId]>[];
|
||||
type Result = [Proposals, (DeriveProposalImage | undefined)[], Depositors[]];
|
||||
|
||||
function isNewDepositors (depositors: ITuple<[Vec<AccountId>, Balance]> | ITuple<[Balance, Vec<AccountId>]>): depositors is ITuple<[Vec<AccountId>, Balance]> {
|
||||
@@ -30,13 +32,13 @@ function parse ([proposals, images, optDepositors]: Result): DeriveProposal[] {
|
||||
.filter(([, , proposer], index): boolean =>
|
||||
!!(optDepositors[index]?.isSome) && !proposer.isEmpty
|
||||
)
|
||||
.map(([index, imageHash, proposer], proposalIndex): DeriveProposal => {
|
||||
.map(([index, hash, proposer], proposalIndex): DeriveProposal => {
|
||||
const depositors = optDepositors[proposalIndex].unwrap();
|
||||
|
||||
return objectSpread(
|
||||
{
|
||||
image: images[proposalIndex],
|
||||
imageHash,
|
||||
imageHash: getImageHashBounded(hash),
|
||||
index,
|
||||
proposer
|
||||
},
|
||||
@@ -56,7 +58,7 @@ export function proposals (instanceId: string, api: DeriveApi): () => Observable
|
||||
? combineLatest([
|
||||
of(proposals),
|
||||
api.derive.democracy.preimages(
|
||||
proposals.map(([, hash]) => hash)
|
||||
proposals.map(([, hash]) => hash as unknown as Uint8Array)
|
||||
),
|
||||
api.query.democracy.depositOf.multi(
|
||||
proposals.map(([index]) => index)
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { Option, Vec } from '@polkadot/types';
|
||||
import type { AccountId, ReferendumInfoTo239, Vote } from '@polkadot/types/interfaces';
|
||||
import type { PalletDemocracyReferendumInfo, PalletDemocracyVoteVoting } from '@polkadot/types/lookup';
|
||||
import type { AccountId, Hash, ReferendumInfoTo239, Vote } from '@polkadot/types/interfaces';
|
||||
import type { PalletDemocracyReferendumInfo, PalletDemocracyReferendumStatus, PalletDemocracyVoteVoting } from '@polkadot/types/lookup';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { DeriveApi, DeriveBalancesAccount, DeriveReferendum, DeriveReferendumVote, DeriveReferendumVotes } from '../types';
|
||||
|
||||
@@ -13,7 +13,7 @@ import { combineLatest, map, of, switchMap } from 'rxjs';
|
||||
import { isFunction, objectSpread } from '@polkadot/util';
|
||||
|
||||
import { memo } from '../util';
|
||||
import { calcVotes, getStatus } from './util';
|
||||
import { calcVotes, getImageHash, getStatus } from './util';
|
||||
|
||||
type VotingDelegating = PalletDemocracyVoteVoting['asDelegating'];
|
||||
type VotingDirect = PalletDemocracyVoteVoting['asDirect'];
|
||||
@@ -133,10 +133,13 @@ export function _referendumInfo (instanceId: string, api: DeriveApi): (index: BN
|
||||
const status = getStatus(info);
|
||||
|
||||
return status
|
||||
? api.derive.democracy.preimage(status.proposalHash).pipe(
|
||||
? api.derive.democracy.preimage(
|
||||
(status as PalletDemocracyReferendumStatus).proposal ||
|
||||
(status as unknown as { proposalHash: Hash }).proposalHash
|
||||
).pipe(
|
||||
map((image): DeriveReferendum => ({
|
||||
image,
|
||||
imageHash: status.proposalHash,
|
||||
imageHash: getImageHash(status),
|
||||
index: api.registry.createType('ReferendumIndex', index),
|
||||
status
|
||||
}))
|
||||
@@ -157,7 +160,7 @@ export function referendumsInfo (instanceId: string, api: DeriveApi): (ids: BN[]
|
||||
)
|
||||
),
|
||||
map((infos) =>
|
||||
infos.filter((referendum): referendum is DeriveReferendum => !!referendum)
|
||||
infos.filter((r): r is DeriveReferendum => !!r)
|
||||
)
|
||||
)
|
||||
: of([])
|
||||
|
||||
@@ -2,12 +2,13 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Vec } from '@polkadot/types';
|
||||
import type { AccountId, Balance, BlockNumber, Hash, PropIndex, Proposal, ReferendumIndex, ReferendumInfoTo239, Vote } from '@polkadot/types/interfaces';
|
||||
import type { AccountId, Balance, Call, Hash, PropIndex, ReferendumIndex, ReferendumInfoTo239, Vote } from '@polkadot/types/interfaces';
|
||||
import type { PalletDemocracyReferendumStatus, PalletDemocracyVoteThreshold } from '@polkadot/types/lookup';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
|
||||
export interface AtBlock {
|
||||
at: BlockNumber;
|
||||
at: BN;
|
||||
}
|
||||
|
||||
export interface DeriveDemocracyLock {
|
||||
@@ -22,13 +23,15 @@ export interface DeriveDemocracyLock {
|
||||
|
||||
export interface DeriveProposalImage extends AtBlock {
|
||||
balance: Balance;
|
||||
proposal?: Proposal;
|
||||
proposal?: Call;
|
||||
proposalHash?: HexString;
|
||||
proposalLen?: number;
|
||||
proposer: AccountId;
|
||||
}
|
||||
|
||||
export interface DeriveDispatch extends AtBlock {
|
||||
index: ReferendumIndex;
|
||||
imageHash: Hash;
|
||||
imageHash: HexString;
|
||||
image?: DeriveProposalImage;
|
||||
}
|
||||
|
||||
@@ -43,14 +46,14 @@ export interface DeriveProposal {
|
||||
|
||||
export interface DeriveProposalExternal {
|
||||
image?: DeriveProposalImage;
|
||||
imageHash: Hash;
|
||||
imageHash: HexString;
|
||||
threshold: PalletDemocracyVoteThreshold;
|
||||
}
|
||||
|
||||
export interface DeriveReferendum {
|
||||
index: ReferendumIndex;
|
||||
image?: DeriveProposalImage;
|
||||
imageHash: Hash;
|
||||
imageHash: HexString;
|
||||
status: PalletDemocracyReferendumStatus | ReferendumInfoTo239;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ReferendumInfoTo239, Tally } from '@polkadot/types/interfaces';
|
||||
import type { PalletDemocracyReferendumInfo, PalletDemocracyReferendumStatus, PalletDemocracyVoteThreshold } from '@polkadot/types/lookup';
|
||||
import type { Hash, ReferendumInfoTo239, Tally } from '@polkadot/types/interfaces';
|
||||
import type { FrameSupportPreimagesBounded, PalletDemocracyReferendumInfo, PalletDemocracyReferendumStatus, PalletDemocracyVoteThreshold } from '@polkadot/types/lookup';
|
||||
import type { Option } from '@polkadot/types-codec';
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { DeriveReferendum, DeriveReferendumVote, DeriveReferendumVotes, DeriveReferendumVoteState } from '../types';
|
||||
|
||||
import { BN, bnSqrt, objectSpread } from '@polkadot/util';
|
||||
@@ -139,3 +140,21 @@ export function getStatus (info: Option<PalletDemocracyReferendumInfo | Referend
|
||||
// done, we don't include it here... only currently active
|
||||
: null;
|
||||
}
|
||||
|
||||
export function getImageHashBounded (hash: Hash | FrameSupportPreimagesBounded): HexString {
|
||||
return (hash as FrameSupportPreimagesBounded).isLegacy
|
||||
? (hash as FrameSupportPreimagesBounded).asLegacy.hash_.toHex()
|
||||
: (hash as FrameSupportPreimagesBounded).isLookup
|
||||
? (hash as FrameSupportPreimagesBounded).asLookup.hash_.toHex()
|
||||
// for inline, use the actual Bytes hash
|
||||
: (hash as FrameSupportPreimagesBounded).isInline
|
||||
? (hash as FrameSupportPreimagesBounded).asInline.hash.toHex()
|
||||
: hash.toHex();
|
||||
}
|
||||
|
||||
export function getImageHash (status: PalletDemocracyReferendumStatus | ReferendumInfoTo239): HexString {
|
||||
return getImageHashBounded(
|
||||
(status as PalletDemocracyReferendumStatus).proposal ||
|
||||
(status as ReferendumInfoTo239).proposalHash
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '9.2.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '9.9.2' };
|
||||
|
||||
@@ -47,9 +47,12 @@ function calculateUnlocking (api: DeriveApi, stakingLedger: PalletStakingStaking
|
||||
|
||||
function redeemableSum (api: DeriveApi, stakingLedger: PalletStakingStakingLedger | undefined, sessionInfo: DeriveSessionInfo): Balance {
|
||||
return api.registry.createType('Balance', (stakingLedger?.unlocking || [] as PalletStakingUnlockChunk[]).reduce((total, { era, value }): BN => {
|
||||
return sessionInfo.activeEra.gte(era.unwrap())
|
||||
? total.iadd(value.unwrap())
|
||||
: total;
|
||||
// aligns with https://github.com/paritytech/substrate/blob/fdfdc73f9e64dc47934b72eb9af3e1989e4ba699/frame/staking/src/pallet/mod.rs#L973-L975
|
||||
// (ensure currentEra >= era passed, as per https://github.com/paritytech/substrate/blob/fdfdc73f9e64dc47934b72eb9af3e1989e4ba699/frame/staking/src/lib.rs#L477-L494)
|
||||
// NOTE: Previously we used activeEra >= era, which is incorrect for the last session
|
||||
return era.unwrap().gt(sessionInfo.currentEra)
|
||||
? total
|
||||
: total.iadd(value.unwrap());
|
||||
}, new BN(0)));
|
||||
}
|
||||
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { Option, u32 } from '@polkadot/types';
|
||||
import type { ActiveEraInfo, EraIndex } from '@polkadot/types/interfaces';
|
||||
import type { u32 } from '@polkadot/types';
|
||||
import type { EraIndex } from '@polkadot/types/interfaces';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { DeriveApi } from '../types';
|
||||
|
||||
import { map } from 'rxjs';
|
||||
import { combineLatest, map, of } from 'rxjs';
|
||||
|
||||
import { BN_ONE, BN_ZERO } from '@polkadot/util';
|
||||
|
||||
@@ -15,9 +15,11 @@ import { memo } from '../util';
|
||||
|
||||
export function erasHistoric (instanceId: string, api: DeriveApi): (withActive?: boolean) => Observable<EraIndex[]> {
|
||||
return memo(instanceId, (withActive?: boolean): Observable<EraIndex[]> =>
|
||||
api.queryMulti<[Option<ActiveEraInfo>, u32]>([
|
||||
api.query.staking.activeEra,
|
||||
api.query.staking.historyDepth
|
||||
combineLatest([
|
||||
api.query.staking.activeEra(),
|
||||
api.consts.staking.historyDepth
|
||||
? of(api.consts.staking.historyDepth)
|
||||
: api.query.staking.historyDepth<u32>()
|
||||
]).pipe(
|
||||
map(([activeEraOpt, historyDepth]): EraIndex[] => {
|
||||
const result: EraIndex[] = [];
|
||||
|
||||
@@ -99,14 +99,14 @@ export const query = firstMemo(
|
||||
|
||||
export function queryMulti (instanceId: string, api: DeriveApi): (accountIds: (Uint8Array | string)[], flags: StakingQueryFlags) => Observable<DeriveStakingQuery[]> {
|
||||
return memo(instanceId, (accountIds: (Uint8Array | string)[], flags: StakingQueryFlags): Observable<DeriveStakingQuery[]> =>
|
||||
accountIds.length
|
||||
? api.derive.session.indexes().pipe(
|
||||
switchMap(({ activeEra }): Observable<DeriveStakingQuery[]> => {
|
||||
const stashIds = accountIds.map((accountId) => api.registry.createType('AccountId', accountId));
|
||||
api.derive.session.indexes().pipe(
|
||||
switchMap(({ activeEra }): Observable<DeriveStakingQuery[]> => {
|
||||
const stashIds = accountIds.map((a) => api.registry.createType('AccountId', a));
|
||||
|
||||
return getBatch(api, activeEra, stashIds, flags);
|
||||
})
|
||||
)
|
||||
: of([])
|
||||
return stashIds.length
|
||||
? getBatch(api, activeEra, stashIds, flags)
|
||||
: of([]);
|
||||
})
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
+19
-19
@@ -20,29 +20,29 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.1",
|
||||
"version": "9.9.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/api-augment": "9.2.1",
|
||||
"@polkadot/api-base": "9.2.1",
|
||||
"@polkadot/api-derive": "9.2.1",
|
||||
"@polkadot/keyring": "^10.1.4",
|
||||
"@polkadot/rpc-augment": "9.2.1",
|
||||
"@polkadot/rpc-core": "9.2.1",
|
||||
"@polkadot/rpc-provider": "9.2.1",
|
||||
"@polkadot/types": "9.2.1",
|
||||
"@polkadot/types-augment": "9.2.1",
|
||||
"@polkadot/types-codec": "9.2.1",
|
||||
"@polkadot/types-create": "9.2.1",
|
||||
"@polkadot/types-known": "9.2.1",
|
||||
"@polkadot/util": "^10.1.4",
|
||||
"@polkadot/util-crypto": "^10.1.4",
|
||||
"@babel/runtime": "^7.20.1",
|
||||
"@polkadot/api-augment": "9.9.2",
|
||||
"@polkadot/api-base": "9.9.2",
|
||||
"@polkadot/api-derive": "9.9.2",
|
||||
"@polkadot/keyring": "^10.1.14",
|
||||
"@polkadot/rpc-augment": "9.9.2",
|
||||
"@polkadot/rpc-core": "9.9.2",
|
||||
"@polkadot/rpc-provider": "9.9.2",
|
||||
"@polkadot/types": "9.9.2",
|
||||
"@polkadot/types-augment": "9.9.2",
|
||||
"@polkadot/types-codec": "9.9.2",
|
||||
"@polkadot/types-create": "9.9.2",
|
||||
"@polkadot/types-known": "9.9.2",
|
||||
"@polkadot/util": "^10.1.14",
|
||||
"@polkadot/util-crypto": "^10.1.14",
|
||||
"eventemitter3": "^4.0.7",
|
||||
"rxjs": "^7.5.6"
|
||||
"rxjs": "^7.5.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api-augment": "9.2.1",
|
||||
"@polkadot/types-support": "9.2.1"
|
||||
"@polkadot/api-augment": "9.9.2",
|
||||
"@polkadot/types-support": "9.9.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import type { StorageKey, Text, u64 } from '@polkadot/types';
|
||||
import type { Call, Hash, RuntimeVersion } from '@polkadot/types/interfaces';
|
||||
import type { DecoratedMeta } from '@polkadot/types/metadata/decorate/types';
|
||||
import type { StorageEntry } from '@polkadot/types/primitive/types';
|
||||
import type { AnyFunction, AnyTuple, CallFunction, Codec, DefinitionCallNamed, DefinitionRpc, DefinitionRpcSub, DefinitionsCall, DefinitionsCallEntry, DetectCodec, IMethod, IStorageKey, Registry, RegistryError, RegistryTypes } from '@polkadot/types/types';
|
||||
import type { AnyFunction, AnyJson, AnyTuple, CallFunction, Codec, DefinitionCallNamed, DefinitionRpc, DefinitionRpcSub, DefinitionsCall, DefinitionsCallEntry, DetectCodec, IMethod, IStorageKey, Registry, RegistryError, RegistryTypes } from '@polkadot/types/types';
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { SubmittableExtrinsic } from '../submittable/types';
|
||||
import type { ApiDecoration, ApiInterfaceRx, ApiOptions, ApiTypes, AugmentedQuery, DecoratedErrors, DecoratedEvents, DecoratedRpc, DecorateMethod, GenericStorageEntryFunction, PaginationOptions, QueryableConsts, QueryableStorage, QueryableStorageEntry, QueryableStorageEntryAt, QueryableStorageMulti, QueryableStorageMultiArg, SubmittableExtrinsicFunction, SubmittableExtrinsics } from '../types';
|
||||
@@ -19,7 +19,7 @@ import { BehaviorSubject, combineLatest, from, map, of, switchMap, tap, toArray
|
||||
import { getAvailableDerives } from '@polkadot/api-derive';
|
||||
import { memo, RpcCore } from '@polkadot/rpc-core';
|
||||
import { WsProvider } from '@polkadot/rpc-provider';
|
||||
import { expandMetadata, Metadata, typeDefinitions, TypeRegistry } from '@polkadot/types';
|
||||
import { expandMetadata, GenericExtrinsic, Metadata, typeDefinitions, TypeRegistry } from '@polkadot/types';
|
||||
import { getSpecRuntime } from '@polkadot/types-known';
|
||||
import { arrayChunk, arrayFlatten, assertReturn, BN, compactStripLength, lazyMethod, lazyMethods, logger, nextTick, objectSpread, stringCamelCase, stringUpperFirst, u8aConcatStrict, u8aToHex } from '@polkadot/util';
|
||||
import { blake2AsHex } from '@polkadot/util-crypto';
|
||||
@@ -84,7 +84,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
|
||||
protected _extrinsics?: SubmittableExtrinsics<ApiType>;
|
||||
|
||||
protected _extrinsicType = 4; // latest extrinsic version
|
||||
protected _extrinsicType = GenericExtrinsic.LATEST_EXTRINSIC_VERSION;
|
||||
|
||||
protected _genesisHash?: Hash;
|
||||
|
||||
@@ -160,12 +160,16 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
|
||||
this.#instanceId = `${++instanceCounter}`;
|
||||
this.#registry = options.source?.registry || options.registry || new TypeRegistry();
|
||||
this._rx.callAt = (blockHash: Uint8Array | string, knownVersion?: RuntimeVersion) =>
|
||||
from(this.at(blockHash, knownVersion)).pipe(map((a) => a.rx.call));
|
||||
this._rx.queryAt = (blockHash: Uint8Array | string, knownVersion?: RuntimeVersion) =>
|
||||
from(this.at(blockHash, knownVersion)).pipe(map((a) => a.rx.query));
|
||||
this._rx.registry = this.#registry;
|
||||
|
||||
const thisProvider = options.source
|
||||
? options.source._rpcCore.provider.clone()
|
||||
? options.source._rpcCore.provider.isClonable
|
||||
? options.source._rpcCore.provider.clone()
|
||||
: options.source._rpcCore.provider
|
||||
: (options.provider || new WsProvider());
|
||||
|
||||
this._decorateMethod = decorateMethod;
|
||||
@@ -399,15 +403,23 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
const [k, { method, section }] = allKnown[i];
|
||||
|
||||
if (hasResults && !exposed.includes(k) && k !== 'rpc_methods') {
|
||||
if ((this._rpc as Record<string, Record<string, unknown>>)[section]) {
|
||||
delete (this._rpc as Record<string, Record<string, unknown>>)[section][method];
|
||||
delete (this._rx.rpc as Record<string, Record<string, unknown>>)[section][method];
|
||||
if ((this._rpc as unknown as Record<string, Record<string, unknown>>)[section]) {
|
||||
delete (this._rpc as unknown as Record<string, Record<string, unknown>>)[section][method];
|
||||
delete (this._rx.rpc as unknown as Record<string, Record<string, unknown>>)[section][method];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected _decorateRpc<ApiType extends ApiTypes> (rpc: RpcCore & RpcInterface, decorateMethod: DecorateMethod<ApiType>, input: Partial<DecoratedRpc<ApiType, RpcInterface>> = {}): DecoratedRpc<ApiType, RpcInterface> {
|
||||
private _rpcSubmitter<ApiType extends ApiTypes> (decorateMethod: DecorateMethod<ApiType>): DecoratedRpc<ApiType, RpcInterface> {
|
||||
const method = (method: string, ...params: any[]) => {
|
||||
return from(this._rpcCore.provider.send<AnyJson>(method, params));
|
||||
};
|
||||
|
||||
return decorateMethod(method) as DecoratedRpc<ApiType, RpcInterface>;
|
||||
}
|
||||
|
||||
protected _decorateRpc<ApiType extends ApiTypes> (rpc: RpcCore & RpcInterface, decorateMethod: DecorateMethod<ApiType>, input: Partial<DecoratedRpc<ApiType, RpcInterface>> = this._rpcSubmitter(decorateMethod)): DecoratedRpc<ApiType, RpcInterface> {
|
||||
const out: Record<string, Record<string, unknown>> = input;
|
||||
|
||||
const decorateFn = (section: string, method: string): unknown => {
|
||||
@@ -444,7 +456,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
}
|
||||
}
|
||||
|
||||
return out as DecoratedRpc<ApiType, RpcInterface>;
|
||||
return out as unknown as DecoratedRpc<ApiType, RpcInterface>;
|
||||
}
|
||||
|
||||
// add all definition entries
|
||||
@@ -789,11 +801,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
key.method === creator.method;
|
||||
|
||||
decorated.key = (...args: unknown[]): string =>
|
||||
u8aToHex(compactStripLength(creator(
|
||||
creator.meta.type.isPlain
|
||||
? undefined
|
||||
: args
|
||||
))[1]);
|
||||
u8aToHex(compactStripLength(creator(...args))[1]);
|
||||
|
||||
decorated.keyPrefix = (...keys: unknown[]): string =>
|
||||
u8aToHex(creator.keyPrefix(...keys));
|
||||
@@ -842,21 +850,29 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
let valueIdx = 0;
|
||||
let valueObs: Observable<Codec[]>;
|
||||
|
||||
// if we don't have queue entries yet,
|
||||
// or the current queue has fired (see from below),
|
||||
// or the current queue has the max entries,
|
||||
// then we create a new queue
|
||||
if (queueIdx === -1 || !queue[queueIdx] || queue[queueIdx][1].length === PAGE_SIZE_Q) {
|
||||
queueIdx++;
|
||||
|
||||
valueObs = from(
|
||||
// Defer to the next tick - this aligns with nextTick in @polkadot/util,
|
||||
// however since we return a value here, we don't re-use what is there
|
||||
Promise
|
||||
.resolve()
|
||||
.then((): [StorageEntry, unknown[]][] => {
|
||||
// we delay the execution until the next tick, this allows
|
||||
// any queries made in this timeframe to be added to the same
|
||||
// queue for a single query
|
||||
new Promise<[StorageEntry, unknown[]][]>((resolve): void => {
|
||||
nextTick((): void => {
|
||||
// get all the calls in this instance, resolve with it
|
||||
// and then clear the queue so we don't add more
|
||||
// (anyhting after this will be added to a new queue)
|
||||
const calls = queue[queueIdx][1];
|
||||
|
||||
delete queue[queueIdx];
|
||||
|
||||
return calls;
|
||||
})
|
||||
resolve(calls);
|
||||
});
|
||||
})
|
||||
).pipe(
|
||||
switchMap((calls) => query(calls))
|
||||
);
|
||||
@@ -870,6 +886,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
}
|
||||
|
||||
return valueObs.pipe(
|
||||
// return the single value at this index
|
||||
map((values) => values[valueIdx])
|
||||
);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import { cryptoWaitReady } from '@polkadot/util-crypto';
|
||||
import { Decorate } from './Decorate';
|
||||
|
||||
const KEEPALIVE_INTERVAL = 10000;
|
||||
const WITH_VERSION_SHORTCUT = false;
|
||||
|
||||
const l = logger('api/init');
|
||||
|
||||
@@ -206,8 +207,13 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
||||
// get the runtime version, either on-chain or via an known upgrade history
|
||||
const [firstVersion, lastVersion] = getUpgradeVersion(this._genesisHash, header.number);
|
||||
const version = this.registry.createType('RuntimeVersionPartial',
|
||||
(firstVersion && (lastVersion || firstVersion.specVersion.eq(this._runtimeVersion.specVersion)))
|
||||
? { specName: this._runtimeVersion.specName, specVersion: firstVersion.specVersion }
|
||||
WITH_VERSION_SHORTCUT && (
|
||||
firstVersion && (
|
||||
lastVersion ||
|
||||
firstVersion.specVersion.eq(this._runtimeVersion.specVersion)
|
||||
)
|
||||
)
|
||||
? { apis: firstVersion.apis, specName: this._runtimeVersion.specName, specVersion: firstVersion.specVersion }
|
||||
: await firstValueFrom(this._rpcCore.state.getRuntimeVersion.raw(header.parentHash))
|
||||
);
|
||||
|
||||
@@ -265,7 +271,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
|
||||
|
||||
for (let s = 0; s < sections.length; s++) {
|
||||
const section = sections[s];
|
||||
const methods = Object.keys((source.rpc as Record<string, Record<string, unknown>>)[section]);
|
||||
const methods = Object.keys((source.rpc as unknown as Record<string, Record<string, unknown>>)[section]);
|
||||
|
||||
for (let m = 0; m < methods.length; m++) {
|
||||
rpcs.push(`${section}_${methods[m]}`);
|
||||
|
||||
@@ -38,7 +38,7 @@ function consts (api: ApiPromise): void {
|
||||
api.consts.foo.bar,
|
||||
api.consts.balances.existentialDeposit.toNumber(),
|
||||
api.consts.balances.existentialDeposit.meta.docs.map((s) => s.toString()).join(''),
|
||||
api.consts.system.blockWeights.maxBlock.divn(123).toNumber()
|
||||
api.consts.system.blockWeights.maxBlock.refTime.toNumber()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -215,6 +215,9 @@ async function rpc (api: ApiPromise): Promise<void> {
|
||||
await api.rpc.chain.subscribeNewHeads.raw((result: Uint8Array): void => {
|
||||
console.log(result);
|
||||
});
|
||||
|
||||
// deprecated methods
|
||||
await api.rpc.state.getPairs('123');
|
||||
}
|
||||
|
||||
function types (api: ApiPromise): void {
|
||||
@@ -266,7 +269,7 @@ async function tx (api: ApiPromise, pairs: TestKeyringMap): Promise<void> {
|
||||
});
|
||||
|
||||
// it allows for query & then using the submittable
|
||||
const second = api.tx.democracy.second(123, 5);
|
||||
const second = api.tx.democracy.second(123);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
await second.signAndSend('123', (result) => console.log(result));
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '9.2.1' };
|
||||
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '9.9.2' };
|
||||
|
||||
@@ -155,4 +155,14 @@ describe('ApiPromise', (): void => {
|
||||
await api.disconnect();
|
||||
});
|
||||
});
|
||||
|
||||
describe('api.rpc(...)', (): void => {
|
||||
it('allows sending rpc call', async (): Promise<void> => {
|
||||
const { api } = await createTransfer();
|
||||
|
||||
expect(await api.rpc('dev_echo', 'hello', 'world')).toEqual(['hello', 'world']);
|
||||
|
||||
await api.disconnect();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -100,8 +100,20 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, blockHas
|
||||
this.#ignoreStatusCb = apiType === 'rxjs';
|
||||
}
|
||||
|
||||
public get hasDryRun (): boolean {
|
||||
return isFunction(api.rpc.system?.dryRun);
|
||||
}
|
||||
|
||||
public get hasPaymentInfo (): boolean {
|
||||
return isFunction(api.call.transactionPaymentApi?.queryInfo);
|
||||
}
|
||||
|
||||
// dry run an extrinsic
|
||||
public dryRun (account: AddressOrPair, optionsOrHash?: Partial<SignerOptions> | Uint8Array | string): SubmittableDryRunResult<ApiType> {
|
||||
if (!this.hasDryRun) {
|
||||
throw new Error('The system.dryRun RPC call is not available in your environment');
|
||||
}
|
||||
|
||||
if (blockHash || isString(optionsOrHash) || isU8a(optionsOrHash)) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
||||
return decorateMethod(
|
||||
@@ -120,11 +132,21 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, blockHas
|
||||
|
||||
// calculate the payment info for this transaction (if signed and submitted)
|
||||
public paymentInfo (account: AddressOrPair, optionsOrHash?: Partial<SignerOptions> | Uint8Array | string): SubmittablePaymentResult<ApiType> {
|
||||
if (!this.hasPaymentInfo) {
|
||||
throw new Error('The transactionPaymentApi.queryInfo runtime call is not available in your environment');
|
||||
}
|
||||
|
||||
if (blockHash || isString(optionsOrHash) || isU8a(optionsOrHash)) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
||||
return decorateMethod(
|
||||
(): Observable<RuntimeDispatchInfo> =>
|
||||
api.rpc.payment.queryInfo(this.toHex(), blockHash || optionsOrHash as string)
|
||||
api.callAt(blockHash || optionsOrHash as string).pipe(
|
||||
switchMap((callAt): Observable<RuntimeDispatchInfo> => {
|
||||
const u8a = this.toU8a();
|
||||
|
||||
return callAt.transactionPaymentApi.queryInfo(u8a, u8a.length);
|
||||
})
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -140,12 +162,11 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, blockHas
|
||||
// setup our options (same way as in signAndSend)
|
||||
const eraOptions = makeEraOptions(api, this.registry, allOptions, signingInfo);
|
||||
const signOptions = makeSignOptions(api, eraOptions, {});
|
||||
const u8a = this.isSigned
|
||||
? api.tx(this).signFake(address, signOptions).toU8a()
|
||||
: this.signFake(address, signOptions).toU8a();
|
||||
|
||||
return api.rpc.payment.queryInfo(
|
||||
this.isSigned
|
||||
? api.tx(this).signFake(address, signOptions).toHex()
|
||||
: this.signFake(address, signOptions).toHex()
|
||||
);
|
||||
return api.call.transactionPaymentApi.queryInfo(u8a, u8a.length);
|
||||
})
|
||||
)
|
||||
)();
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# @polkadot/api-augment
|
||||
# @polkadot/rpc-augment
|
||||
|
||||
Generated augmentation.
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.1",
|
||||
"version": "9.9.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/rpc-core": "9.2.1",
|
||||
"@polkadot/types": "9.2.1",
|
||||
"@polkadot/types-codec": "9.2.1",
|
||||
"@polkadot/util": "^10.1.4"
|
||||
"@babel/runtime": "^7.20.1",
|
||||
"@polkadot/rpc-core": "9.9.2",
|
||||
"@polkadot/types": "9.9.2",
|
||||
"@polkadot/types-codec": "9.9.2",
|
||||
"@polkadot/util": "^10.1.14"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import type { BeefySignedCommitment } from '@polkadot/types/interfaces/beefy';
|
||||
import type { BlockHash } from '@polkadot/types/interfaces/chain';
|
||||
import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
|
||||
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||
import type { CodeUploadRequest, CodeUploadResult, ContractCallRequest, ContractExecResult, ContractInstantiateResult, InstantiateRequest } from '@polkadot/types/interfaces/contracts';
|
||||
import type { CodeUploadRequest, CodeUploadResult, ContractCallRequest, ContractExecResult, ContractInstantiateResult, InstantiateRequestV1 } from '@polkadot/types/interfaces/contracts';
|
||||
import type { BlockStats } from '@polkadot/types/interfaces/dev';
|
||||
import type { CreatedBlock } from '@polkadot/types/interfaces/engine';
|
||||
import type { EthAccount, EthCallRequest, EthFeeHistory, EthFilter, EthFilterChanges, EthLog, EthReceipt, EthRichBlock, EthSubKind, EthSubParams, EthSyncStatus, EthTransaction, EthTransactionRequest, EthWork } from '@polkadot/types/interfaces/eth';
|
||||
@@ -23,7 +23,7 @@ import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
||||
import type { EncodedFinalityProofs, JustificationNotification, ReportedRoundStates } from '@polkadot/types/interfaces/grandpa';
|
||||
import type { MmrLeafBatchProof, MmrLeafProof } from '@polkadot/types/interfaces/mmr';
|
||||
import type { StorageKind } from '@polkadot/types/interfaces/offchain';
|
||||
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import type { FeeDetails, RuntimeDispatchInfoV1 } from '@polkadot/types/interfaces/payment';
|
||||
import type { RpcMethods } from '@polkadot/types/interfaces/rpc';
|
||||
import type { AccountId, BlockNumber, H160, H256, H64, Hash, Header, Index, Justification, KeyValue, SignedBlock, StorageData } from '@polkadot/types/interfaces/runtime';
|
||||
import type { MigrationStatusResult, ReadProof, RuntimeVersion, TraceBlockResponse } from '@polkadot/types/interfaces/state';
|
||||
@@ -142,22 +142,27 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
|
||||
};
|
||||
contracts: {
|
||||
/**
|
||||
* @deprecated Use the runtime interface `api.call.contractsApi.call` instead
|
||||
* Executes a call to a contract
|
||||
**/
|
||||
call: AugmentedRpc<(callRequest: ContractCallRequest | { origin?: any; dest?: any; value?: any; gasLimit?: any; storageDepositLimit?: any; inputData?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractExecResult>>;
|
||||
/**
|
||||
* @deprecated Use the runtime interface `api.call.contractsApi.getStorage` instead
|
||||
* Returns the value under a specified storage key in a contract
|
||||
**/
|
||||
getStorage: AugmentedRpc<(address: AccountId | string | Uint8Array, key: H256 | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||
/**
|
||||
* @deprecated Use the runtime interface `api.call.contractsApi.instantiate` instead
|
||||
* Instantiate a new contract
|
||||
**/
|
||||
instantiate: AugmentedRpc<(request: InstantiateRequest | { origin?: any; value?: any; gasLimit?: any; storageDepositLimit?: any; code?: any; data?: any; salt?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractInstantiateResult>>;
|
||||
instantiate: AugmentedRpc<(request: InstantiateRequestV1 | { origin?: any; value?: any; gasLimit?: any; code?: any; data?: any; salt?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractInstantiateResult>>;
|
||||
/**
|
||||
* @deprecated Not available in newer versions of the contracts interfaces
|
||||
* Returns the projected time a given contract will be able to sustain paying its rent
|
||||
**/
|
||||
rentProjection: AugmentedRpc<(address: AccountId | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Option<BlockNumber>>>;
|
||||
/**
|
||||
* @deprecated Use the runtime interface `api.call.contractsApi.uploadCode` instead
|
||||
* Upload new code without instantiating a contract from it
|
||||
**/
|
||||
uploadCode: AugmentedRpc<(uploadRequest: CodeUploadRequest | { origin?: any; code?: any; storageDepositLimit?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<CodeUploadResult>>;
|
||||
@@ -402,13 +407,15 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
|
||||
};
|
||||
payment: {
|
||||
/**
|
||||
* @deprecated Use `api.call.transactionPaymentApi.queryFeeDetails` instead
|
||||
* Query the detailed fee of a given encoded extrinsic
|
||||
**/
|
||||
queryFeeDetails: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<FeeDetails>>;
|
||||
/**
|
||||
* @deprecated Use `api.call.transactionPaymentApi.queryInfo` instead
|
||||
* Retrieves the fee information for an encoded extrinsic
|
||||
**/
|
||||
queryInfo: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<RuntimeDispatchInfo>>;
|
||||
queryInfo: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<RuntimeDispatchInfoV1>>;
|
||||
};
|
||||
rpc: {
|
||||
/**
|
||||
@@ -442,6 +449,7 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
|
||||
**/
|
||||
getChildStorageSize: AugmentedRpc<(childStorageKey: StorageKey | string | Uint8Array | any, childDefinition: StorageKey | string | Uint8Array | any, childType: u32 | AnyNumber | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<u64>>;
|
||||
/**
|
||||
* @deprecated Use `api.rpc.state.getKeysPaged` to retrieve keys
|
||||
* Retrieves the keys with a certain prefix
|
||||
**/
|
||||
getKeys: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<StorageKey>>>;
|
||||
@@ -454,6 +462,7 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
|
||||
**/
|
||||
getMetadata: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<Metadata>>;
|
||||
/**
|
||||
* @deprecated Use `api.rpc.state.getKeysPaged` to retrieve keys
|
||||
* Returns the keys with prefix, leave empty to get all the keys (deprecated: Use getKeysPaged)
|
||||
**/
|
||||
getPairs: AugmentedRpc<(prefix: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<KeyValue>>>;
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '9.2.1' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '9.9.2' };
|
||||
|
||||
@@ -20,18 +20,18 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.1",
|
||||
"version": "9.9.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/rpc-augment": "9.2.1",
|
||||
"@polkadot/rpc-provider": "9.2.1",
|
||||
"@polkadot/types": "9.2.1",
|
||||
"@polkadot/util": "^10.1.4",
|
||||
"rxjs": "^7.5.6"
|
||||
"@babel/runtime": "^7.20.1",
|
||||
"@polkadot/rpc-augment": "9.9.2",
|
||||
"@polkadot/rpc-provider": "9.9.2",
|
||||
"@polkadot/types": "9.9.2",
|
||||
"@polkadot/util": "^10.1.14",
|
||||
"rxjs": "^7.5.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^10.1.4",
|
||||
"@polkadot/rpc-augment": "9.2.1"
|
||||
"@polkadot/keyring": "^10.1.14",
|
||||
"@polkadot/rpc-augment": "9.9.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '9.2.1' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '9.9.2' };
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { Observable } from 'rxjs';
|
||||
|
||||
import { catchError, distinctUntilChanged, publishReplay, refCount, tap } from 'rxjs';
|
||||
|
||||
import { logger, stringify } from '@polkadot/util';
|
||||
import { stringify } from '@polkadot/util';
|
||||
|
||||
import { refCountDelay } from './refCountDelay';
|
||||
|
||||
@@ -17,18 +17,17 @@ interface Options {
|
||||
skipTimeout?: boolean;
|
||||
}
|
||||
|
||||
const l = logger('drr');
|
||||
|
||||
const CMP = (a: unknown, b: unknown): boolean =>
|
||||
stringify({ t: a }) === stringify({ t: b });
|
||||
|
||||
const ERR = (error: Error): Observable<never> => {
|
||||
l.error(error.message);
|
||||
function CMP (a: unknown, b: unknown): boolean {
|
||||
return stringify({ t: a }) === stringify({ t: b });
|
||||
}
|
||||
|
||||
function ERR (error: Error): Observable<never> {
|
||||
throw error;
|
||||
};
|
||||
}
|
||||
|
||||
const NOOP = (): void => undefined;
|
||||
function NOOP (): void {
|
||||
// empty
|
||||
}
|
||||
|
||||
/**
|
||||
* Shorthand for distinctUntilChanged(), publishReplay(1) and refCount().
|
||||
@@ -36,14 +35,16 @@ const NOOP = (): void => undefined;
|
||||
* @ignore
|
||||
* @internal
|
||||
*/
|
||||
export const drr = ({ delay, skipChange = false, skipTimeout = false }: Options = {}): DrrResult => <T> (source$: Observable<T>): Observable<T> =>
|
||||
source$.pipe(
|
||||
catchError(ERR),
|
||||
skipChange
|
||||
? tap(NOOP)
|
||||
: distinctUntilChanged<T>(CMP),
|
||||
publishReplay(1),
|
||||
skipTimeout
|
||||
? refCount()
|
||||
: refCountDelay(delay)
|
||||
);
|
||||
export function drr ({ delay, skipChange = false, skipTimeout = false }: Options = {}): DrrResult {
|
||||
return <T> (source$: Observable<T>): Observable<T> =>
|
||||
source$.pipe(
|
||||
catchError(ERR),
|
||||
skipChange
|
||||
? tap(NOOP)
|
||||
: distinctUntilChanged<T>(CMP),
|
||||
publishReplay(1),
|
||||
skipTimeout
|
||||
? refCount()
|
||||
: refCountDelay(delay)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ yarn add @polkadot/rpc-provider
|
||||
WebSocket Initialization -
|
||||
|
||||
```javascript
|
||||
import { WsProvider } from '@polkadot/rpc-provider/ws';
|
||||
import { WsProvider } from '@polkadot/rpc-provider';
|
||||
|
||||
// this is the actual default endpoint
|
||||
const provider = new WsProvider('ws://127.0.0.1:9944');
|
||||
@@ -44,19 +44,23 @@ console.log('latest block Hash', hash);
|
||||
|
||||
Instantiating a Provider for the Polkadot Relay Chain:
|
||||
```javascript
|
||||
import { ScProvider, WellKnownChain } from '@polkadot/rpc-provider/substrate-connect';
|
||||
import { ScProvider } from '@polkadot/rpc-provider';
|
||||
|
||||
const provider = new ScProvider(ScProvider.WellKnownChain.polkadot);
|
||||
|
||||
const provider = new ScProvider(WellKnownChain.polkadot);
|
||||
await provider.connect();
|
||||
|
||||
const version = await provider.send('chain_getBlockHash', []);
|
||||
```
|
||||
|
||||
Instantiating a Provider for a Polkadot parachain:
|
||||
```javascript
|
||||
import { ScProvider, WellKnownChain } from '@polkadot/rpc-provider/substrate-connect';
|
||||
import { ScProvider } from '@polkadot/rpc-provider';
|
||||
|
||||
const polkadotProvider = new ScProvider(WellKnownChain.polkadot);
|
||||
const polkadotProvider = new ScProvider(ScProvider.WellKnownChain.polkadot);
|
||||
const parachainProvider = new ScProvider(parachainSpec, polkadotProvider);
|
||||
|
||||
await parachainProvider.connect();
|
||||
|
||||
const version = await parachainProvider.send('chain_getBlockHash', []);
|
||||
```
|
||||
|
||||
@@ -20,19 +20,19 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "9.2.1",
|
||||
"version": "9.9.2",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.18.9",
|
||||
"@polkadot/keyring": "^10.1.4",
|
||||
"@polkadot/types": "9.2.1",
|
||||
"@polkadot/types-support": "9.2.1",
|
||||
"@polkadot/util": "^10.1.4",
|
||||
"@polkadot/util-crypto": "^10.1.4",
|
||||
"@polkadot/x-fetch": "^10.1.4",
|
||||
"@polkadot/x-global": "^10.1.4",
|
||||
"@polkadot/x-ws": "^10.1.4",
|
||||
"@substrate/connect": "0.7.10",
|
||||
"@babel/runtime": "^7.20.1",
|
||||
"@polkadot/keyring": "^10.1.14",
|
||||
"@polkadot/types": "9.9.2",
|
||||
"@polkadot/types-support": "9.9.2",
|
||||
"@polkadot/util": "^10.1.14",
|
||||
"@polkadot/util-crypto": "^10.1.14",
|
||||
"@polkadot/x-fetch": "^10.1.14",
|
||||
"@polkadot/x-global": "^10.1.14",
|
||||
"@polkadot/x-ws": "^10.1.14",
|
||||
"@substrate/connect": "0.7.17",
|
||||
"eventemitter3": "^4.0.7",
|
||||
"mock-socket": "^9.1.5",
|
||||
"nock": "^13.2.9"
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
|
||||
export { HttpProvider } from './http';
|
||||
export { packageInfo } from './packageInfo';
|
||||
export { WsProvider } from './ws';
|
||||
export { ScProvider } from './substrate-connect';
|
||||
export { WsProvider } from './ws';
|
||||
|
||||
@@ -97,6 +97,13 @@ export class HttpProvider implements ProviderInterface {
|
||||
return this.#stats;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary `true` when this provider supports clone()
|
||||
*/
|
||||
public get isClonable (): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Whether the node is connected or not.
|
||||
* @return {boolean} true if connected
|
||||
|
||||
@@ -72,7 +72,9 @@ export class MockProvider implements ProviderInterface {
|
||||
system_name: () => 'mockClient',
|
||||
system_properties: () => ({ ss58Format: 42 }),
|
||||
system_upgradedToTripleRefCount: () => this.registry.createType('bool', true),
|
||||
system_version: () => '9.8.7'
|
||||
system_version: () => '9.8.7',
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, sort-keys
|
||||
dev_echo: (_, params: any) => params
|
||||
};
|
||||
|
||||
public subscriptions: MockStateSubscriptions = SUBSCRIPTIONS.reduce((subs, name): MockStateSubscriptions => {
|
||||
@@ -114,6 +116,10 @@ export class MockProvider implements ProviderInterface {
|
||||
}
|
||||
}
|
||||
|
||||
public get isClonable (): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
public get isConnected (): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '9.2.1' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '9.9.2' };
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright 2017-2022 @polkadot/rpc-provider authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { stringify } from '@polkadot/util';
|
||||
|
||||
export interface SmoldotHealth {
|
||||
isSyncing: boolean
|
||||
peers: number
|
||||
@@ -105,10 +107,7 @@ class InnerChecker {
|
||||
#isSyncing = false;
|
||||
#nextRequestId = 0;
|
||||
|
||||
constructor (
|
||||
healthCallback: (health: SmoldotHealth) => void,
|
||||
requestToSmoldot: (request: string) => void
|
||||
) {
|
||||
constructor (healthCallback: (health: SmoldotHealth) => void, requestToSmoldot: (request: string) => void) {
|
||||
this.#healthCallback = healthCallback;
|
||||
this.#requestToSmoldot = requestToSmoldot;
|
||||
}
|
||||
@@ -124,12 +123,12 @@ class InnerChecker {
|
||||
}
|
||||
|
||||
if (parsedRequest.id) {
|
||||
const newId = 'extern:' + JSON.stringify(parsedRequest.id);
|
||||
const newId = 'extern:' + stringify(parsedRequest.id);
|
||||
|
||||
parsedRequest.id = newId;
|
||||
}
|
||||
|
||||
this.#requestToSmoldot(JSON.stringify(parsedRequest));
|
||||
this.#requestToSmoldot(stringify(parsedRequest));
|
||||
};
|
||||
|
||||
responsePassThrough = (jsonRpcResponse: string): string | null => {
|
||||
@@ -220,7 +219,7 @@ class InnerChecker {
|
||||
parsedResponse.id = newId;
|
||||
}
|
||||
|
||||
return JSON.stringify(parsedResponse);
|
||||
return stringify(parsedResponse);
|
||||
};
|
||||
|
||||
update = (startNow: boolean): void => {
|
||||
@@ -241,12 +240,11 @@ class InnerChecker {
|
||||
}
|
||||
|
||||
// Actual request starting.
|
||||
this.#currentHealthCheckId = 'health-checker:'.concat(
|
||||
this.#nextRequestId.toString()
|
||||
);
|
||||
this.#currentHealthCheckId = `health-checker:${this.#nextRequestId}`;
|
||||
this.#nextRequestId += 1;
|
||||
|
||||
this.#requestToSmoldot(
|
||||
JSON.stringify({
|
||||
stringify({
|
||||
id: this.#currentHealthCheckId,
|
||||
jsonrpc: '2.0',
|
||||
method: 'system_health',
|
||||
@@ -284,12 +282,11 @@ class InnerChecker {
|
||||
throw new Error('Internal error in health checker');
|
||||
}
|
||||
|
||||
this.#currentSubunsubRequestId = 'health-checker:'.concat(
|
||||
this.#nextRequestId.toString()
|
||||
);
|
||||
this.#currentSubunsubRequestId = `health-checker:${this.#nextRequestId}`;
|
||||
this.#nextRequestId += 1;
|
||||
|
||||
this.#requestToSmoldot(
|
||||
JSON.stringify({
|
||||
stringify({
|
||||
id: this.#currentSubunsubRequestId,
|
||||
jsonrpc: '2.0',
|
||||
method: 'chain_subscribeNewHeads',
|
||||
@@ -303,12 +300,11 @@ class InnerChecker {
|
||||
throw new Error('Internal error in health checker');
|
||||
}
|
||||
|
||||
this.#currentSubunsubRequestId = 'health-checker:'.concat(
|
||||
this.#nextRequestId.toString()
|
||||
);
|
||||
this.#currentSubunsubRequestId = `health-checker:${this.#nextRequestId}`;
|
||||
this.#nextRequestId += 1;
|
||||
|
||||
this.#requestToSmoldot(
|
||||
JSON.stringify({
|
||||
stringify({
|
||||
id: this.#currentSubunsubRequestId,
|
||||
jsonrpc: '2.0',
|
||||
method: 'chain_unsubscribeNewHeads',
|
||||
@@ -332,11 +328,9 @@ export class HealthCheckError extends Error {
|
||||
return this.#cause;
|
||||
}
|
||||
|
||||
constructor (
|
||||
response: unknown,
|
||||
message = 'Got error response asking for system health'
|
||||
) {
|
||||
constructor (response: unknown, message = 'Got error response asking for system health') {
|
||||
super(message);
|
||||
|
||||
this.#cause = response;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,349 +0,0 @@
|
||||
// Copyright 2017-2022 @polkadot/rpc-provider authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Config as ScConfig } from '@substrate/connect';
|
||||
import type { JsonRpcResponse, ProviderInterface, ProviderInterfaceCallback, ProviderInterfaceEmitCb, ProviderInterfaceEmitted } from '../types';
|
||||
|
||||
import { Chain, createScClient, ScClient, WellKnownChain } from '@substrate/connect';
|
||||
import EventEmitter from 'eventemitter3';
|
||||
|
||||
import { isError, objectSpread } from '@polkadot/util';
|
||||
|
||||
import { RpcCoder } from '../coder';
|
||||
import { healthChecker } from './Health';
|
||||
|
||||
type ResponseCallback = (response: string | Error) => void
|
||||
|
||||
// These methods have been taken from:
|
||||
// https://github.com/paritytech/smoldot/blob/17425040ddda47d539556eeaf62b88c4240d1d42/src/json_rpc/methods.rs#L338-L462
|
||||
// It's important to take into account that smoldot is adding support to the new
|
||||
// json-rpc-interface https://paritytech.github.io/json-rpc-interface-spec/
|
||||
// However, at the moment this list only includes methods that belong to the "old" API
|
||||
const subscriptionUnsubscriptionMethods = new Map<string, string>([
|
||||
['author_submitAndWatchExtrinsic', 'author_unwatchExtrinsic'],
|
||||
['chain_subscribeAllHeads', 'chain_unsubscribeAllHeads'],
|
||||
['chain_subscribeFinalizedHeads', 'chain_unsubscribeFinalizedHeads'],
|
||||
['chain_subscribeFinalisedHeads', 'chain_subscribeFinalisedHeads'],
|
||||
['chain_subscribeNewHeads', 'chain_unsubscribeNewHeads'],
|
||||
['chain_subscribeNewHead', 'chain_unsubscribeNewHead'],
|
||||
['chain_subscribeRuntimeVersion', 'chain_unsubscribeRuntimeVersion'],
|
||||
['subscribe_newHead', 'unsubscribe_newHead'],
|
||||
['state_subscribeRuntimeVersion', 'state_unsubscribeRuntimeVersion'],
|
||||
['state_subscribeStorage', 'state_unsubscribeStorage']
|
||||
]);
|
||||
|
||||
const wellKnownChains = new Set(Object.values(WellKnownChain));
|
||||
const scClients = new WeakMap<ScProvider, ScClient>();
|
||||
|
||||
export { WellKnownChain };
|
||||
|
||||
export class ScProvider implements ProviderInterface {
|
||||
readonly #coder: RpcCoder = new RpcCoder();
|
||||
readonly #spec: string | WellKnownChain;
|
||||
readonly #sharedSandbox?: ScProvider;
|
||||
readonly #subscriptions: Map<string, [ResponseCallback, { unsubscribeMethod: string; id: string | number }]> = new Map();
|
||||
readonly #requests: Map<number, ResponseCallback> = new Map();
|
||||
readonly #eventemitter: EventEmitter = new EventEmitter();
|
||||
#chain: Promise<Chain> | null = null;
|
||||
#isChainReady = false;
|
||||
|
||||
static WellKnownChain = WellKnownChain;
|
||||
|
||||
public constructor (spec: string | WellKnownChain, sharedSandbox?: ScProvider) {
|
||||
this.#spec = spec;
|
||||
this.#sharedSandbox = sharedSandbox;
|
||||
}
|
||||
|
||||
public get hasSubscriptions (): boolean {
|
||||
// Indicates that subscriptions are supported
|
||||
return true;
|
||||
}
|
||||
|
||||
public get isConnected (): boolean {
|
||||
return !!this.#chain && this.#isChainReady;
|
||||
}
|
||||
|
||||
public clone (): ProviderInterface {
|
||||
throw new Error('clone() is not supported.');
|
||||
}
|
||||
|
||||
// Config details can be found in @substrate/connect repo following the link:
|
||||
// https://github.com/paritytech/substrate-connect/blob/main/packages/connect/src/connector/index.ts
|
||||
async connect (config?: ScConfig, checkerFactory = healthChecker): Promise<void> {
|
||||
if (this.isConnected) {
|
||||
throw new Error('Already connected!');
|
||||
}
|
||||
|
||||
// it could happen that after emitting `disconnected` due to the fact taht
|
||||
// smoldot is syncing, the consumer tries to reconnect after a certain amount
|
||||
// of time... In which case we want to make sure that we don't create a new
|
||||
// chain.
|
||||
if (this.#chain) {
|
||||
await this.#chain;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.#sharedSandbox && !this.#sharedSandbox.isConnected) {
|
||||
await this.#sharedSandbox.connect();
|
||||
}
|
||||
|
||||
const client = this.#sharedSandbox
|
||||
? scClients.get(this.#sharedSandbox)
|
||||
: createScClient(config);
|
||||
|
||||
if (!client) {
|
||||
throw new Error('Unkown ScProvider!');
|
||||
}
|
||||
|
||||
scClients.set(this, client);
|
||||
|
||||
const hc = checkerFactory();
|
||||
|
||||
const onResponse = (res: string): void => {
|
||||
const hcRes = hc.responsePassThrough(res);
|
||||
|
||||
if (!hcRes) {
|
||||
return;
|
||||
}
|
||||
|
||||
const response = JSON.parse(hcRes) as JsonRpcResponse;
|
||||
let decodedResponse: string | Error;
|
||||
|
||||
try {
|
||||
decodedResponse = this.#coder.decodeResponse(response) as string;
|
||||
} catch (e) {
|
||||
decodedResponse = e as Error;
|
||||
}
|
||||
|
||||
// It's not a subscription message, but rather a standar RPC response
|
||||
if (response.params?.subscription === undefined || !response.method) {
|
||||
return this.#requests.get(response.id)?.(decodedResponse);
|
||||
}
|
||||
|
||||
// We are dealing with a subscription message
|
||||
const subscriptionId = `${response.method}::${response.params.subscription}`;
|
||||
|
||||
const callback = this.#subscriptions.get(subscriptionId)?.[0];
|
||||
|
||||
callback?.(decodedResponse);
|
||||
};
|
||||
|
||||
const addChain = wellKnownChains.has(this.#spec as WellKnownChain)
|
||||
? client.addWellKnownChain
|
||||
: client.addChain;
|
||||
|
||||
this.#chain = addChain(this.#spec as WellKnownChain, onResponse).then((chain) => {
|
||||
hc.setSendJsonRpc(chain.sendJsonRpc);
|
||||
|
||||
this.#isChainReady = false;
|
||||
|
||||
const cleanup = () => {
|
||||
// If there are any callbacks left, we have to reject/error them.
|
||||
// Otherwise, that would cause a memory leak.
|
||||
const disconnectionError = new Error('Disconnected');
|
||||
|
||||
this.#requests.forEach((cb) => cb(disconnectionError));
|
||||
this.#subscriptions.forEach(([cb]) => cb(disconnectionError));
|
||||
this.#subscriptions.clear();
|
||||
};
|
||||
|
||||
const staleSubscriptions: {
|
||||
unsubscribeMethod: string
|
||||
id: number | string
|
||||
}[] = [];
|
||||
|
||||
const killStaleSubscriptions = () => {
|
||||
if (staleSubscriptions.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const stale = staleSubscriptions.pop();
|
||||
|
||||
if (!stale) {
|
||||
throw new Error('Unable to get stale subscription');
|
||||
}
|
||||
|
||||
const { id, unsubscribeMethod } = stale;
|
||||
|
||||
Promise
|
||||
.race([
|
||||
this.send(unsubscribeMethod, [id]).catch(() => undefined),
|
||||
new Promise((resolve) => setTimeout(resolve, 500))
|
||||
])
|
||||
.then(killStaleSubscriptions)
|
||||
.catch(() => undefined);
|
||||
};
|
||||
|
||||
hc.start((health) => {
|
||||
const isReady =
|
||||
!health.isSyncing && (health.peers > 0 || !health.shouldHavePeers);
|
||||
|
||||
// if it's the same as before, then nothing has changed and we are done
|
||||
if (this.#isChainReady === isReady) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.#isChainReady = isReady;
|
||||
|
||||
if (!isReady) {
|
||||
// If we've reached this point, that means that the chain used to be "ready"
|
||||
// and now we are about to emit `disconnected`.
|
||||
//
|
||||
// This will cause the PolkadotJs API think that the connection is
|
||||
// actually dead. In reality the smoldot chain is not dead, of course.
|
||||
// However, we have to cleanup all the existing callbacks because when
|
||||
// the smoldot chain stops syncing, then we will emit `connected` and
|
||||
// the PolkadotJs API will try to re-create the previous
|
||||
// subscriptions and requests. Although, now is not a good moment
|
||||
// to be sending unsubscription messages to the smoldot chain, we
|
||||
// should wait until is no longer syncing to send the unsubscription
|
||||
// messages from the stale subscriptions of the previous connection.
|
||||
//
|
||||
// That's why -before we perform the cleanup of `this.#subscriptions`-
|
||||
// we keep the necessary information that we will need later on to
|
||||
// kill the stale subscriptions.
|
||||
[...this.#subscriptions.values()].forEach((s) => {
|
||||
staleSubscriptions.push(s[1]);
|
||||
});
|
||||
cleanup();
|
||||
} else {
|
||||
killStaleSubscriptions();
|
||||
}
|
||||
|
||||
this.#eventemitter.emit(isReady ? 'connected' : 'disconnected');
|
||||
});
|
||||
|
||||
return objectSpread({}, chain, {
|
||||
remove: () => {
|
||||
hc.stop();
|
||||
chain.remove();
|
||||
cleanup();
|
||||
},
|
||||
sendJsonRpc: hc.sendJsonRpc.bind(hc)
|
||||
});
|
||||
});
|
||||
|
||||
try {
|
||||
await this.#chain;
|
||||
} catch (e) {
|
||||
this.#chain = null;
|
||||
this.#eventemitter.emit('error', e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
async disconnect (): Promise<void> {
|
||||
if (!this.#chain) {
|
||||
return;
|
||||
}
|
||||
|
||||
const chain = await this.#chain;
|
||||
|
||||
this.#chain = null;
|
||||
this.#isChainReady = false;
|
||||
|
||||
try {
|
||||
chain.remove();
|
||||
} catch (_) {}
|
||||
|
||||
this.#eventemitter.emit('disconnected');
|
||||
}
|
||||
|
||||
public on (type: ProviderInterfaceEmitted, sub: ProviderInterfaceEmitCb): () => void {
|
||||
// It's possible. Although, quite unlikely, that by the time that polkadot
|
||||
// subscribes to the `connected` event, the Provider is already connected.
|
||||
// In that case, we must emit to let the consumer know that we are connected.
|
||||
if (type === 'connected' && this.isConnected) {
|
||||
sub();
|
||||
}
|
||||
|
||||
this.#eventemitter.on(type, sub);
|
||||
|
||||
return (): void => {
|
||||
this.#eventemitter.removeListener(type, sub);
|
||||
};
|
||||
}
|
||||
|
||||
public async send<T = any> (method: string, params: unknown[]): Promise<T> {
|
||||
if (!this.isConnected || !this.#chain) {
|
||||
throw new Error('Provider is not connected');
|
||||
}
|
||||
|
||||
const chain = await this.#chain;
|
||||
const [id, json] = this.#coder.encodeJson(method, params);
|
||||
|
||||
const result = new Promise<T>((resolve, reject): void => {
|
||||
this.#requests.set(id, (response) => {
|
||||
(isError(response) ? reject : resolve)(response as unknown as T);
|
||||
});
|
||||
|
||||
try {
|
||||
chain.sendJsonRpc(json);
|
||||
} catch (e) {
|
||||
this.#chain = null;
|
||||
|
||||
try {
|
||||
chain.remove();
|
||||
} catch (_) {}
|
||||
|
||||
this.#eventemitter.emit('error', e);
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
return await result;
|
||||
} finally {
|
||||
// let's ensure that once the Promise is resolved/rejected, then we remove
|
||||
// remove its entry from the internal #requests
|
||||
this.#requests.delete(id);
|
||||
}
|
||||
}
|
||||
|
||||
public async subscribe (type: string, method: string, params: any[], callback: ProviderInterfaceCallback): Promise<number | string> {
|
||||
if (!subscriptionUnsubscriptionMethods.has(method)) {
|
||||
throw new Error(`Unsupported subscribe method: ${method}`);
|
||||
}
|
||||
|
||||
const id = await this.send<number | string>(method, params);
|
||||
const subscriptionId = `${type}::${id}`;
|
||||
|
||||
const cb = (response: Error | string) => {
|
||||
if (response instanceof Error) {
|
||||
callback(response, undefined);
|
||||
} else {
|
||||
callback(null, response);
|
||||
}
|
||||
};
|
||||
|
||||
const unsubscribeMethod = subscriptionUnsubscriptionMethods.get(method);
|
||||
|
||||
if (!unsubscribeMethod) {
|
||||
throw new Error('Invalid unsubscribe method found');
|
||||
}
|
||||
|
||||
this.#subscriptions.set(subscriptionId, [cb, { id, unsubscribeMethod }]);
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
public unsubscribe (type: string, method: string, id: number | string): Promise<boolean> {
|
||||
if (!this.isConnected) {
|
||||
throw new Error('Provider is not connected');
|
||||
}
|
||||
|
||||
const subscriptionId = `${type}::${id}`;
|
||||
|
||||
if (!this.#subscriptions.has(subscriptionId)) {
|
||||
return Promise.reject(
|
||||
new Error(`Unable to find active subscription=${subscriptionId}`)
|
||||
);
|
||||
}
|
||||
|
||||
this.#subscriptions.delete(subscriptionId);
|
||||
|
||||
return this.send(method, [id]);
|
||||
}
|
||||
}
|
||||
export type ScProviderClass = typeof ScProvider
|
||||
export type Config = ScConfig
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user