Compare commits

...
396 Commits
Author SHA1 Message Date
github-actions[bot] 7a6d19d241 [CI Skip] release/stable 7.15.1
skip-checks: true
2022-04-03 06:07:54 +00:00
Jaco f4a590d7f8 7.15.1 (#4714) 2022-04-03 08:59:31 +03:00
github-actions[bot] 771e5f3bcf [CI Skip] release/beta 7.14.4-9
skip-checks: true
2022-04-02 16:32:54 +00:00
Jaco 1ba427356d Kusama & Westend upgrade blocks (#4713) 2022-04-02 19:24:34 +03:00
github-actions[bot] aad497e9d2 [CI Skip] release/beta 7.14.4-8
skip-checks: true
2022-04-02 10:38:12 +00:00
Jaco 95fc2b2c99 Bump static metadata (#4712) 2022-04-02 13:28:40 +03:00
github-actions[bot] b7b707249b [CI Skip] release/beta 7.14.4-7
skip-checks: true
2022-04-01 08:00:13 +00:00
Jaco ce95e305f3 Bump dev deps (#4711) 2022-04-01 10:50:46 +03:00
github-actions[bot] 4ea793f55e [CI Skip] release/beta 7.14.4-6
skip-checks: true
2022-03-31 13:52:55 +00:00
Jaco bb0b365dfe Lazy crypto init (#4709) 2022-03-31 16:45:09 +03:00
github-actions[bot] 756f817d93 [CI Skip] release/beta 7.14.4-5
skip-checks: true
2022-03-31 07:56:48 +00:00
Jaco df4bda1fc8 Promise cache for metadata from version (improves parallel) (#4708)
* Cache for metadata from version (improves parallel)

* Ordering

* Single waiting placeholder

* Dedupe

* Sprinkle in await

* Tighten up with HexString

* CHANGELOG
2022-03-31 10:46:46 +03:00
github-actions[bot] a98e9543b8 [CI Skip] release/beta 7.14.4-4
skip-checks: true
2022-03-30 15:07:08 +00:00
Jaco 84abaff414 DispatchError.error as [u8; 4] (#4570)
* DispatchError.error as [u8; 4]

* Adjust Error.is

* Adjust

* Adjust

* U8a applies to error only

* CHANGELOG
2022-03-30 17:57:41 +03:00
github-actions[bot] 29d5460cdd [CI Skip] release/beta 7.14.4-3
skip-checks: true
2022-03-30 14:51:41 +00:00
HackFisher e2d0de4f6c Update maxExtrinsic definition (#4703)
Related https://github.com/polkadot-js/api/pull/4702

Sorry thatI shouldn't modify the auto-generated file `types.ts` which was later get reverted by `[CI Skip] release/beta 7.14.4-1`:

https://github.com/polkadot-js/api/commit/6fb6c40c7dd073b7715f9a7fa7628f4b62ab99a8
2022-03-30 17:41:28 +03:00
github-actions[bot] 8e32777efa [CI Skip] release/beta 7.14.4-2
skip-checks: true
2022-03-30 08:26:59 +00:00
Xiliang Chen 39b1de326c implement entriesPaged and keysPages for query at (#4701)
* implement entriesPaged and keysPages for query at

* remove redudent declaration
2022-03-30 11:17:54 +03:00
github-actions[bot] 6fb6c40c7d [CI Skip] release/beta 7.14.4-1
skip-checks: true
2022-03-30 05:02:17 +00:00
HackFisher badb10bdd9 Fix types for maxExtrinsic (#4702)
Ref: https://github.com/paritytech/substrate/blob/41567c30da77a2546a90c1049042ebd7b0b09bc4/frame/system/src/limits.rs#L99-L102
2022-03-30 07:52:05 +03:00
github-actions[bot] 235a7b1aa9 [CI Skip] release/beta 7.14.4-0
skip-checks: true
2022-03-29 04:34:42 +00:00
Josep M Sobrepere b7d65fb506 fix: export substrate-connect WellKnownChain (#4700) 2022-03-29 07:24:57 +03:00
github-actions[bot] 8eb0524fed [CI Skip] release/stable 7.14.3
skip-checks: true
2022-03-28 10:10:02 +00:00
Jaco bab50b2d74 7.14.3 (#4699) 2022-03-28 13:02:22 +03:00
github-actions[bot] bb75b42273 [CI Skip] release/stable 7.14.2
skip-checks: true
2022-03-28 05:23:21 +00:00
Jaco 949e429d04 Don't export ScProvider top-level in @polkadot/rpc-provider (#4694)
* Don't export `ScProvider` top-level in `@polkadot/rpc-provider`

* 7.14.2
2022-03-28 08:12:33 +03:00
github-actions[bot] 0b1c20efd7 [CI Skip] release/stable 7.14.1
skip-checks: true
2022-03-27 08:29:36 +00:00
Jaco 0536998766 Correct release to 7.14.1 (#4691) 2022-03-27 11:19:58 +03:00
Jaco 22651eb4b8 8.14.1 (#4690) 2022-03-27 11:00:19 +03:00
github-actions[bot] 48414bdb34 [CI Skip] release/beta 7.13.2-10
skip-checks: true
2022-03-27 06:34:39 +00:00
Jaco 2ff6a85fb3 Bump TypeScript (#4689) 2022-03-27 09:27:11 +03:00
github-actions[bot] 8be1f337a8 [CI Skip] release/beta 7.13.2-9
skip-checks: true
2022-03-25 16:31:07 +00:00
Jaco 2c7056da25 Bump dev (& update CHANGELOG) (#4687) 2022-03-25 18:20:15 +02:00
github-actions[bot] b53c22d6d3 [CI Skip] release/beta 7.13.2-8
skip-checks: true
2022-03-25 15:56:15 +00:00
Josep M SobrepereandJaco 17f316b7c7 Add smoldot rpc provider (#4672)
* Add smoldot rpc provider

* remove smoldot references and fix lint issues

* fix wrong export

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

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

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

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

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

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

* fix linting on `createScClient.ts`

* fix linting on `Health.ts`

* use @polkadotjs/utils

* remove @substrate/connect

* add @substrate/connect

* fixt linting issues

* export `ScProvider` class

* fix connecting to dependency

* make ScProvider lazy

* dendency -> sharedSandbox

* use @substrate/connect@0.7.0-alpha.0

* fix bundle.ts export

Co-authored-by: Jaco <jacogr@gmail.com>
2022-03-25 17:46:24 +02:00
github-actions[bot] b44fcc90b2 [CI Skip] release/beta 7.13.2-7
skip-checks: true
2022-03-24 18:19:20 +00:00
Jaco b4e477a8c1 Remove all README links (#4685) 2022-03-24 20:09:16 +02:00
github-actions[bot] 4b921c8a55 [CI Skip] release/beta 7.13.2-6
skip-checks: true
2022-03-24 10:13:45 +00:00
Yaroslav Bolyukin e53231b70a Support BTreeMap/BTreeSet in typegen (#4682) 2022-03-24 12:04:14 +02:00
github-actions[bot] afd1db58ac [CI Skip] release/beta 7.13.2-5
skip-checks: true
2022-03-23 14:18:04 +00:00
Jaco 63ba84a641 Clear connection timeout on disconnect (#4681) 2022-03-23 16:09:25 +02:00
github-actions[bot] 044aecbfc3 [CI Skip] release/beta 7.13.2-4
skip-checks: true
2022-03-23 05:29:10 +00:00
Jaco e573c26df3 Bump dev (#4679) 2022-03-23 07:19:33 +02:00
github-actions[bot] 31e7de31f3 [CI Skip] release/beta 7.13.2-3
skip-checks: true
2022-03-22 14:26:51 +00:00
Jaco 7cd9c16eae Add dev_getBlockStats RPC (#4677)
* Add dev_getBlockStats RPC

* CHANGELOG
2022-03-22 16:18:13 +02:00
github-actions[bot] 2b1a7da446 [CI Skip] release/beta 7.13.2-2
skip-checks: true
2022-03-22 07:49:36 +00:00
Jaco 9399c8d24f Output BitVec toHuman to LSB (limit support) (#4676) 2022-03-22 09:41:17 +02:00
github-actions[bot] 798e5fcc78 [CI Skip] release/beta 7.13.2-1
skip-checks: true
2022-03-22 07:05:38 +00:00
Jaco d8ad237b00 Add total.bytes{Recv, Sent} to provider stats (#4671) 2022-03-22 08:54:42 +02:00
github-actions[bot] 550cb10766 [CI Skip] release/beta 7.13.2-0
skip-checks: true
2022-03-22 06:52:53 +00:00
Jaco a44108c3f3 Exatra BitVec namespaces top-level (#4674) 2022-03-22 08:43:08 +02:00
github-actions[bot] 2f28ea0ea8 [CI Skip] release/stable 7.13.1
skip-checks: true
2022-03-19 11:41:58 +00:00
Jaco 488d078b9c 7.13.1 (#4670)
* 7.13.1

* typo
2022-03-19 13:33:35 +02:00
github-actions[bot] ba384cee78 [CI Skip] release/beta 7.12.2-9
skip-checks: true
2022-03-19 09:06:14 +00:00
Jaco 4f95f33cbb Bump util (#4668) 2022-03-19 10:58:21 +02:00
github-actions[bot] 368cb8314c [CI Skip] release/beta 7.12.2-8
skip-checks: true
2022-03-19 07:51:35 +00:00
Jaco c01896d24f Bump babel & dev (#4667) 2022-03-19 09:43:03 +02:00
github-actions[bot] 983043bd1e [CI Skip] release/beta 7.12.2-7
skip-checks: true
2022-03-18 15:17:52 +00:00
MOZGIII 9c2ed6297a Follow-up fix after #4665 (#4666)
* Fix a small nit

* Correct a newly discovered type issue
2022-03-18 17:09:41 +02:00
github-actions[bot] 8a7fee5903 [CI Skip] release/beta 7.12.2-6
skip-checks: true
2022-03-18 14:41:33 +00:00
MOZGIII b0e8a8512a Allow generic Data param at RpcError (#4665)
* Allow generic Data param at RpcError

* Ensure that unless `Data` is specified, the field can't be accessed
2022-03-18 16:33:14 +02:00
github-actions[bot] f83d23d0f6 [CI Skip] release/beta 7.12.2-5
skip-checks: true
2022-03-18 07:50:30 +00:00
Jaco 9dfb5cb237 state_trieMigrationStatus RPC (#4664) 2022-03-18 09:40:37 +02:00
github-actions[bot] 8c87b16924 [CI Skip] release/beta 7.12.2-4
skip-checks: true
2022-03-17 19:01:11 +00:00
Jaco 0d5dce002d Bump static metadata (#4663) 2022-03-17 20:51:10 +02:00
github-actions[bot] 4d0c777a8f [CI Skip] release/beta 7.12.2-3
skip-checks: true
2022-03-17 15:41:45 +00:00
Jaco d63108a4b4 Add basic provider stats (#4662)
* Add basic provider stats

* Add timeout counter

* Make stats() optional for providers (don't break what is out there)

* Update packages/rpc-provider/src/types.ts
2022-03-17 17:33:40 +02:00
github-actions[bot] 5898ac335e [CI Skip] release/beta 7.12.2-2
skip-checks: true
2022-03-17 08:24:12 +00:00
Jaco f108d16d1b RPC timeouts (#4661)
* RPC timeouts

* for loop
2022-03-17 10:14:26 +02:00
github-actions[bot] 32f1495993 [CI Skip] release/beta 7.12.2-1
skip-checks: true
2022-03-17 05:45:53 +00:00
Jaco 2527497e4a Bump dev deps (#4658)
* Bump dev deps

* trigger
2022-03-17 07:37:40 +02:00
github-actions[bot] e50209da0d [CI Skip] release/beta 7.12.2-0
skip-checks: true
2022-03-15 06:28:29 +00:00
Noah Corona cccd512d70 Add rpc error fields (#4637)
* [WIP] Add RpcError

Currently located in rpc-core at request of maintainer. However unclear as to how it should be used, because the error
needs to be thrown in rpc-provider, and depending on it causes a dependency loop.

* Move `RpcError` to `rpc-provider`

Also add tests
2022-03-15 08:20:16 +02:00
github-actions[bot] 1db2136a3d [CI Skip] release/stable 7.12.1
skip-checks: true
2022-03-13 09:50:36 +00:00
Jaco 466485d5aa 7.12.1 (#4653) 2022-03-13 11:39:47 +02:00
github-actions[bot] c9ea333add [CI Skip] release/beta 7.11.2-8
skip-checks: true
2022-03-12 10:15:28 +00:00
Jaco dca62cf3ba Bump common (#4652) 2022-03-12 12:06:50 +02:00
github-actions[bot] 2d9e667d01 [CI Skip] release/beta 7.11.2-7
skip-checks: true
2022-03-11 12:02:08 +00:00
Jaco 67679f34e9 Align CHANGELOG (#4650)
* Align CHANGELOG

* Typos
2022-03-11 13:54:11 +02:00
github-actions[bot] d646fa03af [CI Skip] release/beta 7.11.2-6
skip-checks: true
2022-03-11 06:17:48 +00:00
Jaco 6c33e98553 Ensure Option<None> of different type evaluates to None (#4647) 2022-03-11 08:09:21 +02:00
github-actions[bot] e8cdbf9e80 [CI Skip] release/beta 7.11.2-5
skip-checks: true
2022-03-10 18:51:25 +00:00
Jaco 5016e12ae4 Fix conversion of metadata prior to <= V11 to V14 (#4646) 2022-03-10 20:41:09 +02:00
github-actions[bot] ac09179768 [CI Skip] release/beta 7.11.2-4
skip-checks: true
2022-03-10 08:08:05 +00:00
Jaco 8cc1663bd8 Bump deps (#4644) 2022-03-10 09:57:55 +02:00
github-actions[bot] 34d090c9b3 [CI Skip] release/beta 7.11.2-3
skip-checks: true
2022-03-09 11:37:47 +00:00
Jaco cb1d13e04c Add lookup types to the registry (#4642)
* Add lookup types to the registry

* Adjust
2022-03-09 13:29:31 +02:00
github-actions[bot] 022d79c4cd [CI Skip] release/beta 7.11.2-2
skip-checks: true
2022-03-09 09:53:38 +00:00
Jaco ed079a6acb Adjust registry augment location (#4641) 2022-03-09 11:44:54 +02:00
github-actions[bot] 01d023d141 [CI Skip] release/beta 7.11.2-1
skip-checks: true
2022-03-08 11:08:05 +00:00
Jaco 0b03f73975 Allow for (ab)use of Option<Null>/Option<()> as a boolean (#4639)
* Allow for (ab)use of Option<Null> as a boolean

* Additional test for ()

* Adjust
2022-03-08 12:58:33 +02:00
github-actions[bot] e4cae64187 [CI Skip] release/beta 7.11.2-0
skip-checks: true
2022-03-07 08:22:49 +00:00
Jaco f13989d712 Support bundlers where import.meta.url is undefined (#4634) 2022-03-07 10:13:02 +02:00
github-actions[bot] 05c3f12cd7 [CI Skip] release/stable 7.11.1
skip-checks: true
2022-03-06 16:38:04 +00:00
Jaco 9f6f33844a 7.11.1 (#4631)
* 7.11.1

* packageInfo

* Robustness
2022-03-06 18:30:20 +02:00
github-actions[bot] 895f82920d [CI Skip] release/beta 7.10.2-10
skip-checks: true
2022-03-06 09:24:51 +00:00
Jaco 06fa4aa6eb Allow use of options.signer for status updates (#4615)
* Allow use of options.signer for status updates

* Use isFunction as applicable

* Use UpdateInfo

* CHANGELOG
2022-03-06 11:14:50 +02:00
github-actions[bot] 1e5002fb5e [CI Skip] release/beta 7.10.2-9
skip-checks: true
2022-03-06 08:36:08 +00:00
Jaco 8be52dec13 Apply chunking to era{Exposure, Prefs, Slashes} (#4620)
* Apply chunking to era{Exposure, Prefs, Slashes}

* CHANGELOG

* Failsafe return location

* typo
2022-03-06 10:26:43 +02:00
github-actions[bot] 8fcda8cd54 [CI Skip] release/beta 7.10.2-8
skip-checks: true
2022-03-06 08:02:44 +00:00
Jaco d08c306887 Bump metadata (#4630) 2022-03-06 09:54:02 +02:00
github-actions[bot] eb6b0232c3 [CI Skip] release/beta 7.10.2-7
skip-checks: true
2022-03-06 06:50:29 +00:00
Jaco e5fbaeb7cd Bump deps (#4629) 2022-03-06 08:42:51 +02:00
github-actions[bot] 8e61ea1b8b [CI Skip] release/beta 7.10.2-6
skip-checks: true
2022-03-04 10:32:35 +00:00
Jaco 9fe202a4d3 Add Polkadot 9170 upgrade block (#4627) 2022-03-04 12:24:43 +02:00
github-actions[bot] 6e62d03652 [CI Skip] release/beta 7.10.2-5
skip-checks: true
2022-03-04 07:51:56 +00:00
Jaco 49dc66f7d4 Adjust auto actions (#4626)
* Adjust auto actions

* Adjust
2022-03-04 09:43:58 +02:00
github-actions[bot] 22320f9995 [CI Skip] release/beta 7.10.2-4
skip-checks: true
2022-03-03 09:39:17 +00:00
Jaco 7603bad434 Remove checkout from auto-{approve, merge} actions (#4624) 2022-03-03 11:29:15 +02:00
github-actions[bot] e82f0f35ad [CI Skip] release/beta 7.10.2-3
skip-checks: true
2022-03-02 05:22:27 +00:00
Jaco ae0aa14eb8 Replace mergify with action (#4619) 2022-03-02 07:14:42 +02:00
github-actions[bot] 4875bb9990 [CI Skip] release/beta 7.10.2-2
skip-checks: true
2022-03-01 11:16:01 +00:00
Jacoandmergify[bot] a0308dd25a Bump TS (#4616)
* Bump TS

* Adjust

* Adjust Observable Codec returns

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-01 11:08:20 +00:00
github-actions[bot] edb06d971a [CI Skip] release/beta 7.10.2-1
skip-checks: true
2022-02-28 10:44:59 +00:00
Jacoandmergify[bot] 271a4d8fd7 Kusama 9170 upgrade block (#4613)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-28 10:26:56 +00:00
github-actions[bot] a71e5ad95c [CI Skip] release/beta 7.10.2-0
skip-checks: true
2022-02-28 07:34:42 +00:00
Jaco edcdb70e8a Adjust approve workflow (#4612) 2022-02-28 07:13:43 +00:00
github-actions[bot] 17357f6b99 [CI Skip] release/stable 7.10.1
skip-checks: true
2022-02-27 08:04:03 +00:00
Jaco c596a8cb51 7.10.1 (#4609) 2022-02-27 09:42:16 +02:00
github-actions[bot] bdf13b10e5 [CI Skip] release/beta 7.9.2-12
skip-checks: true
2022-02-27 07:15:02 +00:00
coolcorexixandphat.itern 519a12f19a Investigate 4559 v2 (#4608)
* first build

* second build, area of defect found

* third build, fixed the problem successfully

* cleaning up after receving maintainer's response

Co-authored-by: phat.itern <phatNfqAsia>
2022-02-27 08:50:54 +02:00
github-actions[bot] beffc7b754 [CI Skip] release/beta 7.9.2-11
skip-checks: true
2022-02-26 08:51:00 +00:00
Jaco d5ae7031cd Metadata bump (#4606)
* Metadata bump

* Detect BitSequence order

* Adjust
2022-02-26 10:29:41 +02:00
github-actions[bot] 8aff13b827 [CI Skip] release/beta 7.9.2-10
skip-checks: true
2022-02-25 11:03:13 +00:00
Jaco a23b3f953b Retrieve named reserves (#4602) 2022-02-25 12:40:35 +02:00
github-actions[bot] 1249c46019 [CI Skip] release/beta 7.9.2-9
skip-checks: true
2022-02-24 18:44:58 +00:00
Jaco 2aaf52bb92 Use assertUnreachable from @polkadot/util (#4600) 2022-02-24 18:28:34 +00:00
github-actions[bot] 3372898f82 [CI Skip] release/beta 7.9.2-8
skip-checks: true
2022-02-24 06:38:41 +00:00
Jacoandmergify[bot] ed2f512cfc Don't auto-attach lookup to registry (#4599)
* Don't auto-attach lookup to registry

* CHANGELOG

* Add base u* types

* s/compatTypes/specs/

* CHANGELOG

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-24 06:31:06 +00:00
github-actions[bot] 00147df500 [CI Skip] release/beta 7.9.2-7
skip-checks: true
2022-02-24 05:52:26 +00:00
Jacoandmergify[bot] 3b0c8887d7 Add chain.getBlockByNumber (#4598)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-24 05:42:58 +00:00
github-actions[bot] 16452233b2 [CI Skip] release/beta 7.9.2-6
skip-checks: true
2022-02-23 10:43:52 +00:00
Jaco 5bf87262bc Skip job on non-local repo 2022-02-23 12:33:41 +02:00
github-actions[bot] b8e01fd674 [CI Skip] release/beta 7.9.2-5
skip-checks: true
2022-02-23 10:09:24 +00:00
Jaco f8378ba0f7 Use jacogr/action-approve (#4595) 2022-02-23 12:00:15 +02:00
github-actions[bot] afc105400c [CI Skip] release/beta 7.9.2-4
skip-checks: true
2022-02-22 17:27:21 +00:00
Jaco cca1f10563 XcmV2TraitsOutcome test (#4593)
* XcmV2TraitsOutcome test

* Cleanup build with correct references
2022-02-22 17:19:28 +00:00
github-actions[bot] 6cdbbf5372 [CI Skip] release/beta 7.9.2-3
skip-checks: true
2022-02-22 10:06:24 +00:00
Jaco 8c89732eb7 Decoded storage hashers with primary lookup (#4591) 2022-02-22 09:58:36 +00:00
github-actions[bot] ab3ad6b2ca [CI Skip] release/beta 7.9.2-2
skip-checks: true
2022-02-22 09:01:10 +00:00
Jaco 72f427a250 Map initialU8aLength test (#4590) 2022-02-22 08:51:40 +00:00
github-actions[bot] 5b0bd9d4b7 [CI Skip] release/beta 7.9.2-1
skip-checks: true
2022-02-21 18:14:49 +00:00
Jacoandmergify[bot] cd9662ab4c Ensure BTreeSet has the correct decoded length (#4588)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-21 18:07:11 +00:00
github-actions[bot] 13751b6fdf [CI Skip] release/beta 7.9.2-0
skip-checks: true
2022-02-21 10:38:39 +00:00
Jaco 652f8c28a4 Bump dev (#4585) 2022-02-21 10:30:49 +00:00
github-actions[bot] 0bae9138b8 [CI Skip] release/stable 7.9.1
skip-checks: true
2022-02-20 15:23:37 +00:00
Jaco 98e8cac424 7.9.1 (#4580) 2022-02-20 17:15:17 +02:00
github-actions[bot] dca7f208bc [CI Skip] release/beta 7.8.2-9
skip-checks: true
2022-02-20 06:44:31 +00:00
Jacoandmergify[bot] 67ff12885a Align CHANGELOG (#4579)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-20 06:35:03 +00:00
github-actions[bot] 08c53032eb [CI Skip] release/beta 7.8.2-8
skip-checks: true
2022-02-20 06:00:20 +00:00
Scott TwinameandJaco 5da8f21947 Add support for historical BlockNumber rpc methods (#4574)
* Add support for historical BlockNumber rpc methods

* Update function description

* Apply suggestions from code review

Co-authored-by: Jaco <jacogr@gmail.com>
2022-02-20 07:50:41 +02:00
github-actions[bot] 5080b266a0 [CI Skip] release/beta 7.8.2-7
skip-checks: true
2022-02-19 06:51:06 +00:00
Jaco 0186848936 Convert ExactDerive to interface (#4578) 2022-02-19 06:41:12 +00:00
github-actions[bot] d0de35b05b [CI Skip] release/beta 7.8.2-6
skip-checks: true
2022-02-18 08:42:41 +00:00
Jaco 3ded30a0f3 Bump static metadata (#4575)
* Bump static metadata

* previous incarnation of trieIndex
2022-02-18 08:30:55 +00:00
github-actions[bot] 9fef78c5e1 [CI Skip] release/beta 7.8.2-5
skip-checks: true
2022-02-17 10:28:47 +00:00
Jaco b2a7c453c4 Align grandpa_proveFinality with Substrate (#4573) 2022-02-17 10:19:24 +00:00
github-actions[bot] 030258a671 [CI Skip] release/beta 7.8.2-4
skip-checks: true
2022-02-17 06:12:57 +00:00
Scott Twiname 0a85b4839d Fix getting block registry when historical type isn't BlockHash (#4571)
* Fix getting block registry when historical type isn't BlockHash

* Revert change, remove isHistoric from historical BlockNumber fields
2022-02-17 08:05:06 +02:00
github-actions[bot] ad363bac09 [CI Skip] release/beta 7.8.2-3
skip-checks: true
2022-02-16 08:32:56 +00:00
Jaco e0c0a8c583 Bump deps (#4568) 2022-02-16 08:23:40 +00:00
github-actions[bot] f923a31758 [CI Skip] release/beta 7.8.2-2
skip-checks: true
2022-02-15 18:32:20 +00:00
Jaco 416229d976 Bump deps (#4567) 2022-02-15 18:20:37 +00:00
github-actions[bot] 4380c45f17 [CI Skip] release/beta 7.8.2-1
skip-checks: true
2022-02-15 07:53:05 +00:00
Jaco d481aed8cb Add mergify (#4566) 2022-02-15 09:45:10 +02:00
github-actions[bot] ca25983e3e [CI Skip] release/beta 7.8.2-0
skip-checks: true
2022-02-14 15:08:31 +00:00
Jaco f7caa496e4 Kusama 9160 upgrade block (#4565) 2022-02-14 17:00:05 +02:00
github-actions[bot] 3f8e4ce133 [CI Skip] release/stable 7.8.1
skip-checks: true
2022-02-14 12:55:48 +00:00
Jaco 39c99083bc 7.8.1 (#4564) 2022-02-14 14:46:24 +02:00
github-actions[bot] 46aa427f98 [CI Skip] release/beta 7.7.2-17
skip-checks: true
2022-02-14 05:51:41 +00:00
Jaco 6336fc0787 Bump common (#4563) 2022-02-14 07:43:13 +02:00
github-actions[bot] b0532be7df [CI Skip] release/beta 7.7.2-16
skip-checks: true
2022-02-13 12:55:58 +00:00
Jaco e7a5b015e9 Don't run scripts on CI (#4562) 2022-02-13 14:47:33 +02:00
github-actions[bot] 2f07f18a5a [CI Skip] release/beta 7.7.2-15
skip-checks: true
2022-02-11 07:49:46 +00:00
Jaco c92d5b7eb0 Bump metadata (#4558) 2022-02-11 09:40:07 +02:00
github-actions[bot] e340a99eda [CI Skip] release/beta 7.7.2-14
skip-checks: true
2022-02-10 08:29:28 +00:00
Jaco f169ca08a8 Expose txIndex on extrinsic results (#4556)
* Expose txIndex on extrinsic results

* CHANGELOG

* optional txIndex

* Adjust result
2022-02-10 10:20:57 +02:00
github-actions[bot] 898d1593f3 [CI Skip] release/beta 7.7.2-13
skip-checks: true
2022-02-09 18:38:12 +00:00
Keith Ingram 2c8d9563c4 Update contract types and rpc (#4541)
* Update contract types and rpc

* Corrected InstantiateReturnValue

* enum, set fallbacks

* set definition

* underscore
2022-02-09 20:29:43 +02:00
github-actions[bot] 804c0c4887 [CI Skip] release/beta 7.7.2-12
skip-checks: true
2022-02-09 12:11:11 +00:00
Jaco 3b991ce8c7 Ensure camelCase names appear in inspect (#4554) 2022-02-09 14:01:47 +02:00
github-actions[bot] e66cc0fb45 [CI Skip] release/beta 7.7.2-11
skip-checks: true
2022-02-09 10:20:46 +00:00
Jaco 61daa0f2c8 Adjust inspect inner/outer (#4553) 2022-02-09 12:11:53 +02:00
github-actions[bot] 7af315f278 [CI Skip] release/beta 7.7.2-10
skip-checks: true
2022-02-09 08:29:19 +00:00
Jaco e55661ca34 Bump util (#4552) 2022-02-09 10:20:38 +02:00
github-actions[bot] 097a1748fd [CI Skip] release/beta 7.7.2-9
skip-checks: true
2022-02-09 06:19:32 +00:00
Jaco 9c587d378e Bump dev (#4551) 2022-02-09 08:09:28 +02:00
github-actions[bot] 02f99356aa [CI Skip] release/beta 7.7.2-8
skip-checks: true
2022-02-08 16:27:10 +00:00
Jaco cacacec130 Codec.inspect (#4538)
* Codec.inspect

* Additional

* Adjust

* LookupSource

* Some tests

* All base tests

* Tests for BTree{Map, Set}

* Additional tests

* All extended type tests

* Additional

* Native tests

* Adjust

* Struct with names
2022-02-08 18:18:31 +02:00
github-actions[bot] 6d095a042f [CI Skip] release/beta 7.7.2-7
skip-checks: true
2022-02-08 13:41:15 +00:00
Jaco b022ad3154 Bump dev (#4548) 2022-02-08 15:33:06 +02:00
github-actions[bot] e0129aa02e [CI Skip] release/beta 7.7.2-6
skip-checks: true
2022-02-08 12:28:09 +00:00
Jaco dfc200a25a Wrap storage inspect in hasher function (#4547) 2022-02-08 14:18:17 +02:00
github-actions[bot] 85fdbed227 [CI Skip] release/beta 7.7.2-5
skip-checks: true
2022-02-08 11:16:59 +00:00
Jaco 04a23c0f60 Extract the arg types (#4546) 2022-02-08 13:08:29 +02:00
github-actions[bot] 0bf9eb2f3a [CI Skip] release/beta 7.7.2-4
skip-checks: true
2022-02-08 10:43:13 +00:00
Jaco f13462f7cf Add inspect(...args) to storage (#4545) 2022-02-08 12:34:01 +02:00
github-actions[bot] 0754bc45d3 [CI Skip] release/beta 7.7.2-3
skip-checks: true
2022-02-08 07:52:43 +00:00
Jaco e314f51813 Re-enable BitVec tests (#4543)
* Re-enable BitVec tests

* CHANGELOG
2022-02-08 09:42:24 +02:00
github-actions[bot] 5148bc42ae [CI Skip] release/beta 7.7.2-2
skip-checks: true
2022-02-08 04:50:29 +00:00
Scott Twiname b43c848817 Fix isHistorical to isHistoric (#4540) 2022-02-08 06:42:32 +02:00
github-actions[bot] abd2b58b52 [CI Skip] release/beta 7.7.2-1
skip-checks: true
2022-02-07 21:14:51 +00:00
Scott Twiname 2ce1decd99 Add isHistorical field to relevant eth rpc requests (#4539)
Adds `isHistorical` to `BlockNumber` parameters for eth rpc requests that support querying at a point in time.
2022-02-07 23:04:59 +02:00
github-actions[bot] f8112735af [CI Skip] release/beta 7.7.2-0
skip-checks: true
2022-02-07 10:54:52 +00:00
Jaco 455a8d2a91 Adjust map header output type with lookup (#4536)
* Adjust map header output type with lookup

* Adjust typings
2022-02-07 12:44:17 +02:00
github-actions[bot] ca692cc7c0 [CI Skip] release/stable 7.7.1
skip-checks: true
2022-02-06 07:05:44 +00:00
Jaco f5f5b540af 7.7.1 (#4535) 2022-02-06 08:56:28 +02:00
github-actions[bot] 8b3b1b4611 [CI Skip] release/beta 7.6.2-9
skip-checks: true
2022-02-05 20:05:06 +00:00
Jaco 21cb76e517 Bump dev (#4534) 2022-02-05 21:54:35 +02:00
github-actions[bot] d774a3c2ab [CI Skip] release/beta 7.6.2-8
skip-checks: true
2022-02-04 14:54:50 +00:00
Jaco 0c08e8ba9e Re-decorate all runtime endpoints (#4532) 2022-02-04 16:46:44 +02:00
github-actions[bot] c2549ec166 [CI Skip] release/beta 7.6.2-7
skip-checks: true
2022-02-04 12:28:12 +00:00
Jaco d27fce3b29 Bump deps (#4531) 2022-02-04 14:19:14 +02:00
github-actions[bot] 849588e305 [CI Skip] release/beta 7.6.2-6
skip-checks: true
2022-02-03 14:50:08 +00:00
Jaco 4f3fedc27e beefy_getFinalizedHead (#4530) 2022-02-03 16:42:00 +02:00
github-actions[bot] 57a5892f99 [CI Skip] release/beta 7.6.2-5
skip-checks: true
2022-02-03 10:52:43 +00:00
Jaco f5499ca4ed Don't show Call/Event extract warning pre-v14 (#4528) 2022-02-03 12:44:05 +02:00
github-actions[bot] 37ae595f03 [CI Skip] release/beta 7.6.2-4
skip-checks: true
2022-02-03 10:39:21 +00:00
Jaco 868a4a2964 Bump metadata (#4527) 2022-02-03 12:30:18 +02:00
github-actions[bot] 3656480cff [CI Skip] release/beta 7.6.2-3
skip-checks: true
2022-02-03 09:24:49 +00:00
Jaco 37cf4b5e88 Explicit class cache clear (#4523)
* Explicit class cache clear

* Re-register defaults

* Track knownDefaults in getters

* get ordering
2022-02-03 11:14:43 +02:00
github-actions[bot] 75a4e7b5d7 [CI Skip] release/beta 7.6.2-2
skip-checks: true
2022-02-03 09:02:59 +00:00
Jaco 12d6cf8a5b Don't want on resolvable Lookup* types (#4524) 2022-02-03 10:54:22 +02:00
github-actions[bot] aa7e5ea601 [CI Skip] release/beta 7.6.2-1
skip-checks: true
2022-02-02 14:54:43 +00:00
Gérard Dethier 9f5232019e Fix LRUCache memory leak. (#4520) 2022-02-02 16:46:28 +02:00
github-actions[bot] 3063763a18 [CI Skip] release/beta 7.6.2-0
skip-checks: true
2022-02-02 09:38:40 +00:00
Jaco b76f9e7e21 Adjust runtime upgrade init (#4519) 2022-02-02 11:30:25 +02:00
github-actions[bot] 558636b6b0 [CI Skip] release/stable 7.6.1
skip-checks: true
2022-01-30 05:32:32 +00:00
Jaco 8b92772b2f 7.6.1 (#4515) 2022-01-30 07:21:26 +02:00
github-actions[bot] cf0881f704 [CI Skip] release/beta 7.5.2-11
skip-checks: true
2022-01-29 15:43:58 +00:00
Jaco 1adc17b598 Workaround for regenerator runtime + private callback (#4514)
* Workaround for regenerator runtime + private callback

* CHANGELOG
2022-01-29 17:34:35 +02:00
github-actions[bot] a55256a247 [CI Skip] release/beta 7.5.2-10
skip-checks: true
2022-01-29 11:02:51 +00:00
Jaco faaa4e9480 CHANGELOG update (#4512) 2022-01-29 12:52:53 +02:00
github-actions[bot] ba52ab450e [CI Skip] release/beta 7.5.2-9
skip-checks: true
2022-01-29 10:49:04 +00:00
r0t0r-r0t0r 0660d0cf15 Fix memory leak on raw rpc call (#4505)
* Fix memory leak on raw rpc call

While processing a raw rpc call an observable is removed from the wrong cache. It causes a memory leak.

* Fix memory leak on raw rpc subscription, fix types

Fixed similar memory leak on raw rpc subscription.
Also added proper type declaration for the return value of the _memomize function to address build error.
2022-01-29 12:41:02 +02:00
Jaco fa1a3315f8 Bump deps (#4511) 2022-01-29 12:30:48 +02:00
github-actions[bot] 5f281b07fe [CI Skip] release/beta 7.5.2-8
skip-checks: true
2022-01-27 07:27:58 +00:00
Jaco e5bc2601cc Add support for rpc.contracts.uploadCode (#4508) 2022-01-27 09:18:51 +02:00
github-actions[bot] 6132a34333 [CI Skip] release/beta 7.5.2-7
skip-checks: true
2022-01-26 16:14:58 +00:00
Jaco 697e6d8b8b Exhaustive TypeDefInfo handling in extractType (#4506) 2022-01-26 18:06:18 +02:00
github-actions[bot] 33c4d82293 [CI Skip] release/beta 7.5.2-6
skip-checks: true
2022-01-26 09:00:43 +00:00
Jaco c46e0e9d5b Adjust bounty derive, empty on no {treasury, bounties}.bounties (#4503) 2022-01-26 10:51:24 +02:00
github-actions[bot] 4b9f987203 [CI Skip] release/beta 7.5.2-5
skip-checks: true
2022-01-25 15:13:05 +00:00
Jaco a650ae195e Non-aliased CallEvent type extraction (#4502)
* Non-aliased CallEvent type extraction

* Update packages/types/src/metadata/PortableRegistry/PortableRegistry.ts
2022-01-25 17:01:57 +02:00
github-actions[bot] 0dca7bacc2 [CI Skip] release/beta 7.5.2-4
skip-checks: true
2022-01-25 11:00:20 +00:00
Jaco 87f79151b4 Bump static metadata (#4499) 2022-01-25 12:52:00 +02:00
github-actions[bot] 480ae203b4 [CI Skip] release/beta 7.5.2-3
skip-checks: true
2022-01-25 07:05:28 +00:00
Jaco c4427c0497 Emit decorated event on API (incl. upgrades) (#4497) 2022-01-25 08:57:08 +02:00
github-actions[bot] f130f55167 [CI Skip] release/beta 7.5.2-2
skip-checks: true
2022-01-25 06:20:10 +00:00
Jaco 2009483542 Adjust SlotRange to 36 entries (with older 10-count version) (#4495)
* Adjust SlotRange to 36 entries (with older 10-count version)

* Fix tuple

* Adjust
2022-01-25 08:09:53 +02:00
github-actions[bot] ca50309554 [CI Skip] release/beta 7.5.2-1
skip-checks: true
2022-01-24 06:57:53 +00:00
Jaco db5b0986c4 Align Range/RangeInclusive handling with other definitions (#4489)
* Align Range/RangeInclusive handling with other definitions

* Split RangeInclusive class

* Rnage -> Range TypeDef

* Correct Range wrappers

* CHANGELOG

* Remove extra Range CHANGELOG entry

* Update CHANGELOG.md
2022-01-24 08:46:35 +02:00
github-actions[bot] b94cf566c9 [CI Skip] release/beta 7.5.2-0
skip-checks: true
2022-01-24 06:23:53 +00:00
Jaco ff24cec841 Dedupe WrapperOpaque classes (#4479)
* Dedupe WrapperOpaque classes

* Keep WrapperOpaque in own file
2022-01-24 08:13:08 +02:00
github-actions[bot] e16d20e996 [CI Skip] release/stable 7.5.1
skip-checks: true
2022-01-23 07:31:32 +00:00
Jaco bfab0f8538 7.5.1 (#4492) 2022-01-23 09:23:22 +02:00
github-actions[bot] 4752a98456 [CI Skip] release/beta 7.4.2-17
skip-checks: true
2022-01-23 07:09:01 +00:00
Jaco e63a3ec6a9 Bump common to 8.3.3 (#4491) 2022-01-23 08:59:11 +02:00
github-actions[bot] 4dc30d7d98 [CI Skip] release/beta 7.4.2-16
skip-checks: true
2022-01-22 12:08:56 +00:00
Jaco 71f6825b00 Bump deps (#4490) 2022-01-22 13:59:34 +02:00
github-actions[bot] d56b0bfccc [CI Skip] release/beta 7.4.2-15
skip-checks: true
2022-01-21 14:07:06 +00:00
Jaco 39ff956076 Expose constructoir meta on Blueprint/Code (#4486) 2022-01-21 15:56:27 +02:00
github-actions[bot] faa22fc634 [CI Skip] release/beta 7.4.2-14
skip-checks: true
2022-01-21 11:51:41 +00:00
Jaco f5ce395371 Expose contract.{query, tx}.method.meta (#4485) 2022-01-21 13:40:21 +02:00
github-actions[bot] b986d4cb5d [CI Skip] release/beta 7.4.2-13
skip-checks: true
2022-01-20 07:39:34 +00:00
Jaco 9c39cd9255 Add .multi support on api.at(...).<section>.<method> (#4478) 2022-01-20 09:30:24 +02:00
github-actions[bot] 43e2c44ac1 [CI Skip] release/beta 7.4.2-12
skip-checks: true
2022-01-20 07:12:40 +00:00
Jaco 3507a74d60 Correct V0/V1 contract def, adjust namespace tests (#4477)
* Correct V0/V1 contract def, adjust namespace tests

* Some failures

* V0 -> V1 conversion with name as Text[]

* CHANGELOG
2022-01-20 09:01:17 +02:00
Oleksandr MykhailenkoandJaco 97797d64f1 Add more complex namespaced contracts & test cases for them (#4472)
* Add more complex namespaced contracts & test cases for them.

* Apply suggestions from code review

* Update packages/api-contract/src/Abi/toLatest.spec.ts

Co-authored-by: Jaco <jacogr@gmail.com>
2022-01-20 08:01:12 +02:00
github-actions[bot] 88d7207102 [CI Skip] release/beta 7.4.2-11
skip-checks: true
2022-01-19 13:16:28 +00:00
Jaco 1616b014b3 Contract meta v1 name to v2 label w/ :: (#4471) 2022-01-19 15:08:28 +02:00
github-actions[bot] c20538f6f7 [CI Skip] release/beta 7.4.2-10
skip-checks: true
2022-01-19 11:34:55 +00:00
Jaco e77c2dd78c Contracts metadata v3 test data (#4470)
* Contracts metadata v3 test data

* Reformat
2022-01-19 13:25:35 +02:00
github-actions[bot] 6e7ce901ab [CI Skip] release/beta 7.4.2-9
skip-checks: true
2022-01-19 06:01:42 +00:00
Jaco 3396ed6010 Fix storage metadata (#4467) 2022-01-19 07:52:06 +02:00
github-actions[bot] 09ec89ae62 [CI Skip] release/beta 7.4.2-8
skip-checks: true
2022-01-19 05:29:50 +00:00
Jaco a7d78ff6eb Polkadot 9151 upgrade block (#4466) 2022-01-19 07:20:07 +02:00
github-actions[bot] 868043a22b [CI Skip] release/beta 7.4.2-7
skip-checks: true
2022-01-18 14:03:44 +00:00
Jaco 0310582056 Bump static metadata (#4464) 2022-01-18 15:54:48 +02:00
github-actions[bot] 629b9b486e [CI Skip] release/beta 7.4.2-6
skip-checks: true
2022-01-18 11:03:24 +00:00
Jaco 500e2022c3 Augment Registry (w/o CodecRegistry & CreateRegistry) (#4463)
* Augment Registry (w/o CodecRegistry & CreateRegistry)

* Build fixes

* Final build fixes

* licence headers
2022-01-18 12:52:01 +02:00
github-actions[bot] f8c2701751 [CI Skip] release/beta 7.4.2-5
skip-checks: true
2022-01-18 08:59:45 +00:00
Jaco d70ef05b54 CHANGELOG with 7.0.1 FAQ entry (+ some typos) (#4462) 2022-01-18 10:51:24 +02:00
github-actions[bot] 4b1d4c7335 [CI Skip] release/beta 7.4.2-4
skip-checks: true
2022-01-18 06:10:18 +00:00
Jaco c79939e650 Kusama 9151 upgrade block (#4461)
* Kusama 9151 upgrade block

* Update CHANGELOG.md
2022-01-18 07:59:59 +02:00
github-actions[bot] 8f298ba2a0 [CI Skip] release/beta 7.4.2-3
skip-checks: true
2022-01-18 05:45:38 +00:00
Jaco da6311d584 Replace usage of exportType in typegen (#4460) 2022-01-18 07:36:30 +02:00
github-actions[bot] d589adf208 [CI Skip] release/beta 7.4.2-2
skip-checks: true
2022-01-18 05:35:44 +00:00
Jaco dfbfaf12eb Support for ink! metadata v3 (#4432)
* Support for ink! metadata v3

* Flatten check for V1-V3

* DRY-er is/as conversions

* Test for v2 conversion

* Remove stray console.log

* Generic converter

* Cleanups
2022-01-18 07:27:10 +02:00
github-actions[bot] 91989e1a2b [CI Skip] release/beta 7.4.2-1
skip-checks: true
2022-01-17 10:23:48 +00:00
Jaco 86c2a96ed4 Reformat root tsconfig.build.json (#4459) 2022-01-17 12:12:31 +02:00
github-actions[bot] 9f3dab39c0 [CI Skip] release/beta 7.4.2-0
skip-checks: true
2022-01-17 06:43:15 +00:00
Jaco a02687c9fb Bump deps (#4457) 2022-01-17 08:35:06 +02:00
github-actions[bot] 80399fefcd [CI Skip] release/stable 7.4.1
skip-checks: true
2022-01-15 19:08:46 +00:00
Jaco ff9a0b3d44 7.4.1 (#4454)
* 7.4.1

* CHANGELOG
2022-01-15 21:00:41 +02:00
github-actions[bot] 8df82af638 [CI Skip] release/beta 7.3.2-9
skip-checks: true
2022-01-14 15:38:40 +00:00
Jaco ddfcc5624c Add Kusama 9150 upgrade block (#4449) 2022-01-14 17:29:01 +02:00
github-actions[bot] 7b08fbb695 [CI Skip] release/beta 7.3.2-8
skip-checks: true
2022-01-14 10:29:41 +00:00
Jaco 07d85783d8 Manual format of tsconfig.build.json (#4447) 2022-01-14 12:18:57 +02:00
github-actions[bot] f0d6fc0167 [CI Skip] release/beta 7.3.2-7
skip-checks: true
2022-01-13 08:17:43 +00:00
Jaco 7b085307f8 Update .mailmap 2022-01-13 10:07:16 +02:00
github-actions[bot] e22a38dd9c [CI Skip] release/beta 7.3.2-6
skip-checks: true
2022-01-12 08:53:34 +00:00
Jaco 2ceb727ee6 Update to tsconfig.build.json inside packages (#4444)
* Update to tsconfig.build.json inside packages

* Update refs
2022-01-12 10:44:56 +02:00
github-actions[bot] bc4e656745 [CI Skip] release/beta 7.3.2-5
skip-checks: true
2022-01-12 05:41:50 +00:00
Jaco 6d2b3b8463 Bump dev (w/ contrib update) (#4442) 2022-01-12 07:33:39 +02:00
github-actions[bot] 5369b6cb10 [CI Skip] release/beta 7.3.2-4
skip-checks: true
2022-01-11 14:22:33 +00:00
Jaco 53fd71b732 Mini-extracted test for Range values (#4441) 2022-01-11 16:14:26 +02:00
github-actions[bot] 63e38b3d1c [CI Skip] release/beta 7.3.2-3
skip-checks: true
2022-01-11 07:00:04 +00:00
Jaco cd98ac65f3 Add tsconfig.build.json (#4440) 2022-01-11 08:51:54 +02:00
github-actions[bot] 7bd0819cbb [CI Skip] release/beta 7.3.2-2
skip-checks: true
2022-01-11 05:44:03 +00:00
Jaco e84c2a5180 Asserts for number formats (#4439)
* Asserts for number formats

* Test for Compact (used base format asserts)

* Lint fixes
2022-01-11 07:33:25 +02:00
github-actions[bot] aabf4b3e45 [CI Skip] release/beta 7.3.2-1
skip-checks: true
2022-01-10 16:27:00 +00:00
Jaco 0f67d3e54d Ensure Range/RangeInclusive variant check does not fail on encoding (#4437) 2022-01-10 18:19:23 +02:00
github-actions[bot] 8cbc36550b [CI Skip] release/beta 7.3.2-0
skip-checks: true
2022-01-10 08:30:42 +00:00
Jaco 25c46f2a0d Ensure non-option calls in api-contract are marked as @deprecated (#4433) 2022-01-10 10:21:06 +02:00
github-actions[bot] f7124f7d69 [CI Skip] release/stable 7.3.1
skip-checks: true
2022-01-09 16:09:32 +00:00
Jaco afe12e5293 7.3.1 (#4430) 2022-01-09 17:58:36 +02:00
github-actions[bot] 53c8952c66 [CI Skip] release/beta 7.2.2-11
skip-checks: true
2022-01-09 07:00:58 +00:00
Jaco 7478eb4fce Bump common (#4429) 2022-01-09 08:52:49 +02:00
github-actions[bot] bc7ee1a1da [CI Skip] release/beta 7.2.2-10
skip-checks: true
2022-01-08 07:54:12 +00:00
Jaco 1eb878a773 Treat WrapperKeepOpaque as wrapper (#4427)
* Treat WrapperKeepOpaque as wrapper

* Exapnsion on allowed Opaque types
2022-01-08 09:45:13 +02:00
github-actions[bot] ccef61070b [CI Skip] release/beta 7.2.2-9
skip-checks: true
2022-01-08 06:31:21 +00:00
Jaco 64300aa436 Metadata bump (#4425) 2022-01-08 08:23:09 +02:00
Jaco 5a3255bc59 Bump dev & common (#4426) 2022-01-08 08:22:44 +02:00
github-actions[bot] 800064a18c [CI Skip] release/beta 7.2.2-8
skip-checks: true
2022-01-07 12:59:31 +00:00
Jaco b1e8fcf16e Allow WrapperKeepOpaque as a wrapper (#4424) 2022-01-07 14:48:00 +02:00
github-actions[bot] a1843c8cf6 [CI Skip] release/beta 7.2.2-7
skip-checks: true
2022-01-07 10:45:47 +00:00
Jaco a9b0f97f74 Extend WrapperKeepOpaque with optional decoding (#4422)
* Extend WrapperKeepOpaque with optional decoding

* headers

* TypeDefInfo.WrapperKeepOpaque

* Rebuild

* CHANGELOG
2022-01-07 12:36:28 +02:00
github-actions[bot] 763e73138a [CI Skip] release/beta 7.2.2-6
skip-checks: true
2022-01-06 15:06:57 +00:00
Jaco e5103cd63f Bumps (common & dev, incl. CHANGELOG) (#4420)
* Bumps

* Bump dev & common

* Bumps
2022-01-06 16:58:29 +02:00
github-actions[bot] f606982bce [CI Skip] release/beta 7.2.2-5
skip-checks: true
2022-01-06 07:40:55 +00:00
Jaco 392d447b99 Adjust LRU historic size (clarify isCachable flag) (#4419) 2022-01-06 09:31:13 +02:00
github-actions[bot] 3a6c4a524a [CI Skip] release/beta 7.2.2-4
skip-checks: true
2022-01-05 09:07:25 +00:00
Jaco 014017104f Bump dev (w/ packageInfo adjustments) (#4417) 2022-01-05 10:57:42 +02:00
github-actions[bot] 026fb18933 [CI Skip] release/beta 7.2.2-3
skip-checks: true
2022-01-05 07:07:29 +00:00
Jaco 361b411dc5 Bump dev (#4416) 2022-01-05 08:59:06 +02:00
github-actions[bot] 011b0b4a88 [CI Skip] release/beta 7.2.2-2
skip-checks: true
2022-01-04 10:28:19 +00:00
Jaco 2798be0f1c fetch-depth 0 (#4413) 2022-01-04 12:18:44 +02:00
github-actions[bot] 03d7510ef6 [CI Skip] release/beta 7.2.2-1
skip-checks: true
2022-01-04 10:06:22 +00:00
Jaco e66704233c Bump dev (w/ CONTRIBUTORS & umd) (#4412) 2022-01-04 11:55:41 +02:00
github-actions[bot] 53eecf6220 [CI Skip] release/beta 7.2.2-0
skip-checks: true
2022-01-03 15:03:34 +00:00
Jaco 051fa6965a Bump dev (& header fix) (#4410) 2022-01-03 16:53:13 +02:00
github-actions[bot] c9edf77df3 [CI Skip] release/stable 7.2.1
skip-checks: true
2022-01-03 07:03:16 +00:00
Jaco c1c71a90e3 7.2.1 (#4409) 2022-01-03 08:53:53 +02:00
github-actions[bot] a21f321be9 [CI Skip] release/beta 7.1.2-8
skip-checks: true
2022-01-02 15:45:56 +00:00
Jaco 1d19c44a9b Correct @polkadot/rpc-augment (fromChain) (#4408) 2022-01-02 17:35:22 +02:00
github-actions[bot] 186e071f86 [CI Skip] release/beta 7.1.2-7
skip-checks: true
2022-01-01 16:43:56 +00:00
Jaco 6e52039e09 2022 (#4406) 2022-01-01 18:33:31 +02:00
github-actions[bot] 1b24fe963e [CI Skip] release/beta 7.1.2-6
skip-checks: true
2022-01-01 08:37:02 +00:00
Jaco dbf21d2654 Bump dev (#4405)
* Bump dev

* adjust
2022-01-01 10:26:39 +02:00
github-actions[bot] f8b54ddb45 [CI Skip] release/beta 7.1.2-5
skip-checks: true
2022-01-01 07:39:02 +00:00
Jaco 8ba4ed5377 2022 (#4404) 2022-01-01 09:28:18 +02:00
github-actions[bot] b1cb369209 [CI Skip] release/beta 7.1.2-4
skip-checks: true
2021-12-31 15:32:02 +00:00
Jaco 911b86d516 Introduce detectOther (#4403) 2021-12-31 17:24:14 +02:00
github-actions[bot] 29555e0d93 [CI Skip] release/beta 7.1.2-3
skip-checks: true
2021-12-31 09:51:11 +00:00
Jaco ecdbfd22d5 Mock __dirname (#4402) 2021-12-31 11:43:19 +02:00
github-actions[bot] 9c76bb2618 [CI Skip] release/beta 7.1.2-2
skip-checks: true
2021-12-31 08:05:00 +00:00
Jaco 5b1551983e Bump babel (#4401) 2021-12-31 09:57:01 +02:00
github-actions[bot] e22cc4206c [CI Skip] release/beta 7.1.2-1
skip-checks: true
2021-12-29 05:36:01 +00:00
Jaco 47a951be2a Bump deps (#4399) 2021-12-29 07:28:15 +02:00
github-actions[bot] fcc04e6e7e [CI Skip] release/beta 7.1.2-0
skip-checks: true
2021-12-27 11:06:16 +00:00
Jaco c6d330b91e Add set for contract ReturnFlags (#4397) 2021-12-27 12:56:54 +02:00
github-actions[bot] e16786a5f6 [CI Skip] release/stable 7.1.1
skip-checks: true
2021-12-26 08:41:55 +00:00
Jaco e388e473be 7.1.1 (#4396)
* 7.1.1

* Ensure all deps are fixed
2021-12-26 10:32:49 +02:00
github-actions[bot] 029c4d7f7f [CI Skip] release/beta 7.0.3-15
skip-checks: true
2021-12-26 08:12:45 +00:00
Jaco 5d6c2dd9f2 DRY cleanups for contracts (#4395) 2021-12-26 10:03:28 +02:00
github-actions[bot] ade5dc45d1 [CI Skip] release/beta 7.0.3-14
skip-checks: true
2021-12-25 10:22:06 +00:00
Jaco 8e578a643a Bump berry (#4394) 2021-12-25 12:14:04 +02:00
github-actions[bot] 8a67405fd7 [CI Skip] release/beta 7.0.3-13
skip-checks: true
2021-12-25 07:19:29 +00:00
Jaco 851bbe4cc6 Use assertReturn as applicable (#4393) 2021-12-25 09:09:13 +02:00
github-actions[bot] 0fec7506b7 [CI Skip] release/beta 7.0.3-12
skip-checks: true
2021-12-25 06:24:04 +00:00
Jaco 63b80b823e Metadata bump (#4392) 2021-12-25 08:16:30 +02:00
github-actions[bot] d3f9cdbec3 [CI Skip] release/beta 7.0.3-11
skip-checks: true
2021-12-24 14:49:31 +00:00
Jaco 6de4293f9f Remove @polkadot/ts dependency (#4391)
* Remove @polkadot/ts dependency

* Remove VoidCallback

* Bump dev
2021-12-24 16:42:12 +02:00
github-actions[bot] e1d2e2c7d5 [CI Skip] release/beta 7.0.3-10
skip-checks: true
2021-12-24 13:31:06 +00:00
Jaco 11f8cb6cfa Align types-augment with api-augment (#4390)
* Align types-augment with api-augment

* Adjust CHANGELOG

* Dependencies

* Definitions

* Adjust dependencies
2021-12-24 15:22:15 +02:00
github-actions[bot] 2f0fecf89b [CI Skip] release/beta 7.0.3-9
skip-checks: true
2021-12-24 12:08:09 +00:00
Jaco acfb193270 Provide polkadot/kusama augmentation (#4388)
* Provide polkadot/kusama augmentation

* Generate all

* Dev dump

* Build kusama/polkadot with no augmentation overlaps

* CHANGELOG
2021-12-24 14:01:05 +02:00
github-actions[bot] ccd4de824f [CI Skip] release/beta 7.0.3-8
skip-checks: true
2021-12-24 07:16:30 +00:00
Jaco 9800a3b55d Expose txHash on submittable results (#4387)
* Expose txHash on submittable results

* CHANGELOG

* CHANGELOG
2021-12-24 09:08:56 +02:00
github-actions[bot] 938eb7d390 [CI Skip] release/beta 7.0.3-7
skip-checks: true
2021-12-23 09:52:10 +00:00
Jaco d0b4542c94 Align query name generation (#4383) 2021-12-23 11:44:36 +02:00
github-actions[bot] bb2833ae51 [CI Skip] release/beta 7.0.3-6
skip-checks: true
2021-12-23 09:40:18 +00:00
Jaco cfff5b6be6 Dev w/ checks for tsconfig.spec.json (#4384)
* Dev w/ checks for tsconfig.spec.json

* bump
2021-12-23 11:30:19 +02:00
github-actions[bot] d29d1df84b [CI Skip] release/beta 7.0.3-5
skip-checks: true
2021-12-23 07:03:09 +00:00
Jaco 79cca97c03 Dev bump (w/ types key in export map) (#4382) 2021-12-23 08:55:32 +02:00
github-actions[bot] a807ab6b04 [CI Skip] release/beta 7.0.3-4
skip-checks: true
2021-12-22 14:37:03 +00:00
Jaco 517a4d1f09 Extended tsconfig lint cleanups (#4379) 2021-12-22 16:29:42 +02:00
github-actions[bot] e19eeb8a60 [CI Skip] release/beta 7.0.3-3
skip-checks: true
2021-12-22 09:45:51 +00:00
Jaco 1af5fb35bc Additional Option tests (#4378) 2021-12-22 11:35:45 +02:00
github-actions[bot] adbc1799a2 [CI Skip] release/beta 7.0.3-2
skip-checks: true
2021-12-22 07:20:59 +00:00
Jaco f51dbd7df9 Fix jest alias config (#4377)
* Fix jest alias config

* Dedupe
2021-12-22 09:12:02 +02:00
github-actions[bot] f11c8f9360 [CI Skip] release/beta 7.0.3-1
skip-checks: true
2021-12-21 17:11:21 +00:00
Jaco 46fdc22201 Split registry & lookup augmentation (#4376)
* Split registry & lookup augmentation

* Fix package path

* Adjust CC paths, fix detectPackage

* Adjust rollup config

* Adjust rollup in-process packages

* Re-adjust rollup (OCD...)
2021-12-21 19:02:38 +02:00
github-actions[bot] 2ba4233645 [CI Skip] release/beta 7.0.3-0
skip-checks: true
2021-12-21 11:18:15 +00:00
Keith Ingram a868233c2f Storage deposit limit changes (#4370) 2021-12-21 13:09:37 +02:00
907 changed files with 55436 additions and 15818 deletions
+5 -2
View File
@@ -1,4 +1,4 @@
39
40
1.4.2
1.6.2
@@ -47,4 +47,7 @@
6.10.2
6.10.3
7.0.2
7.0.2
7.14.2
7.14.3
+1
View File
@@ -20,6 +20,7 @@ exclude_patterns:
- "docs/**/*.js"
- "docs/**/*.ts"
- "packages/*-augment/"
- "packages/*-augment-*/"
- "packages/typegen/scripts"
- "packages/typegen/src"
- "packages/types/src/interfaces/"
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api authors & contributors
// Copyright 2017-2022 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
const base = require('@polkadot/dev/config/eslint.cjs');
+16
View File
@@ -0,0 +1,16 @@
name: bot
on:
pull_request:
types: [labeled]
jobs:
approve:
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && (!github.event.pull_request || github.event.pull_request.head.repo.full_name == github.repository)"
runs-on: ubuntu-latest
steps:
- uses: jacogr/action-approve@master
with:
authors: jacogr
labels: -auto
token: ${{ secrets.GH_PAT_BOT }}
+16
View File
@@ -0,0 +1,16 @@
name: bot
on:
pull_request:
types: [labeled]
jobs:
merge:
runs-on: ubuntu-latest
steps:
- uses: jacogr/action-merge@master
with:
checks: build,lint,test
labels: -auto
strategy: squash
token: ${{ secrets.GH_PAT_BOT }}
+2
View File
@@ -7,6 +7,8 @@ on:
jobs:
lock:
runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
steps:
- uses: dessant/lock-threads@v2
with:
+2
View File
@@ -8,6 +8,8 @@ jobs:
step: ['lint', 'test', 'build']
name: ${{ matrix.step }}
runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
steps:
- uses: actions/checkout@v2
- name: ${{ matrix.step }}
+7 -5
View File
@@ -12,16 +12,18 @@ jobs:
step: ['build:release']
name: ${{ matrix.step }}
runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
GH_PAT: ${{ secrets.GH_PAT }}
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.GH_PAT }}
- name: ${{ matrix.step }}
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
GH_PAT: ${{ secrets.GH_PAT }}
GH_RELEASE_GITHUB_API_TOKEN: ${{ secrets.GH_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn install --immutable | grep -v 'YN0013'
yarn ${{ matrix.step }}
+2
View File
@@ -9,6 +9,8 @@ jobs:
check:
if: "! startsWith(github.event.head_commit.message, '[CI Skip]') && (!github.event.pull_request || github.event.pull_request.head.repo.full_name == github.repository)"
runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
steps:
- uses: actions/checkout@v2
- uses: returntocorp/semgrep-action@v1
+2
View File
@@ -6,6 +6,8 @@ on:
jobs:
stale:
runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
steps:
- uses: actions/stale@v3
with:
+1
View File
@@ -6,6 +6,7 @@ docs/.vuepress/dist/
docs/substrate/*.md
node_modules/
tmp/
NOTES.md
.DS_Store
.env.local
.env.development.local
+3
View File
@@ -0,0 +1,3 @@
Jaco <jacogr@gmail.com>
github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> <action@github.com>
github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Github Actions <action@github.com>
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api authors & contributors
// Copyright 2017-2022 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
module.exports = require('@polkadot/dev/config/prettier.cjs');
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-631
View File
File diff suppressed because one or more lines are too long
+785
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -10,4 +10,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"
yarnPath: .yarn/releases/yarn-3.0.1.cjs
yarnPath: .yarn/releases/yarn-3.2.0.cjs
+251 -2
View File
@@ -1,5 +1,254 @@
# CHANGELOG
## 7.15.1 Apr 3, 2022
Contributed:
- Export `WellKnownChain` for `substrate-connect` (Thanks to https://github.com/josepot)
- Add support for `{entries, keys}Paged` in `.at` (Thanks to https://github.com/xlc)
- Align `WeightsPerClass` interface on `maxExtrinsic` (Thanks to https://github.com/HackFisher)
Changes:
- Cater for `DispatchError` with `error` as `[u8; 4]`
- Add in-flight cache for parallel same-version metadata queries
- Cater for lazy `@polkadot/util-crypto` init (adjustment for React Native)
- Update to latest Substrate, Kusama & Polkadot static metadata
- Update latest Westend & Kusama (up to 9180) upgrade blocks
## 7.14.3 Mar 28, 2022
Changes:
- Ensure `BitVec` with MSB does not fail (used in Polkadot `DeliveredMessages`)
## 7.14.2 Mar 28, 2022
Changes:
- Don't export `ScProvider` top-level in `@polkadot/rpc-provider`
## 7.14.1 Mar 27, 2022
Contributed:
- Add `ScProvider` for `@substrate/substrate-connect` (Thanks to https://github.com/josepot)
- Add support for `BTree{Map, Set}` in typegen (Thanks to https://github.com/CertainLach)
Changes:
- Only explicitly support LSB on `BitVec` types
- Change `toHuman()` on `BitVec` to output default LSB
- Add `bytes{Sent, Recv}` to provider stats
- Clear connection timout on provider `disconnect()`
- Add support for `dev_getBlockStats` RPC
## 7.13.1 Mar 19, 2022
**Important** This contains an upgraded version of `@polkadot/wasm-crypto`. For users of asm.js, e.g. React Native, there are some additional upgrade instructions in the release notes for this version https://github.com/polkadot-js/wasm/releases/tag/v5.0.1
Contributed:
- Expose custom RPC error details (Thanks to https://github.com/intendednull)
- Improve custom RPC error typings (Thanks to https://github.com/MOZGIII)
Changes:
- Support for rejection of hanging RPC requests (30s timeout)
- Add `.stats` to provider interfaces with running counters
- Add support for `state_trieMigrationStatus` RPC
- Update to latest Substrate, Kusama & Polkadot static metadata
- Update to `@polkadot/util` 8.6.1
- Additional workaround for Vite bundling
## 7.12.1 Mar 13, 2022
Changes:
- Allow for correct handling of `Option<Null>` types
- Adjust for bundlers where `import.meta.url` is undefined
- Update to `@polkadot/util` 8.5.1
## 7.11.1 Mar 6, 2022
Changes:
- Chunk derive retrieval of `era{Exposure, Prefs, Slashes}`
- Ensure that signer (passed via options) do get updated
- Kusama & Polkadot 9170 upgrade blocks
- Update to latest Substrate, Kusama & Polkadot static metadata
- Adjustments for TypeScript 7.6.2
## 7.10.1 Feb 27, 2022
Contributed:
- Ensure `updateId` is correct in signer callbacks (Thanks to https://github.com/coolcorexix)
Changes:
- Ensure `BTreeSet` has the correct decoded length
- Attach `PortableRegistry` at point of metadata set
- Add `derive.chain.getBlockByNumber`
- Retrieve named reserves in `derive.balances.all`
- Ensure `v13 -> v14` metadata conversion attaches primitives
- Update to latest Substrate, Kusama & Polkadot static metadata
## 7.9.1 Feb 20, 2022
Contributed:
- Support historic queries via blockNumber (Thanks to https://github.com/stwiname)
Changes:
- Align `grandpa_proveFinality` with Substrate
- Allow for derive augmentation (swap base type to interfaces)
- Kusama 9160 upgrade block
- Update to latest Substrate, Kusama & Polkadot static metadata
## 7.8.1 Feb 14, 2022
Contributed:
- Add `isHistoric` flag to ETH RPCs (Thanks to https://github.com/stwiname)
- Align contract instantiate types with Substrate (Thanks to https://github.com/kwingram25)
Changes:
- Adjust map header output type with lookup id
- Re-enable all `BitVec` tests for `toU8a`
- Expose `txIndex` as event index on extrinsic results
- Allow inspection of Codec encoding (experimental)
- Allow inspection of storage key encoding (experimental)
- Update to latest Substrate, Kusama & Polkadot static metadata
- Update `@polkadot/util` to 8.4.1
## 7.7.1 Feb 6, 2022
Upgrade priority: Low. Recommended for users with long-running scripts.
Contributed:
- Fix rpc-provider LRU memory leak (Thanks to https://github.com/gdethier)
Changes:
- Don't warn on `Lookup*` types missing (these are resolvable)
- Don't clear injected `PortableRegistry` types on runtime upgrade
- Clear warning for `Call`/`Event` on non-meta v14 runtimes
- Add `beefy_getFinalizedHead` RPC support
- Update to latest Substrate, Kusama & Polkadot static metadata
## 7.6.1 Jan 30, 2022
Upgdare priority: Low. Recommended for users with long-running scripts and those chains based around the latest Substrate master versions.
Contributed:
- Fix memory leak on `.raw` RPC calls (Thanks to https://github.com/r0t0r-r0t0r)
Changes:
- Adjust extraction of `Call` & `Event` types for metadata v14
- Adjust historic `WinningData` and `SlotRange` types (36-entry variant)
- Emit `decorated` event on API on metadata decoration
- Dedupe and extend `WrapperKeepOpaque/WrapperOpaque`
- Align `Range/RangeInclusive` usage with similar types
- Adjust bounty derive, return empty on no `{treasury, bounties}.bounties`
- Ensure handling of all `TypeDefInfo` keys in extraction
- Add support for `rpc.contracts.uploadCode`
- Workaround for generators where `#private = { this... }` yields undefined
- Update to latest Substrate, Kusama & Polkadot static metadata
## 7.5.1 Jan 23, 2022
Upgrade priority: Low. Recommended for users of the latest contract pallet and ink! versions.
Contributed:
- Add additional namespaced contract tests (Thanks to https://github.com/VargSupercolony)
Changes:
- Adjust `Registry` consistency, augment extensions
- Add `.multi` support on `api.at(...).<section>.<method>`
- Add support for ink! metadata V3 with payable constructors
- Cleanup ink! metadata parsing, allowing for easier extension
- Expose `contract.{query, tx}.<method>.meta`, aligning with API
- Fix storage metadata, aligning method with decorated name
- Adjust typegen, only using exportInterface
- Added Kusama/Polkadot 9151 upgrade block (known types)
- Update to latest Substrate, Kusama & Polkadot static metadata
## 7.4.1 Jan 15, 2022
Upgrade priority: Medium. Required for all chains using `Range` and `RangeInclusive` types. Also includes better error handling for number conversions.
Changes:
- Asserts for invalid number format inputs (MAX_SAFE_INTEGER, float)
- Ensure `Range/RangeInclusive` variant check does not fail on encoding
- Ensure non-option calls in api-contract are marked as `@deprecated`
- Added Kusama 9150 upgrade block (known types)
- Update `@polkadot/util` to 8.3.2
## 7.3.1 Jan 9, 2022
Upgrade priority: Low. Maintenance upgrade, tracking the latest `@polkadot` libraries.
Changes:
- Extend support for `WrapperKeepOpaque` with internal decoding (allowed to fail)
- Adjust max-entries in historic provider LRU
- Update to latest Substrate/Polkadot/Kusama metadata
- Update `@polkadot/util` to 8.3.1
- Update package paths under ESM
## 7.2.1 Jan 3, 2022
Upgrade priority: Low. Recommended for users generating TS chain-specific augmentations.
Changes:
- Convert contract `ReturnFlags` to set (as opposed to bare `u32`)
- Adjust chain-specific augmentation to not auto-add RPC imports
- Ensure package path is availble under ESM & CJS
## 7.1.1 Dec 26, 2021
Upgrade priority: Low. Recommended for users of contracts form Substrate master & Polkador/Kusama TS app developers where specific chain augmentation would be helpful.
Contributed:
- Expose `storageDepositLimit` on contract options (Thanks to https://github.com/kwingram25)
Changes:
- Expose `@polkadot/api-augment/{kusama, polkadot, substrate}` for specific augmentations (The bare `@polkadot/api-augment` is equivalent to `/substrate`, keeping the existing behavior)
- Expose `@polkadot/types-augment/{lookup, registry}` variants (The bare `@polkadot/types-augment` applies both)
- Expose `txHash` on submittable results, e.g. `tx.signAndSend(..., ({ txHash }) => ...)`
- Align casing for TS & exposed queries (adjusts for `ALLCAPS` entries)
- Additional tests for `Option` codec (explicit in expectations)
- Update to latest Substrate, Kusama & Polkadot static metadata
## 7.0.2 Dec 21, 2021
Upgrade priority: Low. Recommended for applications where collective derives with aliasses are being used.
@@ -15,9 +264,9 @@ Changes:
Upgrade priority: Low. Recommended for TS users with their own non-Polkadot/Kusama chains.
- **Breaking changes** For TS users the default API augmentation is now optional. This means that the API, for TypeScript, is not decorated by default with the Substrate types and encpoints. TS users should add a singular `import '@polkadot/api-augment';` in their code to retore old behavior.
- **Breaking changes** For TS users the default API augmentation is now optional. This means that the API, for TypeScript, is not decorated by default with the Substrate types and encpoints. TS users should add a singular `import '@polkadot/api-augment';` in their code to restore old behavior. A full writeup of the rationale and other options can be found [in the FAQ](https://polkadot.js.org/docs/api/FAQ#since-upgrading-to-the-7x-series-typescript-augmentation-is-missing)
- **Breaking change** To cater for the above, chain-specific interfaces generated with older versions may not be compaitible with the current version of the API. Additionally, TS interfaces generated with this version of the API is not compatible with older API versions.
- **Breaking change** To cater for the above, chain-specific interfaces generated with older versions may not be compatible with the current version of the API. Additionally, TS interfaces generated with this version of the API is not compatible with older API versions.
Contributed:
+101
View File
@@ -0,0 +1,101 @@
2893 Jaco 7.15.1 (#4714)
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
37 Keith Ingram Update contract types and rpc (#4541)
35 Stefanie Doll Updated child storage parameters (#1709)
20 Luke Schoen fix: Fixes TypeError: Cannot read property 'vesting' of undefined (#1970)
16 Xiliang Chen implement entriesPaged and keysPages for query at (#4701)
15 Jeremías Díaz feat(types): add correct tuple type to storage key (#3054)
11 Ian He HttpProvider support clone() (#3949)
10 Axel Chalon Make Enum/Tuple constructor use value directly if instance (#1954)
5 Chevdor Fix metadata package link (#3458)
5 Jake Naviasky Fixing approvalFlagsToBools. (#1250)
4 Alex Wang fix issue that creates duplicate providers (#983)
4 Alexander Popiak Add asset id in signing (#4009)
4 Joshy Orndorff spelling; efect -> effect (#2295)
4 Nantian fix bigint type (#3869)
4 Scott Twiname Add support for historical BlockNumber rpc methods (#4574)
4 Thibaut Sardan no subscription for http (#3127)
3 Alex D Use derive customAccount and customLocks for balance overrides (#3248)
3 André Silva add support for ValidationCodeHash (#3640)
3 Antoine Estienne Adapted to display moonbeam author (#3108)
3 Arjan Zijderveld Added `Emergency` to `ElectionPhase` (#3707)
3 Ewa Kowalska Handle no council for bounties proposals (#3062)
3 hamidra add support for n key entries for NMaps (#3886)
3 Hamza Tokuchi more typos (#2532)
3 Julien Eluard Fixed typos about module balances (#1402)
3 KarishmaBothara Backward compatibility thing (#3511)
3 Miguel Hervas Adding RT4 Types (#3007)
3 Shawn Tabrizi Add `isReadyOrError` when connecting to API (#2577)
3 YJ feat: Vote interface as U8a (#1061)
2 Alexander Krupenkin Add [u8; 33] type width for U8aFixed type (#2391)
2 Branan Riley Add proxy type for Centrifuge (#3940)
2 Caio Add `Range` and `RangeInclusive` types (#3791)
2 HackFisher Update maxExtrinsic definition (#4703)
2 Jakub Pánik All heads subscription (#1899)
2 James Lefrère Add `.eq()` usage to docs and fix docs typos (#1405)
2 Josep M Sobrepere fix: export substrate-connect `WellKnownChain` (#4700)
2 Keith Yeung Allow keyPrefix to accept an additional argument for double maps (#2230)
2 MOZGIII Follow-up fix after #4665 (#4666)
2 Nikos Kontakis Add auction in shared types (#4085)
2 Paweł Nguyen Fix a minor typo in cookbook blocks docs (#2294)
2 sung wu Update tx.md (#2485)
2 Veliko Abi constructor takes different parameters (#3347)
2 Wei Tang Use /usr/bin/env bash instead of /bin/bash (#2053)
2 扩散性百万甜面包 Typo, deocrateMethod -> decorateMethod (#1594)
1 Andreea Eftene Add storage deposit support (#4304)
1 Brad Larson [NEW] Support for custom headers with providers (#2423)
1 chriswmercer little readme tweak (#279)
1 codingsh #2182 - add: search for docs (#2232)
1 coolcorexix Investigate 4559 v2 (#4608)
1 Dan Forbes Add WeightToFeeCoefficient type (#2296)
1 Daniel Maricic Fixed typo in README (#2402)
1 Daniel Savu fix: Generate custom type definitions (#4224)
1 David Don't log full error (#2952)
1 Denis Tsai realign AccountKey20Junction to polkadot xcm's Junction enum (#3770)
1 djuanito.eth Update fees to current constants (#2320)
1 Drew Stone Update evm definitions to include vicinity (#2279)
1 Dylan Galea Updated users of the polkadot-js/api (#2027)
1 flex Change BeefySignedCommitment signatures type to EcdsaSignature (#4204)
1 Furqan A fix: fixed 404 to the docs from the api readme (#3985)
1 Gérard Dethier Fix LRUCache memory leak. (#4520)
1 Gerben van de Wiel Adding some extra notes on changes in the specname (#2329)
1 HackFisher fix OutboundLaneData types (#3992)
1 Hoani Bryson Multiple Endpoint support for WsProvider (#2234)
1 Hyungsuk Kang Update fees.ts (#1014)
1 icodezjb Update SessionKeys (#3035)
1 iiiiiiii Make unknownTypes externally accessible (#3263)
1 JesseAbram added 07 Example showing how to make a transfer with allowed block permissions folder in docs (#1062)
1 Joey don't throw error at `onSocketClose` (#4363)
1 Jordan Allow typegen for custom RPCs (#2876)
1 JQQQ Allow rpc expose definition/ metadata (#3488)
1 Kian Paimani Update definitions.ts (#2514)
1 Krzysztof Jelski Derive for bounties and descriptions (#2925)
1 Lae Make sure awaiting on an api object won't stuck forever on error (#1763)
1 Lezek123 BTreeSet and BTreeMap - encoding and serialization fixes (#3789)
1 Lovesh Harchandani Fix name of "getBlock" in package "api-derive" and export it in "index.ts" (#2857)
1 Mario Neises fix usage with typescript (#405)
1 Mario Pino Add PolkaStats to API users (#1593)
1 Mark Robert Henderson Update warnings.ts to have the latest URLs (#2720)
1 Matej Nemček added Kodadot to @polkadot/api users section (#2220)
1 Mokhtar Naamani Disable websocket outgoing message fragmentation for w3cwebsocket (#2738)
1 Nazar Mokrynskyi Performance tweaks (#4143)
1 Nikhil Ranjan add vestingPerBlock and vestingEndBlock in DeriveBalancesAll when doing calcBalances (#2563)
1 Nikolay Volf Fix typo (#1730)
1 Noah Corona Add rpc error fields (#4637)
1 Oleksandr Mykhailenko Add more complex namespaced contracts & test cases for them (#4472)
1 Paul M Fox Basic BTreeMaps codec support (#1474)
1 philipstanislaus Update types for centrifuge chain v1.2.0 (#2424)
1 qiuhao update DeriveCustom type (#2581)
1 r0t0r-r0t0r Fix memory leak on raw rpc call (#4505)
1 Rocco Musolino remove broken link (#2671)
1 satellitex Add BTreeSet<V> Codec (#1639)
1 satellitex Add traits replace rules. for invalid cases `::<type>` and `<type>::`. (#885)
1 Satyam Agrawal update as per the 0.97.0-beta.38 release (#1617)
1 Sean Young Solang requires u256 and i256 types (#2752)
1 Sergei Pepyakin INK! -> ink! (#1347)
1 WoeOm adapt Darwinia, Crab Network types (#3498)
1 Xat_MassacrE Fix packages/types/src/codec/utils/encodeTypes.ts encodeSubTypes bug (#1544)
1 Yaroslav Bolyukin Support BTreeMap/BTreeSet in typegen (#4682)
1 yjh fix MetadataVersioned.asV12 (#2983)
1 Yuri fixes #3693 Fix uniques return types (#3694)
1 Zeke Mostov fix: Allow sudo for polkadot indexed proxy enum (#3286)
-14
View File
@@ -14,17 +14,3 @@ If you are an existing user, please be sure to track the [CHANGELOG](CHANGELOG.m
## tutorials
Looking for tutorials to get started? Look at [examples](https://polkadot.js.org/docs/api/examples/promise/) for guides on how to use the API to make queries and submit transactions.
## overview
The API is split up into a number of internal packages -
- [@polkadot/api](packages/api/) The API library, providing both Promise and RxJS Observable-based interfaces. This is the main user-facing entry point.
- [@polkadot/api-derive](packages/api-derive/) Derived results that are injected into the API, allowing for combinations of various query results (only used internally and exposed on the Api instances via `api.derive.*`)
- [@polkadot/metadata](packages/metadata/) Base extrinsic, storage and constant injectors for injection
- [@polkadot/rpc-core](packages/rpc-core/) Wrapper around all [JSON-RPC methods](https://polkadot.js.org/docs/substrate/rpc) exposed by a Polkadot network client
- [@polkadot/rpc-provider](packages/rpc-provider/) Providers for connecting to nodes, including WebSockets and Http
Type definitions for interfaces as exposed by Polkadot & Substrate clients -
- [@polkadot/types](packages/types/) Codecs for all Polkadot and Substrate primitives
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api authors & contributors
// Copyright 2017-2022 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
module.exports = require('@polkadot/dev/config/babel-config-cjs.cjs');
+4 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api authors & contributors
// Copyright 2017-2022 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
const config = require('@polkadot/dev/config/jest.cjs');
@@ -15,5 +15,8 @@ module.exports = {
// eslint-disable-next-line sort-keys
'@polkadot/types(.*)$': '<rootDir>/packages/types/src/$1'
},
"transformIgnorePatterns": [
'/node_modules/(?!@polkadot|@substrate/connect|@babel/runtime/helpers/esm/)'
],
testTimeout: 30000
};
+9 -10
View File
@@ -2,8 +2,8 @@
"author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/api/issues",
"homepage": "https://github.com/polkadot-js/api#readme",
"license": "Apache-2",
"packageManager": "yarn@3.0.1",
"license": "Apache-2.0",
"packageManager": "yarn@3.2.0",
"private": true,
"repository": {
"type": "git",
@@ -11,7 +11,7 @@
},
"sideEffects": false,
"type": "commonjs",
"version": "7.0.2",
"version": "7.15.1",
"workspaces": [
"packages/*"
],
@@ -31,16 +31,15 @@
"test:watch": "polkadot-dev-run-test --watch"
},
"devDependencies": {
"@babel/core": "^7.16.5",
"@babel/register": "^7.16.5",
"@babel/runtime": "^7.16.5",
"@polkadot/dev": "^0.64.11",
"@polkadot/ts": "^0.4.20",
"@babel/core": "^7.17.8",
"@babel/register": "^7.17.7",
"@babel/runtime": "^7.17.8",
"@polkadot/dev": "^0.65.103",
"@polkadot/typegen": "workspace:packages/typegen",
"@types/jest": "^27.0.3",
"@types/jest": "^27.4.1",
"copyfiles": "^2.4.1"
},
"resolutions": {
"typescript": "^4.5.3"
"typescript": "^4.6.3"
}
}
+11 -8
View File
@@ -20,15 +20,18 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.0.2",
"version": "7.15.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/api-base": "7.0.2",
"@polkadot/rpc-augment": "7.0.2",
"@polkadot/types": "7.0.2",
"@polkadot/types-augment": "7.0.2",
"@polkadot/types-codec": "7.0.2",
"@polkadot/util": "^8.2.2"
"@babel/runtime": "^7.17.8",
"@polkadot/api-base": "7.15.1",
"@polkadot/rpc-augment": "7.15.1",
"@polkadot/types": "7.15.1",
"@polkadot/types-augment": "7.15.1",
"@polkadot/types-codec": "7.15.1",
"@polkadot/util": "^8.7.1"
},
"devDependencies": {
"@polkadot/types-support": "7.15.1"
}
}
-12
View File
@@ -1,12 +0,0 @@
// Copyright 2017-2021 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
// for the API, we decorate not only the endpoints, but all types
import '@polkadot/rpc-augment';
import '@polkadot/types-augment';
// the augmentated types (on top of @polkadot/api-base)
import './consts';
import './errors';
import './events';
import './query';
import './tx';
+6
View File
@@ -0,0 +1,6 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
// for the API, we decorate not only the endpoints, but all types
import '@polkadot/rpc-augment';
import '@polkadot/types-augment';
+2 -2
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2021 @polkadot/api-augment authors & contributors
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import './augment';
import './substrate';
export { packageInfo } from './packageInfo';
+8
View File
@@ -0,0 +1,8 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { packageInfo as baseInfo } from '@polkadot/api-base/packageInfo';
import { packageInfo as typesInfo } from '@polkadot/types/packageInfo';
import { packageInfo as codecInfo } from '@polkadot/types-codec/packageInfo';
export default [baseInfo, typesInfo, codecInfo];
+5 -5
View File
@@ -1,11 +1,11 @@
// Copyright 2017-2021 @polkadot/api-augment authors & contributors
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { packageInfo as baseInfo } from '@polkadot/api-base/packageInfo';
import { packageInfo as typesInfo } from '@polkadot/types/packageInfo';
import { packageInfo as codecInfo } from '@polkadot/types-codec/packageInfo';
// Do not edit, auto-generated by @polkadot/dev
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname, [baseInfo, typesInfo, codecInfo]);
detectPackage(packageInfo, null, others);
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-augment authors & contributors
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import './detectPackage';
+940
View File
@@ -0,0 +1,940 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
import type { ApiTypes } 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, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
declare module '@polkadot/api-base/types/consts' {
export interface AugmentedConsts<ApiType extends ApiTypes> {
auctions: {
/**
* The number of blocks over which an auction may be retroactively ended.
**/
endingPeriod: u32 & AugmentedConst<ApiType>;
leasePeriodsPerSlot: u32 & AugmentedConst<ApiType>;
/**
* The length of each sample to take during the ending period.
*
* `EndingPeriod` / `SampleLength` = Total # of Samples
**/
sampleLength: u32 & AugmentedConst<ApiType>;
slotRangeCount: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
authorship: {
/**
* The number of blocks back we should accept uncles.
* This means that we will deal with uncle-parents that are
* `UncleGenerations + 1` before `now`.
**/
uncleGenerations: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
babe: {
/**
* The amount of time, in slots, that each epoch should last.
* NOTE: Currently it is not possible to change the epoch duration after
* the chain has started. Attempting to do so will brick block production.
**/
epochDuration: u64 & AugmentedConst<ApiType>;
/**
* The expected average block time at which BABE should be creating
* blocks. Since BABE is probabilistic it is not trivial to figure out
* what the expected average block time should be based on the slot
* duration and the security parameter `c` (where `1 - c` represents
* the probability of a slot being empty).
**/
expectedBlockTime: u64 & AugmentedConst<ApiType>;
/**
* Max number of authorities allowed
**/
maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[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.
**/
existentialDeposit: u128 & AugmentedConst<ApiType>;
/**
* The maximum number of locks that should exist on an account.
* Not strictly enforced, but used for weight estimation.
**/
maxLocks: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of named reserves that can exist on an account.
**/
maxReserves: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
bounties: {
/**
* The amount held on deposit for placing a bounty proposal.
**/
bountyDepositBase: u128 & AugmentedConst<ApiType>;
/**
* The delay period for which a bounty beneficiary need to wait before claim the payout.
**/
bountyDepositPayoutDelay: u32 & AugmentedConst<ApiType>;
/**
* Bounty duration in blocks.
**/
bountyUpdatePeriod: u32 & AugmentedConst<ApiType>;
/**
* Minimum value for a bounty.
**/
bountyValueMinimum: u128 & AugmentedConst<ApiType>;
/**
* Maximum amount of funds that should be placed in a deposit for making a proposal.
**/
curatorDepositMax: Option<u128> & AugmentedConst<ApiType>;
/**
* Minimum amount of funds that should be placed in a deposit for making a proposal.
**/
curatorDepositMin: Option<u128> & AugmentedConst<ApiType>;
/**
* The curator deposit is calculated as a percentage of the curator fee.
*
* This deposit has optional upper and lower bounds with `CuratorDepositMax` and
* `CuratorDepositMin`.
**/
curatorDepositMultiplier: Permill & AugmentedConst<ApiType>;
/**
* The amount held on deposit per byte within the tip report reason or bounty description.
**/
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
/**
* Maximum acceptable reason length.
*
* Benchmarks depend on this value, be sure to update weights file when changing this value
**/
maximumReasonLength: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
childBounties: {
/**
* Minimum value for a child-bounty.
**/
childBountyValueMinimum: u128 & AugmentedConst<ApiType>;
/**
* Maximum number of child-bounties that can be added to a parent bounty.
**/
maxActiveChildBountyCount: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
claims: {
prefix: Bytes & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
crowdloan: {
/**
* The minimum amount that may be contributed into a crowdloan. Should almost certainly be at
* least `ExistentialDeposit`.
**/
minContribution: u128 & AugmentedConst<ApiType>;
/**
* `PalletId` for the crowdloan pallet. An appropriate value could be `PalletId(*b"py/cfund")`
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* Max number of storage keys to remove per extrinsic call.
**/
removeKeysLimit: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
democracy: {
/**
* Period in blocks where an external proposal may not be re-submitted after being vetoed.
**/
cooloffPeriod: u32 & AugmentedConst<ApiType>;
/**
* The period between a proposal being approved and enacted.
*
* It should generally be a little more than the unstake period to ensure that
* voting stakers have an opportunity to remove themselves from the system in the case
* where they are on the losing side of a vote.
**/
enactmentPeriod: u32 & AugmentedConst<ApiType>;
/**
* Minimum voting period allowed for a fast-track referendum.
**/
fastTrackVotingPeriod: u32 & AugmentedConst<ApiType>;
/**
* Indicator for whether an emergency origin is even allowed to happen. Some chains may
* want to set this permanently to `false`, others may want to condition it on things such
* as an upgrade having happened recently.
**/
instantAllowed: bool & AugmentedConst<ApiType>;
/**
* How often (in blocks) new public referenda are launched.
**/
launchPeriod: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of public proposals that can exist at any time.
**/
maxProposals: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of votes for an account.
*
* Also used to compute weight, an overly big value can
* lead to extrinsic with very big weight: see `delegate` for instance.
**/
maxVotes: u32 & AugmentedConst<ApiType>;
/**
* The minimum amount to be used as a deposit for a public referendum proposal.
**/
minimumDeposit: u128 & AugmentedConst<ApiType>;
/**
* The amount of balance that must be deposited per byte of preimage stored.
**/
preimageByteDeposit: u128 & AugmentedConst<ApiType>;
/**
* The minimum period of vote locking.
*
* It should be no shorter than enactment period to ensure that in the case of an approval,
* those successful voters are locked into the consequences that their votes entail.
**/
voteLockingPeriod: u32 & AugmentedConst<ApiType>;
/**
* How often (in blocks) to check for new votes.
**/
votingPeriod: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
electionProviderMultiPhase: {
/**
* The maximum number of electable targets to put in the snapshot.
**/
maxElectableTargets: u16 & AugmentedConst<ApiType>;
/**
* The maximum number of electing voters to put in the snapshot. At the moment, snapshots
* are only over a single block, but once multi-block elections are introduced they will
* take place over multiple blocks.
**/
maxElectingVoters: u32 & AugmentedConst<ApiType>;
/**
* Maximum length (bytes) that the mined solution should consume.
*
* The miner will ensure that the total length of the unsigned solution will not exceed
* this value.
**/
minerMaxLength: u32 & AugmentedConst<ApiType>;
/**
* Maximum weight that the miner should consume.
*
* The miner will ensure that the total weight of the unsigned solution will not exceed
* this value, based on [`WeightInfo::submit_unsigned`].
**/
minerMaxWeight: u64 & AugmentedConst<ApiType>;
/**
* The priority of the unsigned transaction submitted in the unsigned-phase
**/
minerTxPriority: u64 & AugmentedConst<ApiType>;
/**
* The repeat threshold of the offchain worker.
*
* For example, if it is 5, that means that at least 5 blocks will elapse between attempts
* to submit the worker's solution.
**/
offchainRepeat: u32 & AugmentedConst<ApiType>;
/**
* Base deposit for a signed solution.
**/
signedDepositBase: u128 & AugmentedConst<ApiType>;
/**
* Per-byte deposit for a signed solution.
**/
signedDepositByte: u128 & AugmentedConst<ApiType>;
/**
* Per-weight deposit for a signed solution.
**/
signedDepositWeight: u128 & AugmentedConst<ApiType>;
/**
* Maximum number of signed submissions that can be queued.
*
* It is best to avoid adjusting this during an election, as it impacts downstream data
* structures. In particular, `SignedSubmissionIndices<T>` is bounded on this value. If you
* update this value during an election, you _must_ ensure that
* `SignedSubmissionIndices.len()` is less than or equal to the new value. Otherwise,
* attempts to submit new solutions may cause a runtime panic.
**/
signedMaxSubmissions: u32 & AugmentedConst<ApiType>;
/**
* Maximum weight of a signed solution.
*
* This should probably be similar to [`Config::MinerMaxWeight`].
**/
signedMaxWeight: u64 & AugmentedConst<ApiType>;
/**
* Duration of the signed phase.
**/
signedPhase: u32 & AugmentedConst<ApiType>;
/**
* Base reward for a signed solution
**/
signedRewardBase: u128 & AugmentedConst<ApiType>;
/**
* The minimum amount of improvement to the solution score that defines a solution as
* "better" (in any phase).
**/
solutionImprovementThreshold: Perbill & AugmentedConst<ApiType>;
/**
* Duration of the unsigned phase.
**/
unsignedPhase: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
gilt: {
/**
* Portion of the queue which is free from ordering and just a FIFO.
*
* Must be no greater than `MaxQueueLen`.
**/
fifoQueueLen: u32 & AugmentedConst<ApiType>;
/**
* The number of blocks between consecutive attempts to issue more gilts in an effort to
* get to the target amount to be frozen.
*
* A larger value results in fewer storage hits each block, but a slower period to get to
* the target.
**/
intakePeriod: u32 & AugmentedConst<ApiType>;
/**
* The maximum amount of bids that can be turned into issued gilts each block. A larger
* value here means less of the block available for transactions should there be a glut of
* bids to make into gilts to reach the target.
**/
maxIntakeBids: u32 & AugmentedConst<ApiType>;
/**
* Maximum number of items that may be in each duration queue.
**/
maxQueueLen: u32 & AugmentedConst<ApiType>;
/**
* The minimum amount of funds that may be offered to freeze for a gilt. Note that this
* does not actually limit the amount which may be frozen in a gilt since gilts may be
* split up in order to satisfy the desired amount of funds under gilts.
*
* It should be at least big enough to ensure that there is no possible storage spam attack
* or queue-filling attack.
**/
minFreeze: u128 & AugmentedConst<ApiType>;
/**
* The base period for the duration queues. This is the common multiple across all
* supported freezing durations that can be bid upon.
**/
period: u32 & AugmentedConst<ApiType>;
/**
* Number of duration queues in total. This sets the maximum duration supported, which is
* this value multiplied by `Period`.
**/
queueCount: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
grandpa: {
/**
* Max Authorities in use
**/
maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
identity: {
/**
* The amount held on deposit for a registered identity
**/
basicDeposit: u128 & AugmentedConst<ApiType>;
/**
* The amount held on deposit per additional field for a registered identity.
**/
fieldDeposit: u128 & AugmentedConst<ApiType>;
/**
* Maximum number of additional fields that may be stored in an ID. Needed to bound the I/O
* required to access an identity, but can be pretty high.
**/
maxAdditionalFields: u32 & AugmentedConst<ApiType>;
/**
* Maxmimum number of registrars allowed in the system. Needed to bound the complexity
* of, e.g., updating judgements.
**/
maxRegistrars: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of sub-accounts allowed per identified account.
**/
maxSubAccounts: u32 & AugmentedConst<ApiType>;
/**
* The amount held on deposit for a registered subaccount. This should account for the fact
* that one storage item's value will increase by the size of an account ID, and there will
* be another trie item whose value is the size of an account ID plus 32 bytes.
**/
subAccountDeposit: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
imOnline: {
/**
* A configuration for base priority of unsigned transactions.
*
* This is exposed so that it can be tuned for particular runtime, when
* multiple pallets send unsigned transactions.
**/
unsignedPriority: u64 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
indices: {
/**
* The deposit needed for reserving an index.
**/
deposit: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
multisig: {
/**
* The base amount of currency needed to reserve for creating a multisig execution or to
* store a dispatch call for later.
*
* This is held for an additional storage item whose value size is
* `4 + sizeof((BlockNumber, Balance, AccountId))` bytes and whose key size is
* `32 + sizeof(AccountId)` bytes.
**/
depositBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of currency needed per unit threshold when creating a multisig execution.
*
* This is held for adding 32 bytes more into a pre-existing storage value.
**/
depositFactor: u128 & AugmentedConst<ApiType>;
/**
* The maximum amount of signatories allowed in the multisig.
**/
maxSignatories: u16 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
paras: {
unsignedPriority: u64 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
phragmenElection: {
/**
* How much should be locked up in order to submit one's candidacy.
**/
candidacyBond: u128 & AugmentedConst<ApiType>;
/**
* Number of members to elect.
**/
desiredMembers: u32 & AugmentedConst<ApiType>;
/**
* Number of runners_up to keep.
**/
desiredRunnersUp: u32 & AugmentedConst<ApiType>;
/**
* Identifier for the elections-phragmen pallet's lock
**/
palletId: U8aFixed & AugmentedConst<ApiType>;
/**
* How long each seat is kept. This defines the next block number at which an election
* round will happen. If set to zero, no elections are ever triggered and the module will
* be in passive mode.
**/
termDuration: u32 & AugmentedConst<ApiType>;
/**
* Base deposit associated with voting.
*
* This should be sensibly high to economically ensure the pallet cannot be attacked by
* creating a gigantic number of votes.
**/
votingBondBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of bond that need to be locked for each vote (32 bytes).
**/
votingBondFactor: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
proxy: {
/**
* The base amount of currency needed to reserve for creating an announcement.
*
* This is held when a new storage item holding a `Balance` is created (typically 16
* bytes).
**/
announcementDepositBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of currency needed per announcement made.
*
* This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes)
* into a pre-existing storage value.
**/
announcementDepositFactor: u128 & AugmentedConst<ApiType>;
/**
* The maximum amount of time-delayed announcements that are allowed to be pending.
**/
maxPending: u32 & AugmentedConst<ApiType>;
/**
* The maximum amount of proxies allowed for a single account.
**/
maxProxies: u32 & AugmentedConst<ApiType>;
/**
* The base amount of currency needed to reserve for creating a proxy.
*
* This is held for an additional storage item whose value size is
* `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes.
**/
proxyDepositBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of currency needed per proxy added.
*
* This is held for adding 32 bytes plus an instance of `ProxyType` more into a
* pre-existing storage value. Thus, when configuring `ProxyDepositFactor` one should take
* into account `32 + proxy_type.encode().len()` bytes of data.
**/
proxyDepositFactor: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
recovery: {
/**
* The base amount of currency needed to reserve for creating a recovery configuration.
*
* This is held for an additional storage item whose value size is
* `2 + sizeof(BlockNumber, Balance)` bytes.
**/
configDepositBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of currency needed per additional user when creating a recovery
* configuration.
*
* This is held for adding `sizeof(AccountId)` bytes more into a pre-existing storage
* value.
**/
friendDepositFactor: u128 & AugmentedConst<ApiType>;
/**
* The maximum amount of friends allowed in a recovery configuration.
*
* NOTE: The threshold programmed in this Pallet uses u16, so it does
* not really make sense to have a limit here greater than u16::MAX.
* But also, that is a lot more than you should probably set this value
* to anyway...
**/
maxFriends: u32 & AugmentedConst<ApiType>;
/**
* The base amount of currency needed to reserve for starting a recovery.
*
* This is primarily held for deterring malicious recovery attempts, and should
* have a value large enough that a bad actor would choose not to place this
* deposit. It also acts to fund additional storage item whose value size is
* `sizeof(BlockNumber, Balance + T * AccountId)` bytes. Where T is a configurable
* threshold.
**/
recoveryDeposit: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
registrar: {
/**
* The deposit to be paid per byte stored on chain.
**/
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
/**
* The deposit to be paid to run a parathread.
* This should include the cost for storing the genesis head and validation code.
**/
paraDeposit: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
scheduler: {
/**
* The maximum weight that may be scheduled per block for any dispatchables of less
* priority than `schedule::HARD_DEADLINE`.
**/
maximumWeight: u64 & AugmentedConst<ApiType>;
/**
* The maximum number of scheduled calls in the queue for a single block.
* Not strictly enforced, but used for weight estimation.
**/
maxScheduledPerBlock: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
slots: {
/**
* The number of blocks to offset each lease period by.
**/
leaseOffset: u32 & AugmentedConst<ApiType>;
/**
* The number of blocks over which a single period lasts.
**/
leasePeriod: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
society: {
/**
* The minimum amount of a deposit required for a bid to be made.
**/
candidateDeposit: u128 & AugmentedConst<ApiType>;
/**
* The number of blocks between membership challenges.
**/
challengePeriod: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of candidates that we accept per round.
**/
maxCandidateIntake: u32 & AugmentedConst<ApiType>;
/**
* The maximum duration of the payout lock.
**/
maxLockDuration: u32 & AugmentedConst<ApiType>;
/**
* The number of times a member may vote the wrong way (or not at all, when they are a
* skeptic) before they become suspended.
**/
maxStrikes: u32 & AugmentedConst<ApiType>;
/**
* The societies's pallet id
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* The amount of incentive paid within each period. Doesn't include VoterTip.
**/
periodSpend: u128 & AugmentedConst<ApiType>;
/**
* The number of blocks between candidate/membership rotation periods.
**/
rotationPeriod: u32 & AugmentedConst<ApiType>;
/**
* The amount of the unpaid reward that gets deducted in the case that either a skeptic
* doesn't vote or someone votes in the wrong way.
**/
wrongSideDeduction: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
staking: {
/**
* Number of eras that staked funds must remain bonded for.
**/
bondingDuration: u32 & AugmentedConst<ApiType>;
/**
* Maximum number of nominations per nominator.
**/
maxNominations: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of nominators rewarded for each validator.
*
* For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can
* claim their reward. This used to limit the i/o cost for the nominator payout.
**/
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of `unlocking` chunks a [`StakingLedger`] can have. Effectively
* determines how many unique eras a staker may be unbonding in.
**/
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
/**
* Number of sessions per era.
**/
sessionsPerEra: u32 & AugmentedConst<ApiType>;
/**
* Number of eras that slashes are deferred by, after computation.
*
* This should be less than the bonding duration. Set to 0 if slashes
* should be applied immediately, without opportunity for intervention.
**/
slashDeferDuration: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
system: {
/**
* Maximum number of block number to block hash mappings to keep (oldest pruned first).
**/
blockHashCount: u32 & AugmentedConst<ApiType>;
/**
* The maximum length of a block (in bytes).
**/
blockLength: FrameSystemLimitsBlockLength & AugmentedConst<ApiType>;
/**
* Block & extrinsics weights: base values and limits.
**/
blockWeights: FrameSystemLimitsBlockWeights & AugmentedConst<ApiType>;
/**
* The weight of runtime database operations the runtime can invoke.
**/
dbWeight: FrameSupportWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
/**
* The designated SS85 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
* an identifier of the chain.
**/
ss58Prefix: u16 & AugmentedConst<ApiType>;
/**
* Get the chain's current version.
**/
version: SpVersionRuntimeVersion & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
timestamp: {
/**
* The minimum period between blocks. Beware that this is different to the *expected*
* period that the block production apparatus provides. Your chosen consensus system will
* generally work with this to determine a sensible block time. e.g. For Aura, it will be
* double this period on default settings.
**/
minimumPeriod: u64 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
tips: {
/**
* The amount held on deposit per byte within the tip report reason or bounty description.
**/
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
/**
* Maximum acceptable reason length.
*
* Benchmarks depend on this value, be sure to update weights file when changing this value
**/
maximumReasonLength: u32 & AugmentedConst<ApiType>;
/**
* The period for which a tip remains open after is has achieved threshold tippers.
**/
tipCountdown: u32 & AugmentedConst<ApiType>;
/**
* The percent of the final tip which goes to the original reporter of the tip.
**/
tipFindersFee: Percent & AugmentedConst<ApiType>;
/**
* The amount held on deposit for placing a tip report.
**/
tipReportDepositBase: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
transactionPayment: {
/**
* A fee mulitplier for `Operational` extrinsics to compute "virtual tip" to boost their
* `priority`
*
* This value is multipled by the `final_fee` to obtain a "virtual tip" that is later
* added to a tip component in regular `priority` calculations.
* It means that a `Normal` transaction can front-run a similarly-sized `Operational`
* extrinsic (with no tip), by including a tip value greater than the virtual tip.
*
* ```rust,ignore
* // For `Normal`
* let priority = priority_calc(tip);
*
* // For `Operational`
* let virtual_tip = (inclusion_fee + tip) * OperationalFeeMultiplier;
* let priority = priority_calc(tip + virtual_tip);
* ```
*
* Note that since we use `final_fee` the multiplier applies also to the regular `tip`
* sent with the transaction. So, not only does the transaction get a priority bump based
* on the `inclusion_fee`, but we also amplify the impact of tips applied to `Operational`
* transactions.
**/
operationalFeeMultiplier: u8 & AugmentedConst<ApiType>;
/**
* The fee to be paid for making a transaction; the per-byte portion.
**/
transactionByteFee: u128 & AugmentedConst<ApiType>;
/**
* The polynomial that is applied in order to derive fee from weight.
**/
weightToFee: Vec<FrameSupportWeightsWeightToFeeCoefficient> & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
treasury: {
/**
* Percentage of spare funds (if any) that are burnt per spend period.
**/
burn: Permill & AugmentedConst<ApiType>;
/**
* The maximum number of approvals that can wait in the spending queue.
*
* NOTE: This parameter is also used within the Bounties Pallet extension if enabled.
**/
maxApprovals: u32 & AugmentedConst<ApiType>;
/**
* The treasury's pallet id, used for deriving its sovereign account ID.
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* Fraction of a proposal's value that should be bonded in order to place the proposal.
* An accepted proposal gets these back. A rejected proposal does not.
**/
proposalBond: Permill & AugmentedConst<ApiType>;
/**
* Maximum amount of funds that should be placed in a deposit for making a proposal.
**/
proposalBondMaximum: Option<u128> & AugmentedConst<ApiType>;
/**
* Minimum amount of funds that should be placed in a deposit for making a proposal.
**/
proposalBondMinimum: u128 & AugmentedConst<ApiType>;
/**
* Period between successive spends.
**/
spendPeriod: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
utility: {
/**
* The limit on the number of batched calls.
**/
batchedCallsLimit: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
vesting: {
maxVestingSchedules: u32 & AugmentedConst<ApiType>;
/**
* The minimum amount transferred to call `vested_transfer`.
**/
minVestedTransfer: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
} // AugmentedConsts
} // declare module
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,43 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@polkadot/api-augment/kusama';
import type { PolkadotRuntimeParachainsUmpPalletEvent, XcmV2TraitsOutcome } from '@polkadot/types/lookup';
import { Metadata, TypeRegistry } from '@polkadot/types';
import metadataStatic from '@polkadot/types-support/metadata/static-kusama';
const registry = new TypeRegistry();
const metadata = new Metadata(registry, metadataStatic);
registry.setMetadata(metadata);
describe('correct types', (): void => {
it('correctly creates XcmV2TraitsOutcome', (): void => {
const test = registry.createType<XcmV2TraitsOutcome>('XcmV2TraitsOutcome', {
Incomplete: [3_000_000_000, 'BadOrigin']
});
expect(test.toHuman()).toEqual({
Incomplete: [
'3,000,000,000',
'BadOrigin'
]
});
expect(test.isIncomplete).toEqual(true);
expect(test.asIncomplete.toHuman()).toEqual([
'3,000,000,000',
'BadOrigin'
]);
});
it('correctly creates PolkadotRuntimeParachainsUmpPalletEvent', (): void => {
const test = registry.createType<PolkadotRuntimeParachainsUmpPalletEvent>('PolkadotRuntimeParachainsUmpPalletEvent', '0x02112233445566778811223344556677881122334455667788112233445566778801005ed0b20000000006');
expect(test.asExecutedUpward[1].asIncomplete.toHuman()).toEqual([
'3,000,000,000',
'BadOrigin'
]);
});
});
File diff suppressed because it is too large Load Diff
+10
View File
@@ -0,0 +1,10 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '../base';
import './consts';
import './errors';
import './events';
import './query';
import './registry';
import './tx';
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,6 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@polkadot/types-augment/registry/substrate';
import '@polkadot/types-augment/registry/polkadot';
import '@polkadot/types-augment/registry/kusama';
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2021 @polkadot/api-augment authors & contributors
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Auto-generated by @polkadot/dev, do not edit
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-augment', version: '7.0.2' };
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '7.15.1' };
+807
View File
@@ -0,0 +1,807 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
import type { ApiTypes } 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, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
declare module '@polkadot/api-base/types/consts' {
export interface AugmentedConsts<ApiType extends ApiTypes> {
auctions: {
/**
* The number of blocks over which an auction may be retroactively ended.
**/
endingPeriod: u32 & AugmentedConst<ApiType>;
leasePeriodsPerSlot: u32 & AugmentedConst<ApiType>;
/**
* The length of each sample to take during the ending period.
*
* `EndingPeriod` / `SampleLength` = Total # of Samples
**/
sampleLength: u32 & AugmentedConst<ApiType>;
slotRangeCount: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
authorship: {
/**
* The number of blocks back we should accept uncles.
* This means that we will deal with uncle-parents that are
* `UncleGenerations + 1` before `now`.
**/
uncleGenerations: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
babe: {
/**
* The amount of time, in slots, that each epoch should last.
* NOTE: Currently it is not possible to change the epoch duration after
* the chain has started. Attempting to do so will brick block production.
**/
epochDuration: u64 & AugmentedConst<ApiType>;
/**
* The expected average block time at which BABE should be creating
* blocks. Since BABE is probabilistic it is not trivial to figure out
* what the expected average block time should be based on the slot
* duration and the security parameter `c` (where `1 - c` represents
* the probability of a slot being empty).
**/
expectedBlockTime: u64 & AugmentedConst<ApiType>;
/**
* Max number of authorities allowed
**/
maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[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.
**/
existentialDeposit: u128 & AugmentedConst<ApiType>;
/**
* The maximum number of locks that should exist on an account.
* Not strictly enforced, but used for weight estimation.
**/
maxLocks: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of named reserves that can exist on an account.
**/
maxReserves: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
bounties: {
/**
* The amount held on deposit for placing a bounty proposal.
**/
bountyDepositBase: u128 & AugmentedConst<ApiType>;
/**
* The delay period for which a bounty beneficiary need to wait before claim the payout.
**/
bountyDepositPayoutDelay: u32 & AugmentedConst<ApiType>;
/**
* Bounty duration in blocks.
**/
bountyUpdatePeriod: u32 & AugmentedConst<ApiType>;
/**
* Minimum value for a bounty.
**/
bountyValueMinimum: u128 & AugmentedConst<ApiType>;
/**
* Maximum amount of funds that should be placed in a deposit for making a proposal.
**/
curatorDepositMax: Option<u128> & AugmentedConst<ApiType>;
/**
* Minimum amount of funds that should be placed in a deposit for making a proposal.
**/
curatorDepositMin: Option<u128> & AugmentedConst<ApiType>;
/**
* The curator deposit is calculated as a percentage of the curator fee.
*
* This deposit has optional upper and lower bounds with `CuratorDepositMax` and
* `CuratorDepositMin`.
**/
curatorDepositMultiplier: Permill & AugmentedConst<ApiType>;
/**
* The amount held on deposit per byte within the tip report reason or bounty description.
**/
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
/**
* Maximum acceptable reason length.
*
* Benchmarks depend on this value, be sure to update weights file when changing this value
**/
maximumReasonLength: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
childBounties: {
/**
* Minimum value for a child-bounty.
**/
childBountyValueMinimum: u128 & AugmentedConst<ApiType>;
/**
* Maximum number of child-bounties that can be added to a parent bounty.
**/
maxActiveChildBountyCount: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
claims: {
prefix: Bytes & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
crowdloan: {
/**
* The minimum amount that may be contributed into a crowdloan. Should almost certainly be at
* least `ExistentialDeposit`.
**/
minContribution: u128 & AugmentedConst<ApiType>;
/**
* `PalletId` for the crowdloan pallet. An appropriate value could be `PalletId(*b"py/cfund")`
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* Max number of storage keys to remove per extrinsic call.
**/
removeKeysLimit: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
democracy: {
/**
* Period in blocks where an external proposal may not be re-submitted after being vetoed.
**/
cooloffPeriod: u32 & AugmentedConst<ApiType>;
/**
* The period between a proposal being approved and enacted.
*
* It should generally be a little more than the unstake period to ensure that
* voting stakers have an opportunity to remove themselves from the system in the case
* where they are on the losing side of a vote.
**/
enactmentPeriod: u32 & AugmentedConst<ApiType>;
/**
* Minimum voting period allowed for a fast-track referendum.
**/
fastTrackVotingPeriod: u32 & AugmentedConst<ApiType>;
/**
* Indicator for whether an emergency origin is even allowed to happen. Some chains may
* want to set this permanently to `false`, others may want to condition it on things such
* as an upgrade having happened recently.
**/
instantAllowed: bool & AugmentedConst<ApiType>;
/**
* How often (in blocks) new public referenda are launched.
**/
launchPeriod: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of public proposals that can exist at any time.
**/
maxProposals: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of votes for an account.
*
* Also used to compute weight, an overly big value can
* lead to extrinsic with very big weight: see `delegate` for instance.
**/
maxVotes: u32 & AugmentedConst<ApiType>;
/**
* The minimum amount to be used as a deposit for a public referendum proposal.
**/
minimumDeposit: u128 & AugmentedConst<ApiType>;
/**
* The amount of balance that must be deposited per byte of preimage stored.
**/
preimageByteDeposit: u128 & AugmentedConst<ApiType>;
/**
* The minimum period of vote locking.
*
* It should be no shorter than enactment period to ensure that in the case of an approval,
* those successful voters are locked into the consequences that their votes entail.
**/
voteLockingPeriod: u32 & AugmentedConst<ApiType>;
/**
* How often (in blocks) to check for new votes.
**/
votingPeriod: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
electionProviderMultiPhase: {
/**
* The maximum number of electable targets to put in the snapshot.
**/
maxElectableTargets: u16 & AugmentedConst<ApiType>;
/**
* The maximum number of electing voters to put in the snapshot. At the moment, snapshots
* are only over a single block, but once multi-block elections are introduced they will
* take place over multiple blocks.
**/
maxElectingVoters: u32 & AugmentedConst<ApiType>;
/**
* Maximum length (bytes) that the mined solution should consume.
*
* The miner will ensure that the total length of the unsigned solution will not exceed
* this value.
**/
minerMaxLength: u32 & AugmentedConst<ApiType>;
/**
* Maximum weight that the miner should consume.
*
* The miner will ensure that the total weight of the unsigned solution will not exceed
* this value, based on [`WeightInfo::submit_unsigned`].
**/
minerMaxWeight: u64 & AugmentedConst<ApiType>;
/**
* The priority of the unsigned transaction submitted in the unsigned-phase
**/
minerTxPriority: u64 & AugmentedConst<ApiType>;
/**
* The repeat threshold of the offchain worker.
*
* For example, if it is 5, that means that at least 5 blocks will elapse between attempts
* to submit the worker's solution.
**/
offchainRepeat: u32 & AugmentedConst<ApiType>;
/**
* Base deposit for a signed solution.
**/
signedDepositBase: u128 & AugmentedConst<ApiType>;
/**
* Per-byte deposit for a signed solution.
**/
signedDepositByte: u128 & AugmentedConst<ApiType>;
/**
* Per-weight deposit for a signed solution.
**/
signedDepositWeight: u128 & AugmentedConst<ApiType>;
/**
* Maximum number of signed submissions that can be queued.
*
* It is best to avoid adjusting this during an election, as it impacts downstream data
* structures. In particular, `SignedSubmissionIndices<T>` is bounded on this value. If you
* update this value during an election, you _must_ ensure that
* `SignedSubmissionIndices.len()` is less than or equal to the new value. Otherwise,
* attempts to submit new solutions may cause a runtime panic.
**/
signedMaxSubmissions: u32 & AugmentedConst<ApiType>;
/**
* Maximum weight of a signed solution.
*
* This should probably be similar to [`Config::MinerMaxWeight`].
**/
signedMaxWeight: u64 & AugmentedConst<ApiType>;
/**
* Duration of the signed phase.
**/
signedPhase: u32 & AugmentedConst<ApiType>;
/**
* Base reward for a signed solution
**/
signedRewardBase: u128 & AugmentedConst<ApiType>;
/**
* The minimum amount of improvement to the solution score that defines a solution as
* "better" (in any phase).
**/
solutionImprovementThreshold: Perbill & AugmentedConst<ApiType>;
/**
* Duration of the unsigned phase.
**/
unsignedPhase: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
grandpa: {
/**
* Max Authorities in use
**/
maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
identity: {
/**
* The amount held on deposit for a registered identity
**/
basicDeposit: u128 & AugmentedConst<ApiType>;
/**
* The amount held on deposit per additional field for a registered identity.
**/
fieldDeposit: u128 & AugmentedConst<ApiType>;
/**
* Maximum number of additional fields that may be stored in an ID. Needed to bound the I/O
* required to access an identity, but can be pretty high.
**/
maxAdditionalFields: u32 & AugmentedConst<ApiType>;
/**
* Maxmimum number of registrars allowed in the system. Needed to bound the complexity
* of, e.g., updating judgements.
**/
maxRegistrars: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of sub-accounts allowed per identified account.
**/
maxSubAccounts: u32 & AugmentedConst<ApiType>;
/**
* The amount held on deposit for a registered subaccount. This should account for the fact
* that one storage item's value will increase by the size of an account ID, and there will
* be another trie item whose value is the size of an account ID plus 32 bytes.
**/
subAccountDeposit: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
imOnline: {
/**
* A configuration for base priority of unsigned transactions.
*
* This is exposed so that it can be tuned for particular runtime, when
* multiple pallets send unsigned transactions.
**/
unsignedPriority: u64 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
indices: {
/**
* The deposit needed for reserving an index.
**/
deposit: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
multisig: {
/**
* The base amount of currency needed to reserve for creating a multisig execution or to
* store a dispatch call for later.
*
* This is held for an additional storage item whose value size is
* `4 + sizeof((BlockNumber, Balance, AccountId))` bytes and whose key size is
* `32 + sizeof(AccountId)` bytes.
**/
depositBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of currency needed per unit threshold when creating a multisig execution.
*
* This is held for adding 32 bytes more into a pre-existing storage value.
**/
depositFactor: u128 & AugmentedConst<ApiType>;
/**
* The maximum amount of signatories allowed in the multisig.
**/
maxSignatories: u16 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
paras: {
unsignedPriority: u64 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
phragmenElection: {
/**
* How much should be locked up in order to submit one's candidacy.
**/
candidacyBond: u128 & AugmentedConst<ApiType>;
/**
* Number of members to elect.
**/
desiredMembers: u32 & AugmentedConst<ApiType>;
/**
* Number of runners_up to keep.
**/
desiredRunnersUp: u32 & AugmentedConst<ApiType>;
/**
* Identifier for the elections-phragmen pallet's lock
**/
palletId: U8aFixed & AugmentedConst<ApiType>;
/**
* How long each seat is kept. This defines the next block number at which an election
* round will happen. If set to zero, no elections are ever triggered and the module will
* be in passive mode.
**/
termDuration: u32 & AugmentedConst<ApiType>;
/**
* Base deposit associated with voting.
*
* This should be sensibly high to economically ensure the pallet cannot be attacked by
* creating a gigantic number of votes.
**/
votingBondBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of bond that need to be locked for each vote (32 bytes).
**/
votingBondFactor: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
proxy: {
/**
* The base amount of currency needed to reserve for creating an announcement.
*
* This is held when a new storage item holding a `Balance` is created (typically 16
* bytes).
**/
announcementDepositBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of currency needed per announcement made.
*
* This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes)
* into a pre-existing storage value.
**/
announcementDepositFactor: u128 & AugmentedConst<ApiType>;
/**
* The maximum amount of time-delayed announcements that are allowed to be pending.
**/
maxPending: u32 & AugmentedConst<ApiType>;
/**
* The maximum amount of proxies allowed for a single account.
**/
maxProxies: u32 & AugmentedConst<ApiType>;
/**
* The base amount of currency needed to reserve for creating a proxy.
*
* This is held for an additional storage item whose value size is
* `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes.
**/
proxyDepositBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of currency needed per proxy added.
*
* This is held for adding 32 bytes plus an instance of `ProxyType` more into a
* pre-existing storage value. Thus, when configuring `ProxyDepositFactor` one should take
* into account `32 + proxy_type.encode().len()` bytes of data.
**/
proxyDepositFactor: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
registrar: {
/**
* The deposit to be paid per byte stored on chain.
**/
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
/**
* The deposit to be paid to run a parathread.
* This should include the cost for storing the genesis head and validation code.
**/
paraDeposit: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
scheduler: {
/**
* The maximum weight that may be scheduled per block for any dispatchables of less
* priority than `schedule::HARD_DEADLINE`.
**/
maximumWeight: u64 & AugmentedConst<ApiType>;
/**
* The maximum number of scheduled calls in the queue for a single block.
* Not strictly enforced, but used for weight estimation.
**/
maxScheduledPerBlock: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
slots: {
/**
* The number of blocks to offset each lease period by.
**/
leaseOffset: u32 & AugmentedConst<ApiType>;
/**
* The number of blocks over which a single period lasts.
**/
leasePeriod: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
staking: {
/**
* Number of eras that staked funds must remain bonded for.
**/
bondingDuration: u32 & AugmentedConst<ApiType>;
/**
* Maximum number of nominations per nominator.
**/
maxNominations: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of nominators rewarded for each validator.
*
* For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can
* claim their reward. This used to limit the i/o cost for the nominator payout.
**/
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of `unlocking` chunks a [`StakingLedger`] can have. Effectively
* determines how many unique eras a staker may be unbonding in.
**/
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
/**
* Number of sessions per era.
**/
sessionsPerEra: u32 & AugmentedConst<ApiType>;
/**
* Number of eras that slashes are deferred by, after computation.
*
* This should be less than the bonding duration. Set to 0 if slashes
* should be applied immediately, without opportunity for intervention.
**/
slashDeferDuration: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
system: {
/**
* Maximum number of block number to block hash mappings to keep (oldest pruned first).
**/
blockHashCount: u32 & AugmentedConst<ApiType>;
/**
* The maximum length of a block (in bytes).
**/
blockLength: FrameSystemLimitsBlockLength & AugmentedConst<ApiType>;
/**
* Block & extrinsics weights: base values and limits.
**/
blockWeights: FrameSystemLimitsBlockWeights & AugmentedConst<ApiType>;
/**
* The weight of runtime database operations the runtime can invoke.
**/
dbWeight: FrameSupportWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
/**
* The designated SS85 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
* an identifier of the chain.
**/
ss58Prefix: u16 & AugmentedConst<ApiType>;
/**
* Get the chain's current version.
**/
version: SpVersionRuntimeVersion & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
timestamp: {
/**
* The minimum period between blocks. Beware that this is different to the *expected*
* period that the block production apparatus provides. Your chosen consensus system will
* generally work with this to determine a sensible block time. e.g. For Aura, it will be
* double this period on default settings.
**/
minimumPeriod: u64 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
tips: {
/**
* The amount held on deposit per byte within the tip report reason or bounty description.
**/
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
/**
* Maximum acceptable reason length.
*
* Benchmarks depend on this value, be sure to update weights file when changing this value
**/
maximumReasonLength: u32 & AugmentedConst<ApiType>;
/**
* The period for which a tip remains open after is has achieved threshold tippers.
**/
tipCountdown: u32 & AugmentedConst<ApiType>;
/**
* The percent of the final tip which goes to the original reporter of the tip.
**/
tipFindersFee: Percent & AugmentedConst<ApiType>;
/**
* The amount held on deposit for placing a tip report.
**/
tipReportDepositBase: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
transactionPayment: {
/**
* A fee mulitplier for `Operational` extrinsics to compute "virtual tip" to boost their
* `priority`
*
* This value is multipled by the `final_fee` to obtain a "virtual tip" that is later
* added to a tip component in regular `priority` calculations.
* It means that a `Normal` transaction can front-run a similarly-sized `Operational`
* extrinsic (with no tip), by including a tip value greater than the virtual tip.
*
* ```rust,ignore
* // For `Normal`
* let priority = priority_calc(tip);
*
* // For `Operational`
* let virtual_tip = (inclusion_fee + tip) * OperationalFeeMultiplier;
* let priority = priority_calc(tip + virtual_tip);
* ```
*
* Note that since we use `final_fee` the multiplier applies also to the regular `tip`
* sent with the transaction. So, not only does the transaction get a priority bump based
* on the `inclusion_fee`, but we also amplify the impact of tips applied to `Operational`
* transactions.
**/
operationalFeeMultiplier: u8 & AugmentedConst<ApiType>;
/**
* The fee to be paid for making a transaction; the per-byte portion.
**/
transactionByteFee: u128 & AugmentedConst<ApiType>;
/**
* The polynomial that is applied in order to derive fee from weight.
**/
weightToFee: Vec<FrameSupportWeightsWeightToFeeCoefficient> & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
treasury: {
/**
* Percentage of spare funds (if any) that are burnt per spend period.
**/
burn: Permill & AugmentedConst<ApiType>;
/**
* The maximum number of approvals that can wait in the spending queue.
*
* NOTE: This parameter is also used within the Bounties Pallet extension if enabled.
**/
maxApprovals: u32 & AugmentedConst<ApiType>;
/**
* The treasury's pallet id, used for deriving its sovereign account ID.
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* Fraction of a proposal's value that should be bonded in order to place the proposal.
* An accepted proposal gets these back. A rejected proposal does not.
**/
proposalBond: Permill & AugmentedConst<ApiType>;
/**
* Maximum amount of funds that should be placed in a deposit for making a proposal.
**/
proposalBondMaximum: Option<u128> & AugmentedConst<ApiType>;
/**
* Minimum amount of funds that should be placed in a deposit for making a proposal.
**/
proposalBondMinimum: u128 & AugmentedConst<ApiType>;
/**
* Period between successive spends.
**/
spendPeriod: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
utility: {
/**
* The limit on the number of batched calls.
**/
batchedCallsLimit: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
vesting: {
maxVestingSchedules: u32 & AugmentedConst<ApiType>;
/**
* The minimum amount transferred to call `vested_transfer`.
**/
minVestedTransfer: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
} // AugmentedConsts
} // declare module
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '../base';
import './consts';
import './errors';
import './events';
import './query';
import './registry';
import './tx';
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,5 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@polkadot/types-augment/registry/substrate';
import '@polkadot/types-augment/registry/polkadot';
File diff suppressed because it is too large Load Diff
@@ -2,7 +2,7 @@
/* eslint-disable */
import type { ApiTypes } from '@polkadot/api-base/types';
import type { U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { Codec } from '@polkadot/types-codec/types';
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletContractsSchedule, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
@@ -81,23 +81,23 @@ declare module '@polkadot/api-base/types/consts' {
/**
* The list of thresholds separating the various bags.
*
* Ids are separated into unsorted bags according to their vote weight. This specifies the
* thresholds separating the bags. An id's bag is the largest bag for which the id's weight
* Ids are separated into unsorted bags according to their score. This specifies the
* thresholds separating the bags. An id's bag is the largest bag for which the id's score
* is less than or equal to its upper threshold.
*
* When ids are iterated, higher bags are iterated completely before lower bags. This means
* that iteration is _semi-sorted_: ids of higher weight tend to come before ids of lower
* weight, but peer ids within a particular bag are sorted in insertion order.
* that iteration is _semi-sorted_: ids of higher score tend to come before ids of lower
* score, but peer ids within a particular bag are sorted in insertion order.
*
* # Expressing the constant
*
* This constant must be sorted in strictly increasing order. Duplicate items are not
* permitted.
*
* There is an implied upper limit of `VoteWeight::MAX`; that value does not need to be
* There is an implied upper limit of `Score::MAX`; that value does not need to be
* specified within the bag. For any two threshold lists, if one ends with
* `VoteWeight::MAX`, the other one does not, and they are otherwise equal, the two lists
* will behave identically.
* `Score::MAX`, the other one does not, and they are otherwise equal, the two
* lists will behave identically.
*
* # Calculation
*
@@ -115,8 +115,8 @@ declare module '@polkadot/api-base/types/consts' {
* the procedure given above, then the constant ratio is equal to 2.
* - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to
* the procedure given above, then the constant ratio is approximately equal to 1.248.
* - If the threshold list begins `[1, 2, 3, ...]`, then an id with weight 0 or 1 will fall
* into bag 0, an id with weight 2 will fall into bag 1, etc.
* - If the threshold list begins `[1, 2, 3, ...]`, then an id with score 0 or 1 will fall
* into bag 0, an id with score 2 will fall into bag 1, etc.
*
* # Migration
*
@@ -149,11 +149,6 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec;
};
bounties: {
/**
* Percentage of the curator fee that will be reserved upfront as deposit for bounty
* curator.
**/
bountyCuratorDeposit: Permill & AugmentedConst<ApiType>;
/**
* The amount held on deposit for placing a bounty proposal.
**/
@@ -170,6 +165,21 @@ declare module '@polkadot/api-base/types/consts' {
* Minimum value for a bounty.
**/
bountyValueMinimum: u128 & AugmentedConst<ApiType>;
/**
* Maximum amount of funds that should be placed in a deposit for making a proposal.
**/
curatorDepositMax: Option<u128> & AugmentedConst<ApiType>;
/**
* Minimum amount of funds that should be placed in a deposit for making a proposal.
**/
curatorDepositMin: Option<u128> & AugmentedConst<ApiType>;
/**
* The curator deposit is calculated as a percentage of the curator fee.
*
* This deposit has optional upper and lower bounds with `CuratorDepositMax` and
* `CuratorDepositMin`.
**/
curatorDepositMultiplier: Permill & AugmentedConst<ApiType>;
/**
* The amount held on deposit per byte within the tip report reason or bounty description.
**/
@@ -186,11 +196,6 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec;
};
childBounties: {
/**
* Percentage of child-bounty value to be reserved as curator deposit
* when curator fee is zero.
**/
childBountyCuratorDepositBase: Permill & AugmentedConst<ApiType>;
/**
* Minimum value for a child-bounty.
**/
@@ -206,11 +211,30 @@ declare module '@polkadot/api-base/types/consts' {
};
contracts: {
/**
* The maximum number of tries that can be queued for deletion.
* The maximum number of contracts that can be pending for deletion.
*
* When a contract is deleted by calling `seal_terminate` it becomes inaccessible
* immediately, but the deletion of the storage items it has accumulated is performed
* later. The contract is put into the deletion queue. This defines how many
* contracts can be queued up at the same time. If that limit is reached `seal_terminate`
* will fail. The action must be retried in a later block in that case.
*
* The reasons for limiting the queue depth are:
*
* 1. The queue is in storage in order to be persistent between blocks. We want to limit
* the amount of storage that can be consumed.
* 2. The queue is stored in a vector and needs to be decoded as a whole when reading
* it at the end of each block. Longer queues take more weight to decode and hence
* limit the amount of items that can be deleted per block.
**/
deletionQueueDepth: u32 & AugmentedConst<ApiType>;
/**
* The maximum amount of weight that can be consumed per block for lazy trie removal.
*
* The amount of weight that is dedicated per block to work on the deletion queue. Larger
* values allow more trie keys to be deleted in each block but reduce the amount of
* weight that is left for transactions. See [`Self::DeletionQueueDepth`] for more
* information about the deletion queue.
**/
deletionWeightLimit: u64 & AugmentedConst<ApiType>;
/**
@@ -223,6 +247,7 @@ declare module '@polkadot/api-base/types/consts' {
depositPerByte: u128 & AugmentedConst<ApiType>;
/**
* The amount of balance a caller has to pay for each storage item.
*
* # Note
*
* Changing this value for an existing chain might need a storage migration.
@@ -237,6 +262,26 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
convictionVoting: {
/**
* The maximum number of concurrent votes an account may have.
*
* Also used to compute weight, an overly large value can
* lead to extrinsic with large weight estimation: see `delegate` for instance.
**/
maxVotes: u32 & AugmentedConst<ApiType>;
/**
* The minimum period of vote locking.
*
* It should be no shorter than enactment period to ensure that in the case of an approval,
* those successful voters are locked into the consequences that their votes entail.
**/
voteLockingPeriod: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
democracy: {
/**
* Period in blocks where an external proposal may not be re-submitted after being vetoed.
@@ -300,6 +345,16 @@ declare module '@polkadot/api-base/types/consts' {
[key: string]: Codec;
};
electionProviderMultiPhase: {
/**
* The maximum number of electable targets to put in the snapshot.
**/
maxElectableTargets: u16 & AugmentedConst<ApiType>;
/**
* The maximum number of electing voters to put in the snapshot. At the moment, snapshots
* are only over a single block, but once multi-block elections are introduced they will
* take place over multiple blocks.
**/
maxElectingVoters: u32 & AugmentedConst<ApiType>;
/**
* Maximum length (bytes) that the mined solution should consume.
*
@@ -370,15 +425,6 @@ declare module '@polkadot/api-base/types/consts' {
* Duration of the unsigned phase.
**/
unsignedPhase: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of voters to put in the snapshot. At the moment, snapshots are only
* over a single block, but once multi-block elections are introduced they will take place
* over multiple blocks.
*
* Also, note the data type: If the voters are represented by a `u32` in `type
* CompactSolution`, the same `u32` is used here to ensure bounds are respected.
**/
voterSnapshotPerBlock: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
@@ -645,8 +691,13 @@ declare module '@polkadot/api-base/types/consts' {
friendDepositFactor: u128 & AugmentedConst<ApiType>;
/**
* The maximum amount of friends allowed in a recovery configuration.
*
* NOTE: The threshold programmed in this Pallet uses u16, so it does
* not really make sense to have a limit here greater than u16::MAX.
* But also, that is a lot more than you should probably set this value
* to anyway...
**/
maxFriends: u16 & AugmentedConst<ApiType>;
maxFriends: u32 & AugmentedConst<ApiType>;
/**
* The base amount of currency needed to reserve for starting a recovery.
*
@@ -662,6 +713,31 @@ declare module '@polkadot/api-base/types/consts' {
**/
[key: string]: Codec;
};
referenda: {
/**
* Quantization level for the referendum wakeup scheduler. A higher number will result in
* fewer storage reads/writes needed for smaller voters, but also result in delays to the
* automatic referendum status changes. Explicit servicing instructions are unaffected.
**/
alarmInterval: u32 & AugmentedConst<ApiType>;
/**
* Maximum size of the referendum queue for a single track.
**/
maxQueued: u32 & AugmentedConst<ApiType>;
/**
* The minimum amount to be used as a deposit for a public referendum proposal.
**/
submissionDeposit: u128 & AugmentedConst<ApiType>;
/**
* The number of blocks after submission that a referendum must begin being decided by.
* Once this passes, then anyone may cancel the referendum.
**/
undecidingTimeout: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
scheduler: {
/**
* The maximum weight that may be scheduled per block for any dispatchables of less
@@ -727,6 +803,9 @@ declare module '@polkadot/api-base/types/consts' {
* Number of eras that staked funds must remain bonded for.
**/
bondingDuration: u32 & AugmentedConst<ApiType>;
/**
* Maximum number of nominations per nominator.
**/
maxNominations: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of nominators rewarded for each validator.
@@ -735,6 +814,11 @@ declare module '@polkadot/api-base/types/consts' {
* claim their reward. This used to limit the i/o cost for the nominator payout.
**/
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of `unlocking` chunks a [`StakingLedger`] can have. Effectively
* determines how many unique eras a staker may be unbonding in.
**/
maxUnlockingChunks: u32 & AugmentedConst<ApiType>;
/**
* Number of sessions per era.
**/
@@ -871,6 +955,8 @@ declare module '@polkadot/api-base/types/consts' {
burn: Permill & AugmentedConst<ApiType>;
/**
* The maximum number of approvals that can wait in the spending queue.
*
* NOTE: This parameter is also used within the Bounties Pallet extension if enabled.
**/
maxApprovals: u32 & AugmentedConst<ApiType>;
/**
@@ -882,6 +968,10 @@ declare module '@polkadot/api-base/types/consts' {
* An accepted proposal gets these back. A rejected proposal does not.
**/
proposalBond: Permill & AugmentedConst<ApiType>;
/**
* Maximum amount of funds that should be placed in a deposit for making a proposal.
**/
proposalBondMaximum: Option<u128> & AugmentedConst<ApiType>;
/**
* Minimum amount of funds that should be placed in a deposit for making a proposal.
**/
@@ -131,7 +131,7 @@ declare module '@polkadot/api-base/types/errors' {
**/
IdNotFound: AugmentedError<ApiType>;
/**
* An Id does not have a greater vote weight than another Id.
* An Id does not have a greater score than another Id.
**/
NotHeavier: AugmentedError<ApiType>;
/**
@@ -219,6 +219,10 @@ declare module '@polkadot/api-base/types/errors' {
* Require bounty curator.
**/
RequireCurator: AugmentedError<ApiType>;
/**
* Too many approvals are already queued.
**/
TooManyQueued: AugmentedError<ApiType>;
/**
* The bounty status is unexpected.
**/
@@ -255,6 +259,12 @@ declare module '@polkadot/api-base/types/errors' {
* No code could be found at the supplied code hash.
**/
CodeNotFound: AugmentedError<ApiType>;
/**
* The contract's code was found to be invalid during validation or instrumentation.
* A more detailed error can be found on the node console if debug messages are enabled
* or in the debug buffer which is returned to RPC clients.
**/
CodeRejected: AugmentedError<ApiType>;
/**
* The code supplied to `instantiate_with_code` exceeds the limit specified in the
* current schedule.
@@ -303,6 +313,10 @@ declare module '@polkadot/api-base/types/errors' {
* `seal_call` forwarded this contracts input. It therefore is no longer available.
**/
InputForwarded: AugmentedError<ApiType>;
/**
* Invalid combination of flags supplied to `seal_call` or `seal_delegate_call`.
**/
InvalidCallFlags: AugmentedError<ApiType>;
/**
* A new schedule must have a greater version than the current one.
**/
@@ -375,6 +389,61 @@ declare module '@polkadot/api-base/types/errors' {
**/
[key: string]: AugmentedError<ApiType>;
};
convictionVoting: {
/**
* The account is already delegating.
**/
AlreadyDelegating: AugmentedError<ApiType>;
/**
* The account currently has votes attached to it and the operation cannot succeed until
* these are removed, either through `unvote` or `reap_vote`.
**/
AlreadyVoting: AugmentedError<ApiType>;
/**
* The class ID supplied is invalid.
**/
BadClass: AugmentedError<ApiType>;
/**
* The class must be supplied since it is not easily determinable from the state.
**/
ClassNeeded: AugmentedError<ApiType>;
/**
* Too high a balance was provided that the account cannot afford.
**/
InsufficientFunds: AugmentedError<ApiType>;
/**
* Maximum number of votes reached.
**/
MaxVotesReached: AugmentedError<ApiType>;
/**
* Delegation to oneself makes no sense.
**/
Nonsense: AugmentedError<ApiType>;
/**
* The actor has no permission to conduct the action.
**/
NoPermission: AugmentedError<ApiType>;
/**
* The actor has no permission to conduct the action right now but will do in the future.
**/
NoPermissionYet: AugmentedError<ApiType>;
/**
* The account is not currently delegating.
**/
NotDelegating: AugmentedError<ApiType>;
/**
* Poll is not ongoing.
**/
NotOngoing: AugmentedError<ApiType>;
/**
* The given account did not vote on the poll.
**/
NotVoter: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
council: {
/**
* Members are already initialized!
@@ -545,6 +614,10 @@ declare module '@polkadot/api-base/types/errors' {
* The call is not allowed at this point.
**/
CallNotAllowed: AugmentedError<ApiType>;
/**
* The fallback failed
**/
FallbackFailed: AugmentedError<ApiType>;
/**
* `Self::insert_submission` returned an invalid index.
**/
@@ -1083,6 +1156,56 @@ declare module '@polkadot/api-base/types/errors' {
**/
[key: string]: AugmentedError<ApiType>;
};
referenda: {
/**
* The referendum index provided is invalid in this context.
**/
BadReferendum: AugmentedError<ApiType>;
/**
* The track identifier given was invalid.
**/
BadTrack: AugmentedError<ApiType>;
/**
* There are already a full complement of referendums in progress for this track.
**/
Full: AugmentedError<ApiType>;
/**
* Referendum's decision deposit is already paid.
**/
HasDeposit: AugmentedError<ApiType>;
/**
* The deposit cannot be refunded since none was made.
**/
NoDeposit: AugmentedError<ApiType>;
/**
* The deposit refunder is not the depositor.
**/
NoPermission: AugmentedError<ApiType>;
/**
* There was nothing to do in the advancement.
**/
NothingToDo: AugmentedError<ApiType>;
/**
* Referendum is not ongoing.
**/
NotOngoing: AugmentedError<ApiType>;
/**
* No track exists for the proposal origin.
**/
NoTrack: AugmentedError<ApiType>;
/**
* The queue of the track is empty.
**/
QueueEmpty: AugmentedError<ApiType>;
/**
* Any deposit cannot be refunded until after the decision is over.
**/
Unfinished: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
scheduler: {
/**
* Failed to schedule a call
@@ -1315,6 +1438,32 @@ declare module '@polkadot/api-base/types/errors' {
**/
[key: string]: AugmentedError<ApiType>;
};
stateTrieMigration: {
/**
* bad witness data provided.
**/
BadWitness: AugmentedError<ApiType>;
/**
* max signed limits not respected.
**/
MaxSignedLimits: AugmentedError<ApiType>;
/**
* submitter does not have enough funds.
**/
NotEnoughFunds: AugmentedError<ApiType>;
/**
* Signed migration is not allowed because the maximum limit is not set yet.
**/
SignedMigrationNotAllowed: AugmentedError<ApiType>;
/**
* upper bound of size is exceeded,
**/
SizeUpperBoundExceeded: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
sudo: {
/**
* Sender must be the Sudo account
@@ -1550,6 +1699,10 @@ declare module '@polkadot/api-base/types/errors' {
* The signing account has no permission to do the operation.
**/
NoPermission: AugmentedError<ApiType>;
/**
* The named owner has not signed ownership of the class is acceptable.
**/
Unaccepted: AugmentedError<ApiType>;
/**
* No approval exists that would allow the transfer.
**/
@@ -1557,7 +1710,7 @@ declare module '@polkadot/api-base/types/errors' {
/**
* The given asset ID is unknown.
**/
Unknown: AugmentedError<ApiType>;
UnknownClass: AugmentedError<ApiType>;
/**
* The delegate turned out to be different to what was expected.
**/
@@ -1608,5 +1761,31 @@ declare module '@polkadot/api-base/types/errors' {
**/
[key: string]: AugmentedError<ApiType>;
};
whitelist: {
/**
* The call was already whitelisted; No-Op.
**/
CallAlreadyWhitelisted: AugmentedError<ApiType>;
/**
* The call was not whitelisted.
**/
CallIsNotWhitelisted: AugmentedError<ApiType>;
/**
* The weight of the decoded call was higher than the witness.
**/
InvalidCallWeightWitness: AugmentedError<ApiType>;
/**
* The preimage of the call hash could not be loaded.
**/
UnavailablePreImage: AugmentedError<ApiType>;
/**
* The call could not be decoded.
**/
UndecodableCall: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
} // AugmentedErrors
} // declare module
@@ -5,7 +5,7 @@ import type { ApiTypes } from '@polkadot/api-base/types';
import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, H256 } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, NodeRuntimeProxyType, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletStakingExposure, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError } from '@polkadot/types/lookup';
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, FrameSupportWeightsPostDispatchInfo, NodeRuntimeProxyType, PalletConvictionVotingTally, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletStakingExposure, PalletStateTrieMigrationMigrationCompute, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError, SpRuntimeDispatchErrorWithPostInfo } from '@polkadot/types/lookup';
declare module '@polkadot/api-base/types/events' {
export interface AugmentedEvents<ApiType extends ApiTypes> {
@@ -211,6 +211,10 @@ declare module '@polkadot/api-base/types/events' {
* Code with the specified hash has been stored.
**/
CodeStored: AugmentedEvent<ApiType, [H256]>;
/**
* A contract's code was updated.
**/
ContractCodeUpdated: AugmentedEvent<ApiType, [AccountId32, H256, H256]>;
/**
* A custom event emitted by the contract.
**/
@@ -233,6 +237,20 @@ declare module '@polkadot/api-base/types/events' {
**/
[key: string]: AugmentedEvent<ApiType>;
};
convictionVoting: {
/**
* An account has delegated their vote to another account. \[who, target\]
**/
Delegated: AugmentedEvent<ApiType, [AccountId32, AccountId32]>;
/**
* An \[account\] has cancelled a previous delegation operation.
**/
Undelegated: AugmentedEvent<ApiType, [AccountId32]>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
council: {
/**
* A motion was approved by the required threshold.
@@ -645,6 +663,10 @@ declare module '@polkadot/api-base/types/events' {
* A proxy was executed correctly, with the given.
**/
ProxyExecuted: AugmentedEvent<ApiType, [Result<Null, SpRuntimeDispatchError>]>;
/**
* A proxy was removed.
**/
ProxyRemoved: AugmentedEvent<ApiType, [AccountId32, AccountId32, NodeRuntimeProxyType, u32]>;
/**
* Generic event
**/
@@ -680,6 +702,58 @@ declare module '@polkadot/api-base/types/events' {
**/
[key: string]: AugmentedEvent<ApiType>;
};
referenda: {
/**
* A referendum has been approved and its proposal has been scheduled.
**/
Approved: AugmentedEvent<ApiType, [u32]>;
/**
* A referendum has been cancelled.
**/
Cancelled: AugmentedEvent<ApiType, [u32, PalletConvictionVotingTally]>;
ConfirmAborted: AugmentedEvent<ApiType, [u32]>;
/**
* A referendum has ended its confirmation phase and is ready for approval.
**/
Confirmed: AugmentedEvent<ApiType, [u32, PalletConvictionVotingTally]>;
ConfirmStarted: AugmentedEvent<ApiType, [u32]>;
/**
* The decision deposit has been placed.
**/
DecisionDepositPlaced: AugmentedEvent<ApiType, [u32, AccountId32, u128]>;
/**
* The decision deposit has been refunded.
**/
DecisionDepositRefunded: AugmentedEvent<ApiType, [u32, AccountId32, u128]>;
/**
* A referendum has moved into the deciding phase.
**/
DecisionStarted: AugmentedEvent<ApiType, [u32, u8, H256, PalletConvictionVotingTally]>;
/**
* A deposit has been slashaed.
**/
DepositSlashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
* A referendum has been killed.
**/
Killed: AugmentedEvent<ApiType, [u32, PalletConvictionVotingTally]>;
/**
* A proposal has been rejected by referendum.
**/
Rejected: AugmentedEvent<ApiType, [u32, PalletConvictionVotingTally]>;
/**
* A referendum has being submitted.
**/
Submitted: AugmentedEvent<ApiType, [u32, u8, H256]>;
/**
* A referendum has been timed out without being decided.
**/
TimedOut: AugmentedEvent<ApiType, [u32, PalletConvictionVotingTally]>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
scheduler: {
/**
* The call for the provided hash was not found so the task has been aborted.
@@ -849,6 +923,29 @@ declare module '@polkadot/api-base/types/events' {
**/
[key: string]: AugmentedEvent<ApiType>;
};
stateTrieMigration: {
/**
* The auto migration task finished.
**/
AutoMigrationFinished: AugmentedEvent<ApiType, []>;
/**
* Migration got halted.
**/
Halted: AugmentedEvent<ApiType, []>;
/**
* Given number of `(top, child)` keys were migrated respectively, with the given
* `compute`.
**/
Migrated: AugmentedEvent<ApiType, [u32, u32, PalletStateTrieMigrationMigrationCompute]>;
/**
* Some account got slashed by the given amount.
**/
Slashed: AugmentedEvent<ApiType, [AccountId32, u128]>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
sudo: {
/**
* The \[sudoer\] just switched identity; the old key is supplied if one existed.
@@ -1116,6 +1213,10 @@ declare module '@polkadot/api-base/types/events' {
* The owner changed.
**/
OwnerChanged: AugmentedEvent<ApiType, [u32, AccountId32]>;
/**
* Ownership acceptance has changed for an account.
**/
OwnershipAcceptanceChanged: AugmentedEvent<ApiType, [AccountId32, Option<u32>]>;
/**
* Metadata has been cleared for an asset instance.
**/
@@ -1175,5 +1276,14 @@ declare module '@polkadot/api-base/types/events' {
**/
[key: string]: AugmentedEvent<ApiType>;
};
whitelist: {
CallWhitelisted: AugmentedEvent<ApiType, [H256]>;
WhitelistedCallDispatched: AugmentedEvent<ApiType, [H256, Result<FrameSupportWeightsPostDispatchInfo, SpRuntimeDispatchErrorWithPostInfo>]>;
WhitelistedCallRemoved: AugmentedEvent<ApiType, [H256]>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
} // AugmentedEvents
} // declare module
@@ -0,0 +1,10 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '../base';
import './consts';
import './errors';
import './events';
import './query';
import './registry';
import './tx';
@@ -3,10 +3,10 @@
import type { ApiTypes } from '@polkadot/api-base/types';
import type { Data } from '@polkadot/types';
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u32, u64, u8 } from '@polkadot/types-codec';
import type { BTreeMap, Bytes, Null, Option, U8aFixed, Vec, WrapperKeepOpaque, WrapperOpaque, bool, u128, u32, u64, u8 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, NodeRuntimeSessionKeys, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageDeletedContract, PalletContractsStorageRawContractInfo, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerReleases, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesClassDetails, PalletUniquesClassMetadata, PalletUniquesInstanceDetails, PalletUniquesInstanceMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, NodeRuntimeSessionKeys, PalletAssetsApproval, PalletAssetsAssetAccount, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletCollectiveVotes, PalletContractsStorageDeletedContract, PalletContractsStorageRawContractInfo, PalletContractsWasmOwnerInfo, PalletContractsWasmPrefabWasmModule, PalletConvictionVotingVoteVoting, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfo, PalletSchedulerScheduledV3, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesClassDetails, PalletUniquesClassMetadata, PalletUniquesInstanceDetails, PalletUniquesInstanceMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpAuthorityDiscoveryAppPublic, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
import type { Observable } from '@polkadot/types/types';
declare module '@polkadot/api-base/types/storage' {
@@ -193,8 +193,29 @@ declare module '@polkadot/api-base/types/storage' {
};
balances: {
/**
* The balance of an account.
* The Balances pallet example of storing the balance of an account.
*
* # Example
*
* ```nocompile
* impl pallet_balances::Config for Runtime {
* type AccountStore = StorageMapShim<Self::Account<Runtime>, frame_system::Provider<Runtime>, AccountId, Self::AccountData<Balance>>
* }
* ```
*
* You can also store the balance of an account in the `System` pallet.
*
* # Example
*
* ```nocompile
* impl pallet_balances::Config for Runtime {
* type AccountStore = System
* }
* ```
*
* But this comes with tradeoffs, storing account balances in the system pallet stores
* `frame_system` data alongside the account data contrary to storing account balances in the
* `Balances` pallet, which uses a `StorageMap` to store balances data only.
* NOTE: This is only used in the case that this pallet is used to store balances.
**/
account: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<PalletBalancesAccountData>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
@@ -272,10 +293,6 @@ declare module '@polkadot/api-base/types/storage' {
[key: string]: QueryableStorageEntry<ApiType>;
};
contracts: {
/**
* The subtrie counter.
**/
accountCounter: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
/**
* A mapping between an original code hash and instrumented wasm code, ready for execution.
**/
@@ -293,6 +310,31 @@ declare module '@polkadot/api-base/types/storage' {
* stored in said trie. Therefore this operation is performed lazily in `on_initialize`.
**/
deletionQueue: AugmentedQuery<ApiType, () => Observable<Vec<PalletContractsStorageDeletedContract>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* This is a **monotonic** counter incremented on contract instantiation.
*
* This is used in order to generate unique trie ids for contracts.
* The trie id of a new contract is calculated from hash(account_id, nonce).
* The nonce is required because otherwise the following sequence would lead to
* a possible collision of storage:
*
* 1. Create a new contract.
* 2. Terminate the contract.
* 3. Immediately recreate the contract with the same account_id.
*
* This is bad because the contents of a trie are deleted lazily and there might be
* storage of the old instantiation still in it when the new contract is created. Please
* note that we can't replace the counter by the block number because the sequence above
* can happen in the same block. We also can't keep the account counter in memory only
* because storage is the only way to communicate across different extrinsics in the
* same block.
*
* # Note
*
* Do not use it to determine the number of contracts. It won't be decremented if
* a contract is destroyed.
**/
nonce: AugmentedQuery<ApiType, () => Observable<u64>, []> & QueryableStorageEntry<ApiType, []>;
/**
* A mapping between an original code hash and its owner information.
**/
@@ -306,6 +348,23 @@ declare module '@polkadot/api-base/types/storage' {
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
convictionVoting: {
/**
* The voting classes which have a non-zero lock requirement and the lock amounts which they
* require. The actual amount locked on behalf of this pallet should always be the maximum of
* this list.
**/
classLocksFor: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<ITuple<[u8, u128]>>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* All voting for a particular voter in a particular voting class. We store the balance for the
* number of votes that we have recorded.
**/
votingFor: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u8 | AnyNumber | Uint8Array) => Observable<PalletConvictionVotingVoteVoting>, [AccountId32, u8]> & QueryableStorageEntry<ApiType, [AccountId32, u8]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
council: {
/**
* The current members of the collective. This is stored sorted (just by value).
@@ -357,13 +416,6 @@ declare module '@polkadot/api-base/types/storage' {
* proposal.
**/
lastTabledWasExternal: AugmentedQuery<ApiType, () => Observable<bool>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Accounts for which there are locks in action which may be removed at some point in the
* future. The value is the block number at which the lock expires and may be removed.
*
* TWOX-NOTE: OK `AccountId` is a secure hash.
**/
locks: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* The lowest referendum index representing an unbaked referendum. Equal to
* `ReferendumCount` if there isn't a unbaked referendum.
@@ -434,7 +486,7 @@ declare module '@polkadot/api-base/types/storage' {
*
* Can be set via `set_minimum_untrusted_score`.
**/
minimumUntrustedScore: AugmentedQuery<ApiType, () => Observable<Option<Vec<u128>>>, []> & QueryableStorageEntry<ApiType, []>;
minimumUntrustedScore: AugmentedQuery<ApiType, () => Observable<Option<SpNposElectionsElectionScore>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Current best solution, signed or unsigned, queued to be returned upon `elect`.
**/
@@ -456,7 +508,7 @@ declare module '@polkadot/api-base/types/storage' {
* can be quite large, so we're willing to pay the cost of multiple database accesses to access
* them one at a time instead of reading and decoding all of them at once.
**/
signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<BTreeMap<Vec<u128>, u32>>, []> & QueryableStorageEntry<ApiType, []>;
signedSubmissionIndices: AugmentedQuery<ApiType, () => Observable<BTreeMap<SpNposElectionsElectionScore, u32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The next index to be assigned to an incoming signed submission.
*
@@ -723,7 +775,7 @@ declare module '@polkadot/api-base/types/storage' {
[key: string]: QueryableStorageEntry<ApiType>;
};
multisig: {
calls: AugmentedQuery<ApiType, (arg: U8aFixed | string | Uint8Array) => Observable<Option<ITuple<[Bytes, AccountId32, u128]>>>, [U8aFixed]> & QueryableStorageEntry<ApiType, [U8aFixed]>;
calls: AugmentedQuery<ApiType, (arg: U8aFixed | string | Uint8Array) => Observable<Option<ITuple<[WrapperKeepOpaque<Call>, AccountId32, u128]>>>, [U8aFixed]> & QueryableStorageEntry<ApiType, [U8aFixed]>;
/**
* The set of open multisig operations.
**/
@@ -820,6 +872,31 @@ declare module '@polkadot/api-base/types/storage' {
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
referenda: {
/**
* The number of referenda being decided currently.
**/
decidingCount: AugmentedQuery<ApiType, (arg: u8 | AnyNumber | Uint8Array) => Observable<u32>, [u8]> & QueryableStorageEntry<ApiType, [u8]>;
/**
* The next free referendum index, aka the number of referenda started so far.
**/
referendumCount: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Information concerning any given referendum.
**/
referendumInfoFor: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletReferendaReferendumInfo>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* The sorted list of referenda ready to be decided but not yet being decided, ordered by
* conviction-weighted approvals.
*
* This should be empty if `DecidingCount` is less than `TrackInfo::max_deciding`.
**/
trackQueue: AugmentedQuery<ApiType, (arg: u8 | AnyNumber | Uint8Array) => Observable<Vec<ITuple<[u32, u128]>>>, [u8]> & QueryableStorageEntry<ApiType, [u8]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
scheduler: {
/**
* Items to be executed, indexed by the block number that they should be executed on.
@@ -829,12 +906,6 @@ declare module '@polkadot/api-base/types/storage' {
* Lookup from identity to the block number and index of the task.
**/
lookup: AugmentedQuery<ApiType, (arg: Bytes | string | Uint8Array) => Observable<Option<ITuple<[u32, u32]>>>, [Bytes]> & QueryableStorageEntry<ApiType, [Bytes]>;
/**
* Storage version of the pallet.
*
* New networks start with last version.
**/
storageVersion: AugmentedQuery<ApiType, () => Observable<PalletSchedulerReleases>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Generic query
**/
@@ -1115,7 +1186,22 @@ declare module '@polkadot/api-base/types/storage' {
**/
minValidatorBond: AugmentedQuery<ApiType, () => Observable<u128>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The map from nominator stash key to the set of stash keys of all validators to nominate.
* The map from nominator stash key to their nomination preferences, namely the validators that
* they wish to support.
*
* Note that the keys of this storage map might become non-decodable in case the
* [`Config::MaxNominations`] configuration is decreased. In this rare case, these nominators
* are still existent in storage, their key is correct and retrievable (i.e. `contains_key`
* indicates that they exist), but their value cannot be decoded. Therefore, the non-decodable
* nominators will effectively not-exist, until they re-submit their preferences such that it
* is within the bounds of the newly set `Config::MaxNominations`.
*
* This implies that `::iter_keys().count()` and `::iter().count()` might return different
* values for this map. Moreover, the main `::count()` is aligned with the former, namely the
* number of keys that exist.
*
* Lastly, if any of the nominators become non-decodable, they can be chilled immediately via
* [`Call::chill_other`] dispatchable by anyone.
**/
nominators: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletStakingNominations>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
@@ -1182,6 +1268,31 @@ declare module '@polkadot/api-base/types/storage' {
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
stateTrieMigration: {
/**
* The limits that are imposed on automatic migrations.
*
* If set to None, then no automatic migration happens.
**/
autoLimits: AugmentedQuery<ApiType, () => Observable<Option<PalletStateTrieMigrationMigrationLimits>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Migration progress.
*
* This stores the snapshot of the last migrated keys. It can be set into motion and move
* forward by any of the means provided by this pallet.
**/
migrationProcess: AugmentedQuery<ApiType, () => Observable<PalletStateTrieMigrationMigrationTask>, []> & QueryableStorageEntry<ApiType, []>;
/**
* The maximum limits that the signed migration could use.
*
* If not set, no signed submission is allowed.
**/
signedMigrationMaxLimits: AugmentedQuery<ApiType, () => Observable<Option<PalletStateTrieMigrationMigrationLimits>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
sudo: {
/**
* The `AccountId` of the sudo key.
@@ -1447,6 +1558,10 @@ declare module '@polkadot/api-base/types/storage' {
* Metadata of an asset instance.
**/
instanceMetadataOf: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesInstanceMetadata>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
/**
* The class, if any, of which an account is willing to take ownership.
**/
ownershipAcceptance: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<u32>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* Generic query
**/
@@ -1468,5 +1583,12 @@ declare module '@polkadot/api-base/types/storage' {
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
whitelist: {
whitelistedCall: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<Null>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
} // AugmentedQueries
} // declare module
@@ -0,0 +1,4 @@
// Copyright 2017-2022 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@polkadot/types-augment/registry/substrate';
@@ -3,10 +3,10 @@
import type { ApiTypes } from '@polkadot/api-base/types';
import type { Data } from '@polkadot/types';
import type { Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { Bytes, Compact, Option, U8aFixed, Vec, WrapperKeepOpaque, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportScheduleMaybeHashed, NodeRuntimeOriginCaller, NodeRuntimeProxyType, NodeRuntimeSessionKeys, PalletAssetsDestroyWitness, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletSocietyJudgement, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsSupport, SpRuntimeHeader, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof } from '@polkadot/types/lookup';
import type { FrameSupportScheduleDispatchTime, FrameSupportScheduleMaybeHashed, NodeRuntimeOriginCaller, NodeRuntimeProxyType, NodeRuntimeSessionKeys, PalletAssetsDestroyWitness, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletDemocracyConviction, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletStateTrieMigrationMigrationLimits, PalletStateTrieMigrationMigrationTask, PalletStateTrieMigrationProgress, PalletUniquesDestroyWitness, PalletVestingVestingInfo, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusSlotsEquivocationProof, SpFinalityGrandpaEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeHeader, SpSessionMembershipProof, SpTransactionStorageProofTransactionStorageProof } from '@polkadot/types/lookup';
declare module '@polkadot/api-base/types/submittable' {
export interface AugmentedSubmittables<ApiType extends ApiTypes> {
@@ -494,12 +494,12 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Only works if
* - both nodes are within the same bag,
* - and `origin` has a greater `VoteWeight` than `lighter`.
* - and `origin` has a greater `Score` than `lighter`.
**/
putInFrontOf: AugmentedSubmittable<(lighter: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
* Declare that some `dislocated` account has, through rewards or penalties, sufficiently
* changed its weight that it should properly fall into a different bag than its current
* changed its score that it should properly fall into a different bag than its current
* one.
*
* Anyone can call this function about any potentially dislocated account.
@@ -533,7 +533,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Set the balances of a given account.
*
* This will alter `FreeBalance` and `ReservedBalance` in storage. it will
* also decrease the total issuance of the system (`TotalIssuance`).
* also alter the total issuance of the system (`TotalIssuance`) appropriately.
* If the new free or reserved balance is below the existential deposit,
* it will reset the account nonce (`frame_system::AccountNonce`).
*
@@ -544,7 +544,6 @@ declare module '@polkadot/api-base/types/submittable' {
* Transfer some liquid free balance to another account.
*
* `transfer` will set the `FreeBalance` of the sender and receiver.
* It will decrease the total issuance of the system by the `TransferFee`.
* If the sender's account is below the existential deposit as a result
* of the transfer, the account will be reaped.
*
@@ -986,6 +985,130 @@ declare module '@polkadot/api-base/types/submittable' {
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
convictionVoting: {
/**
* Delegate the voting power (with some given conviction) of the sending account for a
* particular class of polls.
*
* The balance delegated is locked for as long as it's delegated, and thereafter for the
* time appropriate for the conviction's lock period.
*
* The dispatch origin of this call must be _Signed_, and the signing account must either:
* - be delegating already; or
* - have no voting activity (if there is, then it will need to be removed/consolidated
* through `reap_vote` or `unvote`).
*
* - `to`: The account whose voting the `target` account's voting power will follow.
* - `class`: The class of polls to delegate. To delegate multiple classes, multiple calls
* to this function are required.
* - `conviction`: The conviction that will be attached to the delegated votes. When the
* account is undelegated, the funds will be locked for the corresponding period.
* - `balance`: The amount of the account's balance to be used in delegating. This must not
* be more than the account's current balance.
*
* Emits `Delegated`.
*
* Weight: `O(R)` where R is the number of polls the voter delegating to has
* voted on. Weight is initially charged as if maximum votes, but is refunded later.
**/
delegate: AugmentedSubmittable<(clazz: u8 | AnyNumber | Uint8Array, to: AccountId32 | string | Uint8Array, conviction: PalletConvictionVotingConviction | 'None' | 'Locked1x' | 'Locked2x' | 'Locked3x' | 'Locked4x' | 'Locked5x' | 'Locked6x' | number | Uint8Array, balance: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u8, AccountId32, PalletConvictionVotingConviction, u128]>;
/**
* Remove a vote for a poll.
*
* If the `target` is equal to the signer, then this function is exactly equivalent to
* `remove_vote`. If not equal to the signer, then the vote must have expired,
* either because the poll was cancelled, because the voter lost the poll or
* because the conviction period is over.
*
* The dispatch origin of this call must be _Signed_.
*
* - `target`: The account of the vote to be removed; this account must have voted for poll
* `index`.
* - `index`: The index of poll of the vote to be removed.
* - `class`: The class of the poll.
*
* Weight: `O(R + log R)` where R is the number of polls that `target` has voted on.
* Weight is calculated for the maximum number of vote.
**/
removeOtherVote: AugmentedSubmittable<(target: AccountId32 | string | Uint8Array, clazz: u8 | AnyNumber | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u8, u32]>;
/**
* Remove a vote for a poll.
*
* If:
* - the poll was cancelled, or
* - the poll is ongoing, or
* - the poll has ended such that
* - the vote of the account was in opposition to the result; or
* - there was no conviction to the account's vote; or
* - the account made a split vote
* ...then the vote is removed cleanly and a following call to `unlock` may result in more
* funds being available.
*
* If, however, the poll has ended and:
* - it finished corresponding to the vote of the account, and
* - the account made a standard vote with conviction, and
* - the lock period of the conviction is not over
* ...then the lock will be aggregated into the overall account's lock, which may involve
* *overlocking* (where the two locks are combined into a single lock that is the maximum
* of both the amount locked and the time is it locked for).
*
* The dispatch origin of this call must be _Signed_, and the signer must have a vote
* registered for poll `index`.
*
* - `index`: The index of poll of the vote to be removed.
* - `class`: Optional parameter, if given it indicates the class of the poll. For polls
* which have finished or are cancelled, this must be `Some`.
*
* Weight: `O(R + log R)` where R is the number of polls that `target` has voted on.
* Weight is calculated for the maximum number of vote.
**/
removeVote: AugmentedSubmittable<(clazz: Option<u8> | null | object | string | Uint8Array, index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<u8>, u32]>;
/**
* Undelegate the voting power of the sending account for a particular class of polls.
*
* Tokens may be unlocked following once an amount of time consistent with the lock period
* of the conviction with which the delegation was issued.
*
* The dispatch origin of this call must be _Signed_ and the signing account must be
* currently delegating.
*
* - `class`: The class of polls to remove the delegation from.
*
* Emits `Undelegated`.
*
* Weight: `O(R)` where R is the number of polls the voter delegating to has
* voted on. Weight is initially charged as if maximum votes, but is refunded later.
**/
undelegate: AugmentedSubmittable<(clazz: u8 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u8]>;
/**
* Remove the lock caused prior voting/delegating which has expired within a particluar
* class.
*
* The dispatch origin of this call must be _Signed_.
*
* - `class`: The class of polls to unlock.
* - `target`: The account to remove the lock on.
*
* Weight: `O(R)` with R number of vote of target.
**/
unlock: AugmentedSubmittable<(clazz: u8 | AnyNumber | Uint8Array, target: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u8, AccountId32]>;
/**
* Vote in a poll. If `vote.is_aye()`, the vote is to enact the proposal;
* otherwise it is a vote to keep the status quo.
*
* The dispatch origin of this call must be _Signed_.
*
* - `poll_index`: The index of the poll to vote for.
* - `vote`: The vote configuration.
*
* Weight: `O(R)` where R is the number of polls the voter has voted on.
**/
vote: AugmentedSubmittable<(pollIndex: Compact<u32> | AnyNumber | Uint8Array, vote: PalletConvictionVotingVoteAccountVote | { Standard: any } | { Split: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, PalletConvictionVotingVoteAccountVote]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
council: {
/**
* Close a vote that is either approved, disapproved or whose voting period has ended.
@@ -1478,6 +1601,13 @@ declare module '@polkadot/api-base/types/submittable' {
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
electionProviderMultiPhase: {
/**
* Trigger the governance fallback.
*
* This can only be called when [`Phase::Emergency`] is enabled, as an alternative to
* calling [`Call::set_emergency_election_result`].
**/
governanceFallback: AugmentedSubmittable<(maybeMaxVoters: Option<u32> | null | object | string | Uint8Array, maybeMaxTargets: Option<u32> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<u32>, Option<u32>]>;
/**
* Set a solution in the queue, to be handed out to the client of this pallet in the next
* call to `ElectionProvider::elect`.
@@ -1496,7 +1626,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* This check can be turned off by setting the value to `None`.
**/
setMinimumUntrustedScore: AugmentedSubmittable<(maybeNextScore: Option<Vec<u128>> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<Vec<u128>>]>;
setMinimumUntrustedScore: AugmentedSubmittable<(maybeNextScore: Option<SpNposElectionsElectionScore> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<SpNposElectionsElectionScore>]>;
/**
* Submit a solution for the signed phase.
*
@@ -1507,12 +1637,8 @@ declare module '@polkadot/api-base/types/submittable' {
*
* A deposit is reserved and recorded for the solution. Based on the outcome, the solution
* might be rewarded, slashed, or get all or a part of the deposit back.
*
* # <weight>
* Queue size must be provided as witness data.
* # </weight>
**/
submit: AugmentedSubmittable<(rawSolution: PalletElectionProviderMultiPhaseRawSolution | { solution?: any; score?: any; round?: any } | string | Uint8Array, numSignedSubmissions: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletElectionProviderMultiPhaseRawSolution, u32]>;
submit: AugmentedSubmittable<(rawSolution: PalletElectionProviderMultiPhaseRawSolution | { solution?: any; score?: any; round?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletElectionProviderMultiPhaseRawSolution]>;
/**
* Submit a solution for the unsigned phase.
*
@@ -1625,7 +1751,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - be less than the number of possible candidates. Note that all current members and
* runners-up are also automatically candidates for the next round.
*
* If `value` is more than `who`'s total balance, then the maximum of the two is used.
* If `value` is more than `who`'s free balance, then the maximum of the two is used.
*
* The dispatch origin of this call must be signed.
*
@@ -2266,7 +2392,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 | object | string | Uint8Array, call: Bytes | string | Uint8Array, storeCall: bool | boolean | Uint8Array, maxWeight: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, Bytes, bool, u64]>;
asMulti: AugmentedSubmittable<(threshold: u16 | AnyNumber | Uint8Array, otherSignatories: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[], maybeTimepoint: Option<PalletMultisigTimepoint> | null | object | string | Uint8Array, 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]>;
/**
* Immediately dispatch a multi-signature call using a single approval from the caller.
*
@@ -2752,6 +2878,82 @@ declare module '@polkadot/api-base/types/submittable' {
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
referenda: {
/**
* Cancel an ongoing referendum.
*
* - `origin`: must be the `CancelOrigin`.
* - `index`: The index of the referendum to be cancelled.
*
* Emits `Cancelled`.
**/
cancel: AugmentedSubmittable<(index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* Cancel an ongoing referendum and slash the deposits.
*
* - `origin`: must be the `KillOrigin`.
* - `index`: The index of the referendum to be cancelled.
*
* Emits `Killed` and `DepositSlashed`.
**/
kill: AugmentedSubmittable<(index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* Advance a referendum onto its next logical state. Only used internally.
*
* - `origin`: must be `Root`.
* - `index`: the referendum to be advanced.
**/
nudgeReferendum: AugmentedSubmittable<(index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* Advance a track onto its next logical state. Only used internally.
*
* - `origin`: must be `Root`.
* - `track`: the track to be advanced.
*
* Action item for when there is now one fewer referendum in the deciding phase and the
* `DecidingCount` is not yet updated. This means that we should either:
* - begin deciding another referendum (and leave `DecidingCount` alone); or
* - decrement `DecidingCount`.
**/
oneFewerDeciding: AugmentedSubmittable<(track: u8 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u8]>;
/**
* Post the Decision Deposit for a referendum.
*
* - `origin`: must be `Signed` and the account must have funds available for the
* referendum's track's Decision Deposit.
* - `index`: The index of the submitted referendum whose Decision Deposit is yet to be
* posted.
*
* Emits `DecisionDepositPlaced`.
**/
placeDecisionDeposit: AugmentedSubmittable<(index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* Refund the Decision Deposit for a closed referendum back to the depositor.
*
* - `origin`: must be `Signed` or `Root`.
* - `index`: The index of a closed referendum whose Decision Deposit has not yet been
* refunded.
*
* Emits `DecisionDepositRefunded`.
**/
refundDecisionDeposit: AugmentedSubmittable<(index: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* Propose a referendum on a privileged action.
*
* - `origin`: must be `Signed` and the account must have `SubmissionDeposit` funds
* available.
* - `proposal_origin`: The origin from which the proposal should be executed.
* - `proposal_hash`: The hash of the proposal preimage.
* - `enactment_moment`: The moment that the proposal should be enacted.
*
* Emits `Submitted`.
**/
submit: AugmentedSubmittable<(proposalOrigin: NodeRuntimeOriginCaller | { system: any } | { Void: any } | { Council: any } | { TechnicalCommittee: any } | string | Uint8Array, proposalHash: H256 | string | Uint8Array, enactmentMoment: FrameSupportScheduleDispatchTime | { At: any } | { After: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [NodeRuntimeOriginCaller, H256, FrameSupportScheduleDispatchTime]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
scheduler: {
/**
* Cancel an anonymously scheduled task.
@@ -3204,14 +3406,6 @@ declare module '@polkadot/api-base/types/submittable' {
* Can be called by the `T::SlashCancelOrigin`.
*
* Parameters: era and indices of the slashes for that era to kill.
*
* # <weight>
* Complexity: O(U + S)
* with U unapplied slashes weighted with U=1000
* and S is the number of slash indices to be canceled.
* - Read: Unapplied Slashes
* - Write: Unapplied Slashes
* # </weight>
**/
cancelDeferredSlash: AugmentedSubmittable<(era: u32 | AnyNumber | Uint8Array, slashIndices: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<u32>]>;
/**
@@ -3240,6 +3434,11 @@ declare module '@polkadot/api-base/types/submittable' {
*
* If the caller is different than the controller being targeted, the following conditions
* must be met:
*
* * `controller` must belong to a nominator who has become non-decodable,
*
* Or:
*
* * A `ChillThreshold` must be set and checked which defines how close to the max
* nominators or validators we must reach before users can start chilling one-another.
* * A `MaxNominatorCount` and `MaxValidatorCount` must be set which is used to determine
@@ -3252,6 +3451,12 @@ declare module '@polkadot/api-base/types/submittable' {
* who do not satisfy these requirements.
**/
chillOther: AugmentedSubmittable<(controller: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
* Force a validator to have at least the minimum commission. This will not affect a
* validator who already has a commission greater than or equal to the minimum. Any account
* can call this.
**/
forceApplyMinCommission: AugmentedSubmittable<(validatorStash: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
* Force there to be a new era at the end of the next session. After this, it will be
* reset to normal (non-forced) behaviour.
@@ -3281,11 +3486,6 @@ declare module '@polkadot/api-base/types/submittable' {
* The election process starts multiple blocks before the end of the era.
* If this is called just before a new era is triggered, the election process may not
* have enough blocks to get a result.
*
* # <weight>
* - Weight: O(1)
* - Write: ForceEra
* # </weight>
**/
forceNewEraAlways: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
/**
@@ -3310,13 +3510,6 @@ declare module '@polkadot/api-base/types/submittable' {
* Force a current staker to become completely unstaked, immediately.
*
* The dispatch origin must be Root.
*
* # <weight>
* O(S) where S is the number of slashing spans to be removed
* Reads: Bonded, Slashing Spans, Account, Locks
* Writes: Bonded, Slashing Spans (if S > 0), Ledger, Payee, Validators, Nominators,
* Account, Locks Writes Each: SpanSlash * S
* # </weight>
**/
forceUnstake: AugmentedSubmittable<(stash: AccountId32 | string | Uint8Array, numSlashingSpans: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32, u32]>;
/**
@@ -3352,7 +3545,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* # <weight>
* - The transaction's complexity is proportional to the size of `targets` (N)
* which is capped at CompactAssignments::LIMIT (MAX_NOMINATIONS).
* which is capped at CompactAssignments::LIMIT (T::MaxNominations).
* - Both the reads and writes follow a similar pattern.
* # </weight>
**/
@@ -3403,7 +3596,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* # <weight>
* - Time complexity: O(L), where L is unlocking chunks
* - Bounded by `MAX_UNLOCKING_CHUNKS`.
* - Bounded by `MaxUnlockingChunks`.
* - Storage changes: Can't increase storage, only decrease it.
* # </weight>
**/
@@ -3466,11 +3659,6 @@ declare module '@polkadot/api-base/types/submittable' {
* Set the validators who cannot be slashed (if any).
*
* The dispatch origin must be Root.
*
* # <weight>
* - O(V)
* - Write: Invulnerables
* # </weight>
**/
setInvulnerables: AugmentedSubmittable<(invulnerables: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Vec<AccountId32>]>;
/**
@@ -3511,7 +3699,7 @@ declare module '@polkadot/api-base/types/submittable' {
* NOTE: Existing nominators and validators will not be affected by this update.
* to kick people under the new limits, `chill_other` should be called.
**/
setStakingConfigs: AugmentedSubmittable<(minNominatorBond: u128 | AnyNumber | Uint8Array, minValidatorBond: u128 | AnyNumber | Uint8Array, maxNominatorCount: Option<u32> | null | object | string | Uint8Array, maxValidatorCount: Option<u32> | null | object | string | Uint8Array, chillThreshold: Option<Percent> | null | object | string | Uint8Array, minCommission: Perbill | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u128, u128, Option<u32>, Option<u32>, Option<Percent>, Perbill]>;
setStakingConfigs: AugmentedSubmittable<(minNominatorBond: PalletStakingPalletConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, minValidatorBond: PalletStakingPalletConfigOpU128 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxNominatorCount: PalletStakingPalletConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, maxValidatorCount: PalletStakingPalletConfigOpU32 | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, chillThreshold: PalletStakingPalletConfigOpPercent | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array, minCommission: PalletStakingPalletConfigOpPerbill | { Noop: any } | { Set: any } | { Remove: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingPalletConfigOpU32, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpPerbill]>;
/**
* Sets the ideal number of validators.
*
@@ -3533,7 +3721,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Once the unlock period is done, you can call `withdraw_unbonded` to actually move
* the funds out of management ready for transfer.
*
* No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`)
* No more than a limited number of unlocking chunks (see `MaxUnlockingChunks`)
* can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need
* to be called first to remove some of the chunks (if possible).
*
@@ -3576,6 +3764,74 @@ declare module '@polkadot/api-base/types/submittable' {
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
stateTrieMigration: {
/**
* Continue the migration for the given `limits`.
*
* The dispatch origin of this call can be any signed account.
*
* This transaction has NO MONETARY INCENTIVES. calling it will not reward anyone. Albeit,
* Upon successful execution, the transaction fee is returned.
*
* The (potentially over-estimated) of the byte length of all the data read must be
* provided for up-front fee-payment and weighing. In essence, the caller is guaranteeing
* that executing the current `MigrationTask` with the given `limits` will not exceed
* `real_size_upper` bytes of read data.
*
* The `witness_task` is merely a helper to prevent the caller from being slashed or
* generally trigger a migration that they do not intend. This parameter is just a message
* from caller, saying that they believed `witness_task` was the last state of the
* migration, and they only wish for their transaction to do anything, if this assumption
* holds. In case `witness_task` does not match, the transaction fails.
*
* Based on the documentation of [`MigrationTask::migrate_until_exhaustion`], the
* recommended way of doing this is to pass a `limit` that only bounds `count`, as the
* `size` limit can always be overwritten.
**/
continueMigrate: AugmentedSubmittable<(limits: PalletStateTrieMigrationMigrationLimits | { size_?: any; item?: any } | string | Uint8Array, realSizeUpper: u32 | AnyNumber | Uint8Array, witnessTask: PalletStateTrieMigrationMigrationTask | { progressTop?: any; progressChild?: any; size_?: any; topItems?: any; childItems?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletStateTrieMigrationMigrationLimits, u32, PalletStateTrieMigrationMigrationTask]>;
/**
* Control the automatic migration.
*
* The dispatch origin of this call must be [`Config::ControlOrigin`].
**/
controlAutoMigration: AugmentedSubmittable<(maybeConfig: Option<PalletStateTrieMigrationMigrationLimits> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<PalletStateTrieMigrationMigrationLimits>]>;
/**
* Forcefully set the progress the running migration.
*
* This is only useful in one case: the next key to migrate is too big to be migrated with
* a signed account, in a parachain context, and we simply want to skip it. A reasonable
* example of this would be `:code:`, which is both very expensive to migrate, and commonly
* used, so probably it is already migrated.
*
* In case you mess things up, you can also, in principle, use this to reset the migration
* process.
**/
forceSetProgress: AugmentedSubmittable<(progressTop: PalletStateTrieMigrationProgress | { ToStart: any } | { LastKey: any } | { Complete: any } | string | Uint8Array, progressChild: PalletStateTrieMigrationProgress | { ToStart: any } | { LastKey: any } | { Complete: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletStateTrieMigrationProgress, PalletStateTrieMigrationProgress]>;
/**
* Migrate the list of child keys by iterating each of them one by one.
*
* All of the given child keys must be present under one `child_root`.
*
* This does not affect the global migration process tracker ([`MigrationProcess`]), and
* should only be used in case any keys are leftover due to a bug.
**/
migrateCustomChild: AugmentedSubmittable<(root: Bytes | string | Uint8Array, childKeys: Vec<Bytes> | (Bytes | string | Uint8Array)[], totalSize: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, Vec<Bytes>, u32]>;
/**
* Migrate the list of top keys by iterating each of them one by one.
*
* This does not affect the global migration process tracker ([`MigrationProcess`]), and
* should only be used in case any keys are leftover due to a bug.
**/
migrateCustomTop: AugmentedSubmittable<(keys: Vec<Bytes> | (Bytes | string | Uint8Array)[], witnessSize: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Vec<Bytes>, u32]>;
/**
* Set the maximum limit of the signed migration.
**/
setSignedMaxLimits: AugmentedSubmittable<(limits: PalletStateTrieMigrationMigrationLimits | { size_?: any; item?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [PalletStateTrieMigrationMigrationLimits]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
sudo: {
/**
* Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo
@@ -3661,11 +3917,6 @@ declare module '@polkadot/api-base/types/submittable' {
remark: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
/**
* Make some on-chain remark and emit event.
*
* # <weight>
* - `O(b)` where b is the length of the remark.
* - 1 event.
* # </weight>
**/
remarkWithEvent: AugmentedSubmittable<(remark: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
/**
@@ -4170,7 +4421,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(1)`
**/
approveTransfer: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, instance: Compact<u32> | AnyNumber | Uint8Array, delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>, MultiAddress]>;
approveTransfer: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, instance: u32 | AnyNumber | Uint8Array, delegate: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, MultiAddress]>;
/**
* Destroy a single asset instance.
*
@@ -4186,7 +4437,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Weight: `O(1)`
* Modes: `check_owner.is_some()`.
**/
burn: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, instance: Compact<u32> | AnyNumber | Uint8Array, checkOwner: Option<MultiAddress> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>, Option<MultiAddress>]>;
burn: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, instance: u32 | AnyNumber | Uint8Array, checkOwner: Option<MultiAddress> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, Option<MultiAddress>]>;
/**
* Cancel the prior approval for the transfer of an asset by a delegate.
*
@@ -4205,27 +4456,24 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(1)`
**/
cancelApproval: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, instance: Compact<u32> | AnyNumber | Uint8Array, maybeCheckDelegate: Option<MultiAddress> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>, Option<MultiAddress>]>;
cancelApproval: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, instance: u32 | AnyNumber | Uint8Array, maybeCheckDelegate: Option<MultiAddress> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, Option<MultiAddress>]>;
/**
* Set an attribute for an asset class or instance.
* Clear an attribute for an asset class or instance.
*
* Origin must be either `ForceOrigin` or Signed and the sender should be the Owner of the
* asset `class`.
*
* If the origin is Signed, then funds of signer are reserved according to the formula:
* `MetadataDepositBase + DepositPerByte * (key.len + value.len)` taking into
* account any already reserved funds.
* Any deposit is freed for the asset class owner.
*
* - `class`: The identifier of the asset class whose instance's metadata to set.
* - `instance`: The identifier of the asset instance whose metadata to set.
* - `class`: The identifier of the asset class whose instance's metadata to clear.
* - `maybe_instance`: The identifier of the asset instance whose metadata to clear.
* - `key`: The key of the attribute.
* - `value`: The value to which to set the attribute.
*
* Emits `AttributeSet`.
* Emits `AttributeCleared`.
*
* Weight: `O(1)`
**/
clearAttribute: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, maybeInstance: Option<u32> | null | object | string | Uint8Array, key: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Option<u32>, Bytes]>;
clearAttribute: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, maybeInstance: Option<u32> | null | object | string | Uint8Array, key: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Option<u32>, Bytes]>;
/**
* Clear the metadata for an asset class.
*
@@ -4240,7 +4488,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(1)`
**/
clearClassMetadata: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
clearClassMetadata: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* Clear the metadata for an asset instance.
*
@@ -4256,7 +4504,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(1)`
**/
clearMetadata: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, instance: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
clearMetadata: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, instance: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
/**
* Issue a new class of non-fungible assets from a public origin.
*
@@ -4275,7 +4523,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(1)`
**/
create: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, admin: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress]>;
create: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, admin: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, MultiAddress]>;
/**
* Destroy a class of fungible assets.
*
@@ -4293,7 +4541,7 @@ declare module '@polkadot/api-base/types/submittable' {
* - `m = witness.instance_metadatas`
* - `a = witness.attributes`
**/
destroy: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, witness: PalletUniquesDestroyWitness | { instances?: any; instanceMetadatas?: any; attributes?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, PalletUniquesDestroyWitness]>;
destroy: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, witness: PalletUniquesDestroyWitness | { instances?: any; instanceMetadatas?: any; attributes?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, PalletUniquesDestroyWitness]>;
/**
* Alter the attributes of a given asset.
*
@@ -4313,7 +4561,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(1)`
**/
forceAssetStatus: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, owner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, issuer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, admin: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, freezer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, freeHolding: bool | boolean | Uint8Array, isFrozen: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress, MultiAddress, MultiAddress, MultiAddress, bool, bool]>;
forceAssetStatus: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, owner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, issuer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, admin: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, freezer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, freeHolding: bool | boolean | Uint8Array, isFrozen: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, MultiAddress, MultiAddress, MultiAddress, MultiAddress, bool, bool]>;
/**
* Issue a new class of non-fungible assets from a privileged origin.
*
@@ -4332,7 +4580,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(1)`
**/
forceCreate: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, owner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, freeHolding: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress, bool]>;
forceCreate: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, owner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, freeHolding: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, MultiAddress, bool]>;
/**
* Disallow further unprivileged transfer of an asset instance.
*
@@ -4345,7 +4593,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(1)`
**/
freeze: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, instance: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
freeze: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, instance: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
/**
* Disallow further unprivileged transfers for a whole asset class.
*
@@ -4357,7 +4605,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(1)`
**/
freezeClass: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
freezeClass: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* Mint an asset instance of a particular class.
*
@@ -4371,7 +4619,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(1)`
**/
mint: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, instance: Compact<u32> | AnyNumber | Uint8Array, owner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>, MultiAddress]>;
mint: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, instance: u32 | AnyNumber | Uint8Array, owner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, MultiAddress]>;
/**
* Reevaluate the deposits on some assets.
*
@@ -4391,7 +4639,20 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(instances.len())`
**/
redeposit: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, instances: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Vec<u32>]>;
redeposit: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, instances: Vec<u32> | (u32 | AnyNumber | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [u32, Vec<u32>]>;
/**
* Set (or reset) the acceptance of ownership for a particular account.
*
* Origin must be `Signed` and if `maybe_class` is `Some`, then the signer must have a
* provider reference.
*
* - `maybe_class`: The identifier of the asset class whose ownership the signer is willing
* to accept, or if `None`, an indication that the signer is willing to accept no
* ownership transferal.
*
* Emits `OwnershipAcceptanceChanged`.
**/
setAcceptOwnership: AugmentedSubmittable<(maybeClass: Option<u32> | null | object | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Option<u32>]>;
/**
* Set an attribute for an asset class or instance.
*
@@ -4411,7 +4672,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(1)`
**/
setAttribute: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, maybeInstance: Option<u32> | null | object | string | Uint8Array, key: Bytes | string | Uint8Array, value: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Option<u32>, Bytes, Bytes]>;
setAttribute: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, maybeInstance: Option<u32> | null | object | string | Uint8Array, key: Bytes | string | Uint8Array, value: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Option<u32>, Bytes, Bytes]>;
/**
* Set the metadata for an asset class.
*
@@ -4430,7 +4691,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(1)`
**/
setClassMetadata: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, data: Bytes | string | Uint8Array, isFrozen: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Bytes, bool]>;
setClassMetadata: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, data: Bytes | string | Uint8Array, isFrozen: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Bytes, bool]>;
/**
* Set the metadata for an asset instance.
*
@@ -4450,7 +4711,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(1)`
**/
setMetadata: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, instance: Compact<u32> | AnyNumber | Uint8Array, data: Bytes | string | Uint8Array, isFrozen: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>, Bytes, bool]>;
setMetadata: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, instance: u32 | AnyNumber | Uint8Array, data: Bytes | string | Uint8Array, isFrozen: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, Bytes, bool]>;
/**
* Change the Issuer, Admin and Freezer of an asset class.
*
@@ -4465,7 +4726,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(1)`
**/
setTeam: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, issuer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, admin: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, freezer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress, MultiAddress, MultiAddress]>;
setTeam: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, issuer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, admin: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, freezer: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, MultiAddress, MultiAddress, MultiAddress]>;
/**
* Re-allow unprivileged transfer of an asset instance.
*
@@ -4478,7 +4739,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(1)`
**/
thaw: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, instance: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>]>;
thaw: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, instance: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32]>;
/**
* Re-allow unprivileged transfers for a whole asset class.
*
@@ -4490,7 +4751,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(1)`
**/
thawClass: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
thawClass: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
/**
* Move an asset from the sender account to another.
*
@@ -4508,20 +4769,21 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Weight: `O(1)`
**/
transfer: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, instance: Compact<u32> | AnyNumber | Uint8Array, dest: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, Compact<u32>, MultiAddress]>;
transfer: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, instance: u32 | AnyNumber | Uint8Array, dest: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, u32, MultiAddress]>;
/**
* Change the Owner of an asset class.
*
* Origin must be Signed and the sender should be the Owner of the asset `class`.
*
* - `class`: The asset class whose owner should be changed.
* - `owner`: The new Owner of this asset class.
* - `owner`: The new Owner of this asset class. They must have called
* `set_accept_ownership` with `class` in order for this operation to succeed.
*
* Emits `OwnerChanged`.
*
* Weight: `O(1)`
**/
transferOwnership: AugmentedSubmittable<(clazz: Compact<u32> | AnyNumber | Uint8Array, owner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress]>;
transferOwnership: AugmentedSubmittable<(clazz: u32 | AnyNumber | Uint8Array, owner: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, MultiAddress]>;
/**
* Generic tx
**/
@@ -4706,5 +4968,15 @@ declare module '@polkadot/api-base/types/submittable' {
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
whitelist: {
dispatchWhitelistedCall: AugmentedSubmittable<(callHash: H256 | string | Uint8Array, callWeightWitness: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256, u64]>;
dispatchWhitelistedCallWithPreimage: AugmentedSubmittable<(call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Call]>;
removeWhitelistedCall: AugmentedSubmittable<(callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
whitelistCall: AugmentedSubmittable<(callHash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
} // AugmentedSubmittables
} // declare module
+21
View File
@@ -0,0 +1,21 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"exclude": [
"**/*.spec.ts",
"**/kusama/*.ts",
"**/polkadot/*.ts"
],
"references": [
{ "path": "../api-base/tsconfig.build.json" },
{ "path": "../rpc-augment/tsconfig.build.json" },
{ "path": "../types/tsconfig.build.json" },
{ "path": "../types-codec/tsconfig.build.json" },
{ "path": "../types-augment/tsconfig.build.json" },
{ "path": "../types-support/tsconfig.build.json" }
]
}
-15
View File
@@ -1,15 +0,0 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../api-base" },
{ "path": "../rpc-augment" },
{ "path": "../types" },
{ "path": "../types-codec" },
{ "path": "../types-augment" }
]
}
+22
View File
@@ -0,0 +1,22 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"include": [
"**/base.ts",
"**/kusama/*.ts"
],
"exclude": [
"**/kusama/*.spec.ts"
],
"references": [
{ "path": "../api-base/tsconfig.build.json" },
{ "path": "../rpc-augment/tsconfig.build.json" },
{ "path": "../types/tsconfig.build.json" },
{ "path": "../types-codec/tsconfig.build.json" },
{ "path": "../types-augment/tsconfig.build.json" }
]
}
@@ -0,0 +1,22 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src",
"emitDeclarationOnly": false,
"noEmit": true
},
"include": [
"**/kusama/*.spec.ts"
],
"references": [
{ "path": "../api-augment/tsconfig.build.json" },
{ "path": "../api-augment/tsconfig.kusama.json" },
{ "path": "../api-base/tsconfig.build.json" },
{ "path": "../rpc-augment/tsconfig.build.json" },
{ "path": "../types/tsconfig.build.json" },
{ "path": "../types-augment/tsconfig.build.json" },
{ "path": "../types-support/tsconfig.build.json" }
]
}
@@ -0,0 +1,22 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"include": [
"**/base.ts",
"**/polkadot/*.ts"
],
"exclude": [
"**/polkadot/*.spec.ts"
],
"references": [
{ "path": "../api-base/tsconfig.build.json" },
{ "path": "../rpc-augment/tsconfig.build.json" },
{ "path": "../types/tsconfig.build.json" },
{ "path": "../types-codec/tsconfig.build.json" },
{ "path": "../types-augment/tsconfig.build.json" }
]
}
+6 -6
View File
@@ -20,13 +20,13 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.0.2",
"version": "7.15.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/rpc-core": "7.0.2",
"@polkadot/types": "7.0.2",
"@polkadot/util": "^8.2.2",
"rxjs": "^7.4.0"
"@babel/runtime": "^7.17.8",
"@polkadot/rpc-core": "7.15.1",
"@polkadot/types": "7.15.1",
"@polkadot/util": "^8.7.1",
"rxjs": "^7.5.5"
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
export { packageInfo } from './packageInfo';
+7
View File
@@ -0,0 +1,7 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { packageInfo as rpcInfo } from '@polkadot/rpc-core/packageInfo';
import { packageInfo as typesInfo } from '@polkadot/types/packageInfo';
export default [rpcInfo, typesInfo];
+5 -4
View File
@@ -1,10 +1,11 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { packageInfo as rpcInfo } from '@polkadot/rpc-core/packageInfo';
import { packageInfo as typesInfo } from '@polkadot/types/packageInfo';
// Do not edit, auto-generated by @polkadot/dev
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname, [rpcInfo, typesInfo]);
detectPackage(packageInfo, null, others);
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import './detectPackage';
+3 -3
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2021 @polkadot/api-base authors & contributors
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Auto-generated by @polkadot/dev, do not edit
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-base', version: '7.0.2' };
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '7.15.1' };
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-base authors & contributors
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-base authors & contributors
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-base authors & contributors
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { PalletConstantMetadataLatest } from '@polkadot/types/interfaces';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-base authors & contributors
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-base authors & contributors
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { IsError } from '@polkadot/types/metadata/decorate/types';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-base authors & contributors
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { IsEvent } from '@polkadot/types/metadata/decorate/types';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api authors & contributors
// Copyright 2017-2022 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
// These are augmented, do an augmentation export
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-base authors & contributors
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
+3 -3
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-base authors & contributors
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
@@ -74,12 +74,10 @@ export interface StorageEntryBase<ApiType extends ApiTypes, F extends AnyFunctio
* @deprecated Use api.at(<blockHash>)
*/
entriesAt: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(hash: Hash | Uint8Array | string, ...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
entriesPaged: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
/**
* @deprecated Use api.at(<blockHash>)
*/
keysAt: <K extends AnyTuple = A> (hash: Hash | Uint8Array | string, ...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
keysPaged: <K extends AnyTuple = A> (opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
/**
* @deprecated The underlying RPC this been marked unsafe and is generally not exposed
*/
@@ -95,11 +93,13 @@ export interface StorageEntryBase<ApiType extends ApiTypes, F extends AnyFunctio
export interface StorageEntryBaseAt<ApiType extends ApiTypes, F extends AnyFunction, A extends AnyTuple = AnyTuple> {
entries: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
entriesPaged: <T extends Codec | any = ReturnCodec<F>, K extends AnyTuple = A>(opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, [StorageKey<K>, T][]>;
hash: (...args: Parameters<F>) => PromiseOrObs<ApiType, Hash>;
is: (key: IStorageKey<AnyTuple>) => key is IStorageKey<A>;
key: (...args: Parameters<F>) => string;
keyPrefix: (...args: DropLast<Parameters<F>>) => string;
keys: <K extends AnyTuple = A> (...args: DropLast<Parameters<F>>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
keysPaged: <K extends AnyTuple = A> (opts: PaginationOptions<Parameters<F>[0]>) => PromiseOrObs<ApiType, StorageKey<K>[]>;
size: (...args: Parameters<F>) => PromiseOrObs<ApiType, u64>;
}
+3 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-base authors & contributors
// Copyright 2017-2022 @polkadot/api-base authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
@@ -65,6 +65,8 @@ export interface SubmittableResultValue {
events?: EventRecord[];
internalError?: Error;
status: ExtrinsicStatus;
txHash: Hash;
txIndex?: number;
}
export interface SubmittableExtrinsic<ApiType extends ApiTypes, R extends ISubmittableResult = ISubmittableResult> extends Extrinsic {
@@ -6,7 +6,7 @@
"rootDir": "./src"
},
"references": [
{ "path": "../types" },
{ "path": "../types-codec" }
{ "path": "../rpc-core/tsconfig.build.json" },
{ "path": "../types/tsconfig.build.json" }
]
}
+13 -8
View File
@@ -20,15 +20,20 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.0.2",
"version": "7.15.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/api": "7.0.2",
"@polkadot/types": "7.0.2",
"@polkadot/types-create": "7.0.2",
"@polkadot/util": "^8.2.2",
"@polkadot/util-crypto": "^8.2.2",
"rxjs": "^7.4.0"
"@babel/runtime": "^7.17.8",
"@polkadot/api": "7.15.1",
"@polkadot/types": "7.15.1",
"@polkadot/types-codec": "7.15.1",
"@polkadot/types-create": "7.15.1",
"@polkadot/util": "^8.7.1",
"@polkadot/util-crypto": "^8.7.1",
"rxjs": "^7.5.5"
},
"devDependencies": {
"@polkadot/api-augment": "7.15.1",
"@polkadot/keyring": "^8.7.1"
}
}
+6 -3
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Registry } from '@polkadot/types/types';
@@ -32,6 +32,9 @@ interface JSONAbi {
},
V2: {
spec: SpecDef;
},
V3: {
spec: SpecDef;
}
}
@@ -56,10 +59,10 @@ describe('Abi', (): void => {
it(`initializes from a contract ABI (${abiName})`, (): void => {
try {
const messageIds = (abi.V2 || abi.V1 || abi).spec.messages.map(({ label, name }) =>
const messageIds = (abi.V3 || abi.V2 || abi.V1 || abi).spec.messages.map(({ label, name }) =>
label || (
Array.isArray(name)
? name[0]
? name.join('::')
: name
)
);
+14 -17
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Bytes } from '@polkadot/types';
@@ -10,7 +10,7 @@ import { TypeRegistry } from '@polkadot/types';
import { TypeDefInfo } from '@polkadot/types-create';
import { assert, assertReturn, compactAddLength, compactStripLength, isNumber, isObject, isString, logger, stringCamelCase, stringify, u8aConcat, u8aToHex } from '@polkadot/util';
import { v0ToLatest, v1ToLatest } from './toLatest';
import { convertVersions, enumVersions } from './toLatest';
const l = logger('Abi');
@@ -26,30 +26,25 @@ function findMessage <T extends AbiMessage> (list: T[], messageOrId: T | string
return assertReturn(message, () => `Attempted to call an invalid contract interface, ${stringify(messageOrId)}`);
}
// FIXME: This is still workable with V0, V1 & V2, but certainly is not a scalable
// approach (right at this point don't quite have better ideas that is not as complex
// as the conversion tactics in the runtime Metadata)
function getLatestMeta (registry: Registry, json: Record<string, unknown>): ContractMetadataLatest {
const vx = enumVersions.find((v) => isObject(json[v]));
const metadata = registry.createType('ContractMetadata',
isObject(json.V2)
? { V2: json.V2 }
: isObject(json.V1)
? { V1: json.V1 }
: { V0: json }
vx
? { [vx]: json[vx] }
: { V0: json }
) as unknown as ContractMetadata;
const converter = convertVersions.find(([v]) => metadata[`is${v}`]);
return metadata.isV2
? metadata.asV2
: metadata.isV1
? v1ToLatest(registry, metadata.asV1)
: v0ToLatest(registry, metadata.asV0);
assert(converter, () => `Unable to convert ABI with version ${metadata.type} to latest`);
return converter[1](registry, metadata[`as${converter[0]}`]);
}
function parseJson (json: Record<string, unknown>, chainProperties?: ChainProperties): [Record<string, unknown>, Registry, ContractMetadataLatest, ContractProjectInfo] {
const registry = new TypeRegistry();
const info = registry.createType('ContractProjectInfo', json) as unknown as ContractProjectInfo;
const latest = getLatestMeta(registry, json);
const lookup = registry.createType('PortableRegistry', { types: latest.types });
const lookup = registry.createType('PortableRegistry', { types: latest.types }, true);
// attach the lookup to the registry - now the types are known
registry.setLookup(lookup);
@@ -90,7 +85,8 @@ export class Abi {
);
this.constructors = this.metadata.spec.constructors.map((spec: ContractConstructorSpecLatest, index) =>
this.#createMessage(spec, index, {
isConstructor: true
isConstructor: true,
isPayable: spec.payable.isTrue
})
);
this.events = this.metadata.spec.events.map((spec: ContractEventSpecLatest, index) =>
@@ -209,6 +205,7 @@ export class Abi {
identifier,
index,
method: stringCamelCase(identifier),
path: identifier.split('::').map((s) => stringCamelCase(s)),
selector: spec.selector,
toU8a: (params: unknown[]) =>
this.#encodeArgs(spec, args, params)
+51 -2
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { v0ToLatest, v1ToLatest } from '@polkadot/api-contract/Abi/toLatest';
import { v0ToLatest, v1ToLatest, v2ToLatest, v3ToLatest } from '@polkadot/api-contract/Abi/toLatest';
import { TypeRegistry } from '@polkadot/types';
import abis from '../test/contracts';
@@ -65,9 +65,58 @@ describe('v1ToLatest', (): void => {
).toEqual(['flip', 'get']);
});
it('has the correct messages with namespaced method name', (): void => {
const contract = registry.createType('ContractMetadata', { V1: abis.ink_v1_psp22.V1 });
const latest = v1ToLatest(registry, contract.asV1);
expect(
latest.spec.messages.map(({ label }) => label.toString())
).toEqual([
'PSP22Metadata::token_name', 'PSP22Metadata::token_symbol', 'PSP22Metadata::token_decimals', 'PSP22Mintable::mint', 'PSP22::decrease_allowance', 'PSP22::transfer', 'PSP22::approve', 'PSP22::allowance', 'PSP22::transfer_from', 'PSP22::balance_of', 'PSP22::increase_allowance', 'PSP22::total_supply', 'pause', 'unpause'
]);
});
it('has the correct constructor arguments', (): void => {
expect(
latest.spec.constructors[0].args.map(({ label }) => label.toString())
).toEqual(['init_value']);
});
});
describe('v2ToLatest', (): void => {
const registry = new TypeRegistry();
const contract = registry.createType('ContractMetadata', { V2: abis.ink_v2_flipper.V2 });
const latest = v2ToLatest(registry, contract.asV2);
it('has the correct constructor flag', (): void => {
expect(
latest.spec.constructors[0].payable.isTrue
).toEqual(true);
});
});
describe('v3ToLatest', (): void => {
const registry = new TypeRegistry();
const contract = registry.createType('ContractMetadata', { V3: abis.ink_v3_flipper.V3 });
const latest = v3ToLatest(registry, contract.asV3);
it('has the correct constructor flags', (): void => {
expect(
latest.spec.constructors[0].payable.isTrue
).toEqual(false);
expect(
latest.spec.constructors[1].payable.isTrue
).toEqual(true);
});
it('has the correct messages', (): void => {
const contract = registry.createType('ContractMetadata', { V3: abis.ink_v3_traitErc20.V3 });
const latest = v3ToLatest(registry, contract.asV3);
expect(
latest.spec.messages.map(({ label }) => label.toString())
).toEqual([
'BaseErc20::total_supply', 'BaseErc20::balance_of', 'BaseErc20::allowance', 'BaseErc20::transfer', 'BaseErc20::approve', 'BaseErc20::transfer_from'
]);
});
});
+28 -6
View File
@@ -1,16 +1,38 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1 } from '@polkadot/types/interfaces';
import type { ContractMetadataLatest, ContractMetadataV3 } from '@polkadot/types/interfaces';
import type { Registry } from '@polkadot/types/types';
import { v0ToV1 } from './toV1';
import { v1ToV2 } from './toV2';
import { v2ToV3 } from './toV3';
export function v1ToLatest (registry: Registry, v1: ContractMetadataV1): ContractMetadataLatest {
return v1ToV2(registry, v1);
type Versions = 'V3' | 'V2' | 'V1' | 'V0';
type Converter = (registry: Registry, vx: any) => ContractMetadataLatest;
// Helper to convert metadata from one step to the next
function createConverter <I, O> (next: (registry: Registry, input: O) => ContractMetadataLatest, step: (registry: Registry, input: I) => O): (registry: Registry, input: I) => ContractMetadataLatest {
return (registry: Registry, input: I): ContractMetadataLatest =>
next(registry, step(registry, input));
}
export function v0ToLatest (registry: Registry, v0: ContractMetadataV0): ContractMetadataLatest {
return v1ToLatest(registry, v0ToV1(registry, v0));
export function v3ToLatest (registry: Registry, v3: ContractMetadataV3): ContractMetadataLatest {
return v3;
}
export const v2ToLatest = createConverter(v3ToLatest, v2ToV3);
export const v1ToLatest = createConverter(v2ToLatest, v1ToV2);
export const v0ToLatest = createConverter(v1ToLatest, v0ToV1);
// The versions where an enum is used, aka V0 is missing
// (Order from newest, i.e. we expect more on newest vs oldest)
export const enumVersions = ['V3', 'V2', 'V1'];
export const convertVersions: [Versions, Converter][] = [
['V3', v3ToLatest],
['V2', v2ToLatest],
['V1', v1ToLatest],
['V0', v0ToLatest]
];
+18 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ContractMetadataV0, ContractMetadataV1 } from '@polkadot/types/interfaces';
@@ -7,8 +7,25 @@ import type { Registry } from '@polkadot/types/types';
import { convertSiV0toV1 } from '@polkadot/types';
import { objectSpread } from '@polkadot/util';
interface Named {
name: unknown;
}
function v0ToV1Names (all: Named[]): unknown[] {
return all.map((e) =>
objectSpread({}, e, {
name: Array.isArray(e.name)
? e.name
: [e.name]
}));
}
export function v0ToV1 (registry: Registry, v0: ContractMetadataV0): ContractMetadataV1 {
return registry.createType('ContractMetadataV1', objectSpread({}, v0, {
spec: objectSpread({}, v0.spec, {
constructors: v0ToV1Names(v0.spec.constructors),
messages: v0ToV1Names(v0.spec.messages)
}),
types: convertSiV0toV1(registry, v0.types)
}));
}
+2 -2
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Text } from '@polkadot/types';
@@ -32,7 +32,7 @@ const ARG_TYPES = {
function v1ToV2Label (entry: NamedEntry): { label: Text } {
return objectSpread({}, entry, {
label: Array.isArray(entry.name)
? entry.name[0]
? entry.name.join('::')
: entry.name
});
}
+18
View File
@@ -0,0 +1,18 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ContractMetadataV2, ContractMetadataV3 } from '@polkadot/types/interfaces';
import type { Registry } from '@polkadot/types/types';
import { objectSpread } from '@polkadot/util';
export function v2ToV3 (registry: Registry, v2: ContractMetadataV2): ContractMetadataV3 {
return registry.createType('ContractMetadataV3', objectSpread({}, v2, {
spec: objectSpread({}, v2.spec, {
constructors: v2.spec.constructors.map((c) =>
// V3 introduces the payable flag on constructors, for <V3, it is always true
registry.createType('ContractConstructorSpecV3', objectSpread({}, c, { payable: true }))
)
})
}));
}
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api authors & contributors
// Copyright 2017-2022 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
+12 -12
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
@@ -47,7 +47,7 @@ export class Blueprint<ApiType extends ApiTypes> extends Base<ApiType> {
this.abi.constructors.forEach((c): void => {
if (isUndefined(this.#tx[c.method])) {
this.#tx[c.method] = createBluePrintTx((o, p) => this.#deploy(c, o, p));
this.#tx[c.method] = createBluePrintTx(c, (o, p) => this.#deploy(c, o, p));
}
});
}
@@ -56,21 +56,21 @@ export class Blueprint<ApiType extends ApiTypes> extends Base<ApiType> {
return this.#tx;
}
#deploy = (constructorOrId: AbiConstructor | string | number, { gasLimit = BN_ZERO, salt, value = BN_ZERO }: BlueprintOptions, params: unknown[]): SubmittableExtrinsic<ApiType, BlueprintSubmittableResult<ApiType>> => {
#deploy = (constructorOrId: AbiConstructor | string | number, { gasLimit = BN_ZERO, salt, storageDepositLimit = null, value = BN_ZERO }: BlueprintOptions, params: unknown[]): SubmittableExtrinsic<ApiType, BlueprintSubmittableResult<ApiType>> => {
const hasStorageDeposit = this.api.tx.contracts.instantiate.meta.args.length === 6;
const storageDepositLimit = null;
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, this.abi.findConstructor(constructorOrId).toU8a(params), encodeSalt(salt))
? 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, this.abi.findConstructor(constructorOrId).toU8a(params), encodeSalt(salt));
: 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 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)
))
);
};
}
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import fs from 'fs';
+8 -6
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
@@ -52,7 +52,7 @@ export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
this.abi.constructors.forEach((c): void => {
if (isUndefined(this.#tx[c.method])) {
this.#tx[c.method] = createBluePrintTx((o, p) => this.#instantiate(c, o, p));
this.#tx[c.method] = createBluePrintTx(c, (o, p) => this.#instantiate(c, o, p));
}
});
}
@@ -61,14 +61,16 @@ export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
return this.#tx;
}
#instantiate = (constructorOrId: AbiConstructor | string | number, { gasLimit = BN_ZERO, salt, value = BN_ZERO }: BlueprintOptions, params: unknown[]): SubmittableExtrinsic<ApiType, CodeSubmittableResult<ApiType>> => {
#instantiate = (constructorOrId: AbiConstructor | string | number, { gasLimit = BN_ZERO, salt, storageDepositLimit = null, value = BN_ZERO }: BlueprintOptions, params: unknown[]): SubmittableExtrinsic<ApiType, CodeSubmittableResult<ApiType>> => {
const hasStorageDeposit = this.api.tx.contracts.instantiateWithCode.meta.args.length === 6;
const storageDepositLimit = null;
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, compactAddLength(this.code), this.abi.findConstructor(constructorOrId).toU8a(params), encodeSalt(salt))
? 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, compactAddLength(this.code), this.abi.findConstructor(constructorOrId).toU8a(params), encodeSalt(salt));
: this.api.tx.contracts.instantiateWithCode(value, gasLimit, encCode, encParams, encSalt);
return tx.withResultTransform((result: ISubmittableResult) =>
new CodeSubmittableResult(result, ...(applyOnEvent(result, ['CodeStored', 'Instantiated'], (records: EventRecord[]) =>
+25 -20
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
@@ -18,6 +18,7 @@ import { assert, BN, BN_HUNDRED, BN_ONE, BN_ZERO, bnToBn, isFunction, isUndefine
import { Abi } from '../Abi';
import { applyOnEvent, extractOptions, isOptions } from '../util';
import { Base } from './Base';
import { withMeta } from './util';
export interface ContractConstructor<ApiType extends ApiTypes> {
new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, address: string | AccountId): Contract<ApiType>;
@@ -29,18 +30,20 @@ const ERROR_NO_CALL = 'Your node does not expose the contracts.call RPC. This is
const l = logger('Contract');
function createQuery <ApiType extends ApiTypes> (fn: (origin: string | AccountId | Uint8Array, options: ContractOptions, params: unknown[]) => ContractCallResult<ApiType, ContractCallOutcome>): ContractQuery<ApiType> {
return (origin: string | AccountId | Uint8Array, options: bigint | string | number | BN | ContractOptions, ...params: unknown[]): ContractCallResult<ApiType, ContractCallOutcome> =>
function createQuery <ApiType extends ApiTypes> (meta: AbiMessage, fn: (origin: string | AccountId | Uint8Array, options: ContractOptions, params: unknown[]) => ContractCallResult<ApiType, ContractCallOutcome>): ContractQuery<ApiType> {
return withMeta(meta, (origin: string | AccountId | Uint8Array, options: bigint | string | number | BN | ContractOptions, ...params: unknown[]): ContractCallResult<ApiType, ContractCallOutcome> =>
isOptions(options)
? fn(origin, options, params)
: fn(origin, ...extractOptions<ContractOptions>(options, params));
: fn(origin, ...extractOptions<ContractOptions>(options, params))
);
}
function createTx <ApiType extends ApiTypes> (fn: (options: ContractOptions, params: unknown[]) => SubmittableExtrinsic<ApiType>): ContractTx<ApiType> {
return (options: bigint | string | number | BN | ContractOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType> =>
function createTx <ApiType extends ApiTypes> (meta: AbiMessage, fn: (options: ContractOptions, params: unknown[]) => SubmittableExtrinsic<ApiType>): ContractTx<ApiType> {
return withMeta(meta, (options: bigint | string | number | BN | ContractOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType> =>
isOptions(options)
? fn(options, params)
: fn(...extractOptions<ContractOptions>(options, params));
: fn(...extractOptions<ContractOptions>(options, params))
);
}
export class ContractSubmittableResult extends SubmittableResult {
@@ -70,11 +73,11 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
this.abi.messages.forEach((m): void => {
if (isUndefined(this.#tx[m.method])) {
this.#tx[m.method] = createTx((o, p) => this.#exec(m, o, p));
this.#tx[m.method] = createTx(m, (o, p) => this.#exec(m, o, p));
}
if (isUndefined(this.#query[m.method])) {
this.#query[m.method] = createQuery((f, o, p) => this.#read(m, o, p).send(f));
this.#query[m.method] = createQuery(m, (f, o, p) => this.#read(m, o, p).send(f));
}
});
}
@@ -106,14 +109,15 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
: gasLimit;
};
#exec = (messageOrId: AbiMessage | string | number, { gasLimit = BN_ZERO, value = BN_ZERO }: ContractOptions, params: unknown[]): SubmittableExtrinsic<ApiType> => {
#exec = (messageOrId: AbiMessage | string | number, { gasLimit = BN_ZERO, storageDepositLimit = null, value = BN_ZERO }: ContractOptions, params: unknown[]): SubmittableExtrinsic<ApiType> => {
const hasStorageDeposit = this.api.tx.contracts.call.meta.args.length === 5;
const storageDepositLimit = null;
const gas = this.#getGas(gasLimit);
const encParams = this.abi.findMessage(messageOrId).toU8a(params);
const tx = hasStorageDeposit
? this.api.tx.contracts.call(this.address, value, this.#getGas(gasLimit), storageDepositLimit, this.abi.findMessage(messageOrId).toU8a(params))
? 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, this.#getGas(gasLimit), this.abi.findMessage(messageOrId).toU8a(params));
: 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
@@ -133,7 +137,7 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
);
};
#read = (messageOrId: AbiMessage | string | number, { gasLimit = BN_ZERO, value = BN_ZERO }: ContractOptions, params: unknown[]): ContractCallSend<ApiType> => {
#read = (messageOrId: AbiMessage | string | number, { gasLimit = BN_ZERO, storageDepositLimit = null, value = BN_ZERO }: ContractOptions, params: unknown[]): ContractCallSend<ApiType> => {
assert(this.hasRpcContractsCall, ERROR_NO_CALL);
const message = this.abi.findMessage(messageOrId);
@@ -142,11 +146,12 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
// 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: message.toU8a(params), origin, value })
: this.api.rx.rpc.contracts.call({ dest: this.address, gasLimit: this.#getGas(gasLimit, true), inputData: message.toU8a(params), origin, value });
? 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 }: ContractExecResult): ContractCallOutcome => ({
const mapFn = ({ debugMessage, gasConsumed, gasRequired, result, storageDeposit }: ContractExecResult): ContractCallOutcome => ({
debugMessage,
gasConsumed,
gasRequired: gasRequired && !gasRequired.isZero()
@@ -155,12 +160,12 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
output: result.isOk && message.returnType
? this.abi.registry.createTypeUnsafe(message.returnType.lookupName || message.returnType.type, [result.asOk.data.toU8a(true)], { isPedantic: true })
: null,
result
result,
storageDeposit
});
return rpc.pipe(map(mapFn));
}
)
})
};
};
}
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api authors & contributors
// Copyright 2017-2022 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
export { Blueprint, BlueprintSubmittableResult, extendBlueprint } from './Blueprint';
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { ApiBase } from '@polkadot/api/base';
+12 -4
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Observable } from 'rxjs';
@@ -8,23 +8,31 @@ import type { AccountId } from '@polkadot/types/interfaces';
import type { BN } from '@polkadot/util';
import type { AbiMessage, BlueprintOptions, ContractCallOutcome, ContractOptions } from '../types';
export interface BlueprintDeploy<ApiType extends ApiTypes> {
export interface MessageMeta {
readonly meta: AbiMessage;
}
export interface BlueprintDeploy<ApiType extends ApiTypes> extends MessageMeta {
(options: BlueprintOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
// @deprecated Use options form (to be dropped in a major update)
(value: bigint | string | number | BN, gasLimit: bigint | string | number | BN, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
}
export interface ContractQuery<ApiType extends ApiTypes> {
export interface ContractQuery<ApiType extends ApiTypes> extends MessageMeta {
(origin: AccountId | string | Uint8Array, options: ContractOptions, ...params: unknown[]): ContractCallResult<ApiType, ContractCallOutcome>;
// @deprecated Use options form (to be dropped in a major update)
(origin: AccountId | string | Uint8Array, value: bigint | BN | string | number, gasLimit: bigint | BN | string | number, ...params: unknown[]): ContractCallResult<ApiType, ContractCallOutcome>;
}
export interface ContractTx<ApiType extends ApiTypes> {
export interface ContractTx<ApiType extends ApiTypes> extends MessageMeta {
(options: ContractOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
// @deprecated Use options form (to be dropped in a major update)
(value: bigint | BN | string | number, gasLimit: bigint | BN | string | number, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
}
export interface ContractGeneric<O, T> {
(messageOrId: AbiMessage | string | number, options: O, ...params: unknown[]): T;
// @deprecated Use options form (to be dropped in a major update)
(messageOrId: AbiMessage | string | number, value: bigint | BN | string | number, gasLimit: bigint | BN | string | number, ...params: unknown[]): T;
}
+12 -5
View File
@@ -1,11 +1,11 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { SubmittableResult } from '@polkadot/api';
import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types';
import type { ApiTypes } from '@polkadot/api/types';
import type { BN } from '@polkadot/util';
import type { AbiConstructor, BlueprintOptions } from '../types';
import type { AbiConstructor, AbiMessage, BlueprintOptions } from '../types';
import type { BlueprintDeploy, ContractGeneric } from './types';
import { Bytes } from '@polkadot/types';
@@ -16,11 +16,18 @@ import { extractOptions, isOptions } from '../util';
export const EMPTY_SALT = new Uint8Array();
export function createBluePrintTx <ApiType extends ApiTypes, R extends SubmittableResult> (fn: (options: BlueprintOptions, params: unknown[]) => SubmittableExtrinsic<ApiType, R>): BlueprintDeploy<ApiType> {
return (options: bigint | string | number | BN | BlueprintOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType, R> =>
export function withMeta <T extends { meta: AbiMessage }> (meta: AbiMessage, creator: Omit<T, 'meta'>): T {
(creator as T).meta = meta;
return creator as T;
}
export function createBluePrintTx <ApiType extends ApiTypes, R extends SubmittableResult> (meta: AbiMessage, fn: (options: BlueprintOptions, params: unknown[]) => SubmittableExtrinsic<ApiType, R>): BlueprintDeploy<ApiType> {
return withMeta(meta, (options: bigint | string | number | BN | BlueprintOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType, R> =>
isOptions(options)
? fn(options, params)
: fn(...extractOptions<BlueprintOptions>(options, params));
: fn(...extractOptions<BlueprintOptions>(options, params))
);
}
export function createBluePrintWithId <T> (fn: (constructorOrId: AbiConstructor | string | number, options: BlueprintOptions, params: unknown[]) => T): ContractGeneric<BlueprintOptions, T> {
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
export { Abi } from './Abi';
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Simple non-runnable checks to test type definitions in the editor itself
+7
View File
@@ -0,0 +1,7 @@
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { packageInfo as apiInfo } from '@polkadot/api/packageInfo';
import { packageInfo as typesInfo } from '@polkadot/types/packageInfo';
export default [apiInfo, typesInfo];
+5 -4
View File
@@ -1,10 +1,11 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { packageInfo as apiInfo } from '@polkadot/api/packageInfo';
import { packageInfo as typesInfo } from '@polkadot/types/packageInfo';
// Do not edit, auto-generated by @polkadot/dev
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname, [apiInfo, typesInfo]);
detectPackage(packageInfo, null, others);
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import './detectPackage';
+3 -3
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Auto-generated by @polkadot/dev, do not edit
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-contract', version: '7.0.2' };
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '7.15.1' };
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { AccountId, Hash } from '@polkadot/types/interfaces';

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