Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
967f5e980a | ||
|
|
00a27efaee | ||
|
|
a7163fb1ba | ||
|
|
4c6dd53c3b | ||
|
|
61199ffb2b | ||
|
|
dbfb03760c | ||
|
|
c9b1fcdb0a | ||
|
|
29953edd24 | ||
|
|
96a23bda50 | ||
|
|
09a8d80144 | ||
|
|
5637579879 | ||
|
|
448ce0a76e | ||
|
|
a6a062378d | ||
|
|
40c78f95d2 | ||
|
|
b0e135c5ca | ||
|
|
22218bd9b0 | ||
|
|
149b7d9ee6 | ||
|
|
9a7b91a6f5 | ||
|
|
80b165ba34 | ||
|
|
95a4512530 | ||
|
|
15a315dede | ||
|
|
32548a34a4 | ||
|
|
50142d7e63 | ||
|
|
1ed6117e3f | ||
|
|
a392025a15 | ||
|
|
fbeb478602 | ||
|
|
2cdd24445c | ||
|
|
e545f6f2b3 | ||
|
|
1aa2b7e1ff | ||
|
|
677d0c9969 | ||
|
|
775fff5333 | ||
|
|
9345a18de0 | ||
|
|
a4256396ee | ||
|
|
776600ef00 | ||
|
|
1a31043cc4 | ||
|
|
66159955ac | ||
|
|
03c725f637 | ||
|
|
e5708a7e7e | ||
|
|
fb5ce83f74 | ||
|
|
6c3bd2f408 | ||
|
|
66e01afe26 | ||
|
|
71f9bdf368 | ||
|
|
7af9330026 | ||
|
|
d5aff171e4 | ||
|
|
543de63af8 | ||
|
|
cdcdf589dd | ||
|
|
1330b58afd | ||
|
|
0b2ec65e88 | ||
|
|
8840e29063 | ||
|
|
b9925b569d | ||
|
|
2640b65be9 | ||
|
|
d64a0ca295 | ||
|
|
79eeed3f9a | ||
|
|
d154b535e6 | ||
|
|
87c2690fc2 | ||
|
|
8f0ca37c60 | ||
|
|
f7dd4a3552 | ||
|
|
abcad05a91 | ||
|
|
ba188dcc0d | ||
|
|
ae2422f350 | ||
|
|
576efc0239 | ||
|
|
111540177f | ||
|
|
43ee566669 | ||
|
|
39299188b0 | ||
|
|
5d13bfb925 | ||
|
|
c759ff0c12 | ||
|
|
0cc34dff85 | ||
|
|
1682a8f096 | ||
|
|
be572aabf0 | ||
|
|
7a6d19d241 | ||
|
|
f4a590d7f8 | ||
|
|
771e5f3bcf | ||
|
|
1ba427356d | ||
|
|
aad497e9d2 | ||
|
|
95fc2b2c99 | ||
|
|
b7b707249b | ||
|
|
ce95e305f3 | ||
|
|
4ea793f55e | ||
|
|
bb0b365dfe | ||
|
|
756f817d93 | ||
|
|
df4bda1fc8 | ||
|
|
a98e9543b8 | ||
|
|
84abaff414 | ||
|
|
29d5460cdd | ||
|
|
e2d0de4f6c | ||
|
|
8e32777efa | ||
|
|
39b1de326c | ||
|
|
6fb6c40c7d | ||
|
|
badb10bdd9 | ||
|
|
235a7b1aa9 | ||
|
|
b7d65fb506 | ||
|
|
8eb0524fed | ||
|
|
bab50b2d74 | ||
|
|
bb75b42273 | ||
|
|
949e429d04 | ||
|
|
0b1c20efd7 | ||
|
|
0536998766 | ||
|
|
22651eb4b8 | ||
|
|
48414bdb34 | ||
|
|
2ff6a85fb3 | ||
|
|
8be1f337a8 | ||
|
|
2c7056da25 | ||
|
|
b53c22d6d3 | ||
|
|
17f316b7c7 | ||
|
|
b44fcc90b2 | ||
|
|
b4e477a8c1 | ||
|
|
4b921c8a55 | ||
|
|
e53231b70a | ||
|
|
afd1db58ac | ||
|
|
63ba84a641 | ||
|
|
044aecbfc3 | ||
|
|
e573c26df3 | ||
|
|
31e7de31f3 | ||
|
|
7cd9c16eae | ||
|
|
2b1a7da446 | ||
|
|
9399c8d24f | ||
|
|
798e5fcc78 | ||
|
|
d8ad237b00 | ||
|
|
550cb10766 | ||
|
|
a44108c3f3 | ||
|
|
2f28ea0ea8 | ||
|
|
488d078b9c | ||
|
|
ba384cee78 | ||
|
|
4f95f33cbb | ||
|
|
368cb8314c | ||
|
|
c01896d24f | ||
|
|
983043bd1e | ||
|
|
9c2ed6297a | ||
|
|
8a7fee5903 | ||
|
|
b0e8a8512a | ||
|
|
f83d23d0f6 | ||
|
|
9dfb5cb237 | ||
|
|
8c87b16924 | ||
|
|
0d5dce002d | ||
|
|
4d0c777a8f | ||
|
|
d63108a4b4 | ||
|
|
5898ac335e | ||
|
|
f108d16d1b | ||
|
|
32f1495993 | ||
|
|
2527497e4a | ||
|
|
e50209da0d | ||
|
|
cccd512d70 | ||
|
|
1db2136a3d | ||
|
|
466485d5aa | ||
|
|
c9ea333add | ||
|
|
dca62cf3ba | ||
|
|
2d9e667d01 | ||
|
|
67679f34e9 | ||
|
|
d646fa03af | ||
|
|
6c33e98553 | ||
|
|
e8cdbf9e80 | ||
|
|
5016e12ae4 | ||
|
|
ac09179768 | ||
|
|
8cc1663bd8 | ||
|
|
34d090c9b3 | ||
|
|
cb1d13e04c | ||
|
|
022d79c4cd | ||
|
|
ed079a6acb | ||
|
|
01d023d141 | ||
|
|
0b03f73975 | ||
|
|
e4cae64187 | ||
|
|
f13989d712 | ||
|
|
05c3f12cd7 | ||
|
|
9f6f33844a | ||
|
|
895f82920d | ||
|
|
06fa4aa6eb | ||
|
|
1e5002fb5e | ||
|
|
8be52dec13 | ||
|
|
8fcda8cd54 | ||
|
|
d08c306887 | ||
|
|
eb6b0232c3 | ||
|
|
e5fbaeb7cd | ||
|
|
8e61ea1b8b | ||
|
|
9fe202a4d3 | ||
|
|
6e62d03652 | ||
|
|
49dc66f7d4 | ||
|
|
22320f9995 | ||
|
|
7603bad434 | ||
|
|
e82f0f35ad | ||
|
|
ae0aa14eb8 | ||
|
|
4875bb9990 | ||
|
|
a0308dd25a | ||
|
|
edb06d971a | ||
|
|
271a4d8fd7 | ||
|
|
a71e5ad95c | ||
|
|
edcdb70e8a | ||
|
|
17357f6b99 | ||
|
|
c596a8cb51 | ||
|
|
bdf13b10e5 | ||
|
|
519a12f19a | ||
|
|
beffc7b754 | ||
|
|
d5ae7031cd | ||
|
|
8aff13b827 | ||
|
|
a23b3f953b | ||
|
|
1249c46019 | ||
|
|
2aaf52bb92 | ||
|
|
3372898f82 | ||
|
|
ed2f512cfc | ||
|
|
00147df500 | ||
|
|
3b0c8887d7 | ||
|
|
16452233b2 | ||
|
|
5bf87262bc | ||
|
|
b8e01fd674 | ||
|
|
f8378ba0f7 | ||
|
|
afc105400c | ||
|
|
cca1f10563 | ||
|
|
6cdbbf5372 | ||
|
|
8c89732eb7 | ||
|
|
ab3ad6b2ca | ||
|
|
72f427a250 | ||
|
|
5b0bd9d4b7 | ||
|
|
cd9662ab4c | ||
|
|
13751b6fdf | ||
|
|
652f8c28a4 | ||
|
|
0bae9138b8 | ||
|
|
98e8cac424 | ||
|
|
dca7f208bc | ||
|
|
67ff12885a | ||
|
|
08c53032eb | ||
|
|
5da8f21947 | ||
|
|
5080b266a0 | ||
|
|
0186848936 | ||
|
|
d0de35b05b | ||
|
|
3ded30a0f3 | ||
|
|
9fef78c5e1 | ||
|
|
b2a7c453c4 | ||
|
|
030258a671 | ||
|
|
0a85b4839d | ||
|
|
ad363bac09 | ||
|
|
e0c0a8c583 | ||
|
|
f923a31758 | ||
|
|
416229d976 | ||
|
|
4380c45f17 | ||
|
|
d481aed8cb | ||
|
|
ca25983e3e | ||
|
|
f7caa496e4 | ||
|
|
3f8e4ce133 | ||
|
|
39c99083bc | ||
|
|
46aa427f98 | ||
|
|
6336fc0787 | ||
|
|
b0532be7df | ||
|
|
e7a5b015e9 | ||
|
|
2f07f18a5a | ||
|
|
c92d5b7eb0 | ||
|
|
e340a99eda | ||
|
|
f169ca08a8 | ||
|
|
898d1593f3 | ||
|
|
2c8d9563c4 | ||
|
|
804c0c4887 | ||
|
|
3b991ce8c7 | ||
|
|
e66cc0fb45 | ||
|
|
61daa0f2c8 | ||
|
|
7af315f278 | ||
|
|
e55661ca34 | ||
|
|
097a1748fd | ||
|
|
9c587d378e | ||
|
|
02f99356aa | ||
|
|
cacacec130 | ||
|
|
6d095a042f | ||
|
|
b022ad3154 | ||
|
|
e0129aa02e | ||
|
|
dfc200a25a | ||
|
|
85fdbed227 | ||
|
|
04a23c0f60 | ||
|
|
0bf9eb2f3a | ||
|
|
f13462f7cf | ||
|
|
0754bc45d3 | ||
|
|
e314f51813 | ||
|
|
5148bc42ae | ||
|
|
b43c848817 | ||
|
|
abd2b58b52 | ||
|
|
2ce1decd99 | ||
|
|
f8112735af | ||
|
|
455a8d2a91 | ||
|
|
ca692cc7c0 | ||
|
|
f5f5b540af | ||
|
|
8b3b1b4611 | ||
|
|
21cb76e517 | ||
|
|
d774a3c2ab | ||
|
|
0c08e8ba9e | ||
|
|
c2549ec166 | ||
|
|
d27fce3b29 | ||
|
|
849588e305 | ||
|
|
4f3fedc27e | ||
|
|
57a5892f99 | ||
|
|
f5499ca4ed | ||
|
|
37ae595f03 | ||
|
|
868a4a2964 | ||
|
|
3656480cff | ||
|
|
37cf4b5e88 | ||
|
|
75a4e7b5d7 | ||
|
|
12d6cf8a5b | ||
|
|
aa7e5ea601 | ||
|
|
9f5232019e | ||
|
|
3063763a18 | ||
|
|
b76f9e7e21 | ||
|
|
558636b6b0 | ||
|
|
8b92772b2f | ||
|
|
cf0881f704 | ||
|
|
1adc17b598 | ||
|
|
a55256a247 | ||
|
|
faaa4e9480 | ||
|
|
ba52ab450e | ||
|
|
0660d0cf15 | ||
|
|
fa1a3315f8 | ||
|
|
5f281b07fe | ||
|
|
e5bc2601cc | ||
|
|
6132a34333 | ||
|
|
697e6d8b8b | ||
|
|
33c4d82293 | ||
|
|
c46e0e9d5b | ||
|
|
4b9f987203 | ||
|
|
a650ae195e | ||
|
|
0dca7bacc2 | ||
|
|
87f79151b4 | ||
|
|
480ae203b4 | ||
|
|
c4427c0497 | ||
|
|
f130f55167 | ||
|
|
2009483542 | ||
|
|
ca50309554 | ||
|
|
db5b0986c4 | ||
|
|
b94cf566c9 | ||
|
|
ff24cec841 | ||
|
|
e16d20e996 | ||
|
|
bfab0f8538 | ||
|
|
4752a98456 | ||
|
|
e63a3ec6a9 | ||
|
|
4dc30d7d98 | ||
|
|
71f6825b00 | ||
|
|
d56b0bfccc | ||
|
|
39ff956076 | ||
|
|
faa22fc634 | ||
|
|
f5ce395371 | ||
|
|
b986d4cb5d | ||
|
|
9c39cd9255 | ||
|
|
43e2c44ac1 | ||
|
|
3507a74d60 | ||
|
|
97797d64f1 | ||
|
|
88d7207102 | ||
|
|
1616b014b3 | ||
|
|
c20538f6f7 | ||
|
|
e77c2dd78c | ||
|
|
6e7ce901ab | ||
|
|
3396ed6010 | ||
|
|
09ec89ae62 | ||
|
|
a7d78ff6eb | ||
|
|
868043a22b | ||
|
|
0310582056 | ||
|
|
629b9b486e | ||
|
|
500e2022c3 | ||
|
|
f8c2701751 | ||
|
|
d70ef05b54 | ||
|
|
4b1d4c7335 | ||
|
|
c79939e650 | ||
|
|
8f298ba2a0 | ||
|
|
da6311d584 | ||
|
|
d589adf208 | ||
|
|
dfbfaf12eb | ||
|
|
91989e1a2b | ||
|
|
86c2a96ed4 | ||
|
|
9f3dab39c0 | ||
|
|
a02687c9fb | ||
|
|
80399fefcd | ||
|
|
ff9a0b3d44 | ||
|
|
8df82af638 | ||
|
|
ddfcc5624c | ||
|
|
7b08fbb695 | ||
|
|
07d85783d8 | ||
|
|
f0d6fc0167 | ||
|
|
7b085307f8 | ||
|
|
e22a38dd9c | ||
|
|
2ceb727ee6 | ||
|
|
bc4e656745 | ||
|
|
6d2b3b8463 | ||
|
|
5369b6cb10 | ||
|
|
53fd71b732 | ||
|
|
63e38b3d1c | ||
|
|
cd98ac65f3 | ||
|
|
7bd0819cbb | ||
|
|
e84c2a5180 | ||
|
|
aabf4b3e45 | ||
|
|
0f67d3e54d | ||
|
|
8cbc36550b | ||
|
|
25c46f2a0d |
+6
-2
@@ -1,4 +1,4 @@
|
||||
39
|
||||
40
|
||||
|
||||
1.4.2
|
||||
1.6.2
|
||||
@@ -47,4 +47,8 @@
|
||||
6.10.2
|
||||
6.10.3
|
||||
|
||||
7.0.2
|
||||
7.0.2
|
||||
|
||||
7.14.2
|
||||
7.14.3
|
||||
8.0.2
|
||||
@@ -0,0 +1,16 @@
|
||||
name: bot
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [labeled]
|
||||
|
||||
jobs:
|
||||
approve:
|
||||
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
|
||||
with:
|
||||
authors: jacogr
|
||||
labels: -auto
|
||||
token: ${{ secrets.GH_PAT_BOT }}
|
||||
@@ -0,0 +1,16 @@
|
||||
name: bot
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [labeled]
|
||||
|
||||
jobs:
|
||||
merge:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: jacogr/action-merge@master
|
||||
with:
|
||||
checks: build,lint,test
|
||||
labels: -auto
|
||||
strategy: squash
|
||||
token: ${{ secrets.GH_PAT_BOT }}
|
||||
@@ -7,6 +7,8 @@ on:
|
||||
jobs:
|
||||
lock:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
YARN_ENABLE_SCRIPTS: false
|
||||
steps:
|
||||
- uses: dessant/lock-threads@v2
|
||||
with:
|
||||
|
||||
@@ -8,6 +8,8 @@ jobs:
|
||||
step: ['lint', 'test', 'build']
|
||||
name: ${{ matrix.step }}
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
YARN_ENABLE_SCRIPTS: false
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: ${{ matrix.step }}
|
||||
|
||||
@@ -12,17 +12,18 @@ jobs:
|
||||
step: ['build:release']
|
||||
name: ${{ matrix.step }}
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
YARN_ENABLE_SCRIPTS: false
|
||||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
||||
GH_PAT: ${{ secrets.GH_PAT }}
|
||||
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GH_PAT }}
|
||||
- name: ${{ matrix.step }}
|
||||
env:
|
||||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
||||
GH_PAT: ${{ secrets.GH_PAT }}
|
||||
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
run: |
|
||||
yarn install --immutable | grep -v 'YN0013'
|
||||
yarn ${{ matrix.step }}
|
||||
|
||||
@@ -9,6 +9,8 @@ jobs:
|
||||
check:
|
||||
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
|
||||
env:
|
||||
YARN_ENABLE_SCRIPTS: false
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: returntocorp/semgrep-action@v1
|
||||
|
||||
@@ -6,6 +6,8 @@ on:
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
YARN_ENABLE_SCRIPTS: false
|
||||
steps:
|
||||
- uses: actions/stale@v3
|
||||
with:
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
_book/
|
||||
build/
|
||||
build-cjs/
|
||||
build-esm/
|
||||
build-docs/
|
||||
coverage/
|
||||
docs/.vuepress/dist/
|
||||
docs/substrate/*.md
|
||||
node_modules/
|
||||
tmp/
|
||||
NOTES.md
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
Jaco <jacogr@gmail.com>
|
||||
github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> <action@github.com>
|
||||
github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Github Actions <action@github.com>
|
||||
|
||||
Vendored
-768
File diff suppressed because one or more lines are too long
+785
File diff suppressed because one or more lines are too long
+1
-1
@@ -10,4 +10,4 @@ plugins:
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
|
||||
spec: "@yarnpkg/plugin-version"
|
||||
|
||||
yarnPath: .yarn/releases/yarn-3.1.1.cjs
|
||||
yarnPath: .yarn/releases/yarn-3.2.0.cjs
|
||||
|
||||
+266
-2
@@ -1,5 +1,269 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 8.2.1 Apr 24, 2022
|
||||
|
||||
Contributed:
|
||||
|
||||
- Make WS timeout check configurable (Thanks to https://github.com/isSerge)
|
||||
|
||||
Changes:
|
||||
|
||||
- Don't fake signature for `paymentInfo` if already signed
|
||||
- Remove `api.derive.balances.fees` (use direct constants as applicable)
|
||||
- Add Westend 9190 upgrade block
|
||||
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||
|
||||
|
||||
## 8.1.1 Apr 17, 2022
|
||||
|
||||
Contributed:
|
||||
|
||||
- Adjust typegen for `Vec<{ struct: <type> }>` (Thanks to https://github.com/zannis)
|
||||
- Adjust typegen __dirname for ESM (Thanks to https://github.com/drewstone)
|
||||
|
||||
Changes:
|
||||
|
||||
- Fix `entriesPaged` where no `at?: BlockHash` is specified
|
||||
- Apply windcard matches for `democracy::vote::Vote` and `identity::type::Data`
|
||||
- Adjust default "no RPC response" timeout to 60s
|
||||
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||
|
||||
|
||||
## 8.0.2 Apr 11, 2022
|
||||
|
||||
Changes:
|
||||
|
||||
- Detect typegen template location for commonjs execution
|
||||
|
||||
|
||||
## 8.0.1 Apr 10, 2022
|
||||
|
||||
- **Breaking change** In this major version the commonjs outputs are moved to a sub-folder. Since the export map and main field in package.json does reflect this change, there should be no usage changes. However the packages here will all need to be on the same version for internal linkage.
|
||||
|
||||
Contributed:
|
||||
|
||||
- Improve `rpc-provider` README (Thanks to https://github.com/josepot)
|
||||
- Add handling for `Vec<[<Type>;<length>]>` in typegen (Thanks to https://github.com/zannis)
|
||||
|
||||
Changes:
|
||||
|
||||
- Add support for `apiAt.tx(...)` to construct at a specific point
|
||||
- Add basic `api.derive.bagsList.*` support
|
||||
- Return sorted names for `api.registry.lookup.names`
|
||||
- Optimize JSONRPC requests/response handling
|
||||
- Output commonjs files under the `cjs/**` root
|
||||
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||
- Add latest Polkadot 9180 upgrade block
|
||||
- Update to `@polkadot/util` 9.0.1
|
||||
|
||||
|
||||
## 7.15.1 Apr 3, 2022
|
||||
|
||||
Contributed:
|
||||
|
||||
- Export `WellKnownChain` for `substrate-connect` (Thanks to https://github.com/josepot)
|
||||
- Add support for `{entries, keys}Paged` in `.at` (Thanks to https://github.com/xlc)
|
||||
- Align `WeightsPerClass` interface on `maxExtrinsic` (Thanks to https://github.com/HackFisher)
|
||||
|
||||
Changes:
|
||||
|
||||
- Cater for `DispatchError` with `error` as `[u8; 4]`
|
||||
- Add in-flight cache for parallel same-version metadata queries
|
||||
- Cater for lazy `@polkadot/util-crypto` init (adjustment for React Native)
|
||||
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||
- Update latest Westend & Kusama (up to 9180) upgrade blocks
|
||||
|
||||
|
||||
## 7.14.3 Mar 28, 2022
|
||||
|
||||
Changes:
|
||||
|
||||
- Ensure `BitVec` with MSB does not fail (used in Polkadot `DeliveredMessages`)
|
||||
|
||||
|
||||
## 7.14.2 Mar 28, 2022
|
||||
|
||||
Changes:
|
||||
|
||||
- Don't export `ScProvider` top-level in `@polkadot/rpc-provider`
|
||||
|
||||
|
||||
## 7.14.1 Mar 27, 2022
|
||||
|
||||
Contributed:
|
||||
|
||||
- Add `ScProvider` for `@substrate/substrate-connect` (Thanks to https://github.com/josepot)
|
||||
- Add support for `BTree{Map, Set}` in typegen (Thanks to https://github.com/CertainLach)
|
||||
|
||||
Changes:
|
||||
|
||||
- Only explicitly support LSB on `BitVec` types
|
||||
- Change `toHuman()` on `BitVec` to output default LSB
|
||||
- Add `bytes{Sent, Recv}` to provider stats
|
||||
- Clear connection timout on provider `disconnect()`
|
||||
- Add support for `dev_getBlockStats` RPC
|
||||
|
||||
|
||||
## 7.13.1 Mar 19, 2022
|
||||
|
||||
**Important** This contains an upgraded version of `@polkadot/wasm-crypto`. For users of asm.js, e.g. React Native, there are some additional upgrade instructions in the release notes for this version https://github.com/polkadot-js/wasm/releases/tag/v5.0.1
|
||||
|
||||
Contributed:
|
||||
|
||||
- Expose custom RPC error details (Thanks to https://github.com/intendednull)
|
||||
- Improve custom RPC error typings (Thanks to https://github.com/MOZGIII)
|
||||
|
||||
Changes:
|
||||
|
||||
- Support for rejection of hanging RPC requests (30s timeout)
|
||||
- Add `.stats` to provider interfaces with running counters
|
||||
- Add support for `state_trieMigrationStatus` RPC
|
||||
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||
- Update to `@polkadot/util` 8.6.1
|
||||
- Additional workaround for Vite bundling
|
||||
|
||||
|
||||
## 7.12.1 Mar 13, 2022
|
||||
|
||||
Changes:
|
||||
|
||||
- Allow for correct handling of `Option<Null>` types
|
||||
- Adjust for bundlers where `import.meta.url` is undefined
|
||||
- Update to `@polkadot/util` 8.5.1
|
||||
|
||||
|
||||
## 7.11.1 Mar 6, 2022
|
||||
|
||||
Changes:
|
||||
|
||||
- Chunk derive retrieval of `era{Exposure, Prefs, Slashes}`
|
||||
- Ensure that signer (passed via options) do get updated
|
||||
- Kusama & Polkadot 9170 upgrade blocks
|
||||
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||
- Adjustments for TypeScript 7.6.2
|
||||
|
||||
|
||||
## 7.10.1 Feb 27, 2022
|
||||
|
||||
Contributed:
|
||||
|
||||
- Ensure `updateId` is correct in signer callbacks (Thanks to https://github.com/coolcorexix)
|
||||
|
||||
Changes:
|
||||
|
||||
- Ensure `BTreeSet` has the correct decoded length
|
||||
- Attach `PortableRegistry` at point of metadata set
|
||||
- Add `derive.chain.getBlockByNumber`
|
||||
- Retrieve named reserves in `derive.balances.all`
|
||||
- Ensure `v13 -> v14` metadata conversion attaches primitives
|
||||
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||
|
||||
|
||||
## 7.9.1 Feb 20, 2022
|
||||
|
||||
Contributed:
|
||||
|
||||
- Support historic queries via blockNumber (Thanks to https://github.com/stwiname)
|
||||
|
||||
Changes:
|
||||
|
||||
- Align `grandpa_proveFinality` with Substrate
|
||||
- Allow for derive augmentation (swap base type to interfaces)
|
||||
- Kusama 9160 upgrade block
|
||||
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||
|
||||
|
||||
## 7.8.1 Feb 14, 2022
|
||||
|
||||
Contributed:
|
||||
|
||||
- Add `isHistoric` flag to ETH RPCs (Thanks to https://github.com/stwiname)
|
||||
- Align contract instantiate types with Substrate (Thanks to https://github.com/kwingram25)
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust map header output type with lookup id
|
||||
- Re-enable all `BitVec` tests for `toU8a`
|
||||
- Expose `txIndex` as event index on extrinsic results
|
||||
- Allow inspection of Codec encoding (experimental)
|
||||
- Allow inspection of storage key encoding (experimental)
|
||||
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||
- Update `@polkadot/util` to 8.4.1
|
||||
|
||||
|
||||
## 7.7.1 Feb 6, 2022
|
||||
|
||||
Upgrade priority: Low. Recommended for users with long-running scripts.
|
||||
|
||||
Contributed:
|
||||
|
||||
- Fix rpc-provider LRU memory leak (Thanks to https://github.com/gdethier)
|
||||
|
||||
Changes:
|
||||
|
||||
- Don't warn on `Lookup*` types missing (these are resolvable)
|
||||
- Don't clear injected `PortableRegistry` types on runtime upgrade
|
||||
- Clear warning for `Call`/`Event` on non-meta v14 runtimes
|
||||
- Add `beefy_getFinalizedHead` RPC support
|
||||
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||
|
||||
|
||||
## 7.6.1 Jan 30, 2022
|
||||
|
||||
Upgdare priority: Low. Recommended for users with long-running scripts and those chains based around the latest Substrate master versions.
|
||||
|
||||
Contributed:
|
||||
|
||||
- Fix memory leak on `.raw` RPC calls (Thanks to https://github.com/r0t0r-r0t0r)
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust extraction of `Call` & `Event` types for metadata v14
|
||||
- Adjust historic `WinningData` and `SlotRange` types (36-entry variant)
|
||||
- Emit `decorated` event on API on metadata decoration
|
||||
- Dedupe and extend `WrapperKeepOpaque/WrapperOpaque`
|
||||
- Align `Range/RangeInclusive` usage with similar types
|
||||
- Adjust bounty derive, return empty on no `{treasury, bounties}.bounties`
|
||||
- Ensure handling of all `TypeDefInfo` keys in extraction
|
||||
- Add support for `rpc.contracts.uploadCode`
|
||||
- Workaround for generators where `#private = { this... }` yields undefined
|
||||
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||
|
||||
|
||||
## 7.5.1 Jan 23, 2022
|
||||
|
||||
Upgrade priority: Low. Recommended for users of the latest contract pallet and ink! versions.
|
||||
|
||||
Contributed:
|
||||
|
||||
- Add additional namespaced contract tests (Thanks to https://github.com/VargSupercolony)
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust `Registry` consistency, augment extensions
|
||||
- Add `.multi` support on `api.at(...).<section>.<method>`
|
||||
- Add support for ink! metadata V3 with payable constructors
|
||||
- Cleanup ink! metadata parsing, allowing for easier extension
|
||||
- Expose `contract.{query, tx}.<method>.meta`, aligning with API
|
||||
- Fix storage metadata, aligning method with decorated name
|
||||
- Adjust typegen, only using exportInterface
|
||||
- Added Kusama/Polkadot 9151 upgrade block (known types)
|
||||
- Update to latest Substrate, Kusama & Polkadot static metadata
|
||||
|
||||
|
||||
## 7.4.1 Jan 15, 2022
|
||||
|
||||
Upgrade priority: Medium. Required for all chains using `Range` and `RangeInclusive` types. Also includes better error handling for number conversions.
|
||||
|
||||
Changes:
|
||||
|
||||
- Asserts for invalid number format inputs (MAX_SAFE_INTEGER, float)
|
||||
- Ensure `Range/RangeInclusive` variant check does not fail on encoding
|
||||
- Ensure non-option calls in api-contract are marked as `@deprecated`
|
||||
- Added Kusama 9150 upgrade block (known types)
|
||||
- Update `@polkadot/util` to 8.3.2
|
||||
|
||||
|
||||
## 7.3.1 Jan 9, 2022
|
||||
|
||||
Upgrade priority: Low. Maintenance upgrade, tracking the latest `@polkadot` libraries.
|
||||
@@ -57,9 +321,9 @@ Changes:
|
||||
|
||||
Upgrade priority: Low. Recommended for TS users with their own non-Polkadot/Kusama chains.
|
||||
|
||||
- **Breaking changes** For TS users the default API augmentation is now optional. This means that the API, for TypeScript, is not decorated by default with the Substrate types and encpoints. TS users should add a singular `import '@polkadot/api-augment';` in their code to retore old behavior.
|
||||
- **Breaking changes** For TS users the default API augmentation is now optional. This means that the API, for TypeScript, is not decorated by default with the Substrate types and encpoints. TS users should add a singular `import '@polkadot/api-augment';` in their code to restore old behavior. A full writeup of the rationale and other options can be found [in the FAQ](https://polkadot.js.org/docs/api/FAQ#since-upgrading-to-the-7x-series-typescript-augmentation-is-missing)
|
||||
|
||||
- **Breaking change** To cater for the above, chain-specific interfaces generated with older versions may not be compaitible with the current version of the API. Additionally, TS interfaces generated with this version of the API is not compatible with older API versions.
|
||||
- **Breaking change** To cater for the above, chain-specific interfaces generated with older versions may not be compatible with the current version of the API. Additionally, TS interfaces generated with this version of the API is not compatible with older API versions.
|
||||
|
||||
Contributed:
|
||||
|
||||
|
||||
+103
-91
@@ -1,91 +1,103 @@
|
||||
2752 Jaco
|
||||
83 Amaury Martiny
|
||||
36 Keith Ingram
|
||||
35 Stefanie Doll
|
||||
20 Luke Schoen
|
||||
15 Jeremías Díaz
|
||||
15 Xiliang Chen
|
||||
11 Ian He
|
||||
10 Axel Chalon
|
||||
5 Chevdor
|
||||
5 Jake Naviasky
|
||||
4 Alex Wang
|
||||
4 Alexander Popiak
|
||||
4 Joshy Orndorff
|
||||
4 Nantian
|
||||
4 Thibaut Sardan
|
||||
3 Alex D
|
||||
3 André Silva
|
||||
3 Antoine Estienne
|
||||
3 Arjan Zijderveld
|
||||
3 Ewa Kowalska
|
||||
3 hamidra
|
||||
3 Hamza Tokuchi
|
||||
3 Julien Eluard
|
||||
3 KarishmaBothara
|
||||
3 Miguel Hervas
|
||||
3 Shawn Tabrizi
|
||||
3 YJ
|
||||
2 Alexander Krupenkin
|
||||
2 Branan Riley
|
||||
2 Caio
|
||||
2 Jakub Pánik
|
||||
2 James Lefrère
|
||||
2 Keith Yeung
|
||||
2 Nikos Kontakis
|
||||
2 Paweł Nguyen
|
||||
2 sung wu
|
||||
2 Veliko
|
||||
2 Wei Tang
|
||||
2 扩散性百万甜面包
|
||||
1 Andreea Eftene
|
||||
1 Brad Larson
|
||||
1 chriswmercer
|
||||
1 codingsh
|
||||
1 Dan Forbes
|
||||
1 Daniel Maricic
|
||||
1 Daniel Savu
|
||||
1 David
|
||||
1 Denis Tsai
|
||||
1 djuanito.eth
|
||||
1 Drew Stone
|
||||
1 Dylan Galea
|
||||
1 flex
|
||||
1 Furqan A
|
||||
1 Gerben van de Wiel
|
||||
1 HackFisher
|
||||
1 Hoani Bryson
|
||||
1 Hyungsuk Kang
|
||||
1 icodezjb
|
||||
1 iiiiiiii
|
||||
1 JesseAbram
|
||||
1 Joey
|
||||
1 Jordan
|
||||
1 JQQQ
|
||||
1 Kian Paimani
|
||||
1 Krzysztof Jelski
|
||||
1 Lae
|
||||
1 Lezek123
|
||||
1 Lovesh Harchandani
|
||||
1 Mario Neises
|
||||
1 Mario Pino
|
||||
1 Mark Robert Henderson
|
||||
1 Matej Nemček
|
||||
1 Mokhtar Naamani
|
||||
1 Nazar Mokrynskyi
|
||||
1 Nikhil Ranjan
|
||||
1 Nikolay Volf
|
||||
1 Paul M Fox
|
||||
1 philipstanislaus
|
||||
1 qiuhao
|
||||
1 Rocco Musolino
|
||||
1 satellitex
|
||||
1 satellitex
|
||||
1 Satyam Agrawal
|
||||
1 Sean Young
|
||||
1 Sergei Pepyakin
|
||||
1 WoeOm
|
||||
1 Xat_MassacrE
|
||||
1 yjh
|
||||
1 Yuri
|
||||
1 Zeke Mostov
|
||||
2924 Jaco 8.2.1 (#4766)
|
||||
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
|
||||
37 Keith Ingram Update contract types and rpc (#4541)
|
||||
35 Stefanie Doll Updated child storage parameters (#1709)
|
||||
20 Luke Schoen fix: Fixes TypeError: Cannot read property 'vesting' of undefined (#1970)
|
||||
16 Xiliang Chen implement entriesPaged and keysPages for query at (#4701)
|
||||
15 Jeremías Díaz feat(types): add correct tuple type to storage key (#3054)
|
||||
11 Ian He HttpProvider support clone() (#3949)
|
||||
10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954)
|
||||
5 Chevdor Fix metadata package link (#3458)
|
||||
5 Jake Naviasky Fixing approvalFlagsToBools. (#1250)
|
||||
4 Alex Wang fix issue that creates duplicate providers (#983)
|
||||
4 Alexander Popiak Add asset id in signing (#4009)
|
||||
4 Joshy Orndorff spelling; efect -> effect (#2295)
|
||||
4 Nantian fix bigint type (#3869)
|
||||
4 Scott Twiname Add support for historical BlockNumber rpc methods (#4574)
|
||||
4 Thibaut Sardan no subscription for http (#3127)
|
||||
3 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
|
||||
3 André Silva add support for ValidationCodeHash (#3640)
|
||||
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)
|
||||
3 hamidra add support for n key entries for NMaps (#3886)
|
||||
3 Hamza Tokuchi more typos (#2532)
|
||||
3 Josep M Sobrepere docs: improve rpc-provider README (#4719)
|
||||
3 Julien Eluard Fixed typos about module balances (#1402)
|
||||
3 KarishmaBothara Backward compatibility thing (#3511)
|
||||
3 Miguel Hervas Adding RT4 Types (#3007)
|
||||
3 Shawn Tabrizi Add `isReadyOrError` when connecting to API (#2577)
|
||||
3 YJ feat: Vote interface as U8a (#1061)
|
||||
2 Alexander Krupenkin Add [u8; 33] type width for U8aFixed type (#2391)
|
||||
2 Branan Riley Add proxy type for Centrifuge (#3940)
|
||||
2 Caio Add `Range` and `RangeInclusive` types (#3791)
|
||||
2 HackFisher Update maxExtrinsic definition (#4703)
|
||||
2 Jakub Pánik All heads subscription (#1899)
|
||||
2 James Lefrère Add `.eq()` usage to docs and fix docs typos (#1405)
|
||||
2 Keith Yeung Allow keyPrefix to accept an additional argument for double maps (#2230)
|
||||
2 MOZGIII Follow-up fix after #4665 (#4666)
|
||||
2 Nikos Kontakis Add auction in shared types (#4085)
|
||||
2 Paweł Nguyen Fix a minor typo in cookbook blocks docs (#2294)
|
||||
2 sung wu Update tx.md (#2485)
|
||||
2 Veliko Abi constructor takes different parameters (#3347)
|
||||
2 Wei Tang Use /usr/bin/env bash instead of /bin/bash (#2053)
|
||||
2 Zannis Kalampoukis fix: Typegen handles structs and vectors of structs without erroring (#4743)
|
||||
2 扩散性百万甜面包 Typo, deocrateMethod -> decorateMethod (#1594)
|
||||
1 Andreea Eftene Add storage deposit support (#4304)
|
||||
1 Brad Larson [NEW] Support for custom headers with providers (#2423)
|
||||
1 chriswmercer little readme tweak (#279)
|
||||
1 codingsh #2182 - add: search for docs (#2232)
|
||||
1 coolcorexix Investigate 4559 v2 (#4608)
|
||||
1 Dan Forbes Add WeightToFeeCoefficient type (#2296)
|
||||
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 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)
|
||||
1 Dylan Galea Updated users of the polkadot-js/api (#2027)
|
||||
1 flex Change BeefySignedCommitment signatures type to EcdsaSignature (#4204)
|
||||
1 Furqan A fix: fixed 404 to the docs from the api readme (#3985)
|
||||
1 Gérard Dethier Fix LRUCache memory leak. (#4520)
|
||||
1 Gerben van de Wiel Adding some extra notes on changes in the specname (#2329)
|
||||
1 HackFisher fix OutboundLaneData types (#3992)
|
||||
1 Hoani Bryson Multiple Endpoint support for WsProvider (#2234)
|
||||
1 Hyungsuk Kang Update fees.ts (#1014)
|
||||
1 icodezjb Update SessionKeys (#3035)
|
||||
1 iiiiiiii Make unknownTypes externally accessible (#3263)
|
||||
1 JesseAbram added 07 Example showing how to make a transfer with allowed block permissions folder in docs (#1062)
|
||||
1 Joey don't throw error at `onSocketClose` (#4363)
|
||||
1 Jordan Allow typegen for custom RPCs (#2876)
|
||||
1 JQQQ Allow rpc expose definition/ metadata (#3488)
|
||||
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)
|
||||
1 Lezek123 BTreeSet and BTreeMap - encoding and serialization fixes (#3789)
|
||||
1 Lovesh Harchandani Fix name of "getBlock" in package "api-derive" and export it in "index.ts" (#2857)
|
||||
1 Mario Neises fix usage with typescript (#405)
|
||||
1 Mario Pino Add PolkaStats to API users (#1593)
|
||||
1 Mark Robert Henderson Update warnings.ts to have the latest URLs (#2720)
|
||||
1 Matej Nemček added Kodadot to @polkadot/api users section (#2220)
|
||||
1 Mokhtar Naamani Disable websocket outgoing message fragmentation for w3cwebsocket (#2738)
|
||||
1 Nazar Mokrynskyi Performance tweaks (#4143)
|
||||
1 Nikhil Ranjan add vestingPerBlock and vestingEndBlock in DeriveBalancesAll when doing calcBalances (#2563)
|
||||
1 Nikolay Volf Fix typo (#1730)
|
||||
1 Noah Corona Add rpc error fields (#4637)
|
||||
1 Oleksandr Mykhailenko Add more complex namespaced contracts & test cases for them (#4472)
|
||||
1 Paul M Fox Basic BTreeMaps codec support (#1474)
|
||||
1 philipstanislaus Update types for centrifuge chain v1.2.0 (#2424)
|
||||
1 qiuhao update DeriveCustom type (#2581)
|
||||
1 r0t0r-r0t0r Fix memory leak on raw rpc call (#4505)
|
||||
1 Rocco Musolino remove broken link (#2671)
|
||||
1 satellitex Add BTreeSet<V> Codec (#1639)
|
||||
1 satellitex Add traits replace rules. for invalid cases `::<type>` and `<type>::`. (#885)
|
||||
1 Satyam Agrawal update as per the 0.97.0-beta.38 release (#1617)
|
||||
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 WoeOm adapt Darwinia, Crab Network types (#3498)
|
||||
1 Xat_MassacrE Fix packages/types/src/codec/utils/encodeTypes.ts encodeSubTypes bug (#1544)
|
||||
1 Yaroslav Bolyukin Support BTreeMap/BTreeSet in typegen (#4682)
|
||||
1 yjh fix MetadataVersioned.asV12 (#2983)
|
||||
1 Yuri fixes #3693 Fix uniques return types (#3694)
|
||||
1 Zeke Mostov fix: Allow sudo for polkadot indexed proxy enum (#3286)
|
||||
@@ -14,17 +14,3 @@ If you are an existing user, please be sure to track the [CHANGELOG](CHANGELOG.m
|
||||
## tutorials
|
||||
|
||||
Looking for tutorials to get started? Look at [examples](https://polkadot.js.org/docs/api/examples/promise/) for guides on how to use the API to make queries and submit transactions.
|
||||
|
||||
## overview
|
||||
|
||||
The API is split up into a number of internal packages -
|
||||
|
||||
- [@polkadot/api](packages/api/) The API library, providing both Promise and RxJS Observable-based interfaces. This is the main user-facing entry point.
|
||||
- [@polkadot/api-derive](packages/api-derive/) Derived results that are injected into the API, allowing for combinations of various query results (only used internally and exposed on the Api instances via `api.derive.*`)
|
||||
- [@polkadot/metadata](packages/metadata/) Base extrinsic, storage and constant injectors for injection
|
||||
- [@polkadot/rpc-core](packages/rpc-core/) Wrapper around all [JSON-RPC methods](https://polkadot.js.org/docs/substrate/rpc) exposed by a Polkadot network client
|
||||
- [@polkadot/rpc-provider](packages/rpc-provider/) Providers for connecting to nodes, including WebSockets and Http
|
||||
|
||||
Type definitions for interfaces as exposed by Polkadot & Substrate clients -
|
||||
|
||||
- [@polkadot/types](packages/types/) Codecs for all Polkadot and Substrate primitives
|
||||
|
||||
@@ -15,5 +15,8 @@ module.exports = {
|
||||
// eslint-disable-next-line sort-keys
|
||||
'@polkadot/types(.*)$': '<rootDir>/packages/types/src/$1'
|
||||
},
|
||||
"transformIgnorePatterns": [
|
||||
'/node_modules/(?!@polkadot|@substrate/connect|@babel/runtime/helpers/esm/)'
|
||||
],
|
||||
testTimeout: 30000
|
||||
};
|
||||
|
||||
+9
-9
@@ -2,8 +2,8 @@
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api#readme",
|
||||
"license": "Apache-2",
|
||||
"packageManager": "yarn@3.0.1",
|
||||
"license": "Apache-2.0",
|
||||
"packageManager": "yarn@3.2.0",
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -11,7 +11,7 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "commonjs",
|
||||
"version": "7.3.1",
|
||||
"version": "8.2.1",
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
],
|
||||
@@ -31,15 +31,15 @@
|
||||
"test:watch": "polkadot-dev-run-test --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.16.7",
|
||||
"@babel/register": "^7.16.7",
|
||||
"@babel/runtime": "^7.16.7",
|
||||
"@polkadot/dev": "^0.65.23",
|
||||
"@babel/core": "^7.17.9",
|
||||
"@babel/register": "^7.17.7",
|
||||
"@babel/runtime": "^7.17.9",
|
||||
"@polkadot/dev": "^0.66.9",
|
||||
"@polkadot/typegen": "workspace:packages/typegen",
|
||||
"@types/jest": "^27.4.0",
|
||||
"@types/jest": "^27.4.1",
|
||||
"copyfiles": "^2.4.1"
|
||||
},
|
||||
"resolutions": {
|
||||
"typescript": "^4.5.3"
|
||||
"typescript": "^4.6.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,15 +20,18 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "7.3.1",
|
||||
"version": "8.2.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.16.7",
|
||||
"@polkadot/api-base": "7.3.1",
|
||||
"@polkadot/rpc-augment": "7.3.1",
|
||||
"@polkadot/types": "7.3.1",
|
||||
"@polkadot/types-augment": "7.3.1",
|
||||
"@polkadot/types-codec": "7.3.1",
|
||||
"@polkadot/util": "^8.3.1"
|
||||
"@babel/runtime": "^7.17.9",
|
||||
"@polkadot/api-base": "8.2.1",
|
||||
"@polkadot/rpc-augment": "8.2.1",
|
||||
"@polkadot/types": "8.2.1",
|
||||
"@polkadot/types-augment": "8.2.1",
|
||||
"@polkadot/types-codec": "8.2.1",
|
||||
"@polkadot/util": "^9.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/types-support": "8.2.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ApiTypes } from '@polkadot/api-base/types';
|
||||
import type { Bytes, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { Codec } from '@polkadot/types-codec/types';
|
||||
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
|
||||
@@ -67,23 +67,23 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
/**
|
||||
* The list of thresholds separating the various bags.
|
||||
*
|
||||
* Ids are separated into unsorted bags according to their vote weight. This specifies the
|
||||
* thresholds separating the bags. An id's bag is the largest bag for which the id's weight
|
||||
* 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 weight tend to come before ids of lower
|
||||
* weight, but peer ids within a particular bag are sorted in insertion order.
|
||||
* 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 `VoteWeight::MAX`; that value does not need to be
|
||||
* 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
|
||||
* `VoteWeight::MAX`, the other one does not, and they are otherwise equal, the two lists
|
||||
* will behave identically.
|
||||
* `Score::MAX`, the other one does not, and they are otherwise equal, the two
|
||||
* lists will behave identically.
|
||||
*
|
||||
* # Calculation
|
||||
*
|
||||
@@ -101,8 +101,8 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* 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 weight 0 or 1 will fall
|
||||
* into bag 0, an id with weight 2 will fall into bag 1, etc.
|
||||
* - 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
|
||||
*
|
||||
@@ -135,11 +135,6 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
[key: string]: Codec;
|
||||
};
|
||||
bounties: {
|
||||
/**
|
||||
* Percentage of the curator fee that will be reserved upfront as deposit for bounty
|
||||
* curator.
|
||||
**/
|
||||
bountyCuratorDeposit: Permill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount held on deposit for placing a bounty proposal.
|
||||
**/
|
||||
@@ -156,6 +151,21 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Minimum value for a bounty.
|
||||
**/
|
||||
bountyValueMinimum: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum amount of funds that should be placed in a deposit for making a proposal.
|
||||
**/
|
||||
curatorDepositMax: Option<u128> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Minimum amount of funds that should be placed in a deposit for making a proposal.
|
||||
**/
|
||||
curatorDepositMin: Option<u128> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The curator deposit is calculated as a percentage of the curator fee.
|
||||
*
|
||||
* This deposit has optional upper and lower bounds with `CuratorDepositMax` and
|
||||
* `CuratorDepositMin`.
|
||||
**/
|
||||
curatorDepositMultiplier: Permill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount held on deposit per byte within the tip report reason or bounty description.
|
||||
**/
|
||||
@@ -171,6 +181,20 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
childBounties: {
|
||||
/**
|
||||
* Minimum value for a child-bounty.
|
||||
**/
|
||||
childBountyValueMinimum: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum number of child bounties that can be added to a parent bounty.
|
||||
**/
|
||||
maxActiveChildBountyCount: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
claims: {
|
||||
prefix: Bytes & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -260,6 +284,26 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
[key: string]: Codec;
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
/**
|
||||
* The minimum amount of improvement to the solution score that defines a solution as
|
||||
* "better" in the Signed phase.
|
||||
**/
|
||||
betterSignedThreshold: Perbill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum amount of improvement to the solution score that defines a solution as
|
||||
* "better" in the Unsigned phase.
|
||||
**/
|
||||
betterUnsignedThreshold: Perbill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of electable targets to put in the snapshot.
|
||||
**/
|
||||
maxElectableTargets: u16 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of electing voters to put in the snapshot. At the moment, snapshots
|
||||
* are only over a single block, but once multi-block elections are introduced they will
|
||||
* take place over multiple blocks.
|
||||
**/
|
||||
maxElectingVoters: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum length (bytes) that the mined solution should consume.
|
||||
*
|
||||
@@ -297,6 +341,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Per-weight deposit for a signed solution.
|
||||
**/
|
||||
signedDepositWeight: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum amount of unchecked solutions to refund the call fee for.
|
||||
**/
|
||||
signedMaxRefunds: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum number of signed submissions that can be queued.
|
||||
*
|
||||
@@ -321,24 +369,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Base reward for a signed solution
|
||||
**/
|
||||
signedRewardBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum amount of improvement to the solution score that defines a solution as
|
||||
* "better" (in any phase).
|
||||
**/
|
||||
solutionImprovementThreshold: Perbill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Duration of the unsigned phase.
|
||||
**/
|
||||
unsignedPhase: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of voters to put in the snapshot. At the moment, snapshots are only
|
||||
* over a single block, but once multi-block elections are introduced they will take place
|
||||
* over multiple blocks.
|
||||
*
|
||||
* Also, note the data type: If the voters are represented by a `u32` in `type
|
||||
* CompactSolution`, the same `u32` is used here to ensure bounds are respected.
|
||||
**/
|
||||
voterSnapshotPerBlock: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -592,8 +626,13 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
friendDepositFactor: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum amount of friends allowed in a recovery configuration.
|
||||
*
|
||||
* NOTE: The threshold programmed in this Pallet uses u16, so it does
|
||||
* not really make sense to have a limit here greater than u16::MAX.
|
||||
* But also, that is a lot more than you should probably set this value
|
||||
* to anyway...
|
||||
**/
|
||||
maxFriends: u16 & AugmentedConst<ApiType>;
|
||||
maxFriends: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The base amount of currency needed to reserve for starting a recovery.
|
||||
*
|
||||
@@ -703,6 +742,9 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Number of eras that staked funds must remain bonded for.
|
||||
**/
|
||||
bondingDuration: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum number of nominations per nominator.
|
||||
**/
|
||||
maxNominations: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of nominators rewarded for each validator.
|
||||
@@ -711,6 +753,11 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* claim their reward. This used to limit the i/o cost for the nominator payout.
|
||||
**/
|
||||
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.
|
||||
**/
|
||||
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Number of sessions per era.
|
||||
**/
|
||||
@@ -803,6 +850,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
[key: string]: Codec;
|
||||
};
|
||||
transactionPayment: {
|
||||
/**
|
||||
* The polynomial that is applied in order to derive fee from length.
|
||||
**/
|
||||
lengthToFee: Vec<FrameSupportWeightsWeightToFeeCoefficient> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* A fee mulitplier for `Operational` extrinsics to compute "virtual tip" to boost their
|
||||
* `priority`
|
||||
@@ -827,10 +878,6 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* transactions.
|
||||
**/
|
||||
operationalFeeMultiplier: u8 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The fee to be paid for making a transaction; the per-byte portion.
|
||||
**/
|
||||
transactionByteFee: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The polynomial that is applied in order to derive fee from weight.
|
||||
**/
|
||||
@@ -847,6 +894,8 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
burn: Permill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of approvals that can wait in the spending queue.
|
||||
*
|
||||
* NOTE: This parameter is also used within the Bounties Pallet extension if enabled.
|
||||
**/
|
||||
maxApprovals: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -858,6 +907,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* An accepted proposal gets these back. A rejected proposal does not.
|
||||
**/
|
||||
proposalBond: Permill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum amount of funds that should be placed in a deposit for making a proposal.
|
||||
**/
|
||||
proposalBondMaximum: Option<u128> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Minimum amount of funds that should be placed in a deposit for making a proposal.
|
||||
**/
|
||||
|
||||
@@ -97,7 +97,7 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
IdNotFound: AugmentedError<ApiType>;
|
||||
/**
|
||||
* An Id does not have a greater vote weight than another Id.
|
||||
* An Id does not have a greater score than another Id.
|
||||
**/
|
||||
NotHeavier: AugmentedError<ApiType>;
|
||||
/**
|
||||
@@ -149,7 +149,7 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
};
|
||||
bounties: {
|
||||
/**
|
||||
* The bounty cannot be closed because it has active child-bounties.
|
||||
* The bounty cannot be closed because it has active child bounties.
|
||||
**/
|
||||
HasActiveChildBounty: AugmentedError<ApiType>;
|
||||
/**
|
||||
@@ -185,6 +185,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Require bounty curator.
|
||||
**/
|
||||
RequireCurator: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Too many approvals are already queued.
|
||||
**/
|
||||
TooManyQueued: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The bounty status is unexpected.
|
||||
**/
|
||||
@@ -194,6 +198,24 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
childBounties: {
|
||||
/**
|
||||
* The bounty balance is not enough to add new child-bounty.
|
||||
**/
|
||||
InsufficientBountyBalance: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The parent bounty is not in active state.
|
||||
**/
|
||||
ParentBountyNotActive: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Number of child bounties exceeds limit `MaxActiveChildBountyCount`.
|
||||
**/
|
||||
TooManyChildBounties: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
claims: {
|
||||
/**
|
||||
* Invalid Ethereum signature.
|
||||
@@ -503,6 +525,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The call is not allowed at this point.
|
||||
**/
|
||||
CallNotAllowed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The fallback failed
|
||||
**/
|
||||
FallbackFailed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* `Self::insert_submission` returned an invalid index.
|
||||
**/
|
||||
@@ -696,6 +722,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The requested maximum message size is 0.
|
||||
**/
|
||||
OpenHrmpChannelZeroMessageSize: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The provided witness data is wrong.
|
||||
**/
|
||||
WrongWitness: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
@@ -874,6 +904,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
paraInclusion: {
|
||||
/**
|
||||
* Bitfield consists of zeros only.
|
||||
**/
|
||||
BitfieldAllZeros: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Multiple bitfields submitted by same validator or validators out of order by index.
|
||||
**/
|
||||
@@ -953,10 +987,26 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Scheduled cores out of order.
|
||||
**/
|
||||
ScheduledOutOfOrder: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A different relay parent was provided compared to the on-chain stored one.
|
||||
**/
|
||||
UnexpectedRelayParent: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Candidate submitted but para not scheduled.
|
||||
**/
|
||||
UnscheduledCandidate: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Backed candidates are out of order (core index) or contain duplicates.
|
||||
**/
|
||||
UnsortedOrDuplicateBackedCandidates: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Dispute statement sets are out of order or contain duplicates.
|
||||
**/
|
||||
UnsortedOrDuplicateDisputeStatementSet: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Validator indices are out of order or contains duplicates.
|
||||
**/
|
||||
UnsortedOrDuplicateValidatorIndices: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The validation data hash does not match expected.
|
||||
**/
|
||||
@@ -983,6 +1033,14 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Disputed candidate that was concluded invalid.
|
||||
**/
|
||||
CandidateConcludedInvalid: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A dispute statement was invalid.
|
||||
**/
|
||||
DisputeInvalid: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The ordering of dispute statements was invalid.
|
||||
**/
|
||||
DisputeStatementsUnsortedOrDuplicates: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The data given to the inherent will result in an overweight block.
|
||||
**/
|
||||
@@ -1022,6 +1080,11 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Para is not registered in our system.
|
||||
**/
|
||||
NotRegistered: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The PVF pre-checking statement cannot be included since the PVF pre-checking mechanism
|
||||
* is disabled.
|
||||
**/
|
||||
PvfCheckDisabled: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The given validator already has cast a vote.
|
||||
**/
|
||||
@@ -1310,6 +1373,11 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Cannot schedule downgrade of parachain to parathread
|
||||
**/
|
||||
CannotDowngrade: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Cannot perform a parachain slot / lifecycle swap. Check that the state of both paras are
|
||||
* correct for the swap to work.
|
||||
**/
|
||||
CannotSwap: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Cannot schedule upgrade of parathread to parachain
|
||||
**/
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import '@polkadot/api-augment/kusama';
|
||||
|
||||
import type { PolkadotRuntimeParachainsUmpPalletEvent, XcmV2TraitsOutcome } from '@polkadot/types/lookup';
|
||||
|
||||
import { Metadata, TypeRegistry } from '@polkadot/types';
|
||||
import metadataStatic from '@polkadot/types-support/metadata/static-kusama';
|
||||
|
||||
const registry = new TypeRegistry();
|
||||
const metadata = new Metadata(registry, metadataStatic);
|
||||
|
||||
registry.setMetadata(metadata);
|
||||
|
||||
describe('correct types', (): void => {
|
||||
it('correctly creates XcmV2TraitsOutcome', (): void => {
|
||||
const test = registry.createType<XcmV2TraitsOutcome>('XcmV2TraitsOutcome', {
|
||||
Incomplete: [3_000_000_000, 'BadOrigin']
|
||||
});
|
||||
|
||||
expect(test.toHuman()).toEqual({
|
||||
Incomplete: [
|
||||
'3,000,000,000',
|
||||
'BadOrigin'
|
||||
]
|
||||
});
|
||||
expect(test.isIncomplete).toEqual(true);
|
||||
expect(test.asIncomplete.toHuman()).toEqual([
|
||||
'3,000,000,000',
|
||||
'BadOrigin'
|
||||
]);
|
||||
});
|
||||
|
||||
it('correctly creates PolkadotRuntimeParachainsUmpPalletEvent', (): void => {
|
||||
const test = registry.createType<PolkadotRuntimeParachainsUmpPalletEvent>('PolkadotRuntimeParachainsUmpPalletEvent', '0x02112233445566778811223344556677881122334455667788112233445566778801005ed0b20000000006');
|
||||
|
||||
expect(test.asExecutedUpward[1].asIncomplete.toHuman()).toEqual([
|
||||
'3,000,000,000',
|
||||
'BadOrigin'
|
||||
]);
|
||||
});
|
||||
});
|
||||
@@ -6,7 +6,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, PalletStakingExposure, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV1CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, KusamaRuntimeProxyType, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletStakingExposure, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
|
||||
declare module '@polkadot/api-base/types/events' {
|
||||
export interface AugmentedEvents<ApiType extends ApiTypes> {
|
||||
@@ -143,6 +143,28 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
childBounties: {
|
||||
/**
|
||||
* A child-bounty is added.
|
||||
**/
|
||||
Added: AugmentedEvent<ApiType, [u32, u32]>;
|
||||
/**
|
||||
* A child-bounty is awarded to a beneficiary.
|
||||
**/
|
||||
Awarded: AugmentedEvent<ApiType, [u32, u32, AccountId32]>;
|
||||
/**
|
||||
* A child-bounty is cancelled.
|
||||
**/
|
||||
Canceled: AugmentedEvent<ApiType, [u32, u32]>;
|
||||
/**
|
||||
* A child-bounty is claimed by beneficiary.
|
||||
**/
|
||||
Claimed: AugmentedEvent<ApiType, [u32, u32, u128, AccountId32]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
claims: {
|
||||
/**
|
||||
* Someone claimed some DOTs. `[who, ethereum_address, amount]`
|
||||
@@ -539,15 +561,15 @@ declare module '@polkadot/api-base/types/events' {
|
||||
/**
|
||||
* A candidate was backed. `[candidate, head_data]`
|
||||
**/
|
||||
CandidateBacked: AugmentedEvent<ApiType, [PolkadotPrimitivesV1CandidateReceipt, Bytes, u32, u32]>;
|
||||
CandidateBacked: AugmentedEvent<ApiType, [PolkadotPrimitivesV2CandidateReceipt, Bytes, u32, u32]>;
|
||||
/**
|
||||
* A candidate was included. `[candidate, head_data]`
|
||||
**/
|
||||
CandidateIncluded: AugmentedEvent<ApiType, [PolkadotPrimitivesV1CandidateReceipt, Bytes, u32, u32]>;
|
||||
CandidateIncluded: AugmentedEvent<ApiType, [PolkadotPrimitivesV2CandidateReceipt, Bytes, u32, u32]>;
|
||||
/**
|
||||
* A candidate timed out. `[candidate, head_data]`
|
||||
**/
|
||||
CandidateTimedOut: AugmentedEvent<ApiType, [PolkadotPrimitivesV1CandidateReceipt, Bytes, u32]>;
|
||||
CandidateTimedOut: AugmentedEvent<ApiType, [PolkadotPrimitivesV2CandidateReceipt, Bytes, u32]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
@@ -574,6 +596,21 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* A new head has been noted for a Para. `para_id`
|
||||
**/
|
||||
NewHeadNoted: AugmentedEvent<ApiType, [u32]>;
|
||||
/**
|
||||
* The given validation code was accepted by the PVF pre-checking vote.
|
||||
* `code_hash` `para_id`
|
||||
**/
|
||||
PvfCheckAccepted: AugmentedEvent<ApiType, [H256, u32]>;
|
||||
/**
|
||||
* The given validation code was rejected by the PVF pre-checking vote.
|
||||
* `code_hash` `para_id`
|
||||
**/
|
||||
PvfCheckRejected: AugmentedEvent<ApiType, [H256, u32]>;
|
||||
/**
|
||||
* The given para either initiated or subscribed to a PVF check for the given validation
|
||||
* code. `code_hash` `para_id`
|
||||
**/
|
||||
PvfCheckStarted: AugmentedEvent<ApiType, [H256, u32]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
@@ -685,6 +722,10 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* A proxy was executed correctly, with the given.
|
||||
**/
|
||||
ProxyExecuted: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;
|
||||
/**
|
||||
* A proxy was removed.
|
||||
**/
|
||||
ProxyRemoved: AugmentedEvent<ApiType, [AccountId32, AccountId32, KusamaRuntimeProxyType, u32]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
@@ -905,6 +946,10 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* An account has unbonded this amount. \[stash, amount\]
|
||||
**/
|
||||
Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||
/**
|
||||
* A validator has set their preferences.
|
||||
**/
|
||||
ValidatorPrefsSet: AugmentedEvent<ApiType, [AccountId32, PalletStakingValidatorPrefs]>;
|
||||
/**
|
||||
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
|
||||
* from the unlocking queue. \[stash, amount\]
|
||||
|
||||
@@ -6,4 +6,5 @@ import './consts';
|
||||
import './errors';
|
||||
import './events';
|
||||
import './query';
|
||||
import './registry';
|
||||
import './tx';
|
||||
|
||||
@@ -7,7 +7,7 @@ import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, W
|
||||
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, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerReleases, 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, PolkadotPrimitivesV0ValidatorAppPublic, PolkadotPrimitivesV1AssignmentAppPublic, PolkadotPrimitivesV1CandidateCommitments, PolkadotPrimitivesV1CoreOccupied, PolkadotPrimitivesV1DisputeState, PolkadotPrimitivesV1ScrapedOnChainVotes, PolkadotPrimitivesV1UpgradeGoAhead, PolkadotPrimitivesV1UpgradeRestriction, PolkadotPrimitivesV2SessionInfo, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
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, 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, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
import type { Observable } from '@polkadot/types/types';
|
||||
|
||||
declare module '@polkadot/api-base/types/storage' {
|
||||
@@ -185,8 +185,29 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
};
|
||||
balances: {
|
||||
/**
|
||||
* The balance of an account.
|
||||
* The Balances pallet example of storing the balance of an account.
|
||||
*
|
||||
* # Example
|
||||
*
|
||||
* ```nocompile
|
||||
* impl pallet_balances::Config for Runtime {
|
||||
* type AccountStore = StorageMapShim<Self::Account<Runtime>, frame_system::Provider<Runtime>, AccountId, Self::AccountData<Balance>>
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* You can also store the balance of an account in the `System` pallet.
|
||||
*
|
||||
* # Example
|
||||
*
|
||||
* ```nocompile
|
||||
* impl pallet_balances::Config for Runtime {
|
||||
* type AccountStore = System
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* But this comes with tradeoffs, storing account balances in the system pallet stores
|
||||
* `frame_system` data alongside the account data contrary to storing account balances in the
|
||||
* `Balances` pallet, which uses a `StorageMap` to store balances data only.
|
||||
* NOTE: This is only used in the case that this pallet is used to store balances.
|
||||
**/
|
||||
account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
@@ -236,6 +257,33 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
childBounties: {
|
||||
/**
|
||||
* Child bounties that have been added.
|
||||
**/
|
||||
childBounties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletChildBountiesChildBounty>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
||||
/**
|
||||
* Number of total child bounties.
|
||||
**/
|
||||
childBountyCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The description of each child-bounty.
|
||||
**/
|
||||
childBountyDescriptions: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* The cumulative child-bounty curator fee for each parent bounty.
|
||||
**/
|
||||
childrenCuratorFees: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Number of child bounties per parent bounty.
|
||||
* Map of parent bounty index to number of child bounties.
|
||||
**/
|
||||
parentChildBounties: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
claims: {
|
||||
claims: AugmentedQuery<ApiType, (arg: EthereumAddress | string | Uint8Array) => Observable<Option<u128>>, [EthereumAddress]> & QueryableStorageEntry<ApiType, [EthereumAddress]>;
|
||||
/**
|
||||
@@ -269,12 +317,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* is meant to be used only as the last resort.
|
||||
**/
|
||||
bypassConsistencyCheck: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Pending configuration (if any) for the next session.
|
||||
*
|
||||
* DEPRECATED: This is no longer used, and will be removed in the future.
|
||||
**/
|
||||
pendingConfig: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Pending configuration changes.
|
||||
*
|
||||
@@ -335,9 +377,9 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
newRaise: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Tracker for the next available trie index
|
||||
* Tracker for the next available fund index
|
||||
**/
|
||||
nextTrieIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
nextFundIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -364,13 +406,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* proposal.
|
||||
**/
|
||||
lastTabledWasExternal: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Accounts for which there are locks in action which may be removed at some point in the
|
||||
* future. The value is the block number at which the lock expires and may be removed.
|
||||
*
|
||||
* TWOX-NOTE: OK ― `AccountId` is a secure hash.
|
||||
**/
|
||||
locks: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* The lowest referendum index representing an unbaked referendum. Equal to
|
||||
* `ReferendumCount` if there isn't a unbaked referendum.
|
||||
@@ -461,7 +496,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
*
|
||||
* Can be set via `set_minimum_untrusted_score`.
|
||||
**/
|
||||
minimumUntrustedScore: AugmentedQuery<ApiType, () => Observable<Option<Vec<u128>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
minimumUntrustedScore: AugmentedQuery<ApiType, () => Observable<Option<SpNposElectionsElectionScore>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Current best solution, signed or unsigned, queued to be returned upon `elect`.
|
||||
**/
|
||||
@@ -483,7 +518,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* 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<Vec<u128>, u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<BTreeMap<SpNposElectionsElectionScore, u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The next index to be assigned to an incoming signed submission.
|
||||
*
|
||||
@@ -596,13 +631,12 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
hrmpChannelContents: AugmentedQuery<ApiType, (arg: PolkadotParachainPrimitivesHrmpChannelId | { sender?: any; recipient?: any } | string | Uint8Array) => Observable<Vec<PolkadotCorePrimitivesInboundHrmpMessage>>, [PolkadotParachainPrimitivesHrmpChannelId]> & QueryableStorageEntry<ApiType, [PolkadotParachainPrimitivesHrmpChannelId]>;
|
||||
/**
|
||||
* Maintains a mapping that can be used to answer the question:
|
||||
* What paras sent a message at the given block number for a given receiver.
|
||||
* Invariants:
|
||||
* Maintains a mapping that can be used to answer the question: What paras sent a message at
|
||||
* the given block number for a given receiver. Invariants:
|
||||
* - The inner `Vec<ParaId>` is never empty.
|
||||
* - The inner `Vec<ParaId>` cannot store two same `ParaId`.
|
||||
* - The outer vector is sorted ascending by block number and cannot store two items with the same
|
||||
* block number.
|
||||
* - The outer vector is sorted ascending by block number and cannot store two items with the
|
||||
* same block number.
|
||||
**/
|
||||
hrmpChannelDigests: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[u32, Vec<u32>]>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
@@ -612,8 +646,8 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
hrmpChannels: AugmentedQuery<ApiType, (arg: PolkadotParachainPrimitivesHrmpChannelId | { sender?: any; recipient?: any } | string | Uint8Array) => Observable<Option<PolkadotRuntimeParachainsHrmpHrmpChannel>>, [PolkadotParachainPrimitivesHrmpChannelId]> & QueryableStorageEntry<ApiType, [PolkadotParachainPrimitivesHrmpChannelId]>;
|
||||
/**
|
||||
* A set of pending HRMP close channel requests that are going to be closed during the session change.
|
||||
* Used for checking if a given channel is registered for closure.
|
||||
* A set of pending HRMP close channel requests that are going to be closed during the session
|
||||
* change. Used for checking if a given channel is registered for closure.
|
||||
*
|
||||
* The set is accompanied by a list for iteration.
|
||||
*
|
||||
@@ -624,25 +658,25 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
hrmpCloseChannelRequestsList: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotParachainPrimitivesHrmpChannelId>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
hrmpEgressChannelsIndex: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Ingress/egress indexes allow to find all the senders and receivers given the opposite
|
||||
* side. I.e.
|
||||
* Ingress/egress indexes allow to find all the senders and receivers given the opposite side.
|
||||
* I.e.
|
||||
*
|
||||
* (a) ingress index allows to find all the senders for a given recipient.
|
||||
* (b) egress index allows to find all the recipients for a given sender.
|
||||
*
|
||||
* Invariants:
|
||||
* - for each ingress index entry for `P` each item `I` in the index should present in `HrmpChannels`
|
||||
* as `(I, P)`.
|
||||
* - for each egress index entry for `P` each item `E` in the index should present in `HrmpChannels`
|
||||
* as `(P, E)`.
|
||||
* - for each ingress index entry for `P` each item `I` in the index should present in
|
||||
* `HrmpChannels` as `(I, P)`.
|
||||
* - for each egress index entry for `P` each item `E` in the index should present in
|
||||
* `HrmpChannels` as `(P, E)`.
|
||||
* - there should be no other dangling channels in `HrmpChannels`.
|
||||
* - the vectors are sorted.
|
||||
**/
|
||||
hrmpIngressChannelsIndex: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* This mapping tracks how many open channel requests are initiated by a given sender para.
|
||||
* Invariant: `HrmpOpenChannelRequests` should contain the same number of items that has `(X, _)`
|
||||
* as the number of `HrmpOpenChannelRequestCount` for `X`.
|
||||
* Invariant: `HrmpOpenChannelRequests` should contain the same number of items that has
|
||||
* `(X, _)` as the number of `HrmpOpenChannelRequestCount` for `X`.
|
||||
**/
|
||||
hrmpOpenChannelRequestCount: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
@@ -815,7 +849,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* The commitments of candidates pending availability, by `ParaId`.
|
||||
**/
|
||||
pendingAvailabilityCommitments: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV1CandidateCommitments>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
pendingAvailabilityCommitments: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV2CandidateCommitments>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -834,7 +868,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Scraped on chain data for extracting resolved disputes as well as backing votes.
|
||||
**/
|
||||
onChainVotes: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV1ScrapedOnChainVotes>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
onChainVotes: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV2ScrapedOnChainVotes>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -880,6 +914,8 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
heads: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* All parachains. Ordered ascending by `ParaId`. Parathreads are not included.
|
||||
*
|
||||
* Consider using the [`ParachainsCache`] type of modifying.
|
||||
**/
|
||||
parachains: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
@@ -950,7 +986,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* NOTE that this field is used by parachains via merkle storage proofs, therefore changing
|
||||
* the format will require migration of parachains.
|
||||
**/
|
||||
upgradeGoAheadSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV1UpgradeGoAhead>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
upgradeGoAheadSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV2UpgradeGoAhead>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* This is used by the relay-chain to communicate that there are restrictions for performing
|
||||
* an upgrade for this parachain.
|
||||
@@ -962,7 +998,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* NOTE that this field is used by parachains via merkle storage proofs, therefore changing
|
||||
* the format will require migration of parachains.
|
||||
**/
|
||||
upgradeRestrictionSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV1UpgradeRestriction>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
upgradeRestrictionSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV2UpgradeRestriction>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -979,7 +1015,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* * The number of parachains and parathread multiplexers
|
||||
* * The number of validators divided by `configuration.max_validators_per_core`.
|
||||
**/
|
||||
availabilityCores: AugmentedQuery<ApiType, () => Observable<Vec<Option<PolkadotPrimitivesV1CoreOccupied>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
availabilityCores: AugmentedQuery<ApiType, () => Observable<Vec<Option<PolkadotPrimitivesV2CoreOccupied>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* An index used to ensure that only one claim on a parathread exists in the queue or is
|
||||
* currently being handled by an occupied core.
|
||||
@@ -1030,7 +1066,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* All ongoing or concluded disputes for the last several sessions.
|
||||
**/
|
||||
disputes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV1DisputeState>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
|
||||
disputes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV2DisputeState>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
|
||||
/**
|
||||
* Whether the chain is frozen. Starts as `None`. When this is `Some`,
|
||||
* the chain will not accept any new parachain blocks for backing or inclusion,
|
||||
@@ -1067,7 +1103,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* Note that this API is private due to it being prone to 'off-by-one' at session boundaries.
|
||||
* When in doubt, use `Sessions` API instead.
|
||||
**/
|
||||
assignmentKeysUnsafe: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV1AssignmentAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
assignmentKeysUnsafe: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV2AssignmentAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The earliest session for which previous session info is stored.
|
||||
**/
|
||||
@@ -1093,7 +1129,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* The parachain attestation keys of the validators actively participating in parachain consensus.
|
||||
* This should be the same length as `ActiveValidatorIndices`.
|
||||
**/
|
||||
activeValidatorKeys: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV0ValidatorAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
activeValidatorKeys: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV2ValidatorAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The current session index.
|
||||
**/
|
||||
@@ -1223,12 +1259,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* Lookup from identity to the block number and index of the task.
|
||||
**/
|
||||
lookup: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>;
|
||||
/**
|
||||
* Storage version of the pallet.
|
||||
*
|
||||
* New networks start with last version.
|
||||
**/
|
||||
storageVersion: AugmentedQuery<ApiType, () => Observable<PalletSchedulerReleases>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -1534,7 +1564,22 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
minValidatorBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The map from nominator stash key to the set of stash keys of all validators to nominate.
|
||||
* The map from nominator stash key to their nomination preferences, namely the validators that
|
||||
* they wish to support.
|
||||
*
|
||||
* Note that the keys of this storage map might become non-decodable in case the
|
||||
* [`Config::MaxNominations`] configuration is decreased. In this rare case, these nominators
|
||||
* are still existent in storage, their key is correct and retrievable (i.e. `contains_key`
|
||||
* indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable
|
||||
* nominators will effectively not-exist, until they re-submit their preferences such that it
|
||||
* is within the bounds of the newly set `Config::MaxNominations`.
|
||||
*
|
||||
* This implies that `::iter_keys().count()` and `::iter().count()` might return different
|
||||
* values for this map. Moreover, the main `::count()` is aligned with the former, namely the
|
||||
* number of keys that exist.
|
||||
*
|
||||
* Lastly, if any of the nominators become non-decodable, they can be chilled immediately via
|
||||
* [`Call::chill_other`] dispatchable by anyone.
|
||||
**/
|
||||
nominators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletStakingNominations>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
@@ -1629,8 +1674,11 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Events deposited for the current block.
|
||||
*
|
||||
* NOTE: This storage item is explicitly unbounded since it is never intended to be read
|
||||
* from within the runtime.
|
||||
* NOTE: The item is unbound and should therefore never be read on chain.
|
||||
* It could otherwise inflate the PoV size of a block.
|
||||
*
|
||||
* Events have a large in-memory size. Box the events to not go out-of-memory
|
||||
* just in case someone still reads them from within the runtime.
|
||||
**/
|
||||
events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import '@polkadot/types-augment/registry/substrate';
|
||||
import '@polkadot/types-augment/registry/polkadot';
|
||||
import '@polkadot/types-augment/registry/kusama';
|
||||
@@ -7,7 +7,7 @@ import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u1
|
||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportScheduleMaybeHashed, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeSessionKeys, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletSocietyJudgement, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppSignature, PolkadotPrimitivesV1InherentData, PolkadotPrimitivesV2PvfCheckStatement, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportScheduleMaybeHashed, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeSessionKeys, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2InherentData, PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV2ValidatorAppSignature, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
|
||||
declare module '@polkadot/api-base/types/submittable' {
|
||||
export interface AugmentedSubmittables<ApiType extends ApiTypes> {
|
||||
@@ -100,12 +100,12 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Only works if
|
||||
* - both nodes are within the same bag,
|
||||
* - and `origin` has a greater `VoteWeight` than `lighter`.
|
||||
* - and `origin` has a greater `Score` than `lighter`.
|
||||
**/
|
||||
putInFrontOf: AugmentedSubmittable<(lighter: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||
/**
|
||||
* Declare that some `dislocated` account has, through rewards or penalties, sufficiently
|
||||
* changed its weight that it should properly fall into a different bag than its current
|
||||
* changed its score that it should properly fall into a different bag than its current
|
||||
* one.
|
||||
*
|
||||
* Anyone can call this function about any potentially dislocated account.
|
||||
@@ -139,7 +139,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Set the balances of a given account.
|
||||
*
|
||||
* This will alter `FreeBalance` and `ReservedBalance` in storage. it will
|
||||
* also decrease the total issuance of the system (`TotalIssuance`).
|
||||
* also alter the total issuance of the system (`TotalIssuance`) appropriately.
|
||||
* If the new free or reserved balance is below the existential deposit,
|
||||
* it will reset the account nonce (`frame_system::AccountNonce`).
|
||||
*
|
||||
@@ -150,7 +150,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Transfer some liquid free balance to another account.
|
||||
*
|
||||
* `transfer` will set the `FreeBalance` of the sender and receiver.
|
||||
* It will decrease the total issuance of the system by the `TransferFee`.
|
||||
* If the sender's account is below the existential deposit as a result
|
||||
* of the transfer, the account will be reaped.
|
||||
*
|
||||
@@ -335,6 +334,175 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
childBounties: {
|
||||
/**
|
||||
* Accept the curator role for the child-bounty.
|
||||
*
|
||||
* The dispatch origin for this call must be the curator of this
|
||||
* child-bounty.
|
||||
*
|
||||
* A deposit will be reserved from the curator and refund upon
|
||||
* successful payout or cancellation.
|
||||
*
|
||||
* Fee for curator is deducted from curator fee of parent bounty.
|
||||
*
|
||||
* Parent bounty must be in active state, for this child-bounty call to
|
||||
* work.
|
||||
*
|
||||
* Child-bounty must be in "CuratorProposed" state, for processing the
|
||||
* call. And state of child-bounty is moved to "Active" on successful
|
||||
* call completion.
|
||||
*
|
||||
* - `parent_bounty_id`: Index of parent bounty.
|
||||
* - `child_bounty_id`: Index of child bounty.
|
||||
**/
|
||||
acceptCurator: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
|
||||
/**
|
||||
* Add a new child-bounty.
|
||||
*
|
||||
* The dispatch origin for this call must be the curator of parent
|
||||
* bounty and the parent bounty must be in "active" state.
|
||||
*
|
||||
* Child-bounty gets added successfully & fund gets transferred from
|
||||
* parent bounty to child-bounty account, if parent bounty has enough
|
||||
* funds, else the call fails.
|
||||
*
|
||||
* Upper bound to maximum number of active child bounties that can be
|
||||
* added are managed via runtime trait config
|
||||
* [`Config::MaxActiveChildBountyCount`].
|
||||
*
|
||||
* If the call is success, the status of child-bounty is updated to
|
||||
* "Added".
|
||||
*
|
||||
* - `parent_bounty_id`: Index of parent bounty for which child-bounty is being added.
|
||||
* - `value`: Value for executing the proposal.
|
||||
* - `description`: Text description for the child-bounty.
|
||||
**/
|
||||
addChildBounty: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, value: Compact<u128> | AnyNumber | Uint8Array, description: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u128>, Bytes]>;
|
||||
/**
|
||||
* Award child-bounty to a beneficiary.
|
||||
*
|
||||
* The beneficiary will be able to claim the funds after a delay.
|
||||
*
|
||||
* The dispatch origin for this call must be the parent curator or
|
||||
* curator of this child-bounty.
|
||||
*
|
||||
* Parent bounty must be in active state, for this child-bounty call to
|
||||
* work.
|
||||
*
|
||||
* Child-bounty must be in active state, for processing the call. And
|
||||
* state of child-bounty is moved to "PendingPayout" on successful call
|
||||
* completion.
|
||||
*
|
||||
* - `parent_bounty_id`: Index of parent bounty.
|
||||
* - `child_bounty_id`: Index of child bounty.
|
||||
* - `beneficiary`: Beneficiary account.
|
||||
**/
|
||||
awardChildBounty: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array, beneficiary: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>, MultiAddress]>;
|
||||
/**
|
||||
* Claim the payout from an awarded child-bounty after payout delay.
|
||||
*
|
||||
* The dispatch origin for this call may be any signed origin.
|
||||
*
|
||||
* Call works independent of parent bounty state, No need for parent
|
||||
* bounty to be in active state.
|
||||
*
|
||||
* The Beneficiary is paid out with agreed bounty value. Curator fee is
|
||||
* paid & curator deposit is unreserved.
|
||||
*
|
||||
* Child-bounty must be in "PendingPayout" state, for processing the
|
||||
* call. And instance of child-bounty is removed from the state on
|
||||
* successful call completion.
|
||||
*
|
||||
* - `parent_bounty_id`: Index of parent bounty.
|
||||
* - `child_bounty_id`: Index of child bounty.
|
||||
**/
|
||||
claimChildBounty: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
|
||||
/**
|
||||
* Cancel a proposed or active child-bounty. Child-bounty account funds
|
||||
* are transferred to parent bounty account. The child-bounty curator
|
||||
* deposit may be unreserved if possible.
|
||||
*
|
||||
* The dispatch origin for this call must be either parent curator or
|
||||
* `T::RejectOrigin`.
|
||||
*
|
||||
* If the state of child-bounty is `Active`, curator deposit is
|
||||
* unreserved.
|
||||
*
|
||||
* If the state of child-bounty is `PendingPayout`, call fails &
|
||||
* returns `PendingPayout` error.
|
||||
*
|
||||
* For the origin other than T::RejectOrigin, parent bounty must be in
|
||||
* active state, for this child-bounty call to work. For origin
|
||||
* T::RejectOrigin execution is forced.
|
||||
*
|
||||
* Instance of child-bounty is removed from the state on successful
|
||||
* call completion.
|
||||
*
|
||||
* - `parent_bounty_id`: Index of parent bounty.
|
||||
* - `child_bounty_id`: Index of child bounty.
|
||||
**/
|
||||
closeChildBounty: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
|
||||
/**
|
||||
* Propose curator for funded child-bounty.
|
||||
*
|
||||
* The dispatch origin for this call must be curator of parent bounty.
|
||||
*
|
||||
* Parent bounty must be in active state, for this child-bounty call to
|
||||
* work.
|
||||
*
|
||||
* Child-bounty must be in "Added" state, for processing the call. And
|
||||
* state of child-bounty is moved to "CuratorProposed" on successful
|
||||
* call completion.
|
||||
*
|
||||
* - `parent_bounty_id`: Index of parent bounty.
|
||||
* - `child_bounty_id`: Index of child bounty.
|
||||
* - `curator`: Address of child-bounty curator.
|
||||
* - `fee`: payment fee to child-bounty curator for execution.
|
||||
**/
|
||||
proposeCurator: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array, curator: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, fee: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>, MultiAddress, Compact<u128>]>;
|
||||
/**
|
||||
* Unassign curator from a child-bounty.
|
||||
*
|
||||
* The dispatch origin for this call can be either `RejectOrigin`, or
|
||||
* the curator of the parent bounty, or any signed origin.
|
||||
*
|
||||
* For the origin other than T::RejectOrigin and the child-bounty
|
||||
* curator, parent bounty must be in active state, for this call to
|
||||
* work. We allow child-bounty curator and T::RejectOrigin to execute
|
||||
* this call irrespective of the parent bounty state.
|
||||
*
|
||||
* If this function is called by the `RejectOrigin` or the
|
||||
* parent bounty curator, we assume that the child-bounty curator is
|
||||
* malicious or inactive. As a result, child-bounty curator deposit is
|
||||
* slashed.
|
||||
*
|
||||
* If the origin is the child-bounty curator, we take this as a sign
|
||||
* that they are unable to do their job, and are willingly giving up.
|
||||
* We could slash the deposit, but for now we allow them to unreserve
|
||||
* their deposit and exit without issue. (We may want to change this if
|
||||
* it is abused.)
|
||||
*
|
||||
* Finally, the origin can be anyone iff the child-bounty curator is
|
||||
* "inactive". Expiry update due of parent bounty is used to estimate
|
||||
* inactive state of child-bounty curator.
|
||||
*
|
||||
* This allows anyone in the community to call out that a child-bounty
|
||||
* curator is not doing their due diligence, and we should pick a new
|
||||
* one. In this case the child-bounty curator deposit is slashed.
|
||||
*
|
||||
* State of child-bounty is moved to Added state on successful call
|
||||
* completion.
|
||||
*
|
||||
* - `parent_bounty_id`: Index of parent bounty.
|
||||
* - `child_bounty_id`: Index of child bounty.
|
||||
**/
|
||||
unassignCurator: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
claims: {
|
||||
/**
|
||||
* Attest to a statement, needed to finalize the claims process.
|
||||
@@ -1199,6 +1367,13 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
/**
|
||||
* Trigger the governance fallback.
|
||||
*
|
||||
* This can only be called when [`Phase::Emergency`] is enabled, as an alternative to
|
||||
* calling [`Call::set_emergency_election_result`].
|
||||
**/
|
||||
governanceFallback: AugmentedSubmittable<(maybeMaxVoters: Option<u32> | null | object | string | Uint8Array, maybeMaxTargets: Option<u32> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<u32>, Option<u32>]>;
|
||||
/**
|
||||
* Set a solution in the queue, to be handed out to the client of this pallet in the next
|
||||
* call to `ElectionProvider::elect`.
|
||||
@@ -1217,7 +1392,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* This check can be turned off by setting the value to `None`.
|
||||
**/
|
||||
setMinimumUntrustedScore: AugmentedSubmittable<(maybeNextScore: Option<Vec<u128>> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<Vec<u128>>]>;
|
||||
setMinimumUntrustedScore: AugmentedSubmittable<(maybeNextScore: Option<SpNposElectionsElectionScore> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<SpNposElectionsElectionScore>]>;
|
||||
/**
|
||||
* Submit a solution for the signed phase.
|
||||
*
|
||||
@@ -1228,12 +1403,8 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* A deposit is reserved and recorded for the solution. Based on the outcome, the solution
|
||||
* might be rewarded, slashed, or get all or a part of the deposit back.
|
||||
*
|
||||
* # <weight>
|
||||
* Queue size must be provided as witness data.
|
||||
* # </weight>
|
||||
**/
|
||||
submit: AugmentedSubmittable<(rawSolution: PalletElectionProviderMultiPhaseRawSolution | { solution?: any; score?: any; round?: any } | string | Uint8Array, numSignedSubmissions: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletElectionProviderMultiPhaseRawSolution, u32]>;
|
||||
submit: AugmentedSubmittable<(rawSolution: PalletElectionProviderMultiPhaseRawSolution | { solution?: any; score?: any; round?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletElectionProviderMultiPhaseRawSolution]>;
|
||||
/**
|
||||
* Submit a solution for the unsigned phase.
|
||||
*
|
||||
@@ -1349,22 +1520,28 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* you to trigger the cleanup immediately for a specific parachain.
|
||||
*
|
||||
* Origin must be Root.
|
||||
*
|
||||
* Number of inbound and outbound channels for `para` must be provided as witness data of weighing.
|
||||
**/
|
||||
forceCleanHrmp: AugmentedSubmittable<(para: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
forceCleanHrmp: AugmentedSubmittable<(para: u32 | AnyNumber | Uint8Array, inbound: u32 | AnyNumber | Uint8Array, outbound: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, u32]>;
|
||||
/**
|
||||
* Force process HRMP close channel requests.
|
||||
*
|
||||
* If there are pending HRMP close channel requests, you can use this
|
||||
* function process all of those requests immediately.
|
||||
*
|
||||
* Total number of closing channels must be provided as witness data of weighing.
|
||||
**/
|
||||
forceProcessHrmpClose: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||
forceProcessHrmpClose: AugmentedSubmittable<(channels: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* Force process HRMP open channel requests.
|
||||
*
|
||||
* If there are pending HRMP open channel requests, you can use this
|
||||
* function process all of those requests immediately.
|
||||
*
|
||||
* Total number of opening channels must be provided as witness data of weighing.
|
||||
**/
|
||||
forceProcessHrmpOpen: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||
forceProcessHrmpOpen: AugmentedSubmittable<(channels: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* Accept a pending open channel request from the given sender.
|
||||
*
|
||||
@@ -1372,13 +1549,16 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
**/
|
||||
hrmpAcceptOpenChannel: AugmentedSubmittable<(sender: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* This cancels a pending open channel request. It can be canceled be either of the sender
|
||||
* This cancels a pending open channel request. It can be canceled by either of the sender
|
||||
* or the recipient for that request. The origin must be either of those.
|
||||
*
|
||||
* The cancellation happens immediately. It is not possible to cancel the request if it is
|
||||
* already accepted.
|
||||
*
|
||||
* Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as
|
||||
* witness data.
|
||||
**/
|
||||
hrmpCancelOpenRequest: AugmentedSubmittable<(channelId: PolkadotParachainPrimitivesHrmpChannelId | { sender?: any; recipient?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotParachainPrimitivesHrmpChannelId]>;
|
||||
hrmpCancelOpenRequest: AugmentedSubmittable<(channelId: PolkadotParachainPrimitivesHrmpChannelId | { sender?: any; recipient?: any } | string | Uint8Array, openRequests: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotParachainPrimitivesHrmpChannelId, u32]>;
|
||||
/**
|
||||
* Initiate unilateral closing of a channel. The origin must be either the sender or the
|
||||
* recipient in the channel being closed.
|
||||
@@ -1967,7 +2147,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
/**
|
||||
* Enter the paras inherent. This will process bitfields and backed candidates.
|
||||
**/
|
||||
enter: AugmentedSubmittable<(data: PolkadotPrimitivesV1InherentData | { bitfields?: any; backedCandidates?: any; disputes?: any; parentHeader?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV1InherentData]>;
|
||||
enter: AugmentedSubmittable<(data: PolkadotPrimitivesV2InherentData | { bitfields?: any; backedCandidates?: any; disputes?: any; parentHeader?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV2InherentData]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
@@ -2016,7 +2196,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and
|
||||
* enacts the results if that was the last vote before achieving the supermajority.
|
||||
**/
|
||||
includePvfCheckStatement: AugmentedSubmittable<(stmt: PolkadotPrimitivesV2PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV0ValidatorAppSignature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV0ValidatorAppSignature]>;
|
||||
includePvfCheckStatement: AugmentedSubmittable<(stmt: PolkadotPrimitivesV2PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV2ValidatorAppSignature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV2ValidatorAppSignature]>;
|
||||
/**
|
||||
* Remove the validation code from the storage iff the reference count is 0.
|
||||
*
|
||||
@@ -2133,7 +2313,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* - be less than the number of possible candidates. Note that all current members and
|
||||
* runners-up are also automatically candidates for the next round.
|
||||
*
|
||||
* If `value` is more than `who`'s total balance, then the maximum of the two is used.
|
||||
* If `value` is more than `who`'s free balance, then the maximum of the two is used.
|
||||
*
|
||||
* The dispatch origin of this call must be signed.
|
||||
*
|
||||
@@ -2198,7 +2378,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Weight is a function of the number of proxies the user has (P).
|
||||
* # </weight>
|
||||
**/
|
||||
addProxy: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, KusamaRuntimeProxyType, u32]>;
|
||||
addProxy: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, KusamaRuntimeProxyType, u32]>;
|
||||
/**
|
||||
* Publish the hash of a proxy-call that will be made in the future.
|
||||
*
|
||||
@@ -2248,7 +2428,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* # </weight>
|
||||
* TODO: Might be over counting 1 read
|
||||
**/
|
||||
anonymous: AugmentedSubmittable<(proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array, index: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [KusamaRuntimeProxyType, u32, u16]>;
|
||||
anonymous: AugmentedSubmittable<(proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array, index: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [KusamaRuntimeProxyType, u32, u16]>;
|
||||
/**
|
||||
* Removes a previously spawned anonymous proxy.
|
||||
*
|
||||
@@ -2271,7 +2451,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Weight is a function of the number of proxies the user has (P).
|
||||
* # </weight>
|
||||
**/
|
||||
killAnonymous: AugmentedSubmittable<(spawner: AccountId32 | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number | Uint8Array, index: u16 | AnyNumber | Uint8Array, height: Compact<u32> | AnyNumber | Uint8Array, extIndex: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, KusamaRuntimeProxyType, u16, Compact<u32>, Compact<u32>]>;
|
||||
killAnonymous: AugmentedSubmittable<(spawner: AccountId32 | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number | Uint8Array, index: u16 | AnyNumber | Uint8Array, height: Compact<u32> | AnyNumber | Uint8Array, extIndex: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, KusamaRuntimeProxyType, u16, Compact<u32>, Compact<u32>]>;
|
||||
/**
|
||||
* Dispatch the given `call` from an account that the sender is authorised for through
|
||||
* `add_proxy`.
|
||||
@@ -2374,7 +2554,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Weight is a function of the number of proxies the user has (P).
|
||||
* # </weight>
|
||||
**/
|
||||
removeProxy: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, KusamaRuntimeProxyType, u32]>;
|
||||
removeProxy: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, KusamaRuntimeProxyType, u32]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
@@ -3141,14 +3321,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Can be called by the `T::SlashCancelOrigin`.
|
||||
*
|
||||
* Parameters: era and indices of the slashes for that era to kill.
|
||||
*
|
||||
* # <weight>
|
||||
* Complexity: O(U + S)
|
||||
* with U unapplied slashes weighted with U=1000
|
||||
* and S is the number of slash indices to be canceled.
|
||||
* - Read: Unapplied Slashes
|
||||
* - Write: Unapplied Slashes
|
||||
* # </weight>
|
||||
**/
|
||||
cancelDeferredSlash: AugmentedSubmittable<(era: u32 | AnyNumber | Uint8Array, slashIndices: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<u32>]>;
|
||||
/**
|
||||
@@ -3177,6 +3349,11 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* If the caller is different than the controller being targeted, the following conditions
|
||||
* must be met:
|
||||
*
|
||||
* * `controller` must belong to a nominator who has become non-decodable,
|
||||
*
|
||||
* Or:
|
||||
*
|
||||
* * A `ChillThreshold` must be set and checked which defines how close to the max
|
||||
* nominators or validators we must reach before users can start chilling one-another.
|
||||
* * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine
|
||||
@@ -3189,6 +3366,12 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* who do not satisfy these requirements.
|
||||
**/
|
||||
chillOther: AugmentedSubmittable<(controller: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||
/**
|
||||
* Force a validator to have at least the minimum commission. This will not affect a
|
||||
* validator who already has a commission greater than or equal to the minimum. Any account
|
||||
* can call this.
|
||||
**/
|
||||
forceApplyMinCommission: AugmentedSubmittable<(validatorStash: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||
/**
|
||||
* Force there to be a new era at the end of the next session. After this, it will be
|
||||
* reset to normal (non-forced) behaviour.
|
||||
@@ -3218,11 +3401,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* The election process starts multiple blocks before the end of the era.
|
||||
* If this is called just before a new era is triggered, the election process may not
|
||||
* have enough blocks to get a result.
|
||||
*
|
||||
* # <weight>
|
||||
* - Weight: O(1)
|
||||
* - Write: ForceEra
|
||||
* # </weight>
|
||||
**/
|
||||
forceNewEraAlways: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||
/**
|
||||
@@ -3247,13 +3425,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Force a current staker to become completely unstaked, immediately.
|
||||
*
|
||||
* The dispatch origin must be Root.
|
||||
*
|
||||
* # <weight>
|
||||
* O(S) where S is the number of slashing spans to be removed
|
||||
* Reads: Bonded, Slashing Spans, Account, Locks
|
||||
* Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators,
|
||||
* Account, Locks Writes Each: SpanSlash * S
|
||||
* # </weight>
|
||||
**/
|
||||
forceUnstake: AugmentedSubmittable<(stash: AccountId32 | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
|
||||
/**
|
||||
@@ -3289,7 +3460,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* # <weight>
|
||||
* - The transaction's complexity is proportional to the size of `targets` (N)
|
||||
* which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS).
|
||||
* which is capped at CompactAssignments::LIMIT (T::MaxNominations).
|
||||
* - Both the reads and writes follow a similar pattern.
|
||||
* # </weight>
|
||||
**/
|
||||
@@ -3340,7 +3511,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* # <weight>
|
||||
* - Time complexity: O(L), where L is unlocking chunks
|
||||
* - Bounded by `MAX_UNLOCKING_CHUNKS`.
|
||||
* - Bounded by `MaxUnlockingChunks`.
|
||||
* - Storage changes: Can't increase storage, only decrease it.
|
||||
* # </weight>
|
||||
**/
|
||||
@@ -3358,7 +3529,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
/**
|
||||
* (Re-)set the controller of a stash.
|
||||
*
|
||||
* Effects will be felt at the beginning of the next era.
|
||||
* Effects will be felt instantly (as soon as this function is completed successfully).
|
||||
*
|
||||
* The dispatch origin for this call must be _Signed_ by the stash, not the controller.
|
||||
*
|
||||
@@ -3403,17 +3574,12 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Set the validators who cannot be slashed (if any).
|
||||
*
|
||||
* The dispatch origin must be Root.
|
||||
*
|
||||
* # <weight>
|
||||
* - O(V)
|
||||
* - Write: Invulnerables
|
||||
* # </weight>
|
||||
**/
|
||||
setInvulnerables: AugmentedSubmittable<(invulnerables: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>]>;
|
||||
/**
|
||||
* (Re-)set the payment target for a controller.
|
||||
*
|
||||
* Effects will be felt at the beginning of the next era.
|
||||
* Effects will be felt instantly (as soon as this function is completed successfully).
|
||||
*
|
||||
* The dispatch origin for this call must be _Signed_ by the controller, not the stash.
|
||||
*
|
||||
@@ -3448,7 +3614,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* NOTE: Existing nominators and validators will not be affected by this update.
|
||||
* to kick people under the new limits, `chill_other` should be called.
|
||||
**/
|
||||
setStakingConfigs: AugmentedSubmittable<(minNominatorBond: u128 | AnyNumber | Uint8Array, minValidatorBond: u128 | AnyNumber | Uint8Array, maxNominatorCount: Option<u32> | null | object | string | Uint8Array, maxValidatorCount: Option<u32> | null | object | string | Uint8Array, chillThreshold: Option<Percent> | null | object | string | Uint8Array, minCommission: Perbill | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128, u128, Option<u32>, Option<u32>, Option<Percent>, Perbill]>;
|
||||
setStakingConfigs: AugmentedSubmittable<(minNominatorBond: PalletStakingPalletConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, minValidatorBond: PalletStakingPalletConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxNominatorCount: PalletStakingPalletConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxValidatorCount: PalletStakingPalletConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, chillThreshold: PalletStakingPalletConfigOpPercent | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, minCommission: PalletStakingPalletConfigOpPerbill | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingPalletConfigOpU32, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpPerbill]>;
|
||||
/**
|
||||
* Sets the ideal number of validators.
|
||||
*
|
||||
@@ -3470,7 +3636,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Once the unlock period is done, you can call `withdraw_unbonded` to actually move
|
||||
* the funds out of management ready for transfer.
|
||||
*
|
||||
* No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`)
|
||||
* No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`)
|
||||
* can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need
|
||||
* to be called first to remove some of the chunks (if possible).
|
||||
*
|
||||
@@ -3539,11 +3705,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
remark: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
|
||||
/**
|
||||
* Make some on-chain remark and emit event.
|
||||
*
|
||||
* # <weight>
|
||||
* - `O(b)` where b is the length of the remark.
|
||||
* - 1 event.
|
||||
* # </weight>
|
||||
**/
|
||||
remarkWithEvent: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
|
||||
/**
|
||||
@@ -4247,10 +4408,13 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
**/
|
||||
forceXcmVersion: AugmentedSubmittable<(location: XcmV1MultiLocation | { parents?: any; interior?: any } | string | Uint8Array, xcmVersion: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmV1MultiLocation, u32]>;
|
||||
/**
|
||||
* Transfer some assets from the local chain to the sovereign account of a destination chain and forward
|
||||
* a notification XCM.
|
||||
* Transfer some assets from the local chain to the sovereign account of a destination
|
||||
* chain and forward a notification XCM.
|
||||
*
|
||||
* Fee payment on the destination side is made from the first asset listed in the `assets` vector.
|
||||
* Fee payment on the destination side is made from the asset in the `assets` vector of
|
||||
* index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
|
||||
* is needed than `weight_limit`, then the operation will fail and the assets send may be
|
||||
* at risk.
|
||||
*
|
||||
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
||||
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
||||
@@ -4267,7 +4431,10 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
/**
|
||||
* Teleport some assets from the local chain to some destination chain.
|
||||
*
|
||||
* Fee payment on the destination side is made from the first asset listed in the `assets` vector.
|
||||
* Fee payment on the destination side is made from the asset in the `assets` vector of
|
||||
* index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
|
||||
* is needed than `weight_limit`, then the operation will fail and the assets send may be
|
||||
* at risk.
|
||||
*
|
||||
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
||||
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
||||
@@ -4282,12 +4449,12 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
**/
|
||||
limitedTeleportAssets: AugmentedSubmittable<(dest: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, beneficiary: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, assets: XcmVersionedMultiAssets | { V0: any } | { V1: any } | string | Uint8Array, feeAssetItem: u32 | AnyNumber | Uint8Array, weightLimit: XcmV2WeightLimit | { Unlimited: any } | { Limited: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedMultiLocation, XcmVersionedMultiLocation, XcmVersionedMultiAssets, u32, XcmV2WeightLimit]>;
|
||||
/**
|
||||
* Transfer some assets from the local chain to the sovereign account of a destination chain and forward
|
||||
* a notification XCM.
|
||||
* Transfer some assets from the local chain to the sovereign account of a destination
|
||||
* chain and forward a notification XCM.
|
||||
*
|
||||
* Fee payment on the destination side is made from the first asset listed in the `assets` vector and
|
||||
* fee-weight is calculated locally and thus remote weights are assumed to be equal to
|
||||
* local weights.
|
||||
* Fee payment on the destination side is made from the asset in the `assets` vector of
|
||||
* index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,
|
||||
* with all fees taken as needed from the asset.
|
||||
*
|
||||
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
||||
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
||||
@@ -4304,9 +4471,9 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
/**
|
||||
* Teleport some assets from the local chain to some destination chain.
|
||||
*
|
||||
* Fee payment on the destination side is made from the first asset listed in the `assets` vector and
|
||||
* fee-weight is calculated locally and thus remote weights are assumed to be equal to
|
||||
* local weights.
|
||||
* Fee payment on the destination side is made from the asset in the `assets` vector of
|
||||
* index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,
|
||||
* with all fees taken as needed from the asset.
|
||||
*
|
||||
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
||||
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '7.3.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '8.2.1' };
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ApiTypes } from '@polkadot/api-base/types';
|
||||
import type { Bytes, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { Codec } from '@polkadot/types-codec/types';
|
||||
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
|
||||
@@ -67,23 +67,23 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
/**
|
||||
* The list of thresholds separating the various bags.
|
||||
*
|
||||
* Ids are separated into unsorted bags according to their vote weight. This specifies the
|
||||
* thresholds separating the bags. An id's bag is the largest bag for which the id's weight
|
||||
* 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 weight tend to come before ids of lower
|
||||
* weight, but peer ids within a particular bag are sorted in insertion order.
|
||||
* 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 `VoteWeight::MAX`; that value does not need to be
|
||||
* 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
|
||||
* `VoteWeight::MAX`, the other one does not, and they are otherwise equal, the two lists
|
||||
* will behave identically.
|
||||
* `Score::MAX`, the other one does not, and they are otherwise equal, the two
|
||||
* lists will behave identically.
|
||||
*
|
||||
* # Calculation
|
||||
*
|
||||
@@ -101,8 +101,8 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* 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 weight 0 or 1 will fall
|
||||
* into bag 0, an id with weight 2 will fall into bag 1, etc.
|
||||
* - 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
|
||||
*
|
||||
@@ -135,11 +135,6 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
[key: string]: Codec;
|
||||
};
|
||||
bounties: {
|
||||
/**
|
||||
* Percentage of the curator fee that will be reserved upfront as deposit for bounty
|
||||
* curator.
|
||||
**/
|
||||
bountyCuratorDeposit: Permill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount held on deposit for placing a bounty proposal.
|
||||
**/
|
||||
@@ -156,6 +151,21 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Minimum value for a bounty.
|
||||
**/
|
||||
bountyValueMinimum: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum amount of funds that should be placed in a deposit for making a proposal.
|
||||
**/
|
||||
curatorDepositMax: Option<u128> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Minimum amount of funds that should be placed in a deposit for making a proposal.
|
||||
**/
|
||||
curatorDepositMin: Option<u128> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The curator deposit is calculated as a percentage of the curator fee.
|
||||
*
|
||||
* This deposit has optional upper and lower bounds with `CuratorDepositMax` and
|
||||
* `CuratorDepositMin`.
|
||||
**/
|
||||
curatorDepositMultiplier: Permill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount held on deposit per byte within the tip report reason or bounty description.
|
||||
**/
|
||||
@@ -171,6 +181,20 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
childBounties: {
|
||||
/**
|
||||
* Minimum value for a child-bounty.
|
||||
**/
|
||||
childBountyValueMinimum: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum number of child bounties that can be added to a parent bounty.
|
||||
**/
|
||||
maxActiveChildBountyCount: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
claims: {
|
||||
prefix: Bytes & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -260,6 +284,26 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
[key: string]: Codec;
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
/**
|
||||
* The minimum amount of improvement to the solution score that defines a solution as
|
||||
* "better" in the Signed phase.
|
||||
**/
|
||||
betterSignedThreshold: Perbill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum amount of improvement to the solution score that defines a solution as
|
||||
* "better" in the Unsigned phase.
|
||||
**/
|
||||
betterUnsignedThreshold: Perbill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of electable targets to put in the snapshot.
|
||||
**/
|
||||
maxElectableTargets: u16 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of electing voters to put in the snapshot. At the moment, snapshots
|
||||
* are only over a single block, but once multi-block elections are introduced they will
|
||||
* take place over multiple blocks.
|
||||
**/
|
||||
maxElectingVoters: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum length (bytes) that the mined solution should consume.
|
||||
*
|
||||
@@ -297,6 +341,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Per-weight deposit for a signed solution.
|
||||
**/
|
||||
signedDepositWeight: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum amount of unchecked solutions to refund the call fee for.
|
||||
**/
|
||||
signedMaxRefunds: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum number of signed submissions that can be queued.
|
||||
*
|
||||
@@ -321,24 +369,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Base reward for a signed solution
|
||||
**/
|
||||
signedRewardBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum amount of improvement to the solution score that defines a solution as
|
||||
* "better" (in any phase).
|
||||
**/
|
||||
solutionImprovementThreshold: Perbill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Duration of the unsigned phase.
|
||||
**/
|
||||
unsignedPhase: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of voters to put in the snapshot. At the moment, snapshots are only
|
||||
* over a single block, but once multi-block elections are introduced they will take place
|
||||
* over multiple blocks.
|
||||
*
|
||||
* Also, note the data type: If the voters are represented by a `u32` in `type
|
||||
* CompactSolution`, the same `u32` is used here to ensure bounds are respected.
|
||||
**/
|
||||
voterSnapshotPerBlock: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -575,6 +609,9 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Number of eras that staked funds must remain bonded for.
|
||||
**/
|
||||
bondingDuration: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum number of nominations per nominator.
|
||||
**/
|
||||
maxNominations: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of nominators rewarded for each validator.
|
||||
@@ -583,6 +620,11 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* claim their reward. This used to limit the i/o cost for the nominator payout.
|
||||
**/
|
||||
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.
|
||||
**/
|
||||
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Number of sessions per era.
|
||||
**/
|
||||
@@ -675,6 +717,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
[key: string]: Codec;
|
||||
};
|
||||
transactionPayment: {
|
||||
/**
|
||||
* The polynomial that is applied in order to derive fee from length.
|
||||
**/
|
||||
lengthToFee: Vec<FrameSupportWeightsWeightToFeeCoefficient> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* A fee mulitplier for `Operational` extrinsics to compute "virtual tip" to boost their
|
||||
* `priority`
|
||||
@@ -699,10 +745,6 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* transactions.
|
||||
**/
|
||||
operationalFeeMultiplier: u8 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The fee to be paid for making a transaction; the per-byte portion.
|
||||
**/
|
||||
transactionByteFee: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The polynomial that is applied in order to derive fee from weight.
|
||||
**/
|
||||
@@ -719,6 +761,8 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
burn: Permill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of approvals that can wait in the spending queue.
|
||||
*
|
||||
* NOTE: This parameter is also used within the Bounties Pallet extension if enabled.
|
||||
**/
|
||||
maxApprovals: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -730,6 +774,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* An accepted proposal gets these back. A rejected proposal does not.
|
||||
**/
|
||||
proposalBond: Permill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum amount of funds that should be placed in a deposit for making a proposal.
|
||||
**/
|
||||
proposalBondMaximum: Option<u128> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Minimum amount of funds that should be placed in a deposit for making a proposal.
|
||||
**/
|
||||
|
||||
@@ -97,7 +97,7 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
IdNotFound: AugmentedError<ApiType>;
|
||||
/**
|
||||
* An Id does not have a greater vote weight than another Id.
|
||||
* An Id does not have a greater score than another Id.
|
||||
**/
|
||||
NotHeavier: AugmentedError<ApiType>;
|
||||
/**
|
||||
@@ -149,7 +149,7 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
};
|
||||
bounties: {
|
||||
/**
|
||||
* The bounty cannot be closed because it has active child-bounties.
|
||||
* The bounty cannot be closed because it has active child bounties.
|
||||
**/
|
||||
HasActiveChildBounty: AugmentedError<ApiType>;
|
||||
/**
|
||||
@@ -185,6 +185,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Require bounty curator.
|
||||
**/
|
||||
RequireCurator: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Too many approvals are already queued.
|
||||
**/
|
||||
TooManyQueued: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The bounty status is unexpected.
|
||||
**/
|
||||
@@ -194,6 +198,24 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
childBounties: {
|
||||
/**
|
||||
* The bounty balance is not enough to add new child-bounty.
|
||||
**/
|
||||
InsufficientBountyBalance: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The parent bounty is not in active state.
|
||||
**/
|
||||
ParentBountyNotActive: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Number of child bounties exceeds limit `MaxActiveChildBountyCount`.
|
||||
**/
|
||||
TooManyChildBounties: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
claims: {
|
||||
/**
|
||||
* Invalid Ethereum signature.
|
||||
@@ -503,6 +525,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The call is not allowed at this point.
|
||||
**/
|
||||
CallNotAllowed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The fallback failed
|
||||
**/
|
||||
FallbackFailed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* `Self::insert_submission` returned an invalid index.
|
||||
**/
|
||||
@@ -657,6 +683,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The requested maximum message size is 0.
|
||||
**/
|
||||
OpenHrmpChannelZeroMessageSize: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The provided witness data is wrong.
|
||||
**/
|
||||
WrongWitness: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
@@ -835,6 +865,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
paraInclusion: {
|
||||
/**
|
||||
* Bitfield consists of zeros only.
|
||||
**/
|
||||
BitfieldAllZeros: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Multiple bitfields submitted by same validator or validators out of order by index.
|
||||
**/
|
||||
@@ -914,10 +948,26 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Scheduled cores out of order.
|
||||
**/
|
||||
ScheduledOutOfOrder: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A different relay parent was provided compared to the on-chain stored one.
|
||||
**/
|
||||
UnexpectedRelayParent: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Candidate submitted but para not scheduled.
|
||||
**/
|
||||
UnscheduledCandidate: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Backed candidates are out of order (core index) or contain duplicates.
|
||||
**/
|
||||
UnsortedOrDuplicateBackedCandidates: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Dispute statement sets are out of order or contain duplicates.
|
||||
**/
|
||||
UnsortedOrDuplicateDisputeStatementSet: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Validator indices are out of order or contains duplicates.
|
||||
**/
|
||||
UnsortedOrDuplicateValidatorIndices: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The validation data hash does not match expected.
|
||||
**/
|
||||
@@ -944,6 +994,14 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Disputed candidate that was concluded invalid.
|
||||
**/
|
||||
CandidateConcludedInvalid: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A dispute statement was invalid.
|
||||
**/
|
||||
DisputeInvalid: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The ordering of dispute statements was invalid.
|
||||
**/
|
||||
DisputeStatementsUnsortedOrDuplicates: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The data given to the inherent will result in an overweight block.
|
||||
**/
|
||||
@@ -983,6 +1041,11 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Para is not registered in our system.
|
||||
**/
|
||||
NotRegistered: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The PVF pre-checking statement cannot be included since the PVF pre-checking mechanism
|
||||
* is disabled.
|
||||
**/
|
||||
PvfCheckDisabled: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The given validator already has cast a vote.
|
||||
**/
|
||||
@@ -1012,6 +1075,40 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
parasDisputes: {
|
||||
/**
|
||||
* Ancient dispute statement provided.
|
||||
**/
|
||||
AncientDisputeStatement: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Duplicate dispute statement sets provided.
|
||||
**/
|
||||
DuplicateDisputeStatementSets: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Validator vote submitted more than once to dispute.
|
||||
**/
|
||||
DuplicateStatement: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Invalid signature on statement.
|
||||
**/
|
||||
InvalidSignature: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Too many spam slots used by some specific validator.
|
||||
**/
|
||||
PotentialSpam: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A dispute where there are only votes on one side.
|
||||
**/
|
||||
SingleSidedDispute: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Validator index on statement is out of bounds for session.
|
||||
**/
|
||||
ValidatorIndexOutOfBounds: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
phragmenElection: {
|
||||
/**
|
||||
* Duplicated candidate submission.
|
||||
@@ -1167,6 +1264,11 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Cannot schedule downgrade of parachain to parathread
|
||||
**/
|
||||
CannotDowngrade: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Cannot perform a parachain slot / lifecycle swap. Check that the state of both paras are
|
||||
* correct for the swap to work.
|
||||
**/
|
||||
CannotSwap: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Cannot schedule upgrade of parathread to parachain
|
||||
**/
|
||||
|
||||
@@ -6,7 +6,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, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV1CandidateReceipt, PolkadotRuntimeProxyType, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
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';
|
||||
|
||||
declare module '@polkadot/api-base/types/events' {
|
||||
export interface AugmentedEvents<ApiType extends ApiTypes> {
|
||||
@@ -143,6 +143,28 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
childBounties: {
|
||||
/**
|
||||
* A child-bounty is added.
|
||||
**/
|
||||
Added: AugmentedEvent<ApiType, [u32, u32]>;
|
||||
/**
|
||||
* A child-bounty is awarded to a beneficiary.
|
||||
**/
|
||||
Awarded: AugmentedEvent<ApiType, [u32, u32, AccountId32]>;
|
||||
/**
|
||||
* A child-bounty is cancelled.
|
||||
**/
|
||||
Canceled: AugmentedEvent<ApiType, [u32, u32]>;
|
||||
/**
|
||||
* A child-bounty is claimed by beneficiary.
|
||||
**/
|
||||
Claimed: AugmentedEvent<ApiType, [u32, u32, u128, AccountId32]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
claims: {
|
||||
/**
|
||||
* Someone claimed some DOTs. `[who, ethereum_address, amount]`
|
||||
@@ -517,15 +539,15 @@ declare module '@polkadot/api-base/types/events' {
|
||||
/**
|
||||
* A candidate was backed. `[candidate, head_data]`
|
||||
**/
|
||||
CandidateBacked: AugmentedEvent<ApiType, [PolkadotPrimitivesV1CandidateReceipt, Bytes, u32, u32]>;
|
||||
CandidateBacked: AugmentedEvent<ApiType, [PolkadotPrimitivesV2CandidateReceipt, Bytes, u32, u32]>;
|
||||
/**
|
||||
* A candidate was included. `[candidate, head_data]`
|
||||
**/
|
||||
CandidateIncluded: AugmentedEvent<ApiType, [PolkadotPrimitivesV1CandidateReceipt, Bytes, u32, u32]>;
|
||||
CandidateIncluded: AugmentedEvent<ApiType, [PolkadotPrimitivesV2CandidateReceipt, Bytes, u32, u32]>;
|
||||
/**
|
||||
* A candidate timed out. `[candidate, head_data]`
|
||||
**/
|
||||
CandidateTimedOut: AugmentedEvent<ApiType, [PolkadotPrimitivesV1CandidateReceipt, Bytes, u32]>;
|
||||
CandidateTimedOut: AugmentedEvent<ApiType, [PolkadotPrimitivesV2CandidateReceipt, Bytes, u32]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
@@ -552,6 +574,48 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* A new head has been noted for a Para. `para_id`
|
||||
**/
|
||||
NewHeadNoted: AugmentedEvent<ApiType, [u32]>;
|
||||
/**
|
||||
* The given validation code was accepted by the PVF pre-checking vote.
|
||||
* `code_hash` `para_id`
|
||||
**/
|
||||
PvfCheckAccepted: AugmentedEvent<ApiType, [H256, u32]>;
|
||||
/**
|
||||
* The given validation code was rejected by the PVF pre-checking vote.
|
||||
* `code_hash` `para_id`
|
||||
**/
|
||||
PvfCheckRejected: AugmentedEvent<ApiType, [H256, u32]>;
|
||||
/**
|
||||
* The given para either initiated or subscribed to a PVF check for the given validation
|
||||
* code. `code_hash` `para_id`
|
||||
**/
|
||||
PvfCheckStarted: AugmentedEvent<ApiType, [H256, u32]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
parasDisputes: {
|
||||
/**
|
||||
* A dispute has concluded for or against a candidate.
|
||||
* `\[para id, candidate hash, dispute result\]`
|
||||
**/
|
||||
DisputeConcluded: AugmentedEvent<ApiType, [H256, PolkadotRuntimeParachainsDisputesDisputeResult]>;
|
||||
/**
|
||||
* A dispute has been initiated. \[candidate hash, dispute location\]
|
||||
**/
|
||||
DisputeInitiated: AugmentedEvent<ApiType, [H256, PolkadotRuntimeParachainsDisputesDisputeLocation]>;
|
||||
/**
|
||||
* A dispute has timed out due to insufficient participation.
|
||||
* `\[para id, candidate hash\]`
|
||||
**/
|
||||
DisputeTimedOut: AugmentedEvent<ApiType, [H256]>;
|
||||
/**
|
||||
* A dispute has concluded with supermajority against a candidate.
|
||||
* Block authors should no longer build on top of this head and should
|
||||
* instead revert the block at the given height. This should be the
|
||||
* number of the child of the last known valid block in the chain.
|
||||
**/
|
||||
Revert: AugmentedEvent<ApiType, [u32]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
@@ -636,6 +700,10 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* A proxy was executed correctly, with the given.
|
||||
**/
|
||||
ProxyExecuted: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;
|
||||
/**
|
||||
* A proxy was removed.
|
||||
**/
|
||||
ProxyRemoved: AugmentedEvent<ApiType, [AccountId32, AccountId32, PolkadotRuntimeProxyType, u32]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
@@ -753,6 +821,10 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* An account has unbonded this amount. \[stash, amount\]
|
||||
**/
|
||||
Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||
/**
|
||||
* A validator has set their preferences.
|
||||
**/
|
||||
ValidatorPrefsSet: AugmentedEvent<ApiType, [AccountId32, PalletStakingValidatorPrefs]>;
|
||||
/**
|
||||
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
|
||||
* from the unlocking queue. \[stash, amount\]
|
||||
|
||||
@@ -6,4 +6,5 @@ import './consts';
|
||||
import './errors';
|
||||
import './events';
|
||||
import './query';
|
||||
import './registry';
|
||||
import './tx';
|
||||
|
||||
@@ -7,7 +7,7 @@ import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, W
|
||||
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, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerReleases, PalletSchedulerScheduledV3, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppPublic, PolkadotPrimitivesV1AssignmentAppPublic, PolkadotPrimitivesV1CandidateCommitments, PolkadotPrimitivesV1CoreOccupied, PolkadotPrimitivesV1ScrapedOnChainVotes, PolkadotPrimitivesV1UpgradeGoAhead, PolkadotPrimitivesV1UpgradeRestriction, PolkadotPrimitivesV2SessionInfo, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
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, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
import type { Observable } from '@polkadot/types/types';
|
||||
|
||||
declare module '@polkadot/api-base/types/storage' {
|
||||
@@ -185,8 +185,29 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
};
|
||||
balances: {
|
||||
/**
|
||||
* The balance of an account.
|
||||
* The Balances pallet example of storing the balance of an account.
|
||||
*
|
||||
* # Example
|
||||
*
|
||||
* ```nocompile
|
||||
* impl pallet_balances::Config for Runtime {
|
||||
* type AccountStore = StorageMapShim<Self::Account<Runtime>, frame_system::Provider<Runtime>, AccountId, Self::AccountData<Balance>>
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* You can also store the balance of an account in the `System` pallet.
|
||||
*
|
||||
* # Example
|
||||
*
|
||||
* ```nocompile
|
||||
* impl pallet_balances::Config for Runtime {
|
||||
* type AccountStore = System
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* But this comes with tradeoffs, storing account balances in the system pallet stores
|
||||
* `frame_system` data alongside the account data contrary to storing account balances in the
|
||||
* `Balances` pallet, which uses a `StorageMap` to store balances data only.
|
||||
* NOTE: This is only used in the case that this pallet is used to store balances.
|
||||
**/
|
||||
account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
@@ -236,6 +257,33 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
childBounties: {
|
||||
/**
|
||||
* Child bounties that have been added.
|
||||
**/
|
||||
childBounties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletChildBountiesChildBounty>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
||||
/**
|
||||
* Number of total child bounties.
|
||||
**/
|
||||
childBountyCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The description of each child-bounty.
|
||||
**/
|
||||
childBountyDescriptions: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* The cumulative child-bounty curator fee for each parent bounty.
|
||||
**/
|
||||
childrenCuratorFees: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Number of child bounties per parent bounty.
|
||||
* Map of parent bounty index to number of child bounties.
|
||||
**/
|
||||
parentChildBounties: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
claims: {
|
||||
claims: AugmentedQuery<ApiType, (arg: EthereumAddress | string | Uint8Array) => Observable<Option<u128>>, [EthereumAddress]> & QueryableStorageEntry<ApiType, [EthereumAddress]>;
|
||||
/**
|
||||
@@ -269,12 +317,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* is meant to be used only as the last resort.
|
||||
**/
|
||||
bypassConsistencyCheck: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Pending configuration (if any) for the next session.
|
||||
*
|
||||
* DEPRECATED: This is no longer used, and will be removed in the future.
|
||||
**/
|
||||
pendingConfig: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Pending configuration changes.
|
||||
*
|
||||
@@ -335,9 +377,9 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
newRaise: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Tracker for the next available trie index
|
||||
* Tracker for the next available fund index
|
||||
**/
|
||||
nextTrieIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
nextFundIndex: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -364,13 +406,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* proposal.
|
||||
**/
|
||||
lastTabledWasExternal: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Accounts for which there are locks in action which may be removed at some point in the
|
||||
* future. The value is the block number at which the lock expires and may be removed.
|
||||
*
|
||||
* TWOX-NOTE: OK ― `AccountId` is a secure hash.
|
||||
**/
|
||||
locks: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* The lowest referendum index representing an unbaked referendum. Equal to
|
||||
* `ReferendumCount` if there isn't a unbaked referendum.
|
||||
@@ -461,7 +496,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
*
|
||||
* Can be set via `set_minimum_untrusted_score`.
|
||||
**/
|
||||
minimumUntrustedScore: AugmentedQuery<ApiType, () => Observable<Option<Vec<u128>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
minimumUntrustedScore: AugmentedQuery<ApiType, () => Observable<Option<SpNposElectionsElectionScore>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Current best solution, signed or unsigned, queued to be returned upon `elect`.
|
||||
**/
|
||||
@@ -483,7 +518,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* 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<Vec<u128>, u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<BTreeMap<SpNposElectionsElectionScore, u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The next index to be assigned to an incoming signed submission.
|
||||
*
|
||||
@@ -570,13 +605,12 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
hrmpChannelContents: AugmentedQuery<ApiType, (arg: PolkadotParachainPrimitivesHrmpChannelId | { sender?: any; recipient?: any } | string | Uint8Array) => Observable<Vec<PolkadotCorePrimitivesInboundHrmpMessage>>, [PolkadotParachainPrimitivesHrmpChannelId]> & QueryableStorageEntry<ApiType, [PolkadotParachainPrimitivesHrmpChannelId]>;
|
||||
/**
|
||||
* Maintains a mapping that can be used to answer the question:
|
||||
* What paras sent a message at the given block number for a given receiver.
|
||||
* Invariants:
|
||||
* Maintains a mapping that can be used to answer the question: What paras sent a message at
|
||||
* the given block number for a given receiver. Invariants:
|
||||
* - The inner `Vec<ParaId>` is never empty.
|
||||
* - The inner `Vec<ParaId>` cannot store two same `ParaId`.
|
||||
* - The outer vector is sorted ascending by block number and cannot store two items with the same
|
||||
* block number.
|
||||
* - The outer vector is sorted ascending by block number and cannot store two items with the
|
||||
* same block number.
|
||||
**/
|
||||
hrmpChannelDigests: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[u32, Vec<u32>]>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
@@ -586,8 +620,8 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
hrmpChannels: AugmentedQuery<ApiType, (arg: PolkadotParachainPrimitivesHrmpChannelId | { sender?: any; recipient?: any } | string | Uint8Array) => Observable<Option<PolkadotRuntimeParachainsHrmpHrmpChannel>>, [PolkadotParachainPrimitivesHrmpChannelId]> & QueryableStorageEntry<ApiType, [PolkadotParachainPrimitivesHrmpChannelId]>;
|
||||
/**
|
||||
* A set of pending HRMP close channel requests that are going to be closed during the session change.
|
||||
* Used for checking if a given channel is registered for closure.
|
||||
* A set of pending HRMP close channel requests that are going to be closed during the session
|
||||
* change. Used for checking if a given channel is registered for closure.
|
||||
*
|
||||
* The set is accompanied by a list for iteration.
|
||||
*
|
||||
@@ -598,25 +632,25 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
hrmpCloseChannelRequestsList: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotParachainPrimitivesHrmpChannelId>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
hrmpEgressChannelsIndex: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Ingress/egress indexes allow to find all the senders and receivers given the opposite
|
||||
* side. I.e.
|
||||
* Ingress/egress indexes allow to find all the senders and receivers given the opposite side.
|
||||
* I.e.
|
||||
*
|
||||
* (a) ingress index allows to find all the senders for a given recipient.
|
||||
* (b) egress index allows to find all the recipients for a given sender.
|
||||
*
|
||||
* Invariants:
|
||||
* - for each ingress index entry for `P` each item `I` in the index should present in `HrmpChannels`
|
||||
* as `(I, P)`.
|
||||
* - for each egress index entry for `P` each item `E` in the index should present in `HrmpChannels`
|
||||
* as `(P, E)`.
|
||||
* - for each ingress index entry for `P` each item `I` in the index should present in
|
||||
* `HrmpChannels` as `(I, P)`.
|
||||
* - for each egress index entry for `P` each item `E` in the index should present in
|
||||
* `HrmpChannels` as `(P, E)`.
|
||||
* - there should be no other dangling channels in `HrmpChannels`.
|
||||
* - the vectors are sorted.
|
||||
**/
|
||||
hrmpIngressChannelsIndex: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<u32>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* This mapping tracks how many open channel requests are initiated by a given sender para.
|
||||
* Invariant: `HrmpOpenChannelRequests` should contain the same number of items that has `(X, _)`
|
||||
* as the number of `HrmpOpenChannelRequestCount` for `X`.
|
||||
* Invariant: `HrmpOpenChannelRequests` should contain the same number of items that has
|
||||
* `(X, _)` as the number of `HrmpOpenChannelRequestCount` for `X`.
|
||||
**/
|
||||
hrmpOpenChannelRequestCount: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
@@ -789,7 +823,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* The commitments of candidates pending availability, by `ParaId`.
|
||||
**/
|
||||
pendingAvailabilityCommitments: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV1CandidateCommitments>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
pendingAvailabilityCommitments: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV2CandidateCommitments>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -808,7 +842,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Scraped on chain data for extracting resolved disputes as well as backing votes.
|
||||
**/
|
||||
onChainVotes: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV1ScrapedOnChainVotes>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
onChainVotes: AugmentedQuery<ApiType, () => Observable<Option<PolkadotPrimitivesV2ScrapedOnChainVotes>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -854,6 +888,8 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
heads: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* All parachains. Ordered ascending by `ParaId`. Parathreads are not included.
|
||||
*
|
||||
* Consider using the [`ParachainsCache`] type of modifying.
|
||||
**/
|
||||
parachains: AugmentedQuery<ApiType, () => Observable<Vec<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
@@ -924,7 +960,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* NOTE that this field is used by parachains via merkle storage proofs, therefore changing
|
||||
* the format will require migration of parachains.
|
||||
**/
|
||||
upgradeGoAheadSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV1UpgradeGoAhead>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
upgradeGoAheadSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV2UpgradeGoAhead>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* This is used by the relay-chain to communicate that there are restrictions for performing
|
||||
* an upgrade for this parachain.
|
||||
@@ -936,7 +972,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* NOTE that this field is used by parachains via merkle storage proofs, therefore changing
|
||||
* the format will require migration of parachains.
|
||||
**/
|
||||
upgradeRestrictionSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV1UpgradeRestriction>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
upgradeRestrictionSignal: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PolkadotPrimitivesV2UpgradeRestriction>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -953,7 +989,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* * The number of parachains and parathread multiplexers
|
||||
* * The number of validators divided by `configuration.max_validators_per_core`.
|
||||
**/
|
||||
availabilityCores: AugmentedQuery<ApiType, () => Observable<Vec<Option<PolkadotPrimitivesV1CoreOccupied>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
availabilityCores: AugmentedQuery<ApiType, () => Observable<Vec<Option<PolkadotPrimitivesV2CoreOccupied>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* An index used to ensure that only one claim on a parathread exists in the queue or is
|
||||
* currently being handled by an occupied core.
|
||||
@@ -1000,13 +1036,48 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
parasDisputes: {
|
||||
/**
|
||||
* All ongoing or concluded disputes for the last several sessions.
|
||||
**/
|
||||
disputes: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<PolkadotPrimitivesV2DisputeState>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
|
||||
/**
|
||||
* Whether the chain is frozen. Starts as `None`. When this is `Some`,
|
||||
* the chain will not accept any new parachain blocks for backing or inclusion,
|
||||
* and its value indicates the last valid block number in the chain.
|
||||
* It can only be set back to `None` by governance intervention.
|
||||
**/
|
||||
frozen: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* All included blocks on the chain, as well as the block number in this chain that
|
||||
* should be reverted back to if the candidate is disputed and determined to be invalid.
|
||||
**/
|
||||
included: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: H256 | string | Uint8Array) => Observable<Option<u32>>, [u32, H256]> & QueryableStorageEntry<ApiType, [u32, H256]>;
|
||||
/**
|
||||
* The last pruned session, if any. All data stored by this module
|
||||
* references sessions.
|
||||
**/
|
||||
lastPrunedSession: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Maps session indices to a vector indicating the number of potentially-spam disputes
|
||||
* each validator is participating in. Potentially-spam disputes are remote disputes which have
|
||||
* fewer than `byzantine_threshold + 1` validators.
|
||||
*
|
||||
* The i'th entry of the vector corresponds to the i'th validator in the session.
|
||||
**/
|
||||
spamSlots: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<Vec<u32>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
paraSessionInfo: {
|
||||
/**
|
||||
* Assignment keys for the current session.
|
||||
* Note that this API is private due to it being prone to 'off-by-one' at session boundaries.
|
||||
* When in doubt, use `Sessions` API instead.
|
||||
**/
|
||||
assignmentKeysUnsafe: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV1AssignmentAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
assignmentKeysUnsafe: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV2AssignmentAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The earliest session for which previous session info is stored.
|
||||
**/
|
||||
@@ -1032,7 +1103,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* The parachain attestation keys of the validators actively participating in parachain consensus.
|
||||
* This should be the same length as `ActiveValidatorIndices`.
|
||||
**/
|
||||
activeValidatorKeys: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV0ValidatorAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
activeValidatorKeys: AugmentedQuery<ApiType, () => Observable<Vec<PolkadotPrimitivesV2ValidatorAppPublic>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The current session index.
|
||||
**/
|
||||
@@ -1139,12 +1210,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* Lookup from identity to the block number and index of the task.
|
||||
**/
|
||||
lookup: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>;
|
||||
/**
|
||||
* Storage version of the pallet.
|
||||
*
|
||||
* New networks start with last version.
|
||||
**/
|
||||
storageVersion: AugmentedQuery<ApiType, () => Observable<PalletSchedulerReleases>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -1379,7 +1444,22 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
minValidatorBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The map from nominator stash key to the set of stash keys of all validators to nominate.
|
||||
* The map from nominator stash key to their nomination preferences, namely the validators that
|
||||
* they wish to support.
|
||||
*
|
||||
* Note that the keys of this storage map might become non-decodable in case the
|
||||
* [`Config::MaxNominations`] configuration is decreased. In this rare case, these nominators
|
||||
* are still existent in storage, their key is correct and retrievable (i.e. `contains_key`
|
||||
* indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable
|
||||
* nominators will effectively not-exist, until they re-submit their preferences such that it
|
||||
* is within the bounds of the newly set `Config::MaxNominations`.
|
||||
*
|
||||
* This implies that `::iter_keys().count()` and `::iter().count()` might return different
|
||||
* values for this map. Moreover, the main `::count()` is aligned with the former, namely the
|
||||
* number of keys that exist.
|
||||
*
|
||||
* Lastly, if any of the nominators become non-decodable, they can be chilled immediately via
|
||||
* [`Call::chill_other`] dispatchable by anyone.
|
||||
**/
|
||||
nominators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletStakingNominations>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
@@ -1474,8 +1554,11 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Events deposited for the current block.
|
||||
*
|
||||
* NOTE: This storage item is explicitly unbounded since it is never intended to be read
|
||||
* from within the runtime.
|
||||
* NOTE: The item is unbound and should therefore never be read on chain.
|
||||
* It could otherwise inflate the PoV size of a block.
|
||||
*
|
||||
* Events have a large in-memory size. Box the events to not go out-of-memory
|
||||
* just in case someone still reads them from within the runtime.
|
||||
**/
|
||||
events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import '@polkadot/types-augment/registry/substrate';
|
||||
import '@polkadot/types-augment/registry/polkadot';
|
||||
@@ -7,7 +7,7 @@ import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u1
|
||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportScheduleMaybeHashed, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV0ValidatorAppSignature, PolkadotPrimitivesV1InherentData, PolkadotPrimitivesV2PvfCheckStatement, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeOriginCaller, PolkadotRuntimeProxyType, PolkadotRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportScheduleMaybeHashed, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2InherentData, PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV2ValidatorAppSignature, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeOriginCaller, PolkadotRuntimeProxyType, PolkadotRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeHeader, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, XcmV1MultiLocation, XcmV2WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
|
||||
declare module '@polkadot/api-base/types/submittable' {
|
||||
export interface AugmentedSubmittables<ApiType extends ApiTypes> {
|
||||
@@ -100,12 +100,12 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Only works if
|
||||
* - both nodes are within the same bag,
|
||||
* - and `origin` has a greater `VoteWeight` than `lighter`.
|
||||
* - and `origin` has a greater `Score` than `lighter`.
|
||||
**/
|
||||
putInFrontOf: AugmentedSubmittable<(lighter: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||
/**
|
||||
* Declare that some `dislocated` account has, through rewards or penalties, sufficiently
|
||||
* changed its weight that it should properly fall into a different bag than its current
|
||||
* changed its score that it should properly fall into a different bag than its current
|
||||
* one.
|
||||
*
|
||||
* Anyone can call this function about any potentially dislocated account.
|
||||
@@ -139,7 +139,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Set the balances of a given account.
|
||||
*
|
||||
* This will alter `FreeBalance` and `ReservedBalance` in storage. it will
|
||||
* also decrease the total issuance of the system (`TotalIssuance`).
|
||||
* also alter the total issuance of the system (`TotalIssuance`) appropriately.
|
||||
* If the new free or reserved balance is below the existential deposit,
|
||||
* it will reset the account nonce (`frame_system::AccountNonce`).
|
||||
*
|
||||
@@ -150,7 +150,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Transfer some liquid free balance to another account.
|
||||
*
|
||||
* `transfer` will set the `FreeBalance` of the sender and receiver.
|
||||
* It will decrease the total issuance of the system by the `TransferFee`.
|
||||
* If the sender's account is below the existential deposit as a result
|
||||
* of the transfer, the account will be reaped.
|
||||
*
|
||||
@@ -335,6 +334,175 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
childBounties: {
|
||||
/**
|
||||
* Accept the curator role for the child-bounty.
|
||||
*
|
||||
* The dispatch origin for this call must be the curator of this
|
||||
* child-bounty.
|
||||
*
|
||||
* A deposit will be reserved from the curator and refund upon
|
||||
* successful payout or cancellation.
|
||||
*
|
||||
* Fee for curator is deducted from curator fee of parent bounty.
|
||||
*
|
||||
* Parent bounty must be in active state, for this child-bounty call to
|
||||
* work.
|
||||
*
|
||||
* Child-bounty must be in "CuratorProposed" state, for processing the
|
||||
* call. And state of child-bounty is moved to "Active" on successful
|
||||
* call completion.
|
||||
*
|
||||
* - `parent_bounty_id`: Index of parent bounty.
|
||||
* - `child_bounty_id`: Index of child bounty.
|
||||
**/
|
||||
acceptCurator: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
|
||||
/**
|
||||
* Add a new child-bounty.
|
||||
*
|
||||
* The dispatch origin for this call must be the curator of parent
|
||||
* bounty and the parent bounty must be in "active" state.
|
||||
*
|
||||
* Child-bounty gets added successfully & fund gets transferred from
|
||||
* parent bounty to child-bounty account, if parent bounty has enough
|
||||
* funds, else the call fails.
|
||||
*
|
||||
* Upper bound to maximum number of active child bounties that can be
|
||||
* added are managed via runtime trait config
|
||||
* [`Config::MaxActiveChildBountyCount`].
|
||||
*
|
||||
* If the call is success, the status of child-bounty is updated to
|
||||
* "Added".
|
||||
*
|
||||
* - `parent_bounty_id`: Index of parent bounty for which child-bounty is being added.
|
||||
* - `value`: Value for executing the proposal.
|
||||
* - `description`: Text description for the child-bounty.
|
||||
**/
|
||||
addChildBounty: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, value: Compact<u128> | AnyNumber | Uint8Array, description: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u128>, Bytes]>;
|
||||
/**
|
||||
* Award child-bounty to a beneficiary.
|
||||
*
|
||||
* The beneficiary will be able to claim the funds after a delay.
|
||||
*
|
||||
* The dispatch origin for this call must be the parent curator or
|
||||
* curator of this child-bounty.
|
||||
*
|
||||
* Parent bounty must be in active state, for this child-bounty call to
|
||||
* work.
|
||||
*
|
||||
* Child-bounty must be in active state, for processing the call. And
|
||||
* state of child-bounty is moved to "PendingPayout" on successful call
|
||||
* completion.
|
||||
*
|
||||
* - `parent_bounty_id`: Index of parent bounty.
|
||||
* - `child_bounty_id`: Index of child bounty.
|
||||
* - `beneficiary`: Beneficiary account.
|
||||
**/
|
||||
awardChildBounty: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array, beneficiary: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>, MultiAddress]>;
|
||||
/**
|
||||
* Claim the payout from an awarded child-bounty after payout delay.
|
||||
*
|
||||
* The dispatch origin for this call may be any signed origin.
|
||||
*
|
||||
* Call works independent of parent bounty state, No need for parent
|
||||
* bounty to be in active state.
|
||||
*
|
||||
* The Beneficiary is paid out with agreed bounty value. Curator fee is
|
||||
* paid & curator deposit is unreserved.
|
||||
*
|
||||
* Child-bounty must be in "PendingPayout" state, for processing the
|
||||
* call. And instance of child-bounty is removed from the state on
|
||||
* successful call completion.
|
||||
*
|
||||
* - `parent_bounty_id`: Index of parent bounty.
|
||||
* - `child_bounty_id`: Index of child bounty.
|
||||
**/
|
||||
claimChildBounty: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
|
||||
/**
|
||||
* Cancel a proposed or active child-bounty. Child-bounty account funds
|
||||
* are transferred to parent bounty account. The child-bounty curator
|
||||
* deposit may be unreserved if possible.
|
||||
*
|
||||
* The dispatch origin for this call must be either parent curator or
|
||||
* `T::RejectOrigin`.
|
||||
*
|
||||
* If the state of child-bounty is `Active`, curator deposit is
|
||||
* unreserved.
|
||||
*
|
||||
* If the state of child-bounty is `PendingPayout`, call fails &
|
||||
* returns `PendingPayout` error.
|
||||
*
|
||||
* For the origin other than T::RejectOrigin, parent bounty must be in
|
||||
* active state, for this child-bounty call to work. For origin
|
||||
* T::RejectOrigin execution is forced.
|
||||
*
|
||||
* Instance of child-bounty is removed from the state on successful
|
||||
* call completion.
|
||||
*
|
||||
* - `parent_bounty_id`: Index of parent bounty.
|
||||
* - `child_bounty_id`: Index of child bounty.
|
||||
**/
|
||||
closeChildBounty: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
|
||||
/**
|
||||
* Propose curator for funded child-bounty.
|
||||
*
|
||||
* The dispatch origin for this call must be curator of parent bounty.
|
||||
*
|
||||
* Parent bounty must be in active state, for this child-bounty call to
|
||||
* work.
|
||||
*
|
||||
* Child-bounty must be in "Added" state, for processing the call. And
|
||||
* state of child-bounty is moved to "CuratorProposed" on successful
|
||||
* call completion.
|
||||
*
|
||||
* - `parent_bounty_id`: Index of parent bounty.
|
||||
* - `child_bounty_id`: Index of child bounty.
|
||||
* - `curator`: Address of child-bounty curator.
|
||||
* - `fee`: payment fee to child-bounty curator for execution.
|
||||
**/
|
||||
proposeCurator: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array, curator: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, fee: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>, MultiAddress, Compact<u128>]>;
|
||||
/**
|
||||
* Unassign curator from a child-bounty.
|
||||
*
|
||||
* The dispatch origin for this call can be either `RejectOrigin`, or
|
||||
* the curator of the parent bounty, or any signed origin.
|
||||
*
|
||||
* For the origin other than T::RejectOrigin and the child-bounty
|
||||
* curator, parent bounty must be in active state, for this call to
|
||||
* work. We allow child-bounty curator and T::RejectOrigin to execute
|
||||
* this call irrespective of the parent bounty state.
|
||||
*
|
||||
* If this function is called by the `RejectOrigin` or the
|
||||
* parent bounty curator, we assume that the child-bounty curator is
|
||||
* malicious or inactive. As a result, child-bounty curator deposit is
|
||||
* slashed.
|
||||
*
|
||||
* If the origin is the child-bounty curator, we take this as a sign
|
||||
* that they are unable to do their job, and are willingly giving up.
|
||||
* We could slash the deposit, but for now we allow them to unreserve
|
||||
* their deposit and exit without issue. (We may want to change this if
|
||||
* it is abused.)
|
||||
*
|
||||
* Finally, the origin can be anyone iff the child-bounty curator is
|
||||
* "inactive". Expiry update due of parent bounty is used to estimate
|
||||
* inactive state of child-bounty curator.
|
||||
*
|
||||
* This allows anyone in the community to call out that a child-bounty
|
||||
* curator is not doing their due diligence, and we should pick a new
|
||||
* one. In this case the child-bounty curator deposit is slashed.
|
||||
*
|
||||
* State of child-bounty is moved to Added state on successful call
|
||||
* completion.
|
||||
*
|
||||
* - `parent_bounty_id`: Index of parent bounty.
|
||||
* - `child_bounty_id`: Index of child bounty.
|
||||
**/
|
||||
unassignCurator: AugmentedSubmittable<(parentBountyId: Compact<u32> | AnyNumber | Uint8Array, childBountyId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
claims: {
|
||||
/**
|
||||
* Attest to a statement, needed to finalize the claims process.
|
||||
@@ -1199,6 +1367,13 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
/**
|
||||
* Trigger the governance fallback.
|
||||
*
|
||||
* This can only be called when [`Phase::Emergency`] is enabled, as an alternative to
|
||||
* calling [`Call::set_emergency_election_result`].
|
||||
**/
|
||||
governanceFallback: AugmentedSubmittable<(maybeMaxVoters: Option<u32> | null | object | string | Uint8Array, maybeMaxTargets: Option<u32> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<u32>, Option<u32>]>;
|
||||
/**
|
||||
* Set a solution in the queue, to be handed out to the client of this pallet in the next
|
||||
* call to `ElectionProvider::elect`.
|
||||
@@ -1217,7 +1392,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* This check can be turned off by setting the value to `None`.
|
||||
**/
|
||||
setMinimumUntrustedScore: AugmentedSubmittable<(maybeNextScore: Option<Vec<u128>> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<Vec<u128>>]>;
|
||||
setMinimumUntrustedScore: AugmentedSubmittable<(maybeNextScore: Option<SpNposElectionsElectionScore> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<SpNposElectionsElectionScore>]>;
|
||||
/**
|
||||
* Submit a solution for the signed phase.
|
||||
*
|
||||
@@ -1228,12 +1403,8 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* A deposit is reserved and recorded for the solution. Based on the outcome, the solution
|
||||
* might be rewarded, slashed, or get all or a part of the deposit back.
|
||||
*
|
||||
* # <weight>
|
||||
* Queue size must be provided as witness data.
|
||||
* # </weight>
|
||||
**/
|
||||
submit: AugmentedSubmittable<(rawSolution: PalletElectionProviderMultiPhaseRawSolution | { solution?: any; score?: any; round?: any } | string | Uint8Array, numSignedSubmissions: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletElectionProviderMultiPhaseRawSolution, u32]>;
|
||||
submit: AugmentedSubmittable<(rawSolution: PalletElectionProviderMultiPhaseRawSolution | { solution?: any; score?: any; round?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletElectionProviderMultiPhaseRawSolution]>;
|
||||
/**
|
||||
* Submit a solution for the unsigned phase.
|
||||
*
|
||||
@@ -1298,22 +1469,28 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* you to trigger the cleanup immediately for a specific parachain.
|
||||
*
|
||||
* Origin must be Root.
|
||||
*
|
||||
* Number of inbound and outbound channels for `para` must be provided as witness data of weighing.
|
||||
**/
|
||||
forceCleanHrmp: AugmentedSubmittable<(para: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
forceCleanHrmp: AugmentedSubmittable<(para: u32 | AnyNumber | Uint8Array, inbound: u32 | AnyNumber | Uint8Array, outbound: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, u32]>;
|
||||
/**
|
||||
* Force process HRMP close channel requests.
|
||||
*
|
||||
* If there are pending HRMP close channel requests, you can use this
|
||||
* function process all of those requests immediately.
|
||||
*
|
||||
* Total number of closing channels must be provided as witness data of weighing.
|
||||
**/
|
||||
forceProcessHrmpClose: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||
forceProcessHrmpClose: AugmentedSubmittable<(channels: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* Force process HRMP open channel requests.
|
||||
*
|
||||
* If there are pending HRMP open channel requests, you can use this
|
||||
* function process all of those requests immediately.
|
||||
*
|
||||
* Total number of opening channels must be provided as witness data of weighing.
|
||||
**/
|
||||
forceProcessHrmpOpen: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||
forceProcessHrmpOpen: AugmentedSubmittable<(channels: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* Accept a pending open channel request from the given sender.
|
||||
*
|
||||
@@ -1321,13 +1498,16 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
**/
|
||||
hrmpAcceptOpenChannel: AugmentedSubmittable<(sender: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* This cancels a pending open channel request. It can be canceled be either of the sender
|
||||
* This cancels a pending open channel request. It can be canceled by either of the sender
|
||||
* or the recipient for that request. The origin must be either of those.
|
||||
*
|
||||
* The cancellation happens immediately. It is not possible to cancel the request if it is
|
||||
* already accepted.
|
||||
*
|
||||
* Total number of open requests (i.e. `HrmpOpenChannelRequestsList`) must be provided as
|
||||
* witness data.
|
||||
**/
|
||||
hrmpCancelOpenRequest: AugmentedSubmittable<(channelId: PolkadotParachainPrimitivesHrmpChannelId | { sender?: any; recipient?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotParachainPrimitivesHrmpChannelId]>;
|
||||
hrmpCancelOpenRequest: AugmentedSubmittable<(channelId: PolkadotParachainPrimitivesHrmpChannelId | { sender?: any; recipient?: any } | string | Uint8Array, openRequests: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotParachainPrimitivesHrmpChannelId, u32]>;
|
||||
/**
|
||||
* Initiate unilateral closing of a channel. The origin must be either the sender or the
|
||||
* recipient in the channel being closed.
|
||||
@@ -1916,7 +2096,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
/**
|
||||
* Enter the paras inherent. This will process bitfields and backed candidates.
|
||||
**/
|
||||
enter: AugmentedSubmittable<(data: PolkadotPrimitivesV1InherentData | { bitfields?: any; backedCandidates?: any; disputes?: any; parentHeader?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV1InherentData]>;
|
||||
enter: AugmentedSubmittable<(data: PolkadotPrimitivesV2InherentData | { bitfields?: any; backedCandidates?: any; disputes?: any; parentHeader?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV2InherentData]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
@@ -1965,7 +2145,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Includes a statement for a PVF pre-checking vote. Potentially, finalizes the vote and
|
||||
* enacts the results if that was the last vote before achieving the supermajority.
|
||||
**/
|
||||
includePvfCheckStatement: AugmentedSubmittable<(stmt: PolkadotPrimitivesV2PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV0ValidatorAppSignature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV0ValidatorAppSignature]>;
|
||||
includePvfCheckStatement: AugmentedSubmittable<(stmt: PolkadotPrimitivesV2PvfCheckStatement | { accept?: any; subject?: any; sessionIndex?: any; validatorIndex?: any } | string | Uint8Array, signature: PolkadotPrimitivesV2ValidatorAppSignature | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV2PvfCheckStatement, PolkadotPrimitivesV2ValidatorAppSignature]>;
|
||||
/**
|
||||
* Remove the validation code from the storage iff the reference count is 0.
|
||||
*
|
||||
@@ -1979,6 +2159,13 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
parasDisputes: {
|
||||
forceUnfreeze: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
parasShared: {
|
||||
/**
|
||||
* Generic tx
|
||||
@@ -2075,7 +2262,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* - be less than the number of possible candidates. Note that all current members and
|
||||
* runners-up are also automatically candidates for the next round.
|
||||
*
|
||||
* If `value` is more than `who`'s total balance, then the maximum of the two is used.
|
||||
* If `value` is more than `who`'s free balance, then the maximum of the two is used.
|
||||
*
|
||||
* The dispatch origin of this call must be signed.
|
||||
*
|
||||
@@ -2552,14 +2739,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Can be called by the `T::SlashCancelOrigin`.
|
||||
*
|
||||
* Parameters: era and indices of the slashes for that era to kill.
|
||||
*
|
||||
* # <weight>
|
||||
* Complexity: O(U + S)
|
||||
* with U unapplied slashes weighted with U=1000
|
||||
* and S is the number of slash indices to be canceled.
|
||||
* - Read: Unapplied Slashes
|
||||
* - Write: Unapplied Slashes
|
||||
* # </weight>
|
||||
**/
|
||||
cancelDeferredSlash: AugmentedSubmittable<(era: u32 | AnyNumber | Uint8Array, slashIndices: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<u32>]>;
|
||||
/**
|
||||
@@ -2588,6 +2767,11 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* If the caller is different than the controller being targeted, the following conditions
|
||||
* must be met:
|
||||
*
|
||||
* * `controller` must belong to a nominator who has become non-decodable,
|
||||
*
|
||||
* Or:
|
||||
*
|
||||
* * A `ChillThreshold` must be set and checked which defines how close to the max
|
||||
* nominators or validators we must reach before users can start chilling one-another.
|
||||
* * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine
|
||||
@@ -2600,6 +2784,12 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* who do not satisfy these requirements.
|
||||
**/
|
||||
chillOther: AugmentedSubmittable<(controller: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||
/**
|
||||
* Force a validator to have at least the minimum commission. This will not affect a
|
||||
* validator who already has a commission greater than or equal to the minimum. Any account
|
||||
* can call this.
|
||||
**/
|
||||
forceApplyMinCommission: AugmentedSubmittable<(validatorStash: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||
/**
|
||||
* Force there to be a new era at the end of the next session. After this, it will be
|
||||
* reset to normal (non-forced) behaviour.
|
||||
@@ -2629,11 +2819,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* The election process starts multiple blocks before the end of the era.
|
||||
* If this is called just before a new era is triggered, the election process may not
|
||||
* have enough blocks to get a result.
|
||||
*
|
||||
* # <weight>
|
||||
* - Weight: O(1)
|
||||
* - Write: ForceEra
|
||||
* # </weight>
|
||||
**/
|
||||
forceNewEraAlways: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||
/**
|
||||
@@ -2658,13 +2843,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Force a current staker to become completely unstaked, immediately.
|
||||
*
|
||||
* The dispatch origin must be Root.
|
||||
*
|
||||
* # <weight>
|
||||
* O(S) where S is the number of slashing spans to be removed
|
||||
* Reads: Bonded, Slashing Spans, Account, Locks
|
||||
* Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators,
|
||||
* Account, Locks Writes Each: SpanSlash * S
|
||||
* # </weight>
|
||||
**/
|
||||
forceUnstake: AugmentedSubmittable<(stash: AccountId32 | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
|
||||
/**
|
||||
@@ -2700,7 +2878,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* # <weight>
|
||||
* - The transaction's complexity is proportional to the size of `targets` (N)
|
||||
* which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS).
|
||||
* which is capped at CompactAssignments::LIMIT (T::MaxNominations).
|
||||
* - Both the reads and writes follow a similar pattern.
|
||||
* # </weight>
|
||||
**/
|
||||
@@ -2751,7 +2929,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* # <weight>
|
||||
* - Time complexity: O(L), where L is unlocking chunks
|
||||
* - Bounded by `MAX_UNLOCKING_CHUNKS`.
|
||||
* - Bounded by `MaxUnlockingChunks`.
|
||||
* - Storage changes: Can't increase storage, only decrease it.
|
||||
* # </weight>
|
||||
**/
|
||||
@@ -2769,7 +2947,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
/**
|
||||
* (Re-)set the controller of a stash.
|
||||
*
|
||||
* Effects will be felt at the beginning of the next era.
|
||||
* Effects will be felt instantly (as soon as this function is completed successfully).
|
||||
*
|
||||
* The dispatch origin for this call must be _Signed_ by the stash, not the controller.
|
||||
*
|
||||
@@ -2814,17 +2992,12 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Set the validators who cannot be slashed (if any).
|
||||
*
|
||||
* The dispatch origin must be Root.
|
||||
*
|
||||
* # <weight>
|
||||
* - O(V)
|
||||
* - Write: Invulnerables
|
||||
* # </weight>
|
||||
**/
|
||||
setInvulnerables: AugmentedSubmittable<(invulnerables: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>]>;
|
||||
/**
|
||||
* (Re-)set the payment target for a controller.
|
||||
*
|
||||
* Effects will be felt at the beginning of the next era.
|
||||
* Effects will be felt instantly (as soon as this function is completed successfully).
|
||||
*
|
||||
* The dispatch origin for this call must be _Signed_ by the controller, not the stash.
|
||||
*
|
||||
@@ -2859,7 +3032,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* NOTE: Existing nominators and validators will not be affected by this update.
|
||||
* to kick people under the new limits, `chill_other` should be called.
|
||||
**/
|
||||
setStakingConfigs: AugmentedSubmittable<(minNominatorBond: u128 | AnyNumber | Uint8Array, minValidatorBond: u128 | AnyNumber | Uint8Array, maxNominatorCount: Option<u32> | null | object | string | Uint8Array, maxValidatorCount: Option<u32> | null | object | string | Uint8Array, chillThreshold: Option<Percent> | null | object | string | Uint8Array, minCommission: Perbill | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128, u128, Option<u32>, Option<u32>, Option<Percent>, Perbill]>;
|
||||
setStakingConfigs: AugmentedSubmittable<(minNominatorBond: PalletStakingPalletConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, minValidatorBond: PalletStakingPalletConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxNominatorCount: PalletStakingPalletConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxValidatorCount: PalletStakingPalletConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, chillThreshold: PalletStakingPalletConfigOpPercent | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, minCommission: PalletStakingPalletConfigOpPerbill | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingPalletConfigOpU32, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpPerbill]>;
|
||||
/**
|
||||
* Sets the ideal number of validators.
|
||||
*
|
||||
@@ -2881,7 +3054,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Once the unlock period is done, you can call `withdraw_unbonded` to actually move
|
||||
* the funds out of management ready for transfer.
|
||||
*
|
||||
* No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`)
|
||||
* No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`)
|
||||
* can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need
|
||||
* to be called first to remove some of the chunks (if possible).
|
||||
*
|
||||
@@ -2950,11 +3123,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
remark: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
|
||||
/**
|
||||
* Make some on-chain remark and emit event.
|
||||
*
|
||||
* # <weight>
|
||||
* - `O(b)` where b is the length of the remark.
|
||||
* - 1 event.
|
||||
* # </weight>
|
||||
**/
|
||||
remarkWithEvent: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
|
||||
/**
|
||||
@@ -3658,10 +3826,13 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
**/
|
||||
forceXcmVersion: AugmentedSubmittable<(location: XcmV1MultiLocation | { parents?: any; interior?: any } | string | Uint8Array, xcmVersion: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmV1MultiLocation, u32]>;
|
||||
/**
|
||||
* Transfer some assets from the local chain to the sovereign account of a destination chain and forward
|
||||
* a notification XCM.
|
||||
* Transfer some assets from the local chain to the sovereign account of a destination
|
||||
* chain and forward a notification XCM.
|
||||
*
|
||||
* Fee payment on the destination side is made from the first asset listed in the `assets` vector.
|
||||
* Fee payment on the destination side is made from the asset in the `assets` vector of
|
||||
* index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
|
||||
* is needed than `weight_limit`, then the operation will fail and the assets send may be
|
||||
* at risk.
|
||||
*
|
||||
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
||||
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
||||
@@ -3678,7 +3849,10 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
/**
|
||||
* Teleport some assets from the local chain to some destination chain.
|
||||
*
|
||||
* Fee payment on the destination side is made from the first asset listed in the `assets` vector.
|
||||
* Fee payment on the destination side is made from the asset in the `assets` vector of
|
||||
* index `fee_asset_item`, up to enough to pay for `weight_limit` of weight. If more weight
|
||||
* is needed than `weight_limit`, then the operation will fail and the assets send may be
|
||||
* at risk.
|
||||
*
|
||||
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
||||
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
||||
@@ -3693,12 +3867,12 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
**/
|
||||
limitedTeleportAssets: AugmentedSubmittable<(dest: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, beneficiary: XcmVersionedMultiLocation | { V0: any } | { V1: any } | string | Uint8Array, assets: XcmVersionedMultiAssets | { V0: any } | { V1: any } | string | Uint8Array, feeAssetItem: u32 | AnyNumber | Uint8Array, weightLimit: XcmV2WeightLimit | { Unlimited: any } | { Limited: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedMultiLocation, XcmVersionedMultiLocation, XcmVersionedMultiAssets, u32, XcmV2WeightLimit]>;
|
||||
/**
|
||||
* Transfer some assets from the local chain to the sovereign account of a destination chain and forward
|
||||
* a notification XCM.
|
||||
* Transfer some assets from the local chain to the sovereign account of a destination
|
||||
* chain and forward a notification XCM.
|
||||
*
|
||||
* Fee payment on the destination side is made from the first asset listed in the `assets` vector and
|
||||
* fee-weight is calculated locally and thus remote weights are assumed to be equal to
|
||||
* local weights.
|
||||
* Fee payment on the destination side is made from the asset in the `assets` vector of
|
||||
* index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,
|
||||
* with all fees taken as needed from the asset.
|
||||
*
|
||||
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
||||
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
||||
@@ -3715,9 +3889,9 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
/**
|
||||
* Teleport some assets from the local chain to some destination chain.
|
||||
*
|
||||
* Fee payment on the destination side is made from the first asset listed in the `assets` vector and
|
||||
* fee-weight is calculated locally and thus remote weights are assumed to be equal to
|
||||
* local weights.
|
||||
* Fee payment on the destination side is made from the asset in the `assets` vector of
|
||||
* index `fee_asset_item`. The weight limit for fees is not provided and thus is unlimited,
|
||||
* with all fees taken as needed from the asset.
|
||||
*
|
||||
* - `origin`: Must be capable of withdrawing the `assets` and executing XCM.
|
||||
* - `dest`: Destination context for the assets. Will typically be `X2(Parent, Parachain(..))` to send
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/* eslint-disable */
|
||||
|
||||
import type { ApiTypes } from '@polkadot/api-base/types';
|
||||
import type { U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
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 { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletContractsSchedule, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
|
||||
@@ -81,23 +81,23 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
/**
|
||||
* The list of thresholds separating the various bags.
|
||||
*
|
||||
* Ids are separated into unsorted bags according to their vote weight. This specifies the
|
||||
* thresholds separating the bags. An id's bag is the largest bag for which the id's weight
|
||||
* 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 weight tend to come before ids of lower
|
||||
* weight, but peer ids within a particular bag are sorted in insertion order.
|
||||
* 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 `VoteWeight::MAX`; that value does not need to be
|
||||
* 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
|
||||
* `VoteWeight::MAX`, the other one does not, and they are otherwise equal, the two lists
|
||||
* will behave identically.
|
||||
* `Score::MAX`, the other one does not, and they are otherwise equal, the two
|
||||
* lists will behave identically.
|
||||
*
|
||||
* # Calculation
|
||||
*
|
||||
@@ -115,8 +115,8 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* 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 weight 0 or 1 will fall
|
||||
* into bag 0, an id with weight 2 will fall into bag 1, etc.
|
||||
* - 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
|
||||
*
|
||||
@@ -149,11 +149,6 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
[key: string]: Codec;
|
||||
};
|
||||
bounties: {
|
||||
/**
|
||||
* Percentage of the curator fee that will be reserved upfront as deposit for bounty
|
||||
* curator.
|
||||
**/
|
||||
bountyCuratorDeposit: Permill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount held on deposit for placing a bounty proposal.
|
||||
**/
|
||||
@@ -170,6 +165,21 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Minimum value for a bounty.
|
||||
**/
|
||||
bountyValueMinimum: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum amount of funds that should be placed in a deposit for making a proposal.
|
||||
**/
|
||||
curatorDepositMax: Option<u128> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Minimum amount of funds that should be placed in a deposit for making a proposal.
|
||||
**/
|
||||
curatorDepositMin: Option<u128> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The curator deposit is calculated as a percentage of the curator fee.
|
||||
*
|
||||
* This deposit has optional upper and lower bounds with `CuratorDepositMax` and
|
||||
* `CuratorDepositMin`.
|
||||
**/
|
||||
curatorDepositMultiplier: Permill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount held on deposit per byte within the tip report reason or bounty description.
|
||||
**/
|
||||
@@ -186,17 +196,12 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
[key: string]: Codec;
|
||||
};
|
||||
childBounties: {
|
||||
/**
|
||||
* Percentage of child-bounty value to be reserved as curator deposit
|
||||
* when curator fee is zero.
|
||||
**/
|
||||
childBountyCuratorDepositBase: Permill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Minimum value for a child-bounty.
|
||||
**/
|
||||
childBountyValueMinimum: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum number of child-bounties that can be added to a parent bounty.
|
||||
* Maximum number of child bounties that can be added to a parent bounty.
|
||||
**/
|
||||
maxActiveChildBountyCount: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -257,6 +262,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 extrinsic 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;
|
||||
};
|
||||
democracy: {
|
||||
/**
|
||||
* Period in blocks where an external proposal may not be re-submitted after being vetoed.
|
||||
@@ -320,6 +345,26 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
[key: string]: Codec;
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
/**
|
||||
* The minimum amount of improvement to the solution score that defines a solution as
|
||||
* "better" in the Signed phase.
|
||||
**/
|
||||
betterSignedThreshold: Perbill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum amount of improvement to the solution score that defines a solution as
|
||||
* "better" in the Unsigned phase.
|
||||
**/
|
||||
betterUnsignedThreshold: Perbill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of electable targets to put in the snapshot.
|
||||
**/
|
||||
maxElectableTargets: u16 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of electing voters to put in the snapshot. At the moment, snapshots
|
||||
* are only over a single block, but once multi-block elections are introduced they will
|
||||
* take place over multiple blocks.
|
||||
**/
|
||||
maxElectingVoters: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum length (bytes) that the mined solution should consume.
|
||||
*
|
||||
@@ -357,6 +402,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Per-weight deposit for a signed solution.
|
||||
**/
|
||||
signedDepositWeight: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum amount of unchecked solutions to refund the call fee for.
|
||||
**/
|
||||
signedMaxRefunds: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum number of signed submissions that can be queued.
|
||||
*
|
||||
@@ -381,24 +430,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Base reward for a signed solution
|
||||
**/
|
||||
signedRewardBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum amount of improvement to the solution score that defines a solution as
|
||||
* "better" (in any phase).
|
||||
**/
|
||||
solutionImprovementThreshold: Perbill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Duration of the unsigned phase.
|
||||
**/
|
||||
unsignedPhase: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of voters to put in the snapshot. At the moment, snapshots are only
|
||||
* over a single block, but once multi-block elections are introduced they will take place
|
||||
* over multiple blocks.
|
||||
*
|
||||
* Also, note the data type: If the voters are represented by a `u32` in `type
|
||||
* CompactSolution`, the same `u32` is used here to ensure bounds are respected.
|
||||
**/
|
||||
voterSnapshotPerBlock: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -665,8 +700,13 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
friendDepositFactor: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum amount of friends allowed in a recovery configuration.
|
||||
*
|
||||
* NOTE: The threshold programmed in this Pallet uses u16, so it does
|
||||
* not really make sense to have a limit here greater than u16::MAX.
|
||||
* But also, that is a lot more than you should probably set this value
|
||||
* to anyway...
|
||||
**/
|
||||
maxFriends: u16 & AugmentedConst<ApiType>;
|
||||
maxFriends: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The base amount of currency needed to reserve for starting a recovery.
|
||||
*
|
||||
@@ -682,6 +722,31 @@ 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>;
|
||||
/**
|
||||
* 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;
|
||||
};
|
||||
scheduler: {
|
||||
/**
|
||||
* The maximum weight that may be scheduled per block for any dispatchables of less
|
||||
@@ -747,6 +812,9 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* Number of eras that staked funds must remain bonded for.
|
||||
**/
|
||||
bondingDuration: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum number of nominations per nominator.
|
||||
**/
|
||||
maxNominations: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of nominators rewarded for each validator.
|
||||
@@ -755,6 +823,11 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* claim their reward. This used to limit the i/o cost for the nominator payout.
|
||||
**/
|
||||
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.
|
||||
**/
|
||||
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Number of sessions per era.
|
||||
**/
|
||||
@@ -847,6 +920,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
[key: string]: Codec;
|
||||
};
|
||||
transactionPayment: {
|
||||
/**
|
||||
* The polynomial that is applied in order to derive fee from length.
|
||||
**/
|
||||
lengthToFee: Vec<FrameSupportWeightsWeightToFeeCoefficient> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* A fee mulitplier for `Operational` extrinsics to compute "virtual tip" to boost their
|
||||
* `priority`
|
||||
@@ -871,10 +948,6 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* transactions.
|
||||
**/
|
||||
operationalFeeMultiplier: u8 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The fee to be paid for making a transaction; the per-byte portion.
|
||||
**/
|
||||
transactionByteFee: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The polynomial that is applied in order to derive fee from weight.
|
||||
**/
|
||||
@@ -891,6 +964,8 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
burn: Permill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of approvals that can wait in the spending queue.
|
||||
*
|
||||
* NOTE: This parameter is also used within the Bounties Pallet extension if enabled.
|
||||
**/
|
||||
maxApprovals: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
@@ -902,6 +977,10 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
* An accepted proposal gets these back. A rejected proposal does not.
|
||||
**/
|
||||
proposalBond: Permill & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum amount of funds that should be placed in a deposit for making a proposal.
|
||||
**/
|
||||
proposalBondMaximum: Option<u128> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Minimum amount of funds that should be placed in a deposit for making a proposal.
|
||||
**/
|
||||
|
||||
@@ -131,7 +131,7 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
IdNotFound: AugmentedError<ApiType>;
|
||||
/**
|
||||
* An Id does not have a greater vote weight than another Id.
|
||||
* An Id does not have a greater score than another Id.
|
||||
**/
|
||||
NotHeavier: AugmentedError<ApiType>;
|
||||
/**
|
||||
@@ -183,7 +183,7 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
};
|
||||
bounties: {
|
||||
/**
|
||||
* The bounty cannot be closed because it has active child-bounties.
|
||||
* The bounty cannot be closed because it has active child bounties.
|
||||
**/
|
||||
HasActiveChildBounty: AugmentedError<ApiType>;
|
||||
/**
|
||||
@@ -219,6 +219,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* Require bounty curator.
|
||||
**/
|
||||
RequireCurator: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Too many approvals are already queued.
|
||||
**/
|
||||
TooManyQueued: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The bounty status is unexpected.
|
||||
**/
|
||||
@@ -238,7 +242,7 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
ParentBountyNotActive: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Number of child-bounties exceeds limit `MaxActiveChildBountyCount`.
|
||||
* Number of child bounties exceeds limit `MaxActiveChildBountyCount`.
|
||||
**/
|
||||
TooManyChildBounties: AugmentedError<ApiType>;
|
||||
/**
|
||||
@@ -255,6 +259,12 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* No code could be found at the supplied code hash.
|
||||
**/
|
||||
CodeNotFound: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The contract's code was found to be invalid during validation or instrumentation.
|
||||
* 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.
|
||||
**/
|
||||
CodeRejected: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The code supplied to `instantiate_with_code` exceeds the limit specified in the
|
||||
* current schedule.
|
||||
@@ -303,6 +313,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* `seal_call` forwarded this contracts input. It therefore is no longer available.
|
||||
**/
|
||||
InputForwarded: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Invalid combination of flags supplied to `seal_call` or `seal_delegate_call`.
|
||||
**/
|
||||
InvalidCallFlags: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A new schedule must have a greater version than the current one.
|
||||
**/
|
||||
@@ -375,6 +389,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!
|
||||
@@ -545,6 +614,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The call is not allowed at this point.
|
||||
**/
|
||||
CallNotAllowed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The fallback failed
|
||||
**/
|
||||
FallbackFailed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* `Self::insert_submission` returned an invalid index.
|
||||
**/
|
||||
@@ -1083,6 +1156,70 @@ 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 referendums 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>;
|
||||
};
|
||||
remark: {
|
||||
/**
|
||||
* Attempted to call `store` outside of block execution.
|
||||
**/
|
||||
BadContext: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Attempting to store empty data.
|
||||
**/
|
||||
Empty: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
scheduler: {
|
||||
/**
|
||||
* Failed to schedule a call
|
||||
@@ -1315,6 +1452,32 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
stateTrieMigration: {
|
||||
/**
|
||||
* bad witness data provided.
|
||||
**/
|
||||
BadWitness: AugmentedError<ApiType>;
|
||||
/**
|
||||
* max signed limits not respected.
|
||||
**/
|
||||
MaxSignedLimits: AugmentedError<ApiType>;
|
||||
/**
|
||||
* submitter does not have enough funds.
|
||||
**/
|
||||
NotEnoughFunds: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Signed migration is not allowed because the maximum limit is not set yet.
|
||||
**/
|
||||
SignedMigrationNotAllowed: AugmentedError<ApiType>;
|
||||
/**
|
||||
* upper bound of size is exceeded,
|
||||
**/
|
||||
SizeUpperBoundExceeded: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Generic error
|
||||
**/
|
||||
[key: string]: AugmentedError<ApiType>;
|
||||
};
|
||||
sudo: {
|
||||
/**
|
||||
* Sender must be the Sudo account
|
||||
@@ -1550,6 +1713,10 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
* The signing account has no permission to do the operation.
|
||||
**/
|
||||
NoPermission: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The named owner has not signed ownership of the class is acceptable.
|
||||
**/
|
||||
Unaccepted: AugmentedError<ApiType>;
|
||||
/**
|
||||
* No approval exists that would allow the transfer.
|
||||
**/
|
||||
@@ -1557,7 +1724,7 @@ declare module '@polkadot/api-base/types/errors' {
|
||||
/**
|
||||
* The given asset ID is unknown.
|
||||
**/
|
||||
Unknown: AugmentedError<ApiType>;
|
||||
UnknownClass: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The delegate turned out to be different to what was expected.
|
||||
**/
|
||||
@@ -1608,5 +1775,31 @@ 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>;
|
||||
};
|
||||
} // AugmentedErrors
|
||||
} // declare module
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { ApiTypes } 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, NodeRuntimeProxyType, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletStakingExposure, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPostDispatchInfo, NodeRuntimeProxyType, PalletConvictionVotingTally, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletStakingExposure, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationCompute, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo } from '@polkadot/types/lookup';
|
||||
|
||||
declare module '@polkadot/api-base/types/events' {
|
||||
export interface AugmentedEvents<ApiType extends ApiTypes> {
|
||||
@@ -211,6 +211,10 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* Code with the specified hash has been stored.
|
||||
**/
|
||||
CodeStored: AugmentedEvent<ApiType, [H256]>;
|
||||
/**
|
||||
* A contract's code was updated.
|
||||
**/
|
||||
ContractCodeUpdated: AugmentedEvent<ApiType, [AccountId32, H256, H256]>;
|
||||
/**
|
||||
* A custom event emitted by the contract.
|
||||
**/
|
||||
@@ -233,6 +237,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.
|
||||
@@ -645,6 +663,10 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* A proxy was executed correctly, with the given.
|
||||
**/
|
||||
ProxyExecuted: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;
|
||||
/**
|
||||
* A proxy was removed.
|
||||
**/
|
||||
ProxyRemoved: AugmentedEvent<ApiType, [AccountId32, AccountId32, NodeRuntimeProxyType, u32]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
@@ -680,6 +702,68 @@ 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, [u32]>;
|
||||
/**
|
||||
* A referendum has been cancelled.
|
||||
**/
|
||||
Cancelled: AugmentedEvent<ApiType, [u32, PalletConvictionVotingTally]>;
|
||||
ConfirmAborted: AugmentedEvent<ApiType, [u32]>;
|
||||
/**
|
||||
* A referendum has ended its confirmation phase and is ready for approval.
|
||||
**/
|
||||
Confirmed: AugmentedEvent<ApiType, [u32, PalletConvictionVotingTally]>;
|
||||
ConfirmStarted: AugmentedEvent<ApiType, [u32]>;
|
||||
/**
|
||||
* The decision deposit has been placed.
|
||||
**/
|
||||
DecisionDepositPlaced: AugmentedEvent<ApiType, [u32, AccountId32, u128]>;
|
||||
/**
|
||||
* The decision deposit has been refunded.
|
||||
**/
|
||||
DecisionDepositRefunded: AugmentedEvent<ApiType, [u32, AccountId32, u128]>;
|
||||
/**
|
||||
* A referendum has moved into the deciding phase.
|
||||
**/
|
||||
DecisionStarted: AugmentedEvent<ApiType, [u32, u8, H256, PalletConvictionVotingTally]>;
|
||||
/**
|
||||
* A deposit has been slashaed.
|
||||
**/
|
||||
DepositSlashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||
/**
|
||||
* A referendum has been killed.
|
||||
**/
|
||||
Killed: AugmentedEvent<ApiType, [u32, PalletConvictionVotingTally]>;
|
||||
/**
|
||||
* A proposal has been rejected by referendum.
|
||||
**/
|
||||
Rejected: AugmentedEvent<ApiType, [u32, PalletConvictionVotingTally]>;
|
||||
/**
|
||||
* A referendum has being submitted.
|
||||
**/
|
||||
Submitted: AugmentedEvent<ApiType, [u32, u8, H256]>;
|
||||
/**
|
||||
* A referendum has been timed out without being decided.
|
||||
**/
|
||||
TimedOut: AugmentedEvent<ApiType, [u32, PalletConvictionVotingTally]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
remark: {
|
||||
/**
|
||||
* Stored data off chain.
|
||||
**/
|
||||
Stored: AugmentedEvent<ApiType, [AccountId32, H256]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
scheduler: {
|
||||
/**
|
||||
* The call for the provided hash was not found so the task has been aborted.
|
||||
@@ -839,6 +923,10 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* An account has unbonded this amount. \[stash, amount\]
|
||||
**/
|
||||
Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||
/**
|
||||
* A validator has set their preferences.
|
||||
**/
|
||||
ValidatorPrefsSet: AugmentedEvent<ApiType, [AccountId32, PalletStakingValidatorPrefs]>;
|
||||
/**
|
||||
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
|
||||
* from the unlocking queue. \[stash, amount\]
|
||||
@@ -849,6 +937,29 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
stateTrieMigration: {
|
||||
/**
|
||||
* The auto migration task finished.
|
||||
**/
|
||||
AutoMigrationFinished: AugmentedEvent<ApiType, []>;
|
||||
/**
|
||||
* Migration got halted.
|
||||
**/
|
||||
Halted: AugmentedEvent<ApiType, []>;
|
||||
/**
|
||||
* Given number of `(top, child)` keys were migrated respectively, with the given
|
||||
* `compute`.
|
||||
**/
|
||||
Migrated: AugmentedEvent<ApiType, [u32, u32, PalletStateTrieMigrationMigrationCompute]>;
|
||||
/**
|
||||
* Some account got slashed by the given amount.
|
||||
**/
|
||||
Slashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
sudo: {
|
||||
/**
|
||||
* The \[sudoer\] just switched identity; the old key is supplied if one existed.
|
||||
@@ -1116,6 +1227,10 @@ declare module '@polkadot/api-base/types/events' {
|
||||
* The owner changed.
|
||||
**/
|
||||
OwnerChanged: AugmentedEvent<ApiType, [u32, AccountId32]>;
|
||||
/**
|
||||
* Ownership acceptance has changed for an account.
|
||||
**/
|
||||
OwnershipAcceptanceChanged: AugmentedEvent<ApiType, [AccountId32, Option<u32>]>;
|
||||
/**
|
||||
* Metadata has been cleared for an asset instance.
|
||||
**/
|
||||
@@ -1175,5 +1290,14 @@ declare module '@polkadot/api-base/types/events' {
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
whitelist: {
|
||||
CallWhitelisted: AugmentedEvent<ApiType, [H256]>;
|
||||
WhitelistedCallDispatched: AugmentedEvent<ApiType, [H256, Result<FrameSupportWeightsPostDispatchInfo, SpRuntimeDispatchErrorWithPostInfo>]>;
|
||||
WhitelistedCallRemoved: AugmentedEvent<ApiType, [H256]>;
|
||||
/**
|
||||
* Generic event
|
||||
**/
|
||||
[key: string]: AugmentedEvent<ApiType>;
|
||||
};
|
||||
} // AugmentedEvents
|
||||
} // declare module
|
||||
|
||||
@@ -6,4 +6,5 @@ import './consts';
|
||||
import './errors';
|
||||
import './events';
|
||||
import './query';
|
||||
import './registry';
|
||||
import './tx';
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { Data } from '@polkadot/types';
|
||||
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, WrapperOpaque, bool, u128, 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, NodeRuntimeSessionKeys, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageDeletedContract, PalletContractsStorageRawContractInfo, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerReleases, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesClassDetails, PalletUniquesClassMetadata, PalletUniquesInstanceDetails, PalletUniquesInstanceMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, NodeRuntimeSessionKeys, 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, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfo, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesClassDetails, PalletUniquesClassMetadata, PalletUniquesInstanceDetails, PalletUniquesInstanceMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
|
||||
import type { Observable } from '@polkadot/types/types';
|
||||
|
||||
declare module '@polkadot/api-base/types/storage' {
|
||||
@@ -193,8 +193,29 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
};
|
||||
balances: {
|
||||
/**
|
||||
* The balance of an account.
|
||||
* The Balances pallet example of storing the balance of an account.
|
||||
*
|
||||
* # Example
|
||||
*
|
||||
* ```nocompile
|
||||
* impl pallet_balances::Config for Runtime {
|
||||
* type AccountStore = StorageMapShim<Self::Account<Runtime>, frame_system::Provider<Runtime>, AccountId, Self::AccountData<Balance>>
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* You can also store the balance of an account in the `System` pallet.
|
||||
*
|
||||
* # Example
|
||||
*
|
||||
* ```nocompile
|
||||
* impl pallet_balances::Config for Runtime {
|
||||
* type AccountStore = System
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* But this comes with tradeoffs, storing account balances in the system pallet stores
|
||||
* `frame_system` data alongside the account data contrary to storing account balances in the
|
||||
* `Balances` pallet, which uses a `StorageMap` to store balances data only.
|
||||
* NOTE: This is only used in the case that this pallet is used to store balances.
|
||||
**/
|
||||
account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
@@ -246,7 +267,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
};
|
||||
childBounties: {
|
||||
/**
|
||||
* Child-bounties that have been added.
|
||||
* Child bounties that have been added.
|
||||
**/
|
||||
childBounties: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletChildBountiesChildBounty>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
||||
/**
|
||||
@@ -262,7 +283,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
childrenCuratorFees: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u128>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
/**
|
||||
* Number of child-bounties per parent bounty.
|
||||
* Number of child bounties per parent bounty.
|
||||
* Map of parent bounty index to number of child bounties.
|
||||
**/
|
||||
parentChildBounties: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<u32>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
|
||||
@@ -272,10 +293,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
contracts: {
|
||||
/**
|
||||
* The subtrie counter.
|
||||
**/
|
||||
accountCounter: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* A mapping between an original code hash and instrumented wasm code, ready for execution.
|
||||
**/
|
||||
@@ -293,6 +310,31 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* stored in said trie. Therefore this operation is performed lazily in `on_initialize`.
|
||||
**/
|
||||
deletionQueue: AugmentedQuery<ApiType, () => Observable<Vec<PalletContractsStorageDeletedContract>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* This is a **monotonic** counter incremented on contract instantiation.
|
||||
*
|
||||
* This is used in order to generate unique trie ids for contracts.
|
||||
* The trie id of a new contract is calculated from hash(account_id, nonce).
|
||||
* The nonce is required because otherwise the following sequence would lead to
|
||||
* a possible collision of storage:
|
||||
*
|
||||
* 1. Create a new contract.
|
||||
* 2. Terminate the contract.
|
||||
* 3. Immediately recreate the contract with the same account_id.
|
||||
*
|
||||
* This is bad because the contents of a trie are deleted lazily and there might be
|
||||
* storage of the old instantiation still in it when the new contract is created. Please
|
||||
* note that we can't replace the counter by the block number because the sequence above
|
||||
* can happen in the same block. We also can't keep the account counter in memory only
|
||||
* because storage is the only way to communicate across different extrinsics in the
|
||||
* same block.
|
||||
*
|
||||
* # Note
|
||||
*
|
||||
* Do not use it to determine the number of contracts. It won't be decremented if
|
||||
* a contract is destroyed.
|
||||
**/
|
||||
nonce: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* A mapping between an original code hash and its owner information.
|
||||
**/
|
||||
@@ -306,6 +348,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<[u8, 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: u8 | AnyNumber | Uint8Array) => Observable<PalletConvictionVotingVoteVoting>, [AccountId32, u8]> & QueryableStorageEntry<ApiType, [AccountId32, u8]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
council: {
|
||||
/**
|
||||
* The current members of the collective. This is stored sorted (just by value).
|
||||
@@ -357,13 +416,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* proposal.
|
||||
**/
|
||||
lastTabledWasExternal: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Accounts for which there are locks in action which may be removed at some point in the
|
||||
* future. The value is the block number at which the lock expires and may be removed.
|
||||
*
|
||||
* TWOX-NOTE: OK ― `AccountId` is a secure hash.
|
||||
**/
|
||||
locks: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* The lowest referendum index representing an unbaked referendum. Equal to
|
||||
* `ReferendumCount` if there isn't a unbaked referendum.
|
||||
@@ -434,7 +486,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
*
|
||||
* Can be set via `set_minimum_untrusted_score`.
|
||||
**/
|
||||
minimumUntrustedScore: AugmentedQuery<ApiType, () => Observable<Option<Vec<u128>>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
minimumUntrustedScore: AugmentedQuery<ApiType, () => Observable<Option<SpNposElectionsElectionScore>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Current best solution, signed or unsigned, queued to be returned upon `elect`.
|
||||
**/
|
||||
@@ -456,7 +508,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* 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<Vec<u128>, u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<BTreeMap<SpNposElectionsElectionScore, u32>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The next index to be assigned to an incoming signed submission.
|
||||
*
|
||||
@@ -820,6 +872,31 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
referenda: {
|
||||
/**
|
||||
* The number of referenda being decided currently.
|
||||
**/
|
||||
decidingCount: AugmentedQuery<ApiType, (arg: u8 | AnyNumber | Uint8Array) => Observable<u32>, [u8]> & QueryableStorageEntry<ApiType, [u8]>;
|
||||
/**
|
||||
* 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<PalletReferendaReferendumInfo>>, [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: u8 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[u32, u128]>>>, [u8]> & QueryableStorageEntry<ApiType, [u8]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
scheduler: {
|
||||
/**
|
||||
* Items to be executed, indexed by the block number that they should be executed on.
|
||||
@@ -829,12 +906,6 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* Lookup from identity to the block number and index of the task.
|
||||
**/
|
||||
lookup: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>;
|
||||
/**
|
||||
* Storage version of the pallet.
|
||||
*
|
||||
* New networks start with last version.
|
||||
**/
|
||||
storageVersion: AugmentedQuery<ApiType, () => Observable<PalletSchedulerReleases>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -1115,7 +1186,22 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
minValidatorBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The map from nominator stash key to the set of stash keys of all validators to nominate.
|
||||
* The map from nominator stash key to their nomination preferences, namely the validators that
|
||||
* they wish to support.
|
||||
*
|
||||
* Note that the keys of this storage map might become non-decodable in case the
|
||||
* [`Config::MaxNominations`] configuration is decreased. In this rare case, these nominators
|
||||
* are still existent in storage, their key is correct and retrievable (i.e. `contains_key`
|
||||
* indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable
|
||||
* nominators will effectively not-exist, until they re-submit their preferences such that it
|
||||
* is within the bounds of the newly set `Config::MaxNominations`.
|
||||
*
|
||||
* This implies that `::iter_keys().count()` and `::iter().count()` might return different
|
||||
* values for this map. Moreover, the main `::count()` is aligned with the former, namely the
|
||||
* number of keys that exist.
|
||||
*
|
||||
* Lastly, if any of the nominators become non-decodable, they can be chilled immediately via
|
||||
* [`Call::chill_other`] dispatchable by anyone.
|
||||
**/
|
||||
nominators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletStakingNominations>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
@@ -1182,6 +1268,31 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
stateTrieMigration: {
|
||||
/**
|
||||
* The limits that are imposed on automatic migrations.
|
||||
*
|
||||
* If set to None, then no automatic migration happens.
|
||||
**/
|
||||
autoLimits: AugmentedQuery<ApiType, () => Observable<Option<PalletStateTrieMigrationMigrationLimits>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Migration progress.
|
||||
*
|
||||
* This stores the snapshot of the last migrated keys. It can be set into motion and move
|
||||
* forward by any of the means provided by this pallet.
|
||||
**/
|
||||
migrationProcess: AugmentedQuery<ApiType, () => Observable<PalletStateTrieMigrationMigrationTask>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* The maximum limits that the signed migration could use.
|
||||
*
|
||||
* If not set, no signed submission is allowed.
|
||||
**/
|
||||
signedMigrationMaxLimits: AugmentedQuery<ApiType, () => Observable<Option<PalletStateTrieMigrationMigrationLimits>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
[key: string]: QueryableStorageEntry<ApiType>;
|
||||
};
|
||||
sudo: {
|
||||
/**
|
||||
* The `AccountId` of the sudo key.
|
||||
@@ -1220,8 +1331,11 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
/**
|
||||
* Events deposited for the current block.
|
||||
*
|
||||
* NOTE: This storage item is explicitly unbounded since it is never intended to be read
|
||||
* from within the runtime.
|
||||
* NOTE: The item is unbound and should therefore never be read on chain.
|
||||
* It could otherwise inflate the PoV size of a block.
|
||||
*
|
||||
* Events have a large in-memory size. Box the events to not go out-of-memory
|
||||
* just in case someone still reads them from within the runtime.
|
||||
**/
|
||||
events: AugmentedQuery<ApiType, () => Observable<Vec<FrameSystemEventRecord>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||
/**
|
||||
@@ -1447,6 +1561,10 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* Metadata of an asset instance.
|
||||
**/
|
||||
instanceMetadataOf: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesInstanceMetadata>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
|
||||
/**
|
||||
* The class, if any, of which an account is willing to take ownership.
|
||||
**/
|
||||
ownershipAcceptance: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
* Generic query
|
||||
**/
|
||||
@@ -1468,5 +1586,12 @@ 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>;
|
||||
};
|
||||
} // AugmentedQueries
|
||||
} // declare module
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import '@polkadot/types-augment/registry/substrate';
|
||||
@@ -6,7 +6,7 @@ import type { Data } from '@polkadot/types';
|
||||
import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportScheduleMaybeHashed, NodeRuntimeOriginCaller, NodeRuntimeProxyType, NodeRuntimeSessionKeys, PalletAssetsDestroyWitness, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletSocietyJudgement, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsSupport, SpRuntimeHeader, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportScheduleDispatchTime, FrameSupportScheduleMaybeHashed, NodeRuntimeOriginCaller, NodeRuntimeProxyType, NodeRuntimeSessionKeys, PalletAssetsDestroyWitness, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeHeader, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof } from '@polkadot/types/lookup';
|
||||
|
||||
declare module '@polkadot/api-base/types/submittable' {
|
||||
export interface AugmentedSubmittables<ApiType extends ApiTypes> {
|
||||
@@ -494,12 +494,12 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Only works if
|
||||
* - both nodes are within the same bag,
|
||||
* - and `origin` has a greater `VoteWeight` than `lighter`.
|
||||
* - and `origin` has a greater `Score` than `lighter`.
|
||||
**/
|
||||
putInFrontOf: AugmentedSubmittable<(lighter: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||
/**
|
||||
* Declare that some `dislocated` account has, through rewards or penalties, sufficiently
|
||||
* changed its weight that it should properly fall into a different bag than its current
|
||||
* changed its score that it should properly fall into a different bag than its current
|
||||
* one.
|
||||
*
|
||||
* Anyone can call this function about any potentially dislocated account.
|
||||
@@ -761,7 +761,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* parent bounty to child-bounty account, if parent bounty has enough
|
||||
* funds, else the call fails.
|
||||
*
|
||||
* Upper bound to maximum number of active child-bounties that can be
|
||||
* Upper bound to maximum number of active child bounties that can be
|
||||
* added are managed via runtime trait config
|
||||
* [`Config::MaxActiveChildBountyCount`].
|
||||
*
|
||||
@@ -778,7 +778,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* The beneficiary will be able to claim the funds after a delay.
|
||||
*
|
||||
* The dispatch origin for this call must be the master curator or
|
||||
* The dispatch origin for this call must be the parent curator or
|
||||
* curator of this child-bounty.
|
||||
*
|
||||
* Parent bounty must be in active state, for this child-bounty call to
|
||||
@@ -862,12 +862,12 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* the curator of the parent bounty, or any signed origin.
|
||||
*
|
||||
* For the origin other than T::RejectOrigin and the child-bounty
|
||||
* curator, parent-bounty must be in active state, for this call to
|
||||
* curator, parent bounty must be in active state, for this call to
|
||||
* work. We allow child-bounty curator and T::RejectOrigin to execute
|
||||
* this call irrespective of the parent-bounty state.
|
||||
* this call irrespective of the parent bounty state.
|
||||
*
|
||||
* If this function is called by the `RejectOrigin` or the
|
||||
* parent-bounty curator, we assume that the child-bounty curator is
|
||||
* parent bounty curator, we assume that the child-bounty curator is
|
||||
* malicious or inactive. As a result, child-bounty curator deposit is
|
||||
* slashed.
|
||||
*
|
||||
@@ -985,6 +985,130 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
convictionVoting: {
|
||||
/**
|
||||
* Delegate the voting power (with some given conviction) of the sending account for a
|
||||
* particular class of polls.
|
||||
*
|
||||
* The balance delegated is locked for as long as it's delegated, and thereafter for the
|
||||
* time appropriate for the conviction's lock period.
|
||||
*
|
||||
* The dispatch origin of this call must be _Signed_, and the signing account must either:
|
||||
* - be delegating already; or
|
||||
* - have no voting activity (if there is, then it will need to be removed/consolidated
|
||||
* through `reap_vote` or `unvote`).
|
||||
*
|
||||
* - `to`: The account whose voting the `target` account's voting power will follow.
|
||||
* - `class`: The class of polls to delegate. To delegate multiple classes, multiple calls
|
||||
* to this function are required.
|
||||
* - `conviction`: The conviction that will be attached to the delegated votes. When the
|
||||
* account is undelegated, the funds will be locked for the corresponding period.
|
||||
* - `balance`: The amount of the account's balance to be used in delegating. This must not
|
||||
* be more than the account's current balance.
|
||||
*
|
||||
* Emits `Delegated`.
|
||||
*
|
||||
* Weight: `O(R)` where R is the number of polls the voter delegating to has
|
||||
* voted on. Weight is initially charged as if maximum votes, but is refunded later.
|
||||
**/
|
||||
delegate: AugmentedSubmittable<(clazz: u8 | AnyNumber | Uint8Array, to: AccountId32 | string | Uint8Array, conviction: PalletConvictionVotingConviction | 'None' | 'Locked1x' | 'Locked2x' | 'Locked3x' | 'Locked4x' | 'Locked5x' | 'Locked6x' | number | Uint8Array, balance: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u8, AccountId32, PalletConvictionVotingConviction, u128]>;
|
||||
/**
|
||||
* Remove a vote for a poll.
|
||||
*
|
||||
* If the `target` is equal to the signer, then this function is exactly equivalent to
|
||||
* `remove_vote`. If not equal to the signer, then the vote must have expired,
|
||||
* either because the poll was cancelled, because the voter lost the poll or
|
||||
* because the conviction period is over.
|
||||
*
|
||||
* The dispatch origin of this call must be _Signed_.
|
||||
*
|
||||
* - `target`: The account of the vote to be removed; this account must have voted for poll
|
||||
* `index`.
|
||||
* - `index`: The index of poll of the vote to be removed.
|
||||
* - `class`: The class of the poll.
|
||||
*
|
||||
* Weight: `O(R + log R)` where R is the number of polls that `target` has voted on.
|
||||
* Weight is calculated for the maximum number of vote.
|
||||
**/
|
||||
removeOtherVote: AugmentedSubmittable<(target: AccountId32 | string | Uint8Array, clazz: u8 | AnyNumber | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u8, u32]>;
|
||||
/**
|
||||
* Remove a vote for a poll.
|
||||
*
|
||||
* If:
|
||||
* - the poll was cancelled, or
|
||||
* - the poll is ongoing, or
|
||||
* - the poll has ended such that
|
||||
* - the vote of the account was in opposition to the result; or
|
||||
* - there was no conviction to the account's vote; or
|
||||
* - the account made a split vote
|
||||
* ...then the vote is removed cleanly and a following call to `unlock` may result in more
|
||||
* funds being available.
|
||||
*
|
||||
* If, however, the poll has ended and:
|
||||
* - it finished corresponding to the vote of the account, and
|
||||
* - the account made a standard vote with conviction, and
|
||||
* - the lock period of the conviction is not over
|
||||
* ...then the lock will be aggregated into the overall account's lock, which may involve
|
||||
* *overlocking* (where the two locks are combined into a single lock that is the maximum
|
||||
* of both the amount locked and the time is it locked for).
|
||||
*
|
||||
* The dispatch origin of this call must be _Signed_, and the signer must have a vote
|
||||
* registered for poll `index`.
|
||||
*
|
||||
* - `index`: The index of poll of the vote to be removed.
|
||||
* - `class`: Optional parameter, if given it indicates the class of the poll. For polls
|
||||
* which have finished or are cancelled, this must be `Some`.
|
||||
*
|
||||
* Weight: `O(R + log R)` where R is the number of polls that `target` has voted on.
|
||||
* Weight is calculated for the maximum number of vote.
|
||||
**/
|
||||
removeVote: AugmentedSubmittable<(clazz: Option<u8> | null | object | string | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<u8>, u32]>;
|
||||
/**
|
||||
* Undelegate the voting power of the sending account for a particular class of polls.
|
||||
*
|
||||
* Tokens may be unlocked following once an amount of time consistent with the lock period
|
||||
* of the conviction with which the delegation was issued.
|
||||
*
|
||||
* The dispatch origin of this call must be _Signed_ and the signing account must be
|
||||
* currently delegating.
|
||||
*
|
||||
* - `class`: The class of polls to remove the delegation from.
|
||||
*
|
||||
* Emits `Undelegated`.
|
||||
*
|
||||
* Weight: `O(R)` where R is the number of polls the voter delegating to has
|
||||
* voted on. Weight is initially charged as if maximum votes, but is refunded later.
|
||||
**/
|
||||
undelegate: AugmentedSubmittable<(clazz: u8 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u8]>;
|
||||
/**
|
||||
* Remove the lock caused prior voting/delegating which has expired within a particluar
|
||||
* class.
|
||||
*
|
||||
* The dispatch origin of this call must be _Signed_.
|
||||
*
|
||||
* - `class`: The class of polls to unlock.
|
||||
* - `target`: The account to remove the lock on.
|
||||
*
|
||||
* Weight: `O(R)` with R number of vote of target.
|
||||
**/
|
||||
unlock: AugmentedSubmittable<(clazz: u8 | AnyNumber | Uint8Array, target: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u8, AccountId32]>;
|
||||
/**
|
||||
* Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal;
|
||||
* otherwise it is a vote to keep the status quo.
|
||||
*
|
||||
* The dispatch origin of this call must be _Signed_.
|
||||
*
|
||||
* - `poll_index`: The index of the poll to vote for.
|
||||
* - `vote`: The vote configuration.
|
||||
*
|
||||
* Weight: `O(R)` where R is the number of polls the voter has voted on.
|
||||
**/
|
||||
vote: AugmentedSubmittable<(pollIndex: Compact<u32> | AnyNumber | Uint8Array, vote: PalletConvictionVotingVoteAccountVote | { Standard: any } | { Split: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, PalletConvictionVotingVoteAccountVote]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
council: {
|
||||
/**
|
||||
* Close a vote that is either approved, disapproved or whose voting period has ended.
|
||||
@@ -1477,6 +1601,13 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
/**
|
||||
* Trigger the governance fallback.
|
||||
*
|
||||
* This can only be called when [`Phase::Emergency`] is enabled, as an alternative to
|
||||
* calling [`Call::set_emergency_election_result`].
|
||||
**/
|
||||
governanceFallback: AugmentedSubmittable<(maybeMaxVoters: Option<u32> | null | object | string | Uint8Array, maybeMaxTargets: Option<u32> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<u32>, Option<u32>]>;
|
||||
/**
|
||||
* Set a solution in the queue, to be handed out to the client of this pallet in the next
|
||||
* call to `ElectionProvider::elect`.
|
||||
@@ -1495,7 +1626,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* This check can be turned off by setting the value to `None`.
|
||||
**/
|
||||
setMinimumUntrustedScore: AugmentedSubmittable<(maybeNextScore: Option<Vec<u128>> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<Vec<u128>>]>;
|
||||
setMinimumUntrustedScore: AugmentedSubmittable<(maybeNextScore: Option<SpNposElectionsElectionScore> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<SpNposElectionsElectionScore>]>;
|
||||
/**
|
||||
* Submit a solution for the signed phase.
|
||||
*
|
||||
@@ -1506,12 +1637,8 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* A deposit is reserved and recorded for the solution. Based on the outcome, the solution
|
||||
* might be rewarded, slashed, or get all or a part of the deposit back.
|
||||
*
|
||||
* # <weight>
|
||||
* Queue size must be provided as witness data.
|
||||
* # </weight>
|
||||
**/
|
||||
submit: AugmentedSubmittable<(rawSolution: PalletElectionProviderMultiPhaseRawSolution | { solution?: any; score?: any; round?: any } | string | Uint8Array, numSignedSubmissions: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletElectionProviderMultiPhaseRawSolution, u32]>;
|
||||
submit: AugmentedSubmittable<(rawSolution: PalletElectionProviderMultiPhaseRawSolution | { solution?: any; score?: any; round?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletElectionProviderMultiPhaseRawSolution]>;
|
||||
/**
|
||||
* Submit a solution for the unsigned phase.
|
||||
*
|
||||
@@ -1624,7 +1751,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* - be less than the number of possible candidates. Note that all current members and
|
||||
* runners-up are also automatically candidates for the next round.
|
||||
*
|
||||
* If `value` is more than `who`'s total balance, then the maximum of the two is used.
|
||||
* If `value` is more than `who`'s free balance, then the maximum of the two is used.
|
||||
*
|
||||
* The dispatch origin of this call must be signed.
|
||||
*
|
||||
@@ -2751,6 +2878,92 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
referenda: {
|
||||
/**
|
||||
* Cancel an ongoing referendum.
|
||||
*
|
||||
* - `origin`: must be the `CancelOrigin`.
|
||||
* - `index`: The index of the referendum to be cancelled.
|
||||
*
|
||||
* Emits `Cancelled`.
|
||||
**/
|
||||
cancel: AugmentedSubmittable<(index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* Cancel an ongoing referendum and slash the deposits.
|
||||
*
|
||||
* - `origin`: must be the `KillOrigin`.
|
||||
* - `index`: The index of the referendum to be cancelled.
|
||||
*
|
||||
* Emits `Killed` and `DepositSlashed`.
|
||||
**/
|
||||
kill: AugmentedSubmittable<(index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* Advance a referendum onto its next logical state. Only used internally.
|
||||
*
|
||||
* - `origin`: must be `Root`.
|
||||
* - `index`: the referendum to be advanced.
|
||||
**/
|
||||
nudgeReferendum: AugmentedSubmittable<(index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* Advance a track onto its next logical state. Only used internally.
|
||||
*
|
||||
* - `origin`: must be `Root`.
|
||||
* - `track`: the track to be advanced.
|
||||
*
|
||||
* Action item for when there is now one fewer referendum in the deciding phase and the
|
||||
* `DecidingCount` is not yet updated. This means that we should either:
|
||||
* - begin deciding another referendum (and leave `DecidingCount` alone); or
|
||||
* - decrement `DecidingCount`.
|
||||
**/
|
||||
oneFewerDeciding: AugmentedSubmittable<(track: u8 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u8]>;
|
||||
/**
|
||||
* Post the Decision Deposit for a referendum.
|
||||
*
|
||||
* - `origin`: must be `Signed` and the account must have funds available for the
|
||||
* referendum's track's Decision Deposit.
|
||||
* - `index`: The index of the submitted referendum whose Decision Deposit is yet to be
|
||||
* posted.
|
||||
*
|
||||
* Emits `DecisionDepositPlaced`.
|
||||
**/
|
||||
placeDecisionDeposit: AugmentedSubmittable<(index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* Refund the Decision Deposit for a closed referendum back to the depositor.
|
||||
*
|
||||
* - `origin`: must be `Signed` or `Root`.
|
||||
* - `index`: The index of a closed referendum whose Decision Deposit has not yet been
|
||||
* refunded.
|
||||
*
|
||||
* Emits `DecisionDepositRefunded`.
|
||||
**/
|
||||
refundDecisionDeposit: AugmentedSubmittable<(index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* Propose a referendum on a privileged action.
|
||||
*
|
||||
* - `origin`: must be `Signed` and the account must have `SubmissionDeposit` funds
|
||||
* available.
|
||||
* - `proposal_origin`: The origin from which the proposal should be executed.
|
||||
* - `proposal_hash`: The hash of the proposal preimage.
|
||||
* - `enactment_moment`: The moment that the proposal should be enacted.
|
||||
*
|
||||
* Emits `Submitted`.
|
||||
**/
|
||||
submit: AugmentedSubmittable<(proposalOrigin: NodeRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | string | Uint8Array, proposalHash: H256 | string | Uint8Array, enactmentMoment: FrameSupportScheduleDispatchTime | { At: any } | { After: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [NodeRuntimeOriginCaller, H256, FrameSupportScheduleDispatchTime]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
remark: {
|
||||
/**
|
||||
* Index and store data off chain.
|
||||
**/
|
||||
store: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
scheduler: {
|
||||
/**
|
||||
* Cancel an anonymously scheduled task.
|
||||
@@ -3203,14 +3416,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Can be called by the `T::SlashCancelOrigin`.
|
||||
*
|
||||
* Parameters: era and indices of the slashes for that era to kill.
|
||||
*
|
||||
* # <weight>
|
||||
* Complexity: O(U + S)
|
||||
* with U unapplied slashes weighted with U=1000
|
||||
* and S is the number of slash indices to be canceled.
|
||||
* - Read: Unapplied Slashes
|
||||
* - Write: Unapplied Slashes
|
||||
* # </weight>
|
||||
**/
|
||||
cancelDeferredSlash: AugmentedSubmittable<(era: u32 | AnyNumber | Uint8Array, slashIndices: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<u32>]>;
|
||||
/**
|
||||
@@ -3239,6 +3444,11 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* If the caller is different than the controller being targeted, the following conditions
|
||||
* must be met:
|
||||
*
|
||||
* * `controller` must belong to a nominator who has become non-decodable,
|
||||
*
|
||||
* Or:
|
||||
*
|
||||
* * A `ChillThreshold` must be set and checked which defines how close to the max
|
||||
* nominators or validators we must reach before users can start chilling one-another.
|
||||
* * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine
|
||||
@@ -3251,6 +3461,12 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* who do not satisfy these requirements.
|
||||
**/
|
||||
chillOther: AugmentedSubmittable<(controller: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||
/**
|
||||
* Force a validator to have at least the minimum commission. This will not affect a
|
||||
* validator who already has a commission greater than or equal to the minimum. Any account
|
||||
* can call this.
|
||||
**/
|
||||
forceApplyMinCommission: AugmentedSubmittable<(validatorStash: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
|
||||
/**
|
||||
* Force there to be a new era at the end of the next session. After this, it will be
|
||||
* reset to normal (non-forced) behaviour.
|
||||
@@ -3280,11 +3496,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* The election process starts multiple blocks before the end of the era.
|
||||
* If this is called just before a new era is triggered, the election process may not
|
||||
* have enough blocks to get a result.
|
||||
*
|
||||
* # <weight>
|
||||
* - Weight: O(1)
|
||||
* - Write: ForceEra
|
||||
* # </weight>
|
||||
**/
|
||||
forceNewEraAlways: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||
/**
|
||||
@@ -3309,13 +3520,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Force a current staker to become completely unstaked, immediately.
|
||||
*
|
||||
* The dispatch origin must be Root.
|
||||
*
|
||||
* # <weight>
|
||||
* O(S) where S is the number of slashing spans to be removed
|
||||
* Reads: Bonded, Slashing Spans, Account, Locks
|
||||
* Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators,
|
||||
* Account, Locks Writes Each: SpanSlash * S
|
||||
* # </weight>
|
||||
**/
|
||||
forceUnstake: AugmentedSubmittable<(stash: AccountId32 | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
|
||||
/**
|
||||
@@ -3351,7 +3555,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* # <weight>
|
||||
* - The transaction's complexity is proportional to the size of `targets` (N)
|
||||
* which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS).
|
||||
* which is capped at CompactAssignments::LIMIT (T::MaxNominations).
|
||||
* - Both the reads and writes follow a similar pattern.
|
||||
* # </weight>
|
||||
**/
|
||||
@@ -3402,7 +3606,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* # <weight>
|
||||
* - Time complexity: O(L), where L is unlocking chunks
|
||||
* - Bounded by `MAX_UNLOCKING_CHUNKS`.
|
||||
* - Bounded by `MaxUnlockingChunks`.
|
||||
* - Storage changes: Can't increase storage, only decrease it.
|
||||
* # </weight>
|
||||
**/
|
||||
@@ -3420,7 +3624,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
/**
|
||||
* (Re-)set the controller of a stash.
|
||||
*
|
||||
* Effects will be felt at the beginning of the next era.
|
||||
* Effects will be felt instantly (as soon as this function is completed successfully).
|
||||
*
|
||||
* The dispatch origin for this call must be _Signed_ by the stash, not the controller.
|
||||
*
|
||||
@@ -3465,17 +3669,12 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Set the validators who cannot be slashed (if any).
|
||||
*
|
||||
* The dispatch origin must be Root.
|
||||
*
|
||||
* # <weight>
|
||||
* - O(V)
|
||||
* - Write: Invulnerables
|
||||
* # </weight>
|
||||
**/
|
||||
setInvulnerables: AugmentedSubmittable<(invulnerables: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>]>;
|
||||
/**
|
||||
* (Re-)set the payment target for a controller.
|
||||
*
|
||||
* Effects will be felt at the beginning of the next era.
|
||||
* Effects will be felt instantly (as soon as this function is completed successfully).
|
||||
*
|
||||
* The dispatch origin for this call must be _Signed_ by the controller, not the stash.
|
||||
*
|
||||
@@ -3510,7 +3709,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* NOTE: Existing nominators and validators will not be affected by this update.
|
||||
* to kick people under the new limits, `chill_other` should be called.
|
||||
**/
|
||||
setStakingConfigs: AugmentedSubmittable<(minNominatorBond: u128 | AnyNumber | Uint8Array, minValidatorBond: u128 | AnyNumber | Uint8Array, maxNominatorCount: Option<u32> | null | object | string | Uint8Array, maxValidatorCount: Option<u32> | null | object | string | Uint8Array, chillThreshold: Option<Percent> | null | object | string | Uint8Array, minCommission: Perbill | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128, u128, Option<u32>, Option<u32>, Option<Percent>, Perbill]>;
|
||||
setStakingConfigs: AugmentedSubmittable<(minNominatorBond: PalletStakingPalletConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, minValidatorBond: PalletStakingPalletConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxNominatorCount: PalletStakingPalletConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxValidatorCount: PalletStakingPalletConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, chillThreshold: PalletStakingPalletConfigOpPercent | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, minCommission: PalletStakingPalletConfigOpPerbill | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingPalletConfigOpU32, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpPerbill]>;
|
||||
/**
|
||||
* Sets the ideal number of validators.
|
||||
*
|
||||
@@ -3532,7 +3731,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Once the unlock period is done, you can call `withdraw_unbonded` to actually move
|
||||
* the funds out of management ready for transfer.
|
||||
*
|
||||
* No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`)
|
||||
* No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`)
|
||||
* can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need
|
||||
* to be called first to remove some of the chunks (if possible).
|
||||
*
|
||||
@@ -3575,6 +3774,74 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
stateTrieMigration: {
|
||||
/**
|
||||
* Continue the migration for the given `limits`.
|
||||
*
|
||||
* The dispatch origin of this call can be any signed account.
|
||||
*
|
||||
* This transaction has NO MONETARY INCENTIVES. calling it will not reward anyone. Albeit,
|
||||
* Upon successful execution, the transaction fee is returned.
|
||||
*
|
||||
* The (potentially over-estimated) of the byte length of all the data read must be
|
||||
* provided for up-front fee-payment and weighing. In essence, the caller is guaranteeing
|
||||
* that executing the current `MigrationTask` with the given `limits` will not exceed
|
||||
* `real_size_upper` bytes of read data.
|
||||
*
|
||||
* The `witness_task` is merely a helper to prevent the caller from being slashed or
|
||||
* generally trigger a migration that they do not intend. This parameter is just a message
|
||||
* from caller, saying that they believed `witness_task` was the last state of the
|
||||
* migration, and they only wish for their transaction to do anything, if this assumption
|
||||
* holds. In case `witness_task` does not match, the transaction fails.
|
||||
*
|
||||
* Based on the documentation of [`MigrationTask::migrate_until_exhaustion`], the
|
||||
* recommended way of doing this is to pass a `limit` that only bounds `count`, as the
|
||||
* `size` limit can always be overwritten.
|
||||
**/
|
||||
continueMigrate: AugmentedSubmittable<(limits: PalletStateTrieMigrationMigrationLimits | { size_?: any; item?: any } | string | Uint8Array, realSizeUpper: u32 | AnyNumber | Uint8Array, witnessTask: PalletStateTrieMigrationMigrationTask | { progressTop?: any; progressChild?: any; size_?: any; topItems?: any; childItems?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletStateTrieMigrationMigrationLimits, u32, PalletStateTrieMigrationMigrationTask]>;
|
||||
/**
|
||||
* Control the automatic migration.
|
||||
*
|
||||
* The dispatch origin of this call must be [`Config::ControlOrigin`].
|
||||
**/
|
||||
controlAutoMigration: AugmentedSubmittable<(maybeConfig: Option<PalletStateTrieMigrationMigrationLimits> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<PalletStateTrieMigrationMigrationLimits>]>;
|
||||
/**
|
||||
* Forcefully set the progress the running migration.
|
||||
*
|
||||
* This is only useful in one case: the next key to migrate is too big to be migrated with
|
||||
* a signed account, in a parachain context, and we simply want to skip it. A reasonable
|
||||
* example of this would be `:code:`, which is both very expensive to migrate, and commonly
|
||||
* used, so probably it is already migrated.
|
||||
*
|
||||
* In case you mess things up, you can also, in principle, use this to reset the migration
|
||||
* process.
|
||||
**/
|
||||
forceSetProgress: AugmentedSubmittable<(progressTop: PalletStateTrieMigrationProgress | { ToStart: any } | { LastKey: any } | { Complete: any } | string | Uint8Array, progressChild: PalletStateTrieMigrationProgress | { ToStart: any } | { LastKey: any } | { Complete: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletStateTrieMigrationProgress, PalletStateTrieMigrationProgress]>;
|
||||
/**
|
||||
* Migrate the list of child keys by iterating each of them one by one.
|
||||
*
|
||||
* All of the given child keys must be present under one `child_root`.
|
||||
*
|
||||
* This does not affect the global migration process tracker ([`MigrationProcess`]), and
|
||||
* should only be used in case any keys are leftover due to a bug.
|
||||
**/
|
||||
migrateCustomChild: AugmentedSubmittable<(root: Bytes | string | Uint8Array, childKeys: Vec<Bytes> | (Bytes | string | Uint8Array)[], totalSize: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, Vec<Bytes>, u32]>;
|
||||
/**
|
||||
* Migrate the list of top keys by iterating each of them one by one.
|
||||
*
|
||||
* This does not affect the global migration process tracker ([`MigrationProcess`]), and
|
||||
* should only be used in case any keys are leftover due to a bug.
|
||||
**/
|
||||
migrateCustomTop: AugmentedSubmittable<(keys: Vec<Bytes> | (Bytes | string | Uint8Array)[], witnessSize: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<Bytes>, u32]>;
|
||||
/**
|
||||
* Set the maximum limit of the signed migration.
|
||||
**/
|
||||
setSignedMaxLimits: AugmentedSubmittable<(limits: PalletStateTrieMigrationMigrationLimits | { size_?: any; item?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletStateTrieMigrationMigrationLimits]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
sudo: {
|
||||
/**
|
||||
* Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo
|
||||
@@ -3660,11 +3927,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
remark: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
|
||||
/**
|
||||
* Make some on-chain remark and emit event.
|
||||
*
|
||||
* # <weight>
|
||||
* - `O(b)` where b is the length of the remark.
|
||||
* - 1 event.
|
||||
* # </weight>
|
||||
**/
|
||||
remarkWithEvent: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
|
||||
/**
|
||||
@@ -4099,7 +4361,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
**/
|
||||
renew: AugmentedSubmittable<(block: u32 | AnyNumber | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
|
||||
/**
|
||||
* Index and store data on chain. Minimum data size is 1 bytes, maximum is
|
||||
* Index and store data off chain. Minimum data size is 1 bytes, maximum is
|
||||
* `MaxTransactionSize`. Data will be removed after `STORAGE_PERIOD` blocks, unless `renew`
|
||||
* is called. # <weight>
|
||||
* - n*log(n) of data size, as all data is pushed to an in-memory trie.
|
||||
@@ -4169,7 +4431,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
approveTransfer: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, instance: Compact<u32> | AnyNumber | Uint8Array, delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>, MultiAddress]>;
|
||||
approveTransfer: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, instance: u32 | AnyNumber | Uint8Array, delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, MultiAddress]>;
|
||||
/**
|
||||
* Destroy a single asset instance.
|
||||
*
|
||||
@@ -4185,7 +4447,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Weight: `O(1)`
|
||||
* Modes: `check_owner.is_some()`.
|
||||
**/
|
||||
burn: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, instance: Compact<u32> | AnyNumber | Uint8Array, checkOwner: Option<MultiAddress> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>, Option<MultiAddress>]>;
|
||||
burn: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, instance: u32 | AnyNumber | Uint8Array, checkOwner: Option<MultiAddress> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, Option<MultiAddress>]>;
|
||||
/**
|
||||
* Cancel the prior approval for the transfer of an asset by a delegate.
|
||||
*
|
||||
@@ -4204,27 +4466,24 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
cancelApproval: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, instance: Compact<u32> | AnyNumber | Uint8Array, maybeCheckDelegate: Option<MultiAddress> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>, Option<MultiAddress>]>;
|
||||
cancelApproval: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, instance: u32 | AnyNumber | Uint8Array, maybeCheckDelegate: Option<MultiAddress> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, Option<MultiAddress>]>;
|
||||
/**
|
||||
* Set an attribute for an asset class or instance.
|
||||
* Clear an attribute for an asset class or instance.
|
||||
*
|
||||
* Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the
|
||||
* asset `class`.
|
||||
*
|
||||
* If the origin is Signed, then funds of signer are reserved according to the formula:
|
||||
* `MetadataDepositBase + DepositPerByte * (key.len + value.len)` taking into
|
||||
* account any already reserved funds.
|
||||
* Any deposit is freed for the asset class owner.
|
||||
*
|
||||
* - `class`: The identifier of the asset class whose instance's metadata to set.
|
||||
* - `instance`: The identifier of the asset instance whose metadata to set.
|
||||
* - `class`: The identifier of the asset class whose instance's metadata to clear.
|
||||
* - `maybe_instance`: The identifier of the asset instance whose metadata to clear.
|
||||
* - `key`: The key of the attribute.
|
||||
* - `value`: The value to which to set the attribute.
|
||||
*
|
||||
* Emits `AttributeSet`.
|
||||
* Emits `AttributeCleared`.
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
clearAttribute: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, maybeInstance: Option<u32> | null | object | string | Uint8Array, key: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Option<u32>, Bytes]>;
|
||||
clearAttribute: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, maybeInstance: Option<u32> | null | object | string | Uint8Array, key: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Option<u32>, Bytes]>;
|
||||
/**
|
||||
* Clear the metadata for an asset class.
|
||||
*
|
||||
@@ -4239,7 +4498,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
clearClassMetadata: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
|
||||
clearClassMetadata: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* Clear the metadata for an asset instance.
|
||||
*
|
||||
@@ -4255,7 +4514,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
clearMetadata: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, instance: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
|
||||
clearMetadata: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, instance: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
|
||||
/**
|
||||
* Issue a new class of non-fungible assets from a public origin.
|
||||
*
|
||||
@@ -4274,7 +4533,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
create: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, admin: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress]>;
|
||||
create: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, admin: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, MultiAddress]>;
|
||||
/**
|
||||
* Destroy a class of fungible assets.
|
||||
*
|
||||
@@ -4292,7 +4551,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* - `m = witness.instance_metadatas`
|
||||
* - `a = witness.attributes`
|
||||
**/
|
||||
destroy: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, witness: PalletUniquesDestroyWitness | { instances?: any; instanceMetadatas?: any; attributes?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, PalletUniquesDestroyWitness]>;
|
||||
destroy: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, witness: PalletUniquesDestroyWitness | { instances?: any; instanceMetadatas?: any; attributes?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletUniquesDestroyWitness]>;
|
||||
/**
|
||||
* Alter the attributes of a given asset.
|
||||
*
|
||||
@@ -4312,7 +4571,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
forceAssetStatus: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, owner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, issuer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, admin: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, freezer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, freeHolding: bool | boolean | Uint8Array, isFrozen: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress, MultiAddress, MultiAddress, MultiAddress, bool, bool]>;
|
||||
forceAssetStatus: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, owner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, issuer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, admin: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, freezer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, freeHolding: bool | boolean | Uint8Array, isFrozen: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, MultiAddress, MultiAddress, MultiAddress, MultiAddress, bool, bool]>;
|
||||
/**
|
||||
* Issue a new class of non-fungible assets from a privileged origin.
|
||||
*
|
||||
@@ -4331,7 +4590,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
forceCreate: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, owner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, freeHolding: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress, bool]>;
|
||||
forceCreate: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, owner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, freeHolding: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, MultiAddress, bool]>;
|
||||
/**
|
||||
* Disallow further unprivileged transfer of an asset instance.
|
||||
*
|
||||
@@ -4344,7 +4603,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
freeze: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, instance: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
|
||||
freeze: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, instance: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
|
||||
/**
|
||||
* Disallow further unprivileged transfers for a whole asset class.
|
||||
*
|
||||
@@ -4356,7 +4615,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
freezeClass: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
|
||||
freezeClass: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* Mint an asset instance of a particular class.
|
||||
*
|
||||
@@ -4370,7 +4629,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
mint: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, instance: Compact<u32> | AnyNumber | Uint8Array, owner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>, MultiAddress]>;
|
||||
mint: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, instance: u32 | AnyNumber | Uint8Array, owner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, MultiAddress]>;
|
||||
/**
|
||||
* Reevaluate the deposits on some assets.
|
||||
*
|
||||
@@ -4390,7 +4649,20 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Weight: `O(instances.len())`
|
||||
**/
|
||||
redeposit: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, instances: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Vec<u32>]>;
|
||||
redeposit: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, instances: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<u32>]>;
|
||||
/**
|
||||
* Set (or reset) the acceptance of ownership for a particular account.
|
||||
*
|
||||
* Origin must be `Signed` and if `maybe_class` is `Some`, then the signer must have a
|
||||
* provider reference.
|
||||
*
|
||||
* - `maybe_class`: The identifier of the asset class whose ownership the signer is willing
|
||||
* to accept, or if `None`, an indication that the signer is willing to accept no
|
||||
* ownership transferal.
|
||||
*
|
||||
* Emits `OwnershipAcceptanceChanged`.
|
||||
**/
|
||||
setAcceptOwnership: AugmentedSubmittable<(maybeClass: Option<u32> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<u32>]>;
|
||||
/**
|
||||
* Set an attribute for an asset class or instance.
|
||||
*
|
||||
@@ -4410,7 +4682,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
setAttribute: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, maybeInstance: Option<u32> | null | object | string | Uint8Array, key: Bytes | string | Uint8Array, value: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Option<u32>, Bytes, Bytes]>;
|
||||
setAttribute: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, maybeInstance: Option<u32> | null | object | string | Uint8Array, key: Bytes | string | Uint8Array, value: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Option<u32>, Bytes, Bytes]>;
|
||||
/**
|
||||
* Set the metadata for an asset class.
|
||||
*
|
||||
@@ -4429,7 +4701,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
setClassMetadata: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, data: Bytes | string | Uint8Array, isFrozen: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Bytes, bool]>;
|
||||
setClassMetadata: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, data: Bytes | string | Uint8Array, isFrozen: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes, bool]>;
|
||||
/**
|
||||
* Set the metadata for an asset instance.
|
||||
*
|
||||
@@ -4449,7 +4721,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
setMetadata: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, instance: Compact<u32> | AnyNumber | Uint8Array, data: Bytes | string | Uint8Array, isFrozen: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>, Bytes, bool]>;
|
||||
setMetadata: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, instance: u32 | AnyNumber | Uint8Array, data: Bytes | string | Uint8Array, isFrozen: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, Bytes, bool]>;
|
||||
/**
|
||||
* Change the Issuer, Admin and Freezer of an asset class.
|
||||
*
|
||||
@@ -4464,7 +4736,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
setTeam: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, issuer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, admin: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, freezer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress, MultiAddress, MultiAddress]>;
|
||||
setTeam: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, issuer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, admin: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, freezer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, MultiAddress, MultiAddress, MultiAddress]>;
|
||||
/**
|
||||
* Re-allow unprivileged transfer of an asset instance.
|
||||
*
|
||||
@@ -4477,7 +4749,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
thaw: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, instance: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
|
||||
thaw: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, instance: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
|
||||
/**
|
||||
* Re-allow unprivileged transfers for a whole asset class.
|
||||
*
|
||||
@@ -4489,7 +4761,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
thawClass: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
|
||||
thawClass: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* Move an asset from the sender account to another.
|
||||
*
|
||||
@@ -4507,20 +4779,21 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
transfer: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, instance: Compact<u32> | AnyNumber | Uint8Array, dest: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>, MultiAddress]>;
|
||||
transfer: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, instance: u32 | AnyNumber | Uint8Array, dest: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, MultiAddress]>;
|
||||
/**
|
||||
* Change the Owner of an asset class.
|
||||
*
|
||||
* Origin must be Signed and the sender should be the Owner of the asset `class`.
|
||||
*
|
||||
* - `class`: The asset class whose owner should be changed.
|
||||
* - `owner`: The new Owner of this asset class.
|
||||
* - `owner`: The new Owner of this asset class. They must have called
|
||||
* `set_accept_ownership` with `class` in order for this operation to succeed.
|
||||
*
|
||||
* Emits `OwnerChanged`.
|
||||
*
|
||||
* Weight: `O(1)`
|
||||
**/
|
||||
transferOwnership: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, owner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress]>;
|
||||
transferOwnership: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, owner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, MultiAddress]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
@@ -4705,5 +4978,15 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
whitelist: {
|
||||
dispatchWhitelistedCall: AugmentedSubmittable<(callHash: H256 | string | Uint8Array, callWeightWitness: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, u64]>;
|
||||
dispatchWhitelistedCallWithPreimage: AugmentedSubmittable<(call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call]>;
|
||||
removeWhitelistedCall: AugmentedSubmittable<(callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
|
||||
whitelistCall: AugmentedSubmittable<(callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
|
||||
/**
|
||||
* Generic tx
|
||||
**/
|
||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||
};
|
||||
} // AugmentedSubmittables
|
||||
} // declare module
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "..",
|
||||
"outDir": "./build",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"exclude": [
|
||||
"**/*.spec.ts",
|
||||
"**/kusama/*.ts",
|
||||
"**/polkadot/*.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api-base/tsconfig.build.json" },
|
||||
{ "path": "../rpc-augment/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" },
|
||||
{ "path": "../types-codec/tsconfig.build.json" },
|
||||
{ "path": "../types-augment/tsconfig.build.json" },
|
||||
{ "path": "../types-support/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "..",
|
||||
"outDir": "./build",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"exclude": [
|
||||
"**/kusama/*.ts",
|
||||
"**/polkadot/*.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api-base" },
|
||||
{ "path": "../rpc-augment" },
|
||||
{ "path": "../types" },
|
||||
{ "path": "../types-codec" },
|
||||
{ "path": "../types-augment" }
|
||||
]
|
||||
}
|
||||
@@ -9,11 +9,14 @@
|
||||
"**/base.ts",
|
||||
"**/kusama/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"**/kusama/*.spec.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api-base" },
|
||||
{ "path": "../rpc-augment" },
|
||||
{ "path": "../types" },
|
||||
{ "path": "../types-codec" },
|
||||
{ "path": "../types-augment" }
|
||||
{ "path": "../api-base/tsconfig.build.json" },
|
||||
{ "path": "../rpc-augment/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" },
|
||||
{ "path": "../types-codec/tsconfig.build.json" },
|
||||
{ "path": "../types-augment/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"baseUrl": "..",
|
||||
"outDir": "./build",
|
||||
"rootDir": "./src",
|
||||
"emitDeclarationOnly": false,
|
||||
"noEmit": true
|
||||
},
|
||||
"include": [
|
||||
"**/kusama/*.spec.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api-augment/tsconfig.build.json" },
|
||||
{ "path": "../api-augment/tsconfig.kusama.json" },
|
||||
{ "path": "../api-base/tsconfig.build.json" },
|
||||
{ "path": "../rpc-augment/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" },
|
||||
{ "path": "../types-augment/tsconfig.build.json" },
|
||||
{ "path": "../types-support/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
@@ -9,11 +9,14 @@
|
||||
"**/base.ts",
|
||||
"**/polkadot/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"**/polkadot/*.spec.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api-base" },
|
||||
{ "path": "../rpc-augment" },
|
||||
{ "path": "../types" },
|
||||
{ "path": "../types-codec" },
|
||||
{ "path": "../types-augment" }
|
||||
{ "path": "../api-base/tsconfig.build.json" },
|
||||
{ "path": "../rpc-augment/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" },
|
||||
{ "path": "../types-codec/tsconfig.build.json" },
|
||||
{ "path": "../types-augment/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "7.3.1",
|
||||
"version": "8.2.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.16.7",
|
||||
"@polkadot/rpc-core": "7.3.1",
|
||||
"@polkadot/types": "7.3.1",
|
||||
"@polkadot/util": "^8.3.1",
|
||||
"rxjs": "^7.5.1"
|
||||
"@babel/runtime": "^7.17.9",
|
||||
"@polkadot/rpc-core": "8.2.1",
|
||||
"@polkadot/types": "8.2.1",
|
||||
"@polkadot/util": "^9.0.1",
|
||||
"rxjs": "^7.5.5"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '7.3.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '8.2.1' };
|
||||
|
||||
@@ -74,12 +74,10 @@ export interface StorageEntryBase<ApiType extends ApiTypes, F extends AnyFunctio
|
||||
* @deprecated Use api.at(<blockHash>)
|
||||
*/
|
||||
entriesAt: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(hash: Hash | Uint8Array | string, ...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
|
||||
entriesPaged: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
|
||||
/**
|
||||
* @deprecated Use api.at(<blockHash>)
|
||||
*/
|
||||
keysAt: <K extends AnyTuple = A> (hash: Hash | Uint8Array | string, ...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
|
||||
keysPaged: <K extends AnyTuple = A> (opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
|
||||
/**
|
||||
* @deprecated The underlying RPC this been marked unsafe and is generally not exposed
|
||||
*/
|
||||
@@ -95,11 +93,13 @@ export interface StorageEntryBase<ApiType extends ApiTypes, F extends AnyFunctio
|
||||
|
||||
export interface StorageEntryBaseAt<ApiType extends ApiTypes, F extends AnyFunction, A extends AnyTuple = AnyTuple> {
|
||||
entries: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
|
||||
entriesPaged: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
|
||||
hash: (...args: Parameters<F>) => PromiseOrObs<ApiType, Hash>;
|
||||
is: (key: IStorageKey<AnyTuple>) => key is IStorageKey<A>;
|
||||
key: (...args: Parameters<F>) => string;
|
||||
keyPrefix: (...args: DropLast<Parameters<F>>) => string;
|
||||
keys: <K extends AnyTuple = A> (...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
|
||||
keysPaged: <K extends AnyTuple = A> (opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
|
||||
size: (...args: Parameters<F>) => PromiseOrObs<ApiType, u64>;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@ export interface SubmittableResultValue {
|
||||
internalError?: Error;
|
||||
status: ExtrinsicStatus;
|
||||
txHash: Hash;
|
||||
txIndex?: number;
|
||||
}
|
||||
|
||||
export interface SubmittableExtrinsic<ApiType extends ApiTypes, R extends ISubmittableResult = ISubmittableResult> extends Extrinsic {
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"references": [
|
||||
{ "path": "../types" },
|
||||
{ "path": "../types-codec" },
|
||||
{ "path": "../types-create" }
|
||||
{ "path": "../rpc-core/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
@@ -20,20 +20,20 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "7.3.1",
|
||||
"version": "8.2.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.16.7",
|
||||
"@polkadot/api": "7.3.1",
|
||||
"@polkadot/types": "7.3.1",
|
||||
"@polkadot/types-codec": "7.3.1",
|
||||
"@polkadot/types-create": "7.3.1",
|
||||
"@polkadot/util": "^8.3.1",
|
||||
"@polkadot/util-crypto": "^8.3.1",
|
||||
"rxjs": "^7.5.1"
|
||||
"@babel/runtime": "^7.17.9",
|
||||
"@polkadot/api": "8.2.1",
|
||||
"@polkadot/types": "8.2.1",
|
||||
"@polkadot/types-codec": "8.2.1",
|
||||
"@polkadot/types-create": "8.2.1",
|
||||
"@polkadot/util": "^9.0.1",
|
||||
"@polkadot/util-crypto": "^9.0.1",
|
||||
"rxjs": "^7.5.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api-augment": "7.3.1",
|
||||
"@polkadot/keyring": "^8.3.1"
|
||||
"@polkadot/api-augment": "8.2.1",
|
||||
"@polkadot/keyring": "^9.0.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,9 @@ interface JSONAbi {
|
||||
},
|
||||
V2: {
|
||||
spec: SpecDef;
|
||||
},
|
||||
V3: {
|
||||
spec: SpecDef;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,10 +59,10 @@ describe('Abi', (): void => {
|
||||
|
||||
it(`initializes from a contract ABI (${abiName})`, (): void => {
|
||||
try {
|
||||
const messageIds = (abi.V2 || abi.V1 || abi).spec.messages.map(({ label, name }) =>
|
||||
const messageIds = (abi.V3 || abi.V2 || abi.V1 || abi).spec.messages.map(({ label, name }) =>
|
||||
label || (
|
||||
Array.isArray(name)
|
||||
? name[0]
|
||||
? name.join('::')
|
||||
: name
|
||||
)
|
||||
);
|
||||
|
||||
@@ -10,7 +10,7 @@ import { TypeRegistry } from '@polkadot/types';
|
||||
import { TypeDefInfo } from '@polkadot/types-create';
|
||||
import { assert, assertReturn, compactAddLength, compactStripLength, isNumber, isObject, isString, logger, stringCamelCase, stringify, u8aConcat, u8aToHex } from '@polkadot/util';
|
||||
|
||||
import { v0ToLatest, v1ToLatest } from './toLatest';
|
||||
import { convertVersions, enumVersions } from './toLatest';
|
||||
|
||||
const l = logger('Abi');
|
||||
|
||||
@@ -26,30 +26,25 @@ function findMessage <T extends AbiMessage> (list: T[], messageOrId: T | string
|
||||
return assertReturn(message, () => `Attempted to call an invalid contract interface, ${stringify(messageOrId)}`);
|
||||
}
|
||||
|
||||
// FIXME: This is still workable with V0, V1 & V2, but certainly is not a scalable
|
||||
// approach (right at this point don't quite have better ideas that is not as complex
|
||||
// as the conversion tactics in the runtime Metadata)
|
||||
function getLatestMeta (registry: Registry, json: Record<string, unknown>): ContractMetadataLatest {
|
||||
const vx = enumVersions.find((v) => isObject(json[v]));
|
||||
const metadata = registry.createType('ContractMetadata',
|
||||
isObject(json.V2)
|
||||
? { V2: json.V2 }
|
||||
: isObject(json.V1)
|
||||
? { V1: json.V1 }
|
||||
: { V0: json }
|
||||
vx
|
||||
? { [vx]: json[vx] }
|
||||
: { V0: json }
|
||||
) as unknown as ContractMetadata;
|
||||
const converter = convertVersions.find(([v]) => metadata[`is${v}`]);
|
||||
|
||||
return metadata.isV2
|
||||
? metadata.asV2
|
||||
: metadata.isV1
|
||||
? v1ToLatest(registry, metadata.asV1)
|
||||
: v0ToLatest(registry, metadata.asV0);
|
||||
assert(converter, () => `Unable to convert ABI with version ${metadata.type} to latest`);
|
||||
|
||||
return converter[1](registry, metadata[`as${converter[0]}`]);
|
||||
}
|
||||
|
||||
function parseJson (json: Record<string, unknown>, chainProperties?: ChainProperties): [Record<string, unknown>, Registry, ContractMetadataLatest, ContractProjectInfo] {
|
||||
const registry = new TypeRegistry();
|
||||
const info = registry.createType('ContractProjectInfo', json) as unknown as ContractProjectInfo;
|
||||
const latest = getLatestMeta(registry, json);
|
||||
const lookup = registry.createType('PortableRegistry', { types: latest.types });
|
||||
const lookup = registry.createType('PortableRegistry', { types: latest.types }, true);
|
||||
|
||||
// attach the lookup to the registry - now the types are known
|
||||
registry.setLookup(lookup);
|
||||
@@ -90,7 +85,8 @@ export class Abi {
|
||||
);
|
||||
this.constructors = this.metadata.spec.constructors.map((spec: ContractConstructorSpecLatest, index) =>
|
||||
this.#createMessage(spec, index, {
|
||||
isConstructor: true
|
||||
isConstructor: true,
|
||||
isPayable: spec.payable.isTrue
|
||||
})
|
||||
);
|
||||
this.events = this.metadata.spec.events.map((spec: ContractEventSpecLatest, index) =>
|
||||
@@ -209,6 +205,7 @@ export class Abi {
|
||||
identifier,
|
||||
index,
|
||||
method: stringCamelCase(identifier),
|
||||
path: identifier.split('::').map((s) => stringCamelCase(s)),
|
||||
selector: spec.selector,
|
||||
toU8a: (params: unknown[]) =>
|
||||
this.#encodeArgs(spec, args, params)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { v0ToLatest, v1ToLatest } from '@polkadot/api-contract/Abi/toLatest';
|
||||
import { v0ToLatest, v1ToLatest, v2ToLatest, v3ToLatest } from '@polkadot/api-contract/Abi/toLatest';
|
||||
import { TypeRegistry } from '@polkadot/types';
|
||||
|
||||
import abis from '../test/contracts';
|
||||
@@ -65,9 +65,58 @@ describe('v1ToLatest', (): void => {
|
||||
).toEqual(['flip', 'get']);
|
||||
});
|
||||
|
||||
it('has the correct messages with namespaced method name', (): void => {
|
||||
const contract = registry.createType('ContractMetadata', { V1: abis.ink_v1_psp22.V1 });
|
||||
const latest = v1ToLatest(registry, contract.asV1);
|
||||
|
||||
expect(
|
||||
latest.spec.messages.map(({ label }) => label.toString())
|
||||
).toEqual([
|
||||
'PSP22Metadata::token_name', 'PSP22Metadata::token_symbol', 'PSP22Metadata::token_decimals', 'PSP22Mintable::mint', 'PSP22::decrease_allowance', 'PSP22::transfer', 'PSP22::approve', 'PSP22::allowance', 'PSP22::transfer_from', 'PSP22::balance_of', 'PSP22::increase_allowance', 'PSP22::total_supply', 'pause', 'unpause'
|
||||
]);
|
||||
});
|
||||
|
||||
it('has the correct constructor arguments', (): void => {
|
||||
expect(
|
||||
latest.spec.constructors[0].args.map(({ label }) => label.toString())
|
||||
).toEqual(['init_value']);
|
||||
});
|
||||
});
|
||||
|
||||
describe('v2ToLatest', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V2: abis.ink_v2_flipper.V2 });
|
||||
const latest = v2ToLatest(registry, contract.asV2);
|
||||
|
||||
it('has the correct constructor flag', (): void => {
|
||||
expect(
|
||||
latest.spec.constructors[0].payable.isTrue
|
||||
).toEqual(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('v3ToLatest', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V3: abis.ink_v3_flipper.V3 });
|
||||
const latest = v3ToLatest(registry, contract.asV3);
|
||||
|
||||
it('has the correct constructor flags', (): void => {
|
||||
expect(
|
||||
latest.spec.constructors[0].payable.isTrue
|
||||
).toEqual(false);
|
||||
expect(
|
||||
latest.spec.constructors[1].payable.isTrue
|
||||
).toEqual(true);
|
||||
});
|
||||
|
||||
it('has the correct messages', (): void => {
|
||||
const contract = registry.createType('ContractMetadata', { V3: abis.ink_v3_traitErc20.V3 });
|
||||
const latest = v3ToLatest(registry, contract.asV3);
|
||||
|
||||
expect(
|
||||
latest.spec.messages.map(({ label }) => label.toString())
|
||||
).toEqual([
|
||||
'BaseErc20::total_supply', 'BaseErc20::balance_of', 'BaseErc20::allowance', 'BaseErc20::transfer', 'BaseErc20::approve', 'BaseErc20::transfer_from'
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,16 +1,38 @@
|
||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1 } from '@polkadot/types/interfaces';
|
||||
import type { ContractMetadataLatest, ContractMetadataV3 } from '@polkadot/types/interfaces';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
|
||||
import { v0ToV1 } from './toV1';
|
||||
import { v1ToV2 } from './toV2';
|
||||
import { v2ToV3 } from './toV3';
|
||||
|
||||
export function v1ToLatest (registry: Registry, v1: ContractMetadataV1): ContractMetadataLatest {
|
||||
return v1ToV2(registry, v1);
|
||||
type Versions = 'V3' | 'V2' | 'V1' | 'V0';
|
||||
|
||||
type Converter = (registry: Registry, vx: any) => ContractMetadataLatest;
|
||||
|
||||
// Helper to convert metadata from one step to the next
|
||||
function createConverter <I, O> (next: (registry: Registry, input: O) => ContractMetadataLatest, step: (registry: Registry, input: I) => O): (registry: Registry, input: I) => ContractMetadataLatest {
|
||||
return (registry: Registry, input: I): ContractMetadataLatest =>
|
||||
next(registry, step(registry, input));
|
||||
}
|
||||
|
||||
export function v0ToLatest (registry: Registry, v0: ContractMetadataV0): ContractMetadataLatest {
|
||||
return v1ToLatest(registry, v0ToV1(registry, v0));
|
||||
export function v3ToLatest (registry: Registry, v3: ContractMetadataV3): ContractMetadataLatest {
|
||||
return v3;
|
||||
}
|
||||
|
||||
export const v2ToLatest = createConverter(v3ToLatest, v2ToV3);
|
||||
export const v1ToLatest = createConverter(v2ToLatest, v1ToV2);
|
||||
export const v0ToLatest = createConverter(v1ToLatest, v0ToV1);
|
||||
|
||||
// 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 = ['V3', 'V2', 'V1'];
|
||||
|
||||
export const convertVersions: [Versions, Converter][] = [
|
||||
['V3', v3ToLatest],
|
||||
['V2', v2ToLatest],
|
||||
['V1', v1ToLatest],
|
||||
['V0', v0ToLatest]
|
||||
];
|
||||
|
||||
@@ -7,8 +7,25 @@ import type { Registry } from '@polkadot/types/types';
|
||||
import { convertSiV0toV1 } from '@polkadot/types';
|
||||
import { objectSpread } from '@polkadot/util';
|
||||
|
||||
interface Named {
|
||||
name: unknown;
|
||||
}
|
||||
|
||||
function v0ToV1Names (all: Named[]): unknown[] {
|
||||
return all.map((e) =>
|
||||
objectSpread({}, e, {
|
||||
name: Array.isArray(e.name)
|
||||
? e.name
|
||||
: [e.name]
|
||||
}));
|
||||
}
|
||||
|
||||
export function v0ToV1 (registry: Registry, v0: ContractMetadataV0): ContractMetadataV1 {
|
||||
return registry.createType('ContractMetadataV1', objectSpread({}, v0, {
|
||||
spec: objectSpread({}, v0.spec, {
|
||||
constructors: v0ToV1Names(v0.spec.constructors),
|
||||
messages: v0ToV1Names(v0.spec.messages)
|
||||
}),
|
||||
types: convertSiV0toV1(registry, v0.types)
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ const ARG_TYPES = {
|
||||
function v1ToV2Label (entry: NamedEntry): { label: Text } {
|
||||
return objectSpread({}, entry, {
|
||||
label: Array.isArray(entry.name)
|
||||
? entry.name[0]
|
||||
? entry.name.join('::')
|
||||
: entry.name
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ContractMetadataV2, ContractMetadataV3 } from '@polkadot/types/interfaces';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
|
||||
import { objectSpread } from '@polkadot/util';
|
||||
|
||||
export function v2ToV3 (registry: Registry, v2: ContractMetadataV2): ContractMetadataV3 {
|
||||
return registry.createType('ContractMetadataV3', objectSpread({}, v2, {
|
||||
spec: objectSpread({}, v2.spec, {
|
||||
constructors: v2.spec.constructors.map((c) =>
|
||||
// V3 introduces the payable flag on constructors, for <V3, it is always true
|
||||
registry.createType('ContractConstructorSpecV3', objectSpread({}, c, { payable: true }))
|
||||
)
|
||||
})
|
||||
}));
|
||||
}
|
||||
@@ -47,7 +47,7 @@ export class Blueprint<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
|
||||
this.abi.constructors.forEach((c): void => {
|
||||
if (isUndefined(this.#tx[c.method])) {
|
||||
this.#tx[c.method] = createBluePrintTx((o, p) => this.#deploy(c, o, p));
|
||||
this.#tx[c.method] = createBluePrintTx(c, (o, p) => this.#deploy(c, o, p));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
|
||||
this.abi.constructors.forEach((c): void => {
|
||||
if (isUndefined(this.#tx[c.method])) {
|
||||
this.#tx[c.method] = createBluePrintTx((o, p) => this.#instantiate(c, o, p));
|
||||
this.#tx[c.method] = createBluePrintTx(c, (o, p) => this.#instantiate(c, o, p));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import { assert, BN, BN_HUNDRED, BN_ONE, BN_ZERO, bnToBn, isFunction, isUndefine
|
||||
import { Abi } from '../Abi';
|
||||
import { applyOnEvent, extractOptions, isOptions } from '../util';
|
||||
import { Base } from './Base';
|
||||
import { withMeta } from './util';
|
||||
|
||||
export interface ContractConstructor<ApiType extends ApiTypes> {
|
||||
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, address: string | AccountId): Contract<ApiType>;
|
||||
@@ -29,18 +30,20 @@ const ERROR_NO_CALL = 'Your node does not expose the contracts.call RPC. This is
|
||||
|
||||
const l = logger('Contract');
|
||||
|
||||
function createQuery <ApiType extends ApiTypes> (fn: (origin: string | AccountId | Uint8Array, options: ContractOptions, params: unknown[]) => ContractCallResult<ApiType, ContractCallOutcome>): ContractQuery<ApiType> {
|
||||
return (origin: string | AccountId | Uint8Array, options: bigint | string | number | BN | ContractOptions, ...params: unknown[]): ContractCallResult<ApiType, ContractCallOutcome> =>
|
||||
function createQuery <ApiType extends ApiTypes> (meta: AbiMessage, fn: (origin: string | AccountId | Uint8Array, options: ContractOptions, params: unknown[]) => ContractCallResult<ApiType, ContractCallOutcome>): ContractQuery<ApiType> {
|
||||
return withMeta(meta, (origin: string | AccountId | Uint8Array, options: bigint | string | number | BN | ContractOptions, ...params: unknown[]): ContractCallResult<ApiType, ContractCallOutcome> =>
|
||||
isOptions(options)
|
||||
? fn(origin, options, params)
|
||||
: fn(origin, ...extractOptions<ContractOptions>(options, params));
|
||||
: fn(origin, ...extractOptions<ContractOptions>(options, params))
|
||||
);
|
||||
}
|
||||
|
||||
function createTx <ApiType extends ApiTypes> (fn: (options: ContractOptions, params: unknown[]) => SubmittableExtrinsic<ApiType>): ContractTx<ApiType> {
|
||||
return (options: bigint | string | number | BN | ContractOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType> =>
|
||||
function createTx <ApiType extends ApiTypes> (meta: AbiMessage, fn: (options: ContractOptions, params: unknown[]) => SubmittableExtrinsic<ApiType>): ContractTx<ApiType> {
|
||||
return withMeta(meta, (options: bigint | string | number | BN | ContractOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType> =>
|
||||
isOptions(options)
|
||||
? fn(options, params)
|
||||
: fn(...extractOptions<ContractOptions>(options, params));
|
||||
: fn(...extractOptions<ContractOptions>(options, params))
|
||||
);
|
||||
}
|
||||
|
||||
export class ContractSubmittableResult extends SubmittableResult {
|
||||
@@ -70,11 +73,11 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
|
||||
this.abi.messages.forEach((m): void => {
|
||||
if (isUndefined(this.#tx[m.method])) {
|
||||
this.#tx[m.method] = createTx((o, p) => this.#exec(m, o, p));
|
||||
this.#tx[m.method] = createTx(m, (o, p) => this.#exec(m, o, p));
|
||||
}
|
||||
|
||||
if (isUndefined(this.#query[m.method])) {
|
||||
this.#query[m.method] = createQuery((f, o, p) => this.#read(m, o, p).send(f));
|
||||
this.#query[m.method] = createQuery(m, (f, o, p) => this.#read(m, o, p).send(f));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -8,23 +8,31 @@ import type { AccountId } from '@polkadot/types/interfaces';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { AbiMessage, BlueprintOptions, ContractCallOutcome, ContractOptions } from '../types';
|
||||
|
||||
export interface BlueprintDeploy<ApiType extends ApiTypes> {
|
||||
export interface MessageMeta {
|
||||
readonly meta: AbiMessage;
|
||||
}
|
||||
|
||||
export interface BlueprintDeploy<ApiType extends ApiTypes> extends MessageMeta {
|
||||
(options: BlueprintOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
|
||||
// @deprecated Use options form (to be dropped in a major update)
|
||||
(value: bigint | string | number | BN, gasLimit: bigint | string | number | BN, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
|
||||
}
|
||||
|
||||
export interface ContractQuery<ApiType extends ApiTypes> {
|
||||
export interface ContractQuery<ApiType extends ApiTypes> extends MessageMeta {
|
||||
(origin: AccountId | string | Uint8Array, options: ContractOptions, ...params: unknown[]): ContractCallResult<ApiType, ContractCallOutcome>;
|
||||
// @deprecated Use options form (to be dropped in a major update)
|
||||
(origin: AccountId | string | Uint8Array, value: bigint | BN | string | number, gasLimit: bigint | BN | string | number, ...params: unknown[]): ContractCallResult<ApiType, ContractCallOutcome>;
|
||||
}
|
||||
|
||||
export interface ContractTx<ApiType extends ApiTypes> {
|
||||
export interface ContractTx<ApiType extends ApiTypes> extends MessageMeta {
|
||||
(options: ContractOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
|
||||
// @deprecated Use options form (to be dropped in a major update)
|
||||
(value: bigint | BN | string | number, gasLimit: bigint | BN | string | number, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
|
||||
}
|
||||
|
||||
export interface ContractGeneric<O, T> {
|
||||
(messageOrId: AbiMessage | string | number, options: O, ...params: unknown[]): T;
|
||||
// @deprecated Use options form (to be dropped in a major update)
|
||||
(messageOrId: AbiMessage | string | number, value: bigint | BN | string | number, gasLimit: bigint | BN | string | number, ...params: unknown[]): T;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { SubmittableResult } from '@polkadot/api';
|
||||
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
|
||||
import type { ApiTypes } from '@polkadot/api/types';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { AbiConstructor, BlueprintOptions } from '../types';
|
||||
import type { AbiConstructor, AbiMessage, BlueprintOptions } from '../types';
|
||||
import type { BlueprintDeploy, ContractGeneric } from './types';
|
||||
|
||||
import { Bytes } from '@polkadot/types';
|
||||
@@ -16,11 +16,18 @@ import { extractOptions, isOptions } from '../util';
|
||||
|
||||
export const EMPTY_SALT = new Uint8Array();
|
||||
|
||||
export function createBluePrintTx <ApiType extends ApiTypes, R extends SubmittableResult> (fn: (options: BlueprintOptions, params: unknown[]) => SubmittableExtrinsic<ApiType, R>): BlueprintDeploy<ApiType> {
|
||||
return (options: bigint | string | number | BN | BlueprintOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType, R> =>
|
||||
export function withMeta <T extends { meta: AbiMessage }> (meta: AbiMessage, creator: Omit<T, 'meta'>): T {
|
||||
(creator as T).meta = meta;
|
||||
|
||||
return creator as T;
|
||||
}
|
||||
|
||||
export function createBluePrintTx <ApiType extends ApiTypes, R extends SubmittableResult> (meta: AbiMessage, fn: (options: BlueprintOptions, params: unknown[]) => SubmittableExtrinsic<ApiType, R>): BlueprintDeploy<ApiType> {
|
||||
return withMeta(meta, (options: bigint | string | number | BN | BlueprintOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType, R> =>
|
||||
isOptions(options)
|
||||
? fn(options, params)
|
||||
: fn(...extractOptions<BlueprintOptions>(options, params));
|
||||
: fn(...extractOptions<BlueprintOptions>(options, params))
|
||||
);
|
||||
}
|
||||
|
||||
export function createBluePrintWithId <T> (fn: (constructorOrId: AbiConstructor | string | number, options: BlueprintOptions, params: unknown[]) => T): ContractGeneric<BlueprintOptions, T> {
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '7.3.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '8.2.1' };
|
||||
|
||||
@@ -0,0 +1,529 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 1,
|
||||
"lookupName": "InkStorageCollectionsStashHeader",
|
||||
"type": "{\"lastVacant\":\"u32\",\"len\":\"u32\",\"lenEntries\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Header",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "lastVacant",
|
||||
"typeName": "Index"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "len",
|
||||
"typeName": "u32"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "lenEntries",
|
||||
"typeName": "u32"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 3,
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"AccountId\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup7",
|
||||
"typeName": "VacantEntry",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId",
|
||||
"typeName": "T",
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 5,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "{\"next\":\"u32\",\"prev\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::VacantEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "next",
|
||||
"typeName": "Index"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "prev",
|
||||
"typeName": "Index"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 8,
|
||||
"type": "{\"value\":\"u128\",\"keyIndex\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "value",
|
||||
"typeName": "V"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "keyIndex",
|
||||
"typeName": "KeyIndex"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 9,
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"(AccountId,AccountId)\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup7",
|
||||
"typeName": "VacantEntry",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 10,
|
||||
"type": "(AccountId,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
],
|
||||
"typeName": "T",
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 10,
|
||||
"type": "(AccountId,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 11,
|
||||
"type": "Text",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 12,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 13,
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"u32\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup7",
|
||||
"typeName": "VacantEntry",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"typeName": "T",
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 14,
|
||||
"type": "{\"value\":\"u32\",\"keyIndex\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "value",
|
||||
"typeName": "V"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "keyIndex",
|
||||
"typeName": "KeyIndex"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 15,
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"(u32,AccountId)\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup7",
|
||||
"typeName": "VacantEntry",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 16,
|
||||
"type": "(u32,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
],
|
||||
"typeName": "T",
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 16,
|
||||
"type": "(u32,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 17,
|
||||
"type": "{\"value\":\"Null\",\"keyIndex\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 18,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "value",
|
||||
"typeName": "V"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "keyIndex",
|
||||
"typeName": "KeyIndex"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 18,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 19,
|
||||
"type": "Option<Text>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 11,
|
||||
"type": "Text",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 20,
|
||||
"type": "Result<Null, ContractsErrorsPsp22Psp22Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 18,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 21,
|
||||
"lookupName": "ContractsErrorsPsp22Psp22Error",
|
||||
"type": "Lookup21"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 21,
|
||||
"lookupName": "ContractsErrorsPsp22Psp22Error",
|
||||
"type": "{\"_enum\":{\"Custom\":\"Text\",\"InsufficientBalance\":\"Null\",\"InsufficientAllowance\":\"Null\",\"ZeroRecipientAddress\":\"Null\",\"ZeroSenderAddress\":\"Null\",\"SafeTransferCheckFailed\":\"Text\"}}",
|
||||
"docs": [],
|
||||
"namespace": "contracts::traits::errors::psp22::PSP22Error",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 11,
|
||||
"type": "Text",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"typeName": "Text",
|
||||
"index": 0,
|
||||
"name": "Custom"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "InsufficientBalance"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 2,
|
||||
"name": "InsufficientAllowance"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 3,
|
||||
"name": "ZeroRecipientAddress"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 4,
|
||||
"name": "ZeroSenderAddress"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 11,
|
||||
"type": "Text",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"typeName": "Text",
|
||||
"index": 5,
|
||||
"name": "SafeTransferCheckFailed"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 22,
|
||||
"type": "Bytes",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 23,
|
||||
"type": "Option<AccountId>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,204 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 1,
|
||||
"type": "{\"offsetKey\":\"InkPrimitivesKey\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"sub": [
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 5,
|
||||
"lookupName": "InkPrimitivesKey",
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
"typeName": "Key",
|
||||
"name": "offsetKey"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 3,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 5,
|
||||
"lookupName": "InkPrimitivesKey",
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
"typeName": "[u8;32]"
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 6,
|
||||
"type": "{\"offsetKey\":\"InkPrimitivesKey\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"sub": [
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 5,
|
||||
"lookupName": "InkPrimitivesKey",
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
"typeName": "Key",
|
||||
"name": "offsetKey"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 7,
|
||||
"type": "(AccountId,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 8,
|
||||
"type": "Result<Null, TraitErc20Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 9,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 10,
|
||||
"lookupName": "TraitErc20Erc20Error",
|
||||
"type": "Lookup10"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 9,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 10,
|
||||
"lookupName": "TraitErc20Erc20Error",
|
||||
"type": "{\"_enum\":[\"InsufficientBalance\",\"InsufficientAllowance\"]}",
|
||||
"docs": [],
|
||||
"namespace": "trait_erc20::erc20::Error",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 0,
|
||||
"name": "InsufficientBalance"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "InsufficientAllowance"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 11,
|
||||
"type": "Option<AccountId>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -5,5 +5,6 @@ import { createVersionedExport } from '../util';
|
||||
import * as v0 from './v0';
|
||||
import * as v1 from './v1';
|
||||
import * as v2 from './v2';
|
||||
import * as v3 from './v3';
|
||||
|
||||
export default createVersionedExport({ v0, v1, v2 });
|
||||
export default createVersionedExport({ v0, v1, v2, v3 });
|
||||
|
||||
@@ -2,3 +2,5 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as flipper } from './flipper.contract.json';
|
||||
// A complex contract example with traits.
|
||||
export { default as psp22 } from './psp22_minter_pauser.contract.json';
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,105 @@
|
||||
{
|
||||
"source": {
|
||||
"hash": "0xbb381c2fc980121b17c7b2bf2756d5964a12151cb846e0a9eff9cc337806456d",
|
||||
"language": "ink! 3.0.0-rc7",
|
||||
"compiler": "rustc 1.60.0-nightly",
|
||||
"wasm": "0x0061736d0100000001280860027f7f0060000060037f7f7f0060017f006000017f60017f017f60037f7f7f017f60017f017e02880106057365616c30107365616c5f7365745f73746f726167650002057365616c30107365616c5f6765745f73746f726167650006057365616c300a7365616c5f696e7075740000057365616c300b7365616c5f72657475726e0002057365616c30167365616c5f76616c75655f7472616e73666572726564000003656e76066d656d6f727902010210030a090400050103070001000608017f01418080040b071102066465706c6f7900080463616c6c000c0ac40b096102027f027e230041206b22002400200041106a22014200370300200042003703082000411036021c200041086a2000411c6a1004200028021c41114f0440000b2001290300210220002903082103200041206a2400410541042002200384501b0bc20101027f230041306b220224004101210302402000027f20014101714504404104100541ff01714105470d011a0b200241106a4200370300200241186a4200370300200241206a42003703002002420037030820024201370300200241808001360228200241086a41808004200241286a100120022802282201418180014f720d012002200136022c200241808004360228200241286a100741ff017122014102460d014100210320014100470b3a0001200020033a0000200241306a24000f0b000b4201027f230041106b22012400200141086a2000100d20012d0009210020012d00082102200141106a240041024101410220004101461b410020001b20024101711b0bd30202057f027e230041306b2200240020004180800136020c200041808004360208200041086a1009200020002903083703100240200041106a100a22054201832206a70d00200542807e8342002006501b22064280feffffff1f832205422088a721012005421888a721022005421088a7210302402006a741087641ff0171220441ed014704402004419b0147200341ff017141ae014772200241ff0171419d0147200141de004772720d02200041106a100741ff017122014102460d02100541ff01714105470d02200041286a4200370300200041206a4200370300200041186a4200370300200042003703102001410171200041106a100b0c010b200341ff017141cb0047200241ff0171419d0147722001411b47720d01200041286a4200370300200041206a4200370300200041186a4200370300200042003703104100200041106a100b0b200041306a24000f0b000b4101027f230041106b2201240020012000280204220236020c20002802002001410c6a10022002200128020c2202490440000b20002002360204200141106a24000b850102027f017e230041106b220124002001420437030841042102027f02400240034020012000100d20012d00004101710d01200141086a20026a20012d00013a0000200241016a22024108470d000b20012903082203a741044f0d01000b4101210241000c010b410021022003422088a70b2100200141106a24002002ad2000ad420886840b6b01017f230041306b220224004180800420003a0000200241286a200141186a290000370300200241206a200141106a290000370300200241186a200141086a2900003703002002420137030820022001290000370310200241106a4180800441011000200241306a24000b910302057f027e230041406a22002400024002400240100541ff01714105470d0020004180800136021c200041808004360218200041186a100920002000290318370320027f0240200041206a100a22054201832206a70d00200542807e8342002006501b22064280feffffff1f832205422088a721022005421888a721012005421088a721032006a741087641ff01712204412f470440200441e30047200341ff0171413a4772200141ff017141a50147200241d1004772720d014101210141000c020b200341ff017141860147200141ff017141db0047720d00410021014100200241d901460d011a0b4101210141010b0d00024020010440200041086a418002100620002d0009210120002d00084101710d01200041386a4200370300200041306a4200370300200041286a4200370300200042003703202001417f73410171200041206a100b0c040b200041106a4100100620002d0011210120002d0010410171450d020b20014105460d020b000b4180800420014101713a000041004180800441011003000b200041406b24000b3c01017f200020012802042202047f2001200241016b36020420012001280200220141016a36020020012d00000520010b3a000120002002453a00000b"
|
||||
},
|
||||
"contract": {
|
||||
"name": "flipper",
|
||||
"version": "3.0.0-rc7",
|
||||
"authors": [
|
||||
"Parity Technologies <admin@parity.io>"
|
||||
]
|
||||
},
|
||||
"V3": {
|
||||
"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": true,
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as flipper } from './flipper.contract.json';
|
||||
// A complex contract example with traits.
|
||||
export { default as traitErc20 } from './trait_erc20.contract.json';
|
||||
File diff suppressed because one or more lines are too long
@@ -40,6 +40,7 @@ export interface AbiMessage {
|
||||
isMutating?: boolean;
|
||||
isPayable?: boolean;
|
||||
method: string;
|
||||
path: string[];
|
||||
returnType?: TypeDef | null;
|
||||
selector: ContractSelector;
|
||||
toU8a: (params: unknown[]) => Uint8Array;
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
"mock.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api" },
|
||||
{ "path": "../types" },
|
||||
{ "path": "../types-codec" },
|
||||
{ "path": "../types-create" }
|
||||
{ "path": "../api/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" },
|
||||
{ "path": "../types-codec/tsconfig.build.json" },
|
||||
{ "path": "../types-create/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
@@ -17,9 +17,9 @@
|
||||
"mock.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../api" },
|
||||
{ "path": "../api-augment" },
|
||||
{ "path": "../api-contract" },
|
||||
{ "path": "../types" }
|
||||
{ "path": "../api/tsconfig.build.json" },
|
||||
{ "path": "../api-augment/tsconfig.build.json" },
|
||||
{ "path": "../api-contract/tsconfig.build.json" },
|
||||
{ "path": "../types/tsconfig.build.json" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -20,25 +20,25 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "7.3.1",
|
||||
"version": "8.2.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.16.7",
|
||||
"@polkadot/api": "7.3.1",
|
||||
"@polkadot/api-augment": "7.3.1",
|
||||
"@polkadot/api-base": "7.3.1",
|
||||
"@polkadot/rpc-core": "7.3.1",
|
||||
"@polkadot/types": "7.3.1",
|
||||
"@polkadot/types-codec": "7.3.1",
|
||||
"@polkadot/util": "^8.3.1",
|
||||
"@polkadot/util-crypto": "^8.3.1",
|
||||
"rxjs": "^7.5.1"
|
||||
"@babel/runtime": "^7.17.9",
|
||||
"@polkadot/api": "8.2.1",
|
||||
"@polkadot/api-augment": "8.2.1",
|
||||
"@polkadot/api-base": "8.2.1",
|
||||
"@polkadot/rpc-core": "8.2.1",
|
||||
"@polkadot/types": "8.2.1",
|
||||
"@polkadot/types-codec": "8.2.1",
|
||||
"@polkadot/util": "^9.0.1",
|
||||
"@polkadot/util-crypto": "^9.0.1",
|
||||
"rxjs": "^7.5.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api": "7.3.1",
|
||||
"@polkadot/api-augment": "7.3.1",
|
||||
"@polkadot/rpc-augment": "7.3.1",
|
||||
"@polkadot/rpc-provider": "7.3.1",
|
||||
"@polkadot/types-support": "7.3.1"
|
||||
"@polkadot/api": "8.2.1",
|
||||
"@polkadot/api-augment": "8.2.1",
|
||||
"@polkadot/rpc-augment": "8.2.1",
|
||||
"@polkadot/rpc-provider": "8.2.1",
|
||||
"@polkadot/types-support": "8.2.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { Option } from '@polkadot/types';
|
||||
import type { PalletBagsListListBag } from '@polkadot/types/lookup';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { DeriveApi } from '../types';
|
||||
import type { Bag } from './types';
|
||||
|
||||
import { map, of, switchMap } from 'rxjs';
|
||||
|
||||
import { BN_ZERO, bnToBn } from '@polkadot/util';
|
||||
|
||||
import { memo } from '../util';
|
||||
|
||||
function orderBags (ids: BN[], bags: Option<PalletBagsListListBag>[]): Bag[] {
|
||||
const sorted = ids
|
||||
.map((id, index) => ({
|
||||
bag: bags[index].unwrapOr(null),
|
||||
id,
|
||||
key: id.toString()
|
||||
}))
|
||||
.sort((a, b) => b.id.cmp(a.id))
|
||||
.map((base, index): Bag => ({
|
||||
...base,
|
||||
bagLower: BN_ZERO,
|
||||
bagUpper: base.id,
|
||||
index
|
||||
}));
|
||||
const max = sorted.length - 1;
|
||||
|
||||
return sorted.map((entry, index) =>
|
||||
index === max
|
||||
? entry
|
||||
// We could probably use a .add(BN_ONE) here
|
||||
: { ...entry, bagLower: sorted[index + 1].bagUpper }
|
||||
);
|
||||
}
|
||||
|
||||
export function _getIds (instanceId: string, api: DeriveApi): (ids: (BN | number)[]) => Observable<Bag[]> {
|
||||
return memo(instanceId, (_ids: (BN | number)[]): Observable<Bag[]> => {
|
||||
const ids = _ids.map((id) => bnToBn(id));
|
||||
|
||||
return ids.length
|
||||
? api.query.listBags.multi<Option<PalletBagsListListBag>[]>(ids).pipe(
|
||||
map((bags) => orderBags(ids, bags))
|
||||
)
|
||||
: of([]);
|
||||
});
|
||||
}
|
||||
|
||||
export function all (instanceId: string, api: DeriveApi): () => Observable<Bag[]> {
|
||||
return memo(instanceId, (): Observable<Bag[]> =>
|
||||
api.query.bagsList.listBags.keys().pipe(
|
||||
switchMap((keys) =>
|
||||
api.derive.bagsList._getIds(keys.map(({ args: [id] }) => id))
|
||||
),
|
||||
map((list) =>
|
||||
list.filter(({ bag }) => bag)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
export function get (instanceId: string, api: DeriveApi): (id: BN | number) => Observable<Bag> {
|
||||
return memo(instanceId, (id: BN | number): Observable<Bag> =>
|
||||
api.derive.bagsList._getIds([bnToBn(id)]).pipe(
|
||||
map((bags) => bags[0])
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { DeriveApi } from '../types';
|
||||
import type { Bag, BagExpanded } from './types';
|
||||
|
||||
import { map, switchMap } from 'rxjs';
|
||||
|
||||
import { memo } from '../util';
|
||||
|
||||
export function expand (instanceId: string, api: DeriveApi): (bag: Bag) => Observable<BagExpanded> {
|
||||
return memo(instanceId, (bag: Bag): Observable<BagExpanded> =>
|
||||
api.derive.bagsList.listNodes(bag.bag).pipe(
|
||||
map((nodes) => ({ ...bag, nodes }))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
export function getExpanded (instanceId: string, api: DeriveApi): (id: BN | number) => Observable<BagExpanded> {
|
||||
return memo(instanceId, (id: BN | number): Observable<BagExpanded> =>
|
||||
api.derive.bagsList.get(id).pipe(
|
||||
switchMap((bag) =>
|
||||
api.derive.bagsList.expand(bag)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export * from './get';
|
||||
export * from './getExpanded';
|
||||
export * from './listNodes';
|
||||
@@ -0,0 +1,41 @@
|
||||
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { Option } from '@polkadot/types';
|
||||
import type { AccountId32 } from '@polkadot/types/interfaces';
|
||||
import type { PalletBagsListListBag, PalletBagsListListNode } from '@polkadot/types/lookup';
|
||||
import type { DeriveApi } from '../types';
|
||||
|
||||
import { BehaviorSubject, map, of, switchMap, tap, toArray } from 'rxjs';
|
||||
|
||||
import { memo } from '../util';
|
||||
|
||||
function traverseLinks (api: DeriveApi, head: AccountId32 | string): Observable<PalletBagsListListNode[]> {
|
||||
const subject = new BehaviorSubject<AccountId32 | string>(head);
|
||||
|
||||
return subject.pipe(
|
||||
switchMap((account) =>
|
||||
api.query.bagsList.listNodes(account)
|
||||
),
|
||||
tap((node: Option<PalletBagsListListNode>): void => {
|
||||
setTimeout((): void => {
|
||||
node.isSome && (node.value as PalletBagsListListNode).next.isSome
|
||||
? subject.next(node.unwrap().next.unwrap())
|
||||
: subject.complete();
|
||||
}, 0);
|
||||
}),
|
||||
toArray(), // toArray since we want to startSubject to be completed
|
||||
map((all: Option<PalletBagsListListNode>[]) =>
|
||||
all.map((o) => o.unwrap())
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
export function listNodes (instanceId: string, api: DeriveApi): (bag: PalletBagsListListBag | null) => Observable<PalletBagsListListNode[]> {
|
||||
return memo(instanceId, (bag: PalletBagsListListBag | null): Observable<PalletBagsListListNode[]> =>
|
||||
bag && bag.head.isSome
|
||||
? traverseLinks(api, bag.head.unwrap())
|
||||
: of([])
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { PalletBagsListListBag, PalletBagsListListNode } from '@polkadot/types/lookup';
|
||||
import type { BN } from '@polkadot/util';
|
||||
|
||||
export interface Bag {
|
||||
bag: PalletBagsListListBag | null;
|
||||
bagUpper: BN;
|
||||
bagLower: BN;
|
||||
id: BN;
|
||||
index: number;
|
||||
key: string;
|
||||
}
|
||||
|
||||
export interface BagExpanded extends Bag {
|
||||
nodes: PalletBagsListListNode[];
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import type { Observable } from 'rxjs';
|
||||
import type { QueryableStorageMultiArg } from '@polkadot/api-base/types';
|
||||
import type { Option, Vec } from '@polkadot/types';
|
||||
import type { AccountId, AccountIndex, Address, Balance, BalanceLockTo212, BlockNumber, VestingSchedule } from '@polkadot/types/interfaces';
|
||||
import type { PalletBalancesBalanceLock, PalletVestingVestingInfo } from '@polkadot/types/lookup';
|
||||
import type { PalletBalancesBalanceLock, PalletBalancesReserveData, PalletVestingVestingInfo } from '@polkadot/types/lookup';
|
||||
import type { DeriveApi, DeriveBalancesAccount, DeriveBalancesAccountData, DeriveBalancesAll, DeriveBalancesAllAccountData, DeriveBalancesAllVesting } from '../types';
|
||||
|
||||
import { combineLatest, map, of, switchMap } from 'rxjs';
|
||||
@@ -14,9 +14,7 @@ import { BN, BN_ZERO, bnMax, bnMin, isFunction } from '@polkadot/util';
|
||||
|
||||
import { memo } from '../util';
|
||||
|
||||
type BalanceLocksEntry = Vec<PalletBalancesBalanceLock | BalanceLockTo212>;
|
||||
type BalanceLocks = BalanceLocksEntry[];
|
||||
type ResultBalance = [PalletVestingVestingInfo[] | null, ((PalletBalancesBalanceLock | BalanceLockTo212)[])[]];
|
||||
type ResultBalance = [PalletVestingVestingInfo[] | null, ((PalletBalancesBalanceLock | BalanceLockTo212)[])[], PalletBalancesReserveData[][]];
|
||||
type Result = [DeriveBalancesAccount, BlockNumber, ResultBalance];
|
||||
|
||||
interface AllLocked {
|
||||
@@ -86,7 +84,9 @@ function calcVesting (bestNumber: BlockNumber, shared: DeriveBalancesAllAccountD
|
||||
return {
|
||||
isVesting,
|
||||
vestedBalance,
|
||||
vestedClaimable: isVesting ? shared.vestingLocked.sub(vestingTotal.sub(vestedBalance)) : BN_ZERO,
|
||||
vestedClaimable: isVesting
|
||||
? shared.vestingLocked.sub(vestingTotal.sub(vestedBalance))
|
||||
: BN_ZERO,
|
||||
vesting: vesting
|
||||
.map(({ locked, perBlock, startingBlock }, index) => ({
|
||||
endBlock: locked.div(perBlock).iadd(startingBlock),
|
||||
@@ -100,7 +100,7 @@ function calcVesting (bestNumber: BlockNumber, shared: DeriveBalancesAllAccountD
|
||||
};
|
||||
}
|
||||
|
||||
function calcBalances (api: DeriveApi, [data, bestNumber, [vesting, allLocks]]: Result): DeriveBalancesAll {
|
||||
function calcBalances (api: DeriveApi, [data, bestNumber, [vesting, allLocks, namedReserves]]: Result): DeriveBalancesAll {
|
||||
const shared = calcShared(api, bestNumber, data, allLocks[0]);
|
||||
|
||||
return {
|
||||
@@ -110,7 +110,8 @@ function calcBalances (api: DeriveApi, [data, bestNumber, [vesting, allLocks]]:
|
||||
accountNonce: data.accountNonce,
|
||||
additional: allLocks
|
||||
.filter((_, index) => index !== 0)
|
||||
.map((l, index) => calcShared(api, bestNumber, data.additional[index], l))
|
||||
.map((l, index) => calcShared(api, bestNumber, data.additional[index], l)),
|
||||
namedReserves
|
||||
};
|
||||
}
|
||||
|
||||
@@ -133,7 +134,8 @@ function queryOld (api: DeriveApi, accountId: AccountId): Observable<ResultBalan
|
||||
vestingNew
|
||||
? [vestingNew]
|
||||
: null,
|
||||
[locks]
|
||||
[locks],
|
||||
[]
|
||||
];
|
||||
})
|
||||
);
|
||||
@@ -141,33 +143,58 @@ function queryOld (api: DeriveApi, accountId: AccountId): Observable<ResultBalan
|
||||
|
||||
const isNonNullable = <T>(nullable: T): nullable is NonNullable<T> => !!nullable;
|
||||
|
||||
function createCalls (accountId: AccountId, calls: unknown[]): [boolean[], QueryableStorageMultiArg<'rxjs'>[]] {
|
||||
return [
|
||||
calls.map((c) => !c),
|
||||
calls
|
||||
.filter(isNonNullable)
|
||||
.map((c) => [c, accountId] as unknown as QueryableStorageMultiArg<'rxjs'>)
|
||||
];
|
||||
}
|
||||
|
||||
// current (balances, vesting)
|
||||
function queryCurrent (api: DeriveApi, accountId: AccountId, balanceInstances: string[] = ['balances']): Observable<ResultBalance> {
|
||||
const calls = balanceInstances.map((m): DeriveApi['query']['balances']['locks'] | undefined =>
|
||||
(api.derive as DeriveCustomLocks)[m]?.customLocks || api.query[m as 'balances']?.locks
|
||||
const [lockEmpty, lockQueries] = createCalls(
|
||||
accountId,
|
||||
balanceInstances.map((m): DeriveApi['query']['balances']['locks'] | undefined =>
|
||||
(api.derive as DeriveCustomLocks)[m]?.customLocks || api.query[m as 'balances']?.locks
|
||||
)
|
||||
);
|
||||
const [reserveEmpty, reserveQueries] = createCalls(
|
||||
accountId,
|
||||
balanceInstances.map((m): DeriveApi['query']['balances']['reserves'] | undefined =>
|
||||
api.query[m as 'balances']?.reserves
|
||||
)
|
||||
);
|
||||
const lockEmpty = calls.map((c) => !c);
|
||||
const queries = calls.filter(isNonNullable).map((c): QueryableStorageMultiArg<'rxjs'> => [c, accountId]);
|
||||
|
||||
return (
|
||||
return combineLatest([
|
||||
api.query.vesting?.vesting
|
||||
? api.queryMulti<[Option<PalletVestingVestingInfo> | Option<Vec<PalletVestingVestingInfo>>, ...BalanceLocks]>([[api.query.vesting.vesting, accountId], ...queries])
|
||||
// TODO We need to check module instances here as well, not only the balances module
|
||||
: queries.length
|
||||
? api.queryMulti<[...(Vec<PalletBalancesBalanceLock>)[]]>(queries).pipe(
|
||||
map((r): [Option<PalletVestingVestingInfo>, ...BalanceLocks] => [api.registry.createType('Option<VestingInfo>'), ...r])
|
||||
)
|
||||
: of([api.registry.createType('Option<VestingInfo>')] as [Option<PalletVestingVestingInfo>])
|
||||
).pipe(
|
||||
map(([opt, ...locks]): ResultBalance => {
|
||||
let offset = -1;
|
||||
? api.query.vesting.vesting(accountId)
|
||||
: of(api.registry.createType('Option<VestingInfo>')),
|
||||
lockQueries.length
|
||||
? api.queryMulti<[...(Vec<PalletBalancesBalanceLock>)[]]>(lockQueries)
|
||||
: of([] as Vec<PalletBalancesBalanceLock>[]),
|
||||
reserveQueries.length
|
||||
? api.queryMulti<[...(Vec<PalletBalancesReserveData>)[]]>(reserveQueries)
|
||||
: of([] as Vec<PalletBalancesReserveData>[])
|
||||
]).pipe(
|
||||
map(([opt, locks, reserves]): ResultBalance => {
|
||||
let offsetLock = -1;
|
||||
let offsetReserve = -1;
|
||||
const vesting = opt.unwrapOr(null);
|
||||
|
||||
return [
|
||||
vesting
|
||||
? Array.isArray(vesting) ? vesting : [vesting]
|
||||
? Array.isArray(vesting)
|
||||
? vesting
|
||||
: [vesting as PalletVestingVestingInfo]
|
||||
: null,
|
||||
lockEmpty.map((e) => e ? api.registry.createType<Vec<PalletBalancesBalanceLock>>('Vec<BalanceLock>') : locks[++offset])
|
||||
lockEmpty.map((e) =>
|
||||
e ? api.registry.createType<Vec<PalletBalancesBalanceLock>>('Vec<BalanceLock>') : locks[++offsetLock]
|
||||
),
|
||||
reserveEmpty.map((e) =>
|
||||
e ? api.registry.createType<Vec<PalletBalancesReserveData>>('Vec<PalletBalancesReserveData>') : reserves[++offsetReserve]
|
||||
)
|
||||
];
|
||||
})
|
||||
);
|
||||
@@ -202,7 +229,7 @@ export function all (instanceId: string, api: DeriveApi): (address: AccountIndex
|
||||
? queryCurrent(api, account.accountId, balanceInstances)
|
||||
: queryOld(api, account.accountId)
|
||||
])
|
||||
: of([account, api.registry.createType('BlockNumber'), [null, []]])
|
||||
: of([account, api.registry.createType('BlockNumber'), [null, [], []]])
|
||||
)
|
||||
),
|
||||
map((result): DeriveBalancesAll => calcBalances(api, result))
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { Balance } from '@polkadot/types/interfaces';
|
||||
import type { DeriveApi, DeriveFees } from '../types';
|
||||
|
||||
import { map, of } from 'rxjs';
|
||||
|
||||
import { memo } from '../util';
|
||||
|
||||
/**
|
||||
* @name fees
|
||||
* @returns An object containing the combined results of the storage queries for
|
||||
* all relevant fees as declared in the substrate chain spec.
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* api.derive.balances.fees(({ creationFee, transferFee }) => {
|
||||
* console.log(`The fee for creating a new account on this chain is ${creationFee} units. The fee required for making a transfer is ${transferFee} units.`);
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export function fees (instanceId: string, api: DeriveApi): () => Observable<DeriveFees> {
|
||||
return memo(instanceId, (): Observable<DeriveFees> =>
|
||||
of([
|
||||
// deprecated - remove
|
||||
(api.consts.balances?.creationFee as unknown as Balance) || api.registry.createType('Balance'),
|
||||
(api.consts.balances?.transferFee as unknown as Balance) || api.registry.createType('Balance'),
|
||||
|
||||
// current
|
||||
(api.consts.balances?.existentialDeposit as Balance) || api.registry.createType('Balance'),
|
||||
(api.consts.transactionPayment?.transactionBaseFee as unknown as Balance) || api.registry.createType('Balance'),
|
||||
(api.consts.transactionPayment?.transactionByteFee as Balance) || api.registry.createType('Balance')
|
||||
]).pipe(
|
||||
map(([creationFee, transferFee, existentialDeposit, transactionBaseFee, transactionByteFee]): DeriveFees => ({
|
||||
creationFee,
|
||||
existentialDeposit,
|
||||
transactionBaseFee,
|
||||
transactionByteFee,
|
||||
transferFee
|
||||
}))
|
||||
));
|
||||
}
|
||||
@@ -4,7 +4,6 @@
|
||||
import { all } from './all';
|
||||
|
||||
export * from './account';
|
||||
export * from './fees';
|
||||
export * from './votingBalances';
|
||||
|
||||
const votingBalance = all;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { AccountId, Balance, BalanceLockTo212, Index } from '@polkadot/types/interfaces';
|
||||
import type { PalletBalancesBalanceLock } from '@polkadot/types/lookup';
|
||||
import type { PalletBalancesBalanceLock, PalletBalancesReserveData } from '@polkadot/types/lookup';
|
||||
import type { BN } from '@polkadot/util';
|
||||
|
||||
export interface DeriveBalancesAccountData {
|
||||
@@ -44,6 +44,7 @@ export interface DeriveBalancesAllVesting {
|
||||
|
||||
export interface DeriveBalancesAll extends DeriveBalancesAccount, DeriveBalancesAllAccountData, DeriveBalancesAllVesting {
|
||||
additional: DeriveBalancesAllAccountData[];
|
||||
namedReserves: PalletBalancesReserveData[][];
|
||||
}
|
||||
|
||||
export type DeriveBalancesMap = Record<string, DeriveBalancesAll>;
|
||||
|
||||
@@ -35,29 +35,31 @@ export function bounties (instanceId: string, api: DeriveApi): () => Observable<
|
||||
const bountyBase = api.query.bounties || api.query.treasury;
|
||||
|
||||
return memo(instanceId, (): Observable<DeriveBounties> =>
|
||||
combineLatest([
|
||||
bountyBase.bountyCount(),
|
||||
api.query.council
|
||||
? api.query.council.proposalCount()
|
||||
: of(0)
|
||||
]).pipe(
|
||||
switchMap(() => combineLatest([
|
||||
bountyBase.bounties.keys(),
|
||||
api.derive.council
|
||||
? api.derive.council.proposals()
|
||||
: of([])
|
||||
])),
|
||||
switchMap(([keys, proposals]): Observable<Result> => {
|
||||
const ids = keys.map(({ args: [id] }) => id);
|
||||
bountyBase.bounties
|
||||
? combineLatest([
|
||||
bountyBase.bountyCount(),
|
||||
api.query.council
|
||||
? api.query.council.proposalCount()
|
||||
: of(0)
|
||||
]).pipe(
|
||||
switchMap(() => combineLatest([
|
||||
bountyBase.bounties.keys(),
|
||||
api.derive.council
|
||||
? api.derive.council.proposals()
|
||||
: of([])
|
||||
])),
|
||||
switchMap(([keys, proposals]): Observable<Result> => {
|
||||
const ids = keys.map(({ args: [id] }) => id);
|
||||
|
||||
return combineLatest([
|
||||
bountyBase.bounties.multi(ids),
|
||||
bountyBase.bountyDescriptions.multi(ids),
|
||||
of(ids),
|
||||
of(filterBountiesProposals(api, proposals))
|
||||
]);
|
||||
}),
|
||||
map(parseResult)
|
||||
)
|
||||
return combineLatest([
|
||||
bountyBase.bounties.multi(ids),
|
||||
bountyBase.bountyDescriptions.multi(ids),
|
||||
of(ids),
|
||||
of(filterBountiesProposals(api, proposals))
|
||||
]);
|
||||
}),
|
||||
map(parseResult)
|
||||
)
|
||||
: of(parseResult([[], [], [], []]))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -22,6 +22,10 @@ export { lazyDeriveSection };
|
||||
|
||||
// Enable derive only if some of these modules are available
|
||||
const checks: Record<string, Avail> = {
|
||||
bagsList: {
|
||||
instances: ['bagsList'],
|
||||
methods: []
|
||||
},
|
||||
contracts: {
|
||||
instances: ['contracts'],
|
||||
methods: []
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { AnyNumber } from '@polkadot/types/types';
|
||||
import type { SignedBlockExtended } from '../type/types';
|
||||
import type { DeriveApi } from '../types';
|
||||
|
||||
import { switchMap } from 'rxjs';
|
||||
|
||||
import { memo } from '../util';
|
||||
|
||||
export function getBlockByNumber (instanceId: string, api: DeriveApi): (blockNumber: AnyNumber) => Observable<SignedBlockExtended | undefined> {
|
||||
return memo(instanceId, (blockNumber: AnyNumber): Observable<SignedBlockExtended | undefined> =>
|
||||
api.rpc.chain.getBlockHash(blockNumber).pipe(
|
||||
switchMap((h) => api.derive.chain.getBlock(h))
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { AccountId } from '@polkadot/types/interfaces';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
import type { HeaderExtended } from '../type/types';
|
||||
import type { DeriveApi } from '../types';
|
||||
|
||||
@@ -39,7 +38,7 @@ export function getHeader (instanceId: string, api: DeriveApi): (blockHash: Uint
|
||||
)
|
||||
]).pipe(
|
||||
map(([header, validators]) =>
|
||||
createHeaderExtended(header.registry as Registry, header, validators)
|
||||
createHeaderExtended(header.registry, header, validators)
|
||||
),
|
||||
catchError((): Observable<undefined> =>
|
||||
// where rpc.chain.getHeader throws, we will land here - it can happen that
|
||||
|
||||
@@ -6,5 +6,6 @@ export * from './bestNumberFinalized';
|
||||
export * from './bestNumberLag';
|
||||
export * from './getHeader';
|
||||
export * from './getBlock';
|
||||
export * from './getBlockByNumber';
|
||||
export * from './subscribeNewBlocks';
|
||||
export * from './subscribeNewHeads';
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
import type { SignedBlockExtended } from '../type/types';
|
||||
import type { DeriveApi } from '../types';
|
||||
|
||||
@@ -33,7 +32,7 @@ export function subscribeNewBlocks (instanceId: string, api: DeriveApi): () => O
|
||||
]);
|
||||
}),
|
||||
map(([header, block, events]) =>
|
||||
createSignedBlockExtended(block.registry as Registry, block, events, header.validators)
|
||||
createSignedBlockExtended(block.registry, block, events, header.validators)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
import type { HeaderExtended } from '../type/types';
|
||||
import type { DeriveApi } from '../types';
|
||||
|
||||
@@ -35,7 +34,7 @@ export function subscribeNewHeads (instanceId: string, api: DeriveApi): () => Ob
|
||||
map(([header, validators]): HeaderExtended => {
|
||||
header.createdAtHash = header.hash;
|
||||
|
||||
return createHeaderExtended(header.registry as Registry, header, validators);
|
||||
return createHeaderExtended(header.registry, header, validators);
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { Option } from '@polkadot/types';
|
||||
import type { Option, u32 } from '@polkadot/types';
|
||||
import type { PolkadotRuntimeCommonCrowdloanFundInfo } from '@polkadot/types/lookup';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { DeriveApi } from '../types';
|
||||
@@ -14,12 +14,20 @@ import { blake2AsU8a } from '@polkadot/util-crypto';
|
||||
|
||||
import { memo } from '../util';
|
||||
|
||||
function createChildKey ({ trieIndex }: PolkadotRuntimeCommonCrowdloanFundInfo): string {
|
||||
interface AllInfo extends PolkadotRuntimeCommonCrowdloanFundInfo {
|
||||
// previously it was named trieIndex
|
||||
trieIndex?: u32;
|
||||
}
|
||||
|
||||
function createChildKey (info: AllInfo): string {
|
||||
return u8aToHex(
|
||||
u8aConcat(
|
||||
':child_storage:default:',
|
||||
blake2AsU8a(
|
||||
u8aConcat('crowdloan', trieIndex.toU8a())
|
||||
u8aConcat(
|
||||
'crowdloan',
|
||||
(info.fundIndex || info.trieIndex).toU8a()
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -60,17 +60,17 @@ function _eventTriggerAll (api: DeriveApi, paraId: string | number | BN): Observ
|
||||
}
|
||||
|
||||
function _getKeysPaged (api: DeriveApi, childKey: string): Observable<StorageKey[]> {
|
||||
const startSubject = new BehaviorSubject<string | undefined>(undefined);
|
||||
const subject = new BehaviorSubject<string | undefined>(undefined);
|
||||
|
||||
return startSubject.pipe(
|
||||
return subject.pipe(
|
||||
switchMap((startKey) =>
|
||||
api.rpc.childstate.getKeysPaged(childKey, '0x', PAGE_SIZE_K, startKey)
|
||||
),
|
||||
tap((keys): void => {
|
||||
setTimeout((): void => {
|
||||
keys.length === PAGE_SIZE_K
|
||||
? startSubject.next(keys[PAGE_SIZE_K - 1].toHex())
|
||||
: startSubject.complete();
|
||||
? subject.next(keys[PAGE_SIZE_K - 1].toHex())
|
||||
: subject.complete();
|
||||
}, 0);
|
||||
}),
|
||||
toArray(), // toArray since we want to startSubject to be completed
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
import type { AnyFunction } from '@polkadot/types/types';
|
||||
|
||||
import * as accounts from './accounts';
|
||||
import * as bagsList from './bagsList';
|
||||
import * as balances from './balances';
|
||||
import * as bounties from './bounties';
|
||||
import * as chain from './chain';
|
||||
@@ -22,7 +23,7 @@ import * as technicalCommittee from './technicalCommittee';
|
||||
import * as treasury from './treasury';
|
||||
import * as tx from './tx';
|
||||
|
||||
export const derive = { accounts, balances, bounties, chain, contracts, council, crowdloan, democracy, elections, imOnline, membership, parachains, session, society, staking, technicalCommittee, treasury, tx };
|
||||
export const derive = { accounts, bagsList, balances, bounties, chain, contracts, council, crowdloan, democracy, elections, imOnline, membership, parachains, session, society, staking, technicalCommittee, treasury, tx };
|
||||
|
||||
type DeriveSection<Section> = {
|
||||
[M in keyof Section]: Section[M] extends AnyFunction
|
||||
@@ -33,4 +34,7 @@ type DeriveAllSections<AllSections> = {
|
||||
[S in keyof AllSections]: DeriveSection<AllSections[S]>
|
||||
};
|
||||
|
||||
export type ExactDerive = DeriveAllSections<typeof derive>;
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface ExactDerive extends DeriveAllSections<typeof derive> {
|
||||
// keep empty, allows for augmentation
|
||||
}
|
||||
|
||||
@@ -47,7 +47,6 @@ describe('derive', (): void => {
|
||||
testFunction(api)('accounts', 'indexToId', []);
|
||||
|
||||
testFunction(api)('balances', 'all', []);
|
||||
testFunction(api)('balances', 'fees', []);
|
||||
testFunction(api)('balances', 'votingBalance', []);
|
||||
testFunction(api)('balances', 'votingBalances', []);
|
||||
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '7.3.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '8.2.1' };
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user