Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ae8e32c84 | ||
|
|
3dbba5e5ba | ||
|
|
7e3b8bf5fc | ||
|
|
14b8d25fb1 | ||
|
|
d64a1fcfd3 | ||
|
|
41bf6fa8ea | ||
|
|
faa28f2822 | ||
|
|
528a2b041b | ||
|
|
7a0f103545 | ||
|
|
0565492ae8 | ||
|
|
af7820a0a2 | ||
|
|
69e754105d | ||
|
|
8fc143ceab | ||
|
|
af072be808 | ||
|
|
8d86def88b | ||
|
|
a99f848adb | ||
|
|
f53db7dbf0 | ||
|
|
26d1d0d695 | ||
|
|
ed33850c62 | ||
|
|
6983f8c883 | ||
|
|
71ddc66515 | ||
|
|
e3ba160935 | ||
|
|
b824edd281 | ||
|
|
b397486fe8 | ||
|
|
28d1d8193b | ||
|
|
6cb0c5c5be | ||
|
|
f4072b9202 | ||
|
|
8d300a73b8 | ||
|
|
d6d24d5b61 | ||
|
|
0ef93c3b94 | ||
|
|
a6b48f8eec | ||
|
|
a92bfca548 | ||
|
|
7701205d58 | ||
|
|
2d09e8d94e | ||
|
|
7b0fd81b4e | ||
|
|
c1a6f3f302 | ||
|
|
62df7e4ead | ||
|
|
f2cb628e25 | ||
|
|
5b0eb1b67b | ||
|
|
87affdcbb3 | ||
|
|
4afd550db7 | ||
|
|
cebcc054da | ||
|
|
dc9c225eb8 | ||
|
|
a3b0d9a794 | ||
|
|
43efff7ade | ||
|
|
a81d83a25c | ||
|
|
6dea8d9a07 | ||
|
|
4677ecc55f | ||
|
|
4038260b37 | ||
|
|
ec87b5b244 | ||
|
|
421f767b0d | ||
|
|
cfc7e2490c | ||
|
|
2051a3d772 | ||
|
|
44590fd235 | ||
|
|
fdd4d3a16d | ||
|
|
c8307138a9 | ||
|
|
6e5697fc8e | ||
|
|
0dc114227c | ||
|
|
006c6b02b1 | ||
|
|
6984329a2b | ||
|
|
954a6f11de | ||
|
|
9247a40a15 | ||
|
|
85ddffde61 | ||
|
|
4dff632fa6 | ||
|
|
a7e3e15a7a | ||
|
|
385068e542 | ||
|
|
210454dfe6 | ||
|
|
8264c5db11 | ||
|
|
9e66524714 | ||
|
|
77202c4dd3 | ||
|
|
9d61aaa1f3 | ||
|
|
a147a7c769 | ||
|
|
a8b180b387 | ||
|
|
266427c8f4 | ||
|
|
e94af85e69 | ||
|
|
9be16a40ef | ||
|
|
2b92fd94af | ||
|
|
0b6f786108 | ||
|
|
b0a3c206ab | ||
|
|
98ae45c64b | ||
|
|
116501f89a | ||
|
|
3cf456f3fa | ||
|
|
63e917ca09 | ||
|
|
76c6b63f29 | ||
|
|
65dbe9043a | ||
|
|
ce5ec004b4 | ||
|
|
196f91bc92 | ||
|
|
159ec48029 | ||
|
|
993e16240d | ||
|
|
ae6c2aa750 | ||
|
|
79da77234e | ||
|
|
8992e7f2e8 | ||
|
|
9b1e5f2f25 | ||
|
|
a94c0ff11c | ||
|
|
0db40bc98b | ||
|
|
4fd5e56af3 | ||
|
|
38cb10fb24 | ||
|
|
b5ab09fdb1 | ||
|
|
517baddb25 | ||
|
|
e445a26d5d | ||
|
|
f523325c0a | ||
|
|
55cb602a71 | ||
|
|
904b2aafe7 | ||
|
|
3dee6a9cb4 | ||
|
|
bd113b124e | ||
|
|
580039a23c | ||
|
|
2472ef8c98 | ||
|
|
020fb1cd09 | ||
|
|
3cbebb6d71 | ||
|
|
138a64c5fb | ||
|
|
efd76e3e20 | ||
|
|
2b562c80b9 | ||
|
|
f9ab3e7029 | ||
|
|
fdc30fd2c2 | ||
|
|
d2b40660ad | ||
|
|
c545cffec0 | ||
|
|
479719fdcc |
@@ -25,3 +25,4 @@ exclude_patterns:
|
|||||||
- "packages/typegen/src"
|
- "packages/typegen/src"
|
||||||
- "packages/types/src/interfaces/"
|
- "packages/types/src/interfaces/"
|
||||||
- "packages/types/src/augment/"
|
- "packages/types/src/augment/"
|
||||||
|
- "packages/types-known/src/upgrades/e2e/"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ jobs:
|
|||||||
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && (!github.event.pull_request || github.event.pull_request.head.repo.full_name == github.repository)"
|
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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: jacogr/action-approve@master
|
- uses: jacogr/action-approve@9d6ce78d26f23ad29d009d034822cf773f2cb50e
|
||||||
with:
|
with:
|
||||||
authors: jacogr
|
authors: jacogr
|
||||||
labels: -auto
|
labels: -auto
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ jobs:
|
|||||||
merge:
|
merge:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: jacogr/action-merge@master
|
- uses: jacogr/action-merge@3b4b49af8a8644bf5cbb5409ee236abe04eeb1b0
|
||||||
with:
|
with:
|
||||||
checks: build,lint,test
|
checks: build,lint,test
|
||||||
labels: -auto
|
labels: -auto
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
YARN_ENABLE_SCRIPTS: false
|
YARN_ENABLE_SCRIPTS: false
|
||||||
steps:
|
steps:
|
||||||
- uses: dessant/lock-threads@v2
|
- uses: dessant/lock-threads@f1a42f0f44eb83361d617a014663e1a76cf282d2
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GH_PAT_BOT }}
|
github-token: ${{ secrets.GH_PAT_BOT }}
|
||||||
issue-lock-inactive-days: '7'
|
issue-lock-inactive-days: '7'
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
YARN_ENABLE_SCRIPTS: false
|
YARN_ENABLE_SCRIPTS: false
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e
|
||||||
- uses: denoland/setup-deno@v1
|
- uses: denoland/setup-deno@004814556e37c54a2f6e31384c9e18e983317366
|
||||||
with:
|
with:
|
||||||
deno-version: vx.x.x
|
deno-version: vx.x.x
|
||||||
- name: ${{ matrix.step }}
|
- name: ${{ matrix.step }}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ jobs:
|
|||||||
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
|
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ secrets.GH_PAT }}
|
token: ${{ secrets.GH_PAT }}
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
YARN_ENABLE_SCRIPTS: false
|
YARN_ENABLE_SCRIPTS: false
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e
|
||||||
- uses: returntocorp/semgrep-action@v1
|
- uses: returntocorp/semgrep-action@aeafd770072c4f48798b991e3449592bddc2c435
|
||||||
with:
|
with:
|
||||||
auditOn: push
|
auditOn: push
|
||||||
publishToken: ${{ secrets.SEMGREP_APP_TOKEN }}
|
publishToken: ${{ secrets.SEMGREP_APP_TOKEN }}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
YARN_ENABLE_SCRIPTS: false
|
YARN_ENABLE_SCRIPTS: false
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v3
|
- uses: actions/stale@98ed4cb500039dbcccf4bd9bedada4d0187f2757
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GH_PAT_BOT }}
|
repo-token: ${{ secrets.GH_PAT_BOT }}
|
||||||
stale-issue-message: 'This issue has been open for 21 days with no activity and is not labelled as an enhancement. It will be closed in 7 days.'
|
stale-issue-message: 'This issue has been open for 21 days with no activity and is not labelled as an enhancement. It will be closed in 7 days.'
|
||||||
|
|||||||
+100
@@ -1,7 +1,107 @@
|
|||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
|
## 9.5.2 Oct 16, 2022
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Add `ParachainHost` version 3 runtime calls
|
||||||
|
|
||||||
|
|
||||||
|
## 9.5.1 Oct 8, 2022
|
||||||
|
|
||||||
|
- **Important** While the API witll detect and decorate the weight type based on V1 or V2, the default `Weight` type (used in runtime calls and RPCs) has not been swapped from the old `u64` variant. This means that on new chains using `WeightV2`, the TS decorated type will still reflect the old version.
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Adjust handling of `Weight` type for V2 structures
|
||||||
|
- Add alis definitions for `Weight{V1, V2}` (used for type overrides)
|
||||||
|
- Cater for weight v2 (along with v1 pass-through) extrinsics in `api-contract`
|
||||||
|
- Update to latest Substrate, Polkadot & Kusama metadata
|
||||||
|
|
||||||
|
|
||||||
|
## 9.4.3 Oct 2, 2022
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Allow for new `ink_primitives` types (Thanks to https://github.com/statictype)
|
||||||
|
- Fix contracts runtime `instantiate` call params (Thanks to https://github.com/statictype)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Align staking derive redeemableSum with Rust source (`currentEra` vs `activeEra` usage)
|
||||||
|
- Add `@deprecated` flag to RPC interface generation (`contracts_*` & `state_get{Pairs/Keys}`)
|
||||||
|
- Polkadot 9280/9281, Kusama 9291 upgrade blocks
|
||||||
|
|
||||||
|
|
||||||
|
## 9.4.2 Sep 24, 2022
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Allow for re-subscriptions on `ScProvider` (Thanks to https://github.com/wirednkod)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Align derives to cater for latest (& previous) Substrate interfaces
|
||||||
|
- Update to latest Substrate, Polkadot & Kusama metadata
|
||||||
|
|
||||||
|
|
||||||
|
## 9.4.1 Sep 17, 2022
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Update `@substrate/connect` to latest (Thanks to https://github.com/wirednkod)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Cater for v1.5 Weight JSON representation (via RPC)
|
||||||
|
- Polkadot 9270, Kusama 9280 & Westend 9290 upgrade blocks
|
||||||
|
- Update to latest Substrate, Polkadot & Kusama metadata
|
||||||
|
|
||||||
|
|
||||||
|
## 9.3.3 Sep 6, 2022
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Ensure JS reserved words are aliassed in types (Thanks to https://github.com/dqbd)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Fix and adjust tests for `AccountId{32, 33}`
|
||||||
|
|
||||||
|
|
||||||
|
## 9.3.2 Sep 4, 2022
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Cater for v1.5 Weight types (structure to inner value)
|
||||||
|
- Westend 9280 & Kusama 9271 upgrade blocks
|
||||||
|
- Update to latest Substrate, Polkadot & Kusama metadata
|
||||||
|
|
||||||
|
|
||||||
|
## 9.3.1 Sep 3, 2022
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Support for ink! v4 metadata
|
||||||
|
- Adjust pool runtime call `pendingRewards` return type
|
||||||
|
- Support for `AccountId33` (raw/compressed 33-byte ecdsa)
|
||||||
|
- Update to latest Substrate, Polkadot & Kusama metadata
|
||||||
|
|
||||||
|
|
||||||
|
## 9.2.4 Aug 27, 2022
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- Remove extra error logging in internal rpc-core Observable
|
||||||
|
- Allow for embebbed `Enum` in `Struct` typegen (no `lookupName`)
|
||||||
|
|
||||||
|
|
||||||
## 9.2.3 Aug 21, 2022
|
## 9.2.3 Aug 21, 2022
|
||||||
|
|
||||||
|
Contributed:
|
||||||
|
|
||||||
|
- Update `@substrate/connect` to latest (Thanks to https://github.com/wirednkod)
|
||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|
||||||
- Adjust `StakingLedger` with fallback for Kusama 1050 (2 different structures on-chain)
|
- Adjust `StakingLedger` with fallback for Kusama 1050 (2 different structures on-chain)
|
||||||
|
|||||||
+4
-3
@@ -1,13 +1,13 @@
|
|||||||
3199 Jaco 9.2.3 (#5177)
|
3252 Jaco 9.5.2 (#5273)
|
||||||
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
|
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
|
||||||
37 Keith Ingram Update contract types and rpc (#4541)
|
37 Keith Ingram Update contract types and rpc (#4541)
|
||||||
35 Stefanie Doll Updated child storage parameters (#1709)
|
35 Stefanie Doll Updated child storage parameters (#1709)
|
||||||
20 Luke Schoen fix: Fixes TypeError: Cannot read property 'vesting' of undefined (#1970)
|
20 Luke Schoen fix: Fixes TypeError: Cannot read property 'vesting' of undefined (#1970)
|
||||||
16 Xiliang Chen implement entriesPaged and keysPages for query at (#4701)
|
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)
|
15 Jeremías Díaz feat(types): add correct tuple type to storage key (#3054)
|
||||||
|
12 Nikos Kontakis Add resubscription delete on unsubscribe (#5230)
|
||||||
11 Ian He HttpProvider support clone() (#3949)
|
11 Ian He HttpProvider support clone() (#3949)
|
||||||
10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954)
|
10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954)
|
||||||
9 Nikos Kontakis Bump substrate-connect to 0.7.11 (#5173)
|
|
||||||
5 Chevdor Fix metadata package link (#3458)
|
5 Chevdor Fix metadata package link (#3458)
|
||||||
5 Jake Naviasky Fixing approvalFlagsToBools. (#1250)
|
5 Jake Naviasky Fixing approvalFlagsToBools. (#1250)
|
||||||
4 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
|
4 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
|
||||||
@@ -18,6 +18,7 @@
|
|||||||
4 Scott Twiname Add support for historical BlockNumber rpc methods (#4574)
|
4 Scott Twiname Add support for historical BlockNumber rpc methods (#4574)
|
||||||
4 Thibaut Sardan no subscription for http (#3127)
|
4 Thibaut Sardan no subscription for http (#3127)
|
||||||
3 André Silva add support for ValidationCodeHash (#3640)
|
3 André Silva add support for ValidationCodeHash (#3640)
|
||||||
|
3 Andreea Eftene Fix code source type (#5236)
|
||||||
3 Antoine Estienne Adapted to display moonbeam author (#3108)
|
3 Antoine Estienne Adapted to display moonbeam author (#3108)
|
||||||
3 Arjan Zijderveld Added `Emergency` to `ElectionPhase` (#3707)
|
3 Arjan Zijderveld Added `Emergency` to `ElectionPhase` (#3707)
|
||||||
3 Ewa Kowalska Handle no council for bounties proposals (#3062)
|
3 Ewa Kowalska Handle no council for bounties proposals (#3062)
|
||||||
@@ -45,7 +46,6 @@
|
|||||||
2 Zannis Kalampoukis fix: Typegen handles structs and vectors of structs without erroring (#4743)
|
2 Zannis Kalampoukis fix: Typegen handles structs and vectors of structs without erroring (#4743)
|
||||||
2 扩散性百万甜面包 Typo, deocrateMethod -> decorateMethod (#1594)
|
2 扩散性百万甜面包 Typo, deocrateMethod -> decorateMethod (#1594)
|
||||||
1 Alan Sapede Adds Eth feeHistory & maxPriorityFeePerGas rpc (#4956)
|
1 Alan Sapede Adds Eth feeHistory & maxPriorityFeePerGas rpc (#4956)
|
||||||
1 Andreea Eftene Add storage deposit support (#4304)
|
|
||||||
1 Brad Larson [NEW] Support for custom headers with providers (#2423)
|
1 Brad Larson [NEW] Support for custom headers with providers (#2423)
|
||||||
1 Btwiuse Arch Add side effect check workaround (#4994) (#5009)
|
1 Btwiuse Arch Add side effect check workaround (#4994) (#5009)
|
||||||
1 chriswmercer little readme tweak (#279)
|
1 chriswmercer little readme tweak (#279)
|
||||||
@@ -55,6 +55,7 @@
|
|||||||
1 Daniel Maricic Fixed typo in README (#2402)
|
1 Daniel Maricic Fixed typo in README (#2402)
|
||||||
1 Daniel Savu fix: Generate custom type definitions (#4224)
|
1 Daniel Savu fix: Generate custom type definitions (#4224)
|
||||||
1 David Don't log full error (#2952)
|
1 David Don't log full error (#2952)
|
||||||
|
1 David Duong Avoid reserved words during named enum fields augmentation (#5203)
|
||||||
1 Denis Tsai realign AccountKey20Junction to polkadot xcm's Junction enum (#3770)
|
1 Denis Tsai realign AccountKey20Junction to polkadot xcm's Junction enum (#3770)
|
||||||
1 djuanito.eth Update fees to current constants (#2320)
|
1 djuanito.eth Update fees to current constants (#2320)
|
||||||
1 Drew Stone Update evm definitions to include vicinity (#2279)
|
1 Drew Stone Update evm definitions to include vicinity (#2279)
|
||||||
|
|||||||
+9
-8
@@ -11,10 +11,10 @@
|
|||||||
},
|
},
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "9.2.3",
|
"version": "9.5.2",
|
||||||
"versions": {
|
"versions": {
|
||||||
"git": "9.2.3",
|
"git": "9.5.2",
|
||||||
"npm": "9.2.3"
|
"npm": "9.5.2"
|
||||||
},
|
},
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
@@ -26,6 +26,7 @@
|
|||||||
"build:metadata": "yarn build:interfaces && yarn test:one packages/types/src/metadata/v14",
|
"build:metadata": "yarn build:interfaces && yarn test:one packages/types/src/metadata/v14",
|
||||||
"build:release": "polkadot-ci-ghact-build",
|
"build:release": "polkadot-ci-ghact-build",
|
||||||
"build:rollup": "polkadot-exec-rollup --config",
|
"build:rollup": "polkadot-exec-rollup --config",
|
||||||
|
"build:upgrades": "yarn test:one packages/types-known/src/upgrades/e2e",
|
||||||
"chain:info": "polkadot-types-chain-info",
|
"chain:info": "polkadot-types-chain-info",
|
||||||
"clean": "polkadot-dev-clean-build",
|
"clean": "polkadot-dev-clean-build",
|
||||||
"deno": "yarn polkadot-dev-deno-map && yarn build && deno check --import-map=import_map.json mod.ts",
|
"deno": "yarn polkadot-dev-deno-map && yarn build && deno check --import-map=import_map.json mod.ts",
|
||||||
@@ -35,15 +36,15 @@
|
|||||||
"test:one": "NODE_OPTIONS=--experimental-vm-modules polkadot-dev-run-test --detectOpenHandles --forceExit"
|
"test:one": "NODE_OPTIONS=--experimental-vm-modules polkadot-dev-run-test --detectOpenHandles --forceExit"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.18.10",
|
"@babel/core": "^7.19.3",
|
||||||
"@babel/register": "^7.18.9",
|
"@babel/register": "^7.18.9",
|
||||||
"@babel/runtime": "^7.18.9",
|
"@babel/runtime": "^7.19.4",
|
||||||
"@polkadot/dev": "^0.67.113",
|
"@polkadot/dev": "^0.67.144",
|
||||||
"@polkadot/typegen": "workspace:packages/typegen",
|
"@polkadot/typegen": "workspace:packages/typegen",
|
||||||
"@types/jest": "^28.1.7",
|
"@types/jest": "^29.1.2",
|
||||||
"copyfiles": "^2.4.1"
|
"copyfiles": "^2.4.1"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"typescript": "^4.7.4"
|
"typescript": "^4.8.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,18 +20,18 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "9.2.3",
|
"version": "9.5.2",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.9",
|
"@babel/runtime": "^7.19.4",
|
||||||
"@polkadot/api-base": "9.2.3",
|
"@polkadot/api-base": "9.5.2",
|
||||||
"@polkadot/rpc-augment": "9.2.3",
|
"@polkadot/rpc-augment": "9.5.2",
|
||||||
"@polkadot/types": "9.2.3",
|
"@polkadot/types": "9.5.2",
|
||||||
"@polkadot/types-augment": "9.2.3",
|
"@polkadot/types-augment": "9.5.2",
|
||||||
"@polkadot/types-codec": "9.2.3",
|
"@polkadot/types-codec": "9.5.2",
|
||||||
"@polkadot/util": "^10.1.5"
|
"@polkadot/util": "^10.1.11"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/types-support": "9.2.3"
|
"@polkadot/types-support": "9.5.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import '@polkadot/api-base/types/consts';
|
|||||||
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
|
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
|
||||||
import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||||
import type { Codec } from '@polkadot/types-codec/types';
|
import type { Codec } from '@polkadot/types-codec/types';
|
||||||
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
|
import type { Perbill, Percent, Permill, Weight } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
|
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
|
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
|
||||||
|
|
||||||
@@ -258,6 +258,9 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* take place over multiple blocks.
|
* take place over multiple blocks.
|
||||||
**/
|
**/
|
||||||
maxElectingVoters: u32 & AugmentedConst<ApiType>;
|
maxElectingVoters: u32 & AugmentedConst<ApiType>;
|
||||||
|
minerMaxLength: u32 & AugmentedConst<ApiType>;
|
||||||
|
minerMaxVotesPerVoter: u32 & AugmentedConst<ApiType>;
|
||||||
|
minerMaxWeight: Weight & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The priority of the unsigned transaction submitted in the unsigned-phase
|
* The priority of the unsigned transaction submitted in the unsigned-phase
|
||||||
**/
|
**/
|
||||||
@@ -302,7 +305,7 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* this pallet), then [`MinerConfig::solution_weight`] is used to compare against
|
* this pallet), then [`MinerConfig::solution_weight`] is used to compare against
|
||||||
* this value.
|
* this value.
|
||||||
**/
|
**/
|
||||||
signedMaxWeight: u64 & AugmentedConst<ApiType>;
|
signedMaxWeight: Weight & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Duration of the signed phase.
|
* Duration of the signed phase.
|
||||||
**/
|
**/
|
||||||
@@ -650,7 +653,7 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* The maximum weight that may be scheduled per block for any dispatchables of less
|
* The maximum weight that may be scheduled per block for any dispatchables of less
|
||||||
* priority than `schedule::HARD_DEADLINE`.
|
* priority than `schedule::HARD_DEADLINE`.
|
||||||
**/
|
**/
|
||||||
maximumWeight: u64 & AugmentedConst<ApiType>;
|
maximumWeight: Weight & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The maximum number of scheduled calls in the queue for a single block.
|
* The maximum number of scheduled calls in the queue for a single block.
|
||||||
* Not strictly enforced, but used for weight estimation.
|
* Not strictly enforced, but used for weight estimation.
|
||||||
@@ -724,6 +727,29 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* Number of eras that staked funds must remain bonded for.
|
* Number of eras that staked funds must remain bonded for.
|
||||||
**/
|
**/
|
||||||
bondingDuration: u32 & AugmentedConst<ApiType>;
|
bondingDuration: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Number of eras to keep in history.
|
||||||
|
*
|
||||||
|
* Following information is kept for eras in `[current_era -
|
||||||
|
* HistoryDepth, current_era]`: `ErasStakers`, `ErasStakersClipped`,
|
||||||
|
* `ErasValidatorPrefs`, `ErasValidatorReward`, `ErasRewardPoints`,
|
||||||
|
* `ErasTotalStake`, `ErasStartSessionIndex`,
|
||||||
|
* `StakingLedger.claimed_rewards`.
|
||||||
|
*
|
||||||
|
* Must be more than the number of eras delayed by session.
|
||||||
|
* I.e. active era must always be in history. I.e. `active_era >
|
||||||
|
* current_era - history_depth` must be guaranteed.
|
||||||
|
*
|
||||||
|
* If migrating an existing pallet from storage value to config value,
|
||||||
|
* this should be set to same value or greater as in storage.
|
||||||
|
*
|
||||||
|
* Note: `HistoryDepth` is used as the upper bound for the `BoundedVec`
|
||||||
|
* item `StakingLedger.claimed_rewards`. Setting this value lower than
|
||||||
|
* the existing value can lead to inconsistencies in the
|
||||||
|
* `StakingLedger` and will need to be handled properly in a migration.
|
||||||
|
* The test `reducing_history_depth_abrupt` shows this effect.
|
||||||
|
**/
|
||||||
|
historyDepth: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Maximum number of nominations per nominator.
|
* Maximum number of nominations per nominator.
|
||||||
**/
|
**/
|
||||||
@@ -736,8 +762,16 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
**/
|
**/
|
||||||
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
|
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The maximum number of `unlocking` chunks a [`StakingLedger`] can have. Effectively
|
* The maximum number of `unlocking` chunks a [`StakingLedger`] can
|
||||||
* determines how many unique eras a staker may be unbonding in.
|
* have. Effectively determines how many unique eras a staker may be
|
||||||
|
* unbonding in.
|
||||||
|
*
|
||||||
|
* Note: `MaxUnlockingChunks` is used as the upper bound for the
|
||||||
|
* `BoundedVec` item `StakingLedger.unlocking`. Setting this value
|
||||||
|
* lower than the existing value can lead to inconsistencies in the
|
||||||
|
* `StakingLedger` and will need to be handled properly in a runtime
|
||||||
|
* migration. The test `reducing_max_unlocking_chunks_abrupt` shows
|
||||||
|
* this effect.
|
||||||
**/
|
**/
|
||||||
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
|
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
@@ -772,9 +806,9 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
/**
|
/**
|
||||||
* The weight of runtime database operations the runtime can invoke.
|
* The weight of runtime database operations the runtime can invoke.
|
||||||
**/
|
**/
|
||||||
dbWeight: FrameSupportWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
|
dbWeight: SpWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The designated SS85 prefix of this chain.
|
* The designated SS58 prefix of this chain.
|
||||||
*
|
*
|
||||||
* This replaces the "ss58Format" property declared in the chain spec. Reason is
|
* This replaces the "ss58Format" property declared in the chain spec. Reason is
|
||||||
* that the runtime should know about the prefix in order to make use of it as
|
* that the runtime should know about the prefix in order to make use of it as
|
||||||
|
|||||||
@@ -570,6 +570,38 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
|
fastUnstake: {
|
||||||
|
/**
|
||||||
|
* The provided un-staker is already in Head, and cannot deregister.
|
||||||
|
**/
|
||||||
|
AlreadyHead: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The bonded account has already been queued.
|
||||||
|
**/
|
||||||
|
AlreadyQueued: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The call is not allowed at this point because the pallet is not active.
|
||||||
|
**/
|
||||||
|
CallNotAllowed: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The provided Controller account was not found.
|
||||||
|
*
|
||||||
|
* This means that the given account is not bonded.
|
||||||
|
**/
|
||||||
|
NotController: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The bonded account has active unlocking chunks.
|
||||||
|
**/
|
||||||
|
NotFullyBonded: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The provided un-staker is not in the `Queue`.
|
||||||
|
**/
|
||||||
|
NotQueued: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic error
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedError<ApiType>;
|
||||||
|
};
|
||||||
gilt: {
|
gilt: {
|
||||||
/**
|
/**
|
||||||
* The amount of the bid is less than the minimum allowed.
|
* The amount of the bid is less than the minimum allowed.
|
||||||
@@ -752,6 +784,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* The target is invalid.
|
* The target is invalid.
|
||||||
**/
|
**/
|
||||||
InvalidTarget: AugmentedError<ApiType>;
|
InvalidTarget: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The provided judgement was for a different identity.
|
||||||
|
**/
|
||||||
|
JudgementForDifferentIdentity: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Judgement given.
|
* Judgement given.
|
||||||
**/
|
**/
|
||||||
@@ -1678,6 +1714,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* A nomination target was supplied that was blocked or otherwise not a validator.
|
* A nomination target was supplied that was blocked or otherwise not a validator.
|
||||||
**/
|
**/
|
||||||
BadTarget: AugmentedError<ApiType>;
|
BadTarget: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Some bound is not met.
|
||||||
|
**/
|
||||||
|
BoundNotMet: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The user has enough bond and thus cannot be chilled forcefully by an external person.
|
* The user has enough bond and thus cannot be chilled forcefully by an external person.
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';
|
|||||||
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||||
import type { ITuple } from '@polkadot/types-codec/types';
|
import type { ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, H256, Weight } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, KusamaRuntimeProxyType, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletStakingExposure, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
import type { FrameSupportDispatchDispatchInfo, FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, KusamaRuntimeProxyType, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletStakingExposure, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, SpFinalityGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
|
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
|
||||||
|
|
||||||
@@ -338,10 +338,15 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
};
|
};
|
||||||
electionProviderMultiPhase: {
|
electionProviderMultiPhase: {
|
||||||
/**
|
/**
|
||||||
* The election has been finalized, with `Some` of the given computation, or else if the
|
* An election failed.
|
||||||
* election failed, `None`.
|
*
|
||||||
|
* Not much can be said about which computes failed in the process.
|
||||||
**/
|
**/
|
||||||
ElectionFinalized: AugmentedEvent<ApiType, [electionCompute: Option<PalletElectionProviderMultiPhaseElectionCompute>], { electionCompute: Option<PalletElectionProviderMultiPhaseElectionCompute> }>;
|
ElectionFailed: AugmentedEvent<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* The election has been finalized, with the given computation and score.
|
||||||
|
**/
|
||||||
|
ElectionFinalized: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore], { compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore }>;
|
||||||
/**
|
/**
|
||||||
* An account has been rewarded for their signed submission being finalized.
|
* An account has been rewarded for their signed submission being finalized.
|
||||||
**/
|
**/
|
||||||
@@ -362,7 +367,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
*
|
*
|
||||||
* The `bool` is `true` when a previous solution was ejected to make room for this one.
|
* The `bool` is `true` when a previous solution was ejected to make room for this one.
|
||||||
**/
|
**/
|
||||||
SolutionStored: AugmentedEvent<ApiType, [electionCompute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool], { electionCompute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool }>;
|
SolutionStored: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool], { compute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool }>;
|
||||||
/**
|
/**
|
||||||
* The unsigned phase of the given round has started.
|
* The unsigned phase of the given round has started.
|
||||||
**/
|
**/
|
||||||
@@ -372,6 +377,33 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
};
|
};
|
||||||
|
fastUnstake: {
|
||||||
|
/**
|
||||||
|
* A staker was partially checked for the given eras, but the process did not finish.
|
||||||
|
**/
|
||||||
|
Checking: AugmentedEvent<ApiType, [stash: AccountId32, eras: Vec<u32>], { stash: AccountId32, eras: Vec<u32> }>;
|
||||||
|
/**
|
||||||
|
* Some internal error happened while migrating stash. They are removed as head as a
|
||||||
|
* consequence.
|
||||||
|
**/
|
||||||
|
Errored: AugmentedEvent<ApiType, [stash: AccountId32], { stash: AccountId32 }>;
|
||||||
|
/**
|
||||||
|
* An internal error happened. Operations will be paused now.
|
||||||
|
**/
|
||||||
|
InternalError: AugmentedEvent<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* A staker was slashed for requesting fast-unstake whilst being exposed.
|
||||||
|
**/
|
||||||
|
Slashed: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||||
|
/**
|
||||||
|
* A staker was unstaked.
|
||||||
|
**/
|
||||||
|
Unstaked: AugmentedEvent<ApiType, [stash: AccountId32, result: Result<Null, SpRuntimeDispatchError>], { stash: AccountId32, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||||
|
/**
|
||||||
|
* Generic event
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
|
};
|
||||||
gilt: {
|
gilt: {
|
||||||
/**
|
/**
|
||||||
* A bid was successfully placed.
|
* A bid was successfully placed.
|
||||||
@@ -773,11 +805,6 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* An announcement was placed to make a call in the future.
|
* An announcement was placed to make a call in the future.
|
||||||
**/
|
**/
|
||||||
Announced: AugmentedEvent<ApiType, [real: AccountId32, proxy: AccountId32, callHash: H256], { real: AccountId32, proxy: AccountId32, callHash: H256 }>;
|
Announced: AugmentedEvent<ApiType, [real: AccountId32, proxy: AccountId32, callHash: H256], { real: AccountId32, proxy: AccountId32, callHash: H256 }>;
|
||||||
/**
|
|
||||||
* Anonymous account has been created by new proxy with given
|
|
||||||
* disambiguation index and proxy type.
|
|
||||||
**/
|
|
||||||
AnonymousCreated: AugmentedEvent<ApiType, [anonymous: AccountId32, who: AccountId32, proxyType: KusamaRuntimeProxyType, disambiguationIndex: u16], { anonymous: AccountId32, who: AccountId32, proxyType: KusamaRuntimeProxyType, disambiguationIndex: u16 }>;
|
|
||||||
/**
|
/**
|
||||||
* A proxy was added.
|
* A proxy was added.
|
||||||
**/
|
**/
|
||||||
@@ -790,6 +817,11 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* A proxy was removed.
|
* A proxy was removed.
|
||||||
**/
|
**/
|
||||||
ProxyRemoved: AugmentedEvent<ApiType, [delegator: AccountId32, delegatee: AccountId32, proxyType: KusamaRuntimeProxyType, delay: u32], { delegator: AccountId32, delegatee: AccountId32, proxyType: KusamaRuntimeProxyType, delay: u32 }>;
|
ProxyRemoved: AugmentedEvent<ApiType, [delegator: AccountId32, delegatee: AccountId32, proxyType: KusamaRuntimeProxyType, delay: u32], { delegator: AccountId32, delegatee: AccountId32, proxyType: KusamaRuntimeProxyType, delay: u32 }>;
|
||||||
|
/**
|
||||||
|
* A pure account has been created by new proxy with given
|
||||||
|
* disambiguation index and proxy type.
|
||||||
|
**/
|
||||||
|
PureCreated: AugmentedEvent<ApiType, [pure: AccountId32, who: AccountId32, proxyType: KusamaRuntimeProxyType, disambiguationIndex: u16], { pure: AccountId32, who: AccountId32, proxyType: KusamaRuntimeProxyType, disambiguationIndex: u16 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -963,40 +995,37 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,
|
* NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,
|
||||||
* it will not be emitted for staking rewards when they are added to stake.
|
* it will not be emitted for staking rewards when they are added to stake.
|
||||||
**/
|
**/
|
||||||
Bonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Bonded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* An account has stopped participating as either a validator or nominator.
|
* An account has stopped participating as either a validator or nominator.
|
||||||
* \[stash\]
|
|
||||||
**/
|
**/
|
||||||
Chilled: AugmentedEvent<ApiType, [AccountId32]>;
|
Chilled: AugmentedEvent<ApiType, [stash: AccountId32], { stash: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* The era payout has been set; the first balance is the validator-payout; the second is
|
* The era payout has been set; the first balance is the validator-payout; the second is
|
||||||
* the remainder from the maximum amount of reward.
|
* the remainder from the maximum amount of reward.
|
||||||
* \[era_index, validator_payout, remainder\]
|
|
||||||
**/
|
**/
|
||||||
EraPaid: AugmentedEvent<ApiType, [u32, u128, u128]>;
|
EraPaid: AugmentedEvent<ApiType, [eraIndex: u32, validatorPayout: u128, remainder: u128], { eraIndex: u32, validatorPayout: u128, remainder: u128 }>;
|
||||||
/**
|
/**
|
||||||
* A nominator has been kicked from a validator. \[nominator, stash\]
|
* A nominator has been kicked from a validator.
|
||||||
**/
|
**/
|
||||||
Kicked: AugmentedEvent<ApiType, [AccountId32, AccountId32]>;
|
Kicked: AugmentedEvent<ApiType, [nominator: AccountId32, stash: AccountId32], { nominator: AccountId32, stash: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* An old slashing report from a prior era was discarded because it could
|
* An old slashing report from a prior era was discarded because it could
|
||||||
* not be processed. \[session_index\]
|
* not be processed.
|
||||||
**/
|
**/
|
||||||
OldSlashingReportDiscarded: AugmentedEvent<ApiType, [u32]>;
|
OldSlashingReportDiscarded: AugmentedEvent<ApiType, [sessionIndex: u32], { sessionIndex: u32 }>;
|
||||||
/**
|
/**
|
||||||
* The stakers' rewards are getting paid. \[era_index, validator_stash\]
|
* The stakers' rewards are getting paid.
|
||||||
**/
|
**/
|
||||||
PayoutStarted: AugmentedEvent<ApiType, [u32, AccountId32]>;
|
PayoutStarted: AugmentedEvent<ApiType, [eraIndex: u32, validatorStash: AccountId32], { eraIndex: u32, validatorStash: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* The nominator has been rewarded by this amount. \[stash, amount\]
|
* The nominator has been rewarded by this amount.
|
||||||
**/
|
**/
|
||||||
Rewarded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Rewarded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* One validator (and its nominators) has been slashed by the given amount.
|
* One staker (and potentially its nominators) has been slashed by the given amount.
|
||||||
* \[validator, amount\]
|
|
||||||
**/
|
**/
|
||||||
Slashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Slashed: AugmentedEvent<ApiType, [staker: AccountId32, amount: u128], { staker: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* A new set of stakers was elected.
|
* A new set of stakers was elected.
|
||||||
**/
|
**/
|
||||||
@@ -1006,18 +1035,18 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
StakingElectionFailed: AugmentedEvent<ApiType, []>;
|
StakingElectionFailed: AugmentedEvent<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* An account has unbonded this amount. \[stash, amount\]
|
* An account has unbonded this amount.
|
||||||
**/
|
**/
|
||||||
Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Unbonded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* A validator has set their preferences.
|
* A validator has set their preferences.
|
||||||
**/
|
**/
|
||||||
ValidatorPrefsSet: AugmentedEvent<ApiType, [AccountId32, PalletStakingValidatorPrefs]>;
|
ValidatorPrefsSet: AugmentedEvent<ApiType, [stash: AccountId32, prefs: PalletStakingValidatorPrefs], { stash: AccountId32, prefs: PalletStakingValidatorPrefs }>;
|
||||||
/**
|
/**
|
||||||
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
|
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
|
||||||
* from the unlocking queue. \[stash, amount\]
|
* from the unlocking queue.
|
||||||
**/
|
**/
|
||||||
Withdrawn: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Withdrawn: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -1031,11 +1060,11 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* An extrinsic failed.
|
* An extrinsic failed.
|
||||||
**/
|
**/
|
||||||
ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo }>;
|
ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportDispatchDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportDispatchDispatchInfo }>;
|
||||||
/**
|
/**
|
||||||
* An extrinsic completed successfully.
|
* An extrinsic completed successfully.
|
||||||
**/
|
**/
|
||||||
ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchInfo: FrameSupportWeightsDispatchInfo }>;
|
ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportDispatchDispatchInfo], { dispatchInfo: FrameSupportDispatchDispatchInfo }>;
|
||||||
/**
|
/**
|
||||||
* An account was reaped.
|
* An account was reaped.
|
||||||
**/
|
**/
|
||||||
@@ -1213,14 +1242,14 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
*
|
*
|
||||||
* \[ para, id, overweight_index, required \]
|
* \[ para, id, overweight_index, required \]
|
||||||
**/
|
**/
|
||||||
OverweightEnqueued: AugmentedEvent<ApiType, [u32, U8aFixed, u64, u64]>;
|
OverweightEnqueued: AugmentedEvent<ApiType, [u32, U8aFixed, u64, Weight]>;
|
||||||
/**
|
/**
|
||||||
* Upward message from the overweight queue was executed with the given actual weight
|
* Upward message from the overweight queue was executed with the given actual weight
|
||||||
* used.
|
* used.
|
||||||
*
|
*
|
||||||
* \[ overweight_index, used \]
|
* \[ overweight_index, used \]
|
||||||
**/
|
**/
|
||||||
OverweightServiced: AugmentedEvent<ApiType, [u64, u64]>;
|
OverweightServiced: AugmentedEvent<ApiType, [u64, Weight]>;
|
||||||
/**
|
/**
|
||||||
* Upward message is unsupported version of XCM.
|
* Upward message is unsupported version of XCM.
|
||||||
* \[ id \]
|
* \[ id \]
|
||||||
@@ -1235,7 +1264,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* The weight limit for handling upward messages was reached.
|
* The weight limit for handling upward messages was reached.
|
||||||
* \[ id, remaining, required \]
|
* \[ id, remaining, required \]
|
||||||
**/
|
**/
|
||||||
WeightExhausted: AugmentedEvent<ApiType, [U8aFixed, u64, u64]>;
|
WeightExhausted: AugmentedEvent<ApiType, [U8aFixed, Weight, Weight]>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -1363,7 +1392,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
*
|
*
|
||||||
* \[ id, pallet index, call index, actual weight, max budgeted weight \]
|
* \[ id, pallet index, call index, actual weight, max budgeted weight \]
|
||||||
**/
|
**/
|
||||||
NotifyOverweight: AugmentedEvent<ApiType, [u64, u8, u8, u64, u64]>;
|
NotifyOverweight: AugmentedEvent<ApiType, [u64, u8, u8, Weight, Weight]>;
|
||||||
/**
|
/**
|
||||||
* A given location which had a version change subscription was dropped owing to an error
|
* A given location which had a version change subscription was dropped owing to an error
|
||||||
* migrating the location to our new XCM format.
|
* migrating the location to our new XCM format.
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, W
|
|||||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeSessionKeys, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
import type { FrameSupportDispatchPerDispatchClassWeight, 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, PalletFastUnstakeUnstakeRequest, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||||
import type { Observable } from '@polkadot/types/types';
|
import type { Observable } from '@polkadot/types/types';
|
||||||
|
|
||||||
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
||||||
@@ -543,6 +543,35 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
|
fastUnstake: {
|
||||||
|
/**
|
||||||
|
* Counter for the related counted storage map
|
||||||
|
**/
|
||||||
|
counterForQueue: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Number of eras to check per block.
|
||||||
|
*
|
||||||
|
* If set to 0, this pallet does absolutely nothing.
|
||||||
|
*
|
||||||
|
* Based on the amount of weight available at `on_idle`, up to this many eras of a single
|
||||||
|
* nominator might be checked.
|
||||||
|
**/
|
||||||
|
erasToCheckPerBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* The current "head of the queue" being unstaked.
|
||||||
|
**/
|
||||||
|
head: AugmentedQuery<ApiType, () => Observable<Option<PalletFastUnstakeUnstakeRequest>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* The map of all accounts wishing to be unstaked.
|
||||||
|
*
|
||||||
|
* Keeps track of `AccountId` wishing to unstake and it's corresponding deposit.
|
||||||
|
**/
|
||||||
|
queue: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u128>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Generic query
|
||||||
|
**/
|
||||||
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
|
};
|
||||||
gilt: {
|
gilt: {
|
||||||
/**
|
/**
|
||||||
* The currently active gilts, indexed according to the order of creation.
|
* The currently active gilts, indexed according to the order of creation.
|
||||||
@@ -1590,16 +1619,6 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* Mode of era forcing.
|
* Mode of era forcing.
|
||||||
**/
|
**/
|
||||||
forceEra: AugmentedQuery<ApiType, () => Observable<PalletStakingForcing>, []> & QueryableStorageEntry<ApiType, []>;
|
forceEra: AugmentedQuery<ApiType, () => Observable<PalletStakingForcing>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
|
||||||
* Number of eras to keep in history.
|
|
||||||
*
|
|
||||||
* Information is kept for eras in `[current_era - history_depth; current_era]`.
|
|
||||||
*
|
|
||||||
* Must be more than the number of eras delayed by session otherwise. I.e. active era must
|
|
||||||
* always be in history. I.e. `active_era > current_era - history_depth` must be
|
|
||||||
* guaranteed.
|
|
||||||
**/
|
|
||||||
historyDepth: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
|
||||||
/**
|
/**
|
||||||
* Any validators that may never be slashed or forcibly kicked. It's a Vec since they're
|
* Any validators that may never be slashed or forcibly kicked. It's a Vec since they're
|
||||||
* easy to initialize and the performance hit is minimal (we expect no more than four
|
* easy to initialize and the performance hit is minimal (we expect no more than four
|
||||||
@@ -1739,7 +1758,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
/**
|
/**
|
||||||
* The current weight for the block.
|
* The current weight for the block.
|
||||||
**/
|
**/
|
||||||
blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportWeightsPerDispatchClassU64>, []> & QueryableStorageEntry<ApiType, []>;
|
blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportDispatchPerDispatchClassWeight>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* Digest of the current block, also part of the block header.
|
* Digest of the current block, also part of the block header.
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
|||||||
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
|
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
|
||||||
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||||
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||||
import type { NpApiError } from '@polkadot/types/interfaces/nompools';
|
|
||||||
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
|
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
|
||||||
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||||
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
||||||
@@ -212,7 +211,7 @@ declare module '@polkadot/api-base/types/calls' {
|
|||||||
/**
|
/**
|
||||||
* Returns the pending rewards for the given member.
|
* Returns the pending rewards for the given member.
|
||||||
**/
|
**/
|
||||||
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Result<Balance, NpApiError>>>;
|
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>;
|
||||||
/**
|
/**
|
||||||
* Generic call
|
* Generic call
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -10,7 +10,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 { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||||
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
|
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill, Weight } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportScheduleMaybeHashed, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeSessionKeys, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, 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';
|
import type { FrameSupportScheduleMaybeHashed, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeSessionKeys, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, 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';
|
||||||
|
|
||||||
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
|
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
|
||||||
@@ -754,11 +754,11 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
/**
|
/**
|
||||||
* Sets the maximum amount of weight any individual upward message may consume.
|
* Sets the maximum amount of weight any individual upward message may consume.
|
||||||
**/
|
**/
|
||||||
setUmpMaxIndividualWeight: AugmentedSubmittable<(updated: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64]>;
|
setUmpMaxIndividualWeight: AugmentedSubmittable<(updated: Weight | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Weight]>;
|
||||||
/**
|
/**
|
||||||
* Sets the soft limit for the phase of dispatching dispatchable upward messages.
|
* Sets the soft limit for the phase of dispatching dispatchable upward messages.
|
||||||
**/
|
**/
|
||||||
setUmpServiceTotalWeight: AugmentedSubmittable<(updated: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64]>;
|
setUmpServiceTotalWeight: AugmentedSubmittable<(updated: Weight | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Weight]>;
|
||||||
/**
|
/**
|
||||||
* Set the validation upgrade cooldown.
|
* Set the validation upgrade cooldown.
|
||||||
**/
|
**/
|
||||||
@@ -811,7 +811,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - up to 3 events
|
* - up to 3 events
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
close: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: Compact<u64> | AnyNumber | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, Compact<u64>, Compact<u32>]>;
|
close: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: Compact<Weight> | AnyNumber | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, Compact<Weight>, Compact<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Disapprove a proposal, close, and remove it from the system, regardless of its current
|
* Disapprove a proposal, close, and remove it from the system, regardless of its current
|
||||||
* state.
|
* state.
|
||||||
@@ -1408,6 +1408,49 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
};
|
};
|
||||||
|
fastUnstake: {
|
||||||
|
/**
|
||||||
|
* Control the operation of this pallet.
|
||||||
|
*
|
||||||
|
* Dispatch origin must be signed by the [`Config::ControlOrigin`].
|
||||||
|
**/
|
||||||
|
control: AugmentedSubmittable<(uncheckedErasToCheck: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||||
|
/**
|
||||||
|
* Deregister oneself from the fast-unstake.
|
||||||
|
*
|
||||||
|
* This is useful if one is registered, they are still waiting, and they change their mind.
|
||||||
|
*
|
||||||
|
* Note that the associated stash is still fully unbonded and chilled as a consequence of
|
||||||
|
* calling `register_fast_unstake`. This should probably be followed by a call to
|
||||||
|
* `Staking::rebond`.
|
||||||
|
**/
|
||||||
|
deregister: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||||
|
/**
|
||||||
|
* Register oneself for fast-unstake.
|
||||||
|
*
|
||||||
|
* The dispatch origin of this call must be signed by the controller account, similar to
|
||||||
|
* `staking::unbond`.
|
||||||
|
*
|
||||||
|
* The stash associated with the origin must have no ongoing unlocking chunks. If
|
||||||
|
* successful, this will fully unbond and chill the stash. Then, it will enqueue the stash
|
||||||
|
* to be checked in further blocks.
|
||||||
|
*
|
||||||
|
* If by the time this is called, the stash is actually eligible for fast-unstake, then
|
||||||
|
* they are guaranteed to remain eligible, because the call will chill them as well.
|
||||||
|
*
|
||||||
|
* If the check works, the entire staking data is removed, i.e. the stash is fully
|
||||||
|
* unstaked.
|
||||||
|
*
|
||||||
|
* If the check fails, the stash remains chilled and waiting for being unbonded as in with
|
||||||
|
* the normal staking system, but they lose part of their unbonding chunks due to consuming
|
||||||
|
* the chain's resources.
|
||||||
|
**/
|
||||||
|
registerFastUnstake: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||||
|
/**
|
||||||
|
* Generic tx
|
||||||
|
**/
|
||||||
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
|
};
|
||||||
gilt: {
|
gilt: {
|
||||||
/**
|
/**
|
||||||
* Place a bid for a gilt to be issued.
|
* Place a bid for a gilt to be issued.
|
||||||
@@ -1670,6 +1713,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - `target`: the account whose identity the judgement is upon. This must be an account
|
* - `target`: the account whose identity the judgement is upon. This must be an account
|
||||||
* with a registered identity.
|
* with a registered identity.
|
||||||
* - `judgement`: the judgement of the registrar of index `reg_index` about `target`.
|
* - `judgement`: the judgement of the registrar of index `reg_index` about `target`.
|
||||||
|
* - `identity`: The hash of the [`IdentityInfo`] for that the judgement is provided.
|
||||||
*
|
*
|
||||||
* Emits `JudgementGiven` if successful.
|
* Emits `JudgementGiven` if successful.
|
||||||
*
|
*
|
||||||
@@ -1681,7 +1725,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - One event.
|
* - One event.
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
provideJudgement: AugmentedSubmittable<(regIndex: Compact<u32> | AnyNumber | Uint8Array, target: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, judgement: PalletIdentityJudgement | { Unknown: any } | { FeePaid: any } | { Reasonable: any } | { KnownGood: any } | { OutOfDate: any } | { LowQuality: any } | { Erroneous: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress, PalletIdentityJudgement]>;
|
provideJudgement: AugmentedSubmittable<(regIndex: Compact<u32> | AnyNumber | Uint8Array, target: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, judgement: PalletIdentityJudgement | { Unknown: any } | { FeePaid: any } | { Reasonable: any } | { KnownGood: any } | { OutOfDate: any } | { LowQuality: any } | { Erroneous: any } | string | Uint8Array, identity: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress, PalletIdentityJudgement, H256]>;
|
||||||
/**
|
/**
|
||||||
* Remove the sender as a sub-account.
|
* Remove the sender as a sub-account.
|
||||||
*
|
*
|
||||||
@@ -2021,7 +2065,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - Write: Multisig Storage, [Caller Account]
|
* - Write: Multisig Storage, [Caller Account]
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
approveAsMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option<PalletMultisigTimepoint> | null | Uint8Array | PalletMultisigTimepoint | { height?: any; index?: any } | string, callHash: U8aFixed | string | Uint8Array, maxWeight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, U8aFixed, u64]>;
|
approveAsMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option<PalletMultisigTimepoint> | null | Uint8Array | PalletMultisigTimepoint | { height?: any; index?: any } | string, callHash: U8aFixed | string | Uint8Array, maxWeight: Weight | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, U8aFixed, Weight]>;
|
||||||
/**
|
/**
|
||||||
* Register approval for a dispatch to be made from a deterministic composite account if
|
* Register approval for a dispatch to be made from a deterministic composite account if
|
||||||
* approved by a total of `threshold - 1` of `other_signatories`.
|
* approved by a total of `threshold - 1` of `other_signatories`.
|
||||||
@@ -2069,7 +2113,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - Plus Call Weight
|
* - Plus Call Weight
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option<PalletMultisigTimepoint> | null | Uint8Array | PalletMultisigTimepoint | { height?: any; index?: any } | string, call: WrapperKeepOpaque<Call> | object | string | Uint8Array, storeCall: bool | boolean | Uint8Array, maxWeight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, WrapperKeepOpaque<Call>, bool, u64]>;
|
asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option<PalletMultisigTimepoint> | null | Uint8Array | PalletMultisigTimepoint | { height?: any; index?: any } | string, call: WrapperKeepOpaque<Call> | object | string | Uint8Array, storeCall: bool | boolean | Uint8Array, maxWeight: Weight | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, WrapperKeepOpaque<Call>, bool, Weight]>;
|
||||||
/**
|
/**
|
||||||
* Immediately dispatch a multi-signature call using a single approval from the caller.
|
* Immediately dispatch a multi-signature call using a single approval from the caller.
|
||||||
*
|
*
|
||||||
@@ -2545,10 +2589,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - `proxy_type`: The permissions allowed for this proxy account.
|
* - `proxy_type`: The permissions allowed for this proxy account.
|
||||||
* - `delay`: The announcement period required of the initial proxy. Will generally be
|
* - `delay`: The announcement period required of the initial proxy. Will generally be
|
||||||
* zero.
|
* zero.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of the number of proxies the user has (P).
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
addProxy: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, KusamaRuntimeProxyType, u32]>;
|
addProxy: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, KusamaRuntimeProxyType, u32]>;
|
||||||
/**
|
/**
|
||||||
@@ -2567,12 +2607,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Parameters:
|
* Parameters:
|
||||||
* - `real`: The account that the proxy will make a call on behalf of.
|
* - `real`: The account that the proxy will make a call on behalf of.
|
||||||
* - `call_hash`: The hash of the call to be made by the `real` account.
|
* - `call_hash`: The hash of the call to be made by the `real` account.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of:
|
|
||||||
* - A: the number of announcements made.
|
|
||||||
* - P: the number of proxies the user has.
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
announce: AugmentedSubmittable<(real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, H256]>;
|
announce: AugmentedSubmittable<(real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, H256]>;
|
||||||
/**
|
/**
|
||||||
@@ -2594,36 +2628,27 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* same sender, with the same parameters.
|
* same sender, with the same parameters.
|
||||||
*
|
*
|
||||||
* Fails if there are insufficient funds to pay for deposit.
|
* Fails if there are insufficient funds to pay for deposit.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of the number of proxies the user has (P).
|
|
||||||
* # </weight>
|
|
||||||
* TODO: Might be over counting 1 read
|
|
||||||
**/
|
**/
|
||||||
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]>;
|
createPure: 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.
|
* Removes a previously spawned pure proxy.
|
||||||
*
|
*
|
||||||
* WARNING: **All access to this account will be lost.** Any funds held in it will be
|
* WARNING: **All access to this account will be lost.** Any funds held in it will be
|
||||||
* inaccessible.
|
* inaccessible.
|
||||||
*
|
*
|
||||||
* Requires a `Signed` origin, and the sender account must have been created by a call to
|
* Requires a `Signed` origin, and the sender account must have been created by a call to
|
||||||
* `anonymous` with corresponding parameters.
|
* `pure` with corresponding parameters.
|
||||||
*
|
*
|
||||||
* - `spawner`: The account that originally called `anonymous` to create this account.
|
* - `spawner`: The account that originally called `pure` to create this account.
|
||||||
* - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`.
|
* - `index`: The disambiguation index originally passed to `pure`. Probably `0`.
|
||||||
* - `proxy_type`: The proxy type originally passed to `anonymous`.
|
* - `proxy_type`: The proxy type originally passed to `pure`.
|
||||||
* - `height`: The height of the chain when the call to `anonymous` was processed.
|
* - `height`: The height of the chain when the call to `pure` was processed.
|
||||||
* - `ext_index`: The extrinsic index in which the call to `anonymous` was processed.
|
* - `ext_index`: The extrinsic index in which the call to `pure` was processed.
|
||||||
*
|
*
|
||||||
* Fails with `NoPermission` in case the caller is not a previously created anonymous
|
* Fails with `NoPermission` in case the caller is not a previously created pure
|
||||||
* account whose `anonymous` call has corresponding parameters.
|
* account whose `pure` call has corresponding parameters.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of the number of proxies the user has (P).
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
killAnonymous: AugmentedSubmittable<(spawner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | 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>, [MultiAddress, KusamaRuntimeProxyType, u16, Compact<u32>, Compact<u32>]>;
|
killPure: AugmentedSubmittable<(spawner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | 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>, [MultiAddress, KusamaRuntimeProxyType, u16, Compact<u32>, Compact<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Dispatch the given `call` from an account that the sender is authorised for through
|
* Dispatch the given `call` from an account that the sender is authorised for through
|
||||||
* `add_proxy`.
|
* `add_proxy`.
|
||||||
@@ -2636,10 +2661,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - `real`: The account that the proxy will make a call on behalf of.
|
* - `real`: The account that the proxy will make a call on behalf of.
|
||||||
* - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.
|
* - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.
|
||||||
* - `call`: The call to be made by the `real` account.
|
* - `call`: The call to be made by the `real` account.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of the number of proxies the user has (P).
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
proxy: AugmentedSubmittable<(real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forceProxyType: Option<KusamaRuntimeProxyType> | null | Uint8Array | KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Option<KusamaRuntimeProxyType>, Call]>;
|
proxy: AugmentedSubmittable<(real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forceProxyType: Option<KusamaRuntimeProxyType> | null | Uint8Array | KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Option<KusamaRuntimeProxyType>, Call]>;
|
||||||
/**
|
/**
|
||||||
@@ -2654,12 +2675,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - `real`: The account that the proxy will make a call on behalf of.
|
* - `real`: The account that the proxy will make a call on behalf of.
|
||||||
* - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.
|
* - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.
|
||||||
* - `call`: The call to be made by the `real` account.
|
* - `call`: The call to be made by the `real` account.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of:
|
|
||||||
* - A: the number of announcements made.
|
|
||||||
* - P: the number of proxies the user has.
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
proxyAnnounced: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forceProxyType: Option<KusamaRuntimeProxyType> | null | Uint8Array | KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress, Option<KusamaRuntimeProxyType>, Call]>;
|
proxyAnnounced: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forceProxyType: Option<KusamaRuntimeProxyType> | null | Uint8Array | KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress, Option<KusamaRuntimeProxyType>, Call]>;
|
||||||
/**
|
/**
|
||||||
@@ -2673,12 +2688,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Parameters:
|
* Parameters:
|
||||||
* - `delegate`: The account that previously announced the call.
|
* - `delegate`: The account that previously announced the call.
|
||||||
* - `call_hash`: The hash of the call to be made.
|
* - `call_hash`: The hash of the call to be made.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of:
|
|
||||||
* - A: the number of announcements made.
|
|
||||||
* - P: the number of proxies the user has.
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
rejectAnnouncement: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, H256]>;
|
rejectAnnouncement: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, H256]>;
|
||||||
/**
|
/**
|
||||||
@@ -2692,12 +2701,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Parameters:
|
* Parameters:
|
||||||
* - `real`: The account that the proxy will make a call on behalf of.
|
* - `real`: The account that the proxy will make a call on behalf of.
|
||||||
* - `call_hash`: The hash of the call to be made by the `real` account.
|
* - `call_hash`: The hash of the call to be made by the `real` account.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of:
|
|
||||||
* - A: the number of announcements made.
|
|
||||||
* - P: the number of proxies the user has.
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
removeAnnouncement: AugmentedSubmittable<(real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, H256]>;
|
removeAnnouncement: AugmentedSubmittable<(real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, H256]>;
|
||||||
/**
|
/**
|
||||||
@@ -2705,12 +2708,8 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* The dispatch origin for this call must be _Signed_.
|
* The dispatch origin for this call must be _Signed_.
|
||||||
*
|
*
|
||||||
* WARNING: This may be called on accounts created by `anonymous`, however if done, then
|
* WARNING: This may be called on accounts created by `pure`, however if done, then
|
||||||
* the unreserved fees will be inaccessible. **All access to this account will be lost.**
|
* the unreserved fees will be inaccessible. **All access to this account will be lost.**
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of the number of proxies the user has (P).
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
removeProxies: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
removeProxies: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||||
/**
|
/**
|
||||||
@@ -2721,10 +2720,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Parameters:
|
* Parameters:
|
||||||
* - `proxy`: The account that the `caller` would like to remove as a proxy.
|
* - `proxy`: The account that the `caller` would like to remove as a proxy.
|
||||||
* - `proxy_type`: The permissions currently enabled for the removed proxy account.
|
* - `proxy_type`: The permissions currently enabled for the removed proxy account.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of the number of proxies the user has (P).
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
removeProxy: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, KusamaRuntimeProxyType, u32]>;
|
removeProxy: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, KusamaRuntimeProxyType, u32]>;
|
||||||
/**
|
/**
|
||||||
@@ -3639,31 +3634,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
setController: AugmentedSubmittable<(controller: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
|
setController: AugmentedSubmittable<(controller: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
|
||||||
/**
|
|
||||||
* Set `HistoryDepth` value. This function will delete any history information
|
|
||||||
* when `HistoryDepth` is reduced.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* - `new_history_depth`: The new history depth you would like to set.
|
|
||||||
* - `era_items_deleted`: The number of items that will be deleted by this dispatch. This
|
|
||||||
* should report all the storage items that will be deleted by clearing old era history.
|
|
||||||
* Needed to report an accurate weight for the dispatch. Trusted by `Root` to report an
|
|
||||||
* accurate number.
|
|
||||||
*
|
|
||||||
* Origin must be root.
|
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* - E: Number of history depths removed, i.e. 10 -> 7 = 3
|
|
||||||
* - Weight: O(E)
|
|
||||||
* - DB Weight:
|
|
||||||
* - Reads: Current Era, History Depth
|
|
||||||
* - Writes: History Depth
|
|
||||||
* - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs
|
|
||||||
* - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake,
|
|
||||||
* ErasStartSessionIndex
|
|
||||||
* # </weight>
|
|
||||||
**/
|
|
||||||
setHistoryDepth: AugmentedSubmittable<(newHistoryDepth: Compact<u32> | AnyNumber | Uint8Array, eraItemsDeleted: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
|
|
||||||
/**
|
/**
|
||||||
* Set the validators who cannot be slashed (if any).
|
* Set the validators who cannot be slashed (if any).
|
||||||
*
|
*
|
||||||
@@ -3703,7 +3673,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* * `min_commission`: The minimum amount of commission that each validators must maintain.
|
* * `min_commission`: The minimum amount of commission that each validators must maintain.
|
||||||
* This is checked only upon calling `validate`. Existing validators are not affected.
|
* This is checked only upon calling `validate`. Existing validators are not affected.
|
||||||
*
|
*
|
||||||
* Origin must be Root to call this function.
|
* RuntimeOrigin must be Root to call this function.
|
||||||
*
|
*
|
||||||
* NOTE: Existing nominators and validators will not be affected by this update.
|
* NOTE: Existing nominators and validators will not be affected by this update.
|
||||||
* to kick people under the new limits, `chill_other` should be called.
|
* to kick people under the new limits, `chill_other` should be called.
|
||||||
@@ -3876,7 +3846,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - up to 3 events
|
* - up to 3 events
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
close: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: Compact<u64> | AnyNumber | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, Compact<u64>, Compact<u32>]>;
|
close: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: Compact<Weight> | AnyNumber | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, Compact<Weight>, Compact<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Disapprove a proposal, close, and remove it from the system, regardless of its current
|
* Disapprove a proposal, close, and remove it from the system, regardless of its current
|
||||||
* state.
|
* state.
|
||||||
@@ -4297,7 +4267,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Events:
|
* Events:
|
||||||
* - `OverweightServiced`: On success.
|
* - `OverweightServiced`: On success.
|
||||||
**/
|
**/
|
||||||
serviceOverweight: AugmentedSubmittable<(index: u64 | AnyNumber | Uint8Array, weightLimit: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64, u64]>;
|
serviceOverweight: AugmentedSubmittable<(index: u64 | AnyNumber | Uint8Array, weightLimit: Weight | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64, Weight]>;
|
||||||
/**
|
/**
|
||||||
* Generic tx
|
* Generic tx
|
||||||
**/
|
**/
|
||||||
@@ -4543,7 +4513,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* NOTE: A successful return to this does *not* imply that the `msg` was executed successfully
|
* NOTE: A successful return to this does *not* imply that the `msg` was executed successfully
|
||||||
* to completion; only that *some* of it was executed.
|
* to completion; only that *some* of it was executed.
|
||||||
**/
|
**/
|
||||||
execute: AugmentedSubmittable<(message: XcmVersionedXcm | { V0: any } | { V1: any } | { V2: any } | string | Uint8Array, maxWeight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedXcm, u64]>;
|
execute: AugmentedSubmittable<(message: XcmVersionedXcm | { V0: any } | { V1: any } | { V2: any } | string | Uint8Array, maxWeight: Weight | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedXcm, Weight]>;
|
||||||
/**
|
/**
|
||||||
* Set a safe XCM version (the version that XCM should be encoded with if the most recent
|
* Set a safe XCM version (the version that XCM should be encoded with if the most recent
|
||||||
* version a destination can accept is unknown).
|
* version a destination can accept is unknown).
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '9.2.3' };
|
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '9.5.2' };
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import '@polkadot/api-base/types/consts';
|
|||||||
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
|
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
|
||||||
import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||||
import type { Codec } from '@polkadot/types-codec/types';
|
import type { Codec } from '@polkadot/types-codec/types';
|
||||||
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
|
import type { Perbill, Percent, Permill, Weight } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
|
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
|
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
|
||||||
|
|
||||||
@@ -258,6 +258,9 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* take place over multiple blocks.
|
* take place over multiple blocks.
|
||||||
**/
|
**/
|
||||||
maxElectingVoters: u32 & AugmentedConst<ApiType>;
|
maxElectingVoters: u32 & AugmentedConst<ApiType>;
|
||||||
|
minerMaxLength: u32 & AugmentedConst<ApiType>;
|
||||||
|
minerMaxVotesPerVoter: u32 & AugmentedConst<ApiType>;
|
||||||
|
minerMaxWeight: Weight & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The priority of the unsigned transaction submitted in the unsigned-phase
|
* The priority of the unsigned transaction submitted in the unsigned-phase
|
||||||
**/
|
**/
|
||||||
@@ -302,7 +305,7 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* this pallet), then [`MinerConfig::solution_weight`] is used to compare against
|
* this pallet), then [`MinerConfig::solution_weight`] is used to compare against
|
||||||
* this value.
|
* this value.
|
||||||
**/
|
**/
|
||||||
signedMaxWeight: u64 & AugmentedConst<ApiType>;
|
signedMaxWeight: Weight & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Duration of the signed phase.
|
* Duration of the signed phase.
|
||||||
**/
|
**/
|
||||||
@@ -561,7 +564,7 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* The maximum weight that may be scheduled per block for any dispatchables of less
|
* The maximum weight that may be scheduled per block for any dispatchables of less
|
||||||
* priority than `schedule::HARD_DEADLINE`.
|
* priority than `schedule::HARD_DEADLINE`.
|
||||||
**/
|
**/
|
||||||
maximumWeight: u64 & AugmentedConst<ApiType>;
|
maximumWeight: Weight & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The maximum number of scheduled calls in the queue for a single block.
|
* The maximum number of scheduled calls in the queue for a single block.
|
||||||
* Not strictly enforced, but used for weight estimation.
|
* Not strictly enforced, but used for weight estimation.
|
||||||
@@ -591,6 +594,29 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* Number of eras that staked funds must remain bonded for.
|
* Number of eras that staked funds must remain bonded for.
|
||||||
**/
|
**/
|
||||||
bondingDuration: u32 & AugmentedConst<ApiType>;
|
bondingDuration: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Number of eras to keep in history.
|
||||||
|
*
|
||||||
|
* Following information is kept for eras in `[current_era -
|
||||||
|
* HistoryDepth, current_era]`: `ErasStakers`, `ErasStakersClipped`,
|
||||||
|
* `ErasValidatorPrefs`, `ErasValidatorReward`, `ErasRewardPoints`,
|
||||||
|
* `ErasTotalStake`, `ErasStartSessionIndex`,
|
||||||
|
* `StakingLedger.claimed_rewards`.
|
||||||
|
*
|
||||||
|
* Must be more than the number of eras delayed by session.
|
||||||
|
* I.e. active era must always be in history. I.e. `active_era >
|
||||||
|
* current_era - history_depth` must be guaranteed.
|
||||||
|
*
|
||||||
|
* If migrating an existing pallet from storage value to config value,
|
||||||
|
* this should be set to same value or greater as in storage.
|
||||||
|
*
|
||||||
|
* Note: `HistoryDepth` is used as the upper bound for the `BoundedVec`
|
||||||
|
* item `StakingLedger.claimed_rewards`. Setting this value lower than
|
||||||
|
* the existing value can lead to inconsistencies in the
|
||||||
|
* `StakingLedger` and will need to be handled properly in a migration.
|
||||||
|
* The test `reducing_history_depth_abrupt` shows this effect.
|
||||||
|
**/
|
||||||
|
historyDepth: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Maximum number of nominations per nominator.
|
* Maximum number of nominations per nominator.
|
||||||
**/
|
**/
|
||||||
@@ -603,8 +629,16 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
**/
|
**/
|
||||||
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
|
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The maximum number of `unlocking` chunks a [`StakingLedger`] can have. Effectively
|
* The maximum number of `unlocking` chunks a [`StakingLedger`] can
|
||||||
* determines how many unique eras a staker may be unbonding in.
|
* have. Effectively determines how many unique eras a staker may be
|
||||||
|
* unbonding in.
|
||||||
|
*
|
||||||
|
* Note: `MaxUnlockingChunks` is used as the upper bound for the
|
||||||
|
* `BoundedVec` item `StakingLedger.unlocking`. Setting this value
|
||||||
|
* lower than the existing value can lead to inconsistencies in the
|
||||||
|
* `StakingLedger` and will need to be handled properly in a runtime
|
||||||
|
* migration. The test `reducing_max_unlocking_chunks_abrupt` shows
|
||||||
|
* this effect.
|
||||||
**/
|
**/
|
||||||
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
|
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
@@ -639,9 +673,9 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
/**
|
/**
|
||||||
* The weight of runtime database operations the runtime can invoke.
|
* The weight of runtime database operations the runtime can invoke.
|
||||||
**/
|
**/
|
||||||
dbWeight: FrameSupportWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
|
dbWeight: SpWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The designated SS85 prefix of this chain.
|
* The designated SS58 prefix of this chain.
|
||||||
*
|
*
|
||||||
* This replaces the "ss58Format" property declared in the chain spec. Reason is
|
* This replaces the "ss58Format" property declared in the chain spec. Reason is
|
||||||
* that the runtime should know about the prefix in order to make use of it as
|
* that the runtime should know about the prefix in order to make use of it as
|
||||||
|
|||||||
@@ -570,6 +570,38 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
|
fastUnstake: {
|
||||||
|
/**
|
||||||
|
* The provided un-staker is already in Head, and cannot deregister.
|
||||||
|
**/
|
||||||
|
AlreadyHead: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The bonded account has already been queued.
|
||||||
|
**/
|
||||||
|
AlreadyQueued: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The call is not allowed at this point because the pallet is not active.
|
||||||
|
**/
|
||||||
|
CallNotAllowed: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The provided Controller account was not found.
|
||||||
|
*
|
||||||
|
* This means that the given account is not bonded.
|
||||||
|
**/
|
||||||
|
NotController: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The bonded account has active unlocking chunks.
|
||||||
|
**/
|
||||||
|
NotFullyBonded: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The provided un-staker is not in the `Queue`.
|
||||||
|
**/
|
||||||
|
NotQueued: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic error
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedError<ApiType>;
|
||||||
|
};
|
||||||
grandpa: {
|
grandpa: {
|
||||||
/**
|
/**
|
||||||
* Attempt to signal GRANDPA change with one already pending.
|
* Attempt to signal GRANDPA change with one already pending.
|
||||||
@@ -713,6 +745,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* The target is invalid.
|
* The target is invalid.
|
||||||
**/
|
**/
|
||||||
InvalidTarget: AugmentedError<ApiType>;
|
InvalidTarget: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The provided judgement was for a different identity.
|
||||||
|
**/
|
||||||
|
JudgementForDifferentIdentity: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Judgement given.
|
* Judgement given.
|
||||||
**/
|
**/
|
||||||
@@ -1491,6 +1527,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* A nomination target was supplied that was blocked or otherwise not a validator.
|
* A nomination target was supplied that was blocked or otherwise not a validator.
|
||||||
**/
|
**/
|
||||||
BadTarget: AugmentedError<ApiType>;
|
BadTarget: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Some bound is not met.
|
||||||
|
**/
|
||||||
|
BoundNotMet: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The user has enough bond and thus cannot be chilled forcefully by an external person.
|
* The user has enough bond and thus cannot be chilled forcefully by an external person.
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';
|
|||||||
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||||
import type { ITuple } from '@polkadot/types-codec/types';
|
import type { ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, H256, Weight } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletStakingExposure, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeProxyType, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
import type { FrameSupportDispatchDispatchInfo, FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletStakingExposure, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeProxyType, SpFinalityGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
|
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
|
||||||
|
|
||||||
@@ -338,10 +338,15 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
};
|
};
|
||||||
electionProviderMultiPhase: {
|
electionProviderMultiPhase: {
|
||||||
/**
|
/**
|
||||||
* The election has been finalized, with `Some` of the given computation, or else if the
|
* An election failed.
|
||||||
* election failed, `None`.
|
*
|
||||||
|
* Not much can be said about which computes failed in the process.
|
||||||
**/
|
**/
|
||||||
ElectionFinalized: AugmentedEvent<ApiType, [electionCompute: Option<PalletElectionProviderMultiPhaseElectionCompute>], { electionCompute: Option<PalletElectionProviderMultiPhaseElectionCompute> }>;
|
ElectionFailed: AugmentedEvent<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* The election has been finalized, with the given computation and score.
|
||||||
|
**/
|
||||||
|
ElectionFinalized: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore], { compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore }>;
|
||||||
/**
|
/**
|
||||||
* An account has been rewarded for their signed submission being finalized.
|
* An account has been rewarded for their signed submission being finalized.
|
||||||
**/
|
**/
|
||||||
@@ -362,7 +367,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
*
|
*
|
||||||
* The `bool` is `true` when a previous solution was ejected to make room for this one.
|
* The `bool` is `true` when a previous solution was ejected to make room for this one.
|
||||||
**/
|
**/
|
||||||
SolutionStored: AugmentedEvent<ApiType, [electionCompute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool], { electionCompute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool }>;
|
SolutionStored: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool], { compute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool }>;
|
||||||
/**
|
/**
|
||||||
* The unsigned phase of the given round has started.
|
* The unsigned phase of the given round has started.
|
||||||
**/
|
**/
|
||||||
@@ -372,6 +377,33 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
};
|
};
|
||||||
|
fastUnstake: {
|
||||||
|
/**
|
||||||
|
* A staker was partially checked for the given eras, but the process did not finish.
|
||||||
|
**/
|
||||||
|
Checking: AugmentedEvent<ApiType, [stash: AccountId32, eras: Vec<u32>], { stash: AccountId32, eras: Vec<u32> }>;
|
||||||
|
/**
|
||||||
|
* Some internal error happened while migrating stash. They are removed as head as a
|
||||||
|
* consequence.
|
||||||
|
**/
|
||||||
|
Errored: AugmentedEvent<ApiType, [stash: AccountId32], { stash: AccountId32 }>;
|
||||||
|
/**
|
||||||
|
* An internal error happened. Operations will be paused now.
|
||||||
|
**/
|
||||||
|
InternalError: AugmentedEvent<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* A staker was slashed for requesting fast-unstake whilst being exposed.
|
||||||
|
**/
|
||||||
|
Slashed: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||||
|
/**
|
||||||
|
* A staker was unstaked.
|
||||||
|
**/
|
||||||
|
Unstaked: AugmentedEvent<ApiType, [stash: AccountId32, result: Result<Null, SpRuntimeDispatchError>], { stash: AccountId32, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||||
|
/**
|
||||||
|
* Generic event
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
|
};
|
||||||
grandpa: {
|
grandpa: {
|
||||||
/**
|
/**
|
||||||
* New authority set has been applied.
|
* New authority set has been applied.
|
||||||
@@ -751,11 +783,6 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* An announcement was placed to make a call in the future.
|
* An announcement was placed to make a call in the future.
|
||||||
**/
|
**/
|
||||||
Announced: AugmentedEvent<ApiType, [real: AccountId32, proxy: AccountId32, callHash: H256], { real: AccountId32, proxy: AccountId32, callHash: H256 }>;
|
Announced: AugmentedEvent<ApiType, [real: AccountId32, proxy: AccountId32, callHash: H256], { real: AccountId32, proxy: AccountId32, callHash: H256 }>;
|
||||||
/**
|
|
||||||
* Anonymous account has been created by new proxy with given
|
|
||||||
* disambiguation index and proxy type.
|
|
||||||
**/
|
|
||||||
AnonymousCreated: AugmentedEvent<ApiType, [anonymous: AccountId32, who: AccountId32, proxyType: PolkadotRuntimeProxyType, disambiguationIndex: u16], { anonymous: AccountId32, who: AccountId32, proxyType: PolkadotRuntimeProxyType, disambiguationIndex: u16 }>;
|
|
||||||
/**
|
/**
|
||||||
* A proxy was added.
|
* A proxy was added.
|
||||||
**/
|
**/
|
||||||
@@ -768,6 +795,11 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* A proxy was removed.
|
* A proxy was removed.
|
||||||
**/
|
**/
|
||||||
ProxyRemoved: AugmentedEvent<ApiType, [delegator: AccountId32, delegatee: AccountId32, proxyType: PolkadotRuntimeProxyType, delay: u32], { delegator: AccountId32, delegatee: AccountId32, proxyType: PolkadotRuntimeProxyType, delay: u32 }>;
|
ProxyRemoved: AugmentedEvent<ApiType, [delegator: AccountId32, delegatee: AccountId32, proxyType: PolkadotRuntimeProxyType, delay: u32], { delegator: AccountId32, delegatee: AccountId32, proxyType: PolkadotRuntimeProxyType, delay: u32 }>;
|
||||||
|
/**
|
||||||
|
* A pure account has been created by new proxy with given
|
||||||
|
* disambiguation index and proxy type.
|
||||||
|
**/
|
||||||
|
PureCreated: AugmentedEvent<ApiType, [pure: AccountId32, who: AccountId32, proxyType: PolkadotRuntimeProxyType, disambiguationIndex: u16], { pure: AccountId32, who: AccountId32, proxyType: PolkadotRuntimeProxyType, disambiguationIndex: u16 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -838,40 +870,37 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,
|
* NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,
|
||||||
* it will not be emitted for staking rewards when they are added to stake.
|
* it will not be emitted for staking rewards when they are added to stake.
|
||||||
**/
|
**/
|
||||||
Bonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Bonded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* An account has stopped participating as either a validator or nominator.
|
* An account has stopped participating as either a validator or nominator.
|
||||||
* \[stash\]
|
|
||||||
**/
|
**/
|
||||||
Chilled: AugmentedEvent<ApiType, [AccountId32]>;
|
Chilled: AugmentedEvent<ApiType, [stash: AccountId32], { stash: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* The era payout has been set; the first balance is the validator-payout; the second is
|
* The era payout has been set; the first balance is the validator-payout; the second is
|
||||||
* the remainder from the maximum amount of reward.
|
* the remainder from the maximum amount of reward.
|
||||||
* \[era_index, validator_payout, remainder\]
|
|
||||||
**/
|
**/
|
||||||
EraPaid: AugmentedEvent<ApiType, [u32, u128, u128]>;
|
EraPaid: AugmentedEvent<ApiType, [eraIndex: u32, validatorPayout: u128, remainder: u128], { eraIndex: u32, validatorPayout: u128, remainder: u128 }>;
|
||||||
/**
|
/**
|
||||||
* A nominator has been kicked from a validator. \[nominator, stash\]
|
* A nominator has been kicked from a validator.
|
||||||
**/
|
**/
|
||||||
Kicked: AugmentedEvent<ApiType, [AccountId32, AccountId32]>;
|
Kicked: AugmentedEvent<ApiType, [nominator: AccountId32, stash: AccountId32], { nominator: AccountId32, stash: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* An old slashing report from a prior era was discarded because it could
|
* An old slashing report from a prior era was discarded because it could
|
||||||
* not be processed. \[session_index\]
|
* not be processed.
|
||||||
**/
|
**/
|
||||||
OldSlashingReportDiscarded: AugmentedEvent<ApiType, [u32]>;
|
OldSlashingReportDiscarded: AugmentedEvent<ApiType, [sessionIndex: u32], { sessionIndex: u32 }>;
|
||||||
/**
|
/**
|
||||||
* The stakers' rewards are getting paid. \[era_index, validator_stash\]
|
* The stakers' rewards are getting paid.
|
||||||
**/
|
**/
|
||||||
PayoutStarted: AugmentedEvent<ApiType, [u32, AccountId32]>;
|
PayoutStarted: AugmentedEvent<ApiType, [eraIndex: u32, validatorStash: AccountId32], { eraIndex: u32, validatorStash: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* The nominator has been rewarded by this amount. \[stash, amount\]
|
* The nominator has been rewarded by this amount.
|
||||||
**/
|
**/
|
||||||
Rewarded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Rewarded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* One validator (and its nominators) has been slashed by the given amount.
|
* One staker (and potentially its nominators) has been slashed by the given amount.
|
||||||
* \[validator, amount\]
|
|
||||||
**/
|
**/
|
||||||
Slashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Slashed: AugmentedEvent<ApiType, [staker: AccountId32, amount: u128], { staker: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* A new set of stakers was elected.
|
* A new set of stakers was elected.
|
||||||
**/
|
**/
|
||||||
@@ -881,18 +910,18 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
StakingElectionFailed: AugmentedEvent<ApiType, []>;
|
StakingElectionFailed: AugmentedEvent<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* An account has unbonded this amount. \[stash, amount\]
|
* An account has unbonded this amount.
|
||||||
**/
|
**/
|
||||||
Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Unbonded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* A validator has set their preferences.
|
* A validator has set their preferences.
|
||||||
**/
|
**/
|
||||||
ValidatorPrefsSet: AugmentedEvent<ApiType, [AccountId32, PalletStakingValidatorPrefs]>;
|
ValidatorPrefsSet: AugmentedEvent<ApiType, [stash: AccountId32, prefs: PalletStakingValidatorPrefs], { stash: AccountId32, prefs: PalletStakingValidatorPrefs }>;
|
||||||
/**
|
/**
|
||||||
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
|
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
|
||||||
* from the unlocking queue. \[stash, amount\]
|
* from the unlocking queue.
|
||||||
**/
|
**/
|
||||||
Withdrawn: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Withdrawn: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -906,11 +935,11 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* An extrinsic failed.
|
* An extrinsic failed.
|
||||||
**/
|
**/
|
||||||
ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo }>;
|
ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportDispatchDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportDispatchDispatchInfo }>;
|
||||||
/**
|
/**
|
||||||
* An extrinsic completed successfully.
|
* An extrinsic completed successfully.
|
||||||
**/
|
**/
|
||||||
ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchInfo: FrameSupportWeightsDispatchInfo }>;
|
ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportDispatchDispatchInfo], { dispatchInfo: FrameSupportDispatchDispatchInfo }>;
|
||||||
/**
|
/**
|
||||||
* An account was reaped.
|
* An account was reaped.
|
||||||
**/
|
**/
|
||||||
@@ -1088,14 +1117,14 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
*
|
*
|
||||||
* \[ para, id, overweight_index, required \]
|
* \[ para, id, overweight_index, required \]
|
||||||
**/
|
**/
|
||||||
OverweightEnqueued: AugmentedEvent<ApiType, [u32, U8aFixed, u64, u64]>;
|
OverweightEnqueued: AugmentedEvent<ApiType, [u32, U8aFixed, u64, Weight]>;
|
||||||
/**
|
/**
|
||||||
* Upward message from the overweight queue was executed with the given actual weight
|
* Upward message from the overweight queue was executed with the given actual weight
|
||||||
* used.
|
* used.
|
||||||
*
|
*
|
||||||
* \[ overweight_index, used \]
|
* \[ overweight_index, used \]
|
||||||
**/
|
**/
|
||||||
OverweightServiced: AugmentedEvent<ApiType, [u64, u64]>;
|
OverweightServiced: AugmentedEvent<ApiType, [u64, Weight]>;
|
||||||
/**
|
/**
|
||||||
* Upward message is unsupported version of XCM.
|
* Upward message is unsupported version of XCM.
|
||||||
* \[ id \]
|
* \[ id \]
|
||||||
@@ -1110,7 +1139,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* The weight limit for handling upward messages was reached.
|
* The weight limit for handling upward messages was reached.
|
||||||
* \[ id, remaining, required \]
|
* \[ id, remaining, required \]
|
||||||
**/
|
**/
|
||||||
WeightExhausted: AugmentedEvent<ApiType, [U8aFixed, u64, u64]>;
|
WeightExhausted: AugmentedEvent<ApiType, [U8aFixed, Weight, Weight]>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -1238,7 +1267,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
*
|
*
|
||||||
* \[ id, pallet index, call index, actual weight, max budgeted weight \]
|
* \[ id, pallet index, call index, actual weight, max budgeted weight \]
|
||||||
**/
|
**/
|
||||||
NotifyOverweight: AugmentedEvent<ApiType, [u64, u8, u8, u64, u64]>;
|
NotifyOverweight: AugmentedEvent<ApiType, [u64, u8, u8, Weight, Weight]>;
|
||||||
/**
|
/**
|
||||||
* A given location which had a version change subscription was dropped owing to an error
|
* A given location which had a version change subscription was dropped owing to an error
|
||||||
* migrating the location to our new XCM format.
|
* migrating the location to our new XCM format.
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, W
|
|||||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerScheduledV3, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
import type { FrameSupportDispatchPerDispatchClassWeight, 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, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerScheduledV3, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||||
import type { Observable } from '@polkadot/types/types';
|
import type { Observable } from '@polkadot/types/types';
|
||||||
|
|
||||||
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
||||||
@@ -543,6 +543,35 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
|
fastUnstake: {
|
||||||
|
/**
|
||||||
|
* Counter for the related counted storage map
|
||||||
|
**/
|
||||||
|
counterForQueue: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Number of eras to check per block.
|
||||||
|
*
|
||||||
|
* If set to 0, this pallet does absolutely nothing.
|
||||||
|
*
|
||||||
|
* Based on the amount of weight available at `on_idle`, up to this many eras of a single
|
||||||
|
* nominator might be checked.
|
||||||
|
**/
|
||||||
|
erasToCheckPerBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* The current "head of the queue" being unstaked.
|
||||||
|
**/
|
||||||
|
head: AugmentedQuery<ApiType, () => Observable<Option<PalletFastUnstakeUnstakeRequest>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* The map of all accounts wishing to be unstaked.
|
||||||
|
*
|
||||||
|
* Keeps track of `AccountId` wishing to unstake and it's corresponding deposit.
|
||||||
|
**/
|
||||||
|
queue: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u128>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Generic query
|
||||||
|
**/
|
||||||
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
|
};
|
||||||
grandpa: {
|
grandpa: {
|
||||||
/**
|
/**
|
||||||
* The number of changes (both in terms of keys and underlying economic responsibilities)
|
* The number of changes (both in terms of keys and underlying economic responsibilities)
|
||||||
@@ -1470,16 +1499,6 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* Mode of era forcing.
|
* Mode of era forcing.
|
||||||
**/
|
**/
|
||||||
forceEra: AugmentedQuery<ApiType, () => Observable<PalletStakingForcing>, []> & QueryableStorageEntry<ApiType, []>;
|
forceEra: AugmentedQuery<ApiType, () => Observable<PalletStakingForcing>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
|
||||||
* Number of eras to keep in history.
|
|
||||||
*
|
|
||||||
* Information is kept for eras in `[current_era - history_depth; current_era]`.
|
|
||||||
*
|
|
||||||
* Must be more than the number of eras delayed by session otherwise. I.e. active era must
|
|
||||||
* always be in history. I.e. `active_era > current_era - history_depth` must be
|
|
||||||
* guaranteed.
|
|
||||||
**/
|
|
||||||
historyDepth: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
|
||||||
/**
|
/**
|
||||||
* Any validators that may never be slashed or forcibly kicked. It's a Vec since they're
|
* Any validators that may never be slashed or forcibly kicked. It's a Vec since they're
|
||||||
* easy to initialize and the performance hit is minimal (we expect no more than four
|
* easy to initialize and the performance hit is minimal (we expect no more than four
|
||||||
@@ -1619,7 +1638,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
/**
|
/**
|
||||||
* The current weight for the block.
|
* The current weight for the block.
|
||||||
**/
|
**/
|
||||||
blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportWeightsPerDispatchClassU64>, []> & QueryableStorageEntry<ApiType, []>;
|
blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportDispatchPerDispatchClassWeight>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* Digest of the current block, also part of the block header.
|
* Digest of the current block, also part of the block header.
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
|||||||
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||||
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
|
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
|
||||||
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||||
import type { AccountId, Block, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { SessionIndex } from '@polkadot/types/interfaces/session';
|
import type { SessionIndex } from '@polkadot/types/interfaces/session';
|
||||||
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
||||||
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
|
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
|
||||||
@@ -206,6 +206,17 @@ declare module '@polkadot/api-base/types/calls' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: DecoratedCallBase<ApiType>;
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
};
|
};
|
||||||
|
/** 0x17a6bc0d0062aeb3/1 */
|
||||||
|
nominationPoolsApi: {
|
||||||
|
/**
|
||||||
|
* Returns the pending rewards for the given member.
|
||||||
|
**/
|
||||||
|
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>;
|
||||||
|
/**
|
||||||
|
* Generic call
|
||||||
|
**/
|
||||||
|
[key: string]: DecoratedCallBase<ApiType>;
|
||||||
|
};
|
||||||
/** 0xf78b278be53f454c/2 */
|
/** 0xf78b278be53f454c/2 */
|
||||||
offchainWorkerApi: {
|
offchainWorkerApi: {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -10,7 +10,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 { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||||
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
|
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||||
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Weight } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportScheduleMaybeHashed, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, 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';
|
import type { FrameSupportScheduleMaybeHashed, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, 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';
|
||||||
|
|
||||||
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
|
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
|
||||||
@@ -754,11 +754,11 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
/**
|
/**
|
||||||
* Sets the maximum amount of weight any individual upward message may consume.
|
* Sets the maximum amount of weight any individual upward message may consume.
|
||||||
**/
|
**/
|
||||||
setUmpMaxIndividualWeight: AugmentedSubmittable<(updated: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64]>;
|
setUmpMaxIndividualWeight: AugmentedSubmittable<(updated: Weight | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Weight]>;
|
||||||
/**
|
/**
|
||||||
* Sets the soft limit for the phase of dispatching dispatchable upward messages.
|
* Sets the soft limit for the phase of dispatching dispatchable upward messages.
|
||||||
**/
|
**/
|
||||||
setUmpServiceTotalWeight: AugmentedSubmittable<(updated: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64]>;
|
setUmpServiceTotalWeight: AugmentedSubmittable<(updated: Weight | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Weight]>;
|
||||||
/**
|
/**
|
||||||
* Set the validation upgrade cooldown.
|
* Set the validation upgrade cooldown.
|
||||||
**/
|
**/
|
||||||
@@ -811,7 +811,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - up to 3 events
|
* - up to 3 events
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
close: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: Compact<u64> | AnyNumber | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, Compact<u64>, Compact<u32>]>;
|
close: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: Compact<Weight> | AnyNumber | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, Compact<Weight>, Compact<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Disapprove a proposal, close, and remove it from the system, regardless of its current
|
* Disapprove a proposal, close, and remove it from the system, regardless of its current
|
||||||
* state.
|
* state.
|
||||||
@@ -1408,6 +1408,49 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
};
|
};
|
||||||
|
fastUnstake: {
|
||||||
|
/**
|
||||||
|
* Control the operation of this pallet.
|
||||||
|
*
|
||||||
|
* Dispatch origin must be signed by the [`Config::ControlOrigin`].
|
||||||
|
**/
|
||||||
|
control: AugmentedSubmittable<(uncheckedErasToCheck: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||||
|
/**
|
||||||
|
* Deregister oneself from the fast-unstake.
|
||||||
|
*
|
||||||
|
* This is useful if one is registered, they are still waiting, and they change their mind.
|
||||||
|
*
|
||||||
|
* Note that the associated stash is still fully unbonded and chilled as a consequence of
|
||||||
|
* calling `register_fast_unstake`. This should probably be followed by a call to
|
||||||
|
* `Staking::rebond`.
|
||||||
|
**/
|
||||||
|
deregister: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||||
|
/**
|
||||||
|
* Register oneself for fast-unstake.
|
||||||
|
*
|
||||||
|
* The dispatch origin of this call must be signed by the controller account, similar to
|
||||||
|
* `staking::unbond`.
|
||||||
|
*
|
||||||
|
* The stash associated with the origin must have no ongoing unlocking chunks. If
|
||||||
|
* successful, this will fully unbond and chill the stash. Then, it will enqueue the stash
|
||||||
|
* to be checked in further blocks.
|
||||||
|
*
|
||||||
|
* If by the time this is called, the stash is actually eligible for fast-unstake, then
|
||||||
|
* they are guaranteed to remain eligible, because the call will chill them as well.
|
||||||
|
*
|
||||||
|
* If the check works, the entire staking data is removed, i.e. the stash is fully
|
||||||
|
* unstaked.
|
||||||
|
*
|
||||||
|
* If the check fails, the stash remains chilled and waiting for being unbonded as in with
|
||||||
|
* the normal staking system, but they lose part of their unbonding chunks due to consuming
|
||||||
|
* the chain's resources.
|
||||||
|
**/
|
||||||
|
registerFastUnstake: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||||
|
/**
|
||||||
|
* Generic tx
|
||||||
|
**/
|
||||||
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
|
};
|
||||||
grandpa: {
|
grandpa: {
|
||||||
/**
|
/**
|
||||||
* Note that the current authority set of the GRANDPA finality gadget has stalled.
|
* Note that the current authority set of the GRANDPA finality gadget has stalled.
|
||||||
@@ -1619,6 +1662,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - `target`: the account whose identity the judgement is upon. This must be an account
|
* - `target`: the account whose identity the judgement is upon. This must be an account
|
||||||
* with a registered identity.
|
* with a registered identity.
|
||||||
* - `judgement`: the judgement of the registrar of index `reg_index` about `target`.
|
* - `judgement`: the judgement of the registrar of index `reg_index` about `target`.
|
||||||
|
* - `identity`: The hash of the [`IdentityInfo`] for that the judgement is provided.
|
||||||
*
|
*
|
||||||
* Emits `JudgementGiven` if successful.
|
* Emits `JudgementGiven` if successful.
|
||||||
*
|
*
|
||||||
@@ -1630,7 +1674,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - One event.
|
* - One event.
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
provideJudgement: AugmentedSubmittable<(regIndex: Compact<u32> | AnyNumber | Uint8Array, target: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, judgement: PalletIdentityJudgement | { Unknown: any } | { FeePaid: any } | { Reasonable: any } | { KnownGood: any } | { OutOfDate: any } | { LowQuality: any } | { Erroneous: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress, PalletIdentityJudgement]>;
|
provideJudgement: AugmentedSubmittable<(regIndex: Compact<u32> | AnyNumber | Uint8Array, target: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, judgement: PalletIdentityJudgement | { Unknown: any } | { FeePaid: any } | { Reasonable: any } | { KnownGood: any } | { OutOfDate: any } | { LowQuality: any } | { Erroneous: any } | string | Uint8Array, identity: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress, PalletIdentityJudgement, H256]>;
|
||||||
/**
|
/**
|
||||||
* Remove the sender as a sub-account.
|
* Remove the sender as a sub-account.
|
||||||
*
|
*
|
||||||
@@ -1970,7 +2014,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - Write: Multisig Storage, [Caller Account]
|
* - Write: Multisig Storage, [Caller Account]
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
approveAsMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option<PalletMultisigTimepoint> | null | Uint8Array | PalletMultisigTimepoint | { height?: any; index?: any } | string, callHash: U8aFixed | string | Uint8Array, maxWeight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, U8aFixed, u64]>;
|
approveAsMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option<PalletMultisigTimepoint> | null | Uint8Array | PalletMultisigTimepoint | { height?: any; index?: any } | string, callHash: U8aFixed | string | Uint8Array, maxWeight: Weight | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, U8aFixed, Weight]>;
|
||||||
/**
|
/**
|
||||||
* Register approval for a dispatch to be made from a deterministic composite account if
|
* Register approval for a dispatch to be made from a deterministic composite account if
|
||||||
* approved by a total of `threshold - 1` of `other_signatories`.
|
* approved by a total of `threshold - 1` of `other_signatories`.
|
||||||
@@ -2018,7 +2062,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - Plus Call Weight
|
* - Plus Call Weight
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option<PalletMultisigTimepoint> | null | Uint8Array | PalletMultisigTimepoint | { height?: any; index?: any } | string, call: WrapperKeepOpaque<Call> | object | string | Uint8Array, storeCall: bool | boolean | Uint8Array, maxWeight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, WrapperKeepOpaque<Call>, bool, u64]>;
|
asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option<PalletMultisigTimepoint> | null | Uint8Array | PalletMultisigTimepoint | { height?: any; index?: any } | string, call: WrapperKeepOpaque<Call> | object | string | Uint8Array, storeCall: bool | boolean | Uint8Array, maxWeight: Weight | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, WrapperKeepOpaque<Call>, bool, Weight]>;
|
||||||
/**
|
/**
|
||||||
* Immediately dispatch a multi-signature call using a single approval from the caller.
|
* Immediately dispatch a multi-signature call using a single approval from the caller.
|
||||||
*
|
*
|
||||||
@@ -2494,10 +2538,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - `proxy_type`: The permissions allowed for this proxy account.
|
* - `proxy_type`: The permissions allowed for this proxy account.
|
||||||
* - `delay`: The announcement period required of the initial proxy. Will generally be
|
* - `delay`: The announcement period required of the initial proxy. Will generally be
|
||||||
* zero.
|
* zero.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of the number of proxies the user has (P).
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
addProxy: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, PolkadotRuntimeProxyType, u32]>;
|
addProxy: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, PolkadotRuntimeProxyType, u32]>;
|
||||||
/**
|
/**
|
||||||
@@ -2516,12 +2556,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Parameters:
|
* Parameters:
|
||||||
* - `real`: The account that the proxy will make a call on behalf of.
|
* - `real`: The account that the proxy will make a call on behalf of.
|
||||||
* - `call_hash`: The hash of the call to be made by the `real` account.
|
* - `call_hash`: The hash of the call to be made by the `real` account.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of:
|
|
||||||
* - A: the number of announcements made.
|
|
||||||
* - P: the number of proxies the user has.
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
announce: AugmentedSubmittable<(real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, H256]>;
|
announce: AugmentedSubmittable<(real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, H256]>;
|
||||||
/**
|
/**
|
||||||
@@ -2543,36 +2577,27 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* same sender, with the same parameters.
|
* same sender, with the same parameters.
|
||||||
*
|
*
|
||||||
* Fails if there are insufficient funds to pay for deposit.
|
* Fails if there are insufficient funds to pay for deposit.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of the number of proxies the user has (P).
|
|
||||||
* # </weight>
|
|
||||||
* TODO: Might be over counting 1 read
|
|
||||||
**/
|
**/
|
||||||
anonymous: AugmentedSubmittable<(proxyType: PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array, index: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotRuntimeProxyType, u32, u16]>;
|
createPure: AugmentedSubmittable<(proxyType: PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array, index: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PolkadotRuntimeProxyType, u32, u16]>;
|
||||||
/**
|
/**
|
||||||
* Removes a previously spawned anonymous proxy.
|
* Removes a previously spawned pure proxy.
|
||||||
*
|
*
|
||||||
* WARNING: **All access to this account will be lost.** Any funds held in it will be
|
* WARNING: **All access to this account will be lost.** Any funds held in it will be
|
||||||
* inaccessible.
|
* inaccessible.
|
||||||
*
|
*
|
||||||
* Requires a `Signed` origin, and the sender account must have been created by a call to
|
* Requires a `Signed` origin, and the sender account must have been created by a call to
|
||||||
* `anonymous` with corresponding parameters.
|
* `pure` with corresponding parameters.
|
||||||
*
|
*
|
||||||
* - `spawner`: The account that originally called `anonymous` to create this account.
|
* - `spawner`: The account that originally called `pure` to create this account.
|
||||||
* - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`.
|
* - `index`: The disambiguation index originally passed to `pure`. Probably `0`.
|
||||||
* - `proxy_type`: The proxy type originally passed to `anonymous`.
|
* - `proxy_type`: The proxy type originally passed to `pure`.
|
||||||
* - `height`: The height of the chain when the call to `anonymous` was processed.
|
* - `height`: The height of the chain when the call to `pure` was processed.
|
||||||
* - `ext_index`: The extrinsic index in which the call to `anonymous` was processed.
|
* - `ext_index`: The extrinsic index in which the call to `pure` was processed.
|
||||||
*
|
*
|
||||||
* Fails with `NoPermission` in case the caller is not a previously created anonymous
|
* Fails with `NoPermission` in case the caller is not a previously created pure
|
||||||
* account whose `anonymous` call has corresponding parameters.
|
* account whose `pure` call has corresponding parameters.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of the number of proxies the user has (P).
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
killAnonymous: AugmentedSubmittable<(spawner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: PolkadotRuntimeProxyType | '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>, [MultiAddress, PolkadotRuntimeProxyType, u16, Compact<u32>, Compact<u32>]>;
|
killPure: AugmentedSubmittable<(spawner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: PolkadotRuntimeProxyType | '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>, [MultiAddress, PolkadotRuntimeProxyType, u16, Compact<u32>, Compact<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Dispatch the given `call` from an account that the sender is authorised for through
|
* Dispatch the given `call` from an account that the sender is authorised for through
|
||||||
* `add_proxy`.
|
* `add_proxy`.
|
||||||
@@ -2585,10 +2610,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - `real`: The account that the proxy will make a call on behalf of.
|
* - `real`: The account that the proxy will make a call on behalf of.
|
||||||
* - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.
|
* - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.
|
||||||
* - `call`: The call to be made by the `real` account.
|
* - `call`: The call to be made by the `real` account.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of the number of proxies the user has (P).
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
proxy: AugmentedSubmittable<(real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forceProxyType: Option<PolkadotRuntimeProxyType> | null | Uint8Array | PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Option<PolkadotRuntimeProxyType>, Call]>;
|
proxy: AugmentedSubmittable<(real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forceProxyType: Option<PolkadotRuntimeProxyType> | null | Uint8Array | PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Option<PolkadotRuntimeProxyType>, Call]>;
|
||||||
/**
|
/**
|
||||||
@@ -2603,12 +2624,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - `real`: The account that the proxy will make a call on behalf of.
|
* - `real`: The account that the proxy will make a call on behalf of.
|
||||||
* - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.
|
* - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.
|
||||||
* - `call`: The call to be made by the `real` account.
|
* - `call`: The call to be made by the `real` account.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of:
|
|
||||||
* - A: the number of announcements made.
|
|
||||||
* - P: the number of proxies the user has.
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
proxyAnnounced: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forceProxyType: Option<PolkadotRuntimeProxyType> | null | Uint8Array | PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress, Option<PolkadotRuntimeProxyType>, Call]>;
|
proxyAnnounced: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forceProxyType: Option<PolkadotRuntimeProxyType> | null | Uint8Array | PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress, Option<PolkadotRuntimeProxyType>, Call]>;
|
||||||
/**
|
/**
|
||||||
@@ -2622,12 +2637,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Parameters:
|
* Parameters:
|
||||||
* - `delegate`: The account that previously announced the call.
|
* - `delegate`: The account that previously announced the call.
|
||||||
* - `call_hash`: The hash of the call to be made.
|
* - `call_hash`: The hash of the call to be made.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of:
|
|
||||||
* - A: the number of announcements made.
|
|
||||||
* - P: the number of proxies the user has.
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
rejectAnnouncement: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, H256]>;
|
rejectAnnouncement: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, H256]>;
|
||||||
/**
|
/**
|
||||||
@@ -2641,12 +2650,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Parameters:
|
* Parameters:
|
||||||
* - `real`: The account that the proxy will make a call on behalf of.
|
* - `real`: The account that the proxy will make a call on behalf of.
|
||||||
* - `call_hash`: The hash of the call to be made by the `real` account.
|
* - `call_hash`: The hash of the call to be made by the `real` account.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of:
|
|
||||||
* - A: the number of announcements made.
|
|
||||||
* - P: the number of proxies the user has.
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
removeAnnouncement: AugmentedSubmittable<(real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, H256]>;
|
removeAnnouncement: AugmentedSubmittable<(real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, H256]>;
|
||||||
/**
|
/**
|
||||||
@@ -2654,12 +2657,8 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* The dispatch origin for this call must be _Signed_.
|
* The dispatch origin for this call must be _Signed_.
|
||||||
*
|
*
|
||||||
* WARNING: This may be called on accounts created by `anonymous`, however if done, then
|
* WARNING: This may be called on accounts created by `pure`, however if done, then
|
||||||
* the unreserved fees will be inaccessible. **All access to this account will be lost.**
|
* the unreserved fees will be inaccessible. **All access to this account will be lost.**
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of the number of proxies the user has (P).
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
removeProxies: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
removeProxies: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||||
/**
|
/**
|
||||||
@@ -2670,10 +2669,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Parameters:
|
* Parameters:
|
||||||
* - `proxy`: The account that the `caller` would like to remove as a proxy.
|
* - `proxy`: The account that the `caller` would like to remove as a proxy.
|
||||||
* - `proxy_type`: The permissions currently enabled for the removed proxy account.
|
* - `proxy_type`: The permissions currently enabled for the removed proxy account.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of the number of proxies the user has (P).
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
removeProxy: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, PolkadotRuntimeProxyType, u32]>;
|
removeProxy: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, PolkadotRuntimeProxyType, u32]>;
|
||||||
/**
|
/**
|
||||||
@@ -3135,31 +3130,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
setController: AugmentedSubmittable<(controller: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
|
setController: AugmentedSubmittable<(controller: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
|
||||||
/**
|
|
||||||
* Set `HistoryDepth` value. This function will delete any history information
|
|
||||||
* when `HistoryDepth` is reduced.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* - `new_history_depth`: The new history depth you would like to set.
|
|
||||||
* - `era_items_deleted`: The number of items that will be deleted by this dispatch. This
|
|
||||||
* should report all the storage items that will be deleted by clearing old era history.
|
|
||||||
* Needed to report an accurate weight for the dispatch. Trusted by `Root` to report an
|
|
||||||
* accurate number.
|
|
||||||
*
|
|
||||||
* Origin must be root.
|
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* - E: Number of history depths removed, i.e. 10 -> 7 = 3
|
|
||||||
* - Weight: O(E)
|
|
||||||
* - DB Weight:
|
|
||||||
* - Reads: Current Era, History Depth
|
|
||||||
* - Writes: History Depth
|
|
||||||
* - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs
|
|
||||||
* - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake,
|
|
||||||
* ErasStartSessionIndex
|
|
||||||
* # </weight>
|
|
||||||
**/
|
|
||||||
setHistoryDepth: AugmentedSubmittable<(newHistoryDepth: Compact<u32> | AnyNumber | Uint8Array, eraItemsDeleted: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
|
|
||||||
/**
|
/**
|
||||||
* Set the validators who cannot be slashed (if any).
|
* Set the validators who cannot be slashed (if any).
|
||||||
*
|
*
|
||||||
@@ -3199,7 +3169,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* * `min_commission`: The minimum amount of commission that each validators must maintain.
|
* * `min_commission`: The minimum amount of commission that each validators must maintain.
|
||||||
* This is checked only upon calling `validate`. Existing validators are not affected.
|
* This is checked only upon calling `validate`. Existing validators are not affected.
|
||||||
*
|
*
|
||||||
* Origin must be Root to call this function.
|
* RuntimeOrigin must be Root to call this function.
|
||||||
*
|
*
|
||||||
* NOTE: Existing nominators and validators will not be affected by this update.
|
* NOTE: Existing nominators and validators will not be affected by this update.
|
||||||
* to kick people under the new limits, `chill_other` should be called.
|
* to kick people under the new limits, `chill_other` should be called.
|
||||||
@@ -3372,7 +3342,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - up to 3 events
|
* - up to 3 events
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
close: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: Compact<u64> | AnyNumber | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, Compact<u64>, Compact<u32>]>;
|
close: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: Compact<Weight> | AnyNumber | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, Compact<Weight>, Compact<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Disapprove a proposal, close, and remove it from the system, regardless of its current
|
* Disapprove a proposal, close, and remove it from the system, regardless of its current
|
||||||
* state.
|
* state.
|
||||||
@@ -3793,7 +3763,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Events:
|
* Events:
|
||||||
* - `OverweightServiced`: On success.
|
* - `OverweightServiced`: On success.
|
||||||
**/
|
**/
|
||||||
serviceOverweight: AugmentedSubmittable<(index: u64 | AnyNumber | Uint8Array, weightLimit: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64, u64]>;
|
serviceOverweight: AugmentedSubmittable<(index: u64 | AnyNumber | Uint8Array, weightLimit: Weight | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64, Weight]>;
|
||||||
/**
|
/**
|
||||||
* Generic tx
|
* Generic tx
|
||||||
**/
|
**/
|
||||||
@@ -4039,7 +4009,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* NOTE: A successful return to this does *not* imply that the `msg` was executed successfully
|
* NOTE: A successful return to this does *not* imply that the `msg` was executed successfully
|
||||||
* to completion; only that *some* of it was executed.
|
* to completion; only that *some* of it was executed.
|
||||||
**/
|
**/
|
||||||
execute: AugmentedSubmittable<(message: XcmVersionedXcm | { V0: any } | { V1: any } | { V2: any } | string | Uint8Array, maxWeight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedXcm, u64]>;
|
execute: AugmentedSubmittable<(message: XcmVersionedXcm | { V0: any } | { V1: any } | { V2: any } | string | Uint8Array, maxWeight: Weight | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [XcmVersionedXcm, Weight]>;
|
||||||
/**
|
/**
|
||||||
* Set a safe XCM version (the version that XCM should be encoded with if the most recent
|
* Set a safe XCM version (the version that XCM should be encoded with if the most recent
|
||||||
* version a destination can accept is unknown).
|
* version a destination can accept is unknown).
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ import '@polkadot/api-base/types/consts';
|
|||||||
|
|
||||||
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
|
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
|
||||||
import type { Option, 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 { Codec, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
|
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletContractsSchedule, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
|
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletContractsSchedule, PalletReferendaTrackInfo, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
|
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
|
||||||
|
|
||||||
@@ -110,58 +110,6 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
bagsList: {
|
|
||||||
/**
|
|
||||||
* The list of thresholds separating the various bags.
|
|
||||||
*
|
|
||||||
* Ids are separated into unsorted bags according to their score. This specifies the
|
|
||||||
* thresholds separating the bags. An id's bag is the largest bag for which the id's score
|
|
||||||
* is less than or equal to its upper threshold.
|
|
||||||
*
|
|
||||||
* When ids are iterated, higher bags are iterated completely before lower bags. This means
|
|
||||||
* that iteration is _semi-sorted_: ids of higher score tend to come before ids of lower
|
|
||||||
* score, but peer ids within a particular bag are sorted in insertion order.
|
|
||||||
*
|
|
||||||
* # Expressing the constant
|
|
||||||
*
|
|
||||||
* This constant must be sorted in strictly increasing order. Duplicate items are not
|
|
||||||
* permitted.
|
|
||||||
*
|
|
||||||
* There is an implied upper limit of `Score::MAX`; that value does not need to be
|
|
||||||
* specified within the bag. For any two threshold lists, if one ends with
|
|
||||||
* `Score::MAX`, the other one does not, and they are otherwise equal, the two
|
|
||||||
* lists will behave identically.
|
|
||||||
*
|
|
||||||
* # Calculation
|
|
||||||
*
|
|
||||||
* It is recommended to generate the set of thresholds in a geometric series, such that
|
|
||||||
* there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *
|
|
||||||
* constant_ratio).max(threshold[k] + 1)` for all `k`.
|
|
||||||
*
|
|
||||||
* The helpers in the `/utils/frame/generate-bags` module can simplify this calculation.
|
|
||||||
*
|
|
||||||
* # Examples
|
|
||||||
*
|
|
||||||
* - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and
|
|
||||||
* iteration is strictly in insertion order.
|
|
||||||
* - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to
|
|
||||||
* the procedure given above, then the constant ratio is equal to 2.
|
|
||||||
* - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to
|
|
||||||
* the procedure given above, then the constant ratio is approximately equal to 1.248.
|
|
||||||
* - If the threshold list begins `[1, 2, 3, ...]`, then an id with score 0 or 1 will fall
|
|
||||||
* into bag 0, an id with score 2 will fall into bag 1, etc.
|
|
||||||
*
|
|
||||||
* # Migration
|
|
||||||
*
|
|
||||||
* In the event that this list ever changes, a copy of the old bags list must be retained.
|
|
||||||
* With that `List::migrate` can be called, which will perform the appropriate migration.
|
|
||||||
**/
|
|
||||||
bagThresholds: Vec<u64> & AugmentedConst<ApiType>;
|
|
||||||
/**
|
|
||||||
* Generic const
|
|
||||||
**/
|
|
||||||
[key: string]: Codec;
|
|
||||||
};
|
|
||||||
balances: {
|
balances: {
|
||||||
/**
|
/**
|
||||||
* The minimum amount required to keep an account open.
|
* The minimum amount required to keep an account open.
|
||||||
@@ -263,7 +211,7 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
*
|
*
|
||||||
* This is only relevant for parachains. Set to zero in case of a standalone chain.
|
* This is only relevant for parachains. Set to zero in case of a standalone chain.
|
||||||
**/
|
**/
|
||||||
contractAccessWeight: u64 & AugmentedConst<ApiType>;
|
contractAccessWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The maximum number of contracts that can be pending for deletion.
|
* The maximum number of contracts that can be pending for deletion.
|
||||||
*
|
*
|
||||||
@@ -290,7 +238,7 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* weight that is left for transactions. See [`Self::DeletionQueueDepth`] for more
|
* weight that is left for transactions. See [`Self::DeletionQueueDepth`] for more
|
||||||
* information about the deletion queue.
|
* information about the deletion queue.
|
||||||
**/
|
**/
|
||||||
deletionWeightLimit: u64 & AugmentedConst<ApiType>;
|
deletionWeightLimit: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The amount of balance a caller has to pay for each byte of storage.
|
* The amount of balance a caller has to pay for each byte of storage.
|
||||||
*
|
*
|
||||||
@@ -419,6 +367,9 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* take place over multiple blocks.
|
* take place over multiple blocks.
|
||||||
**/
|
**/
|
||||||
maxElectingVoters: u32 & AugmentedConst<ApiType>;
|
maxElectingVoters: u32 & AugmentedConst<ApiType>;
|
||||||
|
minerMaxLength: u32 & AugmentedConst<ApiType>;
|
||||||
|
minerMaxVotesPerVoter: u32 & AugmentedConst<ApiType>;
|
||||||
|
minerMaxWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The priority of the unsigned transaction submitted in the unsigned-phase
|
* The priority of the unsigned transaction submitted in the unsigned-phase
|
||||||
**/
|
**/
|
||||||
@@ -463,7 +414,7 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* this pallet), then [`MinerConfig::solution_weight`] is used to compare against
|
* this pallet), then [`MinerConfig::solution_weight`] is used to compare against
|
||||||
* this value.
|
* this value.
|
||||||
**/
|
**/
|
||||||
signedMaxWeight: u64 & AugmentedConst<ApiType>;
|
signedMaxWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Duration of the signed phase.
|
* Duration of the signed phase.
|
||||||
**/
|
**/
|
||||||
@@ -779,6 +730,10 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* The minimum amount to be used as a deposit for a public referendum proposal.
|
* The minimum amount to be used as a deposit for a public referendum proposal.
|
||||||
**/
|
**/
|
||||||
submissionDeposit: u128 & AugmentedConst<ApiType>;
|
submissionDeposit: u128 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Information concerning the different referendum tracks.
|
||||||
|
**/
|
||||||
|
tracks: Vec<ITuple<[u16, PalletReferendaTrackInfo]>> & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The number of blocks after submission that a referendum must begin being decided by.
|
* The number of blocks after submission that a referendum must begin being decided by.
|
||||||
* Once this passes, then anyone may cancel the referendum.
|
* Once this passes, then anyone may cancel the referendum.
|
||||||
@@ -844,6 +799,10 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* The minimum amount to be used as a deposit for a public referendum proposal.
|
* The minimum amount to be used as a deposit for a public referendum proposal.
|
||||||
**/
|
**/
|
||||||
submissionDeposit: u128 & AugmentedConst<ApiType>;
|
submissionDeposit: u128 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Information concerning the different referendum tracks.
|
||||||
|
**/
|
||||||
|
tracks: Vec<ITuple<[u16, PalletReferendaTrackInfo]>> & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The number of blocks after submission that a referendum must begin being decided by.
|
* The number of blocks after submission that a referendum must begin being decided by.
|
||||||
* Once this passes, then anyone may cancel the referendum.
|
* Once this passes, then anyone may cancel the referendum.
|
||||||
@@ -859,7 +818,7 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* The maximum weight that may be scheduled per block for any dispatchables of less
|
* The maximum weight that may be scheduled per block for any dispatchables of less
|
||||||
* priority than `schedule::HARD_DEADLINE`.
|
* priority than `schedule::HARD_DEADLINE`.
|
||||||
**/
|
**/
|
||||||
maximumWeight: u64 & AugmentedConst<ApiType>;
|
maximumWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The maximum number of scheduled calls in the queue for a single block.
|
* The maximum number of scheduled calls in the queue for a single block.
|
||||||
* Not strictly enforced, but used for weight estimation.
|
* Not strictly enforced, but used for weight estimation.
|
||||||
@@ -919,6 +878,29 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
* Number of eras that staked funds must remain bonded for.
|
* Number of eras that staked funds must remain bonded for.
|
||||||
**/
|
**/
|
||||||
bondingDuration: u32 & AugmentedConst<ApiType>;
|
bondingDuration: u32 & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Number of eras to keep in history.
|
||||||
|
*
|
||||||
|
* Following information is kept for eras in `[current_era -
|
||||||
|
* HistoryDepth, current_era]`: `ErasStakers`, `ErasStakersClipped`,
|
||||||
|
* `ErasValidatorPrefs`, `ErasValidatorReward`, `ErasRewardPoints`,
|
||||||
|
* `ErasTotalStake`, `ErasStartSessionIndex`,
|
||||||
|
* `StakingLedger.claimed_rewards`.
|
||||||
|
*
|
||||||
|
* Must be more than the number of eras delayed by session.
|
||||||
|
* I.e. active era must always be in history. I.e. `active_era >
|
||||||
|
* current_era - history_depth` must be guaranteed.
|
||||||
|
*
|
||||||
|
* If migrating an existing pallet from storage value to config value,
|
||||||
|
* this should be set to same value or greater as in storage.
|
||||||
|
*
|
||||||
|
* Note: `HistoryDepth` is used as the upper bound for the `BoundedVec`
|
||||||
|
* item `StakingLedger.claimed_rewards`. Setting this value lower than
|
||||||
|
* the existing value can lead to inconsistencies in the
|
||||||
|
* `StakingLedger` and will need to be handled properly in a migration.
|
||||||
|
* The test `reducing_history_depth_abrupt` shows this effect.
|
||||||
|
**/
|
||||||
|
historyDepth: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Maximum number of nominations per nominator.
|
* Maximum number of nominations per nominator.
|
||||||
**/
|
**/
|
||||||
@@ -931,8 +913,16 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
**/
|
**/
|
||||||
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
|
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The maximum number of `unlocking` chunks a [`StakingLedger`] can have. Effectively
|
* The maximum number of `unlocking` chunks a [`StakingLedger`] can
|
||||||
* determines how many unique eras a staker may be unbonding in.
|
* have. Effectively determines how many unique eras a staker may be
|
||||||
|
* unbonding in.
|
||||||
|
*
|
||||||
|
* Note: `MaxUnlockingChunks` is used as the upper bound for the
|
||||||
|
* `BoundedVec` item `StakingLedger.unlocking`. Setting this value
|
||||||
|
* lower than the existing value can lead to inconsistencies in the
|
||||||
|
* `StakingLedger` and will need to be handled properly in a runtime
|
||||||
|
* migration. The test `reducing_max_unlocking_chunks_abrupt` shows
|
||||||
|
* this effect.
|
||||||
**/
|
**/
|
||||||
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
|
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
@@ -997,9 +987,9 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
/**
|
/**
|
||||||
* The weight of runtime database operations the runtime can invoke.
|
* The weight of runtime database operations the runtime can invoke.
|
||||||
**/
|
**/
|
||||||
dbWeight: FrameSupportWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
|
dbWeight: SpWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The designated SS85 prefix of this chain.
|
* The designated SS58 prefix of this chain.
|
||||||
*
|
*
|
||||||
* This replaces the "ss58Format" property declared in the chain spec. Reason is
|
* This replaces the "ss58Format" property declared in the chain spec. Reason is
|
||||||
* that the runtime should know about the prefix in order to make use of it as
|
* that the runtime should know about the prefix in order to make use of it as
|
||||||
@@ -1183,5 +1173,57 @@ declare module '@polkadot/api-base/types/consts' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: Codec;
|
[key: string]: Codec;
|
||||||
};
|
};
|
||||||
|
voterBagsList: {
|
||||||
|
/**
|
||||||
|
* The list of thresholds separating the various bags.
|
||||||
|
*
|
||||||
|
* Ids are separated into unsorted bags according to their score. This specifies the
|
||||||
|
* thresholds separating the bags. An id's bag is the largest bag for which the id's score
|
||||||
|
* is less than or equal to its upper threshold.
|
||||||
|
*
|
||||||
|
* When ids are iterated, higher bags are iterated completely before lower bags. This means
|
||||||
|
* that iteration is _semi-sorted_: ids of higher score tend to come before ids of lower
|
||||||
|
* score, but peer ids within a particular bag are sorted in insertion order.
|
||||||
|
*
|
||||||
|
* # Expressing the constant
|
||||||
|
*
|
||||||
|
* This constant must be sorted in strictly increasing order. Duplicate items are not
|
||||||
|
* permitted.
|
||||||
|
*
|
||||||
|
* There is an implied upper limit of `Score::MAX`; that value does not need to be
|
||||||
|
* specified within the bag. For any two threshold lists, if one ends with
|
||||||
|
* `Score::MAX`, the other one does not, and they are otherwise equal, the two
|
||||||
|
* lists will behave identically.
|
||||||
|
*
|
||||||
|
* # Calculation
|
||||||
|
*
|
||||||
|
* It is recommended to generate the set of thresholds in a geometric series, such that
|
||||||
|
* there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *
|
||||||
|
* constant_ratio).max(threshold[k] + 1)` for all `k`.
|
||||||
|
*
|
||||||
|
* The helpers in the `/utils/frame/generate-bags` module can simplify this calculation.
|
||||||
|
*
|
||||||
|
* # Examples
|
||||||
|
*
|
||||||
|
* - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and
|
||||||
|
* iteration is strictly in insertion order.
|
||||||
|
* - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to
|
||||||
|
* the procedure given above, then the constant ratio is equal to 2.
|
||||||
|
* - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to
|
||||||
|
* the procedure given above, then the constant ratio is approximately equal to 1.248.
|
||||||
|
* - If the threshold list begins `[1, 2, 3, ...]`, then an id with score 0 or 1 will fall
|
||||||
|
* into bag 0, an id with score 2 will fall into bag 1, etc.
|
||||||
|
*
|
||||||
|
* # Migration
|
||||||
|
*
|
||||||
|
* In the event that this list ever changes, a copy of the old bags list must be retained.
|
||||||
|
* With that `List::migrate` can be called, which will perform the appropriate migration.
|
||||||
|
**/
|
||||||
|
bagThresholds: Vec<u64> & AugmentedConst<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic const
|
||||||
|
**/
|
||||||
|
[key: string]: Codec;
|
||||||
|
};
|
||||||
} // AugmentedConsts
|
} // AugmentedConsts
|
||||||
} // declare module
|
} // declare module
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
AccountNonGrata: AugmentedError<ApiType>;
|
AccountNonGrata: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The founders/fellows/allies have already been initialized.
|
* The Alliance has been initialized, therefore cannot be initialized again.
|
||||||
**/
|
**/
|
||||||
AllianceAlreadyInitialized: AugmentedError<ApiType>;
|
AllianceAlreadyInitialized: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
@@ -33,10 +33,22 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Account is already a member.
|
* Account is already a member.
|
||||||
**/
|
**/
|
||||||
AlreadyMember: AugmentedError<ApiType>;
|
AlreadyMember: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Account already gave retirement notice
|
||||||
|
**/
|
||||||
|
AlreadyRetiring: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Item is already listed as unscrupulous.
|
* Item is already listed as unscrupulous.
|
||||||
**/
|
**/
|
||||||
AlreadyUnscrupulous: AugmentedError<ApiType>;
|
AlreadyUnscrupulous: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Invalid witness data given.
|
||||||
|
**/
|
||||||
|
BadWitness: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Founders must be provided to initialize the Alliance.
|
||||||
|
**/
|
||||||
|
FoundersMissing: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Balance is insufficient for the required deposit.
|
* Balance is insufficient for the required deposit.
|
||||||
**/
|
**/
|
||||||
@@ -73,6 +85,14 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* Account does not have voting rights.
|
* Account does not have voting rights.
|
||||||
**/
|
**/
|
||||||
NoVotingRights: AugmentedError<ApiType>;
|
NoVotingRights: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Account did not give a retirement notice required to retire.
|
||||||
|
**/
|
||||||
|
RetirementNoticeNotGiven: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Retirement period has not passed.
|
||||||
|
**/
|
||||||
|
RetirementPeriodNotPassed: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Length of website URL exceeds `MaxWebsiteUrlLength`.
|
* Length of website URL exceeds `MaxWebsiteUrlLength`.
|
||||||
**/
|
**/
|
||||||
@@ -89,10 +109,6 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* The number of unscrupulous items exceeds `MaxUnscrupulousItems`.
|
* The number of unscrupulous items exceeds `MaxUnscrupulousItems`.
|
||||||
**/
|
**/
|
||||||
TooManyUnscrupulousItems: AugmentedError<ApiType>;
|
TooManyUnscrupulousItems: AugmentedError<ApiType>;
|
||||||
/**
|
|
||||||
* This member is up for being kicked from the Alliance and cannot perform this operation.
|
|
||||||
**/
|
|
||||||
UpForKicking: AugmentedError<ApiType>;
|
|
||||||
/**
|
/**
|
||||||
* The account's identity has no good judgement.
|
* The account's identity has no good judgement.
|
||||||
**/
|
**/
|
||||||
@@ -276,16 +292,6 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
bagsList: {
|
|
||||||
/**
|
|
||||||
* A error in the list interface implementation.
|
|
||||||
**/
|
|
||||||
List: AugmentedError<ApiType>;
|
|
||||||
/**
|
|
||||||
* Generic error
|
|
||||||
**/
|
|
||||||
[key: string]: AugmentedError<ApiType>;
|
|
||||||
};
|
|
||||||
balances: {
|
balances: {
|
||||||
/**
|
/**
|
||||||
* Beneficiary account must pre-exist
|
* Beneficiary account must pre-exist
|
||||||
@@ -884,6 +890,38 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
|
fastUnstake: {
|
||||||
|
/**
|
||||||
|
* The provided un-staker is already in Head, and cannot deregister.
|
||||||
|
**/
|
||||||
|
AlreadyHead: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The bonded account has already been queued.
|
||||||
|
**/
|
||||||
|
AlreadyQueued: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The call is not allowed at this point because the pallet is not active.
|
||||||
|
**/
|
||||||
|
CallNotAllowed: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The provided Controller account was not found.
|
||||||
|
*
|
||||||
|
* This means that the given account is not bonded.
|
||||||
|
**/
|
||||||
|
NotController: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The bonded account has active unlocking chunks.
|
||||||
|
**/
|
||||||
|
NotFullyBonded: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The provided un-staker is not in the `Queue`.
|
||||||
|
**/
|
||||||
|
NotQueued: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic error
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedError<ApiType>;
|
||||||
|
};
|
||||||
gilt: {
|
gilt: {
|
||||||
/**
|
/**
|
||||||
* The amount of the bid is less than the minimum allowed.
|
* The amount of the bid is less than the minimum allowed.
|
||||||
@@ -984,6 +1022,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* The target is invalid.
|
* The target is invalid.
|
||||||
**/
|
**/
|
||||||
InvalidTarget: AugmentedError<ApiType>;
|
InvalidTarget: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* The provided judgement was for a different identity.
|
||||||
|
**/
|
||||||
|
JudgementForDifferentIdentity: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* Judgement given.
|
* Judgement given.
|
||||||
**/
|
**/
|
||||||
@@ -1704,6 +1746,10 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
* A nomination target was supplied that was blocked or otherwise not a validator.
|
* A nomination target was supplied that was blocked or otherwise not a validator.
|
||||||
**/
|
**/
|
||||||
BadTarget: AugmentedError<ApiType>;
|
BadTarget: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Some bound is not met.
|
||||||
|
**/
|
||||||
|
BoundNotMet: AugmentedError<ApiType>;
|
||||||
/**
|
/**
|
||||||
* The user has enough bond and thus cannot be chilled forcefully by an external person.
|
* The user has enough bond and thus cannot be chilled forcefully by an external person.
|
||||||
**/
|
**/
|
||||||
@@ -2163,6 +2209,16 @@ declare module '@polkadot/api-base/types/errors' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedError<ApiType>;
|
[key: string]: AugmentedError<ApiType>;
|
||||||
};
|
};
|
||||||
|
voterBagsList: {
|
||||||
|
/**
|
||||||
|
* A error in the list interface implementation.
|
||||||
|
**/
|
||||||
|
List: AugmentedError<ApiType>;
|
||||||
|
/**
|
||||||
|
* Generic error
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedError<ApiType>;
|
||||||
|
};
|
||||||
whitelist: {
|
whitelist: {
|
||||||
/**
|
/**
|
||||||
* The call was already whitelisted; No-Op.
|
* The call was already whitelisted; No-Op.
|
||||||
|
|||||||
@@ -9,13 +9,17 @@ import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';
|
|||||||
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||||
import type { ITuple } from '@polkadot/types-codec/types';
|
import type { ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPostDispatchInfo, KitchensinkRuntimeProxyType, PalletAllianceCid, PalletAllianceUnscrupulousItem, PalletConvictionVotingTally, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletStakingExposure, PalletStakingValidatorPrefs, PalletStateTrieMigrationError, PalletStateTrieMigrationMigrationCompute, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo } from '@polkadot/types/lookup';
|
import type { FrameSupportDispatchDispatchInfo, FrameSupportDispatchPostDispatchInfo, FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, KitchensinkRuntimeProxyType, PalletAllianceCid, PalletAllianceUnscrupulousItem, PalletConvictionVotingTally, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletStakingExposure, PalletStakingValidatorPrefs, PalletStateTrieMigrationError, PalletStateTrieMigrationMigrationCompute, SpFinalityGrandpaAppPublic, SpNposElectionsElectionScore, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
|
export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
|
||||||
|
|
||||||
declare module '@polkadot/api-base/types/events' {
|
declare module '@polkadot/api-base/types/events' {
|
||||||
interface AugmentedEvents<ApiType extends ApiTypes> {
|
interface AugmentedEvents<ApiType extends ApiTypes> {
|
||||||
alliance: {
|
alliance: {
|
||||||
|
/**
|
||||||
|
* Alliance disbanded. Includes number deleted members and unreserved deposits.
|
||||||
|
**/
|
||||||
|
AllianceDisbanded: AugmentedEvent<ApiType, [votingMembers: u32, allyMembers: u32, unreserved: u32], { votingMembers: u32, allyMembers: u32, unreserved: u32 }>;
|
||||||
/**
|
/**
|
||||||
* An ally has been elevated to Fellow.
|
* An ally has been elevated to Fellow.
|
||||||
**/
|
**/
|
||||||
@@ -36,6 +40,10 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* A member has retired with its deposit unreserved.
|
* A member has retired with its deposit unreserved.
|
||||||
**/
|
**/
|
||||||
MemberRetired: AugmentedEvent<ApiType, [member: AccountId32, unreserved: Option<u128>], { member: AccountId32, unreserved: Option<u128> }>;
|
MemberRetired: AugmentedEvent<ApiType, [member: AccountId32, unreserved: Option<u128>], { member: AccountId32, unreserved: Option<u128> }>;
|
||||||
|
/**
|
||||||
|
* A member gave retirement notice and their retirement period started.
|
||||||
|
**/
|
||||||
|
MemberRetirementPeriodStarted: AugmentedEvent<ApiType, [member: AccountId32], { member: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* Some accounts have been initialized as members (founders/fellows/allies).
|
* Some accounts have been initialized as members (founders/fellows/allies).
|
||||||
**/
|
**/
|
||||||
@@ -187,20 +195,6 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
};
|
};
|
||||||
bagsList: {
|
|
||||||
/**
|
|
||||||
* Moved an account from one bag to another.
|
|
||||||
**/
|
|
||||||
Rebagged: AugmentedEvent<ApiType, [who: AccountId32, from: u64, to: u64], { who: AccountId32, from: u64, to: u64 }>;
|
|
||||||
/**
|
|
||||||
* Updated the score of some account to the given amount.
|
|
||||||
**/
|
|
||||||
ScoreUpdated: AugmentedEvent<ApiType, [who: AccountId32, newScore: u64], { who: AccountId32, newScore: u64 }>;
|
|
||||||
/**
|
|
||||||
* Generic event
|
|
||||||
**/
|
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
|
||||||
};
|
|
||||||
balances: {
|
balances: {
|
||||||
/**
|
/**
|
||||||
* A balance was set by root.
|
* A balance was set by root.
|
||||||
@@ -306,6 +300,16 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
[key: string]: AugmentedEvent<ApiType>;
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
};
|
};
|
||||||
contracts: {
|
contracts: {
|
||||||
|
/**
|
||||||
|
* A contract was called either by a plain account or another contract.
|
||||||
|
*
|
||||||
|
* # Note
|
||||||
|
*
|
||||||
|
* Please keep in mind that like all events this is only emitted for successful
|
||||||
|
* calls. This is because on failure all storage changes including events are
|
||||||
|
* rolled back.
|
||||||
|
**/
|
||||||
|
Called: AugmentedEvent<ApiType, [caller: AccountId32, contract: AccountId32], { caller: AccountId32, contract: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* A code with the specified hash was removed.
|
* A code with the specified hash was removed.
|
||||||
**/
|
**/
|
||||||
@@ -322,6 +326,16 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* A custom event emitted by the contract.
|
* A custom event emitted by the contract.
|
||||||
**/
|
**/
|
||||||
ContractEmitted: AugmentedEvent<ApiType, [contract: AccountId32, data: Bytes], { contract: AccountId32, data: Bytes }>;
|
ContractEmitted: AugmentedEvent<ApiType, [contract: AccountId32, data: Bytes], { contract: AccountId32, data: Bytes }>;
|
||||||
|
/**
|
||||||
|
* A contract delegate called a code hash.
|
||||||
|
*
|
||||||
|
* # Note
|
||||||
|
*
|
||||||
|
* Please keep in mind that like all events this is only emitted for successful
|
||||||
|
* calls. This is because on failure all storage changes including events are
|
||||||
|
* rolled back.
|
||||||
|
**/
|
||||||
|
DelegateCalled: AugmentedEvent<ApiType, [contract: AccountId32, codeHash: H256], { contract: AccountId32, codeHash: H256 }>;
|
||||||
/**
|
/**
|
||||||
* Contract deployed by address at the specified address.
|
* Contract deployed by address at the specified address.
|
||||||
**/
|
**/
|
||||||
@@ -478,10 +492,15 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
};
|
};
|
||||||
electionProviderMultiPhase: {
|
electionProviderMultiPhase: {
|
||||||
/**
|
/**
|
||||||
* The election has been finalized, with `Some` of the given computation, or else if the
|
* An election failed.
|
||||||
* election failed, `None`.
|
*
|
||||||
|
* Not much can be said about which computes failed in the process.
|
||||||
**/
|
**/
|
||||||
ElectionFinalized: AugmentedEvent<ApiType, [electionCompute: Option<PalletElectionProviderMultiPhaseElectionCompute>], { electionCompute: Option<PalletElectionProviderMultiPhaseElectionCompute> }>;
|
ElectionFailed: AugmentedEvent<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* The election has been finalized, with the given computation and score.
|
||||||
|
**/
|
||||||
|
ElectionFinalized: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore], { compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore }>;
|
||||||
/**
|
/**
|
||||||
* An account has been rewarded for their signed submission being finalized.
|
* An account has been rewarded for their signed submission being finalized.
|
||||||
**/
|
**/
|
||||||
@@ -502,7 +521,7 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
*
|
*
|
||||||
* The `bool` is `true` when a previous solution was ejected to make room for this one.
|
* The `bool` is `true` when a previous solution was ejected to make room for this one.
|
||||||
**/
|
**/
|
||||||
SolutionStored: AugmentedEvent<ApiType, [electionCompute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool], { electionCompute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool }>;
|
SolutionStored: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool], { compute: PalletElectionProviderMultiPhaseElectionCompute, prevEjected: bool }>;
|
||||||
/**
|
/**
|
||||||
* The unsigned phase of the given round has started.
|
* The unsigned phase of the given round has started.
|
||||||
**/
|
**/
|
||||||
@@ -555,6 +574,33 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
};
|
};
|
||||||
|
fastUnstake: {
|
||||||
|
/**
|
||||||
|
* A staker was partially checked for the given eras, but the process did not finish.
|
||||||
|
**/
|
||||||
|
Checking: AugmentedEvent<ApiType, [stash: AccountId32, eras: Vec<u32>], { stash: AccountId32, eras: Vec<u32> }>;
|
||||||
|
/**
|
||||||
|
* Some internal error happened while migrating stash. They are removed as head as a
|
||||||
|
* consequence.
|
||||||
|
**/
|
||||||
|
Errored: AugmentedEvent<ApiType, [stash: AccountId32], { stash: AccountId32 }>;
|
||||||
|
/**
|
||||||
|
* An internal error happened. Operations will be paused now.
|
||||||
|
**/
|
||||||
|
InternalError: AugmentedEvent<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* A staker was slashed for requesting fast-unstake whilst being exposed.
|
||||||
|
**/
|
||||||
|
Slashed: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||||
|
/**
|
||||||
|
* A staker was unstaked.
|
||||||
|
**/
|
||||||
|
Unstaked: AugmentedEvent<ApiType, [stash: AccountId32, result: Result<Null, SpRuntimeDispatchError>], { stash: AccountId32, result: Result<Null, SpRuntimeDispatchError> }>;
|
||||||
|
/**
|
||||||
|
* Generic event
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
|
};
|
||||||
gilt: {
|
gilt: {
|
||||||
/**
|
/**
|
||||||
* A bid was successfully placed.
|
* A bid was successfully placed.
|
||||||
@@ -825,11 +871,6 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* An announcement was placed to make a call in the future.
|
* An announcement was placed to make a call in the future.
|
||||||
**/
|
**/
|
||||||
Announced: AugmentedEvent<ApiType, [real: AccountId32, proxy: AccountId32, callHash: H256], { real: AccountId32, proxy: AccountId32, callHash: H256 }>;
|
Announced: AugmentedEvent<ApiType, [real: AccountId32, proxy: AccountId32, callHash: H256], { real: AccountId32, proxy: AccountId32, callHash: H256 }>;
|
||||||
/**
|
|
||||||
* Anonymous account has been created by new proxy with given
|
|
||||||
* disambiguation index and proxy type.
|
|
||||||
**/
|
|
||||||
AnonymousCreated: AugmentedEvent<ApiType, [anonymous: AccountId32, who: AccountId32, proxyType: KitchensinkRuntimeProxyType, disambiguationIndex: u16], { anonymous: AccountId32, who: AccountId32, proxyType: KitchensinkRuntimeProxyType, disambiguationIndex: u16 }>;
|
|
||||||
/**
|
/**
|
||||||
* A proxy was added.
|
* A proxy was added.
|
||||||
**/
|
**/
|
||||||
@@ -842,6 +883,11 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* A proxy was removed.
|
* A proxy was removed.
|
||||||
**/
|
**/
|
||||||
ProxyRemoved: AugmentedEvent<ApiType, [delegator: AccountId32, delegatee: AccountId32, proxyType: KitchensinkRuntimeProxyType, delay: u32], { delegator: AccountId32, delegatee: AccountId32, proxyType: KitchensinkRuntimeProxyType, delay: u32 }>;
|
ProxyRemoved: AugmentedEvent<ApiType, [delegator: AccountId32, delegatee: AccountId32, proxyType: KitchensinkRuntimeProxyType, delay: u32], { delegator: AccountId32, delegatee: AccountId32, proxyType: KitchensinkRuntimeProxyType, delay: u32 }>;
|
||||||
|
/**
|
||||||
|
* A pure account has been created by new proxy with given
|
||||||
|
* disambiguation index and proxy type.
|
||||||
|
**/
|
||||||
|
PureCreated: AugmentedEvent<ApiType, [pure: AccountId32, who: AccountId32, proxyType: KitchensinkRuntimeProxyType, disambiguationIndex: u16], { pure: AccountId32, who: AccountId32, proxyType: KitchensinkRuntimeProxyType, disambiguationIndex: u16 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -1127,40 +1173,37 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
* NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,
|
* NOTE: This event is only emitted when funds are bonded via a dispatchable. Notably,
|
||||||
* it will not be emitted for staking rewards when they are added to stake.
|
* it will not be emitted for staking rewards when they are added to stake.
|
||||||
**/
|
**/
|
||||||
Bonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Bonded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* An account has stopped participating as either a validator or nominator.
|
* An account has stopped participating as either a validator or nominator.
|
||||||
* \[stash\]
|
|
||||||
**/
|
**/
|
||||||
Chilled: AugmentedEvent<ApiType, [AccountId32]>;
|
Chilled: AugmentedEvent<ApiType, [stash: AccountId32], { stash: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* The era payout has been set; the first balance is the validator-payout; the second is
|
* The era payout has been set; the first balance is the validator-payout; the second is
|
||||||
* the remainder from the maximum amount of reward.
|
* the remainder from the maximum amount of reward.
|
||||||
* \[era_index, validator_payout, remainder\]
|
|
||||||
**/
|
**/
|
||||||
EraPaid: AugmentedEvent<ApiType, [u32, u128, u128]>;
|
EraPaid: AugmentedEvent<ApiType, [eraIndex: u32, validatorPayout: u128, remainder: u128], { eraIndex: u32, validatorPayout: u128, remainder: u128 }>;
|
||||||
/**
|
/**
|
||||||
* A nominator has been kicked from a validator. \[nominator, stash\]
|
* A nominator has been kicked from a validator.
|
||||||
**/
|
**/
|
||||||
Kicked: AugmentedEvent<ApiType, [AccountId32, AccountId32]>;
|
Kicked: AugmentedEvent<ApiType, [nominator: AccountId32, stash: AccountId32], { nominator: AccountId32, stash: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* An old slashing report from a prior era was discarded because it could
|
* An old slashing report from a prior era was discarded because it could
|
||||||
* not be processed. \[session_index\]
|
* not be processed.
|
||||||
**/
|
**/
|
||||||
OldSlashingReportDiscarded: AugmentedEvent<ApiType, [u32]>;
|
OldSlashingReportDiscarded: AugmentedEvent<ApiType, [sessionIndex: u32], { sessionIndex: u32 }>;
|
||||||
/**
|
/**
|
||||||
* The stakers' rewards are getting paid. \[era_index, validator_stash\]
|
* The stakers' rewards are getting paid.
|
||||||
**/
|
**/
|
||||||
PayoutStarted: AugmentedEvent<ApiType, [u32, AccountId32]>;
|
PayoutStarted: AugmentedEvent<ApiType, [eraIndex: u32, validatorStash: AccountId32], { eraIndex: u32, validatorStash: AccountId32 }>;
|
||||||
/**
|
/**
|
||||||
* The nominator has been rewarded by this amount. \[stash, amount\]
|
* The nominator has been rewarded by this amount.
|
||||||
**/
|
**/
|
||||||
Rewarded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Rewarded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* One validator (and its nominators) has been slashed by the given amount.
|
* One staker (and potentially its nominators) has been slashed by the given amount.
|
||||||
* \[validator, amount\]
|
|
||||||
**/
|
**/
|
||||||
Slashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Slashed: AugmentedEvent<ApiType, [staker: AccountId32, amount: u128], { staker: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* A new set of stakers was elected.
|
* A new set of stakers was elected.
|
||||||
**/
|
**/
|
||||||
@@ -1170,18 +1213,18 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
StakingElectionFailed: AugmentedEvent<ApiType, []>;
|
StakingElectionFailed: AugmentedEvent<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* An account has unbonded this amount. \[stash, amount\]
|
* An account has unbonded this amount.
|
||||||
**/
|
**/
|
||||||
Unbonded: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Unbonded: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* A validator has set their preferences.
|
* A validator has set their preferences.
|
||||||
**/
|
**/
|
||||||
ValidatorPrefsSet: AugmentedEvent<ApiType, [AccountId32, PalletStakingValidatorPrefs]>;
|
ValidatorPrefsSet: AugmentedEvent<ApiType, [stash: AccountId32, prefs: PalletStakingValidatorPrefs], { stash: AccountId32, prefs: PalletStakingValidatorPrefs }>;
|
||||||
/**
|
/**
|
||||||
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
|
* An account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance`
|
||||||
* from the unlocking queue. \[stash, amount\]
|
* from the unlocking queue.
|
||||||
**/
|
**/
|
||||||
Withdrawn: AugmentedEvent<ApiType, [AccountId32, u128]>;
|
Withdrawn: AugmentedEvent<ApiType, [stash: AccountId32, amount: u128], { stash: AccountId32, amount: u128 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
**/
|
**/
|
||||||
@@ -1236,11 +1279,11 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
/**
|
/**
|
||||||
* An extrinsic failed.
|
* An extrinsic failed.
|
||||||
**/
|
**/
|
||||||
ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo }>;
|
ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportDispatchDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportDispatchDispatchInfo }>;
|
||||||
/**
|
/**
|
||||||
* An extrinsic completed successfully.
|
* An extrinsic completed successfully.
|
||||||
**/
|
**/
|
||||||
ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchInfo: FrameSupportWeightsDispatchInfo }>;
|
ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportDispatchDispatchInfo], { dispatchInfo: FrameSupportDispatchDispatchInfo }>;
|
||||||
/**
|
/**
|
||||||
* An account was reaped.
|
* An account was reaped.
|
||||||
**/
|
**/
|
||||||
@@ -1579,9 +1622,23 @@ declare module '@polkadot/api-base/types/events' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: AugmentedEvent<ApiType>;
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
};
|
};
|
||||||
|
voterBagsList: {
|
||||||
|
/**
|
||||||
|
* Moved an account from one bag to another.
|
||||||
|
**/
|
||||||
|
Rebagged: AugmentedEvent<ApiType, [who: AccountId32, from: u64, to: u64], { who: AccountId32, from: u64, to: u64 }>;
|
||||||
|
/**
|
||||||
|
* Updated the score of some account to the given amount.
|
||||||
|
**/
|
||||||
|
ScoreUpdated: AugmentedEvent<ApiType, [who: AccountId32, newScore: u64], { who: AccountId32, newScore: u64 }>;
|
||||||
|
/**
|
||||||
|
* Generic event
|
||||||
|
**/
|
||||||
|
[key: string]: AugmentedEvent<ApiType>;
|
||||||
|
};
|
||||||
whitelist: {
|
whitelist: {
|
||||||
CallWhitelisted: AugmentedEvent<ApiType, [callHash: H256], { callHash: H256 }>;
|
CallWhitelisted: AugmentedEvent<ApiType, [callHash: H256], { callHash: H256 }>;
|
||||||
WhitelistedCallDispatched: AugmentedEvent<ApiType, [callHash: H256, result: Result<FrameSupportWeightsPostDispatchInfo, SpRuntimeDispatchErrorWithPostInfo>], { callHash: H256, result: Result<FrameSupportWeightsPostDispatchInfo, SpRuntimeDispatchErrorWithPostInfo> }>;
|
WhitelistedCallDispatched: AugmentedEvent<ApiType, [callHash: H256, result: Result<FrameSupportDispatchPostDispatchInfo, SpRuntimeDispatchErrorWithPostInfo>], { callHash: H256, result: Result<FrameSupportDispatchPostDispatchInfo, SpRuntimeDispatchErrorWithPostInfo> }>;
|
||||||
WhitelistedCallRemoved: AugmentedEvent<ApiType, [callHash: H256], { callHash: H256 }>;
|
WhitelistedCallRemoved: AugmentedEvent<ApiType, [callHash: H256], { callHash: H256 }>;
|
||||||
/**
|
/**
|
||||||
* Generic event
|
* Generic event
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import type { Data } from '@polkadot/types';
|
|||||||
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, WrapperOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, WrapperOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceMemberRole, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageDeletedContract, PalletContractsStorageRawContractInfo, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletConvictionVotingVoteVoting, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata, PalletUniquesItemDetails, PalletUniquesItemMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
|
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceMemberRole, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageContractInfo, PalletContractsStorageDeletedContract, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletConvictionVotingVoteVoting, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletFastUnstakeUnstakeRequest, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesCollectionDetails, PalletUniquesCollectionMetadata, PalletUniquesItemDetails, PalletUniquesItemMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
|
||||||
import type { Observable } from '@polkadot/types/types';
|
import type { Observable } from '@polkadot/types/types';
|
||||||
|
|
||||||
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
||||||
@@ -30,7 +30,12 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
/**
|
/**
|
||||||
* Maps member type to members of each type.
|
* Maps member type to members of each type.
|
||||||
**/
|
**/
|
||||||
members: AugmentedQuery<ApiType, (arg: PalletAllianceMemberRole | 'Founder' | 'Fellow' | 'Ally' | number | Uint8Array) => Observable<Vec<AccountId32>>, [PalletAllianceMemberRole]> & QueryableStorageEntry<ApiType, [PalletAllianceMemberRole]>;
|
members: AugmentedQuery<ApiType, (arg: PalletAllianceMemberRole | 'Founder' | 'Fellow' | 'Ally' | 'Retiring' | number | Uint8Array) => Observable<Vec<AccountId32>>, [PalletAllianceMemberRole]> & QueryableStorageEntry<ApiType, [PalletAllianceMemberRole]>;
|
||||||
|
/**
|
||||||
|
* A set of members who gave a retirement notice. They can retire after the end of retirement
|
||||||
|
* period stored as a future block number.
|
||||||
|
**/
|
||||||
|
retiringMembers: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
* The IPFS CID of the alliance rule.
|
* The IPFS CID of the alliance rule.
|
||||||
* Founders and fellows can propose a new rule with a super-majority.
|
* Founders and fellows can propose a new rule with a super-majority.
|
||||||
@@ -47,11 +52,6 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* The current list of websites deemed unscrupulous.
|
* The current list of websites deemed unscrupulous.
|
||||||
**/
|
**/
|
||||||
unscrupulousWebsites: AugmentedQuery<ApiType, () => Observable<Vec<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;
|
unscrupulousWebsites: AugmentedQuery<ApiType, () => Observable<Vec<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
|
||||||
* A set of members that are (potentially) being kicked out. They cannot retire until the
|
|
||||||
* motion is settled.
|
|
||||||
**/
|
|
||||||
upForKicking: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<bool>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
|
||||||
/**
|
/**
|
||||||
* Generic query
|
* Generic query
|
||||||
**/
|
**/
|
||||||
@@ -245,28 +245,6 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
bagsList: {
|
|
||||||
/**
|
|
||||||
* Counter for the related counted storage map
|
|
||||||
**/
|
|
||||||
counterForListNodes: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
|
||||||
/**
|
|
||||||
* A bag stored in storage.
|
|
||||||
*
|
|
||||||
* Stores a `Bag` struct, which stores head and tail pointers to itself.
|
|
||||||
**/
|
|
||||||
listBags: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletBagsListListBag>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
|
|
||||||
/**
|
|
||||||
* A single node, within some bag.
|
|
||||||
*
|
|
||||||
* Nodes store links forward and back within their respective bags.
|
|
||||||
**/
|
|
||||||
listNodes: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletBagsListListNode>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
|
||||||
/**
|
|
||||||
* Generic query
|
|
||||||
**/
|
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
|
||||||
};
|
|
||||||
balances: {
|
balances: {
|
||||||
/**
|
/**
|
||||||
* The Balances pallet example of storing the balance of an account.
|
* The Balances pallet example of storing the balance of an account.
|
||||||
@@ -378,7 +356,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
*
|
*
|
||||||
* TWOX-NOTE: SAFE since `AccountId` is a secure hash.
|
* TWOX-NOTE: SAFE since `AccountId` is a secure hash.
|
||||||
**/
|
**/
|
||||||
contractInfoOf: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletContractsStorageRawContractInfo>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
contractInfoOf: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletContractsStorageContractInfo>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
/**
|
/**
|
||||||
* Evicted contracts that await child trie deletion.
|
* Evicted contracts that await child trie deletion.
|
||||||
*
|
*
|
||||||
@@ -662,6 +640,35 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
|
fastUnstake: {
|
||||||
|
/**
|
||||||
|
* Counter for the related counted storage map
|
||||||
|
**/
|
||||||
|
counterForQueue: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* Number of eras to check per block.
|
||||||
|
*
|
||||||
|
* If set to 0, this pallet does absolutely nothing.
|
||||||
|
*
|
||||||
|
* Based on the amount of weight available at `on_idle`, up to this many eras of a single
|
||||||
|
* nominator might be checked.
|
||||||
|
**/
|
||||||
|
erasToCheckPerBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* The current "head of the queue" being unstaked.
|
||||||
|
**/
|
||||||
|
head: AugmentedQuery<ApiType, () => Observable<Option<PalletFastUnstakeUnstakeRequest>>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* The map of all accounts wishing to be unstaked.
|
||||||
|
*
|
||||||
|
* Keeps track of `AccountId` wishing to unstake and it's corresponding deposit.
|
||||||
|
**/
|
||||||
|
queue: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u128>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Generic query
|
||||||
|
**/
|
||||||
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
|
};
|
||||||
gilt: {
|
gilt: {
|
||||||
/**
|
/**
|
||||||
* The currently active gilts, indexed according to the order of creation.
|
* The currently active gilts, indexed according to the order of creation.
|
||||||
@@ -1353,16 +1360,6 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
* Mode of era forcing.
|
* Mode of era forcing.
|
||||||
**/
|
**/
|
||||||
forceEra: AugmentedQuery<ApiType, () => Observable<PalletStakingForcing>, []> & QueryableStorageEntry<ApiType, []>;
|
forceEra: AugmentedQuery<ApiType, () => Observable<PalletStakingForcing>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
|
||||||
* Number of eras to keep in history.
|
|
||||||
*
|
|
||||||
* Information is kept for eras in `[current_era - history_depth; current_era]`.
|
|
||||||
*
|
|
||||||
* Must be more than the number of eras delayed by session otherwise. I.e. active era must
|
|
||||||
* always be in history. I.e. `active_era > current_era - history_depth` must be
|
|
||||||
* guaranteed.
|
|
||||||
**/
|
|
||||||
historyDepth: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
|
||||||
/**
|
/**
|
||||||
* Any validators that may never be slashed or forcibly kicked. It's a Vec since they're
|
* Any validators that may never be slashed or forcibly kicked. It's a Vec since they're
|
||||||
* easy to initialize and the performance hit is minimal (we expect no more than four
|
* easy to initialize and the performance hit is minimal (we expect no more than four
|
||||||
@@ -1537,7 +1534,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
/**
|
/**
|
||||||
* The current weight for the block.
|
* The current weight for the block.
|
||||||
**/
|
**/
|
||||||
blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportWeightsPerDispatchClassU64>, []> & QueryableStorageEntry<ApiType, []>;
|
blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportDispatchPerDispatchClassWeight>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
/**
|
/**
|
||||||
* Digest of the current block, also part of the block header.
|
* Digest of the current block, also part of the block header.
|
||||||
**/
|
**/
|
||||||
@@ -1804,6 +1801,28 @@ declare module '@polkadot/api-base/types/storage' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: QueryableStorageEntry<ApiType>;
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
};
|
};
|
||||||
|
voterBagsList: {
|
||||||
|
/**
|
||||||
|
* Counter for the related counted storage map
|
||||||
|
**/
|
||||||
|
counterForListNodes: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
|
||||||
|
/**
|
||||||
|
* A bag stored in storage.
|
||||||
|
*
|
||||||
|
* Stores a `Bag` struct, which stores head and tail pointers to itself.
|
||||||
|
**/
|
||||||
|
listBags: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletBagsListListBag>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
|
||||||
|
/**
|
||||||
|
* A single node, within some bag.
|
||||||
|
*
|
||||||
|
* Nodes store links forward and back within their respective bags.
|
||||||
|
**/
|
||||||
|
listNodes: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletBagsListListNode>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||||
|
/**
|
||||||
|
* Generic query
|
||||||
|
**/
|
||||||
|
[key: string]: QueryableStorageEntry<ApiType>;
|
||||||
|
};
|
||||||
whitelist: {
|
whitelist: {
|
||||||
whitelistedCall: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<Null>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
|
whitelistedCall: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<Null>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -12,12 +12,11 @@ import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyO
|
|||||||
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
|
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
|
||||||
import type { BlockHash } from '@polkadot/types/interfaces/chain';
|
import type { BlockHash } from '@polkadot/types/interfaces/chain';
|
||||||
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
|
||||||
import type { CodeUploadResult, ContractExecResult, ContractInstantiateResult } from '@polkadot/types/interfaces/contracts';
|
import type { CodeSource, CodeUploadResult, ContractExecResult, ContractInstantiateResult } from '@polkadot/types/interfaces/contracts';
|
||||||
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
|
||||||
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
|
import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
|
||||||
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
|
||||||
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
|
||||||
import type { NpApiError } from '@polkadot/types/interfaces/nompools';
|
|
||||||
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||||
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
||||||
@@ -119,7 +118,7 @@ declare module '@polkadot/api-base/types/calls' {
|
|||||||
/**
|
/**
|
||||||
* Instantiate a new contract.
|
* Instantiate a new contract.
|
||||||
**/
|
**/
|
||||||
instantiate: AugmentedCall<ApiType, (origin: AccountId | string | Uint8Array, value: Balance | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, storageDepositLimit: Option<Balance> | null | Uint8Array | Balance | AnyNumber, code: Bytes | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => Observable<ContractInstantiateResult>>;
|
instantiate: AugmentedCall<ApiType, (origin: AccountId | string | Uint8Array, value: Balance | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, storageDepositLimit: Option<Balance> | null | Uint8Array | Balance | AnyNumber, code: CodeSource | { Upload: any } | { Existing: any } | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => Observable<ContractInstantiateResult>>;
|
||||||
/**
|
/**
|
||||||
* Upload new code without instantiating a contract from it.
|
* Upload new code without instantiating a contract from it.
|
||||||
**/
|
**/
|
||||||
@@ -222,7 +221,7 @@ declare module '@polkadot/api-base/types/calls' {
|
|||||||
/**
|
/**
|
||||||
* Returns the pending rewards for the given member.
|
* Returns the pending rewards for the given member.
|
||||||
**/
|
**/
|
||||||
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Result<Balance, NpApiError>>>;
|
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>;
|
||||||
/**
|
/**
|
||||||
* Generic call
|
* Generic call
|
||||||
**/
|
**/
|
||||||
|
|||||||
@@ -10,7 +10,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 { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
||||||
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
|
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
|
||||||
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { FrameSupportScheduleDispatchTime, FrameSupportScheduleMaybeHashed, KitchensinkRuntimeOriginCaller, KitchensinkRuntimeProxyType, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceUnscrupulousItem, PalletAssetsDestroyWitness, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeHeader, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof } from '@polkadot/types/lookup';
|
import type { FrameSupportScheduleDispatchTime, FrameSupportScheduleMaybeHashed, KitchensinkRuntimeOriginCaller, KitchensinkRuntimeProxyType, KitchensinkRuntimeSessionKeys, PalletAllianceCid, PalletAllianceDisbandWitness, PalletAllianceUnscrupulousItem, PalletAssetsDestroyWitness, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeHeader, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
|
||||||
|
|
||||||
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
|
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
|
||||||
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
|
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
|
||||||
@@ -32,15 +32,34 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* Requires the sender to be a founder or fellow.
|
* Requires the sender to be a founder or fellow.
|
||||||
**/
|
**/
|
||||||
close: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: Compact<u64> | AnyNumber | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, Compact<u64>, Compact<u32>]>;
|
close: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, SpWeightsWeightV2Weight, Compact<u32>]>;
|
||||||
|
/**
|
||||||
|
* Close a vote that is either approved, disapproved, or whose voting period has ended.
|
||||||
|
*
|
||||||
|
* Requires the sender to be a founder or fellow.
|
||||||
|
**/
|
||||||
|
closeOldWeight: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: Compact<u64> | AnyNumber | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, Compact<u64>, Compact<u32>]>;
|
||||||
|
/**
|
||||||
|
* Disband the Alliance, remove all active members and unreserve deposits.
|
||||||
|
*
|
||||||
|
* Witness data must be set.
|
||||||
|
**/
|
||||||
|
disband: AugmentedSubmittable<(witness: PalletAllianceDisbandWitness | { votingMembers?: any; allyMembers?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletAllianceDisbandWitness]>;
|
||||||
/**
|
/**
|
||||||
* Elevate an ally to fellow.
|
* Elevate an ally to fellow.
|
||||||
**/
|
**/
|
||||||
elevateAlly: AugmentedSubmittable<(ally: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
|
elevateAlly: AugmentedSubmittable<(ally: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
|
||||||
/**
|
/**
|
||||||
* Initialize the founders, fellows, and allies.
|
* As a member, give a retirement notice and start a retirement period required to pass in
|
||||||
|
* order to retire.
|
||||||
|
**/
|
||||||
|
giveRetirementNotice: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||||
|
/**
|
||||||
|
* Initialize the Alliance, onboard founders, fellows, and allies.
|
||||||
*
|
*
|
||||||
* This should only be called once, and must be called by the Root origin.
|
* Founders must be not empty.
|
||||||
|
* The Alliance must be empty.
|
||||||
|
* Must be called by the Root origin.
|
||||||
**/
|
**/
|
||||||
initMembers: AugmentedSubmittable<(founders: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], fellows: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], allies: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, Vec<AccountId32>, Vec<AccountId32>]>;
|
initMembers: AugmentedSubmittable<(founders: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], fellows: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], allies: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>, Vec<AccountId32>, Vec<AccountId32>]>;
|
||||||
/**
|
/**
|
||||||
@@ -72,6 +91,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
removeUnscrupulousItems: AugmentedSubmittable<(items: Vec<PalletAllianceUnscrupulousItem> | (PalletAllianceUnscrupulousItem | { AccountId: any } | { Website: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<PalletAllianceUnscrupulousItem>]>;
|
removeUnscrupulousItems: AugmentedSubmittable<(items: Vec<PalletAllianceUnscrupulousItem> | (PalletAllianceUnscrupulousItem | { AccountId: any } | { Website: any } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<PalletAllianceUnscrupulousItem>]>;
|
||||||
/**
|
/**
|
||||||
* As a member, retire from the alliance and unreserve the deposit.
|
* As a member, retire from the alliance and unreserve the deposit.
|
||||||
|
* This can only be done once you have `give_retirement_notice` and it has expired.
|
||||||
**/
|
**/
|
||||||
retire: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
retire: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||||
/**
|
/**
|
||||||
@@ -131,7 +151,42 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - up to 3 events
|
* - up to 3 events
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
close: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: Compact<u64> | AnyNumber | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, Compact<u64>, Compact<u32>]>;
|
close: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, SpWeightsWeightV2Weight, Compact<u32>]>;
|
||||||
|
/**
|
||||||
|
* Close a vote that is either approved, disapproved or whose voting period has ended.
|
||||||
|
*
|
||||||
|
* May be called by any signed account in order to finish voting and close the proposal.
|
||||||
|
*
|
||||||
|
* If called before the end of the voting period it will only close the vote if it is
|
||||||
|
* has enough votes to be approved or disapproved.
|
||||||
|
*
|
||||||
|
* If called after the end of the voting period abstentions are counted as rejections
|
||||||
|
* unless there is a prime member set and the prime member cast an approval.
|
||||||
|
*
|
||||||
|
* If the close operation completes successfully with disapproval, the transaction fee will
|
||||||
|
* be waived. Otherwise execution of the approved operation will be charged to the caller.
|
||||||
|
*
|
||||||
|
* + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed
|
||||||
|
* proposal.
|
||||||
|
* + `length_bound`: The upper bound for the length of the proposal in storage. Checked via
|
||||||
|
* `storage::read` so it is `size_of::<u32>() == 4` larger than the pure length.
|
||||||
|
*
|
||||||
|
* # <weight>
|
||||||
|
* ## Weight
|
||||||
|
* - `O(B + M + P1 + P2)` where:
|
||||||
|
* - `B` is `proposal` size in bytes (length-fee-bounded)
|
||||||
|
* - `M` is members-count (code- and governance-bounded)
|
||||||
|
* - `P1` is the complexity of `proposal` preimage.
|
||||||
|
* - `P2` is proposal-count (code-bounded)
|
||||||
|
* - DB:
|
||||||
|
* - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)
|
||||||
|
* - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec
|
||||||
|
* `O(P2)`)
|
||||||
|
* - any mutations done while executing `proposal` (`P1`)
|
||||||
|
* - up to 3 events
|
||||||
|
* # </weight>
|
||||||
|
**/
|
||||||
|
closeOldWeight: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: Compact<u64> | AnyNumber | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, Compact<u64>, Compact<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Disapprove a proposal, close, and remove it from the system, regardless of its current
|
* Disapprove a proposal, close, and remove it from the system, regardless of its current
|
||||||
* state.
|
* state.
|
||||||
@@ -726,36 +781,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
};
|
};
|
||||||
bagsList: {
|
|
||||||
/**
|
|
||||||
* Move the caller's Id directly in front of `lighter`.
|
|
||||||
*
|
|
||||||
* The dispatch origin for this call must be _Signed_ and can only be called by the Id of
|
|
||||||
* the account going in front of `lighter`.
|
|
||||||
*
|
|
||||||
* Only works if
|
|
||||||
* - both nodes are within the same bag,
|
|
||||||
* - and `origin` has a greater `Score` than `lighter`.
|
|
||||||
**/
|
|
||||||
putInFrontOf: AugmentedSubmittable<(lighter: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
|
|
||||||
/**
|
|
||||||
* Declare that some `dislocated` account has, through rewards or penalties, sufficiently
|
|
||||||
* 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.
|
|
||||||
*
|
|
||||||
* Will always update the stored score of `dislocated` to the correct score, based on
|
|
||||||
* `ScoreProvider`.
|
|
||||||
*
|
|
||||||
* If `dislocated` does not exists, it returns an error.
|
|
||||||
**/
|
|
||||||
rebag: AugmentedSubmittable<(dislocated: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
|
|
||||||
/**
|
|
||||||
* Generic tx
|
|
||||||
**/
|
|
||||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
|
||||||
};
|
|
||||||
balances: {
|
balances: {
|
||||||
/**
|
/**
|
||||||
* Exactly as `transfer`, except the origin must be root and the source account may be
|
* Exactly as `transfer`, except the origin must be root and the source account may be
|
||||||
@@ -1159,7 +1184,26 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* * If no account exists and the call value is not less than `existential_deposit`,
|
* * If no account exists and the call value is not less than `existential_deposit`,
|
||||||
* a regular account will be created and any value will be transferred.
|
* a regular account will be created and any value will be transferred.
|
||||||
**/
|
**/
|
||||||
call: AugmentedSubmittable<(dest: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: Compact<u128> | AnyNumber | Uint8Array, gasLimit: Compact<u64> | AnyNumber | Uint8Array, storageDepositLimit: Option<Compact<u128>> | null | Uint8Array | Compact<u128> | AnyNumber, data: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Compact<u128>, Compact<u64>, Option<Compact<u128>>, Bytes]>;
|
call: AugmentedSubmittable<(dest: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: Compact<u128> | AnyNumber | Uint8Array, gasLimit: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array, storageDepositLimit: Option<Compact<u128>> | null | Uint8Array | Compact<u128> | AnyNumber, data: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Compact<u128>, SpWeightsWeightV2Weight, Option<Compact<u128>>, Bytes]>;
|
||||||
|
/**
|
||||||
|
* Makes a call to an account, optionally transferring some balance.
|
||||||
|
*
|
||||||
|
* # Parameters
|
||||||
|
*
|
||||||
|
* * `dest`: Address of the contract to call.
|
||||||
|
* * `value`: The balance to transfer from the `origin` to `dest`.
|
||||||
|
* * `gas_limit`: The gas limit enforced when executing the constructor.
|
||||||
|
* * `storage_deposit_limit`: The maximum amount of balance that can be charged from the
|
||||||
|
* caller to pay for the storage consumed.
|
||||||
|
* * `data`: The input data to pass to the contract.
|
||||||
|
*
|
||||||
|
* * If the account is a smart-contract account, the associated code will be
|
||||||
|
* executed and any value will be transferred.
|
||||||
|
* * If the account is a regular account, any value will be transferred.
|
||||||
|
* * If no account exists and the call value is not less than `existential_deposit`,
|
||||||
|
* a regular account will be created and any value will be transferred.
|
||||||
|
**/
|
||||||
|
callOldWeight: AugmentedSubmittable<(dest: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: Compact<u128> | AnyNumber | Uint8Array, gasLimit: Compact<u64> | AnyNumber | Uint8Array, storageDepositLimit: Option<Compact<u128>> | null | Uint8Array | Compact<u128> | AnyNumber, data: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Compact<u128>, Compact<u64>, Option<Compact<u128>>, Bytes]>;
|
||||||
/**
|
/**
|
||||||
* Instantiates a contract from a previously deployed wasm binary.
|
* Instantiates a contract from a previously deployed wasm binary.
|
||||||
*
|
*
|
||||||
@@ -1167,7 +1211,15 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* code deployment step. Instead, the `code_hash` of an on-chain deployed wasm binary
|
* code deployment step. Instead, the `code_hash` of an on-chain deployed wasm binary
|
||||||
* must be supplied.
|
* must be supplied.
|
||||||
**/
|
**/
|
||||||
instantiate: AugmentedSubmittable<(value: Compact<u128> | AnyNumber | Uint8Array, gasLimit: Compact<u64> | AnyNumber | Uint8Array, storageDepositLimit: Option<Compact<u128>> | null | Uint8Array | Compact<u128> | AnyNumber, codeHash: H256 | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, Compact<u64>, Option<Compact<u128>>, H256, Bytes, Bytes]>;
|
instantiate: AugmentedSubmittable<(value: Compact<u128> | AnyNumber | Uint8Array, gasLimit: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array, storageDepositLimit: Option<Compact<u128>> | null | Uint8Array | Compact<u128> | AnyNumber, codeHash: H256 | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, SpWeightsWeightV2Weight, Option<Compact<u128>>, H256, Bytes, Bytes]>;
|
||||||
|
/**
|
||||||
|
* Instantiates a contract from a previously deployed wasm binary.
|
||||||
|
*
|
||||||
|
* This function is identical to [`Self::instantiate_with_code`] but without the
|
||||||
|
* code deployment step. Instead, the `code_hash` of an on-chain deployed wasm binary
|
||||||
|
* must be supplied.
|
||||||
|
**/
|
||||||
|
instantiateOldWeight: AugmentedSubmittable<(value: Compact<u128> | AnyNumber | Uint8Array, gasLimit: Compact<u64> | AnyNumber | Uint8Array, storageDepositLimit: Option<Compact<u128>> | null | Uint8Array | Compact<u128> | AnyNumber, codeHash: H256 | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, Compact<u64>, Option<Compact<u128>>, H256, Bytes, Bytes]>;
|
||||||
/**
|
/**
|
||||||
* Instantiates a new contract from the supplied `code` optionally transferring
|
* Instantiates a new contract from the supplied `code` optionally transferring
|
||||||
* some balance.
|
* some balance.
|
||||||
@@ -1196,7 +1248,36 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - The `value` is transferred to the new account.
|
* - The `value` is transferred to the new account.
|
||||||
* - The `deploy` function is executed in the context of the newly-created account.
|
* - The `deploy` function is executed in the context of the newly-created account.
|
||||||
**/
|
**/
|
||||||
instantiateWithCode: AugmentedSubmittable<(value: Compact<u128> | AnyNumber | Uint8Array, gasLimit: Compact<u64> | AnyNumber | Uint8Array, storageDepositLimit: Option<Compact<u128>> | null | Uint8Array | Compact<u128> | AnyNumber, code: Bytes | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, Compact<u64>, Option<Compact<u128>>, Bytes, Bytes, Bytes]>;
|
instantiateWithCode: AugmentedSubmittable<(value: Compact<u128> | AnyNumber | Uint8Array, gasLimit: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array, storageDepositLimit: Option<Compact<u128>> | null | Uint8Array | Compact<u128> | AnyNumber, code: Bytes | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, SpWeightsWeightV2Weight, Option<Compact<u128>>, Bytes, Bytes, Bytes]>;
|
||||||
|
/**
|
||||||
|
* Instantiates a new contract from the supplied `code` optionally transferring
|
||||||
|
* some balance.
|
||||||
|
*
|
||||||
|
* This dispatchable has the same effect as calling [`Self::upload_code`] +
|
||||||
|
* [`Self::instantiate`]. Bundling them together provides efficiency gains. Please
|
||||||
|
* also check the documentation of [`Self::upload_code`].
|
||||||
|
*
|
||||||
|
* # Parameters
|
||||||
|
*
|
||||||
|
* * `value`: The balance to transfer from the `origin` to the newly created contract.
|
||||||
|
* * `gas_limit`: The gas limit enforced when executing the constructor.
|
||||||
|
* * `storage_deposit_limit`: The maximum amount of balance that can be charged/reserved
|
||||||
|
* from the caller to pay for the storage consumed.
|
||||||
|
* * `code`: The contract code to deploy in raw bytes.
|
||||||
|
* * `data`: The input data to pass to the contract constructor.
|
||||||
|
* * `salt`: Used for the address derivation. See [`Pallet::contract_address`].
|
||||||
|
*
|
||||||
|
* Instantiation is executed as follows:
|
||||||
|
*
|
||||||
|
* - The supplied `code` is instrumented, deployed, and a `code_hash` is created for that
|
||||||
|
* code.
|
||||||
|
* - If the `code_hash` already exists on the chain the underlying `code` will be shared.
|
||||||
|
* - The destination address is computed based on the sender, code_hash and the salt.
|
||||||
|
* - The smart-contract account is created at the computed address.
|
||||||
|
* - The `value` is transferred to the new account.
|
||||||
|
* - The `deploy` function is executed in the context of the newly-created account.
|
||||||
|
**/
|
||||||
|
instantiateWithCodeOldWeight: AugmentedSubmittable<(value: Compact<u128> | AnyNumber | Uint8Array, gasLimit: Compact<u64> | AnyNumber | Uint8Array, storageDepositLimit: Option<Compact<u128>> | null | Uint8Array | Compact<u128> | AnyNumber, code: Bytes | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, Compact<u64>, Option<Compact<u128>>, Bytes, Bytes, Bytes]>;
|
||||||
/**
|
/**
|
||||||
* Remove the code stored under `code_hash` and refund the deposit to its owner.
|
* Remove the code stored under `code_hash` and refund the deposit to its owner.
|
||||||
*
|
*
|
||||||
@@ -1400,7 +1481,42 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - up to 3 events
|
* - up to 3 events
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
close: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: Compact<u64> | AnyNumber | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, Compact<u64>, Compact<u32>]>;
|
close: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, SpWeightsWeightV2Weight, Compact<u32>]>;
|
||||||
|
/**
|
||||||
|
* Close a vote that is either approved, disapproved or whose voting period has ended.
|
||||||
|
*
|
||||||
|
* May be called by any signed account in order to finish voting and close the proposal.
|
||||||
|
*
|
||||||
|
* If called before the end of the voting period it will only close the vote if it is
|
||||||
|
* has enough votes to be approved or disapproved.
|
||||||
|
*
|
||||||
|
* If called after the end of the voting period abstentions are counted as rejections
|
||||||
|
* unless there is a prime member set and the prime member cast an approval.
|
||||||
|
*
|
||||||
|
* If the close operation completes successfully with disapproval, the transaction fee will
|
||||||
|
* be waived. Otherwise execution of the approved operation will be charged to the caller.
|
||||||
|
*
|
||||||
|
* + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed
|
||||||
|
* proposal.
|
||||||
|
* + `length_bound`: The upper bound for the length of the proposal in storage. Checked via
|
||||||
|
* `storage::read` so it is `size_of::<u32>() == 4` larger than the pure length.
|
||||||
|
*
|
||||||
|
* # <weight>
|
||||||
|
* ## Weight
|
||||||
|
* - `O(B + M + P1 + P2)` where:
|
||||||
|
* - `B` is `proposal` size in bytes (length-fee-bounded)
|
||||||
|
* - `M` is members-count (code- and governance-bounded)
|
||||||
|
* - `P1` is the complexity of `proposal` preimage.
|
||||||
|
* - `P2` is proposal-count (code-bounded)
|
||||||
|
* - DB:
|
||||||
|
* - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)
|
||||||
|
* - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec
|
||||||
|
* `O(P2)`)
|
||||||
|
* - any mutations done while executing `proposal` (`P1`)
|
||||||
|
* - up to 3 events
|
||||||
|
* # </weight>
|
||||||
|
**/
|
||||||
|
closeOldWeight: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: Compact<u64> | AnyNumber | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, Compact<u64>, Compact<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Disapprove a proposal, close, and remove it from the system, regardless of its current
|
* Disapprove a proposal, close, and remove it from the system, regardless of its current
|
||||||
* state.
|
* state.
|
||||||
@@ -2031,6 +2147,49 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
};
|
};
|
||||||
|
fastUnstake: {
|
||||||
|
/**
|
||||||
|
* Control the operation of this pallet.
|
||||||
|
*
|
||||||
|
* Dispatch origin must be signed by the [`Config::ControlOrigin`].
|
||||||
|
**/
|
||||||
|
control: AugmentedSubmittable<(uncheckedErasToCheck: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||||
|
/**
|
||||||
|
* Deregister oneself from the fast-unstake.
|
||||||
|
*
|
||||||
|
* This is useful if one is registered, they are still waiting, and they change their mind.
|
||||||
|
*
|
||||||
|
* Note that the associated stash is still fully unbonded and chilled as a consequence of
|
||||||
|
* calling `register_fast_unstake`. This should probably be followed by a call to
|
||||||
|
* `Staking::rebond`.
|
||||||
|
**/
|
||||||
|
deregister: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||||
|
/**
|
||||||
|
* Register oneself for fast-unstake.
|
||||||
|
*
|
||||||
|
* The dispatch origin of this call must be signed by the controller account, similar to
|
||||||
|
* `staking::unbond`.
|
||||||
|
*
|
||||||
|
* The stash associated with the origin must have no ongoing unlocking chunks. If
|
||||||
|
* successful, this will fully unbond and chill the stash. Then, it will enqueue the stash
|
||||||
|
* to be checked in further blocks.
|
||||||
|
*
|
||||||
|
* If by the time this is called, the stash is actually eligible for fast-unstake, then
|
||||||
|
* they are guaranteed to remain eligible, because the call will chill them as well.
|
||||||
|
*
|
||||||
|
* If the check works, the entire staking data is removed, i.e. the stash is fully
|
||||||
|
* unstaked.
|
||||||
|
*
|
||||||
|
* If the check fails, the stash remains chilled and waiting for being unbonded as in with
|
||||||
|
* the normal staking system, but they lose part of their unbonding chunks due to consuming
|
||||||
|
* the chain's resources.
|
||||||
|
**/
|
||||||
|
registerFastUnstake: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||||
|
/**
|
||||||
|
* Generic tx
|
||||||
|
**/
|
||||||
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
|
};
|
||||||
gilt: {
|
gilt: {
|
||||||
/**
|
/**
|
||||||
* Place a bid for a gilt to be issued.
|
* Place a bid for a gilt to be issued.
|
||||||
@@ -2222,6 +2381,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - `target`: the account whose identity the judgement is upon. This must be an account
|
* - `target`: the account whose identity the judgement is upon. This must be an account
|
||||||
* with a registered identity.
|
* with a registered identity.
|
||||||
* - `judgement`: the judgement of the registrar of index `reg_index` about `target`.
|
* - `judgement`: the judgement of the registrar of index `reg_index` about `target`.
|
||||||
|
* - `identity`: The hash of the [`IdentityInfo`] for that the judgement is provided.
|
||||||
*
|
*
|
||||||
* Emits `JudgementGiven` if successful.
|
* Emits `JudgementGiven` if successful.
|
||||||
*
|
*
|
||||||
@@ -2233,7 +2393,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - One event.
|
* - One event.
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
provideJudgement: AugmentedSubmittable<(regIndex: Compact<u32> | AnyNumber | Uint8Array, target: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, judgement: PalletIdentityJudgement | { Unknown: any } | { FeePaid: any } | { Reasonable: any } | { KnownGood: any } | { OutOfDate: any } | { LowQuality: any } | { Erroneous: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress, PalletIdentityJudgement]>;
|
provideJudgement: AugmentedSubmittable<(regIndex: Compact<u32> | AnyNumber | Uint8Array, target: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, judgement: PalletIdentityJudgement | { Unknown: any } | { FeePaid: any } | { Reasonable: any } | { KnownGood: any } | { OutOfDate: any } | { LowQuality: any } | { Erroneous: any } | string | Uint8Array, identity: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress, PalletIdentityJudgement, H256]>;
|
||||||
/**
|
/**
|
||||||
* Remove the sender as a sub-account.
|
* Remove the sender as a sub-account.
|
||||||
*
|
*
|
||||||
@@ -2610,7 +2770,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - Write: Multisig Storage, [Caller Account]
|
* - Write: Multisig Storage, [Caller Account]
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
approveAsMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option<PalletMultisigTimepoint> | null | Uint8Array | PalletMultisigTimepoint | { height?: any; index?: any } | string, callHash: U8aFixed | string | Uint8Array, maxWeight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, U8aFixed, u64]>;
|
approveAsMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option<PalletMultisigTimepoint> | null | Uint8Array | PalletMultisigTimepoint | { height?: any; index?: any } | string, callHash: U8aFixed | string | Uint8Array, maxWeight: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, U8aFixed, SpWeightsWeightV2Weight]>;
|
||||||
/**
|
/**
|
||||||
* Register approval for a dispatch to be made from a deterministic composite account if
|
* Register approval for a dispatch to be made from a deterministic composite account if
|
||||||
* approved by a total of `threshold - 1` of `other_signatories`.
|
* approved by a total of `threshold - 1` of `other_signatories`.
|
||||||
@@ -2658,7 +2818,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - Plus Call Weight
|
* - Plus Call Weight
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option<PalletMultisigTimepoint> | null | Uint8Array | PalletMultisigTimepoint | { height?: any; index?: any } | string, call: WrapperKeepOpaque<Call> | object | string | Uint8Array, storeCall: bool | boolean | Uint8Array, maxWeight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, WrapperKeepOpaque<Call>, bool, u64]>;
|
asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option<PalletMultisigTimepoint> | null | Uint8Array | PalletMultisigTimepoint | { height?: any; index?: any } | string, call: WrapperKeepOpaque<Call> | object | string | Uint8Array, storeCall: bool | boolean | Uint8Array, maxWeight: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, WrapperKeepOpaque<Call>, bool, SpWeightsWeightV2Weight]>;
|
||||||
/**
|
/**
|
||||||
* Immediately dispatch a multi-signature call using a single approval from the caller.
|
* Immediately dispatch a multi-signature call using a single approval from the caller.
|
||||||
*
|
*
|
||||||
@@ -2935,10 +3095,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - `proxy_type`: The permissions allowed for this proxy account.
|
* - `proxy_type`: The permissions allowed for this proxy account.
|
||||||
* - `delay`: The announcement period required of the initial proxy. Will generally be
|
* - `delay`: The announcement period required of the initial proxy. Will generally be
|
||||||
* zero.
|
* zero.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of the number of proxies the user has (P).
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
addProxy: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: KitchensinkRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, KitchensinkRuntimeProxyType, u32]>;
|
addProxy: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: KitchensinkRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, KitchensinkRuntimeProxyType, u32]>;
|
||||||
/**
|
/**
|
||||||
@@ -2957,12 +3113,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Parameters:
|
* Parameters:
|
||||||
* - `real`: The account that the proxy will make a call on behalf of.
|
* - `real`: The account that the proxy will make a call on behalf of.
|
||||||
* - `call_hash`: The hash of the call to be made by the `real` account.
|
* - `call_hash`: The hash of the call to be made by the `real` account.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of:
|
|
||||||
* - A: the number of announcements made.
|
|
||||||
* - P: the number of proxies the user has.
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
announce: AugmentedSubmittable<(real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, H256]>;
|
announce: AugmentedSubmittable<(real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, H256]>;
|
||||||
/**
|
/**
|
||||||
@@ -2984,36 +3134,27 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* same sender, with the same parameters.
|
* same sender, with the same parameters.
|
||||||
*
|
*
|
||||||
* Fails if there are insufficient funds to pay for deposit.
|
* Fails if there are insufficient funds to pay for deposit.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of the number of proxies the user has (P).
|
|
||||||
* # </weight>
|
|
||||||
* TODO: Might be over counting 1 read
|
|
||||||
**/
|
**/
|
||||||
anonymous: AugmentedSubmittable<(proxyType: KitchensinkRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array, index: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [KitchensinkRuntimeProxyType, u32, u16]>;
|
createPure: AugmentedSubmittable<(proxyType: KitchensinkRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array, index: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [KitchensinkRuntimeProxyType, u32, u16]>;
|
||||||
/**
|
/**
|
||||||
* Removes a previously spawned anonymous proxy.
|
* Removes a previously spawned pure proxy.
|
||||||
*
|
*
|
||||||
* WARNING: **All access to this account will be lost.** Any funds held in it will be
|
* WARNING: **All access to this account will be lost.** Any funds held in it will be
|
||||||
* inaccessible.
|
* inaccessible.
|
||||||
*
|
*
|
||||||
* Requires a `Signed` origin, and the sender account must have been created by a call to
|
* Requires a `Signed` origin, and the sender account must have been created by a call to
|
||||||
* `anonymous` with corresponding parameters.
|
* `pure` with corresponding parameters.
|
||||||
*
|
*
|
||||||
* - `spawner`: The account that originally called `anonymous` to create this account.
|
* - `spawner`: The account that originally called `pure` to create this account.
|
||||||
* - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`.
|
* - `index`: The disambiguation index originally passed to `pure`. Probably `0`.
|
||||||
* - `proxy_type`: The proxy type originally passed to `anonymous`.
|
* - `proxy_type`: The proxy type originally passed to `pure`.
|
||||||
* - `height`: The height of the chain when the call to `anonymous` was processed.
|
* - `height`: The height of the chain when the call to `pure` was processed.
|
||||||
* - `ext_index`: The extrinsic index in which the call to `anonymous` was processed.
|
* - `ext_index`: The extrinsic index in which the call to `pure` was processed.
|
||||||
*
|
*
|
||||||
* Fails with `NoPermission` in case the caller is not a previously created anonymous
|
* Fails with `NoPermission` in case the caller is not a previously created pure
|
||||||
* account whose `anonymous` call has corresponding parameters.
|
* account whose `pure` call has corresponding parameters.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of the number of proxies the user has (P).
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
killAnonymous: AugmentedSubmittable<(spawner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: KitchensinkRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | number | Uint8Array, index: u16 | AnyNumber | Uint8Array, height: Compact<u32> | AnyNumber | Uint8Array, extIndex: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, KitchensinkRuntimeProxyType, u16, Compact<u32>, Compact<u32>]>;
|
killPure: AugmentedSubmittable<(spawner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: KitchensinkRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | number | Uint8Array, index: u16 | AnyNumber | Uint8Array, height: Compact<u32> | AnyNumber | Uint8Array, extIndex: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, KitchensinkRuntimeProxyType, u16, Compact<u32>, Compact<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Dispatch the given `call` from an account that the sender is authorised for through
|
* Dispatch the given `call` from an account that the sender is authorised for through
|
||||||
* `add_proxy`.
|
* `add_proxy`.
|
||||||
@@ -3026,10 +3167,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - `real`: The account that the proxy will make a call on behalf of.
|
* - `real`: The account that the proxy will make a call on behalf of.
|
||||||
* - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.
|
* - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.
|
||||||
* - `call`: The call to be made by the `real` account.
|
* - `call`: The call to be made by the `real` account.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of the number of proxies the user has (P).
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
proxy: AugmentedSubmittable<(real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forceProxyType: Option<KitchensinkRuntimeProxyType> | null | Uint8Array | KitchensinkRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Option<KitchensinkRuntimeProxyType>, Call]>;
|
proxy: AugmentedSubmittable<(real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forceProxyType: Option<KitchensinkRuntimeProxyType> | null | Uint8Array | KitchensinkRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Option<KitchensinkRuntimeProxyType>, Call]>;
|
||||||
/**
|
/**
|
||||||
@@ -3044,12 +3181,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - `real`: The account that the proxy will make a call on behalf of.
|
* - `real`: The account that the proxy will make a call on behalf of.
|
||||||
* - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.
|
* - `force_proxy_type`: Specify the exact proxy type to be used and checked for this call.
|
||||||
* - `call`: The call to be made by the `real` account.
|
* - `call`: The call to be made by the `real` account.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of:
|
|
||||||
* - A: the number of announcements made.
|
|
||||||
* - P: the number of proxies the user has.
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
proxyAnnounced: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forceProxyType: Option<KitchensinkRuntimeProxyType> | null | Uint8Array | KitchensinkRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress, Option<KitchensinkRuntimeProxyType>, Call]>;
|
proxyAnnounced: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forceProxyType: Option<KitchensinkRuntimeProxyType> | null | Uint8Array | KitchensinkRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress, Option<KitchensinkRuntimeProxyType>, Call]>;
|
||||||
/**
|
/**
|
||||||
@@ -3063,12 +3194,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Parameters:
|
* Parameters:
|
||||||
* - `delegate`: The account that previously announced the call.
|
* - `delegate`: The account that previously announced the call.
|
||||||
* - `call_hash`: The hash of the call to be made.
|
* - `call_hash`: The hash of the call to be made.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of:
|
|
||||||
* - A: the number of announcements made.
|
|
||||||
* - P: the number of proxies the user has.
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
rejectAnnouncement: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, H256]>;
|
rejectAnnouncement: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, H256]>;
|
||||||
/**
|
/**
|
||||||
@@ -3082,12 +3207,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Parameters:
|
* Parameters:
|
||||||
* - `real`: The account that the proxy will make a call on behalf of.
|
* - `real`: The account that the proxy will make a call on behalf of.
|
||||||
* - `call_hash`: The hash of the call to be made by the `real` account.
|
* - `call_hash`: The hash of the call to be made by the `real` account.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of:
|
|
||||||
* - A: the number of announcements made.
|
|
||||||
* - P: the number of proxies the user has.
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
removeAnnouncement: AugmentedSubmittable<(real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, H256]>;
|
removeAnnouncement: AugmentedSubmittable<(real: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, H256]>;
|
||||||
/**
|
/**
|
||||||
@@ -3095,12 +3214,8 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
*
|
*
|
||||||
* The dispatch origin for this call must be _Signed_.
|
* The dispatch origin for this call must be _Signed_.
|
||||||
*
|
*
|
||||||
* WARNING: This may be called on accounts created by `anonymous`, however if done, then
|
* WARNING: This may be called on accounts created by `pure`, however if done, then
|
||||||
* the unreserved fees will be inaccessible. **All access to this account will be lost.**
|
* the unreserved fees will be inaccessible. **All access to this account will be lost.**
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of the number of proxies the user has (P).
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
removeProxies: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
removeProxies: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
|
||||||
/**
|
/**
|
||||||
@@ -3111,10 +3226,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* Parameters:
|
* Parameters:
|
||||||
* - `proxy`: The account that the `caller` would like to remove as a proxy.
|
* - `proxy`: The account that the `caller` would like to remove as a proxy.
|
||||||
* - `proxy_type`: The permissions currently enabled for the removed proxy account.
|
* - `proxy_type`: The permissions currently enabled for the removed proxy account.
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* Weight is a function of the number of proxies the user has (P).
|
|
||||||
* # </weight>
|
|
||||||
**/
|
**/
|
||||||
removeProxy: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: KitchensinkRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, KitchensinkRuntimeProxyType, u32]>;
|
removeProxy: AugmentedSubmittable<(delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, proxyType: KitchensinkRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, KitchensinkRuntimeProxyType, u32]>;
|
||||||
/**
|
/**
|
||||||
@@ -4158,31 +4269,6 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
setController: AugmentedSubmittable<(controller: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
|
setController: AugmentedSubmittable<(controller: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
|
||||||
/**
|
|
||||||
* Set `HistoryDepth` value. This function will delete any history information
|
|
||||||
* when `HistoryDepth` is reduced.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* - `new_history_depth`: The new history depth you would like to set.
|
|
||||||
* - `era_items_deleted`: The number of items that will be deleted by this dispatch. This
|
|
||||||
* should report all the storage items that will be deleted by clearing old era history.
|
|
||||||
* Needed to report an accurate weight for the dispatch. Trusted by `Root` to report an
|
|
||||||
* accurate number.
|
|
||||||
*
|
|
||||||
* Origin must be root.
|
|
||||||
*
|
|
||||||
* # <weight>
|
|
||||||
* - E: Number of history depths removed, i.e. 10 -> 7 = 3
|
|
||||||
* - Weight: O(E)
|
|
||||||
* - DB Weight:
|
|
||||||
* - Reads: Current Era, History Depth
|
|
||||||
* - Writes: History Depth
|
|
||||||
* - Clear Prefix Each: Era Stakers, EraStakersClipped, ErasValidatorPrefs
|
|
||||||
* - Writes Each: ErasValidatorReward, ErasRewardPoints, ErasTotalStake,
|
|
||||||
* ErasStartSessionIndex
|
|
||||||
* # </weight>
|
|
||||||
**/
|
|
||||||
setHistoryDepth: AugmentedSubmittable<(newHistoryDepth: Compact<u32> | AnyNumber | Uint8Array, eraItemsDeleted: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
|
|
||||||
/**
|
/**
|
||||||
* Set the validators who cannot be slashed (if any).
|
* Set the validators who cannot be slashed (if any).
|
||||||
*
|
*
|
||||||
@@ -4222,7 +4308,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* * `min_commission`: The minimum amount of commission that each validators must maintain.
|
* * `min_commission`: The minimum amount of commission that each validators must maintain.
|
||||||
* This is checked only upon calling `validate`. Existing validators are not affected.
|
* This is checked only upon calling `validate`. Existing validators are not affected.
|
||||||
*
|
*
|
||||||
* Origin must be Root to call this function.
|
* RuntimeOrigin must be Root to call this function.
|
||||||
*
|
*
|
||||||
* NOTE: Existing nominators and validators will not be affected by this update.
|
* NOTE: Existing nominators and validators will not be affected by this update.
|
||||||
* to kick people under the new limits, `chill_other` should be called.
|
* to kick people under the new limits, `chill_other` should be called.
|
||||||
@@ -4413,7 +4499,7 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - The weight of this call is defined by the caller.
|
* - The weight of this call is defined by the caller.
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
sudoUncheckedWeight: AugmentedSubmittable<(call: Call | IMethod | string | Uint8Array, weight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, u64]>;
|
sudoUncheckedWeight: AugmentedSubmittable<(call: Call | IMethod | string | Uint8Array, weight: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, SpWeightsWeightV2Weight]>;
|
||||||
/**
|
/**
|
||||||
* Generic tx
|
* Generic tx
|
||||||
**/
|
**/
|
||||||
@@ -4522,7 +4608,42 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
* - up to 3 events
|
* - up to 3 events
|
||||||
* # </weight>
|
* # </weight>
|
||||||
**/
|
**/
|
||||||
close: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: Compact<u64> | AnyNumber | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, Compact<u64>, Compact<u32>]>;
|
close: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, SpWeightsWeightV2Weight, Compact<u32>]>;
|
||||||
|
/**
|
||||||
|
* Close a vote that is either approved, disapproved or whose voting period has ended.
|
||||||
|
*
|
||||||
|
* May be called by any signed account in order to finish voting and close the proposal.
|
||||||
|
*
|
||||||
|
* If called before the end of the voting period it will only close the vote if it is
|
||||||
|
* has enough votes to be approved or disapproved.
|
||||||
|
*
|
||||||
|
* If called after the end of the voting period abstentions are counted as rejections
|
||||||
|
* unless there is a prime member set and the prime member cast an approval.
|
||||||
|
*
|
||||||
|
* If the close operation completes successfully with disapproval, the transaction fee will
|
||||||
|
* be waived. Otherwise execution of the approved operation will be charged to the caller.
|
||||||
|
*
|
||||||
|
* + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed
|
||||||
|
* proposal.
|
||||||
|
* + `length_bound`: The upper bound for the length of the proposal in storage. Checked via
|
||||||
|
* `storage::read` so it is `size_of::<u32>() == 4` larger than the pure length.
|
||||||
|
*
|
||||||
|
* # <weight>
|
||||||
|
* ## Weight
|
||||||
|
* - `O(B + M + P1 + P2)` where:
|
||||||
|
* - `B` is `proposal` size in bytes (length-fee-bounded)
|
||||||
|
* - `M` is members-count (code- and governance-bounded)
|
||||||
|
* - `P1` is the complexity of `proposal` preimage.
|
||||||
|
* - `P2` is proposal-count (code-bounded)
|
||||||
|
* - DB:
|
||||||
|
* - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)
|
||||||
|
* - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec
|
||||||
|
* `O(P2)`)
|
||||||
|
* - any mutations done while executing `proposal` (`P1`)
|
||||||
|
* - up to 3 events
|
||||||
|
* # </weight>
|
||||||
|
**/
|
||||||
|
closeOldWeight: AugmentedSubmittable<(proposalHash: H256 | string | Uint8Array, index: Compact<u32> | AnyNumber | Uint8Array, proposalWeightBound: Compact<u64> | AnyNumber | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, Compact<u64>, Compact<u32>]>;
|
||||||
/**
|
/**
|
||||||
* Disapprove a proposal, close, and remove it from the system, regardless of its current
|
* Disapprove a proposal, close, and remove it from the system, regardless of its current
|
||||||
* state.
|
* state.
|
||||||
@@ -4968,12 +5089,15 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
/**
|
/**
|
||||||
* Approve an item to be transferred by a delegated third-party account.
|
* Approve an item to be transferred by a delegated third-party account.
|
||||||
*
|
*
|
||||||
* Origin must be Signed and must be the owner of the `item`.
|
* The origin must conform to `ForceOrigin` or must be `Signed` and the sender must be
|
||||||
|
* either the owner of the `item` or the admin of the collection.
|
||||||
*
|
*
|
||||||
* - `collection`: The collection of the item to be approved for delegated transfer.
|
* - `collection`: The collection of the item to be approved for delegated transfer.
|
||||||
* - `item`: The item of the item to be approved for delegated transfer.
|
* - `item`: The item of the item to be approved for delegated transfer.
|
||||||
* - `delegate`: The account to delegate permission to transfer the item.
|
* - `delegate`: The account to delegate permission to transfer the item.
|
||||||
*
|
*
|
||||||
|
* Important NOTE: The `approved` account gets reset after each transfer.
|
||||||
|
*
|
||||||
* Emits `ApprovedTransfer` on success.
|
* Emits `ApprovedTransfer` on success.
|
||||||
*
|
*
|
||||||
* Weight: `O(1)`
|
* Weight: `O(1)`
|
||||||
@@ -5352,6 +5476,8 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
/**
|
/**
|
||||||
* Move an item from the sender account to another.
|
* Move an item from the sender account to another.
|
||||||
*
|
*
|
||||||
|
* This resets the approved account of the item.
|
||||||
|
*
|
||||||
* Origin must be Signed and the signing account must be either:
|
* Origin must be Signed and the signing account must be either:
|
||||||
* - the Admin of the `collection`;
|
* - the Admin of the `collection`;
|
||||||
* - the Owner of the `item`;
|
* - the Owner of the `item`;
|
||||||
@@ -5582,8 +5708,38 @@ declare module '@polkadot/api-base/types/submittable' {
|
|||||||
**/
|
**/
|
||||||
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
};
|
};
|
||||||
|
voterBagsList: {
|
||||||
|
/**
|
||||||
|
* Move the caller's Id directly in front of `lighter`.
|
||||||
|
*
|
||||||
|
* The dispatch origin for this call must be _Signed_ and can only be called by the Id of
|
||||||
|
* the account going in front of `lighter`.
|
||||||
|
*
|
||||||
|
* Only works if
|
||||||
|
* - both nodes are within the same bag,
|
||||||
|
* - and `origin` has a greater `Score` than `lighter`.
|
||||||
|
**/
|
||||||
|
putInFrontOf: AugmentedSubmittable<(lighter: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
|
||||||
|
/**
|
||||||
|
* Declare that some `dislocated` account has, through rewards or penalties, sufficiently
|
||||||
|
* 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.
|
||||||
|
*
|
||||||
|
* Will always update the stored score of `dislocated` to the correct score, based on
|
||||||
|
* `ScoreProvider`.
|
||||||
|
*
|
||||||
|
* If `dislocated` does not exists, it returns an error.
|
||||||
|
**/
|
||||||
|
rebag: AugmentedSubmittable<(dislocated: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
|
||||||
|
/**
|
||||||
|
* Generic tx
|
||||||
|
**/
|
||||||
|
[key: string]: SubmittableExtrinsicFunction<ApiType>;
|
||||||
|
};
|
||||||
whitelist: {
|
whitelist: {
|
||||||
dispatchWhitelistedCall: AugmentedSubmittable<(callHash: H256 | string | Uint8Array, callWeightWitness: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, u64]>;
|
dispatchWhitelistedCall: AugmentedSubmittable<(callHash: H256 | string | Uint8Array, callWeightWitness: SpWeightsWeightV2Weight | { refTime?: any; proofSize?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, SpWeightsWeightV2Weight]>;
|
||||||
dispatchWhitelistedCallWithPreimage: AugmentedSubmittable<(call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call]>;
|
dispatchWhitelistedCallWithPreimage: AugmentedSubmittable<(call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call]>;
|
||||||
removeWhitelistedCall: AugmentedSubmittable<(callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
|
removeWhitelistedCall: AugmentedSubmittable<(callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
|
||||||
whitelistCall: AugmentedSubmittable<(callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
|
whitelistCall: AugmentedSubmittable<(callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
|
||||||
|
|||||||
@@ -20,13 +20,13 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "9.2.3",
|
"version": "9.5.2",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.9",
|
"@babel/runtime": "^7.19.4",
|
||||||
"@polkadot/rpc-core": "9.2.3",
|
"@polkadot/rpc-core": "9.5.2",
|
||||||
"@polkadot/types": "9.2.3",
|
"@polkadot/types": "9.5.2",
|
||||||
"@polkadot/util": "^10.1.5",
|
"@polkadot/util": "^10.1.11",
|
||||||
"rxjs": "^7.5.6"
|
"rxjs": "^7.5.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '9.2.3' };
|
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '9.5.2' };
|
||||||
|
|||||||
@@ -20,20 +20,20 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "9.2.3",
|
"version": "9.5.2",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.9",
|
"@babel/runtime": "^7.19.4",
|
||||||
"@polkadot/api": "9.2.3",
|
"@polkadot/api": "9.5.2",
|
||||||
"@polkadot/types": "9.2.3",
|
"@polkadot/types": "9.5.2",
|
||||||
"@polkadot/types-codec": "9.2.3",
|
"@polkadot/types-codec": "9.5.2",
|
||||||
"@polkadot/types-create": "9.2.3",
|
"@polkadot/types-create": "9.5.2",
|
||||||
"@polkadot/util": "^10.1.5",
|
"@polkadot/util": "^10.1.11",
|
||||||
"@polkadot/util-crypto": "^10.1.5",
|
"@polkadot/util-crypto": "^10.1.11",
|
||||||
"rxjs": "^7.5.6"
|
"rxjs": "^7.5.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/api-augment": "9.2.3",
|
"@polkadot/api-augment": "9.5.2",
|
||||||
"@polkadot/keyring": "^10.1.5"
|
"@polkadot/keyring": "^10.1.11"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,9 @@ interface JSONAbi {
|
|||||||
},
|
},
|
||||||
V3: {
|
V3: {
|
||||||
spec: SpecDef;
|
spec: SpecDef;
|
||||||
|
},
|
||||||
|
V4: {
|
||||||
|
spec: SpecDef;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,7 +62,7 @@ describe('Abi', (): void => {
|
|||||||
|
|
||||||
it(`initializes from a contract ABI (${abiName})`, (): void => {
|
it(`initializes from a contract ABI (${abiName})`, (): void => {
|
||||||
try {
|
try {
|
||||||
const messageIds = (abi.V3 || abi.V2 || abi.V1 || abi).spec.messages.map(({ label, name }) =>
|
const messageIds = (abi.V4 || abi.V3 || abi.V2 || abi.V1 || abi).spec.messages.map(({ label, name }) =>
|
||||||
label || (
|
label || (
|
||||||
Array.isArray(name)
|
Array.isArray(name)
|
||||||
? name.join('::')
|
? name.join('::')
|
||||||
|
|||||||
@@ -27,12 +27,23 @@ function findMessage <T extends AbiMessage> (list: T[], messageOrId: T | string
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getLatestMeta (registry: Registry, json: Record<string, unknown>): ContractMetadataLatest {
|
function getLatestMeta (registry: Registry, json: Record<string, unknown>): ContractMetadataLatest {
|
||||||
|
// this is for V1, V2, V3
|
||||||
const vx = enumVersions.find((v) => isObject(json[v]));
|
const vx = enumVersions.find((v) => isObject(json[v]));
|
||||||
const metadata = registry.createType('ContractMetadata',
|
|
||||||
|
// this was added in V4
|
||||||
|
const jsonVersion = json.version as string;
|
||||||
|
|
||||||
|
if (!vx && jsonVersion && !enumVersions.find((v) => v === `V${jsonVersion}`)) {
|
||||||
|
throw new Error(`Unable to handle version ${jsonVersion}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const metadata = registry.createType<ContractMetadata>('ContractMetadata',
|
||||||
vx
|
vx
|
||||||
? { [vx]: json[vx] }
|
? { [vx]: json[vx] }
|
||||||
: { V0: json }
|
: jsonVersion
|
||||||
) as unknown as ContractMetadata;
|
? { [`V${jsonVersion}`]: json }
|
||||||
|
: { V0: json }
|
||||||
|
);
|
||||||
const converter = convertVersions.find(([v]) => metadata[`is${v}`]);
|
const converter = convertVersions.find(([v]) => metadata[`is${v}`]);
|
||||||
|
|
||||||
if (!converter) {
|
if (!converter) {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import { v0ToLatest, v1ToLatest, v2ToLatest, v3ToLatest } from '@polkadot/api-contract/Abi/toLatest';
|
|
||||||
import { TypeRegistry } from '@polkadot/types';
|
import { TypeRegistry } from '@polkadot/types';
|
||||||
|
|
||||||
import abis from '../test/contracts';
|
import abis from '../test/contracts';
|
||||||
|
import { v0ToLatest, v1ToLatest, v2ToLatest, v3ToLatest, v4ToLatest } from './toLatest';
|
||||||
|
|
||||||
describe('v0ToLatest', (): void => {
|
describe('v0ToLatest', (): void => {
|
||||||
const registry = new TypeRegistry();
|
const registry = new TypeRegistry();
|
||||||
@@ -120,3 +120,18 @@ describe('v3ToLatest', (): void => {
|
|||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('v4ToLatest', (): void => {
|
||||||
|
const registry = new TypeRegistry();
|
||||||
|
const contract = registry.createType('ContractMetadata', { V4: abis.ink_v4_flipperContract });
|
||||||
|
const latest = v4ToLatest(registry, contract.asV4);
|
||||||
|
|
||||||
|
it('has the correct constructor flags', (): void => {
|
||||||
|
expect(
|
||||||
|
latest.spec.constructors[0].payable.isTrue
|
||||||
|
).toEqual(false);
|
||||||
|
expect(
|
||||||
|
latest.spec.constructors[1].payable.isTrue
|
||||||
|
).toEqual(false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { ContractMetadataLatest, ContractMetadataV3 } from '@polkadot/types/interfaces';
|
import type { ContractMetadataLatest, ContractMetadataV4 } from '@polkadot/types/interfaces';
|
||||||
import type { Registry } from '@polkadot/types/types';
|
import type { Registry } from '@polkadot/types/types';
|
||||||
|
|
||||||
import { v0ToV1 } from './toV1';
|
import { v0ToV1 } from './toV1';
|
||||||
import { v1ToV2 } from './toV2';
|
import { v1ToV2 } from './toV2';
|
||||||
import { v2ToV3 } from './toV3';
|
import { v2ToV3 } from './toV3';
|
||||||
|
import { v3ToV4 } from './toV4';
|
||||||
|
|
||||||
// The versions where an enum is used, aka V0 is missing
|
// The versions where an enum is used, aka V0 is missing
|
||||||
// (Order from newest, i.e. we expect more on newest vs oldest)
|
// (Order from newest, i.e. we expect more on newest vs oldest)
|
||||||
export const enumVersions = <const> ['V3', 'V2', 'V1'];
|
export const enumVersions = <const> ['V4', 'V3', 'V2', 'V1'];
|
||||||
|
|
||||||
type Versions = typeof enumVersions[number] | 'V0';
|
type Versions = typeof enumVersions[number] | 'V0';
|
||||||
|
|
||||||
@@ -22,15 +23,17 @@ function createConverter <I, O> (next: (registry: Registry, input: O) => Contrac
|
|||||||
next(registry, step(registry, input));
|
next(registry, step(registry, input));
|
||||||
}
|
}
|
||||||
|
|
||||||
export function v3ToLatest (registry: Registry, v3: ContractMetadataV3): ContractMetadataLatest {
|
export function v4ToLatest (registry: Registry, v4: ContractMetadataV4): ContractMetadataLatest {
|
||||||
return v3;
|
return v4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const v3ToLatest = createConverter(v4ToLatest, v3ToV4);
|
||||||
export const v2ToLatest = createConverter(v3ToLatest, v2ToV3);
|
export const v2ToLatest = createConverter(v3ToLatest, v2ToV3);
|
||||||
export const v1ToLatest = createConverter(v2ToLatest, v1ToV2);
|
export const v1ToLatest = createConverter(v2ToLatest, v1ToV2);
|
||||||
export const v0ToLatest = createConverter(v1ToLatest, v0ToV1);
|
export const v0ToLatest = createConverter(v1ToLatest, v0ToV1);
|
||||||
|
|
||||||
export const convertVersions: [Versions, Converter][] = [
|
export const convertVersions: [Versions, Converter][] = [
|
||||||
|
['V4', v4ToLatest],
|
||||||
['V3', v3ToLatest],
|
['V3', v3ToLatest],
|
||||||
['V2', v2ToLatest],
|
['V2', v2ToLatest],
|
||||||
['V1', v1ToLatest],
|
['V1', v1ToLatest],
|
||||||
|
|||||||
@@ -21,6 +21,10 @@ function v0ToV1Names (all: Named[]): unknown[] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function v0ToV1 (registry: Registry, v0: ContractMetadataV0): ContractMetadataV1 {
|
export function v0ToV1 (registry: Registry, v0: ContractMetadataV0): ContractMetadataV1 {
|
||||||
|
if (!v0.metadataVersion.length) {
|
||||||
|
throw new Error('Invalid format for V0 (detected) contract metadata');
|
||||||
|
}
|
||||||
|
|
||||||
return registry.createType('ContractMetadataV1', objectSpread({}, v0, {
|
return registry.createType('ContractMetadataV1', objectSpread({}, v0, {
|
||||||
spec: objectSpread({}, v0.spec, {
|
spec: objectSpread({}, v0.spec, {
|
||||||
constructors: v0ToV1Names(v0.spec.constructors),
|
constructors: v0ToV1Names(v0.spec.constructors),
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import type { ContractMetadataV3, ContractMetadataV4 } from '@polkadot/types/interfaces';
|
||||||
|
import type { Registry } from '@polkadot/types/types';
|
||||||
|
|
||||||
|
export function v3ToV4 (registry: Registry, v3: ContractMetadataV3): ContractMetadataV4 {
|
||||||
|
return v3;
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
|
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
|
||||||
import type { Registry } from '@polkadot/types/types';
|
import type { INumber, Registry } from '@polkadot/types/types';
|
||||||
|
|
||||||
import { ApiBase } from '@polkadot/api/base';
|
import { ApiBase } from '@polkadot/api/base';
|
||||||
import { isFunction } from '@polkadot/util';
|
import { isFunction } from '@polkadot/util';
|
||||||
@@ -16,14 +16,9 @@ export abstract class Base<ApiType extends ApiTypes> {
|
|||||||
|
|
||||||
protected readonly _decorateMethod: DecorateMethod<ApiType>;
|
protected readonly _decorateMethod: DecorateMethod<ApiType>;
|
||||||
|
|
||||||
|
protected readonly _isOldWeight: boolean;
|
||||||
|
|
||||||
constructor (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, decorateMethod: DecorateMethod<ApiType>) {
|
constructor (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, decorateMethod: DecorateMethod<ApiType>) {
|
||||||
this.abi = abi instanceof Abi
|
|
||||||
? abi
|
|
||||||
: new Abi(abi, api.registry.getChainProperties());
|
|
||||||
this.api = api;
|
|
||||||
|
|
||||||
this._decorateMethod = decorateMethod;
|
|
||||||
|
|
||||||
if (!api || !api.isConnected || !api.tx) {
|
if (!api || !api.isConnected || !api.tx) {
|
||||||
throw new Error('Your API has not been initialized correctly and is not connected to a chain');
|
throw new Error('Your API has not been initialized correctly and is not connected to a chain');
|
||||||
} else if (!api.tx.contracts || !isFunction(api.tx.contracts.instantiateWithCode) || api.tx.contracts.instantiateWithCode.meta.args.length !== 6) {
|
} else if (!api.tx.contracts || !isFunction(api.tx.contracts.instantiateWithCode) || api.tx.contracts.instantiateWithCode.meta.args.length !== 6) {
|
||||||
@@ -31,6 +26,13 @@ export abstract class Base<ApiType extends ApiTypes> {
|
|||||||
} else if (!api.call.contractsApi || !isFunction(api.call.contractsApi.call)) {
|
} else if (!api.call.contractsApi || !isFunction(api.call.contractsApi.call)) {
|
||||||
throw new Error('Your runtime does not expose the api.call.contractsApi.call runtime interfaces');
|
throw new Error('Your runtime does not expose the api.call.contractsApi.call runtime interfaces');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.abi = abi instanceof Abi
|
||||||
|
? abi
|
||||||
|
: new Abi(abi, api.registry.getChainProperties());
|
||||||
|
this.api = api;
|
||||||
|
this._decorateMethod = decorateMethod;
|
||||||
|
this._isOldWeight = isFunction(api.registry.createType<INumber>('Weight').toBn);
|
||||||
}
|
}
|
||||||
|
|
||||||
public get registry (): Registry {
|
public get registry (): Registry {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
|
|||||||
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
|
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
|
||||||
import type { AccountId, EventRecord, Hash } from '@polkadot/types/interfaces';
|
import type { AccountId, EventRecord, Hash } from '@polkadot/types/interfaces';
|
||||||
import type { ISubmittableResult } from '@polkadot/types/types';
|
import type { ISubmittableResult } from '@polkadot/types/types';
|
||||||
import type { AbiConstructor, BlueprintOptions } from '../types';
|
import type { AbiConstructor, BlueprintOptions, WeightAll } from '../types';
|
||||||
import type { MapConstructorExec } from './types';
|
import type { MapConstructorExec } from './types';
|
||||||
|
|
||||||
import { SubmittableResult } from '@polkadot/api';
|
import { SubmittableResult } from '@polkadot/api';
|
||||||
@@ -16,7 +16,7 @@ import { Abi } from '../Abi';
|
|||||||
import { applyOnEvent } from '../util';
|
import { applyOnEvent } from '../util';
|
||||||
import { Base } from './Base';
|
import { Base } from './Base';
|
||||||
import { Contract } from './Contract';
|
import { Contract } from './Contract';
|
||||||
import { createBluePrintTx, encodeSalt } from './util';
|
import { convertWeight, createBluePrintTx, encodeSalt } from './util';
|
||||||
|
|
||||||
export interface BlueprintConstructor<ApiType extends ApiTypes> {
|
export interface BlueprintConstructor<ApiType extends ApiTypes> {
|
||||||
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash | Uint8Array): Blueprint<ApiType>;
|
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash | Uint8Array): Blueprint<ApiType>;
|
||||||
@@ -57,16 +57,21 @@ export class Blueprint<ApiType extends ApiTypes> extends Base<ApiType> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#deploy = (constructorOrId: AbiConstructor | string | number, { gasLimit = BN_ZERO, salt, storageDepositLimit = null, value = BN_ZERO }: BlueprintOptions, params: unknown[]): SubmittableExtrinsic<ApiType, BlueprintSubmittableResult<ApiType>> => {
|
#deploy = (constructorOrId: AbiConstructor | string | number, { gasLimit = BN_ZERO, salt, storageDepositLimit = null, value = BN_ZERO }: BlueprintOptions, params: unknown[]): SubmittableExtrinsic<ApiType, BlueprintSubmittableResult<ApiType>> => {
|
||||||
const encParams = this.abi.findConstructor(constructorOrId).toU8a(params);
|
return this.api.tx.contracts.instantiate(
|
||||||
const encSalt = encodeSalt(salt);
|
value,
|
||||||
|
this._isOldWeight
|
||||||
return this.api.tx.contracts
|
// jiggle v1 weights, metadata points to latest
|
||||||
.instantiate(value, gasLimit, storageDepositLimit, this.codeHash, encParams, encSalt)
|
? convertWeight(gasLimit).v1Weight as unknown as WeightAll['v2Weight']
|
||||||
.withResultTransform((result: ISubmittableResult) =>
|
: convertWeight(gasLimit).v2Weight,
|
||||||
new BlueprintSubmittableResult(result, applyOnEvent(result, ['Instantiated'], ([record]: EventRecord[]) =>
|
storageDepositLimit,
|
||||||
new Contract<ApiType>(this.api, this.abi, record.event.data[1] as AccountId, this._decorateMethod)
|
this.codeHash,
|
||||||
))
|
this.abi.findConstructor(constructorOrId).toU8a(params),
|
||||||
);
|
encodeSalt(salt)
|
||||||
|
).withResultTransform((result: ISubmittableResult) =>
|
||||||
|
new BlueprintSubmittableResult(result, applyOnEvent(result, ['Instantiated'], ([record]: EventRecord[]) =>
|
||||||
|
new Contract<ApiType>(this.api, this.abi, record.event.data[1] as AccountId, this._decorateMethod)
|
||||||
|
))
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
|
|||||||
import type { AccountId, EventRecord } from '@polkadot/types/interfaces';
|
import type { AccountId, EventRecord } from '@polkadot/types/interfaces';
|
||||||
import type { ISubmittableResult } from '@polkadot/types/types';
|
import type { ISubmittableResult } from '@polkadot/types/types';
|
||||||
import type { Codec } from '@polkadot/types-codec/types';
|
import type { Codec } from '@polkadot/types-codec/types';
|
||||||
import type { AbiConstructor, BlueprintOptions } from '../types';
|
import type { AbiConstructor, BlueprintOptions, WeightAll } from '../types';
|
||||||
import type { MapConstructorExec } from './types';
|
import type { MapConstructorExec } from './types';
|
||||||
|
|
||||||
import { SubmittableResult } from '@polkadot/api';
|
import { SubmittableResult } from '@polkadot/api';
|
||||||
@@ -18,7 +18,7 @@ import { applyOnEvent } from '../util';
|
|||||||
import { Base } from './Base';
|
import { Base } from './Base';
|
||||||
import { Blueprint } from './Blueprint';
|
import { Blueprint } from './Blueprint';
|
||||||
import { Contract } from './Contract';
|
import { Contract } from './Contract';
|
||||||
import { createBluePrintTx, encodeSalt } from './util';
|
import { convertWeight, createBluePrintTx, encodeSalt } from './util';
|
||||||
|
|
||||||
export interface CodeConstructor<ApiType extends ApiTypes> {
|
export interface CodeConstructor<ApiType extends ApiTypes> {
|
||||||
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined): Code<ApiType>;
|
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined): Code<ApiType>;
|
||||||
@@ -64,23 +64,27 @@ export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#instantiate = (constructorOrId: AbiConstructor | string | number, { gasLimit = BN_ZERO, salt, storageDepositLimit = null, value = BN_ZERO }: BlueprintOptions, params: unknown[]): SubmittableExtrinsic<ApiType, CodeSubmittableResult<ApiType>> => {
|
#instantiate = (constructorOrId: AbiConstructor | string | number, { gasLimit = BN_ZERO, salt, storageDepositLimit = null, value = BN_ZERO }: BlueprintOptions, params: unknown[]): SubmittableExtrinsic<ApiType, CodeSubmittableResult<ApiType>> => {
|
||||||
const encCode = compactAddLength(this.code);
|
return this.api.tx.contracts.instantiateWithCode(
|
||||||
const encParams = this.abi.findConstructor(constructorOrId).toU8a(params);
|
value,
|
||||||
const encSalt = encodeSalt(salt);
|
this._isOldWeight
|
||||||
|
// jiggle v1 weights, metadata points to latest
|
||||||
return this.api.tx.contracts
|
? convertWeight(gasLimit).v1Weight as unknown as WeightAll['v2Weight']
|
||||||
.instantiateWithCode(value, gasLimit, storageDepositLimit, encCode, encParams, encSalt)
|
: convertWeight(gasLimit).v2Weight,
|
||||||
.withResultTransform((result: ISubmittableResult) =>
|
storageDepositLimit,
|
||||||
new CodeSubmittableResult(result, ...(applyOnEvent(result, ['CodeStored', 'Instantiated'], (records: EventRecord[]) =>
|
compactAddLength(this.code),
|
||||||
records.reduce<[Blueprint<ApiType>?, Contract<ApiType>?]>(([blueprint, contract], { event }) =>
|
this.abi.findConstructor(constructorOrId).toU8a(params),
|
||||||
this.api.events.contracts.Instantiated.is(event)
|
encodeSalt(salt)
|
||||||
? [blueprint, new Contract<ApiType>(this.api, this.abi, (event as unknown as { data: [Codec, AccountId] }).data[1], this._decorateMethod)]
|
).withResultTransform((result: ISubmittableResult) =>
|
||||||
: this.api.events.contracts.CodeStored.is(event)
|
new CodeSubmittableResult(result, ...(applyOnEvent(result, ['CodeStored', 'Instantiated'], (records: EventRecord[]) =>
|
||||||
? [new Blueprint<ApiType>(this.api, this.abi, (event as unknown as { data: [AccountId] }).data[0], this._decorateMethod), contract]
|
records.reduce<[Blueprint<ApiType>?, Contract<ApiType>?]>(([blueprint, contract], { event }) =>
|
||||||
: [blueprint, contract],
|
this.api.events.contracts.Instantiated.is(event)
|
||||||
[])
|
? [blueprint, new Contract<ApiType>(this.api, this.abi, (event as unknown as { data: [Codec, AccountId] }).data[1], this._decorateMethod)]
|
||||||
) || []))
|
: this.api.events.contracts.CodeStored.is(event)
|
||||||
);
|
? [new Blueprint<ApiType>(this.api, this.abi, (event as unknown as { data: [AccountId] }).data[0], this._decorateMethod), contract]
|
||||||
|
: [blueprint, contract],
|
||||||
|
[])
|
||||||
|
) || []))
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,21 +4,21 @@
|
|||||||
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
|
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
|
||||||
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
|
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
|
||||||
import type { Bytes } from '@polkadot/types';
|
import type { Bytes } from '@polkadot/types';
|
||||||
import type { AccountId, ContractExecResult, EventRecord, Weight } from '@polkadot/types/interfaces';
|
import type { AccountId, ContractExecResult, EventRecord, Weight, WeightV2 } from '@polkadot/types/interfaces';
|
||||||
import type { ISubmittableResult } from '@polkadot/types/types';
|
import type { ISubmittableResult } from '@polkadot/types/types';
|
||||||
import type { AbiMessage, ContractCallOutcome, ContractOptions, DecodedEvent } from '../types';
|
import type { AbiMessage, ContractCallOutcome, ContractOptions, DecodedEvent, WeightAll } from '../types';
|
||||||
import type { ContractCallResult, ContractCallSend, ContractQuery, ContractTx, MapMessageQuery, MapMessageTx } from './types';
|
import type { ContractCallResult, ContractCallSend, ContractQuery, ContractTx, MapMessageQuery, MapMessageTx } from './types';
|
||||||
|
|
||||||
import { map } from 'rxjs';
|
import { map } from 'rxjs';
|
||||||
|
|
||||||
import { SubmittableResult } from '@polkadot/api';
|
import { SubmittableResult } from '@polkadot/api';
|
||||||
import { ApiBase } from '@polkadot/api/base';
|
import { ApiBase } from '@polkadot/api/base';
|
||||||
import { BN, BN_HUNDRED, BN_ONE, BN_ZERO, bnToBn, isUndefined, logger } from '@polkadot/util';
|
import { BN, BN_HUNDRED, BN_ONE, BN_ZERO, isUndefined, logger } from '@polkadot/util';
|
||||||
|
|
||||||
import { Abi } from '../Abi';
|
import { Abi } from '../Abi';
|
||||||
import { applyOnEvent } from '../util';
|
import { applyOnEvent } from '../util';
|
||||||
import { Base } from './Base';
|
import { Base } from './Base';
|
||||||
import { withMeta } from './util';
|
import { convertWeight, withMeta } from './util';
|
||||||
|
|
||||||
export interface ContractConstructor<ApiType extends ApiTypes> {
|
export interface ContractConstructor<ApiType extends ApiTypes> {
|
||||||
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, address: string | AccountId): Contract<ApiType>;
|
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, address: string | AccountId): Contract<ApiType>;
|
||||||
@@ -85,41 +85,50 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
|
|||||||
return this.#tx;
|
return this.#tx;
|
||||||
}
|
}
|
||||||
|
|
||||||
#getGas = (_gasLimit: bigint | BN | string | number, isCall = false): BN => {
|
#getGas = (_gasLimit: bigint | BN | string | number | WeightV2, isCall = false): WeightAll => {
|
||||||
const gasLimit = bnToBn(_gasLimit);
|
const weight = convertWeight(_gasLimit);
|
||||||
|
|
||||||
return gasLimit.lte(BN_ZERO)
|
if (weight.v1Weight.gt(BN_ZERO)) {
|
||||||
? isCall
|
return weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
return convertWeight(
|
||||||
|
isCall
|
||||||
? MAX_CALL_GAS
|
? MAX_CALL_GAS
|
||||||
: (this.api.consts.system.blockWeights
|
: convertWeight(
|
||||||
? (this.api.consts.system.blockWeights as unknown as { maxBlock: Weight }).maxBlock
|
this.api.consts.system.blockWeights
|
||||||
: this.api.consts.system.maximumBlockWeight as Weight
|
? (this.api.consts.system.blockWeights as unknown as { maxBlock: WeightV2 }).maxBlock
|
||||||
).muln(64).div(BN_HUNDRED)
|
: this.api.consts.system.maximumBlockWeight as Weight
|
||||||
: gasLimit;
|
).v1Weight.muln(64).div(BN_HUNDRED)
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
#exec = (messageOrId: AbiMessage | string | number, { gasLimit = BN_ZERO, storageDepositLimit = null, value = BN_ZERO }: ContractOptions, params: unknown[]): SubmittableExtrinsic<ApiType> => {
|
#exec = (messageOrId: AbiMessage | string | number, { gasLimit = BN_ZERO, storageDepositLimit = null, value = BN_ZERO }: ContractOptions, params: unknown[]): SubmittableExtrinsic<ApiType> => {
|
||||||
const gas = this.#getGas(gasLimit);
|
return this.api.tx.contracts.call(
|
||||||
const encParams = this.abi.findMessage(messageOrId).toU8a(params);
|
this.address,
|
||||||
|
value,
|
||||||
|
this._isOldWeight
|
||||||
|
// jiggle v1 weights, metadata points to latest
|
||||||
|
? convertWeight(gasLimit).v1Weight as unknown as WeightAll['v2Weight']
|
||||||
|
: convertWeight(gasLimit).v2Weight,
|
||||||
|
storageDepositLimit,
|
||||||
|
this.abi.findMessage(messageOrId).toU8a(params)
|
||||||
|
).withResultTransform((result: ISubmittableResult) =>
|
||||||
|
// ContractEmitted is the current generation, ContractExecution is the previous generation
|
||||||
|
new ContractSubmittableResult(result, applyOnEvent(result, ['ContractEmitted', 'ContractExecution'], (records: EventRecord[]) =>
|
||||||
|
records
|
||||||
|
.map(({ event: { data: [, data] } }): DecodedEvent | null => {
|
||||||
|
try {
|
||||||
|
return this.abi.decodeEvent(data as Bytes);
|
||||||
|
} catch (error) {
|
||||||
|
l.error(`Unable to decode contract event: ${(error as Error).message}`);
|
||||||
|
|
||||||
return this.api.tx.contracts
|
return null;
|
||||||
.call(this.address, value, gas, storageDepositLimit, encParams)
|
}
|
||||||
.withResultTransform((result: ISubmittableResult) =>
|
})
|
||||||
// ContractEmitted is the current generation, ContractExecution is the previous generation
|
.filter((decoded): decoded is DecodedEvent => !!decoded)
|
||||||
new ContractSubmittableResult(result, applyOnEvent(result, ['ContractEmitted', 'ContractExecution'], (records: EventRecord[]) =>
|
))
|
||||||
records
|
);
|
||||||
.map(({ event: { data: [, data] } }): DecodedEvent | null => {
|
|
||||||
try {
|
|
||||||
return this.abi.decodeEvent(data as Bytes);
|
|
||||||
} catch (error) {
|
|
||||||
l.error(`Unable to decode contract event: ${(error as Error).message}`);
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.filter((decoded): decoded is DecodedEvent => !!decoded)
|
|
||||||
))
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#read = (messageOrId: AbiMessage | string | number, { gasLimit = BN_ZERO, storageDepositLimit = null, value = BN_ZERO }: ContractOptions, params: unknown[]): ContractCallSend<ApiType> => {
|
#read = (messageOrId: AbiMessage | string | number, { gasLimit = BN_ZERO, storageDepositLimit = null, value = BN_ZERO }: ContractOptions, params: unknown[]): ContractCallSend<ApiType> => {
|
||||||
@@ -128,22 +137,28 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
|
|||||||
return {
|
return {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||||
send: this._decorateMethod((origin: string | AccountId | Uint8Array) =>
|
send: this._decorateMethod((origin: string | AccountId | Uint8Array) =>
|
||||||
this.api.rx.call.contractsApi
|
this.api.rx.call.contractsApi.call<ContractExecResult>(
|
||||||
.call<ContractExecResult>(origin, this.address, value, this.#getGas(gasLimit, true), storageDepositLimit, message.toU8a(params))
|
origin,
|
||||||
.pipe(
|
this.address,
|
||||||
map(({ debugMessage, gasConsumed, gasRequired, result, storageDeposit }): ContractCallOutcome => ({
|
value,
|
||||||
debugMessage,
|
// the runtime interface still used u64 inputs
|
||||||
gasConsumed,
|
this.#getGas(gasLimit, true).v1Weight,
|
||||||
gasRequired: gasRequired && !gasRequired.isZero()
|
storageDepositLimit,
|
||||||
? gasRequired
|
message.toU8a(params)
|
||||||
: gasConsumed,
|
).pipe(
|
||||||
output: result.isOk && message.returnType
|
map(({ debugMessage, gasConsumed, gasRequired, result, storageDeposit }): ContractCallOutcome => ({
|
||||||
? this.abi.registry.createTypeUnsafe(message.returnType.lookupName || message.returnType.type, [result.asOk.data.toU8a(true)], { isPedantic: true })
|
debugMessage,
|
||||||
: null,
|
gasConsumed,
|
||||||
result,
|
gasRequired: gasRequired && !gasRequired.isZero()
|
||||||
storageDeposit
|
? gasRequired
|
||||||
}))
|
: gasConsumed,
|
||||||
)
|
output: result.isOk && message.returnType
|
||||||
|
? this.abi.registry.createTypeUnsafe(message.returnType.lookupName || message.returnType.type, [result.asOk.data.toU8a(true)], { isPedantic: true })
|
||||||
|
: null,
|
||||||
|
result,
|
||||||
|
storageDeposit
|
||||||
|
}))
|
||||||
|
)
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,11 +4,13 @@
|
|||||||
import type { SubmittableResult } from '@polkadot/api';
|
import type { SubmittableResult } from '@polkadot/api';
|
||||||
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
|
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
|
||||||
import type { ApiTypes } from '@polkadot/api/types';
|
import type { ApiTypes } from '@polkadot/api/types';
|
||||||
import type { AbiConstructor, AbiMessage, BlueprintOptions } from '../types';
|
import type { WeightV1, WeightV2 } from '@polkadot/types/interfaces';
|
||||||
|
import type { BN } from '@polkadot/util';
|
||||||
|
import type { AbiConstructor, AbiMessage, BlueprintOptions, WeightAll } from '../types';
|
||||||
import type { BlueprintDeploy, ContractGeneric } from './types';
|
import type { BlueprintDeploy, ContractGeneric } from './types';
|
||||||
|
|
||||||
import { Bytes } from '@polkadot/types';
|
import { Bytes } from '@polkadot/types';
|
||||||
import { compactAddLength, u8aToU8a } from '@polkadot/util';
|
import { bnToBn, compactAddLength, u8aToU8a } from '@polkadot/util';
|
||||||
import { randomAsU8a } from '@polkadot/util-crypto';
|
import { randomAsU8a } from '@polkadot/util-crypto';
|
||||||
|
|
||||||
export const EMPTY_SALT = new Uint8Array();
|
export const EMPTY_SALT = new Uint8Array();
|
||||||
@@ -37,3 +39,14 @@ export function encodeSalt (salt: Uint8Array | string | null = randomAsU8a()): U
|
|||||||
? compactAddLength(u8aToU8a(salt))
|
? compactAddLength(u8aToU8a(salt))
|
||||||
: EMPTY_SALT;
|
: EMPTY_SALT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function convertWeight (orig: WeightV1 | WeightV2 | bigint | string | number | BN): WeightAll {
|
||||||
|
const refTime = (orig as WeightV2).proofSize
|
||||||
|
? (orig as WeightV2).refTime.toBn()
|
||||||
|
: bnToBn(orig as BN);
|
||||||
|
|
||||||
|
return {
|
||||||
|
v1Weight: refTime,
|
||||||
|
v2Weight: { refTime }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '9.2.3' };
|
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '9.5.2' };
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"info": "Plain",
|
||||||
|
"lookupIndex": 0,
|
||||||
|
"type": "bool",
|
||||||
|
"docs": [],
|
||||||
|
"namespace": ""
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"info": "Plain",
|
||||||
|
"lookupIndex": 0,
|
||||||
|
"type": "bool",
|
||||||
|
"docs": [],
|
||||||
|
"namespace": ""
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -6,5 +6,6 @@ import * as v0 from './v0';
|
|||||||
import * as v1 from './v1';
|
import * as v1 from './v1';
|
||||||
import * as v2 from './v2';
|
import * as v2 from './v2';
|
||||||
import * as v3 from './v3';
|
import * as v3 from './v3';
|
||||||
|
import * as v4 from './v4';
|
||||||
|
|
||||||
export default createVersionedExport({ v0, v1, v2, v3 });
|
export default createVersionedExport({ v0, v1, v2, v3, v4 });
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,103 @@
|
|||||||
|
{
|
||||||
|
"source": {
|
||||||
|
"hash": "0xf051c631190ac47f82e280ba763df932210f6e2447978e24cbe0dcc6d6903c7a",
|
||||||
|
"language": "ink! 4.0.0-alpha.1",
|
||||||
|
"compiler": "rustc 1.63.0"
|
||||||
|
},
|
||||||
|
"contract": {
|
||||||
|
"name": "flipper",
|
||||||
|
"version": "4.0.0-alpha.1",
|
||||||
|
"authors": [
|
||||||
|
"Parity Technologies <admin@parity.io>"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"spec": {
|
||||||
|
"constructors": [
|
||||||
|
{
|
||||||
|
"args": [
|
||||||
|
{
|
||||||
|
"label": "init_value",
|
||||||
|
"type": {
|
||||||
|
"displayName": [
|
||||||
|
"bool"
|
||||||
|
],
|
||||||
|
"type": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"docs": [
|
||||||
|
"Creates a new flipper smart contract initialized with the given value."
|
||||||
|
],
|
||||||
|
"label": "new",
|
||||||
|
"payable": false,
|
||||||
|
"selector": "0x9bae9d5e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"args": [],
|
||||||
|
"docs": [
|
||||||
|
"Creates a new flipper smart contract initialized to `false`."
|
||||||
|
],
|
||||||
|
"label": "default",
|
||||||
|
"payable": false,
|
||||||
|
"selector": "0xed4b9d1b"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"docs": [],
|
||||||
|
"events": [],
|
||||||
|
"messages": [
|
||||||
|
{
|
||||||
|
"args": [],
|
||||||
|
"docs": [
|
||||||
|
" Flips the current value of the Flipper's boolean."
|
||||||
|
],
|
||||||
|
"label": "flip",
|
||||||
|
"mutates": true,
|
||||||
|
"payable": false,
|
||||||
|
"returnType": null,
|
||||||
|
"selector": "0x633aa551"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"args": [],
|
||||||
|
"docs": [
|
||||||
|
" Returns the current value of the Flipper's boolean."
|
||||||
|
],
|
||||||
|
"label": "get",
|
||||||
|
"mutates": false,
|
||||||
|
"payable": false,
|
||||||
|
"returnType": {
|
||||||
|
"displayName": [
|
||||||
|
"bool"
|
||||||
|
],
|
||||||
|
"type": 0
|
||||||
|
},
|
||||||
|
"selector": "0x2f865bd9"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"storage": {
|
||||||
|
"struct": {
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"layout": {
|
||||||
|
"cell": {
|
||||||
|
"key": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||||
|
"ty": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "value"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"types": [
|
||||||
|
{
|
||||||
|
"id": 0,
|
||||||
|
"type": {
|
||||||
|
"def": {
|
||||||
|
"primitive": "bool"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": "4"
|
||||||
|
}
|
||||||
Binary file not shown.
@@ -0,0 +1,5 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
export { default as flipperContract } from './flipper.contract.json' assert { type: 'json' };
|
||||||
|
export { default as flipperMetadata } from './flipper.json' assert { type: 'json' };
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
import type { ApiBase } from '@polkadot/api/base';
|
import type { ApiBase } from '@polkadot/api/base';
|
||||||
import type { ApiTypes } from '@polkadot/api/types';
|
import type { ApiTypes } from '@polkadot/api/types';
|
||||||
import type { Text, u64 } from '@polkadot/types';
|
import type { Text, u64 } from '@polkadot/types';
|
||||||
import type { ContractExecResultResult, ContractSelector, StorageDeposit } from '@polkadot/types/interfaces';
|
import type { ContractExecResultResult, ContractSelector, StorageDeposit, WeightV2 } from '@polkadot/types/interfaces';
|
||||||
import type { Codec, TypeDef } from '@polkadot/types/types';
|
import type { Codec, TypeDef } from '@polkadot/types/types';
|
||||||
import type { BN } from '@polkadot/util';
|
import type { BN } from '@polkadot/util';
|
||||||
import type { Abi } from '.';
|
import type { Abi } from '.';
|
||||||
@@ -73,7 +73,7 @@ export interface DecodedMessage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface ContractOptions {
|
export interface ContractOptions {
|
||||||
gasLimit?: bigint | string | number | BN;
|
gasLimit?: bigint | string | number | BN | WeightV2;
|
||||||
storageDepositLimit?: bigint | string | number | BN | null;
|
storageDepositLimit?: bigint | string | number | BN | null;
|
||||||
value?: bigint | BN | string | number;
|
value?: bigint | BN | string | number;
|
||||||
}
|
}
|
||||||
@@ -81,3 +81,10 @@ export interface ContractOptions {
|
|||||||
export interface BlueprintOptions extends ContractOptions {
|
export interface BlueprintOptions extends ContractOptions {
|
||||||
salt?: Uint8Array | string | null;
|
salt?: Uint8Array | string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface WeightAll {
|
||||||
|
v1Weight: BN;
|
||||||
|
v2Weight: {
|
||||||
|
refTime: BN;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|||||||
@@ -20,25 +20,25 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "9.2.3",
|
"version": "9.5.2",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.9",
|
"@babel/runtime": "^7.19.4",
|
||||||
"@polkadot/api": "9.2.3",
|
"@polkadot/api": "9.5.2",
|
||||||
"@polkadot/api-augment": "9.2.3",
|
"@polkadot/api-augment": "9.5.2",
|
||||||
"@polkadot/api-base": "9.2.3",
|
"@polkadot/api-base": "9.5.2",
|
||||||
"@polkadot/rpc-core": "9.2.3",
|
"@polkadot/rpc-core": "9.5.2",
|
||||||
"@polkadot/types": "9.2.3",
|
"@polkadot/types": "9.5.2",
|
||||||
"@polkadot/types-codec": "9.2.3",
|
"@polkadot/types-codec": "9.5.2",
|
||||||
"@polkadot/util": "^10.1.5",
|
"@polkadot/util": "^10.1.11",
|
||||||
"@polkadot/util-crypto": "^10.1.5",
|
"@polkadot/util-crypto": "^10.1.11",
|
||||||
"rxjs": "^7.5.6"
|
"rxjs": "^7.5.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/api": "9.2.3",
|
"@polkadot/api": "9.5.2",
|
||||||
"@polkadot/api-augment": "9.2.3",
|
"@polkadot/api-augment": "9.5.2",
|
||||||
"@polkadot/rpc-augment": "9.2.3",
|
"@polkadot/rpc-augment": "9.5.2",
|
||||||
"@polkadot/rpc-provider": "9.2.3",
|
"@polkadot/rpc-provider": "9.5.2",
|
||||||
"@polkadot/types-support": "9.2.3"
|
"@polkadot/types-support": "9.5.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import { map, of, switchMap } from 'rxjs';
|
|||||||
import { BN_ZERO, bnToBn, objectSpread } from '@polkadot/util';
|
import { BN_ZERO, bnToBn, objectSpread } from '@polkadot/util';
|
||||||
|
|
||||||
import { memo } from '../util';
|
import { memo } from '../util';
|
||||||
|
import { getQueryInterface } from './util';
|
||||||
|
|
||||||
function orderBags (ids: BN[], bags: Option<PalletBagsListListBag>[]): Bag[] {
|
function orderBags (ids: BN[], bags: Option<PalletBagsListListBag>[]): Bag[] {
|
||||||
const sorted = ids
|
const sorted = ids
|
||||||
@@ -36,11 +37,13 @@ function orderBags (ids: BN[], bags: Option<PalletBagsListListBag>[]): Bag[] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function _getIds (instanceId: string, api: DeriveApi): (ids: (BN | number)[]) => Observable<Bag[]> {
|
export function _getIds (instanceId: string, api: DeriveApi): (ids: (BN | number)[]) => Observable<Bag[]> {
|
||||||
|
const query = getQueryInterface(api);
|
||||||
|
|
||||||
return memo(instanceId, (_ids: (BN | number)[]): Observable<Bag[]> => {
|
return memo(instanceId, (_ids: (BN | number)[]): Observable<Bag[]> => {
|
||||||
const ids = _ids.map((id) => bnToBn(id));
|
const ids = _ids.map((id) => bnToBn(id));
|
||||||
|
|
||||||
return ids.length
|
return ids.length
|
||||||
? (api.query.voterList || api.query.bagsList).listBags.multi<Option<PalletBagsListListBag>>(ids).pipe(
|
? query.listBags.multi<Option<PalletBagsListListBag>>(ids).pipe(
|
||||||
map((bags) => orderBags(ids, bags))
|
map((bags) => orderBags(ids, bags))
|
||||||
)
|
)
|
||||||
: of([]);
|
: of([]);
|
||||||
@@ -48,8 +51,10 @@ export function _getIds (instanceId: string, api: DeriveApi): (ids: (BN | number
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function all (instanceId: string, api: DeriveApi): () => Observable<Bag[]> {
|
export function all (instanceId: string, api: DeriveApi): () => Observable<Bag[]> {
|
||||||
|
const query = getQueryInterface(api);
|
||||||
|
|
||||||
return memo(instanceId, (): Observable<Bag[]> =>
|
return memo(instanceId, (): Observable<Bag[]> =>
|
||||||
(api.query.voterList || api.query.bagsList).listBags.keys<[u64]>().pipe(
|
query.listBags.keys<[u64]>().pipe(
|
||||||
switchMap((keys) =>
|
switchMap((keys) =>
|
||||||
api.derive.bagsList._getIds(keys.map(({ args: [id] }) => id))
|
api.derive.bagsList._getIds(keys.map(({ args: [id] }) => id))
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -12,13 +12,15 @@ import { BehaviorSubject, map, of, switchMap, tap, toArray } from 'rxjs';
|
|||||||
import { nextTick } from '@polkadot/util';
|
import { nextTick } from '@polkadot/util';
|
||||||
|
|
||||||
import { memo } from '../util';
|
import { memo } from '../util';
|
||||||
|
import { getQueryInterface } from './util';
|
||||||
|
|
||||||
function traverseLinks (api: DeriveApi, head: AccountId32 | string): Observable<PalletBagsListListNode[]> {
|
function traverseLinks (api: DeriveApi, head: AccountId32 | string): Observable<PalletBagsListListNode[]> {
|
||||||
const subject = new BehaviorSubject<AccountId32 | string>(head);
|
const subject = new BehaviorSubject<AccountId32 | string>(head);
|
||||||
|
const query = getQueryInterface(api);
|
||||||
|
|
||||||
return subject.pipe(
|
return subject.pipe(
|
||||||
switchMap((account) =>
|
switchMap((account) =>
|
||||||
(api.query.voterList || api.query.bagsList).listNodes<Option<PalletBagsListListNode>>(account)
|
query.listNodes<Option<PalletBagsListListNode>>(account)
|
||||||
),
|
),
|
||||||
tap((node: Option<PalletBagsListListNode>): void => {
|
tap((node: Option<PalletBagsListListNode>): void => {
|
||||||
nextTick((): void => {
|
nextTick((): void => {
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
import type { QueryableStorage } from '@polkadot/api-base/types';
|
||||||
|
import type { DeriveApi } from '../types';
|
||||||
|
|
||||||
|
export function getQueryInterface (api: DeriveApi): QueryableStorage<'rxjs'>['voterBagsList'] {
|
||||||
|
return (
|
||||||
|
// latest substrate (latest always first)
|
||||||
|
api.query.voterBagsList ||
|
||||||
|
// previous substrate
|
||||||
|
api.query.bagsList ||
|
||||||
|
// latest polkadot
|
||||||
|
api.query.voterList
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -27,7 +27,7 @@ const checks: Record<string, Avail> = {
|
|||||||
methods: []
|
methods: []
|
||||||
},
|
},
|
||||||
bagsList: {
|
bagsList: {
|
||||||
instances: ['voterList', 'bagsList'],
|
instances: ['voterBagsList', 'voterList', 'bagsList'],
|
||||||
methods: [],
|
methods: [],
|
||||||
withDetect: true
|
withDetect: true
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '9.2.3' };
|
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '9.5.2' };
|
||||||
|
|||||||
@@ -47,9 +47,12 @@ function calculateUnlocking (api: DeriveApi, stakingLedger: PalletStakingStaking
|
|||||||
|
|
||||||
function redeemableSum (api: DeriveApi, stakingLedger: PalletStakingStakingLedger | undefined, sessionInfo: DeriveSessionInfo): Balance {
|
function redeemableSum (api: DeriveApi, stakingLedger: PalletStakingStakingLedger | undefined, sessionInfo: DeriveSessionInfo): Balance {
|
||||||
return api.registry.createType('Balance', (stakingLedger?.unlocking || [] as PalletStakingUnlockChunk[]).reduce((total, { era, value }): BN => {
|
return api.registry.createType('Balance', (stakingLedger?.unlocking || [] as PalletStakingUnlockChunk[]).reduce((total, { era, value }): BN => {
|
||||||
return sessionInfo.activeEra.gte(era.unwrap())
|
// aligns with https://github.com/paritytech/substrate/blob/fdfdc73f9e64dc47934b72eb9af3e1989e4ba699/frame/staking/src/pallet/mod.rs#L973-L975
|
||||||
? total.iadd(value.unwrap())
|
// (ensure currentEra >= era passed, as per https://github.com/paritytech/substrate/blob/fdfdc73f9e64dc47934b72eb9af3e1989e4ba699/frame/staking/src/lib.rs#L477-L494)
|
||||||
: total;
|
// NOTE: Previously we used activeEra >= era, which is incorrect for the last session
|
||||||
|
return era.unwrap().gt(sessionInfo.currentEra)
|
||||||
|
? total
|
||||||
|
: total.iadd(value.unwrap());
|
||||||
}, new BN(0)));
|
}, new BN(0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
// SPDX-License-Identifier: Apache-2.0
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
import type { Observable } from 'rxjs';
|
import type { Observable } from 'rxjs';
|
||||||
import type { Option, u32 } from '@polkadot/types';
|
import type { u32 } from '@polkadot/types';
|
||||||
import type { ActiveEraInfo, EraIndex } from '@polkadot/types/interfaces';
|
import type { EraIndex } from '@polkadot/types/interfaces';
|
||||||
import type { BN } from '@polkadot/util';
|
import type { BN } from '@polkadot/util';
|
||||||
import type { DeriveApi } from '../types';
|
import type { DeriveApi } from '../types';
|
||||||
|
|
||||||
import { map } from 'rxjs';
|
import { combineLatest, map, of } from 'rxjs';
|
||||||
|
|
||||||
import { BN_ONE, BN_ZERO } from '@polkadot/util';
|
import { BN_ONE, BN_ZERO } from '@polkadot/util';
|
||||||
|
|
||||||
@@ -15,9 +15,11 @@ import { memo } from '../util';
|
|||||||
|
|
||||||
export function erasHistoric (instanceId: string, api: DeriveApi): (withActive?: boolean) => Observable<EraIndex[]> {
|
export function erasHistoric (instanceId: string, api: DeriveApi): (withActive?: boolean) => Observable<EraIndex[]> {
|
||||||
return memo(instanceId, (withActive?: boolean): Observable<EraIndex[]> =>
|
return memo(instanceId, (withActive?: boolean): Observable<EraIndex[]> =>
|
||||||
api.queryMulti<[Option<ActiveEraInfo>, u32]>([
|
combineLatest([
|
||||||
api.query.staking.activeEra,
|
api.query.staking.activeEra(),
|
||||||
api.query.staking.historyDepth
|
api.consts.staking.historyDepth
|
||||||
|
? of(api.consts.staking.historyDepth)
|
||||||
|
: api.query.staking.historyDepth<u32>()
|
||||||
]).pipe(
|
]).pipe(
|
||||||
map(([activeEraOpt, historyDepth]): EraIndex[] => {
|
map(([activeEraOpt, historyDepth]): EraIndex[] => {
|
||||||
const result: EraIndex[] = [];
|
const result: EraIndex[] = [];
|
||||||
|
|||||||
@@ -99,14 +99,14 @@ export const query = firstMemo(
|
|||||||
|
|
||||||
export function queryMulti (instanceId: string, api: DeriveApi): (accountIds: (Uint8Array | string)[], flags: StakingQueryFlags) => Observable<DeriveStakingQuery[]> {
|
export function queryMulti (instanceId: string, api: DeriveApi): (accountIds: (Uint8Array | string)[], flags: StakingQueryFlags) => Observable<DeriveStakingQuery[]> {
|
||||||
return memo(instanceId, (accountIds: (Uint8Array | string)[], flags: StakingQueryFlags): Observable<DeriveStakingQuery[]> =>
|
return memo(instanceId, (accountIds: (Uint8Array | string)[], flags: StakingQueryFlags): Observable<DeriveStakingQuery[]> =>
|
||||||
accountIds.length
|
api.derive.session.indexes().pipe(
|
||||||
? api.derive.session.indexes().pipe(
|
switchMap(({ activeEra }): Observable<DeriveStakingQuery[]> => {
|
||||||
switchMap(({ activeEra }): Observable<DeriveStakingQuery[]> => {
|
const stashIds = accountIds.map((a) => api.registry.createType('AccountId', a));
|
||||||
const stashIds = accountIds.map((accountId) => api.registry.createType('AccountId', accountId));
|
|
||||||
|
|
||||||
return getBatch(api, activeEra, stashIds, flags);
|
return stashIds.length
|
||||||
})
|
? getBatch(api, activeEra, stashIds, flags)
|
||||||
)
|
: of([]);
|
||||||
: of([])
|
})
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
+19
-19
@@ -20,29 +20,29 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "9.2.3",
|
"version": "9.5.2",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.9",
|
"@babel/runtime": "^7.19.4",
|
||||||
"@polkadot/api-augment": "9.2.3",
|
"@polkadot/api-augment": "9.5.2",
|
||||||
"@polkadot/api-base": "9.2.3",
|
"@polkadot/api-base": "9.5.2",
|
||||||
"@polkadot/api-derive": "9.2.3",
|
"@polkadot/api-derive": "9.5.2",
|
||||||
"@polkadot/keyring": "^10.1.5",
|
"@polkadot/keyring": "^10.1.11",
|
||||||
"@polkadot/rpc-augment": "9.2.3",
|
"@polkadot/rpc-augment": "9.5.2",
|
||||||
"@polkadot/rpc-core": "9.2.3",
|
"@polkadot/rpc-core": "9.5.2",
|
||||||
"@polkadot/rpc-provider": "9.2.3",
|
"@polkadot/rpc-provider": "9.5.2",
|
||||||
"@polkadot/types": "9.2.3",
|
"@polkadot/types": "9.5.2",
|
||||||
"@polkadot/types-augment": "9.2.3",
|
"@polkadot/types-augment": "9.5.2",
|
||||||
"@polkadot/types-codec": "9.2.3",
|
"@polkadot/types-codec": "9.5.2",
|
||||||
"@polkadot/types-create": "9.2.3",
|
"@polkadot/types-create": "9.5.2",
|
||||||
"@polkadot/types-known": "9.2.3",
|
"@polkadot/types-known": "9.5.2",
|
||||||
"@polkadot/util": "^10.1.5",
|
"@polkadot/util": "^10.1.11",
|
||||||
"@polkadot/util-crypto": "^10.1.5",
|
"@polkadot/util-crypto": "^10.1.11",
|
||||||
"eventemitter3": "^4.0.7",
|
"eventemitter3": "^4.0.7",
|
||||||
"rxjs": "^7.5.6"
|
"rxjs": "^7.5.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/api-augment": "9.2.3",
|
"@polkadot/api-augment": "9.5.2",
|
||||||
"@polkadot/types-support": "9.2.3"
|
"@polkadot/types-support": "9.5.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -844,21 +844,29 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
let valueIdx = 0;
|
let valueIdx = 0;
|
||||||
let valueObs: Observable<Codec[]>;
|
let valueObs: Observable<Codec[]>;
|
||||||
|
|
||||||
|
// if we don't have queue entries yet,
|
||||||
|
// or the current queue has fired (see from below),
|
||||||
|
// or the current queue has the max entries,
|
||||||
|
// then we create a new queue
|
||||||
if (queueIdx === -1 || !queue[queueIdx] || queue[queueIdx][1].length === PAGE_SIZE_Q) {
|
if (queueIdx === -1 || !queue[queueIdx] || queue[queueIdx][1].length === PAGE_SIZE_Q) {
|
||||||
queueIdx++;
|
queueIdx++;
|
||||||
|
|
||||||
valueObs = from(
|
valueObs = from(
|
||||||
// Defer to the next tick - this aligns with nextTick in @polkadot/util,
|
// we delay the execution until the next tick, this allows
|
||||||
// however since we return a value here, we don't re-use what is there
|
// any queries made in this timeframe to be added to the same
|
||||||
Promise
|
// queue for a single query
|
||||||
.resolve()
|
new Promise<[StorageEntry, unknown[]][]>((resolve): void => {
|
||||||
.then((): [StorageEntry, unknown[]][] => {
|
nextTick((): void => {
|
||||||
|
// get all the calls in this instance, resolve with it
|
||||||
|
// and then clear the queue so we don't add more
|
||||||
|
// (anyhting after this will be added to a new queue)
|
||||||
const calls = queue[queueIdx][1];
|
const calls = queue[queueIdx][1];
|
||||||
|
|
||||||
delete queue[queueIdx];
|
delete queue[queueIdx];
|
||||||
|
|
||||||
return calls;
|
resolve(calls);
|
||||||
})
|
});
|
||||||
|
})
|
||||||
).pipe(
|
).pipe(
|
||||||
switchMap((calls) => query(calls))
|
switchMap((calls) => query(calls))
|
||||||
);
|
);
|
||||||
@@ -872,6 +880,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return valueObs.pipe(
|
return valueObs.pipe(
|
||||||
|
// return the single value at this index
|
||||||
map((values) => values[valueIdx])
|
map((values) => values[valueIdx])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ function consts (api: ApiPromise): void {
|
|||||||
api.consts.foo.bar,
|
api.consts.foo.bar,
|
||||||
api.consts.balances.existentialDeposit.toNumber(),
|
api.consts.balances.existentialDeposit.toNumber(),
|
||||||
api.consts.balances.existentialDeposit.meta.docs.map((s) => s.toString()).join(''),
|
api.consts.balances.existentialDeposit.meta.docs.map((s) => s.toString()).join(''),
|
||||||
api.consts.system.blockWeights.maxBlock.divn(123).toNumber()
|
api.consts.system.blockWeights.maxBlock.refTime.toNumber()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,6 +215,9 @@ async function rpc (api: ApiPromise): Promise<void> {
|
|||||||
await api.rpc.chain.subscribeNewHeads.raw((result: Uint8Array): void => {
|
await api.rpc.chain.subscribeNewHeads.raw((result: Uint8Array): void => {
|
||||||
console.log(result);
|
console.log(result);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// deprecated methods
|
||||||
|
await api.rpc.state.getPairs('123');
|
||||||
}
|
}
|
||||||
|
|
||||||
function types (api: ApiPromise): void {
|
function types (api: ApiPromise): void {
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '9.2.3' };
|
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '9.5.2' };
|
||||||
|
|||||||
@@ -20,13 +20,13 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "9.2.3",
|
"version": "9.5.2",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.9",
|
"@babel/runtime": "^7.19.4",
|
||||||
"@polkadot/rpc-core": "9.2.3",
|
"@polkadot/rpc-core": "9.5.2",
|
||||||
"@polkadot/types": "9.2.3",
|
"@polkadot/types": "9.5.2",
|
||||||
"@polkadot/types-codec": "9.2.3",
|
"@polkadot/types-codec": "9.5.2",
|
||||||
"@polkadot/util": "^10.1.5"
|
"@polkadot/util": "^10.1.11"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,22 +142,27 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
|
|||||||
};
|
};
|
||||||
contracts: {
|
contracts: {
|
||||||
/**
|
/**
|
||||||
|
* @deprecated Use the runtime interface `api.call.contractsApi.call` instead
|
||||||
* Executes a call to a contract
|
* Executes a call to a contract
|
||||||
**/
|
**/
|
||||||
call: AugmentedRpc<(callRequest: ContractCallRequest | { origin?: any; dest?: any; value?: any; gasLimit?: any; storageDepositLimit?: any; inputData?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractExecResult>>;
|
call: AugmentedRpc<(callRequest: ContractCallRequest | { origin?: any; dest?: any; value?: any; gasLimit?: any; storageDepositLimit?: any; inputData?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractExecResult>>;
|
||||||
/**
|
/**
|
||||||
|
* @deprecated Use the runtime interface `api.call.contractsApi.getStorage` instead
|
||||||
* Returns the value under a specified storage key in a contract
|
* Returns the value under a specified storage key in a contract
|
||||||
**/
|
**/
|
||||||
getStorage: AugmentedRpc<(address: AccountId | string | Uint8Array, key: H256 | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Option<Bytes>>>;
|
getStorage: AugmentedRpc<(address: AccountId | string | Uint8Array, key: H256 | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Option<Bytes>>>;
|
||||||
/**
|
/**
|
||||||
|
* @deprecated Use the runtime interface `api.call.contractsApi.instantiate` instead
|
||||||
* Instantiate a new contract
|
* Instantiate a new contract
|
||||||
**/
|
**/
|
||||||
instantiate: AugmentedRpc<(request: InstantiateRequest | { origin?: any; value?: any; gasLimit?: any; storageDepositLimit?: any; code?: any; data?: any; salt?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractInstantiateResult>>;
|
instantiate: AugmentedRpc<(request: InstantiateRequest | { origin?: any; value?: any; gasLimit?: any; storageDepositLimit?: any; code?: any; data?: any; salt?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractInstantiateResult>>;
|
||||||
/**
|
/**
|
||||||
|
* @deprecated Not available in newer versions of the contracts interfaces
|
||||||
* Returns the projected time a given contract will be able to sustain paying its rent
|
* Returns the projected time a given contract will be able to sustain paying its rent
|
||||||
**/
|
**/
|
||||||
rentProjection: AugmentedRpc<(address: AccountId | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Option<BlockNumber>>>;
|
rentProjection: AugmentedRpc<(address: AccountId | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Option<BlockNumber>>>;
|
||||||
/**
|
/**
|
||||||
|
* @deprecated Use the runtime interface `api.call.contractsApi.uploadCode` instead
|
||||||
* Upload new code without instantiating a contract from it
|
* Upload new code without instantiating a contract from it
|
||||||
**/
|
**/
|
||||||
uploadCode: AugmentedRpc<(uploadRequest: CodeUploadRequest | { origin?: any; code?: any; storageDepositLimit?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<CodeUploadResult>>;
|
uploadCode: AugmentedRpc<(uploadRequest: CodeUploadRequest | { origin?: any; code?: any; storageDepositLimit?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<CodeUploadResult>>;
|
||||||
@@ -442,6 +447,7 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
|
|||||||
**/
|
**/
|
||||||
getChildStorageSize: AugmentedRpc<(childStorageKey: StorageKey | string | Uint8Array | any, childDefinition: StorageKey | string | Uint8Array | any, childType: u32 | AnyNumber | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<u64>>;
|
getChildStorageSize: AugmentedRpc<(childStorageKey: StorageKey | string | Uint8Array | any, childDefinition: StorageKey | string | Uint8Array | any, childType: u32 | AnyNumber | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<u64>>;
|
||||||
/**
|
/**
|
||||||
|
* @deprecated Use `api.rpc.state.getKeysPaged` to retrieve keys
|
||||||
* Retrieves the keys with a certain prefix
|
* Retrieves the keys with a certain prefix
|
||||||
**/
|
**/
|
||||||
getKeys: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<StorageKey>>>;
|
getKeys: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<StorageKey>>>;
|
||||||
@@ -454,6 +460,7 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
|
|||||||
**/
|
**/
|
||||||
getMetadata: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<Metadata>>;
|
getMetadata: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<Metadata>>;
|
||||||
/**
|
/**
|
||||||
|
* @deprecated Use `api.rpc.state.getKeysPaged` to retrieve keys
|
||||||
* Returns the keys with prefix, leave empty to get all the keys (deprecated: Use getKeysPaged)
|
* Returns the keys with prefix, leave empty to get all the keys (deprecated: Use getKeysPaged)
|
||||||
**/
|
**/
|
||||||
getPairs: AugmentedRpc<(prefix: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<KeyValue>>>;
|
getPairs: AugmentedRpc<(prefix: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<KeyValue>>>;
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '9.2.3' };
|
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '9.5.2' };
|
||||||
|
|||||||
@@ -20,18 +20,18 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "9.2.3",
|
"version": "9.5.2",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.9",
|
"@babel/runtime": "^7.19.4",
|
||||||
"@polkadot/rpc-augment": "9.2.3",
|
"@polkadot/rpc-augment": "9.5.2",
|
||||||
"@polkadot/rpc-provider": "9.2.3",
|
"@polkadot/rpc-provider": "9.5.2",
|
||||||
"@polkadot/types": "9.2.3",
|
"@polkadot/types": "9.5.2",
|
||||||
"@polkadot/util": "^10.1.5",
|
"@polkadot/util": "^10.1.11",
|
||||||
"rxjs": "^7.5.6"
|
"rxjs": "^7.5.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/keyring": "^10.1.5",
|
"@polkadot/keyring": "^10.1.11",
|
||||||
"@polkadot/rpc-augment": "9.2.3"
|
"@polkadot/rpc-augment": "9.5.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '9.2.3' };
|
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '9.5.2' };
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import type { Observable } from 'rxjs';
|
|||||||
|
|
||||||
import { catchError, distinctUntilChanged, publishReplay, refCount, tap } from 'rxjs';
|
import { catchError, distinctUntilChanged, publishReplay, refCount, tap } from 'rxjs';
|
||||||
|
|
||||||
import { logger, stringify } from '@polkadot/util';
|
import { stringify } from '@polkadot/util';
|
||||||
|
|
||||||
import { refCountDelay } from './refCountDelay';
|
import { refCountDelay } from './refCountDelay';
|
||||||
|
|
||||||
@@ -17,18 +17,17 @@ interface Options {
|
|||||||
skipTimeout?: boolean;
|
skipTimeout?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const l = logger('drr');
|
function CMP (a: unknown, b: unknown): boolean {
|
||||||
|
return stringify({ t: a }) === stringify({ t: b });
|
||||||
const CMP = (a: unknown, b: unknown): boolean =>
|
}
|
||||||
stringify({ t: a }) === stringify({ t: b });
|
|
||||||
|
|
||||||
const ERR = (error: Error): Observable<never> => {
|
|
||||||
l.error(error.message);
|
|
||||||
|
|
||||||
|
function ERR (error: Error): Observable<never> {
|
||||||
throw error;
|
throw error;
|
||||||
};
|
}
|
||||||
|
|
||||||
const NOOP = (): void => undefined;
|
function NOOP (): void {
|
||||||
|
// empty
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shorthand for distinctUntilChanged(), publishReplay(1) and refCount().
|
* Shorthand for distinctUntilChanged(), publishReplay(1) and refCount().
|
||||||
@@ -36,14 +35,16 @@ const NOOP = (): void => undefined;
|
|||||||
* @ignore
|
* @ignore
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
export const drr = ({ delay, skipChange = false, skipTimeout = false }: Options = {}): DrrResult => <T> (source$: Observable<T>): Observable<T> =>
|
export function drr ({ delay, skipChange = false, skipTimeout = false }: Options = {}): DrrResult {
|
||||||
source$.pipe(
|
return <T> (source$: Observable<T>): Observable<T> =>
|
||||||
catchError(ERR),
|
source$.pipe(
|
||||||
skipChange
|
catchError(ERR),
|
||||||
? tap(NOOP)
|
skipChange
|
||||||
: distinctUntilChanged<T>(CMP),
|
? tap(NOOP)
|
||||||
publishReplay(1),
|
: distinctUntilChanged<T>(CMP),
|
||||||
skipTimeout
|
publishReplay(1),
|
||||||
? refCount()
|
skipTimeout
|
||||||
: refCountDelay(delay)
|
? refCount()
|
||||||
);
|
: refCountDelay(delay)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|||||||
@@ -20,19 +20,19 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "9.2.3",
|
"version": "9.5.2",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.9",
|
"@babel/runtime": "^7.19.4",
|
||||||
"@polkadot/keyring": "^10.1.5",
|
"@polkadot/keyring": "^10.1.11",
|
||||||
"@polkadot/types": "9.2.3",
|
"@polkadot/types": "9.5.2",
|
||||||
"@polkadot/types-support": "9.2.3",
|
"@polkadot/types-support": "9.5.2",
|
||||||
"@polkadot/util": "^10.1.5",
|
"@polkadot/util": "^10.1.11",
|
||||||
"@polkadot/util-crypto": "^10.1.5",
|
"@polkadot/util-crypto": "^10.1.11",
|
||||||
"@polkadot/x-fetch": "^10.1.5",
|
"@polkadot/x-fetch": "^10.1.11",
|
||||||
"@polkadot/x-global": "^10.1.5",
|
"@polkadot/x-global": "^10.1.11",
|
||||||
"@polkadot/x-ws": "^10.1.5",
|
"@polkadot/x-ws": "^10.1.11",
|
||||||
"@substrate/connect": "0.7.11",
|
"@substrate/connect": "0.7.14",
|
||||||
"eventemitter3": "^4.0.7",
|
"eventemitter3": "^4.0.7",
|
||||||
"mock-socket": "^9.1.5",
|
"mock-socket": "^9.1.5",
|
||||||
"nock": "^13.2.9"
|
"nock": "^13.2.9"
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '9.2.3' };
|
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '9.5.2' };
|
||||||
|
|||||||
@@ -7,13 +7,15 @@ import type { JsonRpcResponse, ProviderInterface, ProviderInterfaceCallback, Pro
|
|||||||
import { Chain, createScClient, ScClient, WellKnownChain } from '@substrate/connect';
|
import { Chain, createScClient, ScClient, WellKnownChain } from '@substrate/connect';
|
||||||
import EventEmitter from 'eventemitter3';
|
import EventEmitter from 'eventemitter3';
|
||||||
|
|
||||||
import { isError, objectSpread } from '@polkadot/util';
|
import { isError, logger, objectSpread } from '@polkadot/util';
|
||||||
|
|
||||||
import { RpcCoder } from '../coder';
|
import { RpcCoder } from '../coder';
|
||||||
import { healthChecker } from './Health';
|
import { healthChecker } from './Health';
|
||||||
|
|
||||||
type ResponseCallback = (response: string | Error) => void
|
type ResponseCallback = (response: string | Error) => void
|
||||||
|
|
||||||
|
const l = logger('api-substrate-connect');
|
||||||
|
|
||||||
// These methods have been taken from:
|
// These methods have been taken from:
|
||||||
// https://github.com/paritytech/smoldot/blob/17425040ddda47d539556eeaf62b88c4240d1d42/src/json_rpc/methods.rs#L338-L462
|
// https://github.com/paritytech/smoldot/blob/17425040ddda47d539556eeaf62b88c4240d1d42/src/json_rpc/methods.rs#L338-L462
|
||||||
// It's important to take into account that smoldot is adding support to the new
|
// It's important to take into account that smoldot is adding support to the new
|
||||||
@@ -37,11 +39,19 @@ const scClients = new WeakMap<ScProvider, ScClient>();
|
|||||||
|
|
||||||
export { WellKnownChain };
|
export { WellKnownChain };
|
||||||
|
|
||||||
|
interface ActiveSubs {
|
||||||
|
type: string,
|
||||||
|
method: string,
|
||||||
|
params: any[],
|
||||||
|
callback: ProviderInterfaceCallback
|
||||||
|
}
|
||||||
|
|
||||||
export class ScProvider implements ProviderInterface {
|
export class ScProvider implements ProviderInterface {
|
||||||
readonly #coder: RpcCoder = new RpcCoder();
|
readonly #coder: RpcCoder = new RpcCoder();
|
||||||
readonly #spec: string | WellKnownChain;
|
readonly #spec: string | WellKnownChain;
|
||||||
readonly #sharedSandbox?: ScProvider;
|
readonly #sharedSandbox?: ScProvider;
|
||||||
readonly #subscriptions: Map<string, [ResponseCallback, { unsubscribeMethod: string; id: string | number }]> = new Map();
|
readonly #subscriptions: Map<string, [ResponseCallback, { unsubscribeMethod: string; id: string | number }]> = new Map();
|
||||||
|
readonly #resubscribeMethods: Map<string, ActiveSubs> = new Map();
|
||||||
readonly #requests: Map<number, ResponseCallback> = new Map();
|
readonly #requests: Map<number, ResponseCallback> = new Map();
|
||||||
readonly #eventemitter: EventEmitter = new EventEmitter();
|
readonly #eventemitter: EventEmitter = new EventEmitter();
|
||||||
#chain: Promise<Chain> | null = null;
|
#chain: Promise<Chain> | null = null;
|
||||||
@@ -207,11 +217,17 @@ export class ScProvider implements ProviderInterface {
|
|||||||
staleSubscriptions.push(s[1]);
|
staleSubscriptions.push(s[1]);
|
||||||
});
|
});
|
||||||
cleanup();
|
cleanup();
|
||||||
|
|
||||||
|
this.#eventemitter.emit('disconnected');
|
||||||
} else {
|
} else {
|
||||||
killStaleSubscriptions();
|
killStaleSubscriptions();
|
||||||
}
|
|
||||||
|
|
||||||
this.#eventemitter.emit(isReady ? 'connected' : 'disconnected');
|
this.#eventemitter.emit('connected');
|
||||||
|
|
||||||
|
if (this.#resubscribeMethods.size) {
|
||||||
|
this.#resubscribe();
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return objectSpread({}, chain, {
|
return objectSpread({}, chain, {
|
||||||
@@ -233,6 +249,32 @@ export class ScProvider implements ProviderInterface {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#resubscribe = (): void => {
|
||||||
|
const promises: any[] = [];
|
||||||
|
|
||||||
|
this.#resubscribeMethods.forEach((subDetails: ActiveSubs): void => {
|
||||||
|
// only re-create subscriptions which are not in author (only area where
|
||||||
|
// transactions are created, i.e. submissions such as 'author_submitAndWatchExtrinsic'
|
||||||
|
// are not included (and will not be re-broadcast)
|
||||||
|
if (subDetails.type.startsWith('author_')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const promise: Promise<void> = new Promise((resolve) => {
|
||||||
|
this.subscribe(subDetails.type, subDetails.method, subDetails.params, subDetails.callback).catch((error) => console.log(error));
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
|
||||||
|
promises.push(promise);
|
||||||
|
} catch (error) {
|
||||||
|
l.error(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Promise.all(promises).catch((err) => l.log(err));
|
||||||
|
};
|
||||||
|
|
||||||
async disconnect (): Promise<void> {
|
async disconnect (): Promise<void> {
|
||||||
if (!this.#chain) {
|
if (!this.#chain) {
|
||||||
return;
|
return;
|
||||||
@@ -322,6 +364,8 @@ export class ScProvider implements ProviderInterface {
|
|||||||
throw new Error('Invalid unsubscribe method found');
|
throw new Error('Invalid unsubscribe method found');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.#resubscribeMethods.set(subscriptionId, { callback, method, params, type });
|
||||||
|
|
||||||
this.#subscriptions.set(subscriptionId, [cb, { id, unsubscribeMethod }]);
|
this.#subscriptions.set(subscriptionId, [cb, { id, unsubscribeMethod }]);
|
||||||
|
|
||||||
return id;
|
return id;
|
||||||
@@ -340,6 +384,7 @@ export class ScProvider implements ProviderInterface {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.#resubscribeMethods.delete(subscriptionId);
|
||||||
this.#subscriptions.delete(subscriptionId);
|
this.#subscriptions.delete(subscriptionId);
|
||||||
|
|
||||||
return this.send(method, [id]);
|
return this.send(method, [id]);
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "9.2.3",
|
"version": "9.5.2",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.cjs",
|
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.cjs",
|
||||||
@@ -30,27 +30,27 @@
|
|||||||
"polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.cjs"
|
"polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.cjs"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.18.10",
|
"@babel/core": "^7.19.3",
|
||||||
"@babel/register": "^7.18.9",
|
"@babel/register": "^7.18.9",
|
||||||
"@babel/runtime": "^7.18.9",
|
"@babel/runtime": "^7.19.4",
|
||||||
"@polkadot/api": "9.2.3",
|
"@polkadot/api": "9.5.2",
|
||||||
"@polkadot/api-augment": "9.2.3",
|
"@polkadot/api-augment": "9.5.2",
|
||||||
"@polkadot/rpc-augment": "9.2.3",
|
"@polkadot/rpc-augment": "9.5.2",
|
||||||
"@polkadot/rpc-provider": "9.2.3",
|
"@polkadot/rpc-provider": "9.5.2",
|
||||||
"@polkadot/types": "9.2.3",
|
"@polkadot/types": "9.5.2",
|
||||||
"@polkadot/types-augment": "9.2.3",
|
"@polkadot/types-augment": "9.5.2",
|
||||||
"@polkadot/types-codec": "9.2.3",
|
"@polkadot/types-codec": "9.5.2",
|
||||||
"@polkadot/types-create": "9.2.3",
|
"@polkadot/types-create": "9.5.2",
|
||||||
"@polkadot/types-support": "9.2.3",
|
"@polkadot/types-support": "9.5.2",
|
||||||
"@polkadot/util": "^10.1.5",
|
"@polkadot/util": "^10.1.11",
|
||||||
"@polkadot/util-crypto": "^10.1.5",
|
"@polkadot/util-crypto": "^10.1.11",
|
||||||
"@polkadot/x-ws": "^10.1.5",
|
"@polkadot/x-ws": "^10.1.11",
|
||||||
"handlebars": "^4.7.7",
|
"handlebars": "^4.7.7",
|
||||||
"websocket": "^1.0.34",
|
"websocket": "^1.0.34",
|
||||||
"yargs": "^17.5.1"
|
"yargs": "^17.6.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/websocket": "^1.0.5",
|
"@types/websocket": "^1.0.5",
|
||||||
"@types/yargs": "^17.0.11"
|
"@types/yargs": "^17.0.13"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,48 @@ import { compareName, createImports, formatType, initMeta, readTemplate, setImpo
|
|||||||
const generateForMetaTemplate = Handlebars.compile(readTemplate('events'));
|
const generateForMetaTemplate = Handlebars.compile(readTemplate('events'));
|
||||||
|
|
||||||
// For babel itself we need some extra aliasing
|
// For babel itself we need some extra aliasing
|
||||||
const ALIAS = ['symbol'];
|
// Also avoid reserved words to prevent generating invalid TS
|
||||||
|
// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#reserved_words
|
||||||
|
const ALIAS = [
|
||||||
|
'symbol',
|
||||||
|
'break',
|
||||||
|
'case',
|
||||||
|
'catch',
|
||||||
|
'class',
|
||||||
|
'const',
|
||||||
|
'continue',
|
||||||
|
'debugger',
|
||||||
|
'default',
|
||||||
|
'delete',
|
||||||
|
'do',
|
||||||
|
'else',
|
||||||
|
'export',
|
||||||
|
'extends',
|
||||||
|
'false',
|
||||||
|
'finally',
|
||||||
|
'for',
|
||||||
|
'function',
|
||||||
|
'if',
|
||||||
|
'import',
|
||||||
|
'in',
|
||||||
|
'instanceof',
|
||||||
|
'new',
|
||||||
|
'null',
|
||||||
|
'return',
|
||||||
|
'static',
|
||||||
|
'super',
|
||||||
|
'switch',
|
||||||
|
'this',
|
||||||
|
'throw',
|
||||||
|
'true',
|
||||||
|
'try',
|
||||||
|
'typeof',
|
||||||
|
'var',
|
||||||
|
'void',
|
||||||
|
'while',
|
||||||
|
'with',
|
||||||
|
'yield'
|
||||||
|
];
|
||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
function generateForMeta (meta: Metadata, dest: string, extraTypes: ExtraTypes, isStrict: boolean, customLookupDefinitions?: Definitions): void {
|
function generateForMeta (meta: Metadata, dest: string, extraTypes: ExtraTypes, isStrict: boolean, customLookupDefinitions?: Definitions): void {
|
||||||
|
|||||||
@@ -96,7 +96,9 @@ export function generateRpcTypes (registry: TypeRegistry, importDefinitions: Rec
|
|||||||
|
|
||||||
const item = {
|
const item = {
|
||||||
args: args.join(', '),
|
args: args.join(', '),
|
||||||
docs: [def.description],
|
docs: def.deprecated
|
||||||
|
? [`@deprecated ${def.deprecated}`, def.description]
|
||||||
|
: [def.description],
|
||||||
generic,
|
generic,
|
||||||
name: methodName,
|
name: methodName,
|
||||||
type
|
type
|
||||||
|
|||||||
@@ -43,9 +43,10 @@ function tsExport (registry: Registry, definitions: Record<string, ModuleTypes>,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, { lookupIndex, name: enumName, sub }: TypeDef, imports: TypeImports): string {
|
function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, { lookupIndex, name: enumName, sub }: TypeDef, imports: TypeImports, withShortcut = false): string {
|
||||||
setImports(definitions, imports, ['Enum']);
|
setImports(definitions, imports, ['Enum']);
|
||||||
|
|
||||||
|
const indent = withShortcut ? ' ' : '';
|
||||||
const named = (sub as TypeDef[]).filter(({ name }) => !!name && !name.startsWith('__Unused'));
|
const named = (sub as TypeDef[]).filter(({ name }) => !!name && !name.startsWith('__Unused'));
|
||||||
const keys = named.map((def): string => {
|
const keys = named.map((def): string => {
|
||||||
const { info, lookupName, name = '', type } = def;
|
const { info, lookupName, name = '', type } = def;
|
||||||
@@ -53,7 +54,7 @@ function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, {
|
|||||||
const isComplex = [TypeDefInfo.Option, TypeDefInfo.Range, TypeDefInfo.RangeInclusive, TypeDefInfo.Result, TypeDefInfo.Struct, TypeDefInfo.Tuple, TypeDefInfo.Vec, TypeDefInfo.VecFixed].includes(info);
|
const isComplex = [TypeDefInfo.Option, TypeDefInfo.Range, TypeDefInfo.RangeInclusive, TypeDefInfo.Result, TypeDefInfo.Struct, TypeDefInfo.Tuple, TypeDefInfo.Vec, TypeDefInfo.VecFixed].includes(info);
|
||||||
const asGetter = type === 'Null' || info === TypeDefInfo.DoNotConstruct
|
const asGetter = type === 'Null' || info === TypeDefInfo.DoNotConstruct
|
||||||
? ''
|
? ''
|
||||||
: createGetter(definitions, `as${getter}`, lookupName || (isComplex ? formatType(registry, definitions, info === TypeDefInfo.Struct ? def : type, imports, false) : type), imports);
|
: createGetter(definitions, `as${getter}`, lookupName || (isComplex ? formatType(registry, definitions, info === TypeDefInfo.Struct ? def : type, imports, withShortcut) : type), imports);
|
||||||
const isGetter = info === TypeDefInfo.DoNotConstruct
|
const isGetter = info === TypeDefInfo.DoNotConstruct
|
||||||
? ''
|
? ''
|
||||||
: createGetter(definitions, `is${getter}`, 'boolean', imports);
|
: createGetter(definitions, `is${getter}`, 'boolean', imports);
|
||||||
@@ -74,18 +75,18 @@ function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, {
|
|||||||
case TypeDefInfo.VecFixed:
|
case TypeDefInfo.VecFixed:
|
||||||
case TypeDefInfo.WrapperKeepOpaque:
|
case TypeDefInfo.WrapperKeepOpaque:
|
||||||
case TypeDefInfo.WrapperOpaque:
|
case TypeDefInfo.WrapperOpaque:
|
||||||
return `${isGetter}${asGetter}`;
|
return `${indent}${isGetter}${indent}${asGetter}`;
|
||||||
|
|
||||||
case TypeDefInfo.DoNotConstruct:
|
case TypeDefInfo.DoNotConstruct:
|
||||||
case TypeDefInfo.Null:
|
case TypeDefInfo.Null:
|
||||||
return `${isGetter}`;
|
return `${indent}${isGetter}`;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new Error(`Enum: ${enumName || 'undefined'}: Unhandled type ${TypeDefInfo[info]}, ${stringify(def)}`);
|
throw new Error(`Enum: ${enumName || 'undefined'}: Unhandled type ${TypeDefInfo[info]}, ${stringify(def)}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return exportInterface(lookupIndex, enumName, 'Enum', `${keys.join('')} readonly type: ${named.map(({ name = '' }) => `'${stringPascalCase(name.replace(' ', '_'))}'`).join(' | ')};\n`);
|
return exportInterface(lookupIndex, enumName, 'Enum', `${keys.join('')} ${indent}readonly type: ${named.map(({ name = '' }) => `'${stringPascalCase(name.replace(' ', '_'))}'`).join(' | ')};\n`, withShortcut);
|
||||||
}
|
}
|
||||||
|
|
||||||
function tsInt (_: Registry, definitions: Record<string, ModuleTypes>, def: TypeDef, imports: TypeImports, type: 'Int' | 'UInt' = 'Int'): string {
|
function tsInt (_: Registry, definitions: Record<string, ModuleTypes>, def: TypeDef, imports: TypeImports, type: 'Int' | 'UInt' = 'Int'): string {
|
||||||
@@ -176,7 +177,9 @@ function tsStruct (registry: Registry, definitions: Record<string, ModuleTypes>,
|
|||||||
const keys = (sub as TypeDef[]).map((def): string => {
|
const keys = (sub as TypeDef[]).map((def): string => {
|
||||||
const fmtType = def.lookupName && def.name !== def.lookupName
|
const fmtType = def.lookupName && def.name !== def.lookupName
|
||||||
? def.lookupName
|
? def.lookupName
|
||||||
: formatType(registry, definitions, def, imports, false);
|
: def.info === TypeDefInfo.Enum
|
||||||
|
? `${tsEnum(registry, definitions, def, imports, true)} & Enum`
|
||||||
|
: formatType(registry, definitions, def, imports, false);
|
||||||
|
|
||||||
return createGetter(definitions, def.name, fmtType, imports);
|
return createGetter(definitions, def.name, fmtType, imports);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -98,14 +98,17 @@ function renderPage (page: Page): string {
|
|||||||
? `<h3 id="#${item.link}">${item.name}</h3>`
|
? `<h3 id="#${item.link}">${item.name}</h3>`
|
||||||
: `### ${item.name}`;
|
: `### ${item.name}`;
|
||||||
|
|
||||||
Object.keys(item).filter((key) => !['link', 'name'].includes(key)).forEach((bullet) => {
|
Object
|
||||||
md += `\n- **${bullet}**: ${
|
.keys(item)
|
||||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
.filter((key) => !['link', 'name'].includes(key))
|
||||||
item[bullet] instanceof Vec
|
.forEach((bullet) => {
|
||||||
? docsVecToMarkdown(item[bullet] as Vec<Text>, 2).toString()
|
md += `\n- **${bullet}**: ${
|
||||||
: item[bullet]
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
||||||
}`;
|
item[bullet] instanceof Vec
|
||||||
});
|
? docsVecToMarkdown(item[bullet] as Vec<Text>, 2).toString()
|
||||||
|
: item[bullet]
|
||||||
|
}`;
|
||||||
|
});
|
||||||
|
|
||||||
md += '\n';
|
md += '\n';
|
||||||
});
|
});
|
||||||
@@ -160,14 +163,19 @@ function addRpc (): string {
|
|||||||
}).join(', ');
|
}).join(', ');
|
||||||
const type = '`' + method.type + '`';
|
const type = '`' + method.type + '`';
|
||||||
const jsonrpc = (method.endpoint || `${sectionName}_${methodName}`);
|
const jsonrpc = (method.endpoint || `${sectionName}_${methodName}`);
|
||||||
|
const item: SectionItem = {
|
||||||
container.items.push({
|
|
||||||
interface: '`' + `api.rpc.${sectionName}.${methodName}` + '`',
|
interface: '`' + `api.rpc.${sectionName}.${methodName}` + '`',
|
||||||
jsonrpc: '`' + jsonrpc + '`',
|
jsonrpc: '`' + jsonrpc + '`',
|
||||||
// link: jsonrpc,
|
// link: jsonrpc,
|
||||||
name: `${methodName}(${args}): ${type}`,
|
name: `${methodName}(${args}): ${type}`,
|
||||||
...(method.description && { summary: method.description })
|
...(method.description && { summary: method.description })
|
||||||
});
|
};
|
||||||
|
|
||||||
|
if (method.deprecated) {
|
||||||
|
item.deprecated = method.deprecated;
|
||||||
|
}
|
||||||
|
|
||||||
|
container.items.push(item);
|
||||||
});
|
});
|
||||||
|
|
||||||
return all;
|
return all;
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '9.2.3' };
|
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '9.5.2' };
|
||||||
|
|||||||
@@ -105,11 +105,13 @@ Handlebars.registerHelper({
|
|||||||
|
|
||||||
// helper to generate a `export interface <Name> extends <Base> {<Body>}
|
// helper to generate a `export interface <Name> extends <Base> {<Body>}
|
||||||
/** @internal */
|
/** @internal */
|
||||||
export function exportInterface (lookupIndex = -1, name = '', base: string, body = ''): string {
|
export function exportInterface (lookupIndex = -1, name = '', base: string, body = '', withShortcut = false): string {
|
||||||
// * @description extends [[${base}]]
|
// * @description extends [[${base}]]
|
||||||
const doc = `/** @name ${name}${lookupIndex !== -1 ? ` (${lookupIndex})` : ''} */\n`;
|
const doc = withShortcut
|
||||||
|
? ''
|
||||||
|
: `/** @name ${name}${lookupIndex !== -1 ? ` (${lookupIndex})` : ''} */\n`;
|
||||||
|
|
||||||
return `${doc}export interface ${name} extends ${base} {${body.length ? '\n' : ''}${body}}`;
|
return `${doc}${withShortcut ? '' : `export interface ${name} extends ${base} `}{${body.length ? '\n' : ''}${body}${withShortcut ? ' ' : ''}}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function singleParamNotation (registry: Registry, wrapper: string, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean): string {
|
function singleParamNotation (registry: Registry, wrapper: string, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean): string {
|
||||||
|
|||||||
@@ -20,12 +20,12 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "9.2.3",
|
"version": "9.5.2",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.9",
|
"@babel/runtime": "^7.19.4",
|
||||||
"@polkadot/types": "9.2.3",
|
"@polkadot/types": "9.5.2",
|
||||||
"@polkadot/types-codec": "9.2.3",
|
"@polkadot/types-codec": "9.5.2",
|
||||||
"@polkadot/util": "^10.1.5"
|
"@polkadot/util": "^10.1.11"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,13 +5,13 @@
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
/**
|
/**
|
||||||
* Lookup80: kusama_runtime::ProxyType
|
* Lookup81: kusama_runtime::ProxyType
|
||||||
**/
|
**/
|
||||||
KusamaRuntimeProxyType: {
|
KusamaRuntimeProxyType: {
|
||||||
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'IdentityJudgement', 'CancelProxy', 'Auction', 'Society']
|
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'IdentityJudgement', 'CancelProxy', 'Auction', 'Society']
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup261: kusama_runtime::SessionKeys
|
* Lookup265: kusama_runtime::SessionKeys
|
||||||
**/
|
**/
|
||||||
KusamaRuntimeSessionKeys: {
|
KusamaRuntimeSessionKeys: {
|
||||||
grandpa: 'SpFinalityGrandpaAppPublic',
|
grandpa: 'SpFinalityGrandpaAppPublic',
|
||||||
@@ -22,7 +22,7 @@ export default {
|
|||||||
authorityDiscovery: 'SpAuthorityDiscoveryAppPublic'
|
authorityDiscovery: 'SpAuthorityDiscoveryAppPublic'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup335: kusama_runtime::OriginCaller
|
* Lookup340: kusama_runtime::OriginCaller
|
||||||
**/
|
**/
|
||||||
KusamaRuntimeOriginCaller: {
|
KusamaRuntimeOriginCaller: {
|
||||||
_enum: {
|
_enum: {
|
||||||
@@ -129,7 +129,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup401: kusama_runtime::NposCompactSolution24
|
* Lookup406: kusama_runtime::NposCompactSolution24
|
||||||
**/
|
**/
|
||||||
KusamaRuntimeNposCompactSolution24: {
|
KusamaRuntimeNposCompactSolution24: {
|
||||||
votes1: 'Vec<(Compact<u32>,Compact<u16>)>',
|
votes1: 'Vec<(Compact<u32>,Compact<u16>)>',
|
||||||
@@ -158,7 +158,7 @@ export default {
|
|||||||
votes24: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);23],Compact<u16>)>'
|
votes24: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);23],Compact<u16>)>'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Lookup777: kusama_runtime::Runtime
|
* Lookup786: kusama_runtime::Runtime
|
||||||
**/
|
**/
|
||||||
KusamaRuntimeRuntime: 'Null'
|
KusamaRuntimeRuntime: 'Null'
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -10,7 +10,7 @@ import type { ITuple } from '@polkadot/types-codec/types';
|
|||||||
import type { PerU16 } from '@polkadot/types/interfaces/runtime';
|
import type { PerU16 } from '@polkadot/types/interfaces/runtime';
|
||||||
|
|
||||||
declare module '@polkadot/types/lookup' {
|
declare module '@polkadot/types/lookup' {
|
||||||
/** @name KusamaRuntimeProxyType (80) */
|
/** @name KusamaRuntimeProxyType (81) */
|
||||||
interface KusamaRuntimeProxyType extends Enum {
|
interface KusamaRuntimeProxyType extends Enum {
|
||||||
readonly isAny: boolean;
|
readonly isAny: boolean;
|
||||||
readonly isNonTransfer: boolean;
|
readonly isNonTransfer: boolean;
|
||||||
@@ -23,7 +23,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly type: 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society';
|
readonly type: 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society';
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name KusamaRuntimeSessionKeys (261) */
|
/** @name KusamaRuntimeSessionKeys (265) */
|
||||||
interface KusamaRuntimeSessionKeys extends Struct {
|
interface KusamaRuntimeSessionKeys extends Struct {
|
||||||
readonly grandpa: SpFinalityGrandpaAppPublic;
|
readonly grandpa: SpFinalityGrandpaAppPublic;
|
||||||
readonly babe: SpConsensusBabeAppPublic;
|
readonly babe: SpConsensusBabeAppPublic;
|
||||||
@@ -33,7 +33,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly authorityDiscovery: SpAuthorityDiscoveryAppPublic;
|
readonly authorityDiscovery: SpAuthorityDiscoveryAppPublic;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name KusamaRuntimeOriginCaller (335) */
|
/** @name KusamaRuntimeOriginCaller (340) */
|
||||||
interface KusamaRuntimeOriginCaller extends Enum {
|
interface KusamaRuntimeOriginCaller extends Enum {
|
||||||
readonly isSystem: boolean;
|
readonly isSystem: boolean;
|
||||||
readonly asSystem: FrameSupportDispatchRawOrigin;
|
readonly asSystem: FrameSupportDispatchRawOrigin;
|
||||||
@@ -49,7 +49,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly type: 'System' | 'Void' | 'Council' | 'TechnicalCommittee' | 'ParachainsOrigin' | 'XcmPallet';
|
readonly type: 'System' | 'Void' | 'Council' | 'TechnicalCommittee' | 'ParachainsOrigin' | 'XcmPallet';
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name KusamaRuntimeNposCompactSolution24 (401) */
|
/** @name KusamaRuntimeNposCompactSolution24 (406) */
|
||||||
interface KusamaRuntimeNposCompactSolution24 extends Struct {
|
interface KusamaRuntimeNposCompactSolution24 extends Struct {
|
||||||
readonly votes1: Vec<ITuple<[Compact<u32>, Compact<u16>]>>;
|
readonly votes1: Vec<ITuple<[Compact<u32>, Compact<u16>]>>;
|
||||||
readonly votes2: Vec<ITuple<[Compact<u32>, ITuple<[Compact<u16>, Compact<PerU16>]>, Compact<u16>]>>;
|
readonly votes2: Vec<ITuple<[Compact<u32>, ITuple<[Compact<u16>, Compact<PerU16>]>, Compact<u16>]>>;
|
||||||
@@ -77,7 +77,7 @@ declare module '@polkadot/types/lookup' {
|
|||||||
readonly votes24: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
readonly votes24: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @name KusamaRuntimeRuntime (777) */
|
/** @name KusamaRuntimeRuntime (786) */
|
||||||
type KusamaRuntimeRuntime = Null;
|
type KusamaRuntimeRuntime = Null;
|
||||||
|
|
||||||
} // declare module
|
} // declare module
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '9.2.3' };
|
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '9.5.2' };
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import type { StatementKind } from '@polkadot/types/interfaces/claims';
|
|||||||
import type { CollectiveOrigin, MemberCount, ProposalIndex, Votes, VotesTo230 } from '@polkadot/types/interfaces/collective';
|
import type { CollectiveOrigin, MemberCount, ProposalIndex, Votes, VotesTo230 } from '@polkadot/types/interfaces/collective';
|
||||||
import type { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/consensus';
|
import type { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/consensus';
|
||||||
import type { AliveContractInfo, CodeHash, CodeSource, CodeUploadRequest, CodeUploadResult, CodeUploadResultValue, ContractCallFlags, ContractCallRequest, ContractExecResult, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractExecResultTo267, ContractInfo, ContractInstantiateResult, ContractInstantiateResultTo267, ContractInstantiateResultTo299, ContractReturnFlags, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateRequestV1, InstantiateRequestV2, InstantiateReturnValue, InstantiateReturnValueOk, InstantiateReturnValueTo267, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, StorageDeposit, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
|
import type { AliveContractInfo, CodeHash, CodeSource, CodeUploadRequest, CodeUploadResult, CodeUploadResultValue, ContractCallFlags, ContractCallRequest, ContractExecResult, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractExecResultTo267, ContractInfo, ContractInstantiateResult, ContractInstantiateResultTo267, ContractInstantiateResultTo299, ContractReturnFlags, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateRequestV1, InstantiateRequestV2, InstantiateReturnValue, InstantiateReturnValueOk, InstantiateReturnValueTo267, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, StorageDeposit, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
|
||||||
import type { ContractConstructorSpecLatest, ContractConstructorSpecV0, ContractConstructorSpecV1, ContractConstructorSpecV2, ContractConstructorSpecV3, ContractContractSpecV0, ContractContractSpecV1, ContractContractSpecV2, ContractContractSpecV3, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEventParamSpecLatest, ContractEventParamSpecV0, ContractEventParamSpecV2, ContractEventSpecLatest, ContractEventSpecV0, ContractEventSpecV1, ContractEventSpecV2, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpecLatest, ContractMessageParamSpecV0, ContractMessageParamSpecV2, ContractMessageSpecLatest, ContractMessageSpecV0, ContractMessageSpecV1, ContractMessageSpecV2, ContractMetadata, ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1, ContractMetadataV2, ContractMetadataV3, ContractProject, ContractProjectContract, ContractProjectInfo, ContractProjectSource, ContractProjectV0, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi';
|
import type { ContractConstructorSpecLatest, ContractConstructorSpecV0, ContractConstructorSpecV1, ContractConstructorSpecV2, ContractConstructorSpecV3, ContractContractSpecV0, ContractContractSpecV1, ContractContractSpecV2, ContractContractSpecV3, ContractContractSpecV4, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEventParamSpecLatest, ContractEventParamSpecV0, ContractEventParamSpecV2, ContractEventSpecLatest, ContractEventSpecV0, ContractEventSpecV1, ContractEventSpecV2, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpecLatest, ContractMessageParamSpecV0, ContractMessageParamSpecV2, ContractMessageSpecLatest, ContractMessageSpecV0, ContractMessageSpecV1, ContractMessageSpecV2, ContractMetadata, ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1, ContractMetadataV2, ContractMetadataV3, ContractMetadataV4, ContractProject, ContractProjectContract, ContractProjectInfo, ContractProjectSource, ContractProjectV0, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi';
|
||||||
import type { FundIndex, FundInfo, LastContribution, TrieIndex } from '@polkadot/types/interfaces/crowdloan';
|
import type { FundIndex, FundInfo, LastContribution, TrieIndex } from '@polkadot/types/interfaces/crowdloan';
|
||||||
import type { CollationInfo, CollationInfoV1, ConfigData, MessageId, OverweightIndex, PageCounter, PageIndexData } from '@polkadot/types/interfaces/cumulus';
|
import type { CollationInfo, CollationInfoV1, ConfigData, MessageId, OverweightIndex, PageCounter, PageIndexData } from '@polkadot/types/interfaces/cumulus';
|
||||||
import type { AccountVote, AccountVoteSplit, AccountVoteStandard, Conviction, Delegations, PreimageStatus, PreimageStatusAvailable, PriorLock, PropIndex, Proposal, ProxyState, ReferendumIndex, ReferendumInfo, ReferendumInfoFinished, ReferendumInfoTo239, ReferendumStatus, Tally, Voting, VotingDelegating, VotingDirect, VotingDirectVote } from '@polkadot/types/interfaces/democracy';
|
import type { AccountVote, AccountVoteSplit, AccountVoteStandard, Conviction, Delegations, PreimageStatus, PreimageStatusAvailable, PriorLock, PropIndex, Proposal, ProxyState, ReferendumIndex, ReferendumInfo, ReferendumInfoFinished, ReferendumInfoTo239, ReferendumStatus, Tally, Voting, VotingDelegating, VotingDirect, VotingDirectVote } from '@polkadot/types/interfaces/democracy';
|
||||||
@@ -52,7 +52,7 @@ import type { ProxyAnnouncement, ProxyDefinition, ProxyType } from '@polkadot/ty
|
|||||||
import type { AccountStatus, AccountValidity } from '@polkadot/types/interfaces/purchase';
|
import type { AccountStatus, AccountValidity } from '@polkadot/types/interfaces/purchase';
|
||||||
import type { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';
|
import type { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';
|
||||||
import type { RpcMethods } from '@polkadot/types/interfaces/rpc';
|
import type { RpcMethods } from '@polkadot/types/interfaces/rpc';
|
||||||
import type { AccountId, AccountId20, AccountId32, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, BlockNumberFor, BlockNumberOf, Call, CallHash, CallHashOf, ChangesTrieConfiguration, ChangesTrieSignal, CodecHash, Consensus, ConsensusEngineId, CrateVersion, Digest, DigestItem, EncodedJustification, ExtrinsicsWeight, Fixed128, Fixed64, FixedI128, FixedI64, FixedU128, FixedU64, H1024, H128, H160, H2048, H256, H32, H512, H64, Hash, Header, HeaderPartial, I32F32, Index, IndicesLookupSource, Justification, Justifications, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, MultiAddress, MultiSigner, OpaqueCall, Origin, OriginCaller, PalletId, PalletVersion, PalletsOrigin, Pays, PerU16, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Releases, RuntimeDbWeight, Seal, SealV0, SignedBlock, SignedBlockWithJustification, SignedBlockWithJustifications, Slot, SlotDuration, StorageData, StorageInfo, StorageProof, TransactionInfo, TransactionLongevity, TransactionPriority, TransactionStorageProof, TransactionTag, U32F32, ValidatorId, ValidatorIdOf, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
|
import type { AccountId, AccountId20, AccountId32, AccountId33, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, BlockNumberFor, BlockNumberOf, Call, CallHash, CallHashOf, ChangesTrieConfiguration, ChangesTrieSignal, CodecHash, Consensus, ConsensusEngineId, CrateVersion, Digest, DigestItem, EncodedJustification, ExtrinsicsWeight, Fixed128, Fixed64, FixedI128, FixedI64, FixedU128, FixedU64, H1024, H128, H160, H2048, H256, H32, H512, H64, Hash, Header, HeaderPartial, I32F32, Index, IndicesLookupSource, Justification, Justifications, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, MultiAddress, MultiSigner, OpaqueCall, Origin, OriginCaller, PalletId, PalletVersion, PalletsOrigin, Pays, PerU16, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Releases, RuntimeDbWeight, Seal, SealV0, SignedBlock, SignedBlockWithJustification, SignedBlockWithJustifications, Slot, SlotDuration, StorageData, StorageInfo, StorageProof, TransactionInfo, TransactionLongevity, TransactionPriority, TransactionStorageProof, TransactionTag, U32F32, ValidatorId, ValidatorIdOf, Weight, WeightMultiplier, WeightV1, WeightV2 } from '@polkadot/types/interfaces/runtime';
|
||||||
import type { Si0Field, Si0LookupTypeId, Si0Path, Si0Type, Si0TypeDef, Si0TypeDefArray, Si0TypeDefBitSequence, Si0TypeDefCompact, Si0TypeDefComposite, Si0TypeDefPhantom, Si0TypeDefPrimitive, Si0TypeDefSequence, Si0TypeDefTuple, Si0TypeDefVariant, Si0TypeParameter, Si0Variant, Si1Field, Si1LookupTypeId, Si1Path, Si1Type, Si1TypeDef, Si1TypeDefArray, Si1TypeDefBitSequence, Si1TypeDefCompact, Si1TypeDefComposite, Si1TypeDefPrimitive, Si1TypeDefSequence, Si1TypeDefTuple, Si1TypeDefVariant, Si1TypeParameter, Si1Variant, SiField, SiLookupTypeId, SiPath, SiType, SiTypeDef, SiTypeDefArray, SiTypeDefBitSequence, SiTypeDefCompact, SiTypeDefComposite, SiTypeDefPrimitive, SiTypeDefSequence, SiTypeDefTuple, SiTypeDefVariant, SiTypeParameter, SiVariant } from '@polkadot/types/interfaces/scaleInfo';
|
import type { Si0Field, Si0LookupTypeId, Si0Path, Si0Type, Si0TypeDef, Si0TypeDefArray, Si0TypeDefBitSequence, Si0TypeDefCompact, Si0TypeDefComposite, Si0TypeDefPhantom, Si0TypeDefPrimitive, Si0TypeDefSequence, Si0TypeDefTuple, Si0TypeDefVariant, Si0TypeParameter, Si0Variant, Si1Field, Si1LookupTypeId, Si1Path, Si1Type, Si1TypeDef, Si1TypeDefArray, Si1TypeDefBitSequence, Si1TypeDefCompact, Si1TypeDefComposite, Si1TypeDefPrimitive, Si1TypeDefSequence, Si1TypeDefTuple, Si1TypeDefVariant, Si1TypeParameter, Si1Variant, SiField, SiLookupTypeId, SiPath, SiType, SiTypeDef, SiTypeDefArray, SiTypeDefBitSequence, SiTypeDefCompact, SiTypeDefComposite, SiTypeDefPrimitive, SiTypeDefSequence, SiTypeDefTuple, SiTypeDefVariant, SiTypeParameter, SiVariant } from '@polkadot/types/interfaces/scaleInfo';
|
||||||
import type { Period, Priority, SchedulePeriod, SchedulePriority, Scheduled, ScheduledTo254, TaskAddress } from '@polkadot/types/interfaces/scheduler';
|
import type { Period, Priority, SchedulePeriod, SchedulePriority, Scheduled, ScheduledTo254, TaskAddress } from '@polkadot/types/interfaces/scheduler';
|
||||||
import type { BeefyKey, FullIdentification, IdentificationTuple, Keys, MembershipProof, SessionIndex, SessionKeys1, SessionKeys10, SessionKeys10B, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6, SessionKeys6B, SessionKeys7, SessionKeys7B, SessionKeys8, SessionKeys8B, SessionKeys9, SessionKeys9B, ValidatorCount } from '@polkadot/types/interfaces/session';
|
import type { BeefyKey, FullIdentification, IdentificationTuple, Keys, MembershipProof, SessionIndex, SessionKeys1, SessionKeys10, SessionKeys10B, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6, SessionKeys6B, SessionKeys7, SessionKeys7B, SessionKeys8, SessionKeys8B, SessionKeys9, SessionKeys9B, ValidatorCount } from '@polkadot/types/interfaces/session';
|
||||||
@@ -78,6 +78,7 @@ declare module '@polkadot/types/types/registry' {
|
|||||||
AccountId: AccountId;
|
AccountId: AccountId;
|
||||||
AccountId20: AccountId20;
|
AccountId20: AccountId20;
|
||||||
AccountId32: AccountId32;
|
AccountId32: AccountId32;
|
||||||
|
AccountId33: AccountId33;
|
||||||
AccountIdOf: AccountIdOf;
|
AccountIdOf: AccountIdOf;
|
||||||
AccountIndex: AccountIndex;
|
AccountIndex: AccountIndex;
|
||||||
AccountInfo: AccountInfo;
|
AccountInfo: AccountInfo;
|
||||||
@@ -252,6 +253,7 @@ declare module '@polkadot/types/types/registry' {
|
|||||||
ContractContractSpecV1: ContractContractSpecV1;
|
ContractContractSpecV1: ContractContractSpecV1;
|
||||||
ContractContractSpecV2: ContractContractSpecV2;
|
ContractContractSpecV2: ContractContractSpecV2;
|
||||||
ContractContractSpecV3: ContractContractSpecV3;
|
ContractContractSpecV3: ContractContractSpecV3;
|
||||||
|
ContractContractSpecV4: ContractContractSpecV4;
|
||||||
ContractCryptoHasher: ContractCryptoHasher;
|
ContractCryptoHasher: ContractCryptoHasher;
|
||||||
ContractDiscriminant: ContractDiscriminant;
|
ContractDiscriminant: ContractDiscriminant;
|
||||||
ContractDisplayName: ContractDisplayName;
|
ContractDisplayName: ContractDisplayName;
|
||||||
@@ -295,6 +297,7 @@ declare module '@polkadot/types/types/registry' {
|
|||||||
ContractMetadataV1: ContractMetadataV1;
|
ContractMetadataV1: ContractMetadataV1;
|
||||||
ContractMetadataV2: ContractMetadataV2;
|
ContractMetadataV2: ContractMetadataV2;
|
||||||
ContractMetadataV3: ContractMetadataV3;
|
ContractMetadataV3: ContractMetadataV3;
|
||||||
|
ContractMetadataV4: ContractMetadataV4;
|
||||||
ContractProject: ContractProject;
|
ContractProject: ContractProject;
|
||||||
ContractProjectContract: ContractProjectContract;
|
ContractProjectContract: ContractProjectContract;
|
||||||
ContractProjectInfo: ContractProjectInfo;
|
ContractProjectInfo: ContractProjectInfo;
|
||||||
@@ -1146,6 +1149,8 @@ declare module '@polkadot/types/types/registry' {
|
|||||||
WeightMultiplier: WeightMultiplier;
|
WeightMultiplier: WeightMultiplier;
|
||||||
WeightPerClass: WeightPerClass;
|
WeightPerClass: WeightPerClass;
|
||||||
WeightToFeeCoefficient: WeightToFeeCoefficient;
|
WeightToFeeCoefficient: WeightToFeeCoefficient;
|
||||||
|
WeightV1: WeightV1;
|
||||||
|
WeightV2: WeightV2;
|
||||||
WildFungibility: WildFungibility;
|
WildFungibility: WildFungibility;
|
||||||
WildFungibilityV0: WildFungibilityV0;
|
WildFungibilityV0: WildFungibilityV0;
|
||||||
WildFungibilityV1: WildFungibilityV1;
|
WildFungibilityV1: WildFungibilityV1;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -20,17 +20,17 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "9.2.3",
|
"version": "9.5.2",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.9",
|
"@babel/runtime": "^7.19.4",
|
||||||
"@polkadot/util": "^10.1.5",
|
"@polkadot/util": "^10.1.11",
|
||||||
"@polkadot/x-bigint": "^10.1.5"
|
"@polkadot/x-bigint": "^10.1.11"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/types": "9.2.3",
|
"@polkadot/types": "9.5.2",
|
||||||
"@polkadot/types-augment": "9.2.3",
|
"@polkadot/types-augment": "9.5.2",
|
||||||
"@polkadot/types-support": "9.2.3",
|
"@polkadot/types-support": "9.5.2",
|
||||||
"@polkadot/util-crypto": "^10.1.5"
|
"@polkadot/util-crypto": "^10.1.11"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import type { HexString } from '@polkadot/util/types';
|
import type { HexString } from '@polkadot/util/types';
|
||||||
import type { AnyNumber, Inspect, INumber, IU8a, Registry, UIntBitLength } from '../types';
|
import type { AnyNumber, Inspect, INumber, IU8a, Registry, UIntBitLength } from '../types';
|
||||||
|
|
||||||
import { BN, BN_BILLION, BN_HUNDRED, BN_MILLION, BN_QUINTILL, bnToBn, bnToHex, bnToU8a, formatBalance, formatNumber, hexToBn, isBn, isHex, isNumber, isString, isU8a, u8aToBn, u8aToNumber } from '@polkadot/util';
|
import { BN, BN_BILLION, BN_HUNDRED, BN_MILLION, BN_QUINTILL, bnToBn, bnToHex, bnToU8a, formatBalance, formatNumber, hexToBn, isBn, isFunction, isHex, isNumber, isObject, isString, isU8a, u8aToBn, u8aToNumber } from '@polkadot/util';
|
||||||
|
|
||||||
export const DEFAULT_UINT_BITS = 64;
|
export const DEFAULT_UINT_BITS = 64;
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ function toPercentage (value: BN, divisor: BN): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
function decodeAbstractInt (value: Exclude<AnyNumber, Uint8Array>, isNegative: boolean): string | number {
|
function decodeAbstractInt (value: Exclude<AnyNumber, Uint8Array> | Record<string, string>, isNegative: boolean): string | number {
|
||||||
if (isNumber(value)) {
|
if (isNumber(value)) {
|
||||||
if (!Number.isInteger(value) || value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER) {
|
if (!Number.isInteger(value) || value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER) {
|
||||||
throw new Error('Number needs to be an integer <= Number.MAX_SAFE_INTEGER, i.e. 2 ^ 53 - 1');
|
throw new Error('Number needs to be an integer <= Number.MAX_SAFE_INTEGER, i.e. 2 ^ 53 - 1');
|
||||||
@@ -44,9 +44,26 @@ function decodeAbstractInt (value: Exclude<AnyNumber, Uint8Array>, isNegative: b
|
|||||||
return value;
|
return value;
|
||||||
} else if (isBn(value)) {
|
} else if (isBn(value)) {
|
||||||
return value.toString();
|
return value.toString();
|
||||||
|
} else if (isObject(value) && !isFunction(value.toBn)) {
|
||||||
|
// Allow the construction from an object with a single top-level key. This means that
|
||||||
|
// single key objects can be treated equivalently to numbers, assuming they meet the
|
||||||
|
// specific requirements. (This is useful in Weights 1.5 where Objects are compact)
|
||||||
|
const keys = Object.keys(value);
|
||||||
|
|
||||||
|
if (keys.length !== 1) {
|
||||||
|
throw new Error('Unable to construct number from multi-key object');
|
||||||
|
}
|
||||||
|
|
||||||
|
const inner = value[keys[0]];
|
||||||
|
|
||||||
|
if (!isString(inner) && !isNumber(inner)) {
|
||||||
|
throw new Error('Unable to construct from object with non-string/non-number value');
|
||||||
|
}
|
||||||
|
|
||||||
|
return decodeAbstractInt(inner, isNegative);
|
||||||
}
|
}
|
||||||
|
|
||||||
return bnToBn(value).toString();
|
return bnToBn(value as bigint).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -25,6 +25,17 @@ describe('Int', (): void => {
|
|||||||
).toEqual(-1234);
|
).toEqual(-1234);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('can construct via a single-entry struct', (): void => {
|
||||||
|
expect(
|
||||||
|
// @ts-expect-error We could receive these via JSON
|
||||||
|
new Int(registry, { ref_time: 1234 }).toNumber()
|
||||||
|
).toEqual(1234);
|
||||||
|
expect(
|
||||||
|
// @ts-expect-error We could receive these via JSON
|
||||||
|
() => new Int(registry, { ref_time: 1234, zoo: 4567 }).toNumber()
|
||||||
|
).toThrow(/Unable to construct number from/);
|
||||||
|
});
|
||||||
|
|
||||||
it('converts to Little Endian from the provided value', (): void => {
|
it('converts to Little Endian from the provided value', (): void => {
|
||||||
expect(
|
expect(
|
||||||
new Int(registry, -1234).toU8a()
|
new Int(registry, -1234).toU8a()
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ export function decodeVec<T extends Codec> (registry: Registry, result: T[], val
|
|||||||
const count = result.length;
|
const count = result.length;
|
||||||
|
|
||||||
for (let i = 0; i < count; i++) {
|
for (let i = 0; i < count; i++) {
|
||||||
|
// 26/08/2022 this is actually a false positive - after recent eslint upgdates
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||||
const entry = value[i];
|
const entry = value[i];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -66,4 +66,34 @@ describe('WrapperKeepOpaque', (): void => {
|
|||||||
outer: [new Uint8Array([4 << 2])]
|
outer: [new Uint8Array([4 << 2])]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('has a sane in-wrapper representation', (): void => {
|
||||||
|
const set = registry.createType(
|
||||||
|
'BTreeSet<OpaquePeerId>',
|
||||||
|
// prefix
|
||||||
|
'0x' +
|
||||||
|
// 4 items, 16 >> 2
|
||||||
|
'10' +
|
||||||
|
// opaque length
|
||||||
|
'9c' +
|
||||||
|
// bytes length
|
||||||
|
'98' + '0024080112201ce5f00ef6e89374afb625f1ae4c1546d31234e87e3c3f51a62b91dd6bfa57df' +
|
||||||
|
// repeat the same for the next 3...
|
||||||
|
'9c98002408011220876a7b4984f98006dc8d666e28b60de307309835d775e7755cc770328cdacf2e9c98002408011220c81bc1d7057a1511eb9496f056f6f53cdfe0e14c8bd5ffca47c70a8d76c1326d9c98002408011220dacde7714d8551f674b8bb4b54239383c76a2b286fa436e93b2b7eb226bf4de7'
|
||||||
|
);
|
||||||
|
const val = [...set.values()];
|
||||||
|
|
||||||
|
expect(val.map((v) => v.toHex())).toEqual([
|
||||||
|
'0x980024080112201ce5f00ef6e89374afb625f1ae4c1546d31234e87e3c3f51a62b91dd6bfa57df',
|
||||||
|
'0x98002408011220876a7b4984f98006dc8d666e28b60de307309835d775e7755cc770328cdacf2e',
|
||||||
|
'0x98002408011220c81bc1d7057a1511eb9496f056f6f53cdfe0e14c8bd5ffca47c70a8d76c1326d',
|
||||||
|
'0x98002408011220dacde7714d8551f674b8bb4b54239383c76a2b286fa436e93b2b7eb226bf4de7'
|
||||||
|
]);
|
||||||
|
expect(val.map((v) => v.toHuman())).toEqual([
|
||||||
|
'0x0024080112201ce5f00ef6e89374afb625f1ae4c1546d31234e87e3c3f51a62b91dd6bfa57df',
|
||||||
|
'0x002408011220876a7b4984f98006dc8d666e28b60de307309835d775e7755cc770328cdacf2e',
|
||||||
|
'0x002408011220c81bc1d7057a1511eb9496f056f6f53cdfe0e14c8bd5ffca47c70a8d76c1326d',
|
||||||
|
'0x002408011220dacde7714d8551f674b8bb4b54239383c76a2b286fa436e93b2b7eb226bf4de7'
|
||||||
|
]);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
// Do not edit, auto-generated by @polkadot/dev
|
// Do not edit, auto-generated by @polkadot/dev
|
||||||
|
|
||||||
export const packageInfo = { name: '@polkadot/types-codec', path: 'auto', type: 'auto', version: '9.2.3' };
|
export const packageInfo = { name: '@polkadot/types-codec', path: 'auto', type: 'auto', version: '9.5.2' };
|
||||||
|
|||||||
@@ -20,14 +20,14 @@
|
|||||||
"./detectPackage.cjs"
|
"./detectPackage.cjs"
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "9.2.3",
|
"version": "9.5.2",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.9",
|
"@babel/runtime": "^7.19.4",
|
||||||
"@polkadot/types-codec": "9.2.3",
|
"@polkadot/types-codec": "9.5.2",
|
||||||
"@polkadot/util": "^10.1.5"
|
"@polkadot/util": "^10.1.11"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@polkadot/types": "9.2.3"
|
"@polkadot/types": "9.5.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user