Compare commits

...
177 Commits
Author SHA1 Message Date
github-actions[bot] cebcc054da [CI Skip] release/stable 9.4.2
skip-checks: true
2022-09-24 09:20:45 +00:00
Jaco dc9c225eb8 9.4.2 (#5235) 2022-09-24 12:10:34 +03:00
github-actions[bot] a3b0d9a794 [CI Skip] bump/beta 9.4.2-4-x
skip-checks: true
2022-09-24 08:10:46 +00:00
Jaco 43efff7ade Bump metadata (#5233)
* Bump metadata

* historyDepth as const

* bagsList rename

* CHANGELOG
2022-09-24 11:02:29 +03:00
github-actions[bot] a81d83a25c [CI Skip] bump/beta 9.4.2-3-x
skip-checks: true
2022-09-24 06:31:29 +00:00
Nikos Kontakis 6dea8d9a07 Add resubscription delete on unsubscribe (#5230) 2022-09-24 09:22:02 +03:00
github-actions[bot] 4677ecc55f [CI Skip] bump/beta 9.4.2-2-x
skip-checks: true
2022-09-24 06:16:40 +00:00
Jaco 4038260b37 Deps (#5231) 2022-09-24 09:08:59 +03:00
github-actions[bot] ec87b5b244 [CI Skip] bump/beta 9.4.2-1-x
skip-checks: true
2022-09-23 09:55:34 +00:00
Nikos KontakisandJaco 421f767b0d Add autoconnect to ScProvider (#5217)
* Add autoconnect to ScProvider

* Add autoconnect flag

* remove autoconnect solution and create resubscribe

* Satisfy lint

* Update packages/rpc-provider/src/substrate-connect/ScProvider.ts

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

Co-authored-by: Jaco <jacogr@gmail.com>
2022-09-23 12:47:44 +03:00
github-actions[bot] cfc7e2490c [CI Skip] bump/beta 9.4.2-0-x
skip-checks: true
2022-09-22 08:22:25 +00:00
Jaco 2051a3d772 Bump deps (#5226) 2022-09-22 11:14:40 +03:00
github-actions[bot] 44590fd235 [CI Skip] release/stable 9.4.1
skip-checks: true
2022-09-17 07:20:12 +00:00
Jaco fdd4d3a16d 9.4.1 (#5225) 2022-09-17 10:12:01 +03:00
github-actions[bot] c8307138a9 [CI Skip] bump/beta 9.3.4-8-x
skip-checks: true
2022-09-16 13:25:13 +00:00
Jaco 6e5697fc8e Bump metadata (#5224)
* Bump metadata

* Polkadot & Kusama
2022-09-16 16:14:35 +03:00
github-actions[bot] 0dc114227c [CI Skip] bump/beta 9.3.4-7-x
skip-checks: true
2022-09-16 12:04:50 +00:00
Jaco 006c6b02b1 Bump deps (& align CHANGELOG) (#5223) 2022-09-16 14:56:59 +03:00
github-actions[bot] 6984329a2b [CI Skip] bump/beta 9.3.4-6-x
skip-checks: true
2022-09-16 10:10:24 +00:00
Jaco 954a6f11de Cater for weights 1.5 JSON representation (#5221)
* Cater for weights 1.5 JSON representation

* toBn check
2022-09-16 13:00:50 +03:00
github-actions[bot] 9247a40a15 [CI Skip] bump/beta 9.3.4-5-x
skip-checks: true
2022-09-16 04:53:31 +00:00
Jaco 85ddffde61 Westend 9290 upgrade block (#5220) 2022-09-16 07:45:40 +03:00
github-actions[bot] 4dff632fa6 [CI Skip] bump/beta 9.3.4-4-x
skip-checks: true
2022-09-14 08:27:05 +00:00
Jaco a7e3e15a7a Bump deps (#5216) 2022-09-14 11:18:50 +03:00
github-actions[bot] 385068e542 [CI Skip] bump/beta 9.3.4-3-x
skip-checks: true
2022-09-13 14:18:47 +00:00
Jaco 210454dfe6 Upgrade blocks (#5215)
* Upgrade blocks

* Adjust Polkadot
2022-09-13 17:10:38 +03:00
github-actions[bot] 8264c5db11 [CI Skip] bump/beta 9.3.4-2-x
skip-checks: true
2022-09-13 03:36:43 +00:00
Nikos Kontakis 9e66524714 Bump substrate connect to 0.7.12 (#5214) 2022-09-13 06:28:51 +03:00
github-actions[bot] 77202c4dd3 [CI Skip] bump/beta 9.3.4-1-x
skip-checks: true
2022-09-12 06:15:01 +00:00
Jaco 9d61aaa1f3 Bump deps (#5213) 2022-09-12 09:06:41 +03:00
github-actions[bot] a147a7c769 [CI Skip] bump/beta 9.3.4-0-x
skip-checks: true
2022-09-09 06:15:27 +00:00
Jaco a8b180b387 Bump deps (#5210) 2022-09-09 09:05:39 +03:00
github-actions[bot] 266427c8f4 [CI Skip] release/stable 9.3.3
skip-checks: true
2022-09-06 07:56:49 +00:00
Jaco e94af85e69 9.3.3 (#5207) 2022-09-06 10:47:34 +03:00
github-actions[bot] 9be16a40ef [CI Skip] bump/beta 9.3.3-2-x
skip-checks: true
2022-09-06 07:32:51 +00:00
Jaco 2b92fd94af Fix and adjust tests for AccountId{32, 33} (#5206) 2022-09-06 10:24:36 +03:00
github-actions[bot] 0b6f786108 [CI Skip] bump/beta 9.3.3-1-x
skip-checks: true
2022-09-05 10:43:39 +00:00
Jaco b0a3c206ab Adjust CHANGELOG (#5204) 2022-09-05 13:35:53 +03:00
github-actions[bot] 98ae45c64b [CI Skip] bump/beta 9.3.3-0-x
skip-checks: true
2022-09-05 10:25:10 +00:00
David Duong 116501f89a Avoid reserved words during named enum fields augmentation (#5203) 2022-09-05 13:15:57 +03:00
github-actions[bot] 3cf456f3fa [CI Skip] release/stable 9.3.2
skip-checks: true
2022-09-04 10:19:49 +00:00
Jaco 63e917ca09 9.3.2 (#5202)
* 9.3.2

* Upgrade blocks

* CC ignore

* Fix CC path
2022-09-04 13:08:48 +03:00
github-actions[bot] 76c6b63f29 [CI Skip] bump/beta 9.3.2-0-x
skip-checks: true
2022-09-04 06:52:38 +00:00
Jaco 65dbe9043a Bump metadata (#5200)
* Bump metadata

* Weight mapping

* CHANGELOG
2022-09-04 09:43:20 +03:00
github-actions[bot] ce5ec004b4 [CI Skip] release/stable 9.3.1
skip-checks: true
2022-09-03 07:14:46 +00:00
Jaco 196f91bc92 9.3.1 (#5201) 2022-09-03 10:06:32 +03:00
github-actions[bot] 159ec48029 [CI Skip] bump/beta 9.2.5-6-x
skip-checks: true
2022-09-02 09:06:44 +00:00
Jaco 993e16240d Bump common (#5199) 2022-09-02 11:59:02 +03:00
github-actions[bot] ae6c2aa750 [CI Skip] bump/beta 9.2.5-5-x
skip-checks: true
2022-09-02 05:37:10 +00:00
Jaco 79da77234e Support for ink! v4 metadata (#5195)
* Support for ink! v4 metadata

* Adjust

* Export v4ToLatest

* Adjust expectations
2022-09-02 08:25:12 +03:00
github-actions[bot] 8992e7f2e8 [CI Skip] bump/beta 9.2.5-4-x
skip-checks: true
2022-09-01 14:13:02 +00:00
Jaco 9b1e5f2f25 AccountId33 (#5197)
* Support for ink! v4 metadata

* Adjust

* Support for AccountId33

* Revert "Adjust"

This reverts commit 862e20c3a88de40c6c639b1f51034c296d7f9d16.

* Revert "Support for ink! v4 metadata"

This reverts commit 07d1fc0dba4c4c2e2a52b349e6d84b046ebbd205.

* Adjust

* Adjust, keep exports

* Adjust test

* Adjust

* Sizing
2022-09-01 17:05:07 +03:00
github-actions[bot] a94c0ff11c [CI Skip] bump/beta 9.2.5-3-x
skip-checks: true
2022-09-01 08:58:36 +00:00
Jaco 0db40bc98b Add v4 contract tests (not used yet) (#5194) 2022-09-01 11:50:36 +03:00
github-actions[bot] 4fd5e56af3 [CI Skip] bump/beta 9.2.5-2-x
skip-checks: true
2022-08-31 07:33:05 +00:00
Jaco 38cb10fb24 Adjust pendingRewards for pools runtime calls (#5192) 2022-08-31 10:23:32 +03:00
github-actions[bot] b5ab09fdb1 [CI Skip] bump/beta 9.2.5-1-x
skip-checks: true
2022-08-31 06:40:25 +00:00
Jaco 517baddb25 Bump metadata (#5191) 2022-08-31 09:30:15 +03:00
github-actions[bot] e445a26d5d [CI Skip] bump/beta 9.2.5-0-x
skip-checks: true
2022-08-31 06:06:35 +00:00
Jaco f523325c0a Bump dev (#5190) 2022-08-31 08:58:57 +03:00
github-actions[bot] 55cb602a71 [CI Skip] release/stable 9.2.4
skip-checks: true
2022-08-27 15:27:25 +00:00
Jaco 904b2aafe7 9.2.4 (#5188) 2022-08-27 18:19:25 +03:00
github-actions[bot] 3dee6a9cb4 [CI Skip] bump/beta 9.2.4-6-x
skip-checks: true
2022-08-26 15:06:21 +00:00
Jaco bd113b124e Pin Github actions (#5187) 2022-08-26 17:58:23 +03:00
github-actions[bot] 580039a23c [CI Skip] bump/beta 9.2.4-5-x
skip-checks: true
2022-08-26 13:18:52 +00:00
Jaco 2472ef8c98 Bump TS (#5186)
* Bump TS

* Adjust types

* False positive
2022-08-26 16:10:26 +03:00
github-actions[bot] 020fb1cd09 [CI Skip] bump/beta 9.2.4-4-x
skip-checks: true
2022-08-26 12:01:51 +00:00
Jaco 3cbebb6d71 Typegen with embebbed Enum in Struct (#5185) 2022-08-26 14:52:04 +03:00
github-actions[bot] 138a64c5fb [CI Skip] bump/beta 9.2.4-3-x
skip-checks: true
2022-08-26 10:23:58 +00:00
Jaco efd76e3e20 Align nextTick in decorate with other usages (#5184) 2022-08-26 13:13:14 +03:00
github-actions[bot] 2b562c80b9 [CI Skip] bump/beta 9.2.4-2-x
skip-checks: true
2022-08-24 06:56:42 +00:00
Jaco f9ab3e7029 Remove drr Observable logging (#5179) 2022-08-24 09:46:05 +03:00
github-actions[bot] fdc30fd2c2 [CI Skip] bump/beta 9.2.4-1-x
skip-checks: true
2022-08-24 06:43:23 +00:00
Jaco d2b40660ad Bump common (#5180) 2022-08-24 09:33:48 +03:00
github-actions[bot] c545cffec0 [CI Skip] bump/beta 9.2.4-0-x
skip-checks: true
2022-08-21 06:33:40 +00:00
Jaco 479719fdcc Correct CHANGELOG (#5178) 2022-08-21 09:25:53 +03:00
github-actions[bot] 8a3f938392 [CI Skip] release/stable 9.2.3
skip-checks: true
2022-08-21 06:14:08 +00:00
Jaco 0ccf9ad96f 9.2.3 (#5177) 2022-08-21 09:06:30 +03:00
github-actions[bot] a41d292fc1 [CI Skip] bump/beta 9.2.3-5-x
skip-checks: true
2022-08-21 05:53:41 +00:00
Jaco aacebcabb5 Remove unneeded TryRuntime state call defs (#5176) 2022-08-21 08:46:02 +03:00
github-actions[bot] 17c6ef7527 [CI Skip] bump/beta 9.2.3-4-x
skip-checks: true
2022-08-20 13:06:04 +00:00
Jaco b252f13210 Bump static metadata (#5175) 2022-08-20 15:57:58 +03:00
Jaco 64360b3598 Fallback for StakingLedger at 1050 (#5171)
* Fallback for StakingLedger at 1050

* CHANGELOG
2022-08-19 12:00:17 +03:00
github-actions[bot] 0acb0ab226 [CI Skip] bump/beta 9.2.3-3-x
skip-checks: true
2022-08-19 08:49:31 +00:00
Jaco d32e219d7e Bump pjs/dev (#5174) 2022-08-19 11:41:19 +03:00
github-actions[bot] a1029dc0ba [CI Skip] bump/beta 9.2.3-2-x
skip-checks: true
2022-08-18 12:20:28 +00:00
Nikos Kontakis eef50a759d Bump substrate-connect to 0.7.11 (#5173) 2022-08-18 15:09:39 +03:00
github-actions[bot] 2bad0f4799 [CI Skip] bump/beta 9.2.3-1-x
skip-checks: true
2022-08-16 15:49:52 +00:00
Jaco 9756d33664 Update rpc-provider README (#5168) 2022-08-16 18:42:12 +03:00
github-actions[bot] 1ea50757c6 [CI Skip] bump/beta 9.2.3-0-x
skip-checks: true
2022-08-16 14:57:47 +00:00
Jaco 26e550fe6c Use constant for latest extrinsic version (#5167) 2022-08-16 17:50:03 +03:00
github-actions[bot] 69c129595e [CI Skip] release/stable 9.2.2
skip-checks: true
2022-08-16 08:27:59 +00:00
Jaco 3f79415e02 9.2.2 (#5166) 2022-08-16 11:18:06 +03:00
github-actions[bot] 8747cd4682 [CI Skip] bump/beta 9.2.2-2-x
skip-checks: true
2022-08-16 07:46:53 +00:00
Jaco dd9e96c3e7 Disable version shortcuts (less performant, more robust) (#5165) 2022-08-16 10:38:51 +03:00
github-actions[bot] 1c93388de7 [CI Skip] bump/beta 9.2.2-1-x
skip-checks: true
2022-08-16 07:38:42 +00:00
Jaco 7a87034f0e Upgrades with API list (#5164)
* Add runtime APIs to known list

* First pass

* Add generated

* Rerun

* tsconfig adjustments

* Pass APIs through

* Missing package.json entry
2022-08-16 10:28:55 +03:00
github-actions[bot] 9e4db51dd7 [CI Skip] bump/beta 9.2.2-0-x
skip-checks: true
2022-08-15 07:56:55 +00:00
Jaco 5382cb60b0 Use call.transactionPaymentApi.queryInfo (#5160)
* Use call.transactionPaymentApi.queryInfo

* Asserts for availability
2022-08-15 10:48:24 +03:00
github-actions[bot] d6b2760de5 [CI Skip] release/stable 9.2.1
skip-checks: true
2022-08-13 07:47:29 +00:00
Jaco 2ee89b8c72 9.2.1 (#5158) 2022-08-13 10:39:36 +03:00
github-actions[bot] 802da709f0 [CI Skip] bump/beta 9.1.2-8-x
skip-checks: true
2022-08-13 07:19:23 +00:00
Jaco 836346909f Adjust definitions check test (ensure failures via raw) (#5157)
* Adjust definitions check test (ensure failures via raw)

* Adjust

* Chain error path
2022-08-13 10:10:51 +03:00
Jaco 8ec5c2abc3 Adjust ietartion argument check (#5156) 2022-08-13 10:03:25 +03:00
github-actions[bot] cc953efd58 [CI Skip] bump/beta 9.1.2-7-x
skip-checks: true
2022-08-13 06:51:13 +00:00
Jaco 857b9cbaea Bump metadata & Webstend 9271 (#5155) 2022-08-13 09:42:28 +03:00
github-actions[bot] 4551093fe7 [CI Skip] bump/beta 9.1.2-6-x
skip-checks: true
2022-08-12 12:27:35 +00:00
Jaco 69afe1a203 Add definitions type check (#5153)
* Add definitions type check

* RPC tests, types tests & adjustments

* Rebuild

* Run runtime & rpc checks
2022-08-12 15:20:05 +03:00
github-actions[bot] f5600afa31 [CI Skip] bump/beta 9.1.2-5-x
skip-checks: true
2022-08-12 09:34:50 +00:00
Jaco 3f0a471484 Bump deps (#5152)
* Bump deps

* BN import map
2022-08-12 12:27:01 +03:00
github-actions[bot] bc0e2cfc14 [CI Skip] bump/beta 9.1.2-4-x
skip-checks: true
2022-08-11 19:18:33 +00:00
Jaco 3e9d2d6b8f Bump dev & re-export ScProvider (#5150)
* Bump dev & re-export ScProvider

* CHANGELOG

* Expose WellKnownChain on ScProvider

* Adjust ScProvider method formatting

* Adjust CHANGELOG
2022-08-11 22:10:45 +03:00
github-actions[bot] 3b48825fe6 [CI Skip] bump/beta 9.1.2-3-x
skip-checks: true
2022-08-10 11:58:08 +00:00
Jaco 5e4e5cbaa7 Additional contracts tests (#5147) 2022-08-10 14:50:27 +03:00
github-actions[bot] 255b8047b7 [CI Skip] bump/beta 9.1.2-2-x
skip-checks: true
2022-08-10 08:31:49 +00:00
Jaco 87edaa5bed Add Polkadot 9260 upgrade block (#5145) 2022-08-10 11:23:35 +03:00
github-actions[bot] 8a58f018a7 [CI Skip] bump/beta 9.1.2-1-x
skip-checks: true
2022-08-09 09:32:27 +00:00
Jaco e39be09c97 Don't assume fully-specified variant/composite paths (#5143)
* Don't assume fully-specified variant/composite paths

* CHANGELOG
2022-08-09 12:24:27 +03:00
github-actions[bot] 007b4aa6c1 [CI Skip] bump/beta 9.1.2-0-x
skip-checks: true
2022-08-07 09:01:43 +00:00
Jaco cc2a4dbfdd Bump dev (#5141) 2022-08-07 11:54:16 +03:00
github-actions[bot] e2cde32cba [CI Skip] release/stable 9.1.1
skip-checks: true
2022-08-06 12:20:19 +00:00
Jaco 2a5f584f42 9.1.1 (#5139) 2022-08-06 15:10:04 +03:00
github-actions[bot] cc60eeb663 [CI Skip] bump/beta 9.0.2-10-x
skip-checks: true
2022-08-06 12:00:05 +00:00
Jaco edb0a40843 Adjust to KitchensinkRuntimeSessionKeys in derive (#5138) 2022-08-06 14:52:28 +03:00
Jaco f0c45733ee Bump all static metadata (#5137) 2022-08-06 14:33:51 +03:00
github-actions[bot] a40028a1e4 [CI Skip] bump/beta 9.0.2-9-x
skip-checks: true
2022-08-05 13:59:04 +00:00
Jaco 789089c80d Bump util (#5136) 2022-08-05 16:51:23 +03:00
github-actions[bot] 41925a9893 [CI Skip] bump/beta 9.0.2-8-x
skip-checks: true
2022-08-05 06:10:57 +00:00
Jaco 4ac3a1fa80 Bump dev (#5135) 2022-08-05 09:00:54 +03:00
github-actions[bot] 5025e3656d [CI Skip] bump/beta 9.0.2-7-x
skip-checks: true
2022-08-05 05:47:42 +00:00
Jaco e0a7ff8c8d Detect runtime logs on spec names (#5134) 2022-08-05 08:39:25 +03:00
github-actions[bot] 36aea69b75 [CI Skip] bump/beta 9.0.2-6-x
skip-checks: true
2022-08-05 05:11:41 +00:00
Jaco 74c7925491 Adjust decoration cache for apiAt queries (#5133) 2022-08-05 08:03:32 +03:00
github-actions[bot] f1edf476e8 [CI Skip] bump/beta 9.0.2-5-x
skip-checks: true
2022-08-04 14:35:47 +00:00
Jaco b321a4adbc Keep count of runtime decorations (#5130) 2022-08-04 17:27:35 +03:00
github-actions[bot] d7f87defee [CI Skip] bump/beta 9.0.2-4-x
skip-checks: true
2022-08-04 12:36:24 +00:00
Jaco 420b1d9724 CHANGELOG (#5129) 2022-08-04 15:25:55 +03:00
github-actions[bot] bc0391ef3e [CI Skip] bump/beta 9.0.2-3-x
skip-checks: true
2022-08-04 12:15:07 +00:00
Yaroslav Bolyukin 296cffa266 feat: allow objects to be supplied as map keys (#5128) 2022-08-04 15:02:22 +03:00
github-actions[bot] 77a9b2bfdf [CI Skip] bump/beta 9.0.2-2-x
skip-checks: true
2022-08-02 06:24:31 +00:00
Jaco b0109c1c83 Add noInitWarn to API options (#5125) 2022-08-02 09:16:17 +03:00
github-actions[bot] 37033f5068 [CI Skip] bump/beta 9.0.2-1-x
skip-checks: true
2022-08-02 04:41:10 +00:00
Jaco ed9a760bcb Bump deps (#5124)
* Bump deps

* CHANGELOG
2022-08-02 07:33:40 +03:00
github-actions[bot] b4eda7d137 [CI Skip] bump/beta 9.0.2-0-x
skip-checks: true
2022-08-02 04:12:19 +00:00
Nikos Kontakis 830871515b Bump substrate connect to 0.7.10; Fixes #5120 (#5123) 2022-08-02 07:04:49 +03:00
github-actions[bot] e4a19dcefd [CI Skip] release/stable 9.0.1
skip-checks: true
2022-07-30 04:39:21 +00:00
Jaco 11d5a4edf0 9.0.1 (#5119) 2022-07-30 07:31:39 +03:00
github-actions[bot] 2eb901a954 [CI Skip] bump/beta 8.14.2-14-x
skip-checks: true
2022-07-29 15:36:45 +00:00
Jaco b63164d6ea Bump Substrate, Polkadot & Kusama static metadata (#5118)
* Bump Substrate, Polkadot & Kusama static metadata

* continue-on-error: true
2022-07-29 18:28:34 +03:00
github-actions[bot] c40fa16217 [CI Skip] bump/beta 8.14.2-13-x
skip-checks: true
2022-07-29 10:34:03 +00:00
Jaco afcbe96fd1 Bump common (#5117) 2022-07-29 13:25:00 +03:00
github-actions[bot] 7d53c4b45d [CI Skip] release/beta 8.14.2-12
skip-checks: true
2022-07-29 08:18:14 +00:00
Jaco 62bfcf84dd Ensure call is exposed on rx (#5116)
* Ensure call is exposed on rx

* Adjust to only top-level detection

* .123npm

* Adjust check for contractsApi
2022-07-29 11:10:05 +03:00
github-actions[bot] b2cfac4edd [CI Skip] release/beta 8.14.2-11
skip-checks: true
2022-07-29 07:23:24 +00:00
Jaco 7b2e5ed59f Publish beta to npm (#5115) 2022-07-29 10:12:55 +03:00
github-actions[bot] fdab9818d5 [CI Skip] bump/beta 8.14.2-10-x
skip-checks: true
2022-07-29 06:39:53 +00:00
Jaco 85fc0bff7d Rename alliance derive location (#5114) 2022-07-29 09:31:37 +03:00
github-actions[bot] 7a545de0c2 [CI Skip] bump/beta 8.14.2-9-x
skip-checks: true
2022-07-28 08:55:28 +00:00
Jaco b22b26d021 Support for alliance motion derives (#5113)
* Support for alliance motion derives

* allianceMotion
2022-07-28 11:46:45 +03:00
github-actions[bot] 30f72f915e [CI Skip] bump/beta 8.14.2-8-x
skip-checks: true
2022-07-26 11:06:22 +00:00
Jaco b522bc76af Upgrade blocks (#5111)
* Upgrade blocks

* CHANGELOG
2022-07-26 13:55:59 +03:00
github-actions[bot] fee3c6b1be [CI Skip] bump/beta 8.14.2-7-x
skip-checks: true
2022-07-26 06:42:45 +00:00
Jaco 79bed8eda3 Prototype static init Enum/Set/Struct (#5087)
* Prototype static init Enum/Set/Struct

* Adjust (similar, logic extracted - further local testing)

* Adjust with latest util (no prototype atm)

* Introduce prototype assignment

* Old Enum tests

* Fix toCallsOnly spread

* Adjust

* Use objectSpread in derives (decorated objects only)

* Adjust

* Remove extra map from bag get

* Additional spreads

* Signer spread

* Formatting

* typo

* Adjust spreads for session

* Additional spread

* Adjust spread

* Formatting

* CHANGELOG

* Adjust

* slice

* CHANGELOG
2022-07-26 09:34:59 +03:00
github-actions[bot] 1aae7b59bb [CI Skip] bump/beta 8.14.2-6-x
skip-checks: true
2022-07-26 06:25:24 +00:00
Jaco 2d84bac287 Remove API deprecated interfaces (#5109)
* Remove API deprecated interfaces

* Adjust checkTypes

* CHANGELOG
2022-07-26 09:17:23 +03:00
github-actions[bot] 789957b0af [CI Skip] bump/beta 8.14.2-5-x
skip-checks: true
2022-07-26 06:01:27 +00:00
Jaco d26f289199 Remove deprecated api-contract methods (#5110)
* Remove deprecated api-contract methods

* Remove checkTypes deprecated
2022-07-26 08:53:05 +03:00
github-actions[bot] 1fe06e63e5 [CI Skip] bump/beta 8.14.2-4-x
skip-checks: true
2022-07-26 04:56:00 +00:00
Jaco 3790f48e03 Specific check for storageDepositLimit support (#5108)
* Specific check for storageDepositLimit support

* Adjust asserts
2022-07-26 07:48:21 +03:00
github-actions[bot] fc5aae8a84 [CI Skip] bump/beta 8.14.2-3-x
skip-checks: true
2022-07-25 13:33:46 +00:00
Jaco 0c79e13aba Convert api-contract usage of api.rpc.* to api.call.* (#5107)
* Convert api-contract usage of api.rpc.* to api.call.*

* Cast call (augmentation not available in build)

* Revert tx check assert

* Call mock
2022-07-25 16:22:26 +03:00
github-actions[bot] 6e65bdbb5c [CI Skip] bump/beta 8.14.2-2-x
skip-checks: true
2022-07-25 11:36:02 +00:00
Jaco 95d113e03f Export api.rx.call.* (#5106)
* Export api.rx.call.*

* Adjust
2022-07-25 14:27:48 +03:00
github-actions[bot] a9a92d0bf8 [CI Skip] bump/beta 8.14.2-1-x
skip-checks: true
2022-07-25 11:25:21 +00:00
Jaco c1fb6e8218 CHANGELOG 2022-07-25 14:17:08 +03:00
github-actions[bot] 7cfc1950ae [CI Skip] bump/beta 8.14.2-0-x
skip-checks: true
2022-07-25 06:36:11 +00:00
Jaco fabf9e9160 Adjust augmentation methods (#5104) 2022-07-25 09:27:59 +03:00
208 changed files with 34213 additions and 16900 deletions
+1
View File
@@ -25,3 +25,4 @@ exclude_patterns:
- "packages/typegen/src"
- "packages/types/src/interfaces/"
- "packages/types/src/augment/"
- "packages/types-known/src/upgrades/e2e/"
+1 -1
View File
@@ -9,7 +9,7 @@ jobs:
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && (!github.event.pull_request || github.event.pull_request.head.repo.full_name == github.repository)"
runs-on: ubuntu-latest
steps:
- uses: jacogr/action-approve@master
- uses: jacogr/action-approve@9d6ce78d26f23ad29d009d034822cf773f2cb50e
with:
authors: jacogr
labels: -auto
+1 -1
View File
@@ -8,7 +8,7 @@ jobs:
merge:
runs-on: ubuntu-latest
steps:
- uses: jacogr/action-merge@master
- uses: jacogr/action-merge@3b4b49af8a8644bf5cbb5409ee236abe04eeb1b0
with:
checks: build,lint,test
labels: -auto
+1 -1
View File
@@ -10,7 +10,7 @@ jobs:
env:
YARN_ENABLE_SCRIPTS: false
steps:
- uses: dessant/lock-threads@v2
- uses: dessant/lock-threads@f1a42f0f44eb83361d617a014663e1a76cf282d2
with:
github-token: ${{ secrets.GH_PAT_BOT }}
issue-lock-inactive-days: '7'
+2 -2
View File
@@ -11,8 +11,8 @@ jobs:
env:
YARN_ENABLE_SCRIPTS: false
steps:
- uses: actions/checkout@v2
- uses: denoland/setup-deno@v1
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e
- uses: denoland/setup-deno@004814556e37c54a2f6e31384c9e18e983317366
with:
deno-version: vx.x.x
- name: ${{ matrix.step }}
+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e
with:
fetch-depth: 0
token: ${{ secrets.GH_PAT }}
+2 -2
View File
@@ -12,8 +12,8 @@ jobs:
env:
YARN_ENABLE_SCRIPTS: false
steps:
- uses: actions/checkout@v2
- uses: returntocorp/semgrep-action@v1
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e
- uses: returntocorp/semgrep-action@aeafd770072c4f48798b991e3449592bddc2c435
with:
auditOn: push
publishToken: ${{ secrets.SEMGREP_APP_TOKEN }}
+1 -1
View File
@@ -9,7 +9,7 @@ jobs:
env:
YARN_ENABLE_SCRIPTS: false
steps:
- uses: actions/stale@v3
- uses: actions/stale@98ed4cb500039dbcccf4bd9bedada4d0187f2757
with:
repo-token: ${{ secrets.GH_PAT_BOT }}
stale-issue-message: 'This issue has been open for 21 days with no activity and is not labelled as an enhancement. It will be closed in 7 days.'
+138
View File
@@ -1,5 +1,143 @@
# CHANGELOG
## 9.4.2 Sep 24, 2022
Contributed:
- Allow for re-subscriptions on `ScProvider` (Thanks to https://github.com/wirednkod)
Changes:
- Align derives to cater for latest (& previous) Substrate interfaces
- Update to latest Substrate, Polkadot & Kusama metadata
## 9.4.1 Sep 17, 2022
Contributed:
- Update `@substrate/connect` to latest (Thanks to https://github.com/wirednkod)
Changes:
- Cater for v1.5 Weight JSON representation (via RPC)
- Polkadot 9270, Kusama 9280 & Westend 9290 upgrade blocks
- Update to latest Substrate, Polkadot & Kusama metadata
## 9.3.3 Sep 6, 2022
Contributed:
- Ensure JS reserved words are aliassed in types (Thanks to https://github.com/dqbd)
Changes:
- Fix and adjust tests for `AccountId{32, 33}`
## 9.3.2 Sep 4, 2022
Changes:
- Cater for v1.5 Weight types (structure to inner value)
- Westend 9280 & Kusama 9271 upgrade blocks
- Update to latest Substrate, Polkadot & Kusama metadata
## 9.3.1 Sep 3, 2022
Changes:
- Support for ink! v4 metadata
- Adjust pool runtime call `pendingRewards` return type
- Support for `AccountId33` (raw/compressed 33-byte ecdsa)
- Update to latest Substrate, Polkadot & Kusama metadata
## 9.2.4 Aug 27, 2022
Changes:
- Remove extra error logging in internal rpc-core Observable
- Allow for embebbed `Enum` in `Struct` typegen (no `lookupName`)
## 9.2.3 Aug 21, 2022
Contributed:
- Update `@substrate/connect` to latest (Thanks to https://github.com/wirednkod)
Changes:
- Adjust `StakingLedger` with fallback for Kusama 1050 (2 different structures on-chain)
- Remove `TryRuntime` state call definitions (only off-chain usage)
- Update to latest Substrate, Polkadot & Kusama metadata
## 9.2.2 Aug 16, 2022
Changes:
- Replace `rpc.payment.queryInfo` usage with `call.transactionPaymentApi.queryInfo`
- Ensure that `api.call.*` is decorated on historic blocks
## 9.2.1 Aug 13, 2022
- **Important** If using `import { WellKnownChain } from '@polkadot/rpc-provider'` it is recommended that you rather use `ScProvider.WellKnownChain` (the import may be dropped in a future major version)
Changes:
- Don't assume non-empty path specifiers on portable variant/composites
- Explicit param length checks for all generic portable overrides
- Re-export `ScProvider` in `@polkadot/api`, aligning with `{Http, Ws}Provider`
- Expose `WellKnownChain` as static on `ScProvider.WellKnownChain`
- Checks for non-available interface types & runtime/rpc definitions
- Ensure `.entries/.keys` arguments is less than map-entry query
- Add Polkadot 9260 upgrade block
- Add Westend 9271 upgrade block
- Update to latest Substrate metadata
## 9.1.1 Aug 6, 2022
Contributed:
- Update `@substrate/connect` to latest (Thanks to https://github.com/wirednkod)
- Handle both string and object keys in `CodecMap` (Thanks to https://github.com/CertainLach)
Changes:
- Add `noInitWarn: boolean` flag to API options, disabling runtime & RPC warnings
- Only log missing runtime calls on new (detected) specVersion
- Add shallow/one-blockHash cache for `api.at(...)` instances
- Add Westend 9270 upgrade block
- Update to latest Substrate, Polkadot & Kusama metadata
## 9.0.1 Jul 30, 2022
- **Breaking change** The decorated field getters on `Struct` were moved to the prototype class for performance reasons. While `struct.<field>` access still behaves in the same way, with the same results, this does mean that the prototype getters are not visible when doing an `Object.keys(struct)` or when doing an object spread.
- **Breaking change** Deprecated interfaces have been removed including `tx.sign(...)` (use `signAsync`), `Result.{is, as}Error` (use `{is, as}Err`) as well as storage `.range(...)` operations.
- **Breaking change** Deprecated interfaces on `api-contract` have been removed. Always ensure you pass an options object to construction and query methods.
- **Breaking change** Contracts access via `api-contract` will now detect the usage of `storageDepositLimit` in params, if not available the contract interfaces will not be decorated.
Changes:
- Decorate `Struct/Enum/Set` field getters on class prototypes
- Convert `api-contract` usage of `api.rpc.*` to `api.call.*`
- Drop support for contract runtimes without `storageDepositLimit` (runtime `contractsApi` only has support for latest)
- Export `api.rx.call.*` for internal usage (derive, contracts)
- Remove old-style param passing as opposed to options in `api-contract`
- Support for alliance/motion collective derives
- Add Kusama 9260 upgrade block
- Add Polkadot 9230 & 9250 upgrade blocks
- Add Westend 9251, 9260 & 9261 upgrade blocks
- Update to latest Substrate, Polkadot & Kusama metadata
## 8.14.1 Jul 23, 2022
Contributed:
+4 -3
View File
@@ -1,13 +1,13 @@
3150 Jaco 8.14.1 (#5102)
3233 Jaco 9.4.2 (#5235)
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
37 Keith Ingram Update contract types and rpc (#4541)
35 Stefanie Doll Updated child storage parameters (#1709)
20 Luke Schoen fix: Fixes TypeError: Cannot read property 'vesting' of undefined (#1970)
16 Xiliang Chen implement entriesPaged and keysPages for query at (#4701)
15 Jeremías Díaz feat(types): add correct tuple type to storage key (#3054)
12 Nikos Kontakis Add resubscription delete on unsubscribe (#5230)
11 Ian He HttpProvider support clone() (#3949)
10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954)
7 Nikos Kontakis Bump substrate connect to 0.7.9 (Add CommonJS Support) (#5088)
5 Chevdor Fix metadata package link (#3458)
5 Jake Naviasky Fixing approvalFlagsToBools. (#1250)
4 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
@@ -41,6 +41,7 @@
2 sung wu Update tx.md (#2485)
2 Veliko Abi constructor takes different parameters (#3347)
2 Wei Tang Use /usr/bin/env bash instead of /bin/bash (#2053)
2 Yaroslav Bolyukin feat: allow objects to be supplied as map keys (#5128)
2 Zannis Kalampoukis fix: Typegen handles structs and vectors of structs without erroring (#4743)
2 扩散性百万甜面包 Typo, deocrateMethod -> decorateMethod (#1594)
1 Alan Sapede Adds Eth feeHistory & maxPriorityFeePerGas rpc (#4956)
@@ -54,6 +55,7 @@
1 Daniel Maricic Fixed typo in README (#2402)
1 Daniel Savu fix: Generate custom type definitions (#4224)
1 David Don't log full error (#2952)
1 David Duong Avoid reserved words during named enum fields augmentation (#5203)
1 Denis Tsai realign AccountKey20Junction to polkadot xcm's Junction enum (#3770)
1 djuanito.eth Update fees to current constants (#2320)
1 Drew Stone Update evm definitions to include vicinity (#2279)
@@ -101,7 +103,6 @@
1 Sergei Pepyakin INK! -> ink! (#1347)
1 WoeOm adapt Darwinia, Crab Network types (#3498)
1 Xat_MassacrE Fix packages/types/src/codec/utils/encodeTypes.ts encodeSubTypes bug (#1544)
1 Yaroslav Bolyukin Support BTreeMap/BTreeSet in typegen (#4682)
1 yjh fix MetadataVersioned.asV12 (#2983)
1 Yuri fixes #3693 Fix uniques return types (#3694)
1 Zeke Mostov fix: Allow sudo for polkadot indexed proxy enum (#3286)
+5
View File
@@ -0,0 +1,5 @@
{
"imports": {
"https://esm.sh/v90/@types/bn.js@~5.2/index.d.ts": "https://esm.sh/v90/@types/bn.js@5.1.0/index.d.ts"
}
}
+10 -8
View File
@@ -11,10 +11,10 @@
},
"sideEffects": false,
"type": "module",
"version": "8.14.1",
"version": "9.4.2",
"versions": {
"git": "8.14.1",
"npm": "8.14.1"
"git": "9.4.2",
"npm": "9.4.2"
},
"workspaces": [
"packages/*"
@@ -23,8 +23,10 @@
"build": "yarn build:interfaces && polkadot-dev-build-ts",
"build:extra": "(cd packages/typegen && copyfiles scripts/* build)",
"build:interfaces": "polkadot-types-internal-interfaces",
"build:metadata": "yarn build:interfaces && yarn test:one packages/types/src/metadata/v14",
"build:release": "polkadot-ci-ghact-build",
"build:rollup": "polkadot-exec-rollup --config",
"build:upgrades": "yarn test:one packages/types-known/src/upgrades/e2e",
"chain:info": "polkadot-types-chain-info",
"clean": "polkadot-dev-clean-build",
"deno": "yarn polkadot-dev-deno-map && yarn build && deno check --import-map=import_map.json mod.ts",
@@ -34,15 +36,15 @@
"test:one": "NODE_OPTIONS=--experimental-vm-modules polkadot-dev-run-test --detectOpenHandles --forceExit"
},
"devDependencies": {
"@babel/core": "^7.18.9",
"@babel/core": "^7.19.1",
"@babel/register": "^7.18.9",
"@babel/runtime": "^7.18.9",
"@polkadot/dev": "^0.67.84",
"@babel/runtime": "^7.19.0",
"@polkadot/dev": "^0.67.132",
"@polkadot/typegen": "workspace:packages/typegen",
"@types/jest": "^28.1.6",
"@types/jest": "^29.0.3",
"copyfiles": "^2.4.1"
},
"resolutions": {
"typescript": "^4.7.4"
"typescript": "^4.8.3"
}
}
+9 -9
View File
@@ -20,18 +20,18 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.14.1",
"version": "9.4.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.18.9",
"@polkadot/api-base": "8.14.1",
"@polkadot/rpc-augment": "8.14.1",
"@polkadot/types": "8.14.1",
"@polkadot/types-augment": "8.14.1",
"@polkadot/types-codec": "8.14.1",
"@polkadot/util": "^10.1.1"
"@babel/runtime": "^7.19.0",
"@polkadot/api-base": "9.4.2",
"@polkadot/rpc-augment": "9.4.2",
"@polkadot/types": "9.4.2",
"@polkadot/types-augment": "9.4.2",
"@polkadot/types-codec": "9.4.2",
"@polkadot/util": "^10.1.9"
},
"devDependencies": {
"@polkadot/types-support": "8.14.1"
"@polkadot/types-support": "9.4.2"
}
}
+46 -6
View File
@@ -8,8 +8,8 @@ import '@polkadot/api-base/types/consts';
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { Codec } from '@polkadot/types-codec/types';
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
import type { Perbill, Percent, Permill, Weight } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight } from '@polkadot/types/lookup';
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
@@ -258,6 +258,9 @@ declare module '@polkadot/api-base/types/consts' {
* take place over multiple blocks.
**/
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
**/
@@ -302,7 +305,7 @@ declare module '@polkadot/api-base/types/consts' {
* this pallet), then [`MinerConfig::solution_weight`] is used to compare against
* this value.
**/
signedMaxWeight: u64 & AugmentedConst<ApiType>;
signedMaxWeight: Weight & AugmentedConst<ApiType>;
/**
* Duration of the signed phase.
**/
@@ -506,6 +509,21 @@ declare module '@polkadot/api-base/types/consts' {
* Number of runners_up to keep.
**/
desiredRunnersUp: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of candidates in a phragmen election.
*
* Warning: The election happens onchain, and this value will determine
* the size of the election. When this limit is reached no more
* candidates are accepted in the election.
**/
maxCandidates: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of voters to allow in a phragmen election.
*
* Warning: This impacts the size of the election which is run onchain.
* When the limit is reached the new voters are ignored.
**/
maxVoters: u32 & AugmentedConst<ApiType>;
/**
* Identifier for the elections-phragmen pallet's lock
**/
@@ -635,7 +653,7 @@ declare module '@polkadot/api-base/types/consts' {
* The maximum weight that may be scheduled per block for any dispatchables of less
* 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.
* Not strictly enforced, but used for weight estimation.
@@ -709,6 +727,28 @@ declare module '@polkadot/api-base/types/consts' {
* Number of eras that staked funds must remain bonded for.
**/
bondingDuration: u32 & AugmentedConst<ApiType>;
/**
* Number of eras to keep in history.
*
* Following information is kept for eras in `[current_era -
* HistoryDepth, current_era]`: `ErasStakers`, `ErasStakersClipped`,
* `ErasValidatorPrefs`, `ErasValidatorReward`, `ErasRewardPoints`,
* `ErasTotalStake`, `ErasStartSessionIndex`,
* `StakingLedger.claimed_rewards`.
*
* Must be more than the number of eras delayed by session.
* I.e. active era must always be in history. I.e. `active_era >
* current_era - history_depth` must be guaranteed.
*
* If migrating an existing pallet from storage value to config value,
* this should be set to same value or greater as in storage.
*
* Note: `HistoryDepth` is used as the upper bound for the `BoundedVec`
* item `StakingLedger.claimed_rewards`. Setting this value lower than
* the existing value can lead to inconsistencies and will need to be
* handled properly in a migration.
**/
historyDepth: u32 & AugmentedConst<ApiType>;
/**
* Maximum number of nominations per nominator.
**/
@@ -757,9 +797,9 @@ declare module '@polkadot/api-base/types/consts' {
/**
* The weight of runtime database operations the runtime can invoke.
**/
dbWeight: FrameSupportWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
dbWeight: SpWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
/**
* The designated SS85 prefix of this chain.
* The designated SS58 prefix of this chain.
*
* This replaces the "ss58Format" property declared in the chain spec. Reason is
* that the runtime should know about the prefix in order to make use of it as
@@ -752,6 +752,10 @@ declare module '@polkadot/api-base/types/errors' {
* The target is invalid.
**/
InvalidTarget: AugmentedError<ApiType>;
/**
* The provided judgement was for a different identity.
**/
JudgementForDifferentIdentity: AugmentedError<ApiType>;
/**
* Judgement given.
**/
@@ -1678,6 +1682,10 @@ declare module '@polkadot/api-base/types/errors' {
* A nomination target was supplied that was blocked or otherwise not a validator.
**/
BadTarget: AugmentedError<ApiType>;
/**
* Some bound is not met.
**/
BoundNotMet: AugmentedError<ApiType>;
/**
* The user has enough bond and thus cannot be chilled forcefully by an external person.
**/
+26 -21
View File
@@ -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 { ITuple } from '@polkadot/types-codec/types';
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, KusamaRuntimeProxyType, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletStakingExposure, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
import type { AccountId32, H256, Weight } from '@polkadot/types/interfaces/runtime';
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>;
@@ -338,10 +338,15 @@ declare module '@polkadot/api-base/types/events' {
};
electionProviderMultiPhase: {
/**
* The election has been finalized, with `Some` of the given computation, or else if the
* election failed, `None`.
* An election failed.
*
* Not much can be said about which computes failed in the process.
**/
ElectionFinalized: AugmentedEvent<ApiType, [electionCompute: Option<PalletElectionProviderMultiPhaseElectionCompute>], { electionCompute: Option<PalletElectionProviderMultiPhaseElectionCompute> }>;
ElectionFailed: AugmentedEvent<ApiType, []>;
/**
* The election has been finalized, with the given computation and score.
**/
ElectionFinalized: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore], { compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore }>;
/**
* An account has been rewarded for their signed submission being finalized.
**/
@@ -362,7 +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.
**/
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.
**/
@@ -585,12 +590,12 @@ declare module '@polkadot/api-base/types/events' {
* pool.
* - `points` is the number of points that are issued as a result of `balance` being
* dissolved into the corresponding unbonding pool.
*
* - `era` is the era in which the balance will be unbonded.
* In the absence of slashing, these values will match. In the presence of slashing, the
* number of points that are issued in the unbonding pool will be less than the amount
* requested to be unbonded.
**/
Unbonded: AugmentedEvent<ApiType, [member: AccountId32, poolId: u32, balance: u128, points: u128], { member: AccountId32, poolId: u32, balance: u128, points: u128 }>;
Unbonded: AugmentedEvent<ApiType, [member: AccountId32, poolId: u32, balance: u128, points: u128, era: u32], { member: AccountId32, poolId: u32, balance: u128, points: u128, era: u32 }>;
/**
* The unbond pool at `era` of pool `pool_id` has been slashed to `balance`.
**/
@@ -773,11 +778,6 @@ declare module '@polkadot/api-base/types/events' {
* An announcement was placed to make a call in the future.
**/
Announced: AugmentedEvent<ApiType, [real: AccountId32, proxy: AccountId32, callHash: H256], { real: AccountId32, proxy: AccountId32, callHash: H256 }>;
/**
* Anonymous account has been created by new proxy with given
* disambiguation index and proxy type.
**/
AnonymousCreated: AugmentedEvent<ApiType, [anonymous: AccountId32, who: AccountId32, proxyType: KusamaRuntimeProxyType, disambiguationIndex: u16], { anonymous: AccountId32, who: AccountId32, proxyType: KusamaRuntimeProxyType, disambiguationIndex: u16 }>;
/**
* A proxy was added.
**/
@@ -790,6 +790,11 @@ declare module '@polkadot/api-base/types/events' {
* A proxy was removed.
**/
ProxyRemoved: AugmentedEvent<ApiType, [delegator: AccountId32, delegatee: AccountId32, proxyType: KusamaRuntimeProxyType, delay: u32], { delegator: AccountId32, delegatee: AccountId32, proxyType: KusamaRuntimeProxyType, delay: u32 }>;
/**
* A pure account has been created by new proxy with given
* disambiguation index and proxy type.
**/
PureCreated: AugmentedEvent<ApiType, [pure: AccountId32, who: AccountId32, proxyType: KusamaRuntimeProxyType, disambiguationIndex: u16], { pure: AccountId32, who: AccountId32, proxyType: KusamaRuntimeProxyType, disambiguationIndex: u16 }>;
/**
* Generic event
**/
@@ -993,8 +998,8 @@ declare module '@polkadot/api-base/types/events' {
**/
Rewarded: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
* One validator (and its nominators) has been slashed by the given amount.
* \[validator, amount\]
* One staker (and potentially its nominators) has been slashed by the given amount.
* \[staker, amount\]
**/
Slashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
@@ -1031,11 +1036,11 @@ declare module '@polkadot/api-base/types/events' {
/**
* An extrinsic failed.
**/
ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo }>;
ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportDispatchDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportDispatchDispatchInfo }>;
/**
* An extrinsic completed successfully.
**/
ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchInfo: FrameSupportWeightsDispatchInfo }>;
ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportDispatchDispatchInfo], { dispatchInfo: FrameSupportDispatchDispatchInfo }>;
/**
* An account was reaped.
**/
@@ -1213,14 +1218,14 @@ declare module '@polkadot/api-base/types/events' {
*
* \[ para, id, overweight_index, required \]
**/
OverweightEnqueued: AugmentedEvent<ApiType, [u32, U8aFixed, u64, u64]>;
OverweightEnqueued: AugmentedEvent<ApiType, [u32, U8aFixed, u64, Weight]>;
/**
* Upward message from the overweight queue was executed with the given actual weight
* used.
*
* \[ overweight_index, used \]
**/
OverweightServiced: AugmentedEvent<ApiType, [u64, u64]>;
OverweightServiced: AugmentedEvent<ApiType, [u64, Weight]>;
/**
* Upward message is unsupported version of XCM.
* \[ id \]
@@ -1235,7 +1240,7 @@ declare module '@polkadot/api-base/types/events' {
* The weight limit for handling upward messages was reached.
* \[ id, remaining, required \]
**/
WeightExhausted: AugmentedEvent<ApiType, [U8aFixed, u64, u64]>;
WeightExhausted: AugmentedEvent<ApiType, [U8aFixed, Weight, Weight]>;
/**
* Generic event
**/
@@ -1363,7 +1368,7 @@ declare module '@polkadot/api-base/types/events' {
*
* \[ id, pallet index, call index, actual weight, max budgeted weight \]
**/
NotifyOverweight: AugmentedEvent<ApiType, [u64, u8, u8, u64, u64]>;
NotifyOverweight: AugmentedEvent<ApiType, [u64, u8, u8, Weight, Weight]>;
/**
* A given location which had a version change subscription was dropped owing to an error
* migrating the location to our new XCM format.
+2 -16
View File
@@ -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 { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeSessionKeys, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
import type { FrameSupportDispatchPerDispatchClassWeight, 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 { Observable } from '@polkadot/types/types';
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
@@ -1532,10 +1532,6 @@ declare module '@polkadot/api-base/types/storage' {
* This is basically in sync with the call to [`pallet_session::SessionManager::new_session`].
**/
currentPlannedSession: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The earliest era for which we have a pending, unapplied slash.
**/
earliestUnappliedSlash: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Rewards for the last `HISTORY_DEPTH` eras.
* If reward hasn't been set or has been removed then 0 reward is returned.
@@ -1594,16 +1590,6 @@ declare module '@polkadot/api-base/types/storage' {
* Mode of era forcing.
**/
forceEra: AugmentedQuery<ApiType, () => Observable<PalletStakingForcing>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Number of eras to keep in history.
*
* Information is kept for eras in `[current_era - history_depth; current_era]`.
*
* Must be more than the number of eras delayed by session otherwise. I.e. active era must
* always be in history. I.e. `active_era > current_era - history_depth` must be
* guaranteed.
**/
historyDepth: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Any validators that may never be slashed or forcibly kicked. It's a Vec since they're
* easy to initialize and the performance hit is minimal (we expect no more than four
@@ -1743,7 +1729,7 @@ declare module '@polkadot/api-base/types/storage' {
/**
* The current weight for the block.
**/
blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportWeightsPerDispatchClassU64>, []> & QueryableStorageEntry<ApiType, []>;
blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportDispatchPerDispatchClassWeight>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Digest of the current block, also part of the block header.
**/
+28 -2
View File
@@ -7,7 +7,7 @@ import '@polkadot/api-base/types/calls';
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
import type { ValidatorSet } from '@polkadot/types/interfaces/beefy';
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
@@ -19,7 +19,7 @@ import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
import type { AccountId, Block, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
import type { SessionIndex } from '@polkadot/types/interfaces/session';
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
@@ -206,6 +206,17 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x17a6bc0d0062aeb3/1 */
nominationPoolsApi: {
/**
* Returns the pending rewards for the given member.
**/
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xf78b278be53f454c/2 */
offchainWorkerApi: {
/**
@@ -337,5 +348,20 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xf3ff14d5ab527059/1 */
transactionPaymentCallApi: {
/**
* The call fee details
**/
queryCallFeeDetails: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<FeeDetails>>;
/**
* The call info
**/
queryCallInfo: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
} // AugmentedCalls
} // declare module
+61 -134
View File
@@ -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 { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
import type { 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';
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.
**/
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.
**/
setUmpServiceTotalWeight: AugmentedSubmittable<(updated: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64]>;
setUmpServiceTotalWeight: AugmentedSubmittable<(updated: Weight | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Weight]>;
/**
* Set the validation upgrade cooldown.
**/
@@ -811,7 +811,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - up to 3 events
* # </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
* state.
@@ -1083,7 +1083,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Weight: `O(R)` where R is the number of referendums the voter delegating to has
* voted on. Weight is charged as if maximum votes.
**/
delegate: AugmentedSubmittable<(to: AccountId32 | string | Uint8Array, conviction: PalletDemocracyConviction | 'None' | 'Locked1x' | 'Locked2x' | 'Locked3x' | 'Locked4x' | 'Locked5x' | 'Locked6x' | number | Uint8Array, balance: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, PalletDemocracyConviction, u128]>;
delegate: AugmentedSubmittable<(to: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, conviction: PalletDemocracyConviction | 'None' | 'Locked1x' | 'Locked2x' | 'Locked3x' | 'Locked4x' | 'Locked5x' | 'Locked6x' | number | Uint8Array, balance: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, PalletDemocracyConviction, u128]>;
/**
* Schedule an emergency cancellation of a referendum. Cannot happen twice to the same
* referendum.
@@ -1243,7 +1243,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on.
* Weight is calculated for the maximum number of vote.
**/
removeOtherVote: AugmentedSubmittable<(target: AccountId32 | string | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
removeOtherVote: AugmentedSubmittable<(target: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u32]>;
/**
* Remove a vote for a referendum.
*
@@ -1311,7 +1311,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(R)` with R number of vote of target.
**/
unlock: AugmentedSubmittable<(target: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
unlock: AugmentedSubmittable<(target: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Veto and blacklist the external proposal hash.
*
@@ -1586,7 +1586,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - One event.
* # </weight>
**/
addRegistrar: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
addRegistrar: AugmentedSubmittable<(account: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Add the given account to the sender's subs.
*
@@ -1670,6 +1670,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - `target`: the account whose identity the judgement is upon. This must be an account
* with a registered identity.
* - `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.
*
@@ -1681,7 +1682,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - One event.
* # </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.
*
@@ -1753,7 +1754,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - Benchmark: 8.823 + R * 0.32 µs (min squares analysis)
* # </weight>
**/
setAccountId: AugmentedSubmittable<(index: Compact<u32> | AnyNumber | Uint8Array, updated: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, AccountId32]>;
setAccountId: AugmentedSubmittable<(index: Compact<u32> | AnyNumber | Uint8Array, updated: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress]>;
/**
* Set the fee required for a judgement to be requested from a registrar.
*
@@ -1900,7 +1901,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - Writes: Indices Accounts, System Account (original owner)
* # </weight>
**/
forceTransfer: AugmentedSubmittable<(updated: AccountId32 | string | Uint8Array, index: u32 | AnyNumber | Uint8Array, freeze: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32, bool]>;
forceTransfer: AugmentedSubmittable<(updated: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, index: u32 | AnyNumber | Uint8Array, freeze: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u32, bool]>;
/**
* Free up an index owned by the sender.
*
@@ -1965,7 +1966,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - Writes: Indices Accounts, System Account (recipient)
* # </weight>
**/
transfer: AugmentedSubmittable<(updated: AccountId32 | string | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
transfer: AugmentedSubmittable<(updated: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u32]>;
/**
* Generic tx
**/
@@ -2021,7 +2022,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - Write: Multisig Storage, [Caller Account]
* # </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
* approved by a total of `threshold - 1` of `other_signatories`.
@@ -2069,7 +2070,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - Plus Call 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.
*
@@ -2171,7 +2172,7 @@ declare module '@polkadot/api-base/types/submittable' {
* In addition to `amount`, the caller will transfer the existential deposit; so the caller
* needs at have at least `amount + existential_deposit` transferrable.
**/
create: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, root: AccountId32 | string | Uint8Array, nominator: AccountId32 | string | Uint8Array, stateToggler: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, AccountId32, AccountId32, AccountId32]>;
create: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, root: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, nominator: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, stateToggler: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, MultiAddress, MultiAddress, MultiAddress]>;
/**
* Stake funds with a pool. The amount to bond is transferred from the member to the
* pools account and immediately increases the pools bond.
@@ -2267,7 +2268,7 @@ declare module '@polkadot/api-base/types/submittable' {
* there are too many unlocking chunks, the result of this call will likely be the
* `NoMoreChunks` error from the staking system.
**/
unbond: AugmentedSubmittable<(memberAccount: AccountId32 | string | Uint8Array, unbondingPoints: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, Compact<u128>]>;
unbond: AugmentedSubmittable<(memberAccount: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, unbondingPoints: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Compact<u128>]>;
/**
* Update the roles of the pool.
*
@@ -2299,7 +2300,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* If the target is the depositor, the pool will be destroyed.
**/
withdrawUnbonded: AugmentedSubmittable<(memberAccount: AccountId32 | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
withdrawUnbonded: AugmentedSubmittable<(memberAccount: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u32]>;
/**
* Generic tx
**/
@@ -2545,12 +2546,8 @@ declare module '@polkadot/api-base/types/submittable' {
* - `proxy_type`: The permissions allowed for this proxy account.
* - `delay`: The announcement period required of the initial proxy. Will generally be
* zero.
*
* # <weight>
* Weight is a function of the number of proxies the user has (P).
* # </weight>
**/
addProxy: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, 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]>;
/**
* Publish the hash of a proxy-call that will be made in the future.
*
@@ -2567,14 +2564,8 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `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.
*
* # <weight>
* Weight is a function of:
* - A: the number of announcements made.
* - P: the number of proxies the user has.
* # </weight>
**/
announce: AugmentedSubmittable<(real: AccountId32 | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, 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]>;
/**
* Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and
* initialize it with a proxy of `proxy_type` for `origin` sender.
@@ -2594,36 +2585,27 @@ declare module '@polkadot/api-base/types/submittable' {
* same sender, with the same parameters.
*
* 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
* inaccessible.
*
* 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.
* - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`.
* - `proxy_type`: The proxy type originally passed to `anonymous`.
* - `height`: The height of the chain when the call to `anonymous` was processed.
* - `ext_index`: The extrinsic index in which the call to `anonymous` was processed.
* - `spawner`: The account that originally called `pure` to create this account.
* - `index`: The disambiguation index originally passed to `pure`. Probably `0`.
* - `proxy_type`: The proxy type originally passed to `pure`.
* - `height`: The height of the chain when the call to `pure` 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
* account whose `anonymous` call has corresponding parameters.
*
* # <weight>
* Weight is a function of the number of proxies the user has (P).
* # </weight>
* Fails with `NoPermission` in case the caller is not a previously created pure
* account whose `pure` call has corresponding parameters.
**/
killAnonymous: AugmentedSubmittable<(spawner: AccountId32 | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number | Uint8Array, index: u16 | AnyNumber | Uint8Array, height: Compact<u32> | AnyNumber | Uint8Array, extIndex: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, KusamaRuntimeProxyType, u16, Compact<u32>, Compact<u32>]>;
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
* `add_proxy`.
@@ -2636,12 +2618,8 @@ declare module '@polkadot/api-base/types/submittable' {
* - `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.
* - `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: AccountId32 | string | Uint8Array, forceProxyType: Option<KusamaRuntimeProxyType> | null | Uint8Array | KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, 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]>;
/**
* Dispatch the given `call` from an account that the sender is authorized for through
* `add_proxy`.
@@ -2654,14 +2632,8 @@ declare module '@polkadot/api-base/types/submittable' {
* - `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.
* - `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: AccountId32 | string | Uint8Array, real: AccountId32 | string | Uint8Array, forceProxyType: Option<KusamaRuntimeProxyType> | null | Uint8Array | KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32, 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]>;
/**
* Remove the given announcement of a delegate.
*
@@ -2673,14 +2645,8 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `delegate`: The account that previously announced the call.
* - `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: AccountId32 | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, 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]>;
/**
* Remove a given announcement.
*
@@ -2692,25 +2658,15 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `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.
*
* # <weight>
* Weight is a function of:
* - A: the number of announcements made.
* - P: the number of proxies the user has.
* # </weight>
**/
removeAnnouncement: AugmentedSubmittable<(real: AccountId32 | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, 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]>;
/**
* Unregister all proxy accounts for the sender.
*
* 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.**
*
* # <weight>
* Weight is a function of the number of proxies the user has (P).
* # </weight>
**/
removeProxies: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
@@ -2721,12 +2677,8 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `proxy`: The account that the `caller` would like to remove as a proxy.
* - `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: AccountId32 | string | Uint8Array, proxyType: KusamaRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | 'Society' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, 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]>;
/**
* Generic tx
**/
@@ -2743,7 +2695,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - `account`: The recovered account you want to make a call on-behalf-of.
* - `call`: The call you want to make with the recovered account.
**/
asRecovered: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, Call]>;
asRecovered: AugmentedSubmittable<(account: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Call]>;
/**
* Cancel the ability to use `as_recovered` for `account`.
*
@@ -2753,7 +2705,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `account`: The recovered account you are able to call on-behalf-of.
**/
cancelRecovered: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
cancelRecovered: AugmentedSubmittable<(account: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Allow a successful rescuer to claim their recovered account.
*
@@ -2765,7 +2717,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - `account`: The lost account that you want to claim has been successfully recovered by
* you.
**/
claimRecovery: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
claimRecovery: AugmentedSubmittable<(account: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* As the controller of a recoverable account, close an active recovery
* process for your account.
@@ -2779,7 +2731,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `rescuer`: The account trying to rescue this recoverable account.
**/
closeRecovery: AugmentedSubmittable<(rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
closeRecovery: AugmentedSubmittable<(rescuer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Create a recovery configuration for your account. This makes your account recoverable.
*
@@ -2812,7 +2764,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - `account`: The lost account that you want to recover. This account needs to be
* recoverable (i.e. have a recovery configuration).
**/
initiateRecovery: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
initiateRecovery: AugmentedSubmittable<(account: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Remove the recovery process for your account. Recovered accounts are still accessible.
*
@@ -2837,7 +2789,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - `lost`: The "lost account" to be recovered.
* - `rescuer`: The "rescuer account" which can call as the lost account.
**/
setRecovered: AugmentedSubmittable<(lost: AccountId32 | string | Uint8Array, rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32]>;
setRecovered: AugmentedSubmittable<(lost: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, rescuer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress]>;
/**
* Allow a "friend" of a recoverable account to vouch for an active recovery
* process for that account.
@@ -2852,7 +2804,7 @@ declare module '@polkadot/api-base/types/submittable' {
* The combination of these two parameters must point to an active recovery
* process.
**/
vouchRecovery: AugmentedSubmittable<(lost: AccountId32 | string | Uint8Array, rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32]>;
vouchRecovery: AugmentedSubmittable<(lost: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, rescuer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress]>;
/**
* Generic tx
**/
@@ -3121,7 +3073,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Total Complexity: O(1)
* # </weight>
**/
found: AugmentedSubmittable<(founder: AccountId32 | string | Uint8Array, maxMembers: u32 | AnyNumber | Uint8Array, rules: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32, Bytes]>;
found: AugmentedSubmittable<(founder: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, maxMembers: u32 | AnyNumber | Uint8Array, rules: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u32, Bytes]>;
/**
* Allow suspended judgement origin to make judgement on a suspended candidate.
*
@@ -3164,7 +3116,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Total Complexity: O(M + logM + B + X)
* # </weight>
**/
judgeSuspendedCandidate: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array, judgement: PalletSocietyJudgement | 'Rebid' | 'Reject' | 'Approve' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, PalletSocietyJudgement]>;
judgeSuspendedCandidate: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, judgement: PalletSocietyJudgement | 'Rebid' | 'Reject' | 'Approve' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, PalletSocietyJudgement]>;
/**
* Allow suspension judgement origin to make judgement on a suspended member.
*
@@ -3195,7 +3147,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Total Complexity: O(M + logM + B)
* # </weight>
**/
judgeSuspendedMember: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array, forgive: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, bool]>;
judgeSuspendedMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forgive: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, bool]>;
/**
* Transfer the first matured payout for the sender and remove it from the records.
*
@@ -3364,7 +3316,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Total Complexity: O(M + B + C + logM + logB + X)
* # </weight>
**/
vouch: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array, value: u128 | AnyNumber | Uint8Array, tip: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u128, u128]>;
vouch: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: u128 | AnyNumber | Uint8Array, tip: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u128, u128]>;
/**
* Generic tx
**/
@@ -3639,31 +3591,6 @@ declare module '@polkadot/api-base/types/submittable' {
* # </weight>
**/
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).
*
@@ -3703,7 +3630,7 @@ declare module '@polkadot/api-base/types/submittable' {
* * `min_commission`: The minimum amount of commission that each validators must maintain.
* 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.
* to kick people under the new limits, `chill_other` should be called.
@@ -3876,7 +3803,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - up to 3 events
* # </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
* state.
@@ -4002,7 +3929,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* May only be called from `T::AddOrigin`.
**/
addMember: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
addMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Swap out the sending member for some other key `new`.
*
@@ -4010,7 +3937,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Prime membership is passed from the origin account to `new`, if extant.
**/
changeKey: AugmentedSubmittable<(updated: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
changeKey: AugmentedSubmittable<(updated: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Remove the prime member if it exists.
*
@@ -4022,7 +3949,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* May only be called from `T::RemoveOrigin`.
**/
removeMember: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
removeMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Change the membership to a new set, disregarding the existing membership. Be nice and
* pass `members` pre-sorted.
@@ -4035,7 +3962,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* May only be called from `T::PrimeOrigin`.
**/
setPrime: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
setPrime: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Swap out one member `remove` for another `add`.
*
@@ -4043,7 +3970,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Prime membership is *not* passed from `remove` to `add`, if extant.
**/
swapMember: AugmentedSubmittable<(remove: AccountId32 | string | Uint8Array, add: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32]>;
swapMember: AugmentedSubmittable<(remove: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, add: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress]>;
/**
* Generic tx
**/
@@ -4115,7 +4042,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - DbWrites: `Reasons`, `Tips`
* # </weight>
**/
reportAwesome: AugmentedSubmittable<(reason: Bytes | string | Uint8Array, who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, AccountId32]>;
reportAwesome: AugmentedSubmittable<(reason: Bytes | string | Uint8Array, who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, MultiAddress]>;
/**
* Retract a prior tip-report from `report_awesome`, and cancel the process of tipping.
*
@@ -4204,7 +4131,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - DbWrites: `Reasons`, `Tips`
* # </weight>
**/
tipNew: AugmentedSubmittable<(reason: Bytes | string | Uint8Array, who: AccountId32 | string | Uint8Array, tipValue: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, AccountId32, Compact<u128>]>;
tipNew: AugmentedSubmittable<(reason: Bytes | string | Uint8Array, who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, tipValue: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, MultiAddress, Compact<u128>]>;
/**
* Generic tx
**/
@@ -4297,7 +4224,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Events:
* - `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
**/
@@ -4510,7 +4437,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - both nodes are within the same bag,
* - and `origin` has a greater `Score` than `lighter`.
**/
putInFrontOf: AugmentedSubmittable<(lighter: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
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
@@ -4523,7 +4450,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* If `dislocated` does not exists, it returns an error.
**/
rebag: AugmentedSubmittable<(dislocated: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
rebag: AugmentedSubmittable<(dislocated: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Generic tx
**/
@@ -4543,7 +4470,7 @@ declare module '@polkadot/api-base/types/submittable' {
* NOTE: A successful return to this does *not* imply that the `msg` was executed successfully
* 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
* version a destination can accept is unknown).
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '8.14.1' };
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '9.4.2' };
+71 -6
View File
@@ -8,8 +8,8 @@ import '@polkadot/api-base/types/consts';
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
import type { Bytes, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { Codec } from '@polkadot/types-codec/types';
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
import type { Perbill, Percent, Permill, Weight } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight } from '@polkadot/types/lookup';
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
@@ -258,6 +258,9 @@ declare module '@polkadot/api-base/types/consts' {
* take place over multiple blocks.
**/
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
**/
@@ -302,7 +305,7 @@ declare module '@polkadot/api-base/types/consts' {
* this pallet), then [`MinerConfig::solution_weight`] is used to compare against
* this value.
**/
signedMaxWeight: u64 & AugmentedConst<ApiType>;
signedMaxWeight: Weight & AugmentedConst<ApiType>;
/**
* Duration of the signed phase.
**/
@@ -412,6 +415,31 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
nominationPools: {
/**
* The maximum pool points-to-balance ratio that an `open` pool can have.
*
* This is important in the event slashing takes place and the pool's points-to-balance
* ratio becomes disproportional.
*
* Moreover, this relates to the `RewardCounter` type as well, as the arithmetic operations
* are a function of number of points, and by setting this value to e.g. 10, you ensure
* that the total number of points in the system are at most 10 times the total_issuance of
* the chain, in the absolute worse case.
*
* For a value of 10, the threshold would be a pool points-to-balance ratio of 10:1.
* Such a scenario would also be the equivalent of the pool being 90% slashed.
**/
maxPointsToBalance: u8 & AugmentedConst<ApiType>;
/**
* The nomination pool's pallet id.
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
paras: {
unsignedPriority: u64 & AugmentedConst<ApiType>;
/**
@@ -432,6 +460,21 @@ declare module '@polkadot/api-base/types/consts' {
* Number of runners_up to keep.
**/
desiredRunnersUp: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of candidates in a phragmen election.
*
* Warning: The election happens onchain, and this value will determine
* the size of the election. When this limit is reached no more
* candidates are accepted in the election.
**/
maxCandidates: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of voters to allow in a phragmen election.
*
* Warning: This impacts the size of the election which is run onchain.
* When the limit is reached the new voters are ignored.
**/
maxVoters: u32 & AugmentedConst<ApiType>;
/**
* Identifier for the elections-phragmen pallet's lock
**/
@@ -521,7 +564,7 @@ declare module '@polkadot/api-base/types/consts' {
* The maximum weight that may be scheduled per block for any dispatchables of less
* 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.
* Not strictly enforced, but used for weight estimation.
@@ -551,6 +594,28 @@ declare module '@polkadot/api-base/types/consts' {
* Number of eras that staked funds must remain bonded for.
**/
bondingDuration: u32 & AugmentedConst<ApiType>;
/**
* Number of eras to keep in history.
*
* Following information is kept for eras in `[current_era -
* HistoryDepth, current_era]`: `ErasStakers`, `ErasStakersClipped`,
* `ErasValidatorPrefs`, `ErasValidatorReward`, `ErasRewardPoints`,
* `ErasTotalStake`, `ErasStartSessionIndex`,
* `StakingLedger.claimed_rewards`.
*
* Must be more than the number of eras delayed by session.
* I.e. active era must always be in history. I.e. `active_era >
* current_era - history_depth` must be guaranteed.
*
* If migrating an existing pallet from storage value to config value,
* this should be set to same value or greater as in storage.
*
* Note: `HistoryDepth` is used as the upper bound for the `BoundedVec`
* item `StakingLedger.claimed_rewards`. Setting this value lower than
* the existing value can lead to inconsistencies and will need to be
* handled properly in a migration.
**/
historyDepth: u32 & AugmentedConst<ApiType>;
/**
* Maximum number of nominations per nominator.
**/
@@ -599,9 +664,9 @@ declare module '@polkadot/api-base/types/consts' {
/**
* The weight of runtime database operations the runtime can invoke.
**/
dbWeight: FrameSupportWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
dbWeight: SpWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
/**
* The designated SS85 prefix of this chain.
* The designated SS58 prefix of this chain.
*
* This replaces the "ss58Format" property declared in the chain spec. Reason is
* that the runtime should know about the prefix in order to make use of it as
+106
View File
@@ -713,6 +713,10 @@ declare module '@polkadot/api-base/types/errors' {
* The target is invalid.
**/
InvalidTarget: AugmentedError<ApiType>;
/**
* The provided judgement was for a different identity.
**/
JudgementForDifferentIdentity: AugmentedError<ApiType>;
/**
* Judgement given.
**/
@@ -860,6 +864,104 @@ declare module '@polkadot/api-base/types/errors' {
**/
[key: string]: AugmentedError<ApiType>;
};
nominationPools: {
/**
* An account is already delegating in another pool. An account may only belong to one
* pool at a time.
**/
AccountBelongsToOtherPool: AugmentedError<ApiType>;
/**
* The pools state cannot be changed.
**/
CanNotChangeState: AugmentedError<ApiType>;
/**
* None of the funds can be withdrawn yet because the bonding duration has not passed.
**/
CannotWithdrawAny: AugmentedError<ApiType>;
/**
* Some error occurred that should never happen. This should be reported to the
* maintainers.
**/
Defensive: AugmentedError<ApiType>;
/**
* The caller does not have adequate permissions.
**/
DoesNotHavePermission: AugmentedError<ApiType>;
/**
* The member is fully unbonded (and thus cannot access the bonded and reward pool
* anymore to, for example, collect rewards).
**/
FullyUnbonding: AugmentedError<ApiType>;
/**
* Too many members in the pool or system.
**/
MaxPoolMembers: AugmentedError<ApiType>;
/**
* The system is maxed out on pools.
**/
MaxPools: AugmentedError<ApiType>;
/**
* The member cannot unbond further chunks due to reaching the limit.
**/
MaxUnbondingLimit: AugmentedError<ApiType>;
/**
* Metadata exceeds [`Config::MaxMetadataLen`]
**/
MetadataExceedsMaxLen: AugmentedError<ApiType>;
/**
* The amount does not meet the minimum bond to either join or create a pool.
*
* The depositor can never unbond to a value less than
* `Pallet::depositor_min_bond`. The caller does not have nominating
* permissions for the pool. Members can never unbond to a value below `MinJoinBond`.
**/
MinimumBondNotMet: AugmentedError<ApiType>;
/**
* A pool must be in [`PoolState::Destroying`] in order for the depositor to unbond or for
* other members to be permissionlessly unbonded.
**/
NotDestroying: AugmentedError<ApiType>;
/**
* Either a) the caller cannot make a valid kick or b) the pool is not destroying.
**/
NotKickerOrDestroying: AugmentedError<ApiType>;
/**
* The caller does not have nominating permissions for the pool.
**/
NotNominator: AugmentedError<ApiType>;
/**
* The pool is not open to join
**/
NotOpen: AugmentedError<ApiType>;
/**
* The transaction could not be executed due to overflow risk for the pool.
**/
OverflowRisk: AugmentedError<ApiType>;
/**
* Partial unbonding now allowed permissionlessly.
**/
PartialUnbondNotAllowedPermissionlessly: AugmentedError<ApiType>;
/**
* An account is not a member.
**/
PoolMemberNotFound: AugmentedError<ApiType>;
/**
* A (bonded) pool id does not exist.
**/
PoolNotFound: AugmentedError<ApiType>;
/**
* A reward pool does not exist. In all cases this is a system logic error.
**/
RewardPoolNotFound: AugmentedError<ApiType>;
/**
* A sub pool does not exist.
**/
SubPoolsNotFound: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
paraInclusion: {
/**
* Bitfield consists of zeros only.
@@ -1393,6 +1495,10 @@ declare module '@polkadot/api-base/types/errors' {
* A nomination target was supplied that was blocked or otherwise not a validator.
**/
BadTarget: AugmentedError<ApiType>;
/**
* Some bound is not met.
**/
BoundNotMet: AugmentedError<ApiType>;
/**
* The user has enough bond and thus cannot be chilled forcefully by an external person.
**/
+92 -19
View File
@@ -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 { ITuple } from '@polkadot/types-codec/types';
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletStakingExposure, PalletStakingValidatorPrefs, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2CandidateReceipt, PolkadotRuntimeParachainsDisputesDisputeLocation, PolkadotRuntimeParachainsDisputesDisputeResult, PolkadotRuntimeProxyType, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, XcmV1MultiLocation, XcmV2Response, XcmV2TraitsError, XcmV2TraitsOutcome, XcmV2Xcm, XcmVersionedMultiAssets, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
import type { AccountId32, H256, Weight } from '@polkadot/types/interfaces/runtime';
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>;
@@ -338,10 +338,15 @@ declare module '@polkadot/api-base/types/events' {
};
electionProviderMultiPhase: {
/**
* The election has been finalized, with `Some` of the given computation, or else if the
* election failed, `None`.
* An election failed.
*
* Not much can be said about which computes failed in the process.
**/
ElectionFinalized: AugmentedEvent<ApiType, [electionCompute: Option<PalletElectionProviderMultiPhaseElectionCompute>], { electionCompute: Option<PalletElectionProviderMultiPhaseElectionCompute> }>;
ElectionFailed: AugmentedEvent<ApiType, []>;
/**
* The election has been finalized, with the given computation and score.
**/
ElectionFinalized: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore], { compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore }>;
/**
* An account has been rewarded for their signed submission being finalized.
**/
@@ -362,7 +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.
**/
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.
**/
@@ -519,6 +524,74 @@ declare module '@polkadot/api-base/types/events' {
**/
[key: string]: AugmentedEvent<ApiType>;
};
nominationPools: {
/**
* A member has became bonded in a pool.
**/
Bonded: AugmentedEvent<ApiType, [member: AccountId32, poolId: u32, bonded: u128, joined: bool], { member: AccountId32, poolId: u32, bonded: u128, joined: bool }>;
/**
* A pool has been created.
**/
Created: AugmentedEvent<ApiType, [depositor: AccountId32, poolId: u32], { depositor: AccountId32, poolId: u32 }>;
/**
* A pool has been destroyed.
**/
Destroyed: AugmentedEvent<ApiType, [poolId: u32], { poolId: u32 }>;
/**
* A member has been removed from a pool.
*
* The removal can be voluntary (withdrawn all unbonded funds) or involuntary (kicked).
**/
MemberRemoved: AugmentedEvent<ApiType, [poolId: u32, member: AccountId32], { poolId: u32, member: AccountId32 }>;
/**
* A payout has been made to a member.
**/
PaidOut: AugmentedEvent<ApiType, [member: AccountId32, poolId: u32, payout: u128], { member: AccountId32, poolId: u32, payout: u128 }>;
/**
* The active balance of pool `pool_id` has been slashed to `balance`.
**/
PoolSlashed: AugmentedEvent<ApiType, [poolId: u32, balance: u128], { poolId: u32, balance: u128 }>;
/**
* The roles of a pool have been updated to the given new roles. Note that the depositor
* can never change.
**/
RolesUpdated: AugmentedEvent<ApiType, [root: Option<AccountId32>, stateToggler: Option<AccountId32>, nominator: Option<AccountId32>], { root: Option<AccountId32>, stateToggler: Option<AccountId32>, nominator: Option<AccountId32> }>;
/**
* The state of a pool has changed
**/
StateChanged: AugmentedEvent<ApiType, [poolId: u32, newState: PalletNominationPoolsPoolState], { poolId: u32, newState: PalletNominationPoolsPoolState }>;
/**
* A member has unbonded from their pool.
*
* - `balance` is the corresponding balance of the number of points that has been
* requested to be unbonded (the argument of the `unbond` transaction) from the bonded
* pool.
* - `points` is the number of points that are issued as a result of `balance` being
* dissolved into the corresponding unbonding pool.
* - `era` is the era in which the balance will be unbonded.
* In the absence of slashing, these values will match. In the presence of slashing, the
* number of points that are issued in the unbonding pool will be less than the amount
* requested to be unbonded.
**/
Unbonded: AugmentedEvent<ApiType, [member: AccountId32, poolId: u32, balance: u128, points: u128, era: u32], { member: AccountId32, poolId: u32, balance: u128, points: u128, era: u32 }>;
/**
* The unbond pool at `era` of pool `pool_id` has been slashed to `balance`.
**/
UnbondingPoolSlashed: AugmentedEvent<ApiType, [poolId: u32, era: u32, balance: u128], { poolId: u32, era: u32, balance: u128 }>;
/**
* A member has withdrawn from their pool.
*
* The given number of `points` have been dissolved in return of `balance`.
*
* Similar to `Unbonded` event, in the absence of slashing, the ratio of point to balance
* will be 1.
**/
Withdrawn: AugmentedEvent<ApiType, [member: AccountId32, poolId: u32, balance: u128, points: u128], { member: AccountId32, poolId: u32, balance: u128, points: u128 }>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
offences: {
/**
* There is an offence reported of the given `kind` happened at the `session_index` and
@@ -683,11 +756,6 @@ declare module '@polkadot/api-base/types/events' {
* An announcement was placed to make a call in the future.
**/
Announced: AugmentedEvent<ApiType, [real: AccountId32, proxy: AccountId32, callHash: H256], { real: AccountId32, proxy: AccountId32, callHash: H256 }>;
/**
* Anonymous account has been created by new proxy with given
* disambiguation index and proxy type.
**/
AnonymousCreated: AugmentedEvent<ApiType, [anonymous: AccountId32, who: AccountId32, proxyType: PolkadotRuntimeProxyType, disambiguationIndex: u16], { anonymous: AccountId32, who: AccountId32, proxyType: PolkadotRuntimeProxyType, disambiguationIndex: u16 }>;
/**
* A proxy was added.
**/
@@ -700,6 +768,11 @@ declare module '@polkadot/api-base/types/events' {
* A proxy was removed.
**/
ProxyRemoved: AugmentedEvent<ApiType, [delegator: AccountId32, delegatee: AccountId32, proxyType: PolkadotRuntimeProxyType, delay: u32], { delegator: AccountId32, delegatee: AccountId32, proxyType: PolkadotRuntimeProxyType, delay: u32 }>;
/**
* A pure account has been created by new proxy with given
* disambiguation index and proxy type.
**/
PureCreated: AugmentedEvent<ApiType, [pure: AccountId32, who: AccountId32, proxyType: PolkadotRuntimeProxyType, disambiguationIndex: u16], { pure: AccountId32, who: AccountId32, proxyType: PolkadotRuntimeProxyType, disambiguationIndex: u16 }>;
/**
* Generic event
**/
@@ -800,8 +873,8 @@ declare module '@polkadot/api-base/types/events' {
**/
Rewarded: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
* One validator (and its nominators) has been slashed by the given amount.
* \[validator, amount\]
* One staker (and potentially its nominators) has been slashed by the given amount.
* \[staker, amount\]
**/
Slashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
@@ -838,11 +911,11 @@ declare module '@polkadot/api-base/types/events' {
/**
* An extrinsic failed.
**/
ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo }>;
ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportDispatchDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportDispatchDispatchInfo }>;
/**
* An extrinsic completed successfully.
**/
ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchInfo: FrameSupportWeightsDispatchInfo }>;
ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportDispatchDispatchInfo], { dispatchInfo: FrameSupportDispatchDispatchInfo }>;
/**
* An account was reaped.
**/
@@ -1020,14 +1093,14 @@ declare module '@polkadot/api-base/types/events' {
*
* \[ para, id, overweight_index, required \]
**/
OverweightEnqueued: AugmentedEvent<ApiType, [u32, U8aFixed, u64, u64]>;
OverweightEnqueued: AugmentedEvent<ApiType, [u32, U8aFixed, u64, Weight]>;
/**
* Upward message from the overweight queue was executed with the given actual weight
* used.
*
* \[ overweight_index, used \]
**/
OverweightServiced: AugmentedEvent<ApiType, [u64, u64]>;
OverweightServiced: AugmentedEvent<ApiType, [u64, Weight]>;
/**
* Upward message is unsupported version of XCM.
* \[ id \]
@@ -1042,7 +1115,7 @@ declare module '@polkadot/api-base/types/events' {
* The weight limit for handling upward messages was reached.
* \[ id, remaining, required \]
**/
WeightExhausted: AugmentedEvent<ApiType, [U8aFixed, u64, u64]>;
WeightExhausted: AugmentedEvent<ApiType, [U8aFixed, Weight, Weight]>;
/**
* Generic event
**/
@@ -1170,7 +1243,7 @@ declare module '@polkadot/api-base/types/events' {
*
* \[ id, pallet index, call index, actual weight, max budgeted weight \]
**/
NotifyOverweight: AugmentedEvent<ApiType, [u64, u8, u8, u64, u64]>;
NotifyOverweight: AugmentedEvent<ApiType, [u64, u8, u8, Weight, Weight]>;
/**
* A given location which had a version change subscription was dropped owing to an error
* migrating the location to our new XCM format.
+94 -16
View File
@@ -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 { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletSchedulerScheduledV3, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV2AssignmentAppPublic, PolkadotPrimitivesV2CandidateCommitments, PolkadotPrimitivesV2CoreOccupied, PolkadotPrimitivesV2DisputeState, PolkadotPrimitivesV2ScrapedOnChainVotes, PolkadotPrimitivesV2SessionInfo, PolkadotPrimitivesV2UpgradeGoAhead, PolkadotPrimitivesV2UpgradeRestriction, PolkadotPrimitivesV2ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, PolkadotRuntimeSessionKeys, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
import type { FrameSupportDispatchPerDispatchClassWeight, 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 { Observable } from '@polkadot/types/types';
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
@@ -773,6 +773,98 @@ declare module '@polkadot/api-base/types/storage' {
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
nominationPools: {
/**
* Storage for bonded pools.
**/
bondedPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsBondedPoolInner>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Counter for the related counted storage map
**/
counterForBondedPools: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Counter for the related counted storage map
**/
counterForMetadata: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Counter for the related counted storage map
**/
counterForPoolMembers: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Counter for the related counted storage map
**/
counterForReversePoolIdLookup: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Counter for the related counted storage map
**/
counterForRewardPools: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Counter for the related counted storage map
**/
counterForSubPoolsStorage: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Ever increasing number of all pools created so far.
**/
lastPoolId: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Maximum number of members that can exist in the system. If `None`, then the count
* members are not bound on a system wide basis.
**/
maxPoolMembers: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Maximum number of members that may belong to pool. If `None`, then the count of
* members is not bound on a per pool basis.
**/
maxPoolMembersPerPool: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Maximum number of nomination pools that can exist. If `None`, then an unbounded number of
* pools can exist.
**/
maxPools: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Metadata for the pool.
**/
metadata: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Bytes>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Minimum bond required to create a pool.
*
* This is the amount that the depositor must put as their initial stake in the pool, as an
* indication of "skin in the game".
*
* This is the value that will always exist in the staking ledger of the pool bonded account
* while all other accounts leave.
**/
minCreateBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Minimum amount to bond to join a pool.
**/
minJoinBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Active members.
**/
poolMembers: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletNominationPoolsPoolMember>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* A reverse lookup from the pool's account id to its id.
*
* This is only used for slashing. In all other instances, the pool id is used, and the
* accounts are deterministically derived from it.
**/
reversePoolIdLookup: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* Reward pools. This is where there rewards for each pool accumulate. When a members payout
* is claimed, the balance comes out fo the reward pool. Keyed by the bonded pools account.
**/
rewardPools: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsRewardPool>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Groups of unbonding pools. Each group of unbonding pools belongs to a bonded pool,
* hence the name sub-pools. Keyed by the bonded pools account.
**/
subPoolsStorage: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletNominationPoolsSubPools>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
offences: {
/**
* A vector of reports of the same kind that happened at the same time slot.
@@ -1320,10 +1412,6 @@ declare module '@polkadot/api-base/types/storage' {
* This is basically in sync with the call to [`pallet_session::SessionManager::new_session`].
**/
currentPlannedSession: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The earliest era for which we have a pending, unapplied slash.
**/
earliestUnappliedSlash: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Rewards for the last `HISTORY_DEPTH` eras.
* If reward hasn't been set or has been removed then 0 reward is returned.
@@ -1382,16 +1470,6 @@ declare module '@polkadot/api-base/types/storage' {
* Mode of era forcing.
**/
forceEra: AugmentedQuery<ApiType, () => Observable<PalletStakingForcing>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Number of eras to keep in history.
*
* Information is kept for eras in `[current_era - history_depth; current_era]`.
*
* Must be more than the number of eras delayed by session otherwise. I.e. active era must
* always be in history. I.e. `active_era > current_era - history_depth` must be
* guaranteed.
**/
historyDepth: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Any validators that may never be slashed or forcibly kicked. It's a Vec since they're
* easy to initialize and the performance hit is minimal (we expect no more than four
@@ -1531,7 +1609,7 @@ declare module '@polkadot/api-base/types/storage' {
/**
* The current weight for the block.
**/
blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportWeightsPerDispatchClassU64>, []> & QueryableStorageEntry<ApiType, []>;
blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportDispatchPerDispatchClassWeight>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Digest of the current block, also part of the block header.
**/
+28 -2
View File
@@ -7,7 +7,7 @@ import '@polkadot/api-base/types/calls';
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, Vec, bool, u32 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
import type { ValidatorSet } from '@polkadot/types/interfaces/beefy';
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
@@ -19,7 +19,7 @@ import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
import type { CandidateCommitments, CandidateEvent, CommittedCandidateReceipt, CoreState, GroupRotationInfo, InboundDownwardMessage, InboundHrmpMessage, OccupiedCoreAssumption, ParaId, ParaValidatorIndex, PersistedValidationData, PvfCheckStatement, ScrapedOnChainVotes, SessionInfo, ValidationCode, ValidationCodeHash, ValidatorSignature } from '@polkadot/types/interfaces/parachains';
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
import type { AccountId, Block, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, ValidatorId } from '@polkadot/types/interfaces/runtime';
import type { SessionIndex } from '@polkadot/types/interfaces/session';
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
@@ -206,6 +206,17 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x17a6bc0d0062aeb3/1 */
nominationPoolsApi: {
/**
* Returns the pending rewards for the given member.
**/
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xf78b278be53f454c/2 */
offchainWorkerApi: {
/**
@@ -337,5 +348,20 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xf3ff14d5ab527059/1 */
transactionPaymentCallApi: {
/**
* The call fee details
**/
queryCallFeeDetails: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<FeeDetails>>;
/**
* The call info
**/
queryCallInfo: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
} // AugmentedCalls
} // declare module
+230 -121
View File
@@ -10,8 +10,8 @@ import type { Data } from '@polkadot/types';
import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportScheduleMaybeHashed, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, 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 { 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';
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
@@ -754,11 +754,11 @@ declare module '@polkadot/api-base/types/submittable' {
/**
* 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.
**/
setUmpServiceTotalWeight: AugmentedSubmittable<(updated: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u64]>;
setUmpServiceTotalWeight: AugmentedSubmittable<(updated: Weight | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Weight]>;
/**
* Set the validation upgrade cooldown.
**/
@@ -811,7 +811,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - up to 3 events
* # </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
* state.
@@ -1083,7 +1083,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Weight: `O(R)` where R is the number of referendums the voter delegating to has
* voted on. Weight is charged as if maximum votes.
**/
delegate: AugmentedSubmittable<(to: AccountId32 | string | Uint8Array, conviction: PalletDemocracyConviction | 'None' | 'Locked1x' | 'Locked2x' | 'Locked3x' | 'Locked4x' | 'Locked5x' | 'Locked6x' | number | Uint8Array, balance: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, PalletDemocracyConviction, u128]>;
delegate: AugmentedSubmittable<(to: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, conviction: PalletDemocracyConviction | 'None' | 'Locked1x' | 'Locked2x' | 'Locked3x' | 'Locked4x' | 'Locked5x' | 'Locked6x' | number | Uint8Array, balance: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, PalletDemocracyConviction, u128]>;
/**
* Schedule an emergency cancellation of a referendum. Cannot happen twice to the same
* referendum.
@@ -1243,7 +1243,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on.
* Weight is calculated for the maximum number of vote.
**/
removeOtherVote: AugmentedSubmittable<(target: AccountId32 | string | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
removeOtherVote: AugmentedSubmittable<(target: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u32]>;
/**
* Remove a vote for a referendum.
*
@@ -1311,7 +1311,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(R)` with R number of vote of target.
**/
unlock: AugmentedSubmittable<(target: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
unlock: AugmentedSubmittable<(target: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Veto and blacklist the external proposal hash.
*
@@ -1535,7 +1535,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - One event.
* # </weight>
**/
addRegistrar: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
addRegistrar: AugmentedSubmittable<(account: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Add the given account to the sender's subs.
*
@@ -1619,6 +1619,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - `target`: the account whose identity the judgement is upon. This must be an account
* with a registered identity.
* - `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.
*
@@ -1630,7 +1631,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - One event.
* # </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.
*
@@ -1702,7 +1703,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - Benchmark: 8.823 + R * 0.32 µs (min squares analysis)
* # </weight>
**/
setAccountId: AugmentedSubmittable<(index: Compact<u32> | AnyNumber | Uint8Array, updated: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, AccountId32]>;
setAccountId: AugmentedSubmittable<(index: Compact<u32> | AnyNumber | Uint8Array, updated: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress]>;
/**
* Set the fee required for a judgement to be requested from a registrar.
*
@@ -1849,7 +1850,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - Writes: Indices Accounts, System Account (original owner)
* # </weight>
**/
forceTransfer: AugmentedSubmittable<(updated: AccountId32 | string | Uint8Array, index: u32 | AnyNumber | Uint8Array, freeze: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32, bool]>;
forceTransfer: AugmentedSubmittable<(updated: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, index: u32 | AnyNumber | Uint8Array, freeze: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u32, bool]>;
/**
* Free up an index owned by the sender.
*
@@ -1914,7 +1915,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - Writes: Indices Accounts, System Account (recipient)
* # </weight>
**/
transfer: AugmentedSubmittable<(updated: AccountId32 | string | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
transfer: AugmentedSubmittable<(updated: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u32]>;
/**
* Generic tx
**/
@@ -1970,7 +1971,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - Write: Multisig Storage, [Caller Account]
* # </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
* approved by a total of `threshold - 1` of `other_signatories`.
@@ -2018,7 +2019,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - Plus Call 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.
*
@@ -2072,6 +2073,188 @@ declare module '@polkadot/api-base/types/submittable' {
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
nominationPools: {
/**
* Bond `extra` more funds from `origin` into the pool to which they already belong.
*
* Additional funds can come from either the free balance of the account, of from the
* accumulated rewards, see [`BondExtra`].
*
* Bonding extra funds implies an automatic payout of all pending rewards as well.
**/
bondExtra: AugmentedSubmittable<(extra: PalletNominationPoolsBondExtra | { FreeBalance: any } | { Rewards: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsBondExtra]>;
/**
* Chill on behalf of the pool.
*
* The dispatch origin of this call must be signed by the pool nominator or the pool
* root role, same as [`Pallet::nominate`].
*
* This directly forward the call to the staking pallet, on behalf of the pool bonded
* account.
**/
chill: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* A bonded member can use this to claim their payout based on the rewards that the pool
* has accumulated since their last claimed payout (OR since joining if this is there first
* time claiming rewards). The payout will be transferred to the member's account.
*
* The member will earn rewards pro rata based on the members stake vs the sum of the
* members in the pools stake. Rewards do not "expire".
**/
claimPayout: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
* Create a new delegation pool.
*
* # Arguments
*
* * `amount` - The amount of funds to delegate to the pool. This also acts of a sort of
* deposit since the pools creator cannot fully unbond funds until the pool is being
* destroyed.
* * `index` - A disambiguation index for creating the account. Likely only useful when
* creating multiple pools in the same extrinsic.
* * `root` - The account to set as [`PoolRoles::root`].
* * `nominator` - The account to set as the [`PoolRoles::nominator`].
* * `state_toggler` - The account to set as the [`PoolRoles::state_toggler`].
*
* # Note
*
* In addition to `amount`, the caller will transfer the existential deposit; so the caller
* needs at have at least `amount + existential_deposit` transferrable.
**/
create: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, root: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, nominator: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, stateToggler: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, MultiAddress, MultiAddress, MultiAddress]>;
/**
* Stake funds with a pool. The amount to bond is transferred from the member to the
* pools account and immediately increases the pools bond.
*
* # Note
*
* * An account can only be a member of a single pool.
* * An account cannot join the same pool multiple times.
* * This call will *not* dust the member account, so the member must have at least
* `existential deposit + amount` in their account.
* * Only a pool with [`PoolState::Open`] can be joined
**/
join: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, poolId: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, u32]>;
/**
* Nominate on behalf of the pool.
*
* The dispatch origin of this call must be signed by the pool nominator or the pool
* root role.
*
* This directly forward the call to the staking pallet, on behalf of the pool bonded
* account.
**/
nominate: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, validators: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<AccountId32>]>;
/**
* Call `withdraw_unbonded` for the pools account. This call can be made by any account.
*
* This is useful if their are too many unlocking chunks to call `unbond`, and some
* can be cleared by withdrawing. In the case there are too many unlocking chunks, the user
* would probably see an error like `NoMoreChunks` emitted from the staking system when
* they attempt to unbond.
**/
poolWithdrawUnbonded: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
/**
* Update configurations for the nomination pools. The origin for this call must be
* Root.
*
* # Arguments
*
* * `min_join_bond` - Set [`MinJoinBond`].
* * `min_create_bond` - Set [`MinCreateBond`].
* * `max_pools` - Set [`MaxPools`].
* * `max_members` - Set [`MaxPoolMembers`].
* * `max_members_per_pool` - Set [`MaxPoolMembersPerPool`].
**/
setConfigs: AugmentedSubmittable<(minJoinBond: PalletNominationPoolsConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, minCreateBond: PalletNominationPoolsConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxPools: PalletNominationPoolsConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxMembers: PalletNominationPoolsConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxMembersPerPool: PalletNominationPoolsConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsConfigOpU32, PalletNominationPoolsConfigOpU32]>;
/**
* Set a new metadata for the pool.
*
* The dispatch origin of this call must be signed by the state toggler, or the root role
* of the pool.
**/
setMetadata: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, metadata: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes]>;
/**
* Set a new state for the pool.
*
* If a pool is already in the `Destroying` state, then under no condition can its state
* change again.
*
* The dispatch origin of this call must be either:
*
* 1. signed by the state toggler, or the root role of the pool,
* 2. if the pool conditions to be open are NOT met (as described by `ok_to_be_open`), and
* then the state of the pool can be permissionlessly changed to `Destroying`.
**/
setState: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, state: PalletNominationPoolsPoolState | 'Open' | 'Blocked' | 'Destroying' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletNominationPoolsPoolState]>;
/**
* Unbond up to `unbonding_points` of the `member_account`'s funds from the pool. It
* implicitly collects the rewards one last time, since not doing so would mean some
* rewards would be forfeited.
*
* Under certain conditions, this call can be dispatched permissionlessly (i.e. by any
* account).
*
* # Conditions for a permissionless dispatch.
*
* * The pool is blocked and the caller is either the root or state-toggler. This is
* refereed to as a kick.
* * The pool is destroying and the member is not the depositor.
* * The pool is destroying, the member is the depositor and no other members are in the
* pool.
*
* ## Conditions for permissioned dispatch (i.e. the caller is also the
* `member_account`):
*
* * The caller is not the depositor.
* * The caller is the depositor, the pool is destroying and no other members are in the
* pool.
*
* # Note
*
* If there are too many unlocking chunks to unbond with the pool account,
* [`Call::pool_withdraw_unbonded`] can be called to try and minimize unlocking chunks. If
* there are too many unlocking chunks, the result of this call will likely be the
* `NoMoreChunks` error from the staking system.
**/
unbond: AugmentedSubmittable<(memberAccount: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, unbondingPoints: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Compact<u128>]>;
/**
* Update the roles of the pool.
*
* The root is the only entity that can change any of the roles, including itself,
* excluding the depositor, who can never change.
*
* It emits an event, notifying UIs of the role change. This event is quite relevant to
* most pool members and they should be informed of changes to pool roles.
**/
updateRoles: AugmentedSubmittable<(poolId: u32 | AnyNumber | Uint8Array, newRoot: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, newNominator: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, newStateToggler: PalletNominationPoolsConfigOpAccountId32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpAccountId32]>;
/**
* Withdraw unbonded funds from `member_account`. If no bonded funds can be unbonded, an
* error is returned.
*
* Under certain conditions, this call can be dispatched permissionlessly (i.e. by any
* account).
*
* # Conditions for a permissionless dispatch
*
* * The pool is in destroy mode and the target is not the depositor.
* * The target is the depositor and they are the only member in the sub pools.
* * The pool is blocked and the caller is either the root or state-toggler.
*
* # Conditions for permissioned dispatch
*
* * The caller is the target and they are not the depositor.
*
* # Note
*
* If the target is the depositor, the pool will be destroyed.
**/
withdrawUnbonded: AugmentedSubmittable<(memberAccount: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u32]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
paraInclusion: {
/**
* Generic tx
@@ -2312,12 +2495,8 @@ declare module '@polkadot/api-base/types/submittable' {
* - `proxy_type`: The permissions allowed for this proxy account.
* - `delay`: The announcement period required of the initial proxy. Will generally be
* zero.
*
* # <weight>
* Weight is a function of the number of proxies the user has (P).
* # </weight>
**/
addProxy: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, proxyType: PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, 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]>;
/**
* Publish the hash of a proxy-call that will be made in the future.
*
@@ -2334,14 +2513,8 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `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.
*
* # <weight>
* Weight is a function of:
* - A: the number of announcements made.
* - P: the number of proxies the user has.
* # </weight>
**/
announce: AugmentedSubmittable<(real: AccountId32 | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, 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]>;
/**
* Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and
* initialize it with a proxy of `proxy_type` for `origin` sender.
@@ -2361,36 +2534,27 @@ declare module '@polkadot/api-base/types/submittable' {
* same sender, with the same parameters.
*
* 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
* inaccessible.
*
* 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.
* - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`.
* - `proxy_type`: The proxy type originally passed to `anonymous`.
* - `height`: The height of the chain when the call to `anonymous` was processed.
* - `ext_index`: The extrinsic index in which the call to `anonymous` was processed.
* - `spawner`: The account that originally called `pure` to create this account.
* - `index`: The disambiguation index originally passed to `pure`. Probably `0`.
* - `proxy_type`: The proxy type originally passed to `pure`.
* - `height`: The height of the chain when the call to `pure` 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
* account whose `anonymous` call has corresponding parameters.
*
* # <weight>
* Weight is a function of the number of proxies the user has (P).
* # </weight>
* Fails with `NoPermission` in case the caller is not a previously created pure
* account whose `pure` call has corresponding parameters.
**/
killAnonymous: AugmentedSubmittable<(spawner: AccountId32 | 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>, [AccountId32, 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
* `add_proxy`.
@@ -2403,12 +2567,8 @@ declare module '@polkadot/api-base/types/submittable' {
* - `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.
* - `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: AccountId32 | string | Uint8Array, forceProxyType: Option<PolkadotRuntimeProxyType> | null | Uint8Array | PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, 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]>;
/**
* Dispatch the given `call` from an account that the sender is authorized for through
* `add_proxy`.
@@ -2421,14 +2581,8 @@ declare module '@polkadot/api-base/types/submittable' {
* - `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.
* - `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: AccountId32 | string | Uint8Array, real: AccountId32 | string | Uint8Array, forceProxyType: Option<PolkadotRuntimeProxyType> | null | Uint8Array | PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32, 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]>;
/**
* Remove the given announcement of a delegate.
*
@@ -2440,14 +2594,8 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `delegate`: The account that previously announced the call.
* - `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: AccountId32 | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, 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]>;
/**
* Remove a given announcement.
*
@@ -2459,25 +2607,15 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `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.
*
* # <weight>
* Weight is a function of:
* - A: the number of announcements made.
* - P: the number of proxies the user has.
* # </weight>
**/
removeAnnouncement: AugmentedSubmittable<(real: AccountId32 | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, 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]>;
/**
* Unregister all proxy accounts for the sender.
*
* 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.**
*
* # <weight>
* Weight is a function of the number of proxies the user has (P).
* # </weight>
**/
removeProxies: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
@@ -2488,12 +2626,8 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `proxy`: The account that the `caller` would like to remove as a proxy.
* - `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: AccountId32 | string | Uint8Array, proxyType: PolkadotRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | 'IdentityJudgement' | 'CancelProxy' | 'Auction' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, 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]>;
/**
* Generic tx
**/
@@ -2953,31 +3087,6 @@ declare module '@polkadot/api-base/types/submittable' {
* # </weight>
**/
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).
*
@@ -3017,7 +3126,7 @@ declare module '@polkadot/api-base/types/submittable' {
* * `min_commission`: The minimum amount of commission that each validators must maintain.
* 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.
* to kick people under the new limits, `chill_other` should be called.
@@ -3190,7 +3299,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - up to 3 events
* # </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
* state.
@@ -3316,7 +3425,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* May only be called from `T::AddOrigin`.
**/
addMember: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
addMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Swap out the sending member for some other key `new`.
*
@@ -3324,7 +3433,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Prime membership is passed from the origin account to `new`, if extant.
**/
changeKey: AugmentedSubmittable<(updated: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
changeKey: AugmentedSubmittable<(updated: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Remove the prime member if it exists.
*
@@ -3336,7 +3445,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* May only be called from `T::RemoveOrigin`.
**/
removeMember: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
removeMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Change the membership to a new set, disregarding the existing membership. Be nice and
* pass `members` pre-sorted.
@@ -3349,7 +3458,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* May only be called from `T::PrimeOrigin`.
**/
setPrime: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
setPrime: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Swap out one member `remove` for another `add`.
*
@@ -3357,7 +3466,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Prime membership is *not* passed from `remove` to `add`, if extant.
**/
swapMember: AugmentedSubmittable<(remove: AccountId32 | string | Uint8Array, add: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32]>;
swapMember: AugmentedSubmittable<(remove: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, add: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress]>;
/**
* Generic tx
**/
@@ -3429,7 +3538,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - DbWrites: `Reasons`, `Tips`
* # </weight>
**/
reportAwesome: AugmentedSubmittable<(reason: Bytes | string | Uint8Array, who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, AccountId32]>;
reportAwesome: AugmentedSubmittable<(reason: Bytes | string | Uint8Array, who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, MultiAddress]>;
/**
* Retract a prior tip-report from `report_awesome`, and cancel the process of tipping.
*
@@ -3518,7 +3627,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - DbWrites: `Reasons`, `Tips`
* # </weight>
**/
tipNew: AugmentedSubmittable<(reason: Bytes | string | Uint8Array, who: AccountId32 | string | Uint8Array, tipValue: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, AccountId32, Compact<u128>]>;
tipNew: AugmentedSubmittable<(reason: Bytes | string | Uint8Array, who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, tipValue: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, MultiAddress, Compact<u128>]>;
/**
* Generic tx
**/
@@ -3611,7 +3720,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Events:
* - `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
**/
@@ -3824,7 +3933,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - both nodes are within the same bag,
* - and `origin` has a greater `Score` than `lighter`.
**/
putInFrontOf: AugmentedSubmittable<(lighter: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
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
@@ -3837,7 +3946,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* If `dislocated` does not exists, it returns an error.
**/
rebag: AugmentedSubmittable<(dislocated: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
rebag: AugmentedSubmittable<(dislocated: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Generic tx
**/
@@ -3857,7 +3966,7 @@ declare module '@polkadot/api-base/types/submittable' {
* NOTE: A successful return to this does *not* imply that the `msg` was executed successfully
* 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
* version a destination can accept is unknown).
+109 -61
View File
@@ -7,9 +7,9 @@ import '@polkadot/api-base/types/consts';
import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
import type { Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { Codec } from '@polkadot/types-codec/types';
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletContractsSchedule, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
import type { Codec, ITuple } from '@polkadot/types-codec/types';
import type { Perbill, Percent, Permill, Weight } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletContractsSchedule, PalletReferendaTrackInfo, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight } from '@polkadot/types/lookup';
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
@@ -110,58 +110,6 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
bagsList: {
/**
* The list of thresholds separating the various bags.
*
* Ids are separated into unsorted bags according to their score. This specifies the
* thresholds separating the bags. An id's bag is the largest bag for which the id's score
* is less than or equal to its upper threshold.
*
* When ids are iterated, higher bags are iterated completely before lower bags. This means
* that iteration is _semi-sorted_: ids of higher score tend to come before ids of lower
* score, but peer ids within a particular bag are sorted in insertion order.
*
* # Expressing the constant
*
* This constant must be sorted in strictly increasing order. Duplicate items are not
* permitted.
*
* There is an implied upper limit of `Score::MAX`; that value does not need to be
* specified within the bag. For any two threshold lists, if one ends with
* `Score::MAX`, the other one does not, and they are otherwise equal, the two
* lists will behave identically.
*
* # Calculation
*
* It is recommended to generate the set of thresholds in a geometric series, such that
* there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *
* constant_ratio).max(threshold[k] + 1)` for all `k`.
*
* The helpers in the `/utils/frame/generate-bags` module can simplify this calculation.
*
* # Examples
*
* - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and
* iteration is strictly in insertion order.
* - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to
* the procedure given above, then the constant ratio is equal to 2.
* - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to
* the procedure given above, then the constant ratio is approximately equal to 1.248.
* - If the threshold list begins `[1, 2, 3, ...]`, then an id with score 0 or 1 will fall
* into bag 0, an id with score 2 will fall into bag 1, etc.
*
* # Migration
*
* In the event that this list ever changes, a copy of the old bags list must be retained.
* With that `List::migrate` can be called, which will perform the appropriate migration.
**/
bagThresholds: Vec<u64> & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
balances: {
/**
* The minimum amount required to keep an account open.
@@ -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.
**/
contractAccessWeight: u64 & AugmentedConst<ApiType>;
contractAccessWeight: Weight & AugmentedConst<ApiType>;
/**
* 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
* information about the deletion queue.
**/
deletionWeightLimit: u64 & AugmentedConst<ApiType>;
deletionWeightLimit: Weight & AugmentedConst<ApiType>;
/**
* 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.
**/
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
**/
@@ -463,7 +414,7 @@ declare module '@polkadot/api-base/types/consts' {
* this pallet), then [`MinerConfig::solution_weight`] is used to compare against
* this value.
**/
signedMaxWeight: u64 & AugmentedConst<ApiType>;
signedMaxWeight: Weight & AugmentedConst<ApiType>;
/**
* Duration of the signed phase.
**/
@@ -494,6 +445,21 @@ declare module '@polkadot/api-base/types/consts' {
* Number of runners_up to keep.
**/
desiredRunnersUp: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of candidates in a phragmen election.
*
* Warning: The election happens onchain, and this value will determine
* the size of the election. When this limit is reached no more
* candidates are accepted in the election.
**/
maxCandidates: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of voters to allow in a phragmen election.
*
* Warning: This impacts the size of the election which is run onchain.
* When the limit is reached the new voters are ignored.
**/
maxVoters: u32 & AugmentedConst<ApiType>;
/**
* Identifier for the elections-phragmen pallet's lock
**/
@@ -764,6 +730,10 @@ declare module '@polkadot/api-base/types/consts' {
* The minimum amount to be used as a deposit for a public referendum proposal.
**/
submissionDeposit: u128 & AugmentedConst<ApiType>;
/**
* Information concerning the different referendum tracks.
**/
tracks: Vec<ITuple<[u16, PalletReferendaTrackInfo]>> & AugmentedConst<ApiType>;
/**
* The number of blocks after submission that a referendum must begin being decided by.
* Once this passes, then anyone may cancel the referendum.
@@ -829,6 +799,10 @@ declare module '@polkadot/api-base/types/consts' {
* The minimum amount to be used as a deposit for a public referendum proposal.
**/
submissionDeposit: u128 & AugmentedConst<ApiType>;
/**
* Information concerning the different referendum tracks.
**/
tracks: Vec<ITuple<[u16, PalletReferendaTrackInfo]>> & AugmentedConst<ApiType>;
/**
* The number of blocks after submission that a referendum must begin being decided by.
* Once this passes, then anyone may cancel the referendum.
@@ -844,7 +818,7 @@ declare module '@polkadot/api-base/types/consts' {
* The maximum weight that may be scheduled per block for any dispatchables of less
* 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.
* Not strictly enforced, but used for weight estimation.
@@ -904,6 +878,28 @@ declare module '@polkadot/api-base/types/consts' {
* Number of eras that staked funds must remain bonded for.
**/
bondingDuration: u32 & AugmentedConst<ApiType>;
/**
* Number of eras to keep in history.
*
* Following information is kept for eras in `[current_era -
* HistoryDepth, current_era]`: `ErasStakers`, `ErasStakersClipped`,
* `ErasValidatorPrefs`, `ErasValidatorReward`, `ErasRewardPoints`,
* `ErasTotalStake`, `ErasStartSessionIndex`,
* `StakingLedger.claimed_rewards`.
*
* Must be more than the number of eras delayed by session.
* I.e. active era must always be in history. I.e. `active_era >
* current_era - history_depth` must be guaranteed.
*
* If migrating an existing pallet from storage value to config value,
* this should be set to same value or greater as in storage.
*
* Note: `HistoryDepth` is used as the upper bound for the `BoundedVec`
* item `StakingLedger.claimed_rewards`. Setting this value lower than
* the existing value can lead to inconsistencies and will need to be
* handled properly in a migration.
**/
historyDepth: u32 & AugmentedConst<ApiType>;
/**
* Maximum number of nominations per nominator.
**/
@@ -982,9 +978,9 @@ declare module '@polkadot/api-base/types/consts' {
/**
* The weight of runtime database operations the runtime can invoke.
**/
dbWeight: FrameSupportWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
dbWeight: SpWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
/**
* The designated SS85 prefix of this chain.
* The designated SS58 prefix of this chain.
*
* This replaces the "ss58Format" property declared in the chain spec. Reason is
* that the runtime should know about the prefix in order to make use of it as
@@ -1168,5 +1164,57 @@ declare module '@polkadot/api-base/types/consts' {
**/
[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
} // declare module
+80 -24
View File
@@ -17,6 +17,14 @@ declare module '@polkadot/api-base/types/errors' {
* nominated.
**/
AccountNonGrata: AugmentedError<ApiType>;
/**
* The Alliance has been initialized, therefore cannot be initialized again.
**/
AllianceAlreadyInitialized: AugmentedError<ApiType>;
/**
* The Alliance has not been initialized yet, therefore accounts cannot join it.
**/
AllianceNotYetInitialized: AugmentedError<ApiType>;
/**
* Account is already an elevated (fellow) member.
**/
@@ -25,18 +33,26 @@ declare module '@polkadot/api-base/types/errors' {
* Account is already a member.
**/
AlreadyMember: AugmentedError<ApiType>;
/**
* Account already gave retirement notice
**/
AlreadyRetiring: AugmentedError<ApiType>;
/**
* Item is already listed as unscrupulous.
**/
AlreadyUnscrupulous: AugmentedError<ApiType>;
/**
* Invalid witness data given.
**/
BadWitness: AugmentedError<ApiType>;
/**
* Founders must be provided to initialize the Alliance.
**/
FoundersMissing: AugmentedError<ApiType>;
/**
* Balance is insufficient for the required deposit.
**/
InsufficientFunds: AugmentedError<ApiType>;
/**
* The founders/fellows/allies have already been initialized.
**/
MembersAlreadyInitialized: AugmentedError<ApiType>;
/**
* The announcement is not found.
**/
@@ -69,6 +85,14 @@ declare module '@polkadot/api-base/types/errors' {
* Account does not have voting rights.
**/
NoVotingRights: AugmentedError<ApiType>;
/**
* Account did not give a retirement notice required to retire.
**/
RetirementNoticeNotGiven: AugmentedError<ApiType>;
/**
* Retirement period has not passed.
**/
RetirementPeriodNotPassed: AugmentedError<ApiType>;
/**
* Length of website URL exceeds `MaxWebsiteUrlLength`.
**/
@@ -85,10 +109,6 @@ declare module '@polkadot/api-base/types/errors' {
* The number of unscrupulous items exceeds `MaxUnscrupulousItems`.
**/
TooManyUnscrupulousItems: AugmentedError<ApiType>;
/**
* This member is up for being kicked from the Alliance and cannot perform this operation.
**/
UpForKicking: AugmentedError<ApiType>;
/**
* The account's identity has no good judgement.
**/
@@ -272,16 +292,6 @@ declare module '@polkadot/api-base/types/errors' {
**/
[key: string]: AugmentedError<ApiType>;
};
bagsList: {
/**
* A error in the list interface implementation.
**/
List: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
balances: {
/**
* Beneficiary account must pre-exist
@@ -880,6 +890,34 @@ declare module '@polkadot/api-base/types/errors' {
**/
[key: string]: AugmentedError<ApiType>;
};
fastUnstake: {
/**
* The provided un-staker is already in Head, and cannot deregister.
**/
AlreadyHead: AugmentedError<ApiType>;
/**
* The bonded account has already been queued.
**/
AlreadyQueued: AugmentedError<ApiType>;
/**
* The provided Controller account was not found.
*
* This means that the given account is not bonded.
**/
NotController: AugmentedError<ApiType>;
/**
* The bonded account has active unlocking chunks.
**/
NotFullyBonded: AugmentedError<ApiType>;
/**
* The provided un-staker is not in the `Queue`.
**/
NotQueued: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
gilt: {
/**
* The amount of the bid is less than the minimum allowed.
@@ -980,6 +1018,10 @@ declare module '@polkadot/api-base/types/errors' {
* The target is invalid.
**/
InvalidTarget: AugmentedError<ApiType>;
/**
* The provided judgement was for a different identity.
**/
JudgementForDifferentIdentity: AugmentedError<ApiType>;
/**
* Judgement given.
**/
@@ -1700,6 +1742,10 @@ declare module '@polkadot/api-base/types/errors' {
* A nomination target was supplied that was blocked or otherwise not a validator.
**/
BadTarget: AugmentedError<ApiType>;
/**
* Some bound is not met.
**/
BoundNotMet: AugmentedError<ApiType>;
/**
* The user has enough bond and thus cannot be chilled forcefully by an external person.
**/
@@ -1787,7 +1833,11 @@ declare module '@polkadot/api-base/types/errors' {
};
stateTrieMigration: {
/**
* bad witness data provided.
* Bad child root provided.
**/
BadChildRoot: AugmentedError<ApiType>;
/**
* Bad witness data provided.
**/
BadWitness: AugmentedError<ApiType>;
/**
@@ -1801,7 +1851,7 @@ declare module '@polkadot/api-base/types/errors' {
**/
KeyTooLong: AugmentedError<ApiType>;
/**
* max signed limits not respected.
* Max signed limits not respected.
**/
MaxSignedLimits: AugmentedError<ApiType>;
/**
@@ -1812,10 +1862,6 @@ declare module '@polkadot/api-base/types/errors' {
* Signed migration is not allowed because the maximum limit is not set yet.
**/
SignedMigrationNotAllowed: AugmentedError<ApiType>;
/**
* upper bound of size is exceeded,
**/
SizeUpperBoundExceeded: AugmentedError<ApiType>;
/**
* Generic error
**/
@@ -2159,6 +2205,16 @@ declare module '@polkadot/api-base/types/errors' {
**/
[key: string]: AugmentedError<ApiType>;
};
voterBagsList: {
/**
* A error in the list interface implementation.
**/
List: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
whitelist: {
/**
* The call was already whitelisted; No-Op.
+98 -27
View File
@@ -9,13 +9,17 @@ import type { ApiTypes, AugmentedEvent } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPostDispatchInfo, NodeRuntimeProxyType, PalletAllianceCid, PalletAllianceUnscrupulousItem, PalletConvictionVotingTally, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletNominationPoolsPoolState, PalletRankedCollectiveTally, PalletRankedCollectiveVoteRecord, PalletStakingExposure, PalletStakingValidatorPrefs, 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>;
declare module '@polkadot/api-base/types/events' {
interface AugmentedEvents<ApiType extends ApiTypes> {
alliance: {
/**
* Alliance disbanded. Includes number deleted members and unreserved deposits.
**/
AllianceDisbanded: AugmentedEvent<ApiType, [votingMembers: u32, allyMembers: u32, unreserved: u32], { votingMembers: u32, allyMembers: u32, unreserved: u32 }>;
/**
* 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.
**/
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).
**/
@@ -176,15 +184,12 @@ declare module '@polkadot/api-base/types/events' {
**/
[key: string]: AugmentedEvent<ApiType>;
};
bagsList: {
assetTxPayment: {
/**
* Moved an account from one bag to another.
* A transaction fee `actual_fee`, of which `tip` was added to the minimum inclusion fee,
* has been paid by `who` in an asset `asset_id`.
**/
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 }>;
AssetTxFeePaid: AugmentedEvent<ApiType, [who: AccountId32, actualFee: u128, tip: u128, assetId: Option<u32>], { who: AccountId32, actualFee: u128, tip: u128, assetId: Option<u32> }>;
/**
* Generic event
**/
@@ -295,6 +300,16 @@ declare module '@polkadot/api-base/types/events' {
[key: string]: AugmentedEvent<ApiType>;
};
contracts: {
/**
* A contract was called either by a plain account or another contract.
*
* # Note
*
* Please keep in mind that like all events this is only emitted for successful
* calls. This is because on failure all storage changes including events are
* rolled back.
**/
Called: AugmentedEvent<ApiType, [caller: AccountId32, contract: AccountId32], { caller: AccountId32, contract: AccountId32 }>;
/**
* A code with the specified hash was removed.
**/
@@ -311,6 +326,16 @@ declare module '@polkadot/api-base/types/events' {
* A custom event emitted by the contract.
**/
ContractEmitted: AugmentedEvent<ApiType, [contract: AccountId32, data: Bytes], { contract: AccountId32, data: Bytes }>;
/**
* A contract delegate called a code hash.
*
* # Note
*
* Please keep in mind that like all events this is only emitted for successful
* calls. This is because on failure all storage changes including events are
* rolled back.
**/
DelegateCalled: AugmentedEvent<ApiType, [contract: AccountId32, codeHash: H256], { contract: AccountId32, codeHash: H256 }>;
/**
* Contract deployed by address at the specified address.
**/
@@ -467,10 +492,15 @@ declare module '@polkadot/api-base/types/events' {
};
electionProviderMultiPhase: {
/**
* The election has been finalized, with `Some` of the given computation, or else if the
* election failed, `None`.
* An election failed.
*
* Not much can be said about which computes failed in the process.
**/
ElectionFinalized: AugmentedEvent<ApiType, [electionCompute: Option<PalletElectionProviderMultiPhaseElectionCompute>], { electionCompute: Option<PalletElectionProviderMultiPhaseElectionCompute> }>;
ElectionFailed: AugmentedEvent<ApiType, []>;
/**
* The election has been finalized, with the given computation and score.
**/
ElectionFinalized: AugmentedEvent<ApiType, [compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore], { compute: PalletElectionProviderMultiPhaseElectionCompute, score: SpNposElectionsElectionScore }>;
/**
* An account has been rewarded for their signed submission being finalized.
**/
@@ -491,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.
**/
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.
**/
@@ -544,6 +574,33 @@ declare module '@polkadot/api-base/types/events' {
**/
[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, maybePoolId: Option<u32>, result: Result<Null, SpRuntimeDispatchError>], { stash: AccountId32, maybePoolId: Option<u32>, result: Result<Null, SpRuntimeDispatchError> }>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
gilt: {
/**
* A bid was successfully placed.
@@ -755,12 +812,12 @@ declare module '@polkadot/api-base/types/events' {
* pool.
* - `points` is the number of points that are issued as a result of `balance` being
* dissolved into the corresponding unbonding pool.
*
* - `era` is the era in which the balance will be unbonded.
* In the absence of slashing, these values will match. In the presence of slashing, the
* number of points that are issued in the unbonding pool will be less than the amount
* requested to be unbonded.
**/
Unbonded: AugmentedEvent<ApiType, [member: AccountId32, poolId: u32, balance: u128, points: u128], { member: AccountId32, poolId: u32, balance: u128, points: u128 }>;
Unbonded: AugmentedEvent<ApiType, [member: AccountId32, poolId: u32, balance: u128, points: u128, era: u32], { member: AccountId32, poolId: u32, balance: u128, points: u128, era: u32 }>;
/**
* The unbond pool at `era` of pool `pool_id` has been slashed to `balance`.
**/
@@ -814,15 +871,10 @@ declare module '@polkadot/api-base/types/events' {
* An announcement was placed to make a call in the future.
**/
Announced: AugmentedEvent<ApiType, [real: AccountId32, proxy: AccountId32, callHash: H256], { real: AccountId32, proxy: AccountId32, callHash: H256 }>;
/**
* Anonymous account has been created by new proxy with given
* disambiguation index and proxy type.
**/
AnonymousCreated: AugmentedEvent<ApiType, [anonymous: AccountId32, who: AccountId32, proxyType: NodeRuntimeProxyType, disambiguationIndex: u16], { anonymous: AccountId32, who: AccountId32, proxyType: NodeRuntimeProxyType, disambiguationIndex: u16 }>;
/**
* A proxy was added.
**/
ProxyAdded: AugmentedEvent<ApiType, [delegator: AccountId32, delegatee: AccountId32, proxyType: NodeRuntimeProxyType, delay: u32], { delegator: AccountId32, delegatee: AccountId32, proxyType: NodeRuntimeProxyType, delay: u32 }>;
ProxyAdded: AugmentedEvent<ApiType, [delegator: AccountId32, delegatee: AccountId32, proxyType: KitchensinkRuntimeProxyType, delay: u32], { delegator: AccountId32, delegatee: AccountId32, proxyType: KitchensinkRuntimeProxyType, delay: u32 }>;
/**
* A proxy was executed correctly, with the given.
**/
@@ -830,7 +882,12 @@ declare module '@polkadot/api-base/types/events' {
/**
* A proxy was removed.
**/
ProxyRemoved: AugmentedEvent<ApiType, [delegator: AccountId32, delegatee: AccountId32, proxyType: NodeRuntimeProxyType, delay: u32], { delegator: AccountId32, delegatee: AccountId32, proxyType: NodeRuntimeProxyType, 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
**/
@@ -1146,8 +1203,8 @@ declare module '@polkadot/api-base/types/events' {
**/
Rewarded: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
* One validator (and its nominators) has been slashed by the given amount.
* \[validator, amount\]
* One staker (and potentially its nominators) has been slashed by the given amount.
* \[staker, amount\]
**/
Slashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
@@ -1184,7 +1241,7 @@ declare module '@polkadot/api-base/types/events' {
/**
* Migration got halted due to an error or miss-configuration.
**/
Halted: AugmentedEvent<ApiType, []>;
Halted: AugmentedEvent<ApiType, [error: PalletStateTrieMigrationError], { error: PalletStateTrieMigrationError }>;
/**
* Given number of `(top, child)` keys were migrated respectively, with the given
* `compute`.
@@ -1225,11 +1282,11 @@ declare module '@polkadot/api-base/types/events' {
/**
* An extrinsic failed.
**/
ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportWeightsDispatchInfo }>;
ExtrinsicFailed: AugmentedEvent<ApiType, [dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportDispatchDispatchInfo], { dispatchError: SpRuntimeDispatchError, dispatchInfo: FrameSupportDispatchDispatchInfo }>;
/**
* An extrinsic completed successfully.
**/
ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportWeightsDispatchInfo], { dispatchInfo: FrameSupportWeightsDispatchInfo }>;
ExtrinsicSuccess: AugmentedEvent<ApiType, [dispatchInfo: FrameSupportDispatchDispatchInfo], { dispatchInfo: FrameSupportDispatchDispatchInfo }>;
/**
* An account was reaped.
**/
@@ -1568,9 +1625,23 @@ declare module '@polkadot/api-base/types/events' {
**/
[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: {
CallWhitelisted: AugmentedEvent<ApiType, [callHash: H256], { callHash: H256 }>;
WhitelistedCallDispatched: AugmentedEvent<ApiType, [callHash: H256, result: Result<FrameSupportWeightsPostDispatchInfo, SpRuntimeDispatchErrorWithPostInfo>], { callHash: H256, result: Result<FrameSupportWeightsPostDispatchInfo, SpRuntimeDispatchErrorWithPostInfo> }>;
WhitelistedCallDispatched: AugmentedEvent<ApiType, [callHash: H256, result: Result<FrameSupportDispatchPostDispatchInfo, SpRuntimeDispatchErrorWithPostInfo>], { callHash: H256, result: Result<FrameSupportDispatchPostDispatchInfo, SpRuntimeDispatchErrorWithPostInfo> }>;
WhitelistedCallRemoved: AugmentedEvent<ApiType, [callHash: H256], { callHash: H256 }>;
/**
* Generic event
+63 -47
View File
@@ -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 { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, NodeRuntimeSessionKeys, 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';
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.
**/
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.
* 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.
**/
unscrupulousWebsites: AugmentedQuery<ApiType, () => Observable<Vec<Bytes>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* A set of members that are (potentially) being kicked out. They cannot retire until the
* motion is settled.
**/
upForKicking: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<bool>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* Generic query
**/
@@ -245,28 +245,6 @@ declare module '@polkadot/api-base/types/storage' {
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
bagsList: {
/**
* Counter for the related counted storage map
**/
counterForListNodes: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* A bag stored in storage.
*
* Stores a `Bag` struct, which stores head and tail pointers to itself.
**/
listBags: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletBagsListListBag>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
/**
* A single node, within some bag.
*
* Nodes store links forward and back within their respective bags.
**/
listNodes: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletBagsListListNode>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
balances: {
/**
* The Balances pallet example of storing the balance of an account.
@@ -378,7 +356,7 @@ declare module '@polkadot/api-base/types/storage' {
*
* TWOX-NOTE: SAFE since `AccountId` is a secure hash.
**/
contractInfoOf: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletContractsStorageRawContractInfo>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
contractInfoOf: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletContractsStorageContractInfo>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* Evicted contracts that await child trie deletion.
*
@@ -662,6 +640,36 @@ declare module '@polkadot/api-base/types/storage' {
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
fastUnstake: {
/**
* Counter for the related counted storage map
**/
counterForQueue: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Number of eras to check per block.
*
* If set to 0, this pallet does absolutely nothing.
*
* Based on the amount of weight available at `on_idle`, up to this many eras of a single
* nominator might be checked.
**/
erasToCheckPerBlock: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The current "head of the queue" being unstaked.
**/
head: AugmentedQuery<ApiType, () => Observable<Option<PalletFastUnstakeUnstakeRequest>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The map of all accounts wishing to be unstaked.
*
* Points the `AccountId` wishing to unstake to the optional `PoolId` they wish to join
* thereafter.
**/
queue: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<Option<u32>>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
gilt: {
/**
* The currently active gilts, indexed according to the order of creation.
@@ -1153,7 +1161,7 @@ declare module '@polkadot/api-base/types/storage' {
/**
* The next session keys for a validator.
**/
nextKeys: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<NodeRuntimeSessionKeys>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
nextKeys: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<KitchensinkRuntimeSessionKeys>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* True if the underlying economic identities or weighting behind the validators
* has changed in the queued validator set.
@@ -1163,7 +1171,7 @@ declare module '@polkadot/api-base/types/storage' {
* The queued keys for the next session. When the next session begins, these keys
* will be used to determine the validator's session keys.
**/
queuedKeys: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[AccountId32, NodeRuntimeSessionKeys]>>>, []> & QueryableStorageEntry<ApiType, []>;
queuedKeys: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[AccountId32, KitchensinkRuntimeSessionKeys]>>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The current set of validators.
**/
@@ -1295,10 +1303,6 @@ declare module '@polkadot/api-base/types/storage' {
* This is basically in sync with the call to [`pallet_session::SessionManager::new_session`].
**/
currentPlannedSession: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The earliest era for which we have a pending, unapplied slash.
**/
earliestUnappliedSlash: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Rewards for the last `HISTORY_DEPTH` eras.
* If reward hasn't been set or has been removed then 0 reward is returned.
@@ -1357,16 +1361,6 @@ declare module '@polkadot/api-base/types/storage' {
* Mode of era forcing.
**/
forceEra: AugmentedQuery<ApiType, () => Observable<PalletStakingForcing>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Number of eras to keep in history.
*
* Information is kept for eras in `[current_era - history_depth; current_era]`.
*
* Must be more than the number of eras delayed by session otherwise. I.e. active era must
* always be in history. I.e. `active_era > current_era - history_depth` must be
* guaranteed.
**/
historyDepth: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Any validators that may never be slashed or forcibly kicked. It's a Vec since they're
* easy to initialize and the performance hit is minimal (we expect no more than four
@@ -1541,7 +1535,7 @@ declare module '@polkadot/api-base/types/storage' {
/**
* The current weight for the block.
**/
blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportWeightsPerDispatchClassU64>, []> & QueryableStorageEntry<ApiType, []>;
blockWeight: AugmentedQuery<ApiType, () => Observable<FrameSupportDispatchPerDispatchClassWeight>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Digest of the current block, also part of the block header.
**/
@@ -1808,6 +1802,28 @@ declare module '@polkadot/api-base/types/storage' {
**/
[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: {
whitelistedCall: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<Null>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
/**
+28 -2
View File
@@ -7,7 +7,7 @@ import '@polkadot/api-base/types/calls';
import type { ApiTypes, AugmentedCall, DecoratedCallBase } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, Vec, u32, u64 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
import type { BlockHash } from '@polkadot/types/interfaces/chain';
@@ -18,7 +18,7 @@ import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/t
import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
import type { AccountId, Balance, Block, 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 { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
import type { TransactionSource, TransactionValidity } from '@polkadot/types/interfaces/txqueue';
@@ -216,6 +216,17 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0x17a6bc0d0062aeb3/1 */
nominationPoolsApi: {
/**
* Returns the pending rewards for the given member.
**/
pendingRewards: AugmentedCall<ApiType, (member: AccountId | string | Uint8Array) => Observable<Balance>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xf78b278be53f454c/2 */
offchainWorkerApi: {
/**
@@ -268,5 +279,20 @@ declare module '@polkadot/api-base/types/calls' {
**/
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xf3ff14d5ab527059/1 */
transactionPaymentCallApi: {
/**
* The call fee details
**/
queryCallFeeDetails: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<FeeDetails>>;
/**
* The call info
**/
queryCallInfo: AugmentedCall<ApiType, (call: Call | IMethod | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
/**
* Generic call
**/
[key: string]: DecoratedCallBase<ApiType>;
};
} // AugmentedCalls
} // declare module
+170 -180
View File
@@ -9,8 +9,8 @@ import type { ApiTypes, AugmentedSubmittable, SubmittableExtrinsic, SubmittableE
import type { Data } from '@polkadot/types';
import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportScheduleDispatchTime, FrameSupportScheduleMaybeHashed, NodeRuntimeOriginCaller, NodeRuntimeProxyType, NodeRuntimeSessionKeys, 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 { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill, Weight } from '@polkadot/types/interfaces/runtime';
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 } from '@polkadot/types/lookup';
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
@@ -32,15 +32,28 @@ declare module '@polkadot/api-base/types/submittable' {
*
* 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: Compact<Weight> | AnyNumber | Uint8Array, lengthBound: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Compact<u32>, Compact<Weight>, 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.
**/
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>]>;
/**
@@ -72,6 +85,7 @@ declare module '@polkadot/api-base/types/submittable' {
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.
* This can only be done once you have `give_retirement_notice` and it has expired.
**/
retire: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
@@ -131,7 +145,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - up to 3 events
* # </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
* state.
@@ -726,36 +740,6 @@ declare module '@polkadot/api-base/types/submittable' {
**/
[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: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
* 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: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
balances: {
/**
* Exactly as `transfer`, except the origin must be root and the source account may be
@@ -1159,7 +1143,7 @@ declare module '@polkadot/api-base/types/submittable' {
* * 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.
**/
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: Compact<Weight> | AnyNumber | Uint8Array, storageDepositLimit: Option<Compact<u128>> | null | Uint8Array | Compact<u128> | AnyNumber, data: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Compact<u128>, Compact<Weight>, Option<Compact<u128>>, Bytes]>;
/**
* Instantiates a contract from a previously deployed wasm binary.
*
@@ -1167,7 +1151,7 @@ declare module '@polkadot/api-base/types/submittable' {
* code deployment step. Instead, the `code_hash` of an on-chain deployed wasm binary
* 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: Compact<Weight> | 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<Weight>, Option<Compact<u128>>, H256, Bytes, Bytes]>;
/**
* Instantiates a new contract from the supplied `code` optionally transferring
* some balance.
@@ -1196,7 +1180,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - The `value` is transferred to the new 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: Compact<Weight> | 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<Weight>, Option<Compact<u128>>, Bytes, Bytes, Bytes]>;
/**
* Remove the code stored under `code_hash` and refund the deposit to its owner.
*
@@ -1267,7 +1251,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Weight: `O(R)` where R is the number of polls the voter delegating to has
* voted on. Weight is initially charged as if maximum votes, but is refunded later.
**/
delegate: AugmentedSubmittable<(clazz: u16 | AnyNumber | Uint8Array, to: AccountId32 | string | Uint8Array, conviction: PalletConvictionVotingConviction | 'None' | 'Locked1x' | 'Locked2x' | 'Locked3x' | 'Locked4x' | 'Locked5x' | 'Locked6x' | number | Uint8Array, balance: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, AccountId32, PalletConvictionVotingConviction, u128]>;
delegate: AugmentedSubmittable<(clazz: u16 | AnyNumber | Uint8Array, to: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, conviction: PalletConvictionVotingConviction | 'None' | 'Locked1x' | 'Locked2x' | 'Locked3x' | 'Locked4x' | 'Locked5x' | 'Locked6x' | number | Uint8Array, balance: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, MultiAddress, PalletConvictionVotingConviction, u128]>;
/**
* Remove a vote for a poll.
*
@@ -1286,7 +1270,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Weight: `O(R + log R)` where R is the number of polls that `target` has voted on.
* Weight is calculated for the maximum number of vote.
**/
removeOtherVote: AugmentedSubmittable<(target: AccountId32 | string | Uint8Array, clazz: u16 | AnyNumber | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u16, u32]>;
removeOtherVote: AugmentedSubmittable<(target: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, clazz: u16 | AnyNumber | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u16, u32]>;
/**
* Remove a vote for a poll.
*
@@ -1347,7 +1331,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(R)` with R number of vote of target.
**/
unlock: AugmentedSubmittable<(clazz: u16 | AnyNumber | Uint8Array, target: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, AccountId32]>;
unlock: AugmentedSubmittable<(clazz: u16 | AnyNumber | Uint8Array, target: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, MultiAddress]>;
/**
* Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal;
* otherwise it is a vote to keep the status quo.
@@ -1400,7 +1384,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - up to 3 events
* # </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
* state.
@@ -1599,7 +1583,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Weight: `O(R)` where R is the number of referendums the voter delegating to has
* voted on. Weight is charged as if maximum votes.
**/
delegate: AugmentedSubmittable<(to: AccountId32 | string | Uint8Array, conviction: PalletDemocracyConviction | 'None' | 'Locked1x' | 'Locked2x' | 'Locked3x' | 'Locked4x' | 'Locked5x' | 'Locked6x' | number | Uint8Array, balance: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, PalletDemocracyConviction, u128]>;
delegate: AugmentedSubmittable<(to: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, conviction: PalletDemocracyConviction | 'None' | 'Locked1x' | 'Locked2x' | 'Locked3x' | 'Locked4x' | 'Locked5x' | 'Locked6x' | number | Uint8Array, balance: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, PalletDemocracyConviction, u128]>;
/**
* Schedule an emergency cancellation of a referendum. Cannot happen twice to the same
* referendum.
@@ -1759,7 +1743,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Weight: `O(R + log R)` where R is the number of referenda that `target` has voted on.
* Weight is calculated for the maximum number of vote.
**/
removeOtherVote: AugmentedSubmittable<(target: AccountId32 | string | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
removeOtherVote: AugmentedSubmittable<(target: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u32]>;
/**
* Remove a vote for a referendum.
*
@@ -1827,7 +1811,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(R)` with R number of vote of target.
**/
unlock: AugmentedSubmittable<(target: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
unlock: AugmentedSubmittable<(target: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Veto and blacklist the external proposal hash.
*
@@ -2031,6 +2015,50 @@ declare module '@polkadot/api-base/types/submittable' {
**/
[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 (also cancels joining the pool if that was
* supplied on `register_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, and they potentially join a pool with their entire bonded stake.
*
* 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<(maybePoolId: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [Option<u32>]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
gilt: {
/**
* Place a bid for a gilt to be issued.
@@ -2138,7 +2166,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - One event.
* # </weight>
**/
addRegistrar: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
addRegistrar: AugmentedSubmittable<(account: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Add the given account to the sender's subs.
*
@@ -2222,6 +2250,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - `target`: the account whose identity the judgement is upon. This must be an account
* with a registered identity.
* - `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.
*
@@ -2233,7 +2262,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - One event.
* # </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.
*
@@ -2305,7 +2334,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - Benchmark: 8.823 + R * 0.32 µs (min squares analysis)
* # </weight>
**/
setAccountId: AugmentedSubmittable<(index: Compact<u32> | AnyNumber | Uint8Array, updated: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, AccountId32]>;
setAccountId: AugmentedSubmittable<(index: Compact<u32> | AnyNumber | Uint8Array, updated: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress]>;
/**
* Set the fee required for a judgement to be requested from a registrar.
*
@@ -2452,7 +2481,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - Writes: Indices Accounts, System Account (original owner)
* # </weight>
**/
forceTransfer: AugmentedSubmittable<(updated: AccountId32 | string | Uint8Array, index: u32 | AnyNumber | Uint8Array, freeze: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32, bool]>;
forceTransfer: AugmentedSubmittable<(updated: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, index: u32 | AnyNumber | Uint8Array, freeze: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u32, bool]>;
/**
* Free up an index owned by the sender.
*
@@ -2517,7 +2546,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - Writes: Indices Accounts, System Account (recipient)
* # </weight>
**/
transfer: AugmentedSubmittable<(updated: AccountId32 | string | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
transfer: AugmentedSubmittable<(updated: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u32]>;
/**
* Generic tx
**/
@@ -2610,7 +2639,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - Write: Multisig Storage, [Caller Account]
* # </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
* approved by a total of `threshold - 1` of `other_signatories`.
@@ -2658,7 +2687,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - Plus Call 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.
*
@@ -2760,7 +2789,7 @@ declare module '@polkadot/api-base/types/submittable' {
* In addition to `amount`, the caller will transfer the existential deposit; so the caller
* needs at have at least `amount + existential_deposit` transferrable.
**/
create: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, root: AccountId32 | string | Uint8Array, nominator: AccountId32 | string | Uint8Array, stateToggler: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, AccountId32, AccountId32, AccountId32]>;
create: AugmentedSubmittable<(amount: Compact<u128> | AnyNumber | Uint8Array, root: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, nominator: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, stateToggler: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u128>, MultiAddress, MultiAddress, MultiAddress]>;
/**
* Stake funds with a pool. The amount to bond is transferred from the member to the
* pools account and immediately increases the pools bond.
@@ -2856,7 +2885,7 @@ declare module '@polkadot/api-base/types/submittable' {
* there are too many unlocking chunks, the result of this call will likely be the
* `NoMoreChunks` error from the staking system.
**/
unbond: AugmentedSubmittable<(memberAccount: AccountId32 | string | Uint8Array, unbondingPoints: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, Compact<u128>]>;
unbond: AugmentedSubmittable<(memberAccount: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, unbondingPoints: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Compact<u128>]>;
/**
* Update the roles of the pool.
*
@@ -2888,7 +2917,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* If the target is the depositor, the pool will be destroyed.
**/
withdrawUnbonded: AugmentedSubmittable<(memberAccount: AccountId32 | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
withdrawUnbonded: AugmentedSubmittable<(memberAccount: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u32]>;
/**
* Generic tx
**/
@@ -2935,12 +2964,8 @@ declare module '@polkadot/api-base/types/submittable' {
* - `proxy_type`: The permissions allowed for this proxy account.
* - `delay`: The announcement period required of the initial proxy. Will generally be
* zero.
*
* # <weight>
* Weight is a function of the number of proxies the user has (P).
* # </weight>
**/
addProxy: AugmentedSubmittable<(delegate: AccountId32 | string | Uint8Array, proxyType: NodeRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, NodeRuntimeProxyType, 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]>;
/**
* Publish the hash of a proxy-call that will be made in the future.
*
@@ -2957,14 +2982,8 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `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.
*
* # <weight>
* Weight is a function of:
* - A: the number of announcements made.
* - P: the number of proxies the user has.
* # </weight>
**/
announce: AugmentedSubmittable<(real: AccountId32 | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, 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]>;
/**
* Spawn a fresh new account that is guaranteed to be otherwise inaccessible, and
* initialize it with a proxy of `proxy_type` for `origin` sender.
@@ -2984,36 +3003,27 @@ declare module '@polkadot/api-base/types/submittable' {
* same sender, with the same parameters.
*
* 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: NodeRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array, index: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [NodeRuntimeProxyType, 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
* inaccessible.
*
* 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.
* - `index`: The disambiguation index originally passed to `anonymous`. Probably `0`.
* - `proxy_type`: The proxy type originally passed to `anonymous`.
* - `height`: The height of the chain when the call to `anonymous` was processed.
* - `ext_index`: The extrinsic index in which the call to `anonymous` was processed.
* - `spawner`: The account that originally called `pure` to create this account.
* - `index`: The disambiguation index originally passed to `pure`. Probably `0`.
* - `proxy_type`: The proxy type originally passed to `pure`.
* - `height`: The height of the chain when the call to `pure` 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
* account whose `anonymous` call has corresponding parameters.
*
* # <weight>
* Weight is a function of the number of proxies the user has (P).
* # </weight>
* Fails with `NoPermission` in case the caller is not a previously created pure
* account whose `pure` call has corresponding parameters.
**/
killAnonymous: AugmentedSubmittable<(spawner: AccountId32 | string | Uint8Array, proxyType: NodeRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | number | Uint8Array, index: u16 | AnyNumber | Uint8Array, height: Compact<u32> | AnyNumber | Uint8Array, extIndex: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, NodeRuntimeProxyType, 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
* `add_proxy`.
@@ -3026,12 +3036,8 @@ declare module '@polkadot/api-base/types/submittable' {
* - `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.
* - `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: AccountId32 | string | Uint8Array, forceProxyType: Option<NodeRuntimeProxyType> | null | Uint8Array | NodeRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, Option<NodeRuntimeProxyType>, 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]>;
/**
* Dispatch the given `call` from an account that the sender is authorized for through
* `add_proxy`.
@@ -3044,14 +3050,8 @@ declare module '@polkadot/api-base/types/submittable' {
* - `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.
* - `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: AccountId32 | string | Uint8Array, real: AccountId32 | string | Uint8Array, forceProxyType: Option<NodeRuntimeProxyType> | null | Uint8Array | NodeRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | number, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32, Option<NodeRuntimeProxyType>, 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]>;
/**
* Remove the given announcement of a delegate.
*
@@ -3063,14 +3063,8 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `delegate`: The account that previously announced the call.
* - `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: AccountId32 | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, 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]>;
/**
* Remove a given announcement.
*
@@ -3082,25 +3076,15 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `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.
*
* # <weight>
* Weight is a function of:
* - A: the number of announcements made.
* - P: the number of proxies the user has.
* # </weight>
**/
removeAnnouncement: AugmentedSubmittable<(real: AccountId32 | string | Uint8Array, callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, 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]>;
/**
* Unregister all proxy accounts for the sender.
*
* 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.**
*
* # <weight>
* Weight is a function of the number of proxies the user has (P).
* # </weight>
**/
removeProxies: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
@@ -3111,12 +3095,8 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `proxy`: The account that the `caller` would like to remove as a proxy.
* - `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: AccountId32 | string | Uint8Array, proxyType: NodeRuntimeProxyType | 'Any' | 'NonTransfer' | 'Governance' | 'Staking' | number | Uint8Array, delay: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, NodeRuntimeProxyType, 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]>;
/**
* Generic tx
**/
@@ -3132,7 +3112,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(1)`
**/
addMember: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
addMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Remove votes from the given poll. It must have ended.
*
@@ -3155,7 +3135,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(1)`, less if the member's index is highest in its rank.
**/
demoteMember: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
demoteMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Increment the rank of an existing member by one.
*
@@ -3164,7 +3144,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(1)`
**/
promoteMember: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
promoteMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Remove the member entirely.
*
@@ -3174,7 +3154,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(min_rank)`.
**/
removeMember: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array, minRank: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u16]>;
removeMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, minRank: u16 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u16]>;
/**
* Add an aye or nay vote for the sender to the given proposal.
*
@@ -3264,7 +3244,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Emits `Submitted`.
**/
submit: AugmentedSubmittable<(proposalOrigin: NodeRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { AllianceMotion: any } | string | Uint8Array, proposalHash: H256 | string | Uint8Array, enactmentMoment: FrameSupportScheduleDispatchTime | { At: any } | { After: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [NodeRuntimeOriginCaller, H256, FrameSupportScheduleDispatchTime]>;
submit: AugmentedSubmittable<(proposalOrigin: KitchensinkRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { AllianceMotion: any } | string | Uint8Array, proposalHash: H256 | string | Uint8Array, enactmentMoment: FrameSupportScheduleDispatchTime | { At: any } | { After: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [KitchensinkRuntimeOriginCaller, H256, FrameSupportScheduleDispatchTime]>;
/**
* Generic tx
**/
@@ -3281,7 +3261,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - `account`: The recovered account you want to make a call on-behalf-of.
* - `call`: The call you want to make with the recovered account.
**/
asRecovered: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, Call]>;
asRecovered: AugmentedSubmittable<(account: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, Call]>;
/**
* Cancel the ability to use `as_recovered` for `account`.
*
@@ -3291,7 +3271,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `account`: The recovered account you are able to call on-behalf-of.
**/
cancelRecovered: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
cancelRecovered: AugmentedSubmittable<(account: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Allow a successful rescuer to claim their recovered account.
*
@@ -3303,7 +3283,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - `account`: The lost account that you want to claim has been successfully recovered by
* you.
**/
claimRecovery: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
claimRecovery: AugmentedSubmittable<(account: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* As the controller of a recoverable account, close an active recovery
* process for your account.
@@ -3317,7 +3297,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Parameters:
* - `rescuer`: The account trying to rescue this recoverable account.
**/
closeRecovery: AugmentedSubmittable<(rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
closeRecovery: AugmentedSubmittable<(rescuer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Create a recovery configuration for your account. This makes your account recoverable.
*
@@ -3350,7 +3330,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - `account`: The lost account that you want to recover. This account needs to be
* recoverable (i.e. have a recovery configuration).
**/
initiateRecovery: AugmentedSubmittable<(account: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
initiateRecovery: AugmentedSubmittable<(account: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Remove the recovery process for your account. Recovered accounts are still accessible.
*
@@ -3375,7 +3355,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - `lost`: The "lost account" to be recovered.
* - `rescuer`: The "rescuer account" which can call as the lost account.
**/
setRecovered: AugmentedSubmittable<(lost: AccountId32 | string | Uint8Array, rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32]>;
setRecovered: AugmentedSubmittable<(lost: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, rescuer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress]>;
/**
* Allow a "friend" of a recoverable account to vouch for an active recovery
* process for that account.
@@ -3390,7 +3370,7 @@ declare module '@polkadot/api-base/types/submittable' {
* The combination of these two parameters must point to an active recovery
* process.
**/
vouchRecovery: AugmentedSubmittable<(lost: AccountId32 | string | Uint8Array, rescuer: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32]>;
vouchRecovery: AugmentedSubmittable<(lost: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, rescuer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress]>;
/**
* Generic tx
**/
@@ -3466,7 +3446,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Emits `Submitted`.
**/
submit: AugmentedSubmittable<(proposalOrigin: NodeRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { AllianceMotion: any } | string | Uint8Array, proposalHash: H256 | string | Uint8Array, enactmentMoment: FrameSupportScheduleDispatchTime | { At: any } | { After: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [NodeRuntimeOriginCaller, H256, FrameSupportScheduleDispatchTime]>;
submit: AugmentedSubmittable<(proposalOrigin: KitchensinkRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { AllianceMotion: any } | string | Uint8Array, proposalHash: H256 | string | Uint8Array, enactmentMoment: FrameSupportScheduleDispatchTime | { At: any } | { After: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [KitchensinkRuntimeOriginCaller, H256, FrameSupportScheduleDispatchTime]>;
/**
* Generic tx
**/
@@ -3556,7 +3536,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - DbWrites per key id: `KeyOwner`
* # </weight>
**/
setKeys: AugmentedSubmittable<(keys: NodeRuntimeSessionKeys | { grandpa?: any; babe?: any; imOnline?: any; authorityDiscovery?: any } | string | Uint8Array, proof: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [NodeRuntimeSessionKeys, Bytes]>;
setKeys: AugmentedSubmittable<(keys: KitchensinkRuntimeSessionKeys | { grandpa?: any; babe?: any; imOnline?: any; authorityDiscovery?: any } | string | Uint8Array, proof: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [KitchensinkRuntimeSessionKeys, Bytes]>;
/**
* Generic tx
**/
@@ -3640,7 +3620,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Total Complexity: O(1)
* # </weight>
**/
found: AugmentedSubmittable<(founder: AccountId32 | string | Uint8Array, maxMembers: u32 | AnyNumber | Uint8Array, rules: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32, Bytes]>;
found: AugmentedSubmittable<(founder: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, maxMembers: u32 | AnyNumber | Uint8Array, rules: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u32, Bytes]>;
/**
* Allow suspended judgement origin to make judgement on a suspended candidate.
*
@@ -3683,7 +3663,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Total Complexity: O(M + logM + B + X)
* # </weight>
**/
judgeSuspendedCandidate: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array, judgement: PalletSocietyJudgement | 'Rebid' | 'Reject' | 'Approve' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, PalletSocietyJudgement]>;
judgeSuspendedCandidate: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, judgement: PalletSocietyJudgement | 'Rebid' | 'Reject' | 'Approve' | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, PalletSocietyJudgement]>;
/**
* Allow suspension judgement origin to make judgement on a suspended member.
*
@@ -3714,7 +3694,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Total Complexity: O(M + logM + B)
* # </weight>
**/
judgeSuspendedMember: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array, forgive: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, bool]>;
judgeSuspendedMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, forgive: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, bool]>;
/**
* Transfer the first matured payout for the sender and remove it from the records.
*
@@ -3883,7 +3863,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Total Complexity: O(M + B + C + logM + logB + X)
* # </weight>
**/
vouch: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array, value: u128 | AnyNumber | Uint8Array, tip: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u128, u128]>;
vouch: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: u128 | AnyNumber | Uint8Array, tip: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u128, u128]>;
/**
* Generic tx
**/
@@ -4158,31 +4138,6 @@ declare module '@polkadot/api-base/types/submittable' {
* # </weight>
**/
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).
*
@@ -4222,7 +4177,7 @@ declare module '@polkadot/api-base/types/submittable' {
* * `min_commission`: The minimum amount of commission that each validators must maintain.
* 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.
* to kick people under the new limits, `chill_other` should be called.
@@ -4413,7 +4368,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - The weight of this call is defined by the caller.
* # </weight>
**/
sudoUncheckedWeight: AugmentedSubmittable<(call: Call | IMethod | string | Uint8Array, weight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, u64]>;
sudoUncheckedWeight: AugmentedSubmittable<(call: Call | IMethod | string | Uint8Array, weight: Weight | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call, Weight]>;
/**
* Generic tx
**/
@@ -4522,7 +4477,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - up to 3 events
* # </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
* state.
@@ -4648,7 +4603,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* May only be called from `T::AddOrigin`.
**/
addMember: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
addMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Swap out the sending member for some other key `new`.
*
@@ -4656,7 +4611,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Prime membership is passed from the origin account to `new`, if extant.
**/
changeKey: AugmentedSubmittable<(updated: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
changeKey: AugmentedSubmittable<(updated: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Remove the prime member if it exists.
*
@@ -4668,7 +4623,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* May only be called from `T::RemoveOrigin`.
**/
removeMember: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
removeMember: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Change the membership to a new set, disregarding the existing membership. Be nice and
* pass `members` pre-sorted.
@@ -4681,7 +4636,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* May only be called from `T::PrimeOrigin`.
**/
setPrime: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
setPrime: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress]>;
/**
* Swap out one member `remove` for another `add`.
*
@@ -4689,7 +4644,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Prime membership is *not* passed from `remove` to `add`, if extant.
**/
swapMember: AugmentedSubmittable<(remove: AccountId32 | string | Uint8Array, add: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, AccountId32]>;
swapMember: AugmentedSubmittable<(remove: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, add: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress]>;
/**
* Generic tx
**/
@@ -4761,7 +4716,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - DbWrites: `Reasons`, `Tips`
* # </weight>
**/
reportAwesome: AugmentedSubmittable<(reason: Bytes | string | Uint8Array, who: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, AccountId32]>;
reportAwesome: AugmentedSubmittable<(reason: Bytes | string | Uint8Array, who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, MultiAddress]>;
/**
* Retract a prior tip-report from `report_awesome`, and cancel the process of tipping.
*
@@ -4850,7 +4805,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - DbWrites: `Reasons`, `Tips`
* # </weight>
**/
tipNew: AugmentedSubmittable<(reason: Bytes | string | Uint8Array, who: AccountId32 | string | Uint8Array, tipValue: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, AccountId32, Compact<u128>]>;
tipNew: AugmentedSubmittable<(reason: Bytes | string | Uint8Array, who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, tipValue: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, MultiAddress, Compact<u128>]>;
/**
* Generic tx
**/
@@ -4968,12 +4923,15 @@ declare module '@polkadot/api-base/types/submittable' {
/**
* 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.
* - `item`: The item of the item to be approved for delegated transfer.
* - `delegate`: The account to delegate permission to transfer the item.
*
* Important NOTE: The `approved` account gets reset after each transfer.
*
* Emits `ApprovedTransfer` on success.
*
* Weight: `O(1)`
@@ -5352,6 +5310,8 @@ declare module '@polkadot/api-base/types/submittable' {
/**
* 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:
* - the Admin of the `collection`;
* - the Owner of the `item`;
@@ -5454,7 +5414,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - Weight of derivative `call` execution + T::WeightInfo::dispatch_as().
* # </weight>
**/
dispatchAs: AugmentedSubmittable<(asOrigin: NodeRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { AllianceMotion: any } | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [NodeRuntimeOriginCaller, Call]>;
dispatchAs: AugmentedSubmittable<(asOrigin: KitchensinkRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | { AllianceMotion: any } | string | Uint8Array, call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [KitchensinkRuntimeOriginCaller, Call]>;
/**
* Send a batch of dispatch calls.
* Unlike `batch`, it allows errors and won't interrupt.
@@ -5582,8 +5542,38 @@ declare module '@polkadot/api-base/types/submittable' {
**/
[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: {
dispatchWhitelistedCall: AugmentedSubmittable<(callHash: H256 | string | Uint8Array, callWeightWitness: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, u64]>;
dispatchWhitelistedCall: AugmentedSubmittable<(callHash: H256 | string | Uint8Array, callWeightWitness: Weight | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, Weight]>;
dispatchWhitelistedCallWithPreimage: AugmentedSubmittable<(call: Call | IMethod | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call]>;
removeWhitelistedCall: AugmentedSubmittable<(callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
whitelistCall: AugmentedSubmittable<(callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
+5 -5
View File
@@ -20,13 +20,13 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.14.1",
"version": "9.4.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.18.9",
"@polkadot/rpc-core": "8.14.1",
"@polkadot/types": "8.14.1",
"@polkadot/util": "^10.1.1",
"@babel/runtime": "^7.19.0",
"@polkadot/rpc-core": "9.4.2",
"@polkadot/types": "9.4.2",
"@polkadot/util": "^10.1.9",
"rxjs": "^7.5.6"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '8.14.1' };
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '9.4.2' };
+5 -2
View File
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { DecoratedRpc, QueryableConsts, QueryableStorage, QueryableStorageMulti, SubmittableExtrinsics } from '@polkadot/api-base/types';
import type { DecoratedRpc, QueryableCalls, QueryableConsts, QueryableStorage, QueryableStorageMulti, SubmittableExtrinsics } from '@polkadot/api-base/types';
import type { RpcInterface } from '@polkadot/rpc-core/types';
import type { Metadata } from '@polkadot/types';
import type { Hash, RuntimeVersion } from '@polkadot/types/interfaces';
@@ -10,6 +10,7 @@ import type { Registry, Signer } from '@polkadot/types/types';
// A smaller interface of ApiRx, used in derive and in SubmittableExtrinsic
export interface ApiInterfaceRx {
call: QueryableCalls<'rxjs'>;
consts: QueryableConsts<'rxjs'>;
extrinsicType: number;
genesisHash?: Hash;
@@ -18,9 +19,11 @@ export interface ApiInterfaceRx {
runtimeMetadata: Metadata;
runtimeVersion: RuntimeVersion;
query: QueryableStorage<'rxjs'>;
queryAt: (blockHash: Uint8Array | string, knownVersion?: RuntimeVersion) => Observable<QueryableStorage<'rxjs'>>;
queryMulti: QueryableStorageMulti<'rxjs'>;
rpc: DecoratedRpc<'rxjs', RpcInterface>;
tx: SubmittableExtrinsics<'rxjs'>;
signer?: Signer;
callAt: (blockHash: Uint8Array | string, knownVersion?: RuntimeVersion) => Observable<QueryableCalls<'rxjs'>>;
queryAt: (blockHash: Uint8Array | string, knownVersion?: RuntimeVersion) => Observable<QueryableStorage<'rxjs'>>;
}
-4
View File
@@ -58,10 +58,6 @@ export interface StorageEntryBase<ApiType extends ApiTypes, F extends AnyFunctio
* @deprecated Use api.at(<blockHash>)
*/
keysAt: <K extends AnyTuple = A> (hash: Hash | Uint8Array | string, ...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
/**
* @deprecated The underlying RPC this been marked unsafe and is generally not exposed
*/
range: <T extends Codec | any = ReturnCodec<F>>([from, to]: [Hash | Uint8Array | string, Hash | Uint8Array | string | undefined] | [Hash | Uint8Array | string], ...args: Parameters<F>) => PromiseOrObs<ApiType, [Hash, T][]>;
/**
* @deprecated Use api.at(<blockHash>)
*/
@@ -58,11 +58,6 @@ export interface SubmittableExtrinsic<ApiType extends ApiTypes, R extends ISubmi
send (statusCb: Callback<R>): SubmittableResultSubscription<ApiType, R>;
/**
* @deprecated
*/
sign (account: IKeyringPair, _options?: Partial<SignerOptions>): this;
signAsync (account: AddressOrPair, _options?: Partial<SignerOptions>): PromiseOrObs<ApiType, this>;
signAndSend (account: AddressOrPair, options?: Partial<SignerOptions>): SubmittableResultResult<ApiType, R>;
+10 -10
View File
@@ -20,20 +20,20 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.14.1",
"version": "9.4.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.18.9",
"@polkadot/api": "8.14.1",
"@polkadot/types": "8.14.1",
"@polkadot/types-codec": "8.14.1",
"@polkadot/types-create": "8.14.1",
"@polkadot/util": "^10.1.1",
"@polkadot/util-crypto": "^10.1.1",
"@babel/runtime": "^7.19.0",
"@polkadot/api": "9.4.2",
"@polkadot/types": "9.4.2",
"@polkadot/types-codec": "9.4.2",
"@polkadot/types-create": "9.4.2",
"@polkadot/util": "^10.1.9",
"@polkadot/util-crypto": "^10.1.9",
"rxjs": "^7.5.6"
},
"devDependencies": {
"@polkadot/api-augment": "8.14.1",
"@polkadot/keyring": "^10.1.1"
"@polkadot/api-augment": "9.4.2",
"@polkadot/keyring": "^10.1.9"
}
}
+4 -1
View File
@@ -35,6 +35,9 @@ interface JSONAbi {
},
V3: {
spec: SpecDef;
},
V4: {
spec: SpecDef;
}
}
@@ -59,7 +62,7 @@ describe('Abi', (): void => {
it(`initializes from a contract ABI (${abiName})`, (): void => {
try {
const messageIds = (abi.V3 || abi.V2 || abi.V1 || abi).spec.messages.map(({ label, name }) =>
const messageIds = (abi.V4 || abi.V3 || abi.V2 || abi.V1 || abi).spec.messages.map(({ label, name }) =>
label || (
Array.isArray(name)
? name.join('::')
+14 -3
View File
@@ -27,12 +27,23 @@ function findMessage <T extends AbiMessage> (list: T[], messageOrId: T | string
}
function getLatestMeta (registry: Registry, json: Record<string, unknown>): ContractMetadataLatest {
// this is for V1, V2, V3
const vx = enumVersions.find((v) => isObject(json[v]));
const metadata = registry.createType('ContractMetadata',
// this was added in V4
const jsonVersion = json.version as string;
if (!vx && jsonVersion && !enumVersions.find((v) => v === `V${jsonVersion}`)) {
throw new Error(`Unable to handle version ${jsonVersion}`);
}
const metadata = registry.createType<ContractMetadata>('ContractMetadata',
vx
? { [vx]: json[vx] }
: { V0: json }
) as unknown as ContractMetadata;
: jsonVersion
? { [`V${jsonVersion}`]: json }
: { V0: json }
);
const converter = convertVersions.find(([v]) => metadata[`is${v}`]);
if (!converter) {
+16 -1
View File
@@ -1,10 +1,10 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { v0ToLatest, v1ToLatest, v2ToLatest, v3ToLatest } from '@polkadot/api-contract/Abi/toLatest';
import { TypeRegistry } from '@polkadot/types';
import abis from '../test/contracts';
import { v0ToLatest, v1ToLatest, v2ToLatest, v3ToLatest, v4ToLatest } from './toLatest';
describe('v0ToLatest', (): void => {
const registry = new TypeRegistry();
@@ -120,3 +120,18 @@ describe('v3ToLatest', (): void => {
]);
});
});
describe('v4ToLatest', (): void => {
const registry = new TypeRegistry();
const contract = registry.createType('ContractMetadata', { V4: abis.ink_v4_flipperContract });
const latest = v4ToLatest(registry, contract.asV4);
it('has the correct constructor flags', (): void => {
expect(
latest.spec.constructors[0].payable.isTrue
).toEqual(false);
expect(
latest.spec.constructors[1].payable.isTrue
).toEqual(false);
});
});
+7 -4
View File
@@ -1,16 +1,17 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ContractMetadataLatest, ContractMetadataV3 } from '@polkadot/types/interfaces';
import type { ContractMetadataLatest, ContractMetadataV4 } from '@polkadot/types/interfaces';
import type { Registry } from '@polkadot/types/types';
import { v0ToV1 } from './toV1';
import { v1ToV2 } from './toV2';
import { v2ToV3 } from './toV3';
import { v3ToV4 } from './toV4';
// The versions where an enum is used, aka V0 is missing
// (Order from newest, i.e. we expect more on newest vs oldest)
export const enumVersions = <const> ['V3', 'V2', 'V1'];
export const enumVersions = <const> ['V4', 'V3', 'V2', 'V1'];
type Versions = typeof enumVersions[number] | 'V0';
@@ -22,15 +23,17 @@ function createConverter <I, O> (next: (registry: Registry, input: O) => Contrac
next(registry, step(registry, input));
}
export function v3ToLatest (registry: Registry, v3: ContractMetadataV3): ContractMetadataLatest {
return v3;
export function v4ToLatest (registry: Registry, v4: ContractMetadataV4): ContractMetadataLatest {
return v4;
}
export const v3ToLatest = createConverter(v4ToLatest, v3ToV4);
export const v2ToLatest = createConverter(v3ToLatest, v2ToV3);
export const v1ToLatest = createConverter(v2ToLatest, v1ToV2);
export const v0ToLatest = createConverter(v1ToLatest, v0ToV1);
export const convertVersions: [Versions, Converter][] = [
['V4', v4ToLatest],
['V3', v3ToLatest],
['V2', v2ToLatest],
['V1', v1ToLatest],
+4
View File
@@ -21,6 +21,10 @@ function v0ToV1Names (all: Named[]): unknown[] {
}
export function v0ToV1 (registry: Registry, v0: ContractMetadataV0): ContractMetadataV1 {
if (!v0.metadataVersion.length) {
throw new Error('Invalid format for V0 (detected) contract metadata');
}
return registry.createType('ContractMetadataV1', objectSpread({}, v0, {
spec: objectSpread({}, v0.spec, {
constructors: v0ToV1Names(v0.spec.constructors),
+9
View File
@@ -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;
}
+4 -4
View File
@@ -26,10 +26,10 @@ export abstract class Base<ApiType extends ApiTypes> {
if (!api || !api.isConnected || !api.tx) {
throw new Error('Your API has not been initialized correctly and is not connected to a chain');
} else if (!api.tx.contracts || !Object.keys(api.tx.contracts).length) {
throw new Error('You need to connect to a chain with a runtime that supports contracts');
} else if (!isFunction(api.tx.contracts.instantiateWithCode)) {
throw new Error('You need to connect to a chain with a runtime with a V3 contracts module. The runtime does not expose api.tx.contracts.instantiateWithCode');
} else if (!api.tx.contracts || !isFunction(api.tx.contracts.instantiateWithCode) || api.tx.contracts.instantiateWithCode.meta.args.length !== 6) {
throw new Error('The runtime does not expose api.tx.contracts.instantiateWithCode with storageDepositLimit');
} 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');
}
}
+7 -11
View File
@@ -57,20 +57,16 @@ export class Blueprint<ApiType extends ApiTypes> extends Base<ApiType> {
}
#deploy = (constructorOrId: AbiConstructor | string | number, { gasLimit = BN_ZERO, salt, storageDepositLimit = null, value = BN_ZERO }: BlueprintOptions, params: unknown[]): SubmittableExtrinsic<ApiType, BlueprintSubmittableResult<ApiType>> => {
const hasStorageDeposit = this.api.tx.contracts.instantiate.meta.args.length === 6;
const encParams = this.abi.findConstructor(constructorOrId).toU8a(params);
const encSalt = encodeSalt(salt);
const tx = hasStorageDeposit
? this.api.tx.contracts.instantiate(value, gasLimit, storageDepositLimit, this.codeHash, encParams, encSalt)
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore old style without storage deposit
: this.api.tx.contracts.instantiate(value, gasLimit, this.codeHash, encParams, encSalt);
return tx.withResultTransform((result: ISubmittableResult) =>
new BlueprintSubmittableResult(result, applyOnEvent(result, ['Instantiated'], ([record]: EventRecord[]) =>
new Contract<ApiType>(this.api, this.abi, record.event.data[1] as AccountId, this._decorateMethod)
))
);
return this.api.tx.contracts
.instantiate(value, gasLimit, storageDepositLimit, this.codeHash, encParams, encSalt)
.withResultTransform((result: ISubmittableResult) =>
new BlueprintSubmittableResult(result, applyOnEvent(result, ['Instantiated'], ([record]: EventRecord[]) =>
new Contract<ApiType>(this.api, this.abi, record.event.data[1] as AccountId, this._decorateMethod)
))
);
};
}
+13 -17
View File
@@ -64,27 +64,23 @@ export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
}
#instantiate = (constructorOrId: AbiConstructor | string | number, { gasLimit = BN_ZERO, salt, storageDepositLimit = null, value = BN_ZERO }: BlueprintOptions, params: unknown[]): SubmittableExtrinsic<ApiType, CodeSubmittableResult<ApiType>> => {
const hasStorageDeposit = this.api.tx.contracts.instantiateWithCode.meta.args.length === 6;
const encCode = compactAddLength(this.code);
const encParams = this.abi.findConstructor(constructorOrId).toU8a(params);
const encSalt = encodeSalt(salt);
const tx = hasStorageDeposit
? this.api.tx.contracts.instantiateWithCode(value, gasLimit, storageDepositLimit, encCode, encParams, encSalt)
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore old style without storage deposit
: this.api.tx.contracts.instantiateWithCode(value, gasLimit, encCode, encParams, encSalt);
return tx.withResultTransform((result: ISubmittableResult) =>
new CodeSubmittableResult(result, ...(applyOnEvent(result, ['CodeStored', 'Instantiated'], (records: EventRecord[]) =>
records.reduce<[Blueprint<ApiType>?, Contract<ApiType>?]>(([blueprint, contract], { event }) =>
this.api.events.contracts.Instantiated.is(event)
? [blueprint, new Contract<ApiType>(this.api, this.abi, (event as unknown as { data: [Codec, AccountId] }).data[1], this._decorateMethod)]
: this.api.events.contracts.CodeStored.is(event)
? [new Blueprint<ApiType>(this.api, this.abi, (event as unknown as { data: [AccountId] }).data[0], this._decorateMethod), contract]
: [blueprint, contract],
[])
) || []))
);
return this.api.tx.contracts
.instantiateWithCode(value, gasLimit, storageDepositLimit, encCode, encParams, encSalt)
.withResultTransform((result: ISubmittableResult) =>
new CodeSubmittableResult(result, ...(applyOnEvent(result, ['CodeStored', 'Instantiated'], (records: EventRecord[]) =>
records.reduce<[Blueprint<ApiType>?, Contract<ApiType>?]>(([blueprint, contract], { event }) =>
this.api.events.contracts.Instantiated.is(event)
? [blueprint, new Contract<ApiType>(this.api, this.abi, (event as unknown as { data: [Codec, AccountId] }).data[1], this._decorateMethod)]
: this.api.events.contracts.CodeStored.is(event)
? [new Blueprint<ApiType>(this.api, this.abi, (event as unknown as { data: [AccountId] }).data[0], this._decorateMethod), contract]
: [blueprint, contract],
[])
) || []))
);
};
}
+41 -66
View File
@@ -13,10 +13,10 @@ import { map } from 'rxjs';
import { SubmittableResult } from '@polkadot/api';
import { ApiBase } from '@polkadot/api/base';
import { BN, BN_HUNDRED, BN_ONE, BN_ZERO, bnToBn, isFunction, isUndefined, logger } from '@polkadot/util';
import { BN, BN_HUNDRED, BN_ONE, BN_ZERO, bnToBn, isUndefined, logger } from '@polkadot/util';
import { Abi } from '../Abi';
import { applyOnEvent, extractOptions, isOptions } from '../util';
import { applyOnEvent } from '../util';
import { Base } from './Base';
import { withMeta } from './util';
@@ -26,23 +26,18 @@ export interface ContractConstructor<ApiType extends ApiTypes> {
// As per Rust, 5 * GAS_PER_SEC
const MAX_CALL_GAS = new BN(5_000_000_000_000).isub(BN_ONE);
const ERROR_NO_CALL = 'Your node does not expose the contracts.call RPC. This is most probably due to a runtime configuration.';
const l = logger('Contract');
function createQuery <ApiType extends ApiTypes> (meta: AbiMessage, fn: (origin: string | AccountId | Uint8Array, options: ContractOptions, params: unknown[]) => ContractCallResult<ApiType, ContractCallOutcome>): ContractQuery<ApiType> {
return withMeta(meta, (origin: string | AccountId | Uint8Array, options: bigint | string | number | BN | ContractOptions, ...params: unknown[]): ContractCallResult<ApiType, ContractCallOutcome> =>
isOptions(options)
? fn(origin, options, params)
: fn(origin, ...extractOptions<ContractOptions>(options, params))
return withMeta(meta, (origin: string | AccountId | Uint8Array, options: ContractOptions, ...params: unknown[]): ContractCallResult<ApiType, ContractCallOutcome> =>
fn(origin, options, params)
);
}
function createTx <ApiType extends ApiTypes> (meta: AbiMessage, fn: (options: ContractOptions, params: unknown[]) => SubmittableExtrinsic<ApiType>): ContractTx<ApiType> {
return withMeta(meta, (options: bigint | string | number | BN | ContractOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType> =>
isOptions(options)
? fn(options, params)
: fn(...extractOptions<ContractOptions>(options, params))
return withMeta(meta, (options: ContractOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType> =>
fn(options, params)
);
}
@@ -82,15 +77,7 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
});
}
public get hasRpcContractsCall (): boolean {
return isFunction(this.api.rx.rpc.contracts?.call);
}
public get query (): MapMessageQuery<ApiType> {
if (!this.hasRpcContractsCall) {
throw new Error(ERROR_NO_CALL);
}
return this.#query;
}
@@ -112,64 +99,52 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
};
#exec = (messageOrId: AbiMessage | string | number, { gasLimit = BN_ZERO, storageDepositLimit = null, value = BN_ZERO }: ContractOptions, params: unknown[]): SubmittableExtrinsic<ApiType> => {
const hasStorageDeposit = this.api.tx.contracts.call.meta.args.length === 5;
const gas = this.#getGas(gasLimit);
const encParams = this.abi.findMessage(messageOrId).toU8a(params);
const tx = hasStorageDeposit
? this.api.tx.contracts.call(this.address, value, gas, storageDepositLimit, encParams)
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore old style without storage deposit
: this.api.tx.contracts.call(this.address, value, gas, encParams);
return tx.withResultTransform((result: ISubmittableResult) =>
// ContractEmitted is the current generation, ContractExecution is the previous generation
new ContractSubmittableResult(result, applyOnEvent(result, ['ContractEmitted', 'ContractExecution'], (records: EventRecord[]) =>
records
.map(({ event: { data: [, data] } }): DecodedEvent | null => {
try {
return this.abi.decodeEvent(data as Bytes);
} catch (error) {
l.error(`Unable to decode contract event: ${(error as Error).message}`);
return this.api.tx.contracts
.call(this.address, value, gas, storageDepositLimit, encParams)
.withResultTransform((result: ISubmittableResult) =>
// ContractEmitted is the current generation, ContractExecution is the previous generation
new ContractSubmittableResult(result, applyOnEvent(result, ['ContractEmitted', 'ContractExecution'], (records: EventRecord[]) =>
records
.map(({ event: { data: [, data] } }): DecodedEvent | null => {
try {
return this.abi.decodeEvent(data as Bytes);
} catch (error) {
l.error(`Unable to decode contract event: ${(error as Error).message}`);
return null;
}
})
.filter((decoded): decoded is DecodedEvent => !!decoded)
))
);
return null;
}
})
.filter((decoded): decoded is DecodedEvent => !!decoded)
))
);
};
#read = (messageOrId: AbiMessage | string | number, { gasLimit = BN_ZERO, storageDepositLimit = null, value = BN_ZERO }: ContractOptions, params: unknown[]): ContractCallSend<ApiType> => {
if (!this.hasRpcContractsCall) {
throw new Error(ERROR_NO_CALL);
}
const message = this.abi.findMessage(messageOrId);
return {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
send: this._decorateMethod((origin: string | AccountId | Uint8Array) => {
const hasStorageDeposit = this.api.tx.contracts.call.meta.args.length === 5;
const inputData = message.toU8a(params);
const rpc = hasStorageDeposit
? this.api.rx.rpc.contracts.call({ dest: this.address, gasLimit: this.#getGas(gasLimit, true), inputData, origin, storageDepositLimit, value })
: this.api.rx.rpc.contracts.call({ dest: this.address, gasLimit: this.#getGas(gasLimit, true), inputData, origin, value });
const mapFn = ({ debugMessage, gasConsumed, gasRequired, result, storageDeposit }: ContractExecResult): ContractCallOutcome => ({
debugMessage,
gasConsumed,
gasRequired: gasRequired && !gasRequired.isZero()
? gasRequired
: gasConsumed,
output: result.isOk && message.returnType
? this.abi.registry.createTypeUnsafe(message.returnType.lookupName || message.returnType.type, [result.asOk.data.toU8a(true)], { isPedantic: true })
: null,
result,
storageDeposit
});
return rpc.pipe(map(mapFn));
})
send: this._decorateMethod((origin: string | AccountId | Uint8Array) =>
this.api.rx.call.contractsApi
.call<ContractExecResult>(origin, this.address, value, this.#getGas(gasLimit, true), storageDepositLimit, message.toU8a(params))
.pipe(
map(({ debugMessage, gasConsumed, gasRequired, result, storageDeposit }): ContractCallOutcome => ({
debugMessage,
gasConsumed,
gasRequired: gasRequired && !gasRequired.isZero()
? gasRequired
: gasConsumed,
output: result.isOk && message.returnType
? this.abi.registry.createTypeUnsafe(message.returnType.lookupName || message.returnType.type, [result.asOk.data.toU8a(true)], { isPedantic: true })
: null,
result,
storageDeposit
}))
)
)
};
};
}
+14 -3
View File
@@ -6,14 +6,25 @@ import { TypeRegistry } from '@polkadot/types';
const registry = new TypeRegistry();
const instantiateWithCode = (): never => {
throw new Error('mock');
};
instantiateWithCode.meta = { args: new Array(6) };
export const mockApi = {
call: {
contractsApi: {
call: (): never => {
throw new Error('mock');
}
}
},
isConnected: true,
registry,
tx: {
contracts: {
instantiateWithCode: (): never => {
throw new Error('mock');
}
instantiateWithCode
}
}
} as unknown as ApiBase<'promise'>;
-9
View File
@@ -5,7 +5,6 @@ import type { Observable } from 'rxjs';
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
import type { ApiTypes, ObsInnerType } from '@polkadot/api/types';
import type { AccountId } from '@polkadot/types/interfaces';
import type { BN } from '@polkadot/util';
import type { AbiMessage, BlueprintOptions, ContractCallOutcome, ContractOptions } from '../types';
export interface MessageMeta {
@@ -14,26 +13,18 @@ export interface MessageMeta {
export interface BlueprintDeploy<ApiType extends ApiTypes> extends MessageMeta {
(options: BlueprintOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
// @deprecated Use options form (to be dropped in a major update)
(value: bigint | string | number | BN, gasLimit: bigint | string | number | BN, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
}
export interface ContractQuery<ApiType extends ApiTypes> extends MessageMeta {
(origin: AccountId | string | Uint8Array, options: ContractOptions, ...params: unknown[]): ContractCallResult<ApiType, ContractCallOutcome>;
// @deprecated Use options form (to be dropped in a major update)
(origin: AccountId | string | Uint8Array, value: bigint | BN | string | number, gasLimit: bigint | BN | string | number, ...params: unknown[]): ContractCallResult<ApiType, ContractCallOutcome>;
}
export interface ContractTx<ApiType extends ApiTypes> extends MessageMeta {
(options: ContractOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
// @deprecated Use options form (to be dropped in a major update)
(value: bigint | BN | string | number, gasLimit: bigint | BN | string | number, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
}
export interface ContractGeneric<O, T> {
(messageOrId: AbiMessage | string | number, options: O, ...params: unknown[]): T;
// @deprecated Use options form (to be dropped in a major update)
(messageOrId: AbiMessage | string | number, value: bigint | BN | string | number, gasLimit: bigint | BN | string | number, ...params: unknown[]): T;
}
export type ContractCallResult<ApiType extends ApiTypes, T> = ApiType extends 'rxjs'
+4 -11
View File
@@ -4,7 +4,6 @@
import type { SubmittableResult } from '@polkadot/api';
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
import type { ApiTypes } from '@polkadot/api/types';
import type { BN } from '@polkadot/util';
import type { AbiConstructor, AbiMessage, BlueprintOptions } from '../types';
import type { BlueprintDeploy, ContractGeneric } from './types';
@@ -12,8 +11,6 @@ import { Bytes } from '@polkadot/types';
import { compactAddLength, u8aToU8a } from '@polkadot/util';
import { randomAsU8a } from '@polkadot/util-crypto';
import { extractOptions, isOptions } from '../util';
export const EMPTY_SALT = new Uint8Array();
export function withMeta <T extends { meta: AbiMessage }> (meta: AbiMessage, creator: Omit<T, 'meta'>): T {
@@ -23,18 +20,14 @@ export function withMeta <T extends { meta: AbiMessage }> (meta: AbiMessage, cre
}
export function createBluePrintTx <ApiType extends ApiTypes, R extends SubmittableResult> (meta: AbiMessage, fn: (options: BlueprintOptions, params: unknown[]) => SubmittableExtrinsic<ApiType, R>): BlueprintDeploy<ApiType> {
return withMeta(meta, (options: bigint | string | number | BN | BlueprintOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType, R> =>
isOptions(options)
? fn(options, params)
: fn(...extractOptions<BlueprintOptions>(options, params))
return withMeta(meta, (options: BlueprintOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType, R> =>
fn(options, params)
);
}
export function createBluePrintWithId <T> (fn: (constructorOrId: AbiConstructor | string | number, options: BlueprintOptions, params: unknown[]) => T): ContractGeneric<BlueprintOptions, T> {
return (constructorOrId: AbiConstructor | string | number, options: bigint | string | number | BN | BlueprintOptions, ...params: unknown[]): T =>
isOptions(options)
? fn(constructorOrId, options, params)
: fn(constructorOrId, ...extractOptions<BlueprintOptions>(options, params));
return (constructorOrId: AbiConstructor | string | number, options: BlueprintOptions, ...params: unknown[]): T =>
fn(constructorOrId, options, params);
}
export function encodeSalt (salt: Uint8Array | string | null = randomAsU8a()): Uint8Array {
@@ -14,12 +14,8 @@ import abiIncrementer from './test/contracts/ink/v0/incrementer.json' assert { t
async function checkBlueprint (api: ApiPromise, pairs: TestKeyringMap): Promise<void> {
const blueprint = new BlueprintPromise(api, abiIncrementer as Record<string, unknown>, '0x1234');
// new style
await blueprint.tx.new({ gasLimit: 456, salt: '0x1234', value: 123 }, 42).signAndSend(pairs.bob);
await blueprint.tx.new({ gasLimit: 456, value: 123 }, 42).signAndSend(pairs.bob);
// old style
await blueprint.tx.new(123, 456, 42).signAndSend(pairs.bob);
}
async function checkContract (api: ApiPromise, pairs: TestKeyringMap): Promise<void> {
@@ -27,11 +23,9 @@ async function checkContract (api: ApiPromise, pairs: TestKeyringMap): Promise<v
// queries
await contract.query.get(pairs.alice.address, {});
await contract.query.get(pairs.alice.address, 0, 0);
// execute
await contract.tx.inc({ gasLimit: 1234 }, 123).signAndSend(pairs.eve);
await contract.tx.inc(123, 456, 69).signAndSend(pairs.eve);
}
async function main (): Promise<void> {
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '8.14.1' };
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '9.4.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": ""
}
]
@@ -0,0 +1,71 @@
[
{
"info": "Plain",
"lookupIndex": 0,
"type": "u8",
"docs": [],
"namespace": ""
},
{
"info": "Plain",
"lookupIndex": 1,
"type": "Text",
"docs": [],
"namespace": ""
},
{
"info": "VecFixed",
"lookupIndex": 2,
"type": "[u8;32]",
"docs": [],
"namespace": "",
"length": 32,
"sub": {
"info": "Plain",
"lookupIndex": 0,
"type": "u8",
"docs": [],
"namespace": ""
}
},
{
"info": "Struct",
"lookupIndex": 3,
"type": "{\"inner\":\"[u8;32]\"}",
"docs": [],
"namespace": "",
"sub": [
{
"docs": [],
"name": "inner",
"info": "VecFixed",
"lookupIndex": 2,
"type": "[u8;32]",
"namespace": "",
"length": 32,
"sub": {
"info": "Plain",
"lookupIndex": 0,
"type": "u8",
"docs": [],
"namespace": ""
},
"typeName": "FixedArray32"
}
]
},
{
"info": "Plain",
"lookupIndex": 4,
"type": "u128",
"docs": [],
"namespace": ""
},
{
"info": "Plain",
"lookupIndex": 5,
"type": "bool",
"docs": [],
"namespace": ""
}
]
@@ -6,5 +6,6 @@ import * as v0 from './v0';
import * as v1 from './v1';
import * as v2 from './v2';
import * as v3 from './v3';
import * as v4 from './v4';
export default createVersionedExport({ v0, v1, v2, v3 });
export default createVersionedExport({ v0, v1, v2, v3, v4 });
File diff suppressed because one or more lines are too long
@@ -0,0 +1,103 @@
{
"source": {
"hash": "0xf051c631190ac47f82e280ba763df932210f6e2447978e24cbe0dcc6d6903c7a",
"language": "ink! 4.0.0-alpha.1",
"compiler": "rustc 1.63.0"
},
"contract": {
"name": "flipper",
"version": "4.0.0-alpha.1",
"authors": [
"Parity Technologies <admin@parity.io>"
]
},
"spec": {
"constructors": [
{
"args": [
{
"label": "init_value",
"type": {
"displayName": [
"bool"
],
"type": 0
}
}
],
"docs": [
"Creates a new flipper smart contract initialized with the given value."
],
"label": "new",
"payable": false,
"selector": "0x9bae9d5e"
},
{
"args": [],
"docs": [
"Creates a new flipper smart contract initialized to `false`."
],
"label": "default",
"payable": false,
"selector": "0xed4b9d1b"
}
],
"docs": [],
"events": [],
"messages": [
{
"args": [],
"docs": [
" Flips the current value of the Flipper's boolean."
],
"label": "flip",
"mutates": true,
"payable": false,
"returnType": null,
"selector": "0x633aa551"
},
{
"args": [],
"docs": [
" Returns the current value of the Flipper's boolean."
],
"label": "get",
"mutates": false,
"payable": false,
"returnType": {
"displayName": [
"bool"
],
"type": 0
},
"selector": "0x2f865bd9"
}
]
},
"storage": {
"struct": {
"fields": [
{
"layout": {
"cell": {
"key": "0x0000000000000000000000000000000000000000000000000000000000000000",
"ty": 0
}
},
"name": "value"
}
]
}
},
"types": [
{
"id": 0,
"type": {
"def": {
"primitive": "bool"
}
}
}
],
"version": "4"
}
@@ -0,0 +1,5 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
export { default as flipperContract } from './flipper.contract.json' assert { type: 'json' };
export { default as flipperMetadata } from './flipper.json' assert { type: 'json' };
@@ -3,5 +3,6 @@
import { createVersionedExport } from '../util';
import * as v0 from './v0';
import * as v3 from './v3';
export default createVersionedExport({ v0 });
export default createVersionedExport({ v0, v3 });
@@ -0,0 +1,550 @@
{
"source": {
"hash": "",
"language": "Ask! 0.4.0",
"compiler": "asc 0.19.23"
},
"contract": {
"name": "",
"version": "",
"authors": []
},
"V3": {
"spec": {
"constructors": [
{
"args": [
{
"type": {
"type": 1,
"displayName": [
"string"
]
},
"label": "name"
},
{
"type": {
"type": 1,
"displayName": [
"string"
]
},
"label": "symbol"
}
],
"docs": [],
"label": "default",
"payable": false,
"selector": "0xed4b9d1b"
}
],
"messages": [
{
"mutates": true,
"payable": true,
"args": [
{
"type": {
"type": 3,
"displayName": [
"AccountId"
]
},
"label": "to"
},
{
"type": {
"type": 4,
"displayName": [
"u128"
]
},
"label": "amount"
}
],
"docs": [],
"label": "mint",
"selector": "0xcfdd9aa2"
},
{
"mutates": true,
"payable": true,
"args": [
{
"type": {
"type": 3,
"displayName": [
"AccountId"
]
},
"label": "from"
},
{
"type": {
"type": 4,
"displayName": [
"u128"
]
},
"label": "amount"
}
],
"docs": [],
"label": "burn",
"selector": "0xb1efc17b"
},
{
"mutates": false,
"payable": false,
"args": [],
"returnType": {
"type": 1,
"displayName": [
"string"
]
},
"docs": [],
"label": "name",
"selector": "0x3adaf70d"
},
{
"mutates": false,
"payable": false,
"args": [],
"returnType": {
"type": 1,
"displayName": [
"string"
]
},
"docs": [],
"label": "symbol",
"selector": "0x9bd1933e"
},
{
"mutates": false,
"payable": false,
"args": [],
"returnType": {
"type": 0,
"displayName": [
"u8"
]
},
"docs": [],
"label": "decimal",
"selector": "0xcc3fec6d"
},
{
"mutates": false,
"payable": false,
"args": [],
"returnType": {
"type": 4,
"displayName": [
"u128"
]
},
"docs": [],
"label": "totalSupply",
"selector": "0xcae60595"
},
{
"mutates": false,
"payable": false,
"args": [
{
"type": {
"type": 3,
"displayName": [
"AccountId"
]
},
"label": "account"
}
],
"returnType": {
"type": 4,
"displayName": [
"u128"
]
},
"docs": [],
"label": "balanceOf",
"selector": "0xf48def67"
},
{
"mutates": true,
"payable": true,
"args": [
{
"type": {
"type": 3,
"displayName": [
"AccountId"
]
},
"label": "recipient"
},
{
"type": {
"type": 4,
"displayName": [
"u128"
]
},
"label": "amount"
}
],
"returnType": {
"type": 5,
"displayName": [
"bool"
]
},
"docs": [],
"label": "transfer",
"selector": "0x84a15da1"
},
{
"mutates": false,
"payable": false,
"args": [
{
"type": {
"type": 3,
"displayName": [
"AccountId"
]
},
"label": "owner"
},
{
"type": {
"type": 3,
"displayName": [
"AccountId"
]
},
"label": "spender"
}
],
"returnType": {
"type": 4,
"displayName": [
"u128"
]
},
"docs": [],
"label": "allowance",
"selector": "0x6a00165e"
},
{
"mutates": true,
"payable": true,
"args": [
{
"type": {
"type": 3,
"displayName": [
"AccountId"
]
},
"label": "spender"
},
{
"type": {
"type": 4,
"displayName": [
"u128"
]
},
"label": "amount"
}
],
"returnType": {
"type": 5,
"displayName": [
"bool"
]
},
"docs": [],
"label": "approve",
"selector": "0x681266a0"
},
{
"mutates": true,
"payable": true,
"args": [
{
"type": {
"type": 3,
"displayName": [
"AccountId"
]
},
"label": "sender"
},
{
"type": {
"type": 3,
"displayName": [
"AccountId"
]
},
"label": "recipient"
},
{
"type": {
"type": 4,
"displayName": [
"u128"
]
},
"label": "amount"
}
],
"returnType": {
"type": 5,
"displayName": [
"bool"
]
},
"docs": [],
"label": "transferFrom",
"selector": "0x02a6e0d5"
},
{
"mutates": true,
"payable": true,
"args": [
{
"type": {
"type": 3,
"displayName": [
"AccountId"
]
},
"label": "spender"
},
{
"type": {
"type": 4,
"displayName": [
"u128"
]
},
"label": "addedValue"
}
],
"returnType": {
"type": 5,
"displayName": [
"bool"
]
},
"docs": [],
"label": "increaseAllowance",
"selector": "0xcb005356"
},
{
"mutates": true,
"payable": true,
"args": [
{
"type": {
"type": 3,
"displayName": [
"AccountId"
]
},
"label": "spender"
},
{
"type": {
"type": 4,
"displayName": [
"u128"
]
},
"label": "subtractedValue"
}
],
"returnType": {
"type": 5,
"displayName": [
"bool"
]
},
"docs": [],
"label": "decreaseAllowance",
"selector": "0xe19fabb4"
}
],
"events": [
{
"id": 1,
"label": "Transfer",
"args": [
{
"label": "from",
"indexed": false,
"type": {
"type": 3,
"displayName": [
"AccountId"
]
},
"docs": [
""
]
},
{
"label": "to",
"indexed": false,
"type": {
"type": 3,
"displayName": [
"AccountId"
]
},
"docs": [
""
]
},
{
"label": "value",
"indexed": false,
"type": {
"type": 4,
"displayName": [
"u128"
]
},
"docs": [
""
]
}
],
"docs": [
""
]
},
{
"id": 2,
"label": "Approval",
"args": [
{
"label": "owner",
"indexed": false,
"type": {
"type": 3,
"displayName": [
"AccountId"
]
},
"docs": [
""
]
},
{
"label": "spender",
"indexed": false,
"type": {
"type": 3,
"displayName": [
"AccountId"
]
},
"docs": [
""
]
},
{
"label": "value",
"indexed": false,
"type": {
"type": 4,
"displayName": [
"u128"
]
},
"docs": [
""
]
}
],
"docs": [
""
]
}
],
"docs": [
""
]
},
"types": [
{
"id": 0,
"type": {
"def": {
"primitive": "u8"
}
}
},
{
"id": 1,
"type": {
"def": {
"primitive": "str"
}
}
},
{
"id": 2,
"type": {
"def": {
"array": {
"len": 32,
"type": 0
}
}
}
},
{
"id": 3,
"type": {
"def": {
"composite": {
"fields": [
{
"name": "inner",
"type": 2,
"typeName": "FixedArray32<u8>"
}
]
},
"path": []
}
}
},
{
"id": 4,
"type": {
"def": {
"primitive": "u128"
}
}
},
{
"id": 5,
"type": {
"def": {
"primitive": "bool"
}
}
}
]
}
}
@@ -0,0 +1,4 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
export { default as ask } from './ask.json' assert { type: 'json' };
-16
View File
@@ -3,15 +3,9 @@
import type { SubmittableResult } from '@polkadot/api';
import type { EventRecord } from '@polkadot/types/interfaces';
import type { BN } from '@polkadot/util';
import type { BlueprintOptions, ContractOptions } from './types';
import { isBigInt, isBn, isNumber, isString } from '@polkadot/util';
type ContractEvents = 'CodeStored' | 'ContractEmitted' | 'ContractExecution' | 'Instantiated';
type TOptions = BlueprintOptions | ContractOptions;
export function applyOnEvent <T> (result: SubmittableResult, types: ContractEvents[], fn: (records: EventRecord[]) => T): T | undefined {
if (result.isInBlock || result.isFinalized) {
const records = result.filterRecords('contracts', types);
@@ -23,13 +17,3 @@ export function applyOnEvent <T> (result: SubmittableResult, types: ContractEven
return undefined;
}
export function isOptions <T> (options: bigint | string | number | BN | T): options is T {
return !(isBn(options) || isBigInt(options) || isNumber(options) || isString(options));
}
export function extractOptions <T extends TOptions> (value: bigint | string | number | BN, params: unknown[]): [T, unknown[]] {
const gasLimit = params.shift() as BN;
return [{ gasLimit, value } as T, params];
}
+15 -15
View File
@@ -20,25 +20,25 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.14.1",
"version": "9.4.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.18.9",
"@polkadot/api": "8.14.1",
"@polkadot/api-augment": "8.14.1",
"@polkadot/api-base": "8.14.1",
"@polkadot/rpc-core": "8.14.1",
"@polkadot/types": "8.14.1",
"@polkadot/types-codec": "8.14.1",
"@polkadot/util": "^10.1.1",
"@polkadot/util-crypto": "^10.1.1",
"@babel/runtime": "^7.19.0",
"@polkadot/api": "9.4.2",
"@polkadot/api-augment": "9.4.2",
"@polkadot/api-base": "9.4.2",
"@polkadot/rpc-core": "9.4.2",
"@polkadot/types": "9.4.2",
"@polkadot/types-codec": "9.4.2",
"@polkadot/util": "^10.1.9",
"@polkadot/util-crypto": "^10.1.9",
"rxjs": "^7.5.6"
},
"devDependencies": {
"@polkadot/api": "8.14.1",
"@polkadot/api-augment": "8.14.1",
"@polkadot/rpc-augment": "8.14.1",
"@polkadot/rpc-provider": "8.14.1",
"@polkadot/types-support": "8.14.1"
"@polkadot/api": "9.4.2",
"@polkadot/api-augment": "9.4.2",
"@polkadot/rpc-augment": "9.4.2",
"@polkadot/rpc-provider": "9.4.2",
"@polkadot/types-support": "9.4.2"
}
}
+14
View File
@@ -0,0 +1,14 @@
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { hasProposals as collectiveHasProposals, members as collectiveMembers, prime as collectivePrime, proposal as collectiveProposal, proposalCount as collectiveProposalCount, proposalHashes as collectiveProposalHashes, proposals as collectiveProposals } from '../collective';
export const members = collectiveMembers('allianceMotion');
export const hasProposals = collectiveHasProposals('allianceMotion');
export const proposal = collectiveProposal('allianceMotion');
export const proposalCount = collectiveProposalCount('allianceMotion');
export const proposalHashes = collectiveProposalHashes('allianceMotion');
export const proposals = collectiveProposals('allianceMotion');
export const prime = collectivePrime('allianceMotion');
+17 -15
View File
@@ -10,9 +10,10 @@ import type { Bag } from './types';
import { map, of, switchMap } from 'rxjs';
import { BN_ZERO, bnToBn } from '@polkadot/util';
import { BN_ZERO, bnToBn, objectSpread } from '@polkadot/util';
import { memo } from '../util';
import { getQueryInterface } from './util';
function orderBags (ids: BN[], bags: Option<PalletBagsListListBag>[]): Bag[] {
const sorted = ids
@@ -21,29 +22,28 @@ function orderBags (ids: BN[], bags: Option<PalletBagsListListBag>[]): Bag[] {
id,
key: id.toString()
}))
.sort((a, b) => b.id.cmp(a.id))
.map((base, index): Bag => ({
...base,
bagLower: BN_ZERO,
bagUpper: base.id,
index
}));
.sort((a, b) => b.id.cmp(a.id));
const max = sorted.length - 1;
return sorted.map((entry, index) =>
index === max
? entry
// We could probably use a .add(BN_ONE) here
: { ...entry, bagLower: sorted[index + 1].bagUpper }
return sorted.map((entry, index): Bag =>
objectSpread(entry, {
bagLower: index === max
? BN_ZERO
: sorted[index + 1].id,
bagUpper: entry.id,
index
})
);
}
export function _getIds (instanceId: string, api: DeriveApi): (ids: (BN | number)[]) => Observable<Bag[]> {
const query = getQueryInterface(api);
return memo(instanceId, (_ids: (BN | number)[]): Observable<Bag[]> => {
const ids = _ids.map((id) => bnToBn(id));
return ids.length
? (api.query.voterList || api.query.bagsList).listBags.multi<Option<PalletBagsListListBag>>(ids).pipe(
? query.listBags.multi<Option<PalletBagsListListBag>>(ids).pipe(
map((bags) => orderBags(ids, bags))
)
: of([]);
@@ -51,8 +51,10 @@ export function _getIds (instanceId: string, api: DeriveApi): (ids: (BN | number
}
export function all (instanceId: string, api: DeriveApi): () => Observable<Bag[]> {
const query = getQueryInterface(api);
return memo(instanceId, (): Observable<Bag[]> =>
(api.query.voterList || api.query.bagsList).listBags.keys<[u64]>().pipe(
query.listBags.keys<[u64]>().pipe(
switchMap((keys) =>
api.derive.bagsList._getIds(keys.map(({ args: [id] }) => id))
),
@@ -8,12 +8,14 @@ import type { Bag, BagExpanded } from './types';
import { map, switchMap } from 'rxjs';
import { objectSpread } from '@polkadot/util';
import { memo } from '../util';
export function expand (instanceId: string, api: DeriveApi): (bag: Bag) => Observable<BagExpanded> {
return memo(instanceId, (bag: Bag): Observable<BagExpanded> =>
api.derive.bagsList.listNodes(bag.bag).pipe(
map((nodes) => ({ ...bag, nodes }))
map((nodes) => objectSpread({ nodes }, bag))
)
);
}
@@ -12,13 +12,15 @@ import { BehaviorSubject, map, of, switchMap, tap, toArray } from 'rxjs';
import { nextTick } from '@polkadot/util';
import { memo } from '../util';
import { getQueryInterface } from './util';
function traverseLinks (api: DeriveApi, head: AccountId32 | string): Observable<PalletBagsListListNode[]> {
const subject = new BehaviorSubject<AccountId32 | string>(head);
const query = getQueryInterface(api);
return subject.pipe(
switchMap((account) =>
(api.query.voterList || api.query.bagsList).listNodes<Option<PalletBagsListListNode>>(account)
query.listNodes<Option<PalletBagsListListNode>>(account)
),
tap((node: Option<PalletBagsListListNode>): void => {
nextTick((): void => {
+16
View File
@@ -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
);
}
+4 -5
View File
@@ -9,7 +9,7 @@ import type { DeriveApi, DeriveBalancesAccount, DeriveBalancesAccountData } from
import { combineLatest, map, of, switchMap } from 'rxjs';
import { isFunction } from '@polkadot/util';
import { isFunction, objectSpread } from '@polkadot/util';
import { memo } from '../util';
@@ -40,12 +40,11 @@ function getBalance (api: DeriveApi, [freeBalance, reservedBalance, frozenFee, f
}
function calcBalances (api: DeriveApi, [accountId, [accountNonce, [primary, ...additional]]]: [AccountId, Result]): DeriveBalancesAccount {
return {
return objectSpread({
accountId,
accountNonce,
additional: additional.map((b) => getBalance(api, b)),
...getBalance(api, primary)
};
additional: additional.map((b) => getBalance(api, b))
}, getBalance(api, primary));
}
// old
+6 -9
View File
@@ -9,7 +9,7 @@ import type { DeriveApi, DeriveBalancesAccount, DeriveBalancesAccountData, Deriv
import { combineLatest, map, of, switchMap } from 'rxjs';
import { BN, BN_ZERO, bnMax, bnMin, isFunction } from '@polkadot/util';
import { BN, BN_ZERO, bnMax, bnMin, isFunction, objectSpread } from '@polkadot/util';
import { memo } from '../util';
@@ -57,13 +57,12 @@ function calcLocked (api: DeriveApi, bestNumber: BlockNumber, locks: (PalletBala
function calcShared (api: DeriveApi, bestNumber: BlockNumber, data: DeriveBalancesAccountData, locks: (PalletBalancesBalanceLock | BalanceLockTo212)[]): DeriveBalancesAllAccountData {
const { allLocked, lockedBalance, lockedBreakdown, vestingLocked } = calcLocked(api, bestNumber, locks);
return {
...data,
return objectSpread({}, data, {
availableBalance: api.registry.createType('Balance', allLocked ? 0 : bnMax(new BN(0), data.freeBalance.sub(lockedBalance))),
lockedBalance,
lockedBreakdown,
vestingLocked
};
});
}
function calcVesting (bestNumber: BlockNumber, shared: DeriveBalancesAllAccountData, _vesting: PalletVestingVestingInfo[] | null): DeriveBalancesAllVesting {
@@ -102,16 +101,14 @@ function calcVesting (bestNumber: BlockNumber, shared: DeriveBalancesAllAccountD
function calcBalances (api: DeriveApi, [data, [vesting, allLocks, namedReserves], bestNumber]: Result): DeriveBalancesAll {
const shared = calcShared(api, bestNumber, data, allLocks[0]);
return {
...shared,
...calcVesting(bestNumber, shared, vesting),
return objectSpread(shared, calcVesting(bestNumber, shared, vesting), {
accountId: data.accountId,
accountNonce: data.accountNonce,
additional: allLocks
.filter((_, index) => index !== 0)
.slice(1)
.map((l, index) => calcShared(api, bestNumber, data.additional[index], l)),
namedReserves
};
});
}
// old
+5 -1
View File
@@ -22,8 +22,12 @@ export { lazyDeriveSection };
// Enable derive only if some of these modules are available
const checks: Record<string, Avail> = {
allianceMotion: {
instances: ['allianceMotion'],
methods: []
},
bagsList: {
instances: ['voterList', 'bagsList'],
instances: ['voterBagsList', 'voterList', 'bagsList'],
methods: [],
withDetect: true
},
@@ -58,7 +58,7 @@ export function hasProposals (section: Collective): (instanceId: string, api: De
export function proposals (section: Collective): (instanceId: string, api: DeriveApi) => () => Observable<DeriveCollectiveProposal[]> {
return withSection(section, (query, api) =>
(): Observable<DeriveCollectiveProposal[]> =>
api.derive[section].proposalHashes().pipe(
api.derive[section as 'council'].proposalHashes().pipe(
switchMap((all) => _proposalsFrom(api, query, all))
)
);
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2022 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0
export type Collective = 'council' | 'membership' | 'technicalCommittee';
export type Collective = 'allianceMotion' | 'council' | 'membership' | 'technicalCommittee';
@@ -7,6 +7,8 @@ import type { DeriveApi, DeriveOwnContributions } from '../types';
import { combineLatest, EMPTY, map, of, startWith, switchMap } from 'rxjs';
import { objectSpread } from '@polkadot/util';
import { memo } from '../util';
import { extractContributed } from './util';
@@ -21,10 +23,8 @@ function _getValues (api: DeriveApi, childKey: string, keys: string[]): Observab
? api.registry.createType('Balance', o.unwrap())
: api.registry.createType('Balance')
)
.reduce((all: DeriveOwnContributions, b, index): DeriveOwnContributions => ({
...all,
[keys[index]]: b
}), {})
.reduce((all: DeriveOwnContributions, b, index): DeriveOwnContributions =>
objectSpread(all, { [keys[index]]: b }), {})
)
);
}
@@ -51,10 +51,9 @@ function _contributions (api: DeriveApi, paraId: string | number | BN, childKey:
_getValues(api, childKey, keys),
_watchOwnChanges(api, paraId, childKey, keys)
]).pipe(
map(([all, latest]) => ({
...all,
...latest
}))
map(([all, latest]) =>
objectSpread({}, all, latest)
)
);
}
@@ -11,7 +11,7 @@ import type { DeriveApi, DeriveDispatch, DeriveProposalImage } from '../types';
import { catchError, combineLatest, map, of, switchMap } from 'rxjs';
import { Enum } from '@polkadot/types';
import { isFunction, stringToHex } from '@polkadot/util';
import { isFunction, objectSpread, stringToHex } from '@polkadot/util';
import { memo } from '../util';
@@ -107,7 +107,7 @@ function queryScheduler (api: DeriveApi): Observable<DeriveDispatch[]> {
]);
}),
map(([infos, images]): DeriveDispatch[] =>
infos.map((info, index) => ({ ...info, image: images[index] }))
infos.map((info, index) => objectSpread({ image: images[index] }, info))
)
);
}
+16 -14
View File
@@ -9,7 +9,7 @@ import type { DeriveApi, DeriveProposal, DeriveProposalImage } from '../types';
import { combineLatest, map, of, switchMap } from 'rxjs';
import { isFunction } from '@polkadot/util';
import { isFunction, objectSpread } from '@polkadot/util';
import { memo } from '../util';
@@ -33,17 +33,17 @@ function parse ([proposals, images, optDepositors]: Result): DeriveProposal[] {
.map(([index, imageHash, proposer], proposalIndex): DeriveProposal => {
const depositors = optDepositors[proposalIndex].unwrap();
return {
...(
isNewDepositors(depositors)
? { balance: depositors[1], seconds: depositors[0] }
: { balance: depositors[0], seconds: depositors[1] }
),
image: images[proposalIndex],
imageHash,
index,
proposer
};
return objectSpread(
{
image: images[proposalIndex],
imageHash,
index,
proposer
},
isNewDepositors(depositors)
? { balance: depositors[1], seconds: depositors[0] }
: { balance: depositors[0], seconds: depositors[1] }
);
});
}
@@ -56,9 +56,11 @@ export function proposals (instanceId: string, api: DeriveApi): () => Observable
? combineLatest([
of(proposals),
api.derive.democracy.preimages(
proposals.map(([, hash]) => hash)),
proposals.map(([, hash]) => hash)
),
api.query.democracy.depositOf.multi(
proposals.map(([index]) => index))
proposals.map(([index]) => index)
)
])
: of<Result>([[], [], []])
),
@@ -6,6 +6,8 @@ import type { DeriveApi, DeriveReferendumExt } from '../types';
import { combineLatest, map, of, switchMap } from 'rxjs';
import { objectSpread } from '@polkadot/util';
import { memo } from '../util';
export function referendums (instanceId: string, api: DeriveApi): () => Observable<DeriveReferendumExt[]> {
@@ -20,10 +22,9 @@ export function referendums (instanceId: string, api: DeriveApi): () => Observab
: of([[], []])
),
map(([referendums, votes]) =>
referendums.map((referendum, index): DeriveReferendumExt => ({
...referendum,
...votes[index]
}))
referendums.map((referendum, index): DeriveReferendumExt =>
objectSpread({}, referendum, votes[index])
)
)
)
);
@@ -10,7 +10,7 @@ import type { DeriveApi, DeriveBalancesAccount, DeriveReferendum, DeriveReferend
import { combineLatest, map, of, switchMap } from 'rxjs';
import { isFunction } from '@polkadot/util';
import { isFunction, objectSpread } from '@polkadot/util';
import { memo } from '../util';
import { calcVotes, getStatus } from './util';
@@ -57,11 +57,12 @@ function extractVotes (mapped: [AccountId, PalletDemocracyVoteVoting][], referen
// FIXME We are ignoring split votes
votes.reduce((result: DeriveReferendumVote[], [, vote]): DeriveReferendumVote[] => {
if (vote.isStandard) {
result.push({
accountId,
isDelegating: false,
...vote.asStandard
});
result.push(
objectSpread({
accountId,
isDelegating: false
}, vote.asStandard)
);
}
return result;
+3 -4
View File
@@ -6,7 +6,7 @@ import type { PalletDemocracyReferendumInfo, PalletDemocracyReferendumStatus, Pa
import type { Option } from '@polkadot/types-codec';
import type { DeriveReferendum, DeriveReferendumVote, DeriveReferendumVotes, DeriveReferendumVoteState } from '../types';
import { BN, bnSqrt } from '@polkadot/util';
import { BN, bnSqrt, objectSpread } from '@polkadot/util';
interface ApproxState {
votedAye: BN;
@@ -119,11 +119,10 @@ export function calcVotes (sqrtElectorate: BN, referendum: DeriveReferendum, vot
? calcVotesCurrent(referendum.status.tally, votes)
: calcVotesPrev(votes);
return {
...state,
return objectSpread({}, state, {
isPassing: calcPassing(referendum.status.threshold, sqrtElectorate, state),
votes
};
});
}
export function getStatus (info: Option<PalletDemocracyReferendumInfo | ReferendumInfoTo239>): PalletDemocracyReferendumStatus | ReferendumInfoTo239 | null {
+2 -1
View File
@@ -4,6 +4,7 @@
import type { AnyFunction } from '@polkadot/types/types';
import * as accounts from './accounts';
import * as alliance from './alliance';
import * as bagsList from './bagsList';
import * as balances from './balances';
import * as bounties from './bounties';
@@ -23,7 +24,7 @@ import * as technicalCommittee from './technicalCommittee';
import * as treasury from './treasury';
import * as tx from './tx';
export const derive = { accounts, bagsList, balances, bounties, chain, contracts, council, crowdloan, democracy, elections, imOnline, membership, parachains, session, society, staking, technicalCommittee, treasury, tx };
export const derive = { accounts, alliance, bagsList, balances, bounties, chain, contracts, council, crowdloan, democracy, elections, imOnline, membership, parachains, session, society, staking, technicalCommittee, treasury, tx };
type DeriveSection<Section> = {
[M in keyof Section]: Section[M] extends AnyFunction
+12 -9
View File
@@ -11,6 +11,8 @@ import type { DeriveElectionsInfo } from './types';
import { combineLatest, map, of } from 'rxjs';
import { objectSpread } from '@polkadot/util';
import { memo } from '../util';
// SeatHolder is current tuple is 2.x-era Substrate
@@ -107,15 +109,16 @@ export function info (instanceId: string, api: DeriveApi): () => Observable<Deri
? queryAll(api, council, elections)
: queryCouncil(api, council)
).pipe(
map(([councilMembers, candidates, members, runnersUp]): DeriveElectionsInfo => ({
...getConstants(api, elections),
candidateCount: api.registry.createType('u32', candidates.length),
candidates: candidates.map(getCandidate),
members: members.length
? members.map(getAccountTuple).sort(sortAccounts)
: councilMembers.map((a): [AccountId32, Balance] => [a, api.registry.createType('Balance')]),
runnersUp: runnersUp.map(getAccountTuple).sort(sortAccounts)
}))
map(([councilMembers, candidates, members, runnersUp]): DeriveElectionsInfo =>
objectSpread({}, getConstants(api, elections), {
candidateCount: api.registry.createType('u32', candidates.length),
candidates: candidates.map(getCandidate),
members: members.length
? members.map(getAccountTuple).sort(sortAccounts)
: councilMembers.map((a): [AccountId32, Balance] => [a, api.registry.createType('Balance')]),
runnersUp: runnersUp.map(getAccountTuple).sort(sortAccounts)
})
)
);
});
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '8.14.1' };
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '9.4.2' };
+15 -15
View File
@@ -8,6 +8,8 @@ import type { Active, DidUpdate, Heads, ParaInfoResult, PendingSwap, RelayDispat
import { map, of } from 'rxjs';
import { objectSpread } from '@polkadot/util';
import { memo } from '../util';
import { didUpdateToBool } from './util';
@@ -28,20 +30,18 @@ function parseActive (id: ParaId, active: Active): DeriveParachainActive | null
if (found && found[1].isSome) {
const [collatorId, retriable] = found[1].unwrap();
return {
collatorId,
...(
retriable.isWithRetries
? {
isRetriable: true,
retries: retriable.asWithRetries.toNumber()
}
: {
isRetriable: false,
retries: 0
}
)
};
return objectSpread<DeriveParachainActive>(
{ collatorId },
retriable.isWithRetries
? {
isRetriable: true,
retries: retriable.asWithRetries.toNumber()
}
: {
isRetriable: false,
retries: 0
}
);
}
return null;
@@ -65,7 +65,7 @@ function parse (id: ParaId, [active, retryQueue, selectedThreads, didUpdate, inf
didUpdate: didUpdateToBool(didUpdate, id),
heads,
id,
info: { id, ...info.unwrap() } as DeriveParachainInfo,
info: objectSpread<DeriveParachainInfo>({ id }, info.unwrap()),
pendingSwapId: pendingSwap.unwrapOr(null),
relayDispatchQueue,
retryCollators: parseCollators(id, retryQueue),
@@ -8,6 +8,8 @@ import type { DidUpdate, ParaInfoResult, PendingSwap, RelayDispatchQueueSize } f
import { combineLatest, map, of, switchMap } from 'rxjs';
import { objectSpread } from '@polkadot/util';
import { memo } from '../util';
import { didUpdateToBool } from './util';
@@ -23,7 +25,7 @@ function parse ([ids, didUpdate, infos, pendingSwaps, relayDispatchQueueSizes]:
return ids.map((id, index): DeriveParachain => ({
didUpdate: didUpdateToBool(didUpdate, id),
id,
info: { id, ...infos[index].unwrapOr(null) } as DeriveParachainInfo,
info: objectSpread<DeriveParachainInfo>({ id }, infos[index].unwrapOr(null)),
pendingSwapId: pendingSwaps[index].unwrapOr(null),
relayDispatchQueueSize: relayDispatchQueueSizes[index][0].toNumber()
}));
+4 -3
View File
@@ -6,6 +6,8 @@ import type { DeriveApi, DeriveSessionInfo } from '../types';
import { map } from 'rxjs';
import { objectSpread } from '@polkadot/util';
import { memo } from '../util';
/**
@@ -18,13 +20,12 @@ export function info (instanceId: string, api: DeriveApi): () => Observable<Deri
const sessionLength = api.consts?.babe?.epochDuration || api.registry.createType('u64', 1);
const sessionsPerEra = api.consts?.staking?.sessionsPerEra || api.registry.createType('SessionIndex', 1);
return {
...indexes,
return objectSpread({
eraLength: api.registry.createType('BlockNumber', sessionsPerEra.mul(sessionLength)),
isEpoch: !!api.query.babe,
sessionLength,
sessionsPerEra
};
}, indexes);
})
)
);
+10 -8
View File
@@ -8,6 +8,8 @@ import type { DeriveApi, DeriveSessionInfo, DeriveSessionProgress } from '../typ
import { combineLatest, map, of, switchMap } from 'rxjs';
import { objectSpread } from '@polkadot/util';
import { memo } from '../util';
type ResultSlotsNoSession = [u64, u64, u64];
@@ -28,20 +30,20 @@ function createDerive (api: DeriveApi, info: DeriveSessionInfo, [currentSlot, ep
const sessionProgress = currentSlot.sub(epochStartSlot);
const eraProgress = info.currentIndex.sub(activeEraStartSessionIndex).imul(info.sessionLength).iadd(sessionProgress);
return {
...info,
return objectSpread({
eraProgress: api.registry.createType('BlockNumber', eraProgress),
sessionProgress: api.registry.createType('BlockNumber', sessionProgress)
};
}, info);
}
function queryAura (api: DeriveApi): Observable<DeriveSessionProgress> {
return api.derive.session.info().pipe(
map((info): DeriveSessionProgress => ({
...info,
eraProgress: api.registry.createType('BlockNumber'),
sessionProgress: api.registry.createType('BlockNumber')
}))
map((info): DeriveSessionProgress =>
objectSpread({
eraProgress: api.registry.createType('BlockNumber'),
sessionProgress: api.registry.createType('BlockNumber')
}, info)
)
);
}
+3 -5
View File
@@ -9,7 +9,7 @@ import type { StakingQueryFlags } from './types';
import { combineLatest, map, switchMap } from 'rxjs';
import { BN, BN_ZERO } from '@polkadot/util';
import { BN, BN_ZERO, objectSpread } from '@polkadot/util';
import { firstMemo, memo } from '../util';
@@ -54,12 +54,10 @@ function redeemableSum (api: DeriveApi, stakingLedger: PalletStakingStakingLedge
}
function parseResult (api: DeriveApi, sessionInfo: DeriveSessionInfo, keys: DeriveStakingKeys, query: DeriveStakingQuery): DeriveStakingAccount {
return {
...keys,
...query,
return objectSpread({}, keys, query, {
redeemable: redeemableSum(api, query.stakingLedger, sessionInfo),
unlocking: calculateUnlocking(api, query.stakingLedger, sessionInfo)
};
});
}
/**
@@ -2,12 +2,12 @@
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
import type { Option, u32 } from '@polkadot/types';
import type { ActiveEraInfo, EraIndex } from '@polkadot/types/interfaces';
import type { u32 } from '@polkadot/types';
import type { EraIndex } from '@polkadot/types/interfaces';
import type { BN } from '@polkadot/util';
import type { DeriveApi } from '../types';
import { map } from 'rxjs';
import { combineLatest, map, of } from 'rxjs';
import { BN_ONE, BN_ZERO } from '@polkadot/util';
@@ -15,9 +15,11 @@ import { memo } from '../util';
export function erasHistoric (instanceId: string, api: DeriveApi): (withActive?: boolean) => Observable<EraIndex[]> {
return memo(instanceId, (withActive?: boolean): Observable<EraIndex[]> =>
api.queryMulti<[Option<ActiveEraInfo>, u32]>([
api.query.staking.activeEra,
api.query.staking.historyDepth
combineLatest([
api.query.staking.activeEra(),
api.consts.staking.historyDepth
? of(api.consts.staking.historyDepth)
: api.query.staking.historyDepth<u32>()
]).pipe(
map(([activeEraOpt, historyDepth]): EraIndex[] => {
const result: EraIndex[] = [];
+2 -2
View File
@@ -4,7 +4,7 @@
import type { Observable } from 'rxjs';
import type { Option } from '@polkadot/types';
import type { AccountId } from '@polkadot/types/interfaces';
import type { NodeRuntimeSessionKeys } from '@polkadot/types/lookup';
import type { KitchensinkRuntimeSessionKeys } from '@polkadot/types/lookup';
import type { DeriveApi } from '../types';
import type { DeriveStakingKeys } from './types';
@@ -12,7 +12,7 @@ import { combineLatest, map, of, switchMap } from 'rxjs';
import { firstMemo, memo } from '../util';
function extractsIds (stashId: Uint8Array | string, queuedKeys: [AccountId, NodeRuntimeSessionKeys | AccountId[]][], nextKeys: Option<NodeRuntimeSessionKeys>): DeriveStakingKeys {
function extractsIds (stashId: Uint8Array | string, queuedKeys: [AccountId, KitchensinkRuntimeSessionKeys | AccountId[]][], nextKeys: Option<KitchensinkRuntimeSessionKeys>): DeriveStakingKeys {
const sessionIds = (queuedKeys.find(([currentId]) => currentId.eq(stashId)) || [undefined, [] as AccountId[]])[1];
const nextSessionIds = nextKeys.unwrapOr([] as AccountId[]);
+8 -5
View File
@@ -6,6 +6,8 @@ import type { DeriveApi, DeriveStakingOverview } from '../types';
import { combineLatest, map } from 'rxjs';
import { objectSpread } from '@polkadot/util';
import { memo } from '../util';
/**
@@ -17,10 +19,11 @@ export function overview (instanceId: string, api: DeriveApi): () => Observable<
api.derive.session.indexes(),
api.derive.staking.validators()
]).pipe(
map(([indexes, { nextElected, validators }]): DeriveStakingOverview => ({
...indexes,
nextElected,
validators
}))
map(([indexes, { nextElected, validators }]): DeriveStakingOverview =>
objectSpread({}, indexes, {
nextElected,
validators
})
)
));
}
+8 -8
View File
@@ -99,14 +99,14 @@ export const query = firstMemo(
export function queryMulti (instanceId: string, api: DeriveApi): (accountIds: (Uint8Array | string)[], flags: StakingQueryFlags) => Observable<DeriveStakingQuery[]> {
return memo(instanceId, (accountIds: (Uint8Array | string)[], flags: StakingQueryFlags): Observable<DeriveStakingQuery[]> =>
accountIds.length
? api.derive.session.indexes().pipe(
switchMap(({ activeEra }): Observable<DeriveStakingQuery[]> => {
const stashIds = accountIds.map((accountId) => api.registry.createType('AccountId', accountId));
api.derive.session.indexes().pipe(
switchMap(({ activeEra }): Observable<DeriveStakingQuery[]> => {
const stashIds = accountIds.map((a) => api.registry.createType('AccountId', a));
return getBatch(api, activeEra, stashIds, flags);
})
)
: of([])
return stashIds.length
? getBatch(api, activeEra, stashIds, flags)
: of([]);
})
)
);
}
@@ -10,7 +10,7 @@ import type { DeriveStakingQuery } from './types';
import { combineLatest, map, of, switchMap } from 'rxjs';
import { BN_BILLION, BN_ZERO } from '@polkadot/util';
import { BN_BILLION, BN_ZERO, objectSpread } from '@polkadot/util';
import { firstMemo, memo } from '../util';
@@ -125,10 +125,11 @@ function filterRewards (eras: EraIndex[], valInfo: [string, DeriveStakingQuery][
return true;
})
.filter(({ validators }) => Object.keys(validators).length !== 0)
.map((reward) => ({
...reward,
nominators: reward.nominating.filter((n) => reward.validators[n.validatorId])
}));
.map((reward) =>
objectSpread({}, reward, {
nominators: reward.nominating.filter((n) => reward.validators[n.validatorId])
})
);
}
export function _stakerRewardsEras (instanceId: string, api: DeriveApi): (eras: EraIndex[], withActive?: boolean) => Observable<ErasResult> {
+18 -18
View File
@@ -20,29 +20,29 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "8.14.1",
"version": "9.4.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.18.9",
"@polkadot/api-augment": "8.14.1",
"@polkadot/api-base": "8.14.1",
"@polkadot/api-derive": "8.14.1",
"@polkadot/keyring": "^10.1.1",
"@polkadot/rpc-augment": "8.14.1",
"@polkadot/rpc-core": "8.14.1",
"@polkadot/rpc-provider": "8.14.1",
"@polkadot/types": "8.14.1",
"@polkadot/types-augment": "8.14.1",
"@polkadot/types-codec": "8.14.1",
"@polkadot/types-create": "8.14.1",
"@polkadot/types-known": "8.14.1",
"@polkadot/util": "^10.1.1",
"@polkadot/util-crypto": "^10.1.1",
"@babel/runtime": "^7.19.0",
"@polkadot/api-augment": "9.4.2",
"@polkadot/api-base": "9.4.2",
"@polkadot/api-derive": "9.4.2",
"@polkadot/keyring": "^10.1.9",
"@polkadot/rpc-augment": "9.4.2",
"@polkadot/rpc-core": "9.4.2",
"@polkadot/rpc-provider": "9.4.2",
"@polkadot/types": "9.4.2",
"@polkadot/types-augment": "9.4.2",
"@polkadot/types-codec": "9.4.2",
"@polkadot/types-create": "9.4.2",
"@polkadot/types-known": "9.4.2",
"@polkadot/util": "^10.1.9",
"@polkadot/util-crypto": "^10.1.9",
"eventemitter3": "^4.0.7",
"rxjs": "^7.5.6"
},
"devDependencies": {
"@polkadot/api-augment": "8.14.1",
"@polkadot/types-support": "8.14.1"
"@polkadot/api-augment": "9.4.2",
"@polkadot/types-support": "9.4.2"
}
}
+46 -35
View File
@@ -4,7 +4,7 @@
import type { Observable } from 'rxjs';
import type { AugmentedCall, DeriveCustom, QueryableCalls } from '@polkadot/api-base/types';
import type { RpcInterface } from '@polkadot/rpc-core/types';
import type { Option, Raw, StorageKey, Text, u64 } from '@polkadot/types';
import type { StorageKey, Text, u64 } from '@polkadot/types';
import type { Call, Hash, RuntimeVersion } from '@polkadot/types/interfaces';
import type { DecoratedMeta } from '@polkadot/types/metadata/decorate/types';
import type { StorageEntry } from '@polkadot/types/primitive/types';
@@ -19,7 +19,7 @@ import { BehaviorSubject, combineLatest, from, map, of, switchMap, tap, toArray
import { getAvailableDerives } from '@polkadot/api-derive';
import { memo, RpcCore } from '@polkadot/rpc-core';
import { WsProvider } from '@polkadot/rpc-provider';
import { expandMetadata, Metadata, typeDefinitions, TypeRegistry, unwrapStorageType } from '@polkadot/types';
import { expandMetadata, GenericExtrinsic, Metadata, typeDefinitions, TypeRegistry } from '@polkadot/types';
import { getSpecRuntime } from '@polkadot/types-known';
import { arrayChunk, arrayFlatten, assertReturn, BN, compactStripLength, lazyMethod, lazyMethods, logger, nextTick, objectSpread, stringCamelCase, stringUpperFirst, u8aConcatStrict, u8aToHex } from '@polkadot/util';
import { blake2AsHex } from '@polkadot/util-crypto';
@@ -40,6 +40,7 @@ interface MetaDecoration {
}
interface FullDecoration<ApiType extends ApiTypes> {
createdAt?: Uint8Array;
decoratedApi: ApiDecoration<ApiType>;
decoratedMeta: DecoratedMeta;
}
@@ -62,6 +63,8 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
#registry: Registry;
readonly #runtimeLog: Record<string, boolean> = {};
#storageGetQ: [Observable<Codec[]>, [StorageEntry, unknown[]][]][] = [];
#storageSubQ: [Observable<Codec[]>, [StorageEntry, unknown[]][]][] = [];
@@ -81,7 +84,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
protected _extrinsics?: SubmittableExtrinsics<ApiType>;
protected _extrinsicType = 4; // latest extrinsic version
protected _extrinsicType = GenericExtrinsic.LATEST_EXTRINSIC_VERSION;
protected _genesisHash?: Hash;
@@ -108,6 +111,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
protected _runtimeVersion?: RuntimeVersion;
protected _rx: ApiInterfaceRx = {
call: {} as QueryableCalls<'rxjs'>,
consts: {} as QueryableConsts<'rxjs'>,
query: {} as QueryableStorage<'rxjs'>,
tx: {} as SubmittableExtrinsics<'rxjs'>
@@ -156,6 +160,8 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
this.#instanceId = `${++instanceCounter}`;
this.#registry = options.source?.registry || options.registry || new TypeRegistry();
this._rx.callAt = (blockHash: Uint8Array | string, knownVersion?: RuntimeVersion) =>
from(this.at(blockHash, knownVersion)).pipe(map((a) => a.rx.call));
this._rx.queryAt = (blockHash: Uint8Array | string, knownVersion?: RuntimeVersion) =>
from(this.at(blockHash, knownVersion)).pipe(map((a) => a.rx.query));
this._rx.registry = this.#registry;
@@ -220,6 +226,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
query: {},
registry,
rx: {
call: {},
query: {}
},
tx: createSubmittable(this._type, this._rx, this._decorateMethod, registry, blockHash)
@@ -236,8 +243,9 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
}
const runtime = this._decorateCalls(registry, this._decorateMethod, blockHash);
const runtimeRx = this._decorateCalls<'rxjs'>(registry, this._rxDecorateMethod, blockHash);
const storage = this._decorateStorage(registry.decoratedMeta, this._decorateMethod, blockHash);
const storageRx = this._decorateStorage(registry.decoratedMeta, this._rxDecorateMethod, blockHash);
const storageRx = this._decorateStorage<'rxjs'>(registry.decoratedMeta, this._rxDecorateMethod, blockHash);
augmentObject('consts', registry.decoratedMeta.consts, decoratedApi.consts, fromEmpty);
augmentObject('errors', registry.decoratedMeta.errors, decoratedApi.errors, fromEmpty);
@@ -245,6 +253,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
augmentObject('query', storage, decoratedApi.query, fromEmpty);
augmentObject('query', storageRx, decoratedApi.rx.query, fromEmpty);
augmentObject('call', runtime, decoratedApi.call, fromEmpty);
augmentObject('call', runtimeRx, decoratedApi.rx.call, fromEmpty);
decoratedApi.findCall = (callIndex: Uint8Array | string): CallFunction =>
findCall(registry.registry, callIndex);
@@ -256,6 +265,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
decoratedApi.runtimeVersion = registry.runtimeVersion;
return {
createdAt: blockHash,
decoratedApi,
decoratedMeta: registry.decoratedMeta
};
@@ -274,6 +284,8 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
this._errors = decoratedApi.errors;
this._events = decoratedApi.events;
this._query = decoratedApi.query;
this._rx.call = decoratedApi.rx.call;
this._rx.query = decoratedApi.rx.query;
const tx = this._decorateExtrinsics(decoratedMeta, this._decorateMethod);
@@ -297,7 +309,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
* backwards compatible endpoint for metadata injection, may be removed in the future (However, it is still useful for testing injection)
*/
public injectMetadata (metadata: Metadata, fromEmpty?: boolean, registry?: Registry): void {
this._injectMetadata({ metadata, registry: registry || this.#registry, runtimeVersion: this.#registry.createType('RuntimeVersionPartial') }, fromEmpty);
this._injectMetadata({ counter: 0, metadata, registry: registry || this.#registry, runtimeVersion: this.#registry.createType('RuntimeVersionPartial') }, fromEmpty);
}
private _decorateFunctionMeta (input: MetaDecoration, output: MetaDecoration): MetaDecoration {
@@ -379,7 +391,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
const filterKey = (k: string) => !allKeys.includes(k);
const unknown = exposed.filter(filterKey);
if (unknown.length) {
if (unknown.length && !this._options.noInitWarn) {
l.warn(`RPC methods not decorated: ${unknown.join(', ')}`);
}
@@ -488,12 +500,16 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
}
// pre-metadata decoration
protected _decorateCalls<ApiType extends ApiTypes> ({ registry, runtimeVersion: { apis, specName } }: VersionedRegistry<ApiType>, decorateMethod: DecorateMethod<ApiType>, blockHash?: Uint8Array | string | null): QueryableCalls<ApiType> {
protected _decorateCalls<ApiType extends ApiTypes> ({ registry, runtimeVersion: { apis, specName, specVersion } }: VersionedRegistry<any>, decorateMethod: DecorateMethod<ApiType>, blockHash?: Uint8Array | string | null): QueryableCalls<ApiType> {
const result = {} as QueryableCalls<ApiType>;
const named: Record<string, Record<string, DefinitionCallNamed>> = {};
const hashes: Record<HexString, boolean> = {};
const sections = this._getRuntimeDefs(registry, specName, this._runtimeChain);
const older: string[] = [];
const implName = `${specName.toString()}/${specVersion.toString()}`;
const hasLogged = this.#runtimeLog[implName] || false;
this.#runtimeLog[implName] = true;
for (let i = 0; i < sections.length; i++) {
const [_section, secs] = sections[i];
@@ -534,12 +550,14 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
.filter(([a]) => !hashes[a])
.map(([a, v]) => `${this._runtimeMap[a] || a}/${v}`);
if (older.length) {
l.warn(`Not decorating runtime apis without matching versions: ${older.join(', ')}`);
}
if (!this._options.noInitWarn && !hasLogged) {
if (older.length) {
l.warn(`${implName}: Not decorating runtime apis without matching versions: ${older.join(', ')}`);
}
if (notFound.length) {
l.warn(`Not decorating unknown runtime apis: ${notFound.join(', ')}`);
if (notFound.length) {
l.warn(`${implName}: Not decorating unknown runtime apis: ${notFound.join(', ')}`);
}
}
const stateCall = blockHash
@@ -703,9 +721,6 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
decorated.keyPrefix = (...args: unknown[]): string =>
u8aToHex(creator.keyPrefix(...args));
decorated.range = decorateMethod((range: [Hash, Hash?], ...args: unknown[]): Observable<[Hash, Codec][]> =>
this._decorateStorageRange(decorated, args, range));
decorated.size = decorateMethod((...args: unknown[]): Observable<u64> =>
this._rpcCore.state.getStorageSize(getArgs(args)));
@@ -829,21 +844,29 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
let valueIdx = 0;
let valueObs: Observable<Codec[]>;
// if we don't have queue entries yet,
// or the current queue has fired (see from below),
// or the current queue has the max entries,
// then we create a new queue
if (queueIdx === -1 || !queue[queueIdx] || queue[queueIdx][1].length === PAGE_SIZE_Q) {
queueIdx++;
valueObs = from(
// Defer to the next tick - this aligns with nextTick in @polkadot/util,
// however since we return a value here, we don't re-use what is there
Promise
.resolve()
.then((): [StorageEntry, unknown[]][] => {
// we delay the execution until the next tick, this allows
// any queries made in this timeframe to be added to the same
// queue for a single query
new Promise<[StorageEntry, unknown[]][]>((resolve): void => {
nextTick((): void => {
// get all the calls in this instance, resolve with it
// and then clear the queue so we don't add more
// (anyhting after this will be added to a new queue)
const calls = queue[queueIdx][1];
delete queue[queueIdx];
return calls;
})
resolve(calls);
});
})
).pipe(
switchMap((calls) => query(calls))
);
@@ -857,6 +880,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
}
return valueObs.pipe(
// return the single value at this index
map((values) => values[valueIdx])
);
}
@@ -879,19 +903,6 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
});
}
private _decorateStorageRange<ApiType extends ApiTypes> (decorated: QueryableStorageEntry<ApiType>, args: unknown[], range: [Hash, Hash?]): Observable<[Hash, Codec][]> {
const outputType = unwrapStorageType(this.#registry, decorated.creator.meta.type, decorated.creator.meta.modifier.isOptional);
return this._rpcCore.state
.queryStorage<[Option<Raw>]>([decorated.key(...args)], ...range)
.pipe(map((result: [Hash, [Option<Raw>]][]): [Hash, Codec][] =>
result.map(([blockHash, [value]]) => [
blockHash,
this.createType<Codec>(outputType, value.isSome ? value.unwrap().toHex() : undefined)
])
));
}
// retrieve a set of values for a specific set of keys - here we chunk the keys into PAGE_SIZE sizes
private _retrieveMulti (keys: [StorageEntry, unknown[]][], blockHash?: Uint8Array): Observable<Codec[]> {
if (!keys.length) {
+2 -2
View File
@@ -194,8 +194,8 @@ export abstract class Getters<ApiType extends ApiTypes> extends Init<ApiType> im
/**
* @description The underlying Rx API interface
*/
public get rx (): Pick<ApiInterfaceRx, 'tx' | 'rpc' | 'query'> {
return assertResult(this._rx as Pick<ApiInterfaceRx, 'tx' | 'rpc' | 'query'>);
public get rx (): Pick<ApiInterfaceRx, 'tx' | 'rpc' | 'query' | 'call'> {
return assertResult(this._rx as Pick<ApiInterfaceRx, 'tx' | 'rpc' | 'query' | 'call'>);
}
/**
+22 -8
View File
@@ -21,6 +21,7 @@ import { cryptoWaitReady } from '@polkadot/util-crypto';
import { Decorate } from './Decorate';
const KEEPALIVE_INTERVAL = 10000;
const WITH_VERSION_SHORTCUT = false;
const l = logger('api/init');
@@ -29,6 +30,8 @@ function textToString (t: Text): string {
}
export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
#atLast: [string, ApiDecoration<ApiType>] | null = null;
#healthTimer: ReturnType<typeof setInterval> | null = null;
#registries: VersionedRegistry<ApiType>[] = [];
@@ -70,7 +73,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
this._rpcCore.provider.on('disconnected', () => this.#onProviderDisconnect());
this._rpcCore.provider.on('error', (e: Error) => this.#onProviderError(e));
this._rpcCore.provider.on('connected', () => this.#onProviderConnect());
} else {
} else if (!this._options.noInitWarn) {
l.warn('Api will be available in a limited mode since the provider does not support subscriptions');
}
@@ -113,11 +116,16 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
*/
public async at (blockHash: Uint8Array | string, knownVersion?: RuntimeVersion): Promise<ApiDecoration<ApiType>> {
const u8aHash = u8aToU8a(blockHash);
const u8aHex = u8aToHex(u8aHash);
const registry = await this.getBlockRegistry(u8aHash, knownVersion);
// always create a new decoration - since we are pointing to a specific hash, this
// means that all queries needs to use that hash (not a previous one already existing)
return this._createDecorated(registry, true, null, u8aHash).decoratedApi;
if (!this.#atLast || this.#atLast[0] !== u8aHex) {
// always create a new decoration - since we are pointing to a specific hash, this
// means that all queries needs to use that hash (not a previous one already existing)
this.#atLast = [u8aHex, this._createDecorated(registry, true, null, u8aHash).decoratedApi];
}
return this.#atLast[1];
}
private async _createBlockRegistry (blockHash: Uint8Array, header: HeaderPartial, version: RuntimeVersionPartial): Promise<VersionedRegistry<ApiType>> {
@@ -129,7 +137,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
this._initRegistry(registry, this._runtimeChain as Text, version, metadata);
// add our new registry
const result = { lastBlockHash: blockHash, metadata, registry, runtimeVersion: version };
const result = { counter: 0, lastBlockHash: blockHash, metadata, registry, runtimeVersion: version };
this.#registries.push(result);
@@ -168,6 +176,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
);
if (existingViaVersion) {
existingViaVersion.counter++;
existingViaVersion.lastBlockHash = blockHash;
return existingViaVersion;
@@ -198,8 +207,13 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
// get the runtime version, either on-chain or via an known upgrade history
const [firstVersion, lastVersion] = getUpgradeVersion(this._genesisHash, header.number);
const version = this.registry.createType('RuntimeVersionPartial',
(firstVersion && (lastVersion || firstVersion.specVersion.eq(this._runtimeVersion.specVersion)))
? { specName: this._runtimeVersion.specName, specVersion: firstVersion.specVersion }
WITH_VERSION_SHORTCUT && (
firstVersion && (
lastVersion ||
firstVersion.specVersion.eq(this._runtimeVersion.specVersion)
)
)
? { apis: firstVersion.apis, specName: this._runtimeVersion.specName, specVersion: firstVersion.specVersion }
: await firstValueFrom(this._rpcCore.state.getRuntimeVersion.raw(header.parentHash))
);
@@ -337,7 +351,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
// setup the initial registry, when we have none
if (!this.#registries.length) {
this.#registries.push({ isDefault: true, metadata, registry: this.registry, runtimeVersion });
this.#registries.push({ counter: 0, isDefault: true, metadata, registry: this.registry, runtimeVersion });
}
// get unique types & validate
+1
View File
@@ -8,6 +8,7 @@ import type { Registry } from '@polkadot/types/types';
import type { ApiDecoration, ApiTypes } from '../types';
export interface VersionedRegistry<ApiType extends ApiTypes> {
counter: number;
decoratedApi?: ApiDecoration<ApiType>;
decoratedMeta?: DecoratedMeta;
isDefault?: boolean;

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