Compare commits

...
91 Commits
Author SHA1 Message Date
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
github-actions[bot] a7752f3c18 [CI Skip] release/stable 7.0.2
skip-checks: true
2021-12-21 08:41:54 +00:00
Jaco 3a06775f9f 7.0.2 (#4375) 2021-12-21 10:34:28 +02:00
github-actions[bot] 936b5d9b72 [CI Skip] release/beta 7.0.2-3
skip-checks: true
2021-12-21 08:26:30 +00:00
Jaco 523f1622b5 Collective aliases (don't apply to derive naming) (#4374)
* Collective aliases (don't apply to derive naming)

* Fix build (aka new form apply to prime)
2021-12-21 10:17:41 +02:00
github-actions[bot] a2c027b7b7 [CI Skip] release/beta 7.0.2-2
skip-checks: true
2021-12-21 08:16:23 +00:00
Jaco d13f66eb5b Prep for preimage pallet usage (#4372)
* Prep for preimage pallet usage

* info uses derives

* adjust
2021-12-21 10:07:13 +02:00
github-actions[bot] 9f400ea15c [CI Skip] release/beta 7.0.2-1
skip-checks: true
2021-12-21 06:42:37 +00:00
Jaco c0e841031a Update Substrate metadata & scheduler usage (#4371) 2021-12-21 08:33:23 +02:00
github-actions[bot] 34f6b7b560 [CI Skip] release/beta 7.0.2-0
skip-checks: true
2021-12-20 16:05:36 +00:00
Jaco 55fe455713 Small import cleanups (#4368) 2021-12-20 17:58:16 +02:00
838 changed files with 29842 additions and 7198 deletions
+3 -1
View File
@@ -45,4 +45,6 @@
6.7.2
6.9.2
6.10.2
6.10.3
6.10.3
7.0.2
+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');
+1
View File
@@ -15,6 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.GH_PAT }}
- name: ${{ matrix.step }}
env:
+1
View File
@@ -0,0 +1 @@
Jaco <jacogr@gmail.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
+768
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.1.1.cjs
+53
View File
@@ -1,5 +1,58 @@
# CHANGELOG
## 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.
Changes:
- Fix alias module mapping in collective derives
- Update `dispathchQueue` derive to align with latest Substrate
- Update to latest Substrate metadata
## 7.0.1 Dec 20, 2021
Upgrade priority: Low. Recommended for TS users with their own non-Polkadot/Kusama chains.
+91
View File
@@ -0,0 +1,91 @@
2752 Jaco
83 Amaury Martiny
36 Keith Ingram
35 Stefanie Doll
20 Luke Schoen
15 Jeremías Díaz
15 Xiliang Chen
11 Ian He
10 Axel Chalon
5 Chevdor
5 Jake Naviasky
4 Alex Wang
4 Alexander Popiak
4 Joshy Orndorff
4 Nantian
4 Thibaut Sardan
3 Alex D
3 André Silva
3 Antoine Estienne
3 Arjan Zijderveld
3 Ewa Kowalska
3 hamidra
3 Hamza Tokuchi
3 Julien Eluard
3 KarishmaBothara
3 Miguel Hervas
3 Shawn Tabrizi
3 YJ
2 Alexander Krupenkin
2 Branan Riley
2 Caio
2 Jakub Pánik
2 James Lefrère
2 Keith Yeung
2 Nikos Kontakis
2 Paweł Nguyen
2 sung wu
2 Veliko
2 Wei Tang
2 扩散性百万甜面包
1 Andreea Eftene
1 Brad Larson
1 chriswmercer
1 codingsh
1 Dan Forbes
1 Daniel Maricic
1 Daniel Savu
1 David
1 Denis Tsai
1 djuanito.eth
1 Drew Stone
1 Dylan Galea
1 flex
1 Furqan A
1 Gerben van de Wiel
1 HackFisher
1 Hoani Bryson
1 Hyungsuk Kang
1 icodezjb
1 iiiiiiii
1 JesseAbram
1 Joey
1 Jordan
1 JQQQ
1 Kian Paimani
1 Krzysztof Jelski
1 Lae
1 Lezek123
1 Lovesh Harchandani
1 Mario Neises
1 Mario Pino
1 Mark Robert Henderson
1 Matej Nemček
1 Mokhtar Naamani
1 Nazar Mokrynskyi
1 Nikhil Ranjan
1 Nikolay Volf
1 Paul M Fox
1 philipstanislaus
1 qiuhao
1 Rocco Musolino
1 satellitex
1 satellitex
1 Satyam Agrawal
1 Sean Young
1 Sergei Pepyakin
1 WoeOm
1 Xat_MassacrE
1 yjh
1 Yuri
1 Zeke Mostov
+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');
+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 config = require('@polkadot/dev/config/jest.cjs');
+6 -7
View File
@@ -11,7 +11,7 @@
},
"sideEffects": false,
"type": "commonjs",
"version": "7.0.1",
"version": "7.3.1",
"workspaces": [
"packages/*"
],
@@ -31,13 +31,12 @@
"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.8",
"@polkadot/ts": "^0.4.20",
"@babel/core": "^7.16.7",
"@babel/register": "^7.16.7",
"@babel/runtime": "^7.16.7",
"@polkadot/dev": "^0.65.23",
"@polkadot/typegen": "workspace:packages/typegen",
"@types/jest": "^27.0.3",
"@types/jest": "^27.4.0",
"copyfiles": "^2.4.1"
},
"resolutions": {
+8 -8
View File
@@ -20,15 +20,15 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.0.1",
"version": "7.3.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/api-base": "7.0.1",
"@polkadot/rpc-augment": "7.0.1",
"@polkadot/types": "7.0.1",
"@polkadot/types-augment": "7.0.1",
"@polkadot/types-codec": "7.0.1",
"@polkadot/util": "^8.2.2"
"@babel/runtime": "^7.16.7",
"@polkadot/api-base": "7.3.1",
"@polkadot/rpc-augment": "7.3.1",
"@polkadot/types": "7.3.1",
"@polkadot/types-augment": "7.3.1",
"@polkadot/types-codec": "7.3.1",
"@polkadot/util": "^8.3.1"
}
}
-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';
+896
View File
@@ -0,0 +1,896 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
import type { ApiTypes } from '@polkadot/api-base/types';
import type { Bytes, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { 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 vote weight. This specifies the
* thresholds separating the bags. An id's bag is the largest bag for which the id's weight
* 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.
*
* # 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
* 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.
*
* # 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 weight 0 or 1 will fall
* into bag 0, an id with weight 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: {
/**
* 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.
**/
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>;
/**
* 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;
};
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: {
/**
* 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>;
/**
* 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
**/
[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.
**/
maxFriends: u16 & 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>;
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>;
/**
* 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.
**/
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>;
/**
* 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
+9
View File
@@ -0,0 +1,9 @@
// 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 './tx';
File diff suppressed because it is too large Load Diff
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.1' };
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '7.3.1' };
+768
View File
@@ -0,0 +1,768 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
import type { ApiTypes } from '@polkadot/api-base/types';
import type { Bytes, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { 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 vote weight. This specifies the
* thresholds separating the bags. An id's bag is the largest bag for which the id's weight
* 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.
*
* # 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
* 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.
*
* # 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 weight 0 or 1 will fall
* into bag 0, an id with weight 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: {
/**
* 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.
**/
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>;
/**
* 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;
};
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: {
/**
* 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>;
/**
* 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
**/
[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>;
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>;
/**
* 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.
**/
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>;
/**
* 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,9 @@
// 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 './tx';
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -14,6 +14,11 @@ declare module '@polkadot/api-base/types/consts' {
* The amount of funds that must be reserved when creating a new approval.
**/
approvalDeposit: u128 & AugmentedConst<ApiType>;
/**
* The amount of funds that must be reserved for a non-provider asset account to be
* maintained.
**/
assetAccountDeposit: u128 & AugmentedConst<ApiType>;
/**
* The basic amount of funds that must be reserved for an asset.
**/
@@ -201,11 +206,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>;
/**
@@ -218,6 +242,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.
@@ -6,6 +6,10 @@ import type { ApiTypes } from '@polkadot/api-base/types';
declare module '@polkadot/api-base/types/errors' {
export interface AugmentedErrors<ApiType extends ApiTypes> {
assets: {
/**
* The asset-account already exists.
**/
AlreadyExists: AugmentedError<ApiType>;
/**
* Invalid metadata given.
**/
@@ -18,10 +22,6 @@ declare module '@polkadot/api-base/types/errors' {
* Account balance must be greater than or equal to the transfer amount.
**/
BalanceLow: AugmentedError<ApiType>;
/**
* Balance should be non-zero.
**/
BalanceZero: AugmentedError<ApiType>;
/**
* The origin account is frozen.
**/
@@ -34,13 +34,22 @@ declare module '@polkadot/api-base/types/errors' {
* Minimum balance should be non-zero.
**/
MinBalanceZero: AugmentedError<ApiType>;
/**
* The account to alter does not exist.
**/
NoAccount: AugmentedError<ApiType>;
/**
* The asset-account doesn't have an associated deposit.
**/
NoDeposit: AugmentedError<ApiType>;
/**
* The signing account has no permission to do the operation.
**/
NoPermission: AugmentedError<ApiType>;
/**
* No provider reference exists to allow a non-zero balance of a non-self-sufficient
* asset.
* Unable to increment the consumer reference counters on the account. Either no provider
* reference exists to allow a non-zero balance of a non-self-sufficient asset, or the
* maximum number of consumers has been reached.
**/
NoProvider: AugmentedError<ApiType>;
/**
@@ -51,6 +60,10 @@ declare module '@polkadot/api-base/types/errors' {
* The given asset ID is unknown.
**/
Unknown: AugmentedError<ApiType>;
/**
* The operation would result in funds being burned.
**/
WouldBurn: AugmentedError<ApiType>;
/**
* The source account would not survive the transfer and it needs to stay alive.
**/
@@ -251,6 +264,13 @@ declare module '@polkadot/api-base/types/errors' {
* No contract was found at the specified address.
**/
ContractNotFound: AugmentedError<ApiType>;
/**
* The contract ran to completion but decided to revert its storage changes.
* Please note that this error is only returned from extrinsics. When called directly
* or via RPC an `Ok` will be returned. In this case the caller needs to inspect the flags
* to determine whether a reversion has taken place.
**/
ContractReverted: AugmentedError<ApiType>;
/**
* Contract trapped during execution.
**/
@@ -925,6 +945,36 @@ declare module '@polkadot/api-base/types/errors' {
**/
[key: string]: AugmentedError<ApiType>;
};
preimage: {
/**
* Preimage has already been noted on-chain.
**/
AlreadyNoted: AugmentedError<ApiType>;
/**
* The user is not authorized to perform this action.
**/
NotAuthorized: AugmentedError<ApiType>;
/**
* The preimage cannot be removed since it has not yet been noted.
**/
NotNoted: AugmentedError<ApiType>;
/**
* The preimage request cannot be removed since no outstanding requests exist.
**/
NotRequested: AugmentedError<ApiType>;
/**
* A preimage may not be removed when there are outstanding requests.
**/
Requested: AugmentedError<ApiType>;
/**
* Preimage is too large to store on-chain.
**/
TooLarge: AugmentedError<ApiType>;
/**
* Generic error
**/
[key: string]: AugmentedError<ApiType>;
};
proxy: {
/**
* Account is already a proxy.
@@ -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 { FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, NodeRuntimeProxyType, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletStakingExposure, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError } from '@polkadot/types/lookup';
import type { FrameSupportScheduleLookupError, FrameSupportTokensMiscBalanceStatus, FrameSupportWeightsDispatchInfo, NodeRuntimeProxyType, PalletDemocracyVoteAccountVote, PalletDemocracyVoteThreshold, PalletElectionProviderMultiPhaseElectionCompute, PalletImOnlineSr25519AppSr25519Public, PalletMultisigTimepoint, PalletStakingExposure, SpFinalityGrandpaAppPublic, SpRuntimeDispatchError } from '@polkadot/types/lookup';
declare module '@polkadot/api-base/types/events' {
export interface AugmentedEvents<ApiType extends ApiTypes> {
@@ -609,6 +609,24 @@ declare module '@polkadot/api-base/types/events' {
**/
[key: string]: AugmentedEvent<ApiType>;
};
preimage: {
/**
* A preimage has ben cleared.
**/
Cleared: AugmentedEvent<ApiType, [H256]>;
/**
* A preimage has been noted.
**/
Noted: AugmentedEvent<ApiType, [H256]>;
/**
* A preimage has been requested.
**/
Requested: AugmentedEvent<ApiType, [H256]>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
proxy: {
/**
* An announcement was placed to make a call in the future.
@@ -663,6 +681,10 @@ declare module '@polkadot/api-base/types/events' {
[key: string]: AugmentedEvent<ApiType>;
};
scheduler: {
/**
* The call for the provided hash was not found so the task has been aborted.
**/
CallLookupFailed: AugmentedEvent<ApiType, [ITuple<[u32, u32]>, Option<Bytes>, FrameSupportScheduleLookupError]>;
/**
* Canceled some task.
**/
@@ -829,9 +851,9 @@ declare module '@polkadot/api-base/types/events' {
};
sudo: {
/**
* The \[sudoer\] just switched identity; the old key is supplied.
* The \[sudoer\] just switched identity; the old key is supplied if one existed.
**/
KeyChanged: AugmentedEvent<ApiType, [AccountId32]>;
KeyChanged: AugmentedEvent<ApiType, [Option<AccountId32>]>;
/**
* A sudo just took place. \[result\]
**/
@@ -0,0 +1,9 @@
// 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 './tx';
@@ -3,19 +3,19 @@
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, PalletAssetsAssetBalance, 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, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerReleases, PalletSchedulerScheduledV2, 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, 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 { Observable } from '@polkadot/types/types';
declare module '@polkadot/api-base/types/storage' {
export interface AugmentedQueries<ApiType extends ApiTypes> {
assets: {
/**
* The number of units of assets held by any given account.
* The holdings of a specific account for a specific asset.
**/
account: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<PalletAssetsAssetBalance>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;
account: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: AccountId32 | string | Uint8Array) => Observable<Option<PalletAssetsAssetAccount>>, [u32, AccountId32]> & QueryableStorageEntry<ApiType, [u32, AccountId32]>;
/**
* Approved balance transfers. First balance is the amount approved for transfer. Second
* is the amount of `T::Currency` reserved for storing this.
@@ -478,7 +478,7 @@ declare module '@polkadot/api-base/types/storage' {
* Twox note: the key of the map is an auto-incrementing index which users cannot inspect or
* affect; we shouldn't need a cryptographically secure hasher.
**/
signedSubmissionsMap: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<PalletElectionProviderMultiPhaseSignedSignedSubmission>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
signedSubmissionsMap: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletElectionProviderMultiPhaseSignedSignedSubmission>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Snapshot data of the round.
*
@@ -723,7 +723,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.
**/
@@ -756,6 +756,20 @@ declare module '@polkadot/api-base/types/storage' {
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
preimage: {
/**
* The preimages stored by this pallet.
**/
preimageFor: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<Bytes>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
/**
* The request status of a given hash.
**/
statusFor: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<PalletPreimageRequestStatus>>, [H256]> & QueryableStorageEntry<ApiType, [H256]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
proxy: {
/**
* The announcements made by the proxy (key).
@@ -810,7 +824,7 @@ declare module '@polkadot/api-base/types/storage' {
/**
* Items to be executed, indexed by the block number that they should be executed on.
**/
agenda: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Option<PalletSchedulerScheduledV2>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
agenda: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<Option<PalletSchedulerScheduledV3>>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* Lookup from identity to the block number and index of the task.
**/
@@ -1172,7 +1186,7 @@ declare module '@polkadot/api-base/types/storage' {
/**
* The `AccountId` of the sudo key.
**/
key: AugmentedQuery<ApiType, () => Observable<AccountId32>, []> & QueryableStorageEntry<ApiType, []>;
key: AugmentedQuery<ApiType, () => Observable<Option<AccountId32>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* Generic query
**/
@@ -1420,6 +1434,11 @@ declare module '@polkadot/api-base/types/storage' {
* Details of an asset class.
**/
class: AugmentedQuery<ApiType, (arg: u32 | AnyNumber | Uint8Array) => Observable<Option<PalletUniquesClassDetails>>, [u32]> & QueryableStorageEntry<ApiType, [u32]>;
/**
* The classes owned by any given account; set out this way so that classes owned by a single
* account can be enumerated.
**/
classAccount: AugmentedQuery<ApiType, (arg1: AccountId32 | string | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<Null>>, [AccountId32, u32]> & QueryableStorageEntry<ApiType, [AccountId32, u32]>;
/**
* Metadata of an asset class.
**/
@@ -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 { 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 { 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';
declare module '@polkadot/api-base/types/submittable' {
export interface AugmentedSubmittables<ApiType extends ApiTypes> {
@@ -39,7 +39,7 @@ declare module '@polkadot/api-base/types/submittable' {
*
* Origin must be Signed and the sender should be the Manager of the asset `id`.
*
* Bails with `BalanceZero` if the `who` is already dead.
* Bails with `NoAccount` if the `who` is already dead.
*
* - `id`: The identifier of the asset to have some amount burned.
* - `who`: The account to be debited from.
@@ -281,6 +281,17 @@ declare module '@polkadot/api-base/types/submittable' {
* Modes: Pre-existing balance of `beneficiary`; Account pre-existence of `beneficiary`.
**/
mint: AugmentedSubmittable<(id: Compact<u32> | AnyNumber | Uint8Array, beneficiary: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, amount: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, MultiAddress, Compact<u128>]>;
/**
* Return the deposit (if any) of an asset account.
*
* The origin must be Signed.
*
* - `id`: The identifier of the asset for the account to be created.
* - `allow_burn`: If `true` then assets may be destroyed in order to complete the refund.
*
* Emits `Refunded` event when successful.
**/
refund: AugmentedSubmittable<(id: Compact<u32> | AnyNumber | Uint8Array, allowBurn: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>, bool]>;
/**
* Set the metadata for an asset.
*
@@ -340,6 +351,18 @@ declare module '@polkadot/api-base/types/submittable' {
* Weight: `O(1)`
**/
thawAsset: AugmentedSubmittable<(id: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* Create an asset account for non-provider assets.
*
* A deposit will be taken from the signer account.
*
* - `origin`: Must be Signed; the signer account must have sufficient funds for a deposit
* to be taken.
* - `id`: The identifier of the asset for the account to be created.
*
* Emits `Touched` event when successful.
**/
touch: AugmentedSubmittable<(id: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* Move some assets from the sender account to another.
*
@@ -510,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`).
*
@@ -521,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.
*
@@ -2243,7 +2265,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.
*
@@ -2297,6 +2319,36 @@ declare module '@polkadot/api-base/types/submittable' {
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
preimage: {
/**
* Register a preimage on-chain.
*
* If the preimage was previously requested, no fees or deposits are taken for providing
* the preimage. Otherwise, a deposit is taken proportional to the size of the preimage.
**/
notePreimage: AugmentedSubmittable<(bytes: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes]>;
/**
* Request a preimage be uploaded to the chain without paying any fees or deposits.
*
* If the preimage requests has already been provided on-chain, we unreserve any deposit
* a user may have paid, and take the control of the preimage out of their hands.
**/
requestPreimage: AugmentedSubmittable<(hash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
/**
* Clear an unrequested preimage from the runtime storage.
**/
unnotePreimage: AugmentedSubmittable<(hash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
/**
* Clear a previously made request for a preimage.
*
* NOTE: THIS MUST NOT BE CALLED ON `hash` MORE TIMES THAN `request_preimage`.
**/
unrequestPreimage: AugmentedSubmittable<(hash: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [H256]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
proxy: {
/**
* Register a proxy account for the sender that is able to make calls on its behalf.
@@ -2711,7 +2763,7 @@ declare module '@polkadot/api-base/types/submittable' {
/**
* Anonymously schedule a task.
**/
schedule: AugmentedSubmittable<(when: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | object | string | Uint8Array, priority: u8 | AnyNumber | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Option<ITuple<[u32, u32]>>, u8, Call]>;
schedule: AugmentedSubmittable<(when: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | object | string | Uint8Array, priority: u8 | AnyNumber | Uint8Array, call: FrameSupportScheduleMaybeHashed | { Value: any } | { Hash: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Option<ITuple<[u32, u32]>>, u8, FrameSupportScheduleMaybeHashed]>;
/**
* Anonymously schedule a task after a delay.
*
@@ -2719,11 +2771,11 @@ declare module '@polkadot/api-base/types/submittable' {
* Same as [`schedule`].
* # </weight>
**/
scheduleAfter: AugmentedSubmittable<(after: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | object | string | Uint8Array, priority: u8 | AnyNumber | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Option<ITuple<[u32, u32]>>, u8, Call]>;
scheduleAfter: AugmentedSubmittable<(after: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | object | string | Uint8Array, priority: u8 | AnyNumber | Uint8Array, call: FrameSupportScheduleMaybeHashed | { Value: any } | { Hash: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32, Option<ITuple<[u32, u32]>>, u8, FrameSupportScheduleMaybeHashed]>;
/**
* Schedule a named task.
**/
scheduleNamed: AugmentedSubmittable<(id: Bytes | string | Uint8Array, when: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | object | string | Uint8Array, priority: u8 | AnyNumber | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, u32, Option<ITuple<[u32, u32]>>, u8, Call]>;
scheduleNamed: AugmentedSubmittable<(id: Bytes | string | Uint8Array, when: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | object | string | Uint8Array, priority: u8 | AnyNumber | Uint8Array, call: FrameSupportScheduleMaybeHashed | { Value: any } | { Hash: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, u32, Option<ITuple<[u32, u32]>>, u8, FrameSupportScheduleMaybeHashed]>;
/**
* Schedule a named task after a delay.
*
@@ -2731,7 +2783,7 @@ declare module '@polkadot/api-base/types/submittable' {
* Same as [`schedule_named`](Self::schedule_named).
* # </weight>
**/
scheduleNamedAfter: AugmentedSubmittable<(id: Bytes | string | Uint8Array, after: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | object | string | Uint8Array, priority: u8 | AnyNumber | Uint8Array, call: Call | { callIndex?: any; args?: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, u32, Option<ITuple<[u32, u32]>>, u8, Call]>;
scheduleNamedAfter: AugmentedSubmittable<(id: Bytes | string | Uint8Array, after: u32 | AnyNumber | Uint8Array, maybePeriodic: Option<ITuple<[u32, u32]>> | null | object | string | Uint8Array, priority: u8 | AnyNumber | Uint8Array, call: FrameSupportScheduleMaybeHashed | { Value: any } | { Hash: any } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [Bytes, u32, Option<ITuple<[u32, u32]>>, u8, FrameSupportScheduleMaybeHashed]>;
/**
* Generic tx
**/
+4
View File
@@ -5,6 +5,10 @@
"outDir": "./build",
"rootDir": "./src"
},
"exclude": [
"**/kusama/*.ts",
"**/polkadot/*.ts"
],
"references": [
{ "path": "../api-base" },
{ "path": "../rpc-augment" },
+19
View File
@@ -0,0 +1,19 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"include": [
"**/base.ts",
"**/kusama/*.ts"
],
"references": [
{ "path": "../api-base" },
{ "path": "../rpc-augment" },
{ "path": "../types" },
{ "path": "../types-codec" },
{ "path": "../types-augment" }
]
}
@@ -0,0 +1,19 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"include": [
"**/base.ts",
"**/polkadot/*.ts"
],
"references": [
{ "path": "../api-base" },
{ "path": "../rpc-augment" },
{ "path": "../types" },
{ "path": "../types-codec" },
{ "path": "../types-augment" }
]
}
+6 -6
View File
@@ -20,13 +20,13 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.0.1",
"version": "7.3.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/rpc-core": "7.0.1",
"@polkadot/types": "7.0.1",
"@polkadot/util": "^8.2.2",
"rxjs": "^7.4.0"
"@babel/runtime": "^7.16.7",
"@polkadot/rpc-core": "7.3.1",
"@polkadot/types": "7.3.1",
"@polkadot/util": "^8.3.1",
"rxjs": "^7.5.1"
}
}
+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.1' };
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '7.3.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';
+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';
+2 -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,7 @@ export interface SubmittableResultValue {
events?: EventRecord[];
internalError?: Error;
status: ExtrinsicStatus;
txHash: Hash;
}
export interface SubmittableExtrinsic<ApiType extends ApiTypes, R extends ISubmittableResult = ISubmittableResult> extends Extrinsic {
+13 -8
View File
@@ -20,15 +20,20 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.0.1",
"version": "7.3.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/api": "7.0.1",
"@polkadot/types": "7.0.1",
"@polkadot/types-create": "7.0.1",
"@polkadot/util": "^8.2.2",
"@polkadot/util-crypto": "^8.2.2",
"rxjs": "^7.4.0"
"@babel/runtime": "^7.16.7",
"@polkadot/api": "7.3.1",
"@polkadot/types": "7.3.1",
"@polkadot/types-codec": "7.3.1",
"@polkadot/types-create": "7.3.1",
"@polkadot/util": "^8.3.1",
"@polkadot/util-crypto": "^8.3.1",
"rxjs": "^7.5.1"
},
"devDependencies": {
"@polkadot/api-augment": "7.3.1",
"@polkadot/keyring": "^8.3.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 { Registry } from '@polkadot/types/types';
+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 { Bytes } from '@polkadot/types';
@@ -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 { v0ToLatest, v1ToLatest } from '@polkadot/api-contract/Abi/toLatest';
+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 { ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1 } from '@polkadot/types/interfaces';
+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 { ContractMetadataV0, ContractMetadataV1 } from '@polkadot/types/interfaces';
+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 { Text } from '@polkadot/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
import type { ApiTypes, DecorateMethod } from '@polkadot/api/types';
+11 -11
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';
@@ -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';
+7 -5
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';
@@ -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[]) =>
+14 -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';
@@ -106,14 +106,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 +134,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 +143,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 +157,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';
+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 { Observable } from 'rxjs';
+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 { SubmittableResult } from '@polkadot/api';
+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.1' };
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '7.3.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';
+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 { BlueprintSubmittableResult as BaseBlueprintSubmittableResult, CodeSubmittableResult as BaseCodeSubmittableResult } from '../base';
+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';
+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 { BlueprintSubmittableResult as BaseBlueprintSubmittableResult, CodeSubmittableResult as BaseCodeSubmittableResult } from '../base';
@@ -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 ink from './ink';
@@ -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 { createVersionedExport } from '../util';
@@ -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 { default as delegator } from './delegator.json';
@@ -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 { default as flipper } from './flipper.contract.json';
@@ -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 { default as erc20 } from './erc20.contract.json';
@@ -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 { createVersionedExport } from '../util';
@@ -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 { default as ints256 } from './ints256.json';
@@ -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 { createVersionedExport } from '../util';
@@ -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 { default as assetTransfer } from './assetTransfer.json';
@@ -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 function createVersionedExport (versioned: Record<string, Record<string, unknown>>): Record<string, Record<string, unknown>> {
+9 -9
View File
@@ -1,10 +1,10 @@
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
// Copyright 2017-2022 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ApiBase } from '@polkadot/api/base';
import type { ApiTypes } from '@polkadot/api/types';
import type { Text, u64 } from '@polkadot/types';
import type { ContractExecResultResult, ContractSelector } from '@polkadot/types/interfaces';
import type { ContractExecResultResult, ContractSelector, StorageDeposit } from '@polkadot/types/interfaces';
import type { Codec, TypeDef } from '@polkadot/types/types';
import type { BN } from '@polkadot/util';
import type { Abi } from '.';
@@ -58,6 +58,7 @@ export interface ContractCallOutcome {
gasRequired: u64;
output: Codec | null;
result: ContractExecResultResult;
storageDeposit: StorageDeposit;
}
export interface DecodedEvent {
@@ -70,13 +71,12 @@ export interface DecodedMessage {
message: AbiMessage;
}
export interface BlueprintOptions {
gasLimit?: bigint | string | number | BN;
salt?: Uint8Array | string | null;
value?: bigint | string | number | BN;
}
export interface ContractOptions {
gasLimit?: bigint | BN | string | number;
gasLimit?: bigint | string | number | BN;
storageDepositLimit?: bigint | string | number | BN | null;
value?: bigint | BN | string | number;
}
export interface BlueprintOptions extends ContractOptions {
salt?: Uint8Array | string | null;
}
+1 -1
View File
@@ -1,4 +1,4 @@
// Copyright 2017-2021 @polkadot/rpc-contract authors & contributors
// Copyright 2017-2022 @polkadot/rpc-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { SubmittableResult } from '@polkadot/api';
+2 -2
View File
@@ -16,7 +16,7 @@
"references": [
{ "path": "../api" },
{ "path": "../types" },
{ "path": "../types-create" },
{ "path": "../types-support" }
{ "path": "../types-codec" },
{ "path": "../types-create" }
]
}

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