Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
389c4c5255 | ||
|
|
493287cedf | ||
|
|
fe52dc8006 | ||
|
|
f26008ab95 | ||
|
|
0952720237 | ||
|
|
04058fe95e | ||
|
|
eb96371e59 | ||
|
|
a313fe13e7 | ||
|
|
243c263485 | ||
|
|
311d8b792c | ||
|
|
878f631745 | ||
|
|
d7753839a2 | ||
|
|
fc74d88bbb | ||
|
|
47bbeee14b | ||
|
|
ba01620ba1 | ||
|
|
6e66387a8d | ||
|
|
c58687b3c6 | ||
|
|
2801088b0a | ||
|
|
fc5af92a03 | ||
|
|
8f8bb2aa23 | ||
|
|
3f69b3fc73 | ||
|
|
4ea170a83a | ||
|
|
26649c429a | ||
|
|
7c57778389 | ||
|
|
dbb5d66de3 | ||
|
|
6bc92a6d31 | ||
|
|
6462327ea5 | ||
|
|
3b4c2ac323 | ||
|
|
d0ecfdafc1 | ||
|
|
870bb8d3cb | ||
|
|
2fdb68d3bc | ||
|
|
6ef410e375 | ||
|
|
962c741139 | ||
|
|
598e69002a | ||
|
|
f6e50f14b5 | ||
|
|
caec49a8dc | ||
|
|
0865b91f88 | ||
|
|
6b45d5606d | ||
|
|
a22f66f044 | ||
|
|
41fd67c24e | ||
|
|
19e7d6dbdb | ||
|
|
8fea8872fc | ||
|
|
d17fc3b63b | ||
|
|
f8e012cf87 | ||
|
|
830af4a928 | ||
|
|
345c536380 | ||
|
|
d527a02d2f | ||
|
|
22aafbdd4c | ||
|
|
88e5b26532 | ||
|
|
a203168126 | ||
|
|
538544be84 | ||
|
|
264bbf12c9 | ||
|
|
5c144a8ae7 | ||
|
|
f28d648fac | ||
|
|
f695cd0835 | ||
|
|
44fdbdffd5 | ||
|
|
ee5ae49df7 | ||
|
|
febcabe109 | ||
|
|
367efda128 | ||
|
|
3583e758cd | ||
|
|
d6fe638c5b | ||
|
|
ea72e3eb5b | ||
|
|
45c0e16ecd | ||
|
|
5b1823f7eb | ||
|
|
6e998cce3d | ||
|
|
c46740e4e8 | ||
|
|
4e5b98725b | ||
|
|
fca973cd53 | ||
|
|
d1c9a507d9 | ||
|
|
2cfd2f4d20 | ||
|
|
d3b90c068f | ||
|
|
3127c00d05 | ||
|
|
3cdf3065d7 | ||
|
|
973b1fcffb | ||
|
|
4195833d6f | ||
|
|
8f4e62c278 | ||
|
|
2c294af116 | ||
|
|
0f1f3b88b2 | ||
|
|
56b7697dda |
+10
-2
@@ -1,4 +1,4 @@
|
||||
32
|
||||
33
|
||||
1.4.2
|
||||
1.6.2
|
||||
1.11.2
|
||||
@@ -26,4 +26,12 @@
|
||||
4.16.2
|
||||
|
||||
5.3.2
|
||||
5.5.2
|
||||
5.5.2
|
||||
5.8.2
|
||||
5.8.3
|
||||
|
||||
6.0.2
|
||||
6.0.3
|
||||
6.0.4
|
||||
6.0.5
|
||||
6.1.2
|
||||
+123
@@ -1,5 +1,128 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 6.1.2 Sep 29, 2021
|
||||
|
||||
Upgrade priority: Low. Recommended for 6.x users using historic queries.
|
||||
|
||||
Changes:
|
||||
|
||||
- Fix `.at` queries/decoration for pre-V13 metadata
|
||||
- Added `BridgeMessageId` & `SpecVersion` types for bridges
|
||||
- Added `WrapperOpaque` encoding/decoding (as per latest Substrate)
|
||||
- Bump static metadata for latest Substrate, Polkadot & Kusama
|
||||
|
||||
|
||||
## 6.1.1 Sep 27, 2021
|
||||
|
||||
Upgrade priority: Low. Minor maintenance changes from the 6.0.x versions.
|
||||
|
||||
Contributed:
|
||||
|
||||
- Adjust bridges `OutboundLaneData` type (Thanks to https://github.com/HackFisher)
|
||||
- Fix README 404 (Thanks to https://github.com/nblogist)
|
||||
|
||||
Changes:
|
||||
|
||||
- Add `childstate_getStorageEntries` RPC
|
||||
- Allow for scale-info v0 -> v1 conversion
|
||||
|
||||
|
||||
## 6.0.5 Sep 20, 2021
|
||||
|
||||
Upgrade priority: Low. Recommended for all users on 6.0.4 using `api.query.*.*.at` calls
|
||||
|
||||
Changes:
|
||||
|
||||
- Revert cross-registry (now-inactive) change introduced in 6.0.3
|
||||
- Ensure `Option` is correctly imported for TS query generation
|
||||
|
||||
|
||||
## 6.0.4 Sep 20, 2021
|
||||
|
||||
Upgrade priority: Low. Recommended for all users on 6.0.3 using `api.query.*.*.at` calls
|
||||
|
||||
Changes:
|
||||
|
||||
- `api.query.<module>.<method>.at` will now use `at.at(<hash>)`
|
||||
- Use and expose `metadata/util/getSiName` to get human type names
|
||||
|
||||
|
||||
## 6.0.3 Sep 19, 2021
|
||||
|
||||
Upgrade priority: Low. Recommended for all users on 6.0.2 using `api.query.*.*.at` calls
|
||||
|
||||
Changes:
|
||||
|
||||
- Fix `api.query.<module>.<method>.at` queries
|
||||
- Adjust typegen formatting for metadata documentation
|
||||
|
||||
|
||||
## 6.0.2 Sep 18, 2021
|
||||
|
||||
Upgrade priority: Low. Recommended for all users on 6.0.1, especially those using `api.query.substrate.*` calls
|
||||
|
||||
Changes:
|
||||
|
||||
- Fix `api.query.substrate.*` key generation
|
||||
|
||||
|
||||
## 6.0.1 Sep 18, 2021
|
||||
|
||||
Upgrade priority: Low. Recommended for users of the latest Substrate/Polkadot with Metadata v14.
|
||||
|
||||
- **Important** The Metadata v14 change allows the metadata to expose the chain types. This has been a major overhaul of the metadata handling, hence the major version bump.
|
||||
|
||||
Contributed:
|
||||
|
||||
- Allow for `.clone` on Http provider (Thanks to https://github.com/ianhe8x)
|
||||
|
||||
Changes:
|
||||
|
||||
- Allow for Metadata v14 parsing & usage
|
||||
- Align `DigestItem` to latest Substrate
|
||||
- Adjust Kusama `IdentityInfo` type for historic versions
|
||||
- All `null` values in bundles min/max
|
||||
- Bump static metadata for latest Substrate, Polkadot & Kusama
|
||||
|
||||
|
||||
## 5.9.1 Sep 13, 2021
|
||||
|
||||
Upgrade priority: Low. Recommended for chains using Xcm.
|
||||
|
||||
Contributed:
|
||||
|
||||
- Adjust Centrifuge `ProxyType` (Thanks to https://github.com/branan)
|
||||
|
||||
Changes:
|
||||
|
||||
- Additional types for parachain Disputes
|
||||
- Adjust Xcm Error enum types
|
||||
- Add Polkadot 9090 upgrade block
|
||||
- Decoding enhancements with narrowing checks for TS
|
||||
|
||||
|
||||
## 5.8.3 Sep 6, 2021
|
||||
|
||||
Upgrade priority: Low.
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust Statemint, Rococo and Westend Xcm overrides
|
||||
|
||||
|
||||
## 5.8.2 Sep 6, 2021
|
||||
|
||||
Upgrade priority: Low.
|
||||
|
||||
Contributed:
|
||||
|
||||
- Correct Xcm V1 `MultiLocation` definitions (Thanks to https://github.com/apopiak)
|
||||
|
||||
Changes:
|
||||
|
||||
- Adjust Kusama Xcm overrides
|
||||
|
||||
|
||||
## 5.8.1 Sep 6, 2021
|
||||
|
||||
Upgrade priority: Low.
|
||||
|
||||
+5
-5
@@ -8,7 +8,7 @@
|
||||
"packages/*"
|
||||
],
|
||||
"resolutions": {
|
||||
"typescript": "^4.4.2"
|
||||
"typescript": "^4.4.3"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "yarn build:interfaces && polkadot-dev-build-ts",
|
||||
@@ -29,12 +29,12 @@
|
||||
"@babel/core": "^7.15.5",
|
||||
"@babel/register": "^7.15.3",
|
||||
"@babel/runtime": "^7.15.4",
|
||||
"@polkadot/dev": "^0.62.66",
|
||||
"@polkadot/ts": "^0.4.7",
|
||||
"@polkadot/dev": "^0.62.68",
|
||||
"@polkadot/ts": "^0.4.8",
|
||||
"@polkadot/typegen": "workspace:packages/typegen",
|
||||
"@types/jest": "^27.0.1",
|
||||
"@types/jest": "^27.0.2",
|
||||
"copyfiles": "^2.4.1"
|
||||
},
|
||||
"version": "5.8.1",
|
||||
"version": "6.1.2",
|
||||
"packageManager": "yarn@3.0.1"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api-contract",
|
||||
"version": "5.8.1",
|
||||
"version": "6.1.2",
|
||||
"type": "module",
|
||||
"description": "Interfaces for interacting with contracts and contract ABIs",
|
||||
"main": "index.js",
|
||||
@@ -20,9 +20,9 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.15.4",
|
||||
"@polkadot/api": "5.8.1",
|
||||
"@polkadot/types": "5.8.1",
|
||||
"@polkadot/util": "^7.3.1",
|
||||
"@polkadot/api": "6.1.2",
|
||||
"@polkadot/types": "6.1.2",
|
||||
"@polkadot/util": "^7.4.1",
|
||||
"rxjs": "^7.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-contract', version: '5.8.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-contract', version: '6.1.2' };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api-derive",
|
||||
"version": "5.8.1",
|
||||
"version": "6.1.2",
|
||||
"type": "module",
|
||||
"description": "Common functions used across Polkadot, derived from RPC calls and storage queries.",
|
||||
"main": "index.js",
|
||||
@@ -20,15 +20,15 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.15.4",
|
||||
"@polkadot/api": "5.8.1",
|
||||
"@polkadot/rpc-core": "5.8.1",
|
||||
"@polkadot/types": "5.8.1",
|
||||
"@polkadot/util": "^7.3.1",
|
||||
"@polkadot/util-crypto": "^7.3.1",
|
||||
"@polkadot/api": "6.1.2",
|
||||
"@polkadot/rpc-core": "6.1.2",
|
||||
"@polkadot/types": "6.1.2",
|
||||
"@polkadot/util": "^7.4.1",
|
||||
"@polkadot/util-crypto": "^7.4.1",
|
||||
"rxjs": "^7.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^7.3.1",
|
||||
"@polkadot/rpc-provider": "5.8.1"
|
||||
"@polkadot/keyring": "^7.4.1",
|
||||
"@polkadot/rpc-provider": "6.1.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +78,8 @@ describe('derive', (): void => {
|
||||
}
|
||||
},
|
||||
provider: new MockProvider(registry),
|
||||
registry
|
||||
registry,
|
||||
throwOnConnect: true
|
||||
});
|
||||
|
||||
beforeAll((done): void => {
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-derive', version: '5.8.1' };
|
||||
export const packageInfo = { name: '@polkadot/api-derive', version: '6.1.2' };
|
||||
|
||||
@@ -7,13 +7,13 @@ The API wrappers provide a standard interface for use -
|
||||
- A static `.create(<optional ApiOptions>)` that returns an API instance when connected, decorated and ready-to use. ApiOptions can include an optional WsProvider and optional custom type definitions `{ provider: <Optional WsProvider>, types: <Optional RegistryTypes> }`.
|
||||
- The above is just a wrapper for `new Api(<optional ApiOptions>) `, exposing the `isReady` getter
|
||||
- `api.rpc.<section>.<method>` provides access to actual RPC calls, be it for queries, submission or retrieving chain information
|
||||
- [RPC (node interface)](https://polkadot.js.org/docs/substrate/rpc.html)
|
||||
- [RPC (node interface)](https://polkadot.js.org/docs/substrate/rpc)
|
||||
- `api.query.<section>.<method>` provides access to chain state queries. These are dynamically populated based on what the runtime provides
|
||||
- [Storage chain state (runtime node interface)](https://polkadot.js.org/docs/substrate/storage.html)
|
||||
- [Storage chain state (runtime node interface)](https://polkadot.js.org/docs/substrate/storage)
|
||||
- `api.tx.<section>.<method>` provides the ability to create a transaction, like chain state, this list is populated from a runtime query
|
||||
- [Extrinsics (runtime node interface)](https://polkadot.js.org/docs/substrate/extrinsics.html)
|
||||
- [Extrinsics (runtime node interface)](https://polkadot.js.org/docs/substrate/extrinsics)
|
||||
- `api.consts.<section>.<constant>` provides access to the module constants (parameter types).
|
||||
- [Constants (runtime node interface)](https://polkadot.js.org/docs/substrate/constants.html)
|
||||
- [Constants (runtime node interface)](https://polkadot.js.org/docs/substrate/constants)
|
||||
|
||||
## API Selection
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/api",
|
||||
"version": "5.8.1",
|
||||
"version": "6.1.2",
|
||||
"type": "module",
|
||||
"description": "Promise and RxJS wrappers around the Polkadot JS RPC",
|
||||
"main": "index.js",
|
||||
@@ -20,14 +20,14 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.15.4",
|
||||
"@polkadot/api-derive": "5.8.1",
|
||||
"@polkadot/keyring": "^7.3.1",
|
||||
"@polkadot/rpc-core": "5.8.1",
|
||||
"@polkadot/rpc-provider": "5.8.1",
|
||||
"@polkadot/types": "5.8.1",
|
||||
"@polkadot/types-known": "5.8.1",
|
||||
"@polkadot/util": "^7.3.1",
|
||||
"@polkadot/util-crypto": "^7.3.1",
|
||||
"@polkadot/api-derive": "6.1.2",
|
||||
"@polkadot/keyring": "^7.4.1",
|
||||
"@polkadot/rpc-core": "6.1.2",
|
||||
"@polkadot/rpc-provider": "6.1.2",
|
||||
"@polkadot/types": "6.1.2",
|
||||
"@polkadot/types-known": "6.1.2",
|
||||
"@polkadot/util": "^7.4.1",
|
||||
"@polkadot/util-crypto": "^7.4.1",
|
||||
"eventemitter3": "^4.0.7",
|
||||
"rxjs": "^7.3.0"
|
||||
}
|
||||
|
||||
+185
-160
@@ -1,17 +1,11 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import type { Vec, bool, u16, u32, u64 } from '@polkadot/types';
|
||||
import type { Codec } from '@polkadot/types/types';
|
||||
import type { Schedule } from '@polkadot/types/interfaces/contracts';
|
||||
import type { Balance, BalanceOf, BlockNumber, LockIdentifier, Moment, PalletId, Perbill, Percent, Permill, RuntimeDbWeight, TransactionPriority, Weight } from '@polkadot/types/interfaces/runtime';
|
||||
import type { SessionIndex } from '@polkadot/types/interfaces/session';
|
||||
import type { EraIndex } from '@polkadot/types/interfaces/staking';
|
||||
import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
|
||||
import type { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';
|
||||
import type { BlockLength, BlockWeights } from '@polkadot/types/interfaces/system';
|
||||
import type { DepositBalanceOf } from '@polkadot/types/interfaces/uniques';
|
||||
import type { ApiTypes } from '@polkadot/api/types';
|
||||
import type { U8aFixed, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types';
|
||||
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, PalletContractsSchedule, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
|
||||
import type { Codec } from '@polkadot/types/types';
|
||||
|
||||
declare module '@polkadot/api/types/consts' {
|
||||
export interface AugmentedConsts<ApiType> {
|
||||
@@ -19,20 +13,20 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* The amount of funds that must be reserved when creating a new approval.
|
||||
**/
|
||||
approvalDeposit: DepositBalanceOf & AugmentedConst<ApiType>;
|
||||
approvalDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved for an asset.
|
||||
**/
|
||||
assetDeposit: DepositBalanceOf & AugmentedConst<ApiType>;
|
||||
assetDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved when adding metadata to your asset.
|
||||
**/
|
||||
metadataDepositBase: DepositBalanceOf & AugmentedConst<ApiType>;
|
||||
metadataDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The additional funds that must be reserved for the number of bytes you store in your
|
||||
* metadata.
|
||||
**/
|
||||
metadataDepositPerByte: DepositBalanceOf & AugmentedConst<ApiType>;
|
||||
metadataDepositPerByte: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of a name or symbol stored on-chain.
|
||||
**/
|
||||
@@ -48,7 +42,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
* This means that we will deal with uncle-parents that are
|
||||
* `UncleGenerations + 1` before `now`.
|
||||
**/
|
||||
uncleGenerations: BlockNumber & AugmentedConst<ApiType>;
|
||||
uncleGenerations: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -68,7 +62,63 @@ declare module '@polkadot/api/types/consts' {
|
||||
* duration and the security parameter `c` (where `1 - c` represents
|
||||
* the probability of a slot being empty).
|
||||
**/
|
||||
expectedBlockTime: Moment & AugmentedConst<ApiType>;
|
||||
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
|
||||
**/
|
||||
@@ -78,7 +128,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* The minimum amount required to keep an account open.
|
||||
**/
|
||||
existentialDeposit: Balance & AugmentedConst<ApiType>;
|
||||
existentialDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of locks that should exist on an account.
|
||||
* Not strictly enforced, but used for weight estimation.
|
||||
@@ -95,29 +145,30 @@ declare module '@polkadot/api/types/consts' {
|
||||
};
|
||||
bounties: {
|
||||
/**
|
||||
* Percentage of the curator fee that will be reserved upfront as deposit for bounty curator.
|
||||
* 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: BalanceOf & AugmentedConst<ApiType>;
|
||||
bountyDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The delay period for which a bounty beneficiary need to wait before claim the payout.
|
||||
**/
|
||||
bountyDepositPayoutDelay: BlockNumber & AugmentedConst<ApiType>;
|
||||
bountyDepositPayoutDelay: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Bounty duration in blocks.
|
||||
**/
|
||||
bountyUpdatePeriod: BlockNumber & AugmentedConst<ApiType>;
|
||||
bountyUpdatePeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Minimum value for a bounty.
|
||||
**/
|
||||
bountyValueMinimum: BalanceOf & AugmentedConst<ApiType>;
|
||||
bountyValueMinimum: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount held on deposit per byte within bounty description.
|
||||
* The amount held on deposit per byte within the tip report reason or bounty description.
|
||||
**/
|
||||
dataDepositPerByte: BalanceOf & AugmentedConst<ApiType>;
|
||||
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum acceptable reason length.
|
||||
**/
|
||||
@@ -128,6 +179,13 @@ declare module '@polkadot/api/types/consts' {
|
||||
[key: string]: Codec;
|
||||
};
|
||||
contracts: {
|
||||
/**
|
||||
* The deposit that must be placed into the contract's account to instantiate it.
|
||||
* This is in **addition** to the [`pallet_balances::Pallet::ExistenialDeposit`].
|
||||
* The minimum balance for a contract's account can be queried using
|
||||
* [`Pallet::subsistence_threshold`].
|
||||
**/
|
||||
contractDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of tries that can be queued for deletion.
|
||||
**/
|
||||
@@ -135,62 +193,11 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* The maximum amount of weight that can be consumed per block for lazy trie removal.
|
||||
**/
|
||||
deletionWeightLimit: Weight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The balance every contract needs to deposit to stay alive indefinitely.
|
||||
*
|
||||
* This is different from the [`Self::TombstoneDeposit`] because this only needs to be
|
||||
* deposited while the contract is alive. Costs for additional storage are added to
|
||||
* this base cost.
|
||||
*
|
||||
* This is a simple way to ensure that contracts with empty storage eventually get deleted
|
||||
* by making them pay rent. This creates an incentive to remove them early in order to save
|
||||
* rent.
|
||||
**/
|
||||
depositPerContract: BalanceOf & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The balance a contract needs to deposit per storage byte to stay alive indefinitely.
|
||||
*
|
||||
* Let's suppose the deposit is 1,000 BU (balance units)/byte and the rent is 1
|
||||
* BU/byte/day, then a contract with 1,000,000 BU that uses 1,000 bytes of storage would
|
||||
* pay no rent. But if the balance reduced to 500,000 BU and the storage stayed the same at
|
||||
* 1,000, then it would pay 500 BU/day.
|
||||
**/
|
||||
depositPerStorageByte: BalanceOf & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The balance a contract needs to deposit per storage item to stay alive indefinitely.
|
||||
*
|
||||
* It works the same as [`Self::DepositPerStorageByte`] but for storage items.
|
||||
**/
|
||||
depositPerStorageItem: BalanceOf & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The fraction of the deposit that should be used as rent per block.
|
||||
*
|
||||
* When a contract hasn't enough balance deposited to stay alive indefinitely it needs
|
||||
* to pay per block for the storage it consumes that is not covered by the deposit.
|
||||
* This determines how high this rent payment is per block as a fraction of the deposit.
|
||||
**/
|
||||
rentFraction: Perbill & AugmentedConst<ApiType>;
|
||||
deletionWeightLimit: u64 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Cost schedule and limits.
|
||||
**/
|
||||
schedule: Schedule & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Number of block delay an extrinsic claim surcharge has.
|
||||
*
|
||||
* When claim surcharge is called by an extrinsic the rent is checked
|
||||
* for current_block - delay
|
||||
**/
|
||||
signedClaimHandicap: BlockNumber & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Reward that is received by the party whose touch has led
|
||||
* to removal of a contract.
|
||||
**/
|
||||
surchargeReward: BalanceOf & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum amount required to generate a tombstone.
|
||||
**/
|
||||
tombstoneDeposit: BalanceOf & AugmentedConst<ApiType>;
|
||||
schedule: PalletContractsSchedule & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -200,7 +207,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* Period in blocks where an external proposal may not be re-submitted after being vetoed.
|
||||
**/
|
||||
cooloffPeriod: BlockNumber & AugmentedConst<ApiType>;
|
||||
cooloffPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The period between a proposal being approved and enacted.
|
||||
*
|
||||
@@ -208,11 +215,11 @@ declare module '@polkadot/api/types/consts' {
|
||||
* 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: BlockNumber & AugmentedConst<ApiType>;
|
||||
enactmentPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Minimum voting period allowed for a fast-track referendum.
|
||||
**/
|
||||
fastTrackVotingPeriod: BlockNumber & AugmentedConst<ApiType>;
|
||||
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
|
||||
@@ -222,7 +229,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* How often (in blocks) new public referenda are launched.
|
||||
**/
|
||||
launchPeriod: BlockNumber & AugmentedConst<ApiType>;
|
||||
launchPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of public proposals that can exist at any time.
|
||||
**/
|
||||
@@ -237,33 +244,28 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* The minimum amount to be used as a deposit for a public referendum proposal.
|
||||
**/
|
||||
minimumDeposit: BalanceOf & AugmentedConst<ApiType>;
|
||||
minimumDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of balance that must be deposited per byte of preimage stored.
|
||||
**/
|
||||
preimageByteDeposit: BalanceOf & AugmentedConst<ApiType>;
|
||||
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: BlockNumber & AugmentedConst<ApiType>;
|
||||
voteLockingPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* How often (in blocks) to check for new votes.
|
||||
**/
|
||||
votingPeriod: BlockNumber & AugmentedConst<ApiType>;
|
||||
votingPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
[key: string]: Codec;
|
||||
};
|
||||
electionProviderMultiPhase: {
|
||||
/**
|
||||
* Maximum number of iteration of balancing that will be executed in the embedded miner of
|
||||
* the pallet.
|
||||
**/
|
||||
minerMaxIterations: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum length (bytes) that the mined solution should consume.
|
||||
*
|
||||
@@ -277,30 +279,30 @@ declare module '@polkadot/api/types/consts' {
|
||||
* The miner will ensure that the total weight of the unsigned solution will not exceed
|
||||
* this value, based on [`WeightInfo::submit_unsigned`].
|
||||
**/
|
||||
minerMaxWeight: Weight & AugmentedConst<ApiType>;
|
||||
minerMaxWeight: u64 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The priority of the unsigned transaction submitted in the unsigned-phase
|
||||
**/
|
||||
minerTxPriority: TransactionPriority & AugmentedConst<ApiType>;
|
||||
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: BlockNumber & AugmentedConst<ApiType>;
|
||||
offchainRepeat: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Base deposit for a signed solution.
|
||||
**/
|
||||
signedDepositBase: BalanceOf & AugmentedConst<ApiType>;
|
||||
signedDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Per-byte deposit for a signed solution.
|
||||
**/
|
||||
signedDepositByte: BalanceOf & AugmentedConst<ApiType>;
|
||||
signedDepositByte: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Per-weight deposit for a signed solution.
|
||||
**/
|
||||
signedDepositWeight: BalanceOf & AugmentedConst<ApiType>;
|
||||
signedDepositWeight: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum number of signed submissions that can be queued.
|
||||
*
|
||||
@@ -316,15 +318,15 @@ declare module '@polkadot/api/types/consts' {
|
||||
*
|
||||
* This should probably be similar to [`Config::MinerMaxWeight`].
|
||||
**/
|
||||
signedMaxWeight: Weight & AugmentedConst<ApiType>;
|
||||
signedMaxWeight: u64 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Duration of the signed phase.
|
||||
**/
|
||||
signedPhase: BlockNumber & AugmentedConst<ApiType>;
|
||||
signedPhase: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Base reward for a signed solution
|
||||
**/
|
||||
signedRewardBase: BalanceOf & AugmentedConst<ApiType>;
|
||||
signedRewardBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The minimum amount of improvement to the solution score that defines a solution as
|
||||
* "better" (in any phase).
|
||||
@@ -333,7 +335,16 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* Duration of the unsigned phase.
|
||||
**/
|
||||
unsignedPhase: BlockNumber & AugmentedConst<ApiType>;
|
||||
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
|
||||
**/
|
||||
@@ -343,7 +354,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* How much should be locked up in order to submit one's candidacy.
|
||||
**/
|
||||
candidacyBond: BalanceOf & AugmentedConst<ApiType>;
|
||||
candidacyBond: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Number of members to elect.
|
||||
**/
|
||||
@@ -355,24 +366,24 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* Identifier for the elections-phragmen pallet's lock
|
||||
**/
|
||||
palletId: LockIdentifier & AugmentedConst<ApiType>;
|
||||
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: BlockNumber & AugmentedConst<ApiType>;
|
||||
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: BalanceOf & AugmentedConst<ApiType>;
|
||||
votingBondBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of bond that need to be locked for each vote (32 bytes).
|
||||
**/
|
||||
votingBondFactor: BalanceOf & AugmentedConst<ApiType>;
|
||||
votingBondFactor: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -389,7 +400,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
* The issuance to ignore. This is subtracted from the `Currency`'s `total_issuance` to get
|
||||
* the issuance by which we inflate or deflate the gilt.
|
||||
**/
|
||||
ignoredIssuance: BalanceOf & AugmentedConst<ApiType>;
|
||||
ignoredIssuance: u128 & 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.
|
||||
@@ -397,7 +408,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
* A larger value results in fewer storage hits each block, but a slower period to get to
|
||||
* the target.
|
||||
**/
|
||||
intakePeriod: BlockNumber & AugmentedConst<ApiType>;
|
||||
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
|
||||
@@ -416,12 +427,12 @@ declare module '@polkadot/api/types/consts' {
|
||||
* It should be at least big enough to ensure that there is no possible storage spam attack
|
||||
* or queue-filling attack.
|
||||
**/
|
||||
minFreeze: BalanceOf & AugmentedConst<ApiType>;
|
||||
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: BlockNumber & AugmentedConst<ApiType>;
|
||||
period: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Number of duration queues in total. This sets the maximum duration supported, which is
|
||||
* this value multiplied by `Period`.
|
||||
@@ -432,15 +443,25 @@ declare module '@polkadot/api/types/consts' {
|
||||
**/
|
||||
[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: BalanceOf & AugmentedConst<ApiType>;
|
||||
basicDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount held on deposit per additional field for a registered identity.
|
||||
**/
|
||||
fieldDeposit: BalanceOf & AugmentedConst<ApiType>;
|
||||
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.
|
||||
@@ -460,7 +481,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
* 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: BalanceOf & AugmentedConst<ApiType>;
|
||||
subAccountDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -473,7 +494,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
* This is exposed so that it can be tuned for particular runtime, when
|
||||
* multiple pallets send unsigned transactions.
|
||||
**/
|
||||
unsignedPriority: TransactionPriority & AugmentedConst<ApiType>;
|
||||
unsignedPriority: u64 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -483,7 +504,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* The deposit needed for reserving an index.
|
||||
**/
|
||||
deposit: BalanceOf & AugmentedConst<ApiType>;
|
||||
deposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -503,7 +524,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* The Lottery's pallet id
|
||||
**/
|
||||
palletId: PalletId & AugmentedConst<ApiType>;
|
||||
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -518,13 +539,13 @@ declare module '@polkadot/api/types/consts' {
|
||||
* `4 + sizeof((BlockNumber, Balance, AccountId))` bytes and whose key size is
|
||||
* `32 + sizeof(AccountId)` bytes.
|
||||
**/
|
||||
depositBase: BalanceOf & AugmentedConst<ApiType>;
|
||||
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: BalanceOf & AugmentedConst<ApiType>;
|
||||
depositFactor: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum amount of signatories allowed in the multisig.
|
||||
**/
|
||||
@@ -541,14 +562,14 @@ declare module '@polkadot/api/types/consts' {
|
||||
* This is held when a new storage item holding a `Balance` is created (typically 16
|
||||
* bytes).
|
||||
**/
|
||||
announcementDepositBase: BalanceOf & AugmentedConst<ApiType>;
|
||||
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: BalanceOf & AugmentedConst<ApiType>;
|
||||
announcementDepositFactor: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum amount of time-delayed announcements that are allowed to be pending.
|
||||
**/
|
||||
@@ -563,7 +584,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
* This is held for an additional storage item whose value size is
|
||||
* `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes.
|
||||
**/
|
||||
proxyDepositBase: BalanceOf & AugmentedConst<ApiType>;
|
||||
proxyDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of currency needed per proxy added.
|
||||
*
|
||||
@@ -571,7 +592,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
* pre-existing storage value. Thus, when configuring `ProxyDepositFactor` one should take
|
||||
* into account `32 + proxy_type.encode().len()` bytes of data.
|
||||
**/
|
||||
proxyDepositFactor: BalanceOf & AugmentedConst<ApiType>;
|
||||
proxyDepositFactor: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -584,7 +605,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
* This is held for an additional storage item whose value size is
|
||||
* `2 + sizeof(BlockNumber, Balance)` bytes.
|
||||
**/
|
||||
configDepositBase: BalanceOf & AugmentedConst<ApiType>;
|
||||
configDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of currency needed per additional user when creating a recovery
|
||||
* configuration.
|
||||
@@ -592,7 +613,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
* This is held for adding `sizeof(AccountId)` bytes more into a pre-existing storage
|
||||
* value.
|
||||
**/
|
||||
friendDepositFactor: BalanceOf & AugmentedConst<ApiType>;
|
||||
friendDepositFactor: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum amount of friends allowed in a recovery configuration.
|
||||
**/
|
||||
@@ -606,7 +627,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
* `sizeof(BlockNumber, Balance + T * AccountId)` bytes. Where T is a configurable
|
||||
* threshold.
|
||||
**/
|
||||
recoveryDeposit: BalanceOf & AugmentedConst<ApiType>;
|
||||
recoveryDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -617,7 +638,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
* The maximum weight that may be scheduled per block for any dispatchables of less
|
||||
* priority than `schedule::HARD_DEADLINE`.
|
||||
**/
|
||||
maximumWeight: Weight & AugmentedConst<ApiType>;
|
||||
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.
|
||||
@@ -632,37 +653,41 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* The minimum amount of a deposit required for a bid to be made.
|
||||
**/
|
||||
candidateDeposit: BalanceOf & AugmentedConst<ApiType>;
|
||||
candidateDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The number of blocks between membership challenges.
|
||||
**/
|
||||
challengePeriod: BlockNumber & AugmentedConst<ApiType>;
|
||||
challengePeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum candidate intake per round.
|
||||
* The maximum number of candidates that we accept per round.
|
||||
**/
|
||||
maxCandidateIntake: 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.
|
||||
* 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 module id
|
||||
* The societies's pallet id
|
||||
**/
|
||||
palletId: PalletId & AugmentedConst<ApiType>;
|
||||
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of incentive paid within each period. Doesn't include VoterTip.
|
||||
**/
|
||||
periodSpend: BalanceOf & AugmentedConst<ApiType>;
|
||||
periodSpend: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The number of blocks between candidate/membership rotation periods.
|
||||
**/
|
||||
rotationPeriod: BlockNumber & AugmentedConst<ApiType>;
|
||||
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: BalanceOf & AugmentedConst<ApiType>;
|
||||
wrongSideDeduction: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -672,7 +697,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* Number of eras that staked funds must remain bonded for.
|
||||
**/
|
||||
bondingDuration: EraIndex & AugmentedConst<ApiType>;
|
||||
bondingDuration: u32 & AugmentedConst<ApiType>;
|
||||
maxNominations: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum number of nominators rewarded for each validator.
|
||||
@@ -684,14 +709,14 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* Number of sessions per era.
|
||||
**/
|
||||
sessionsPerEra: SessionIndex & AugmentedConst<ApiType>;
|
||||
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: EraIndex & AugmentedConst<ApiType>;
|
||||
slashDeferDuration: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -701,19 +726,19 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* Maximum number of block number to block hash mappings to keep (oldest pruned first).
|
||||
**/
|
||||
blockHashCount: BlockNumber & AugmentedConst<ApiType>;
|
||||
blockHashCount: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of a block (in bytes).
|
||||
**/
|
||||
blockLength: BlockLength & AugmentedConst<ApiType>;
|
||||
blockLength: FrameSystemLimitsBlockLength & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Block & extrinsics weights: base values and limits.
|
||||
**/
|
||||
blockWeights: BlockWeights & AugmentedConst<ApiType>;
|
||||
blockWeights: FrameSystemLimitsBlockWeights & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The weight of runtime database operations the runtime can invoke.
|
||||
**/
|
||||
dbWeight: RuntimeDbWeight & AugmentedConst<ApiType>;
|
||||
dbWeight: FrameSupportWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The designated SS85 prefix of this chain.
|
||||
*
|
||||
@@ -725,7 +750,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* Get the chain's current version.
|
||||
**/
|
||||
version: RuntimeVersion & AugmentedConst<ApiType>;
|
||||
version: SpVersionRuntimeVersion & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -738,7 +763,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
* generally work with this to determine a sensible block time. e.g. For Aura, it will be
|
||||
* double this period on default settings.
|
||||
**/
|
||||
minimumPeriod: Moment & AugmentedConst<ApiType>;
|
||||
minimumPeriod: u64 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -746,9 +771,9 @@ declare module '@polkadot/api/types/consts' {
|
||||
};
|
||||
tips: {
|
||||
/**
|
||||
* The amount held on deposit per byte within the tip report reason.
|
||||
* The amount held on deposit per byte within the tip report reason or bounty description.
|
||||
**/
|
||||
dataDepositPerByte: BalanceOf & AugmentedConst<ApiType>;
|
||||
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Maximum acceptable reason length.
|
||||
**/
|
||||
@@ -756,15 +781,15 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* The period for which a tip remains open after is has achieved threshold tippers.
|
||||
**/
|
||||
tipCountdown: BlockNumber & AugmentedConst<ApiType>;
|
||||
tipCountdown: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The amount of the final tip which goes to the original reporter of the tip.
|
||||
* 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: BalanceOf & AugmentedConst<ApiType>;
|
||||
tipReportDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -774,11 +799,11 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* The fee to be paid for making a transaction; the per-byte portion.
|
||||
**/
|
||||
transactionByteFee: BalanceOf & AugmentedConst<ApiType>;
|
||||
transactionByteFee: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The polynomial that is applied in order to derive fee from weight.
|
||||
**/
|
||||
weightToFee: Vec<WeightToFeeCoefficient> & AugmentedConst<ApiType>;
|
||||
weightToFee: Vec<FrameSupportWeightsWeightToFeeCoefficient> & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -796,7 +821,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* The treasury's pallet id, used for deriving its sovereign account ID.
|
||||
**/
|
||||
palletId: PalletId & AugmentedConst<ApiType>;
|
||||
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.
|
||||
@@ -805,11 +830,11 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* Minimum amount of funds that should be placed in a deposit for making a proposal.
|
||||
**/
|
||||
proposalBondMinimum: BalanceOf & AugmentedConst<ApiType>;
|
||||
proposalBondMinimum: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Period between successive spends.
|
||||
**/
|
||||
spendPeriod: BlockNumber & AugmentedConst<ApiType>;
|
||||
spendPeriod: u32 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
@@ -819,20 +844,20 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* The basic amount of funds that must be reserved when adding an attribute to an asset.
|
||||
**/
|
||||
attributeDepositBase: DepositBalanceOf & AugmentedConst<ApiType>;
|
||||
attributeDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved for an asset class.
|
||||
**/
|
||||
classDeposit: DepositBalanceOf & AugmentedConst<ApiType>;
|
||||
classDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The additional funds that must be reserved for the number of bytes store in metadata,
|
||||
* either "normal" metadata or attribute metadata.
|
||||
**/
|
||||
depositPerByte: DepositBalanceOf & AugmentedConst<ApiType>;
|
||||
depositPerByte: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The basic amount of funds that must be reserved for an asset instance.
|
||||
**/
|
||||
instanceDeposit: DepositBalanceOf & AugmentedConst<ApiType>;
|
||||
instanceDeposit: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of an attribute key.
|
||||
**/
|
||||
@@ -840,7 +865,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* The basic amount of funds that must be reserved when adding metadata to your asset.
|
||||
**/
|
||||
metadataDepositBase: DepositBalanceOf & AugmentedConst<ApiType>;
|
||||
metadataDepositBase: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The maximum length of data stored on-chain.
|
||||
**/
|
||||
@@ -869,7 +894,7 @@ declare module '@polkadot/api/types/consts' {
|
||||
/**
|
||||
* The minimum amount transferred to call `vested_transfer`.
|
||||
**/
|
||||
minVestedTransfer: BalanceOf & AugmentedConst<ApiType>;
|
||||
minVestedTransfer: u128 & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* Generic const
|
||||
**/
|
||||
|
||||
@@ -196,9 +196,8 @@ declare module '@polkadot/api/types/errors' {
|
||||
contracts: {
|
||||
/**
|
||||
* Performing the requested transfer would have brought the contract below
|
||||
* the subsistence threshold. No transfer is allowed to do this in order to allow
|
||||
* for a tombstone to be created. Use `seal_terminate` to remove a contract without
|
||||
* leaving a tombstone behind.
|
||||
* the subsistence threshold. No transfer is allowed to do this. Use `seal_terminate`
|
||||
* to recover a deposit.
|
||||
**/
|
||||
BelowSubsistenceThreshold: AugmentedError<ApiType>;
|
||||
/**
|
||||
@@ -210,20 +209,6 @@ declare module '@polkadot/api/types/errors' {
|
||||
* current schedule.
|
||||
**/
|
||||
CodeTooLarge: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A tombstone exist at the specified address.
|
||||
*
|
||||
* Tombstone cannot be called. Anyone can use `seal_restore_to` in order to revive
|
||||
* the contract, though.
|
||||
**/
|
||||
ContractIsTombstone: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A contract could not be evicted because it has enough balance to pay rent.
|
||||
*
|
||||
* This can be returned from [`Pallet::claim_surcharge`] because the target
|
||||
* contract has enough balance to pay for its rent.
|
||||
**/
|
||||
ContractNotEvictable: AugmentedError<ApiType>;
|
||||
/**
|
||||
* No contract was found at the specified address.
|
||||
**/
|
||||
@@ -243,7 +228,7 @@ declare module '@polkadot/api/types/errors' {
|
||||
/**
|
||||
* Removal of a contract failed because the deletion queue is full.
|
||||
*
|
||||
* This can happen when either calling [`Pallet::claim_surcharge`] or `seal_terminate`.
|
||||
* This can happen when calling `seal_terminate`.
|
||||
* The queue is filled by deleting contracts and emptied by a fixed amount each block.
|
||||
* Trying again during another block is the only way to resolve this issue.
|
||||
**/
|
||||
@@ -260,30 +245,10 @@ declare module '@polkadot/api/types/errors' {
|
||||
* `seal_call` forwarded this contracts input. It therefore is no longer available.
|
||||
**/
|
||||
InputForwarded: AugmentedError<ApiType>;
|
||||
/**
|
||||
* An origin TrieId written in the current block.
|
||||
**/
|
||||
InvalidContractOrigin: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Cannot restore to nonexisting or alive contract.
|
||||
**/
|
||||
InvalidDestinationContract: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A new schedule must have a greater version than the current one.
|
||||
**/
|
||||
InvalidScheduleVersion: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Cannot restore from nonexisting or tombstone contract.
|
||||
**/
|
||||
InvalidSourceContract: AugmentedError<ApiType>;
|
||||
/**
|
||||
* An origin must be signed or inherent and auxiliary sender only provided on inherent.
|
||||
**/
|
||||
InvalidSurchargeClaim: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Tombstones don't match.
|
||||
**/
|
||||
InvalidTombstone: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Performing a call was denied because the calling depth reached the limit
|
||||
* of what is specified in the schedule.
|
||||
@@ -320,15 +285,6 @@ declare module '@polkadot/api/types/errors' {
|
||||
* A call tried to invoke a contract that is flagged as non-reentrant.
|
||||
**/
|
||||
ReentranceDenied: AugmentedError<ApiType>;
|
||||
/**
|
||||
* The called contract does not have enough balance to pay for its storage.
|
||||
*
|
||||
* The contract ran out of balance and is therefore eligible for eviction into a
|
||||
* tombstone. Anyone can evict the contract by submitting a `claim_surcharge`
|
||||
* extrinsic. Alternatively, a plain balance transfer can be used in order to
|
||||
* increase the contracts funds so that it can be called again.
|
||||
**/
|
||||
RentNotPaid: AugmentedError<ApiType>;
|
||||
/**
|
||||
* A storage modification exhausted the 32bit type that holds the storage size.
|
||||
*
|
||||
@@ -339,12 +295,12 @@ declare module '@polkadot/api/types/errors' {
|
||||
/**
|
||||
* A contract self destructed in its constructor.
|
||||
*
|
||||
* This can be triggered by a call to `seal_terminate` or `seal_restore_to`.
|
||||
* This can be triggered by a call to `seal_terminate`.
|
||||
**/
|
||||
TerminatedInConstructor: AugmentedError<ApiType>;
|
||||
/**
|
||||
* Termination of a contract is not allowed while the contract is already
|
||||
* on the call stack. Can be triggered by `seal_terminate` or `seal_restore_to.
|
||||
* on the call stack. Can be triggered by `seal_terminate`.
|
||||
**/
|
||||
TerminatedWhileReentrant: AugmentedError<ApiType>;
|
||||
/**
|
||||
|
||||
+209
-232
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
||||
// Copyright 2017-2021 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import '@polkadot/types/augment';
|
||||
import './consts';
|
||||
import './errors';
|
||||
import './events';
|
||||
|
||||
+218
-222
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,6 @@
|
||||
/* eslint-disable */
|
||||
|
||||
import type { Bytes, HashMap, Json, Metadata, Null, Option, StorageKey, Text, U256, U64, Vec, bool, u32, u64 } from '@polkadot/types';
|
||||
import type { AnyNumber, Codec, IExtrinsic, Observable } from '@polkadot/types/types';
|
||||
import type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';
|
||||
import type { EpochAuthorship } from '@polkadot/types/interfaces/babe';
|
||||
import type { BeefySignedCommitment } from '@polkadot/types/interfaces/beefy';
|
||||
@@ -21,6 +20,7 @@ import type { RpcMethods } from '@polkadot/types/interfaces/rpc';
|
||||
import type { AccountId, BlockNumber, H160, H256, H64, Hash, Header, Index, Justification, KeyValue, SignedBlock, StorageData } from '@polkadot/types/interfaces/runtime';
|
||||
import type { ReadProof, RuntimeVersion, TraceBlockResponse } from '@polkadot/types/interfaces/state';
|
||||
import type { ApplyExtrinsicResult, ChainProperties, ChainType, Health, NetworkState, NodeRole, PeerInfo, SyncState } from '@polkadot/types/interfaces/system';
|
||||
import type { AnyNumber, Codec, IExtrinsic, Observable } from '@polkadot/types/types';
|
||||
|
||||
declare module '@polkadot/rpc-core/types.jsonrpc' {
|
||||
export interface RpcInterface {
|
||||
@@ -113,6 +113,10 @@ declare module '@polkadot/rpc-core/types.jsonrpc' {
|
||||
* Returns a child storage entry at a specific block state
|
||||
**/
|
||||
getStorage: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Option<StorageData>>>;
|
||||
/**
|
||||
* Returns child storage entries for multiple keys at a specific block state
|
||||
**/
|
||||
getStorageEntries: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: Hash | string | Uint8Array) => Observable<Vec<Option<StorageData>>>>;
|
||||
/**
|
||||
* Returns the hash of a child storage entry at a block state
|
||||
**/
|
||||
|
||||
+296
-286
File diff suppressed because it is too large
Load Diff
@@ -12,7 +12,7 @@ import type { SubmittableExtrinsic } from '../submittable/types';
|
||||
import type { ApiDecoration, ApiInterfaceRx, ApiOptions, ApiTypes, DecoratedErrors, DecoratedEvents, DecoratedRpc, DecoratedRpcSection, DecorateMethod, PaginationOptions, QueryableConsts, QueryableModuleStorage, QueryableModuleStorageAt, QueryableStorage, QueryableStorageAt, QueryableStorageEntry, QueryableStorageEntryAt, QueryableStorageMulti, QueryableStorageMultiArg, SubmittableExtrinsicFunction, SubmittableExtrinsics, SubmittableModuleExtrinsics } from '../types';
|
||||
import type { VersionedRegistry } from './types';
|
||||
|
||||
import { BehaviorSubject, combineLatest, map, of, switchMap, tap, toArray } from 'rxjs';
|
||||
import { BehaviorSubject, combineLatest, from, map, of, switchMap, tap, toArray } from 'rxjs';
|
||||
|
||||
import { decorateDerive, ExactDerive } from '@polkadot/api-derive';
|
||||
import { memo, RpcCore } from '@polkadot/rpc-core';
|
||||
@@ -154,6 +154,8 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
this._rx.hasSubscriptions = this._rpcCore.provider.hasSubscriptions;
|
||||
}
|
||||
|
||||
public abstract at (blockHash: Uint8Array | string): Promise<ApiDecoration<ApiType>>;
|
||||
|
||||
/**
|
||||
* @description Return the current used registry
|
||||
*/
|
||||
@@ -195,7 +197,11 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
consts: {},
|
||||
errors: {},
|
||||
events: {},
|
||||
query: {}
|
||||
query: {},
|
||||
registry: registry.registry,
|
||||
rx: {
|
||||
query: {}
|
||||
}
|
||||
} as ApiDecoration<ApiType>;
|
||||
}
|
||||
|
||||
@@ -211,8 +217,12 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
const storage = blockHash
|
||||
? this._decorateStorageAt(registry.decoratedMeta, this._decorateMethod, blockHash)
|
||||
: this._decorateStorage(registry.decoratedMeta, this._decorateMethod);
|
||||
const storageRx = blockHash
|
||||
? this._decorateStorageAt(registry.decoratedMeta, this._rxDecorateMethod, blockHash)
|
||||
: this._decorateStorage(registry.decoratedMeta, this._rxDecorateMethod);
|
||||
|
||||
augmentObject('query', storage, decoratedApi.query, fromEmpty);
|
||||
augmentObject('query', storageRx, decoratedApi.rx.query, fromEmpty);
|
||||
|
||||
return {
|
||||
decoratedApi,
|
||||
@@ -227,7 +237,11 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
consts: {},
|
||||
errors: {},
|
||||
events: {},
|
||||
query: {}
|
||||
query: {},
|
||||
registry: registry.registry,
|
||||
rx: {
|
||||
query: {}
|
||||
}
|
||||
} as ApiDecoration<ApiType>;
|
||||
}
|
||||
|
||||
@@ -237,6 +251,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
this._errors = decoratedApi.errors;
|
||||
this._events = decoratedApi.events;
|
||||
this._query = decoratedApi.query;
|
||||
this._rx.query = decoratedApi.rx.query;
|
||||
|
||||
if (fromEmpty || !this._extrinsics) {
|
||||
this._extrinsics = this._decorateExtrinsics(decoratedMeta, this._decorateMethod);
|
||||
@@ -246,8 +261,6 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
augmentObject(null, this._decorateExtrinsics(decoratedMeta, this._rxDecorateMethod), this._rx.tx, false);
|
||||
}
|
||||
|
||||
// rx
|
||||
augmentObject(null, this._decorateStorage(decoratedMeta, this._rxDecorateMethod), this._rx.query, fromEmpty);
|
||||
augmentObject(null, decoratedMeta.consts, this._rx.consts, fromEmpty);
|
||||
}
|
||||
|
||||
@@ -358,10 +371,12 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
(this.hasSubscriptions
|
||||
? this._rpcCore.state.subscribeStorage
|
||||
: this._rpcCore.state.queryStorageAt)(
|
||||
calls.map((arg: QueryableStorageMultiArg<ApiType>) =>
|
||||
Array.isArray(arg)
|
||||
? [arg[0].creator, ...arg.slice(1)]
|
||||
: [arg.creator])));
|
||||
calls.map((args: QueryableStorageMultiArg<ApiType>) =>
|
||||
Array.isArray(args)
|
||||
? args[0].creator.meta.type.asMap.hashers.length === 1
|
||||
? [args[0].creator, args.slice(1)]
|
||||
: [args[0].creator, ...args.slice(1)]
|
||||
: [args.creator])));
|
||||
}
|
||||
|
||||
protected _decorateExtrinsics<ApiType extends ApiTypes> ({ tx }: DecoratedMeta, decorateMethod: DecorateMethod<ApiType>): SubmittableExtrinsics<ApiType> {
|
||||
@@ -402,10 +417,10 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
}, {} as QueryableStorage<ApiType>);
|
||||
}
|
||||
|
||||
protected _decorateStorageAt<ApiType extends ApiTypes> ({ query }: DecoratedMeta, decorateMethod: DecorateMethod<ApiType>, blockHash: Uint8Array): QueryableStorageAt<ApiType> {
|
||||
protected _decorateStorageAt<ApiType extends ApiTypes> ({ query, registry }: DecoratedMeta, decorateMethod: DecorateMethod<ApiType>, blockHash: Uint8Array): QueryableStorageAt<ApiType> {
|
||||
return Object.entries(query).reduce((out, [name, section]): QueryableStorageAt<ApiType> => {
|
||||
out[name] = Object.entries(section).reduce((out, [name, method]): QueryableModuleStorageAt<ApiType> => {
|
||||
out[name] = this._decorateStorageEntryAt(method, decorateMethod, blockHash);
|
||||
out[name] = this._decorateStorageEntryAt(registry, method, decorateMethod, blockHash);
|
||||
|
||||
return out;
|
||||
}, {} as QueryableModuleStorageAt<ApiType>);
|
||||
@@ -416,7 +431,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
|
||||
private _decorateStorageEntry<ApiType extends ApiTypes> (creator: StorageEntry, decorateMethod: DecorateMethod<ApiType>): QueryableStorageEntry<ApiType> {
|
||||
// get the storage arguments, with DoubleMap as an array entry, otherwise spread
|
||||
const getArgs = (args: unknown[]): unknown[] => extractStorageArgs(this.#registry, creator, args);
|
||||
const getArgs = (args: unknown[]) => extractStorageArgs(this.#registry, creator, args);
|
||||
|
||||
// Disable this where it occurs for each field we are decorating
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment */
|
||||
@@ -426,7 +441,13 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
decorated.creator = creator;
|
||||
|
||||
decorated.at = decorateMethod((hash: Hash, ...args: unknown[]): Observable<Codec> =>
|
||||
this._rpcCore.state.getStorage(getArgs(args), hash));
|
||||
from(this.at(hash)).pipe(
|
||||
switchMap((api): Observable<Codec> => {
|
||||
assert(api.rx.query[creator.section] && api.rx.query[creator.section][creator.method], () => `query.${creator.section}.${creator.method} is not available in this version of the metadata`);
|
||||
|
||||
return api.rx.query[creator.section][creator.method](...args);
|
||||
})
|
||||
));
|
||||
|
||||
decorated.hash = decorateMethod((...args: unknown[]): Observable<Hash> =>
|
||||
this._rpcCore.state.getStorageHash(getArgs(args)));
|
||||
@@ -436,18 +457,10 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
key.method === creator.method;
|
||||
|
||||
decorated.key = (...args: unknown[]): string =>
|
||||
u8aToHex(compactStripLength(creator(
|
||||
creator.meta.type.isPlain
|
||||
? undefined
|
||||
: creator.meta.type.isMap
|
||||
? args[0]
|
||||
: creator.meta.type.isDoubleMap
|
||||
? [args[0], args[1]]
|
||||
: args
|
||||
))[1]);
|
||||
u8aToHex(compactStripLength(creator(...args))[1]);
|
||||
|
||||
decorated.keyPrefix = (...keys: unknown[]): string =>
|
||||
u8aToHex(creator.keyPrefix(...keys));
|
||||
decorated.keyPrefix = (...args: unknown[]): string =>
|
||||
u8aToHex(creator.keyPrefix(...args));
|
||||
|
||||
decorated.range = decorateMethod((range: [Hash, Hash?], ...args: unknown[]): Observable<[Hash, Codec][]> =>
|
||||
this._decorateStorageRange(decorated, args, range));
|
||||
@@ -458,9 +471,8 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
decorated.sizeAt = decorateMethod((hash: Hash | Uint8Array | string, ...args: unknown[]): Observable<u64> =>
|
||||
this._rpcCore.state.getStorageSize(getArgs(args), hash));
|
||||
|
||||
// FIXME NMap support
|
||||
// .keys() & .entries() only available on map types
|
||||
if (creator.iterKey && (creator.meta.type.isMap || creator.meta.type.isDoubleMap || creator.meta.type.isNMap)) {
|
||||
if (creator.iterKey && creator.meta.type.isMap) {
|
||||
decorated.entries = decorateMethod(
|
||||
memo(this.#instanceId, (...args: unknown[]): Observable<[StorageKey, Codec][]> =>
|
||||
this._retrieveMapEntries(creator, null, args)));
|
||||
@@ -486,10 +498,13 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
this._retrieveMapKeysPaged(creator, opts)));
|
||||
}
|
||||
|
||||
if (this.supportMulti) {
|
||||
if (this.supportMulti && creator.meta.type.isMap) {
|
||||
// When using double map storage function, user need to pass double map key as an array
|
||||
decorated.multi = decorateMethod((args: (unknown | unknown[])[]): Observable<Codec[]> =>
|
||||
this._retrieveMulti(args.map((arg) => [creator, arg])));
|
||||
decorated.multi = decorateMethod((args: unknown[]): Observable<Codec[]> =>
|
||||
creator.meta.type.asMap.hashers.length === 1
|
||||
? this._retrieveMulti(args.map((a) => [creator, [a]]))
|
||||
: this._retrieveMulti(args.map((a) => [creator, a as unknown[]]))
|
||||
);
|
||||
}
|
||||
|
||||
/* eslint-enable @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment */
|
||||
@@ -497,9 +512,9 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
return this._decorateFunctionMeta(creator as any, decorated) as unknown as QueryableStorageEntry<ApiType>;
|
||||
}
|
||||
|
||||
private _decorateStorageEntryAt<ApiType extends ApiTypes> (creator: StorageEntry, decorateMethod: DecorateMethod<ApiType>, blockHash: Uint8Array): QueryableStorageEntryAt<ApiType> {
|
||||
private _decorateStorageEntryAt<ApiType extends ApiTypes> (registry: Registry, creator: StorageEntry, decorateMethod: DecorateMethod<ApiType>, blockHash: Uint8Array): QueryableStorageEntryAt<ApiType> {
|
||||
// get the storage arguments, with DoubleMap as an array entry, otherwise spread
|
||||
const getArgs = (args: unknown[]): unknown[] => extractStorageArgs(this.#registry, creator, args);
|
||||
const getArgs = (args: unknown[]): unknown[] => extractStorageArgs(registry, creator, args);
|
||||
|
||||
// Disable this where it occurs for each field we are decorating
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment */
|
||||
@@ -520,11 +535,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
u8aToHex(compactStripLength(creator(
|
||||
creator.meta.type.isPlain
|
||||
? undefined
|
||||
: creator.meta.type.isMap
|
||||
? args[0]
|
||||
: creator.meta.type.isDoubleMap
|
||||
? [args[0], args[1]]
|
||||
: args
|
||||
: args
|
||||
))[1]);
|
||||
|
||||
decorated.keyPrefix = (...keys: unknown[]): string =>
|
||||
@@ -535,7 +546,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
|
||||
// FIXME NMap support
|
||||
// .keys() & .entries() only available on map types
|
||||
if (creator.iterKey && (creator.meta.type.isMap || creator.meta.type.isDoubleMap)) {
|
||||
if (creator.iterKey && creator.meta.type.isMap) {
|
||||
decorated.entries = decorateMethod(
|
||||
memo(this.#instanceId, (...args: unknown[]): Observable<[StorageKey, Codec][]> =>
|
||||
this._retrieveMapEntries(creator, blockHash, args)));
|
||||
@@ -579,7 +590,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
}
|
||||
|
||||
// retrieve a set of values for a specific set of keys - here we chunk the keys into PAGE_SIZE sizes
|
||||
private _retrieveMulti (keys: [StorageEntry, unknown | unknown[]][]): Observable<Codec[]> {
|
||||
private _retrieveMulti (keys: [StorageEntry, unknown[]][]): Observable<Codec[]> {
|
||||
if (!keys.length) {
|
||||
return of([]);
|
||||
}
|
||||
@@ -596,7 +607,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
}
|
||||
|
||||
private _retrieveMapKeys ({ iterKey, meta, method, section }: StorageEntry, at: Hash | Uint8Array | string | null, args: unknown[]): Observable<StorageKey[]> {
|
||||
assert(iterKey && (meta.type.isMap || meta.type.isDoubleMap || meta.type.isNMap), 'keys can only be retrieved on maps, linked maps and double maps');
|
||||
assert(iterKey && meta.type.isMap, 'keys can only be retrieved on maps');
|
||||
|
||||
const headKey = iterKey(...args).toHex();
|
||||
const startSubject = new BehaviorSubject<string>(headKey);
|
||||
@@ -620,7 +631,7 @@ export abstract class Decorate<ApiType extends ApiTypes> extends Events {
|
||||
}
|
||||
|
||||
private _retrieveMapKeysPaged ({ iterKey, meta, method, section }: StorageEntry, opts: PaginationOptions): Observable<StorageKey[]> {
|
||||
assert(iterKey && (meta.type.isMap || meta.type.isDoubleMap || meta.type.isNMap), 'keys can only be retrieved on maps, linked maps and double maps');
|
||||
assert(iterKey && meta.type.isMap, 'keys can only be retrieved on maps');
|
||||
|
||||
const headKey = iterKey(...opts.args).toHex();
|
||||
|
||||
|
||||
@@ -182,8 +182,8 @@ export abstract class Getters<ApiType extends ApiTypes> extends Init<ApiType> im
|
||||
/**
|
||||
* @description The underlying Rx API interface
|
||||
*/
|
||||
public get rx (): Pick<ApiInterfaceRx, 'tx' | 'rpc'> {
|
||||
return assertResult(this._rx as Pick<ApiInterfaceRx, 'tx' | 'rpc'>);
|
||||
public get rx (): Pick<ApiInterfaceRx, 'tx' | 'rpc' | 'query'> {
|
||||
return assertResult(this._rx as Pick<ApiInterfaceRx, 'tx' | 'rpc' | 'query'>);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,7 +21,8 @@ function consts (api: ApiPromise): void {
|
||||
console.log(
|
||||
api.consts.foo.bar,
|
||||
api.consts.balances.existentialDeposit.toNumber(),
|
||||
api.consts.balances.existentialDeposit.meta.docs.map((s): string => s.toString()).join('')
|
||||
api.consts.balances.existentialDeposit.meta.docs.map((s) => s.toString()).join(''),
|
||||
api.consts.system.blockWeights.maxBlock.divn(123).toNumber()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api', version: '5.8.1' };
|
||||
export const packageInfo = { name: '@polkadot/api', version: '6.1.2' };
|
||||
|
||||
@@ -39,7 +39,7 @@ describe('ApiPromise', (): void => {
|
||||
};
|
||||
|
||||
const signer = new SingleAccountSigner(registry, aliceEd);
|
||||
const api = await ApiPromise.create({ provider, registry, signer });
|
||||
const api = await ApiPromise.create({ provider, registry, signer, throwOnConnect: true });
|
||||
const transfer = api.tx.balances.transfer(keyring.getPair('0xe659a7a1628cdd93febc04a4e0646ea20e9f5f0ce097d9a05290d4a9e054df4e').address, 321564789876512345n);
|
||||
|
||||
return { api, transfer: await transfer.signAsync(aliceEd.address, {}) };
|
||||
@@ -59,7 +59,7 @@ describe('ApiPromise', (): void => {
|
||||
const rpcData = await provider.send<string>('state_getMetadata', []);
|
||||
const genesisHash = registry.createType('Hash', await provider.send('chain_getBlockHash', [])).toHex();
|
||||
const specVersion = 0;
|
||||
const api = await ApiPromise.create({ metadata: { [`${genesisHash}-${specVersion}`]: rpcData }, provider, registry });
|
||||
const api = await ApiPromise.create({ metadata: { [`${genesisHash}-${specVersion}`]: rpcData }, provider, registry, throwOnConnect: true });
|
||||
|
||||
expect(api.genesisHash).toBeDefined();
|
||||
expect(api.runtimeMetadata).toBeDefined();
|
||||
@@ -74,7 +74,7 @@ describe('ApiPromise', (): void => {
|
||||
|
||||
it('Create API instance without metadata and makes the runtime, rpc, state & extrinsics available', async (): Promise<void> => {
|
||||
const metadata = {};
|
||||
const api = await ApiPromise.create({ metadata, provider, registry });
|
||||
const api = await ApiPromise.create({ metadata, provider, registry, throwOnConnect: true });
|
||||
|
||||
expect(api.genesisHash).toBeDefined();
|
||||
expect(api.runtimeMetadata).toBeDefined();
|
||||
@@ -98,17 +98,15 @@ describe('ApiPromise', (): void => {
|
||||
}
|
||||
}
|
||||
|
||||
const api = new ErrorApiPromise();
|
||||
|
||||
try {
|
||||
await api.isReadyOrError;
|
||||
const api = await ErrorApiPromise.create({ provider, throwOnConnect: true });
|
||||
|
||||
await api.disconnect();
|
||||
|
||||
fail('Expected an error but none occurred.');
|
||||
} catch {
|
||||
// Pass
|
||||
}
|
||||
|
||||
await api.disconnect();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -118,7 +116,7 @@ describe('ApiPromise', (): void => {
|
||||
const SIG = '0x659effefbbe5ab4d7136ebb5084b959eb424e32b862307371be4721ac2c46334245af4f1476c36c5e5aff04396c2fdd2ce561ec90382821d4aa071b559b1db0f';
|
||||
|
||||
it('signs data using a specified keyring', async (): Promise<void> => {
|
||||
const api = await ApiPromise.create({ provider, registry });
|
||||
const api = await ApiPromise.create({ provider, registry, throwOnConnect: true });
|
||||
const sig = await api.sign(aliceEd, TEST);
|
||||
|
||||
expect(sig).toEqual(SIG);
|
||||
@@ -127,11 +125,7 @@ describe('ApiPromise', (): void => {
|
||||
});
|
||||
|
||||
it('signs data using an external signer', async (): Promise<void> => {
|
||||
const api = await ApiPromise.create({
|
||||
provider,
|
||||
registry,
|
||||
signer: new SingleAccountSigner(registry, aliceEd)
|
||||
});
|
||||
const api = await ApiPromise.create({ provider, registry, signer: new SingleAccountSigner(registry, aliceEd), throwOnConnect: true });
|
||||
const sig = await api.sign(ADDR, TEST);
|
||||
|
||||
expect(sig).toEqual(SIG);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2021 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ModuleConstantMetadataLatest } from '@polkadot/types/interfaces';
|
||||
import type { PalletConstantMetadataLatest } from '@polkadot/types/interfaces';
|
||||
import type { Codec } from '@polkadot/types/types';
|
||||
import type { ApiTypes } from './base';
|
||||
|
||||
@@ -10,7 +10,7 @@ export interface AugmentedConsts<ApiType extends ApiTypes> { }
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export interface AugmentedConst<ApiType extends ApiTypes> {
|
||||
meta: ModuleConstantMetadataLatest;
|
||||
meta: PalletConstantMetadataLatest;
|
||||
}
|
||||
|
||||
export interface QueryableModuleConsts {
|
||||
|
||||
@@ -112,4 +112,8 @@ export interface ApiDecoration<ApiType extends ApiTypes> {
|
||||
errors: DecoratedErrors<ApiType>;
|
||||
events: DecoratedEvents<ApiType>;
|
||||
query: QueryableStorage<ApiType>;
|
||||
registry: Registry;
|
||||
rx: {
|
||||
query: QueryableStorage<'rxjs'>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
// Copyright 2017-2019 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Storage } from '@polkadot/types/metadata/decorate/types';
|
||||
|
||||
import { decorateStorage, Metadata, TypeRegistry } from '@polkadot/types';
|
||||
import metaStatic from '@polkadot/types-support/metadata/static-substrate';
|
||||
|
||||
@@ -10,50 +8,46 @@ import { extractStorageArgs } from './validate';
|
||||
|
||||
describe('extractStorageArgs', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
let storage: Storage;
|
||||
const metadata = new Metadata(registry, metaStatic);
|
||||
|
||||
beforeEach((): void => {
|
||||
const metadata = new Metadata(registry, metaStatic);
|
||||
registry.setMetadata(metadata);
|
||||
|
||||
storage = decorateStorage(registry, metadata.asLatest, metadata.version);
|
||||
});
|
||||
const storage = decorateStorage(registry, metadata.asLatest, metadata.version);
|
||||
|
||||
it('validates no-arg plain', (): void => {
|
||||
expect(
|
||||
extractStorageArgs(registry, storage.timestamp.now, [])
|
||||
).toEqual([storage.timestamp.now]);
|
||||
).toEqual([storage.timestamp.now, []]);
|
||||
});
|
||||
|
||||
it('validates no-arg plain (with undefined, undefined)', (): void => {
|
||||
expect(
|
||||
extractStorageArgs(registry, storage.timestamp.now, [undefined, undefined])
|
||||
).toEqual([storage.timestamp.now]);
|
||||
).toEqual([storage.timestamp.now, []]);
|
||||
});
|
||||
|
||||
it('validates no-arg plain (failing when there are args)', (): void => {
|
||||
expect(
|
||||
(): unknown => extractStorageArgs(registry, storage.timestamp.now, [123, 456])
|
||||
() => extractStorageArgs(registry, storage.timestamp.now, [123, 456])
|
||||
).toThrow('timestamp.now() does not take any arguments, 2 found');
|
||||
});
|
||||
|
||||
it('validates map, 1 arg', (): void => {
|
||||
expect(
|
||||
extractStorageArgs(registry, storage.staking.payee, ['abc'])
|
||||
).toEqual([storage.staking.payee, 'abc']);
|
||||
).toEqual([storage.staking.payee, ['abc']]);
|
||||
});
|
||||
|
||||
it('validates map, 1 arg (failing with no args)', (): void => {
|
||||
expect(
|
||||
(): any =>
|
||||
extractStorageArgs(registry, storage.staking.payee, [])
|
||||
).toThrow('staking.payee(AccountId) is a map, requiring 1 argument, 0 found');
|
||||
() => extractStorageArgs(registry, storage.staking.payee, [])
|
||||
).toThrow('staking.payee(AccountId32) is a map, requiring 1 arguments, 0 found');
|
||||
});
|
||||
|
||||
it('validates map, 1 arg (failing with no args)', (): void => {
|
||||
expect(
|
||||
(): any =>
|
||||
extractStorageArgs(registry, storage.staking.payee, ['abc', 'def'])
|
||||
).toThrow('staking.payee(AccountId) is a map, requiring 1 argument, 2 found');
|
||||
() => extractStorageArgs(registry, storage.staking.payee, ['abc', 'def'])
|
||||
).toThrow('staking.payee(AccountId32) is a map, requiring 1 arguments, 2 found');
|
||||
});
|
||||
|
||||
it('validates doublemap, 2 args', (): void => {
|
||||
@@ -64,35 +58,13 @@ describe('extractStorageArgs', (): void => {
|
||||
|
||||
it('validates doublemap, 2 args (failing with no args)', (): void => {
|
||||
expect(
|
||||
(): any =>
|
||||
extractStorageArgs(registry, storage.staking.erasStakers, [])
|
||||
).toThrow('staking.erasStakers(EraIndex, AccountId) is a double map, requiring 2 arguments, 0 found');
|
||||
() => extractStorageArgs(registry, storage.staking.erasStakers, [])
|
||||
).toThrow('staking.erasStakers(u32, AccountId32) is a map, requiring 2 arguments, 0 found');
|
||||
});
|
||||
|
||||
it('validates doublemap, 2 args (failing with 1 arg)', (): void => {
|
||||
expect(
|
||||
(): any =>
|
||||
extractStorageArgs(registry, storage.staking.erasStakers, [123])
|
||||
).toThrow('staking.erasStakers(EraIndex, AccountId) is a double map, requiring 2 arguments, 1 found');
|
||||
});
|
||||
|
||||
// Linked maps have been removed
|
||||
it.skip('validates linked map, no args', (): void => {
|
||||
expect(
|
||||
extractStorageArgs(registry, storage.staking.validators, [])
|
||||
).toEqual([storage.staking.validators]);
|
||||
});
|
||||
|
||||
it.skip('validates linked map, single arg', (): void => {
|
||||
expect(
|
||||
extractStorageArgs(registry, storage.staking.validators, [123])
|
||||
).toEqual([storage.staking.validators, 123]);
|
||||
});
|
||||
|
||||
it.skip('validates linked map (failing with extra args)', (): void => {
|
||||
expect(
|
||||
(): any[] =>
|
||||
extractStorageArgs(registry, storage.staking.validators, [123, 456])
|
||||
).toThrow('staking.validators(AccountId) is a linked map, requiring either 0 arguments (retrieving all) or 1 argument, 2 found');
|
||||
() => extractStorageArgs(registry, storage.staking.erasStakers, [123])
|
||||
).toThrow('staking.erasStakers(u32, AccountId32) is a map, requiring 2 arguments, 1 found');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,60 +1,32 @@
|
||||
// Copyright 2017-2019 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Type } from '@polkadot/types';
|
||||
import type { SiLookupTypeId } from '@polkadot/types/interfaces';
|
||||
import type { StorageEntry } from '@polkadot/types/primitive/types';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
|
||||
import { assert, isUndefined } from '@polkadot/util';
|
||||
|
||||
function sig (_: Registry, { method, section }: StorageEntry, args: Type[]): string {
|
||||
return `${section}.${method}(${args.join(', ')})`;
|
||||
}
|
||||
|
||||
function doDoubleMap (registry: Registry, creator: StorageEntry, args: unknown[]): [StorageEntry, [any, any]] {
|
||||
const { key1, key2 } = creator.meta.type.asDoubleMap;
|
||||
|
||||
assert(args.length === 2, () => `${sig(registry, creator, [key1, key2])} is a double map, requiring 2 arguments, ${args.length} found`);
|
||||
|
||||
// pass as tuple
|
||||
return [creator, args as [any, any]];
|
||||
}
|
||||
|
||||
function doMap (registry: Registry, creator: StorageEntry, args: unknown[]): [StorageEntry] | [StorageEntry, any] {
|
||||
const { key } = creator.meta.type.asMap;
|
||||
|
||||
assert(args.length === 1, () => `${sig(registry, creator, [key])} is a map, requiring 1 argument, ${args.length} found`);
|
||||
|
||||
// expand
|
||||
return args.length
|
||||
? [creator, args[0]]
|
||||
: [creator];
|
||||
}
|
||||
|
||||
function doNMap (registry: Registry, creator: StorageEntry, args: unknown[]): [StorageEntry, any[]] {
|
||||
const { keyVec } = creator.meta.type.asNMap;
|
||||
|
||||
assert(args.length === keyVec.length, () => `${sig(registry, creator, keyVec)} is a multi map, requiring ${keyVec.length} arguments, ${args.length} found`);
|
||||
|
||||
// pass as tuple
|
||||
return [creator, args];
|
||||
function sig ({ lookup }: Registry, { method, section }: StorageEntry, args: SiLookupTypeId[]): string {
|
||||
return `${section}.${method}(${args.map((a) => lookup.getTypeDef(a).type).join(', ')})`;
|
||||
}
|
||||
|
||||
// sets up the arguments in the form of [creator, args] ready to be used in a storage
|
||||
// call. Additionally, it verifies that the correct number of arguments have been passed
|
||||
export function extractStorageArgs (registry: Registry, creator: StorageEntry, _args: unknown[]): [StorageEntry, any[]] | [StorageEntry] | [StorageEntry, any] {
|
||||
export function extractStorageArgs (registry: Registry, creator: StorageEntry, _args: unknown[]): [StorageEntry, unknown[]] {
|
||||
const args = _args.filter((arg) => !isUndefined(arg));
|
||||
|
||||
if (creator.meta.type.isDoubleMap) {
|
||||
return doDoubleMap(registry, creator, args);
|
||||
} else if (creator.meta.type.isMap) {
|
||||
return doMap(registry, creator, args);
|
||||
} else if (creator.meta.type.isNMap) {
|
||||
return doNMap(registry, creator, args);
|
||||
if (creator.meta.type.isPlain) {
|
||||
assert(args.length === 0, () => `${sig(registry, creator, [])} does not take any arguments, ${args.length} found`);
|
||||
} else {
|
||||
const { hashers, key } = creator.meta.type.asMap;
|
||||
const keys = hashers.length === 1
|
||||
? [key]
|
||||
: registry.lookup.getSiType(key).def.asTuple.map((t) => t);
|
||||
|
||||
assert(args.length === keys.length, () => `${sig(registry, creator, keys)} is a map, requiring ${keys.length} arguments, ${args.length} found`);
|
||||
}
|
||||
|
||||
assert(args.length === 0, () => `${sig(registry, creator, [])} does not take any arguments, ${args.length} found`);
|
||||
|
||||
// no args
|
||||
return [creator];
|
||||
// pass as tuple
|
||||
return [creator, args];
|
||||
}
|
||||
|
||||
@@ -22,6 +22,11 @@ describe('misc online tests', (): void => {
|
||||
await api.disconnect();
|
||||
});
|
||||
|
||||
it('expose rpc and rx definition', (): void => {
|
||||
console.error(api.rpc.payment.queryFeeDetails.meta);
|
||||
console.error(api.rx.rpc.chain.getBlock.meta);
|
||||
});
|
||||
|
||||
it.skip('retrieves balances correctly', async (): Promise<void> => {
|
||||
console.error(JSON.stringify(
|
||||
await api.query.system.account('FPzukZw2mphWsXDqdkNzLaxnanjZEWH9i2vqwobTdtde5me')
|
||||
@@ -64,10 +69,4 @@ describe('misc online tests', (): void => {
|
||||
await api.query.society.defenderVotes('Dab4bfYTZRUDMWjYAUQuFbDreQ9mt7nULWu3Dw7jodbzVe9')
|
||||
));
|
||||
});
|
||||
|
||||
it('expose rpc and rx definition', (): void => {
|
||||
console.error(api.rpc.payment.queryFeeDetails.meta);
|
||||
|
||||
console.error(api.rx.rpc.chain.getBlock.meta);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -150,7 +150,7 @@ const typesBundle = {
|
||||
|
||||
types: [
|
||||
{
|
||||
minmax: [0, undefined] as [number?, number?],
|
||||
minmax: [0, undefined],
|
||||
types: {
|
||||
Balance: 'u64',
|
||||
BalanceOf: 'Balance',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/rpc-core",
|
||||
"version": "5.8.1",
|
||||
"version": "6.1.2",
|
||||
"type": "module",
|
||||
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
|
||||
"main": "index.js",
|
||||
@@ -20,12 +20,12 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.15.4",
|
||||
"@polkadot/rpc-provider": "5.8.1",
|
||||
"@polkadot/types": "5.8.1",
|
||||
"@polkadot/util": "^7.3.1",
|
||||
"@polkadot/rpc-provider": "6.1.2",
|
||||
"@polkadot/types": "6.1.2",
|
||||
"@polkadot/util": "^7.4.1",
|
||||
"rxjs": "^7.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^7.3.1"
|
||||
"@polkadot/keyring": "^7.4.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-core', version: '5.8.1' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-core', version: '6.1.2' };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/rpc-provider",
|
||||
"version": "5.8.1",
|
||||
"version": "6.1.2",
|
||||
"type": "module",
|
||||
"description": "Transport providers for the API",
|
||||
"main": "index.js",
|
||||
@@ -20,17 +20,17 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.15.4",
|
||||
"@polkadot/types": "5.8.1",
|
||||
"@polkadot/util": "^7.3.1",
|
||||
"@polkadot/util-crypto": "^7.3.1",
|
||||
"@polkadot/x-fetch": "^7.3.1",
|
||||
"@polkadot/x-global": "^7.3.1",
|
||||
"@polkadot/x-ws": "^7.3.1",
|
||||
"@polkadot/types": "6.1.2",
|
||||
"@polkadot/util": "^7.4.1",
|
||||
"@polkadot/util-crypto": "^7.4.1",
|
||||
"@polkadot/x-fetch": "^7.4.1",
|
||||
"@polkadot/x-global": "^7.4.1",
|
||||
"@polkadot/x-ws": "^7.4.1",
|
||||
"eventemitter3": "^4.0.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^7.3.1",
|
||||
"@polkadot/types": "5.8.1",
|
||||
"@polkadot/keyring": "^7.4.1",
|
||||
"@polkadot/types": "6.1.2",
|
||||
"mock-socket": "^9.0.3",
|
||||
"nock": "^13.1.3"
|
||||
}
|
||||
|
||||
@@ -29,6 +29,14 @@ describe('Http', (): void => {
|
||||
).not.toThrow();
|
||||
});
|
||||
|
||||
it('allow clone', (): void => {
|
||||
const clone = http.clone();
|
||||
/* eslint-disable */
|
||||
expect((clone as any)['#endpoint']).toEqual((http as any)['#endpoint']);
|
||||
expect((clone as any)['#headers']).toEqual((http as any)['#headers']);
|
||||
/* eslint-enable */
|
||||
});
|
||||
|
||||
it('always returns isConnected true', (): void => {
|
||||
expect(http.isConnected).toEqual(true);
|
||||
});
|
||||
|
||||
@@ -62,7 +62,7 @@ export class HttpProvider implements ProviderInterface {
|
||||
* @description Returns a clone of the object
|
||||
*/
|
||||
public clone (): HttpProvider {
|
||||
throw new Error('Unimplemented');
|
||||
return new HttpProvider(this.#endpoint, this.#headers);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-provider', version: '5.8.1' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-provider', version: '6.1.2' };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/typegen",
|
||||
"version": "5.8.1",
|
||||
"version": "6.1.2",
|
||||
"type": "module",
|
||||
"description": "Type generation scripts",
|
||||
"main": "index.js",
|
||||
@@ -29,17 +29,17 @@
|
||||
"@babel/core": "^7.15.5",
|
||||
"@babel/register": "^7.15.3",
|
||||
"@babel/runtime": "^7.15.4",
|
||||
"@polkadot/api": "5.8.1",
|
||||
"@polkadot/rpc-provider": "5.8.1",
|
||||
"@polkadot/types": "5.8.1",
|
||||
"@polkadot/types-support": "5.8.1",
|
||||
"@polkadot/util": "^7.3.1",
|
||||
"@polkadot/api": "6.1.2",
|
||||
"@polkadot/rpc-provider": "6.1.2",
|
||||
"@polkadot/types": "6.1.2",
|
||||
"@polkadot/types-support": "6.1.2",
|
||||
"@polkadot/util": "^7.4.1",
|
||||
"handlebars": "^4.7.7",
|
||||
"websocket": "^1.0.34",
|
||||
"yargs": "^17.1.1"
|
||||
"yargs": "^17.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/websocket": "^1.0.4",
|
||||
"@types/yargs": "^17.0.2"
|
||||
"@types/yargs": "^17.0.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import { ApiPromise, WsProvider } from '@polkadot/api';
|
||||
/** @internal */
|
||||
async function run (ws: string): Promise<void> {
|
||||
const provider = new WsProvider(ws);
|
||||
const api = await ApiPromise.create({ provider });
|
||||
const api = await ApiPromise.create({ provider, throwOnConnect: true });
|
||||
const [chain, props] = await Promise.all([
|
||||
api.rpc.system.chain(),
|
||||
api.rpc.system.properties()
|
||||
|
||||
@@ -6,6 +6,7 @@ import type { ExtraTypes } from './types';
|
||||
|
||||
import Handlebars from 'handlebars';
|
||||
|
||||
import lookupDefinitions from '@polkadot/types/augment/lookup/definitions';
|
||||
import * as defaultDefs from '@polkadot/types/interfaces/definitions';
|
||||
import { stringCamelCase } from '@polkadot/util';
|
||||
|
||||
@@ -17,14 +18,19 @@ const generateForMetaTemplate = Handlebars.compile(template);
|
||||
/** @internal */
|
||||
function generateForMeta (meta: Metadata, dest: string, extraTypes: ExtraTypes, isStrict: boolean): void {
|
||||
writeFile(dest, (): string => {
|
||||
const allTypes = { '@polkadot/types/interfaces': defaultDefs, ...extraTypes };
|
||||
const allTypes = {
|
||||
'@polkadot/types/augment': { lookup: lookupDefinitions },
|
||||
'@polkadot/types/interfaces': defaultDefs,
|
||||
...extraTypes
|
||||
};
|
||||
const imports = createImports(allTypes);
|
||||
const allDefs = Object.entries(allTypes).reduce((defs, [path, obj]) => {
|
||||
return Object.entries(obj).reduce((defs, [key, value]) => ({ ...defs, [`${path}/${key}`]: value }), defs);
|
||||
}, {});
|
||||
const { lookup, pallets, registry } = meta.asLatest;
|
||||
|
||||
const modules = meta.asLatest.modules
|
||||
.filter((mod) => mod.constants.length > 0)
|
||||
const modules = pallets
|
||||
.filter(({ constants }) => constants.length > 0)
|
||||
.map(({ constants, name }) => {
|
||||
if (!isStrict) {
|
||||
setImports(allDefs, imports, ['Codec']);
|
||||
@@ -32,7 +38,8 @@ function generateForMeta (meta: Metadata, dest: string, extraTypes: ExtraTypes,
|
||||
|
||||
const items = constants
|
||||
.map(({ docs, name, type }) => {
|
||||
const returnType = formatType(meta.registry, allDefs, type.toString(), imports);
|
||||
const typeDef = lookup.getTypeDef(type);
|
||||
const returnType = typeDef.lookupName || formatType(registry, allDefs, typeDef, imports);
|
||||
|
||||
setImports(allDefs, imports, [returnType]);
|
||||
|
||||
@@ -57,8 +64,8 @@ function generateForMeta (meta: Metadata, dest: string, extraTypes: ExtraTypes,
|
||||
isStrict,
|
||||
modules,
|
||||
types: [
|
||||
...Object.keys(imports.localTypes).sort().map((packagePath): { file: string; types: string[] } => ({
|
||||
file: packagePath,
|
||||
...Object.keys(imports.localTypes).sort().map<{ file: string; types: string[] }>((packagePath) => ({
|
||||
file: packagePath.replace('@polkadot/types/augment', '@polkadot/types'),
|
||||
types: Object.keys(imports.localTypes[packagePath])
|
||||
})),
|
||||
{
|
||||
|
||||
@@ -17,11 +17,11 @@ const generateForMetaTemplate = Handlebars.compile(template);
|
||||
function generateForMeta (meta: Metadata, dest: string, isStrict: boolean): void {
|
||||
writeFile(dest, (): string => {
|
||||
const imports = createImports({});
|
||||
|
||||
const modules = meta.asLatest.modules
|
||||
.filter((mod) => mod.errors.length > 0)
|
||||
const { lookup, pallets } = meta.asLatest;
|
||||
const modules = pallets
|
||||
.filter(({ errors }) => errors.isSome)
|
||||
.map(({ errors, name }) => ({
|
||||
items: errors
|
||||
items: lookup.getSiType(errors.unwrap().type).def.asVariant.variants
|
||||
.map(({ docs, name }) => ({
|
||||
docs,
|
||||
name: name.toString()
|
||||
|
||||
@@ -6,6 +6,7 @@ import type { ExtraTypes } from './types';
|
||||
|
||||
import Handlebars from 'handlebars';
|
||||
|
||||
import lookupDefinitions from '@polkadot/types/augment/lookup/definitions';
|
||||
import * as defaultDefs from '@polkadot/types/interfaces/definitions';
|
||||
import { stringCamelCase } from '@polkadot/util';
|
||||
|
||||
@@ -17,29 +18,34 @@ const generateForMetaTemplate = Handlebars.compile(template);
|
||||
/** @internal */
|
||||
function generateForMeta (meta: Metadata, dest: string, extraTypes: ExtraTypes, isStrict: boolean): void {
|
||||
writeFile(dest, (): string => {
|
||||
const allTypes = { '@polkadot/types/interfaces': defaultDefs, ...extraTypes };
|
||||
const allTypes = {
|
||||
'@polkadot/types/augment': { lookup: lookupDefinitions },
|
||||
'@polkadot/types/interfaces': defaultDefs,
|
||||
...extraTypes
|
||||
};
|
||||
const imports = createImports(allTypes);
|
||||
const allDefs = Object.entries(allTypes).reduce((defs, [path, obj]) => {
|
||||
return Object.entries(obj).reduce((defs, [key, value]) => ({ ...defs, [`${path}/${key}`]: value }), defs);
|
||||
}, {});
|
||||
|
||||
const modules = meta.asLatest.modules
|
||||
.filter((mod) => mod.events.isSome)
|
||||
const { lookup, pallets, registry } = meta.asLatest;
|
||||
const modules = pallets
|
||||
.filter(({ events }) => events.isSome)
|
||||
.map(({ events, name }) => ({
|
||||
items: events
|
||||
.unwrap()
|
||||
.sort(compareName)
|
||||
.map(({ args, docs, name }) => {
|
||||
const types = args.map((type) => formatType(meta.registry, allDefs, type.toString(), imports));
|
||||
items: lookup.getSiType(events.unwrap().type).def.asVariant.variants
|
||||
.map(({ docs, fields, name }) => {
|
||||
const args = fields
|
||||
.map(({ type }) => lookup.getTypeDef(type))
|
||||
.map((typeDef) => typeDef.lookupName || formatType(registry, allDefs, typeDef, imports));
|
||||
|
||||
setImports(allDefs, imports, types);
|
||||
setImports(allDefs, imports, args);
|
||||
|
||||
return {
|
||||
docs,
|
||||
name: name.toString(),
|
||||
type: types.join(', ')
|
||||
type: args.join(', ')
|
||||
};
|
||||
}).sort(compareName),
|
||||
})
|
||||
.sort(compareName),
|
||||
name: stringCamelCase(name)
|
||||
}))
|
||||
.sort(compareName);
|
||||
@@ -51,7 +57,7 @@ function generateForMeta (meta: Metadata, dest: string, extraTypes: ExtraTypes,
|
||||
modules,
|
||||
types: [
|
||||
...Object.keys(imports.localTypes).sort().map((packagePath): { file: string; types: string[] } => ({
|
||||
file: packagePath,
|
||||
file: packagePath.replace('@polkadot/types/augment', '@polkadot/types'),
|
||||
types: Object.keys(imports.localTypes[packagePath])
|
||||
})),
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@ export { generateDefaultConsts } from './consts';
|
||||
export { generateDefaultErrors } from './errors';
|
||||
export { generateDefaultEvents } from './events';
|
||||
export { generateDefaultInterface } from './interfaceRegistry';
|
||||
export { generateDefaultLookup } from './lookup';
|
||||
export { generateDefaultQuery } from './query';
|
||||
export { generateDefaultRpc } from './rpc';
|
||||
export { generateDefaultTsDef } from './tsDef';
|
||||
|
||||
@@ -0,0 +1,270 @@
|
||||
// Copyright 2017-2021 @polkadot/typegen authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { PortableRegistry, PortableType, SiLookupTypeId, SiPath, SiTypeParameter } from '@polkadot/types/interfaces';
|
||||
import type { TypeDef } from '@polkadot/types/types';
|
||||
|
||||
import Handlebars from 'handlebars';
|
||||
import path from 'path';
|
||||
|
||||
import * as defaultDefinitions from '@polkadot/types/interfaces/definitions';
|
||||
import { Registry } from '@polkadot/types/types';
|
||||
import staticKusama from '@polkadot/types-support/metadata/static-kusama';
|
||||
import staticPolkadot from '@polkadot/types-support/metadata/static-polkadot';
|
||||
import staticSubstrate from '@polkadot/types-support/metadata/static-substrate';
|
||||
import { isString, stringify } from '@polkadot/util';
|
||||
|
||||
import { createImports, exportType, initMeta, readTemplate, writeFile } from '../util';
|
||||
import { typeEncoders } from './tsDef';
|
||||
|
||||
const MAP_ENUMS = ['Call', 'Event', 'Error', 'RawEvent'];
|
||||
const WITH_TYPEDEF = false;
|
||||
|
||||
const generateLookupDefsTmpl = Handlebars.compile(readTemplate('lookup/defs'));
|
||||
const generateLookupDefsNamedTmpl = Handlebars.compile(readTemplate('lookup/defs-named'));
|
||||
const generateLookupIndexTmpl = Handlebars.compile(readTemplate('lookup/index'));
|
||||
const generateLookupTypesTmpl = Handlebars.compile(readTemplate('lookup/types'));
|
||||
|
||||
function generateParamType (registry: Registry, { name, type }: SiTypeParameter): string {
|
||||
if (type.isSome) {
|
||||
const link = registry.lookup.types[type.unwrap().toNumber()];
|
||||
|
||||
if (link.type.path.length) {
|
||||
return generateTypeDocs(registry, null, link.type.path, link.type.params);
|
||||
}
|
||||
}
|
||||
|
||||
return name.toString();
|
||||
}
|
||||
|
||||
function generateTypeDocs (registry: Registry, id: SiLookupTypeId | null, path: SiPath, params: SiTypeParameter[]): string {
|
||||
return `${id ? `${registry.createLookupType(id)}${path.length ? ': ' : ''}` : ''}${path.map((p) => p.toString()).join('::')}${params.length ? `<${params.map((p) => generateParamType(registry, p)).join(', ')}>` : ''}`;
|
||||
}
|
||||
|
||||
function formatObject (lines: string[]): string[] {
|
||||
const max = lines.length - 1;
|
||||
|
||||
return [
|
||||
'{',
|
||||
...lines.map((l, index) =>
|
||||
(l.endsWith(',') || l.endsWith('{') || index === max || lines[index + 1].endsWith('}') || lines[index + 1].endsWith('}'))
|
||||
? l
|
||||
: `${l},`
|
||||
),
|
||||
'}'
|
||||
];
|
||||
}
|
||||
|
||||
function expandSet (parsed: Record<string, number>): string[] {
|
||||
return formatObject(
|
||||
Object.entries(parsed).reduce<string[]>((all, [k, v]) => {
|
||||
all.push(`${k}: ${v}`);
|
||||
|
||||
return all;
|
||||
}, [])
|
||||
);
|
||||
}
|
||||
|
||||
function expandObject (parsed: Record<string, string | Record<string, string>>): string[] {
|
||||
if (parsed._set) {
|
||||
return expandSet(parsed._set as unknown as Record<string, number>);
|
||||
}
|
||||
|
||||
return formatObject(
|
||||
Object.entries(parsed).reduce<string[]>((all, [k, v]) => {
|
||||
const inner = isString(v)
|
||||
? expandType(v)
|
||||
: Array.isArray(v)
|
||||
? [`[${(v as string[]).map((e) => `'${e}'`).join(', ')}]`]
|
||||
: expandObject(v);
|
||||
|
||||
inner.forEach((l, index): void => {
|
||||
all.push(`${
|
||||
index === 0
|
||||
? `${k}: ${l}`
|
||||
: `${l}`
|
||||
}`);
|
||||
});
|
||||
|
||||
return all;
|
||||
}, [])
|
||||
);
|
||||
}
|
||||
|
||||
function expandType (encoded: string): string[] {
|
||||
if (!encoded.startsWith('{')) {
|
||||
return [`'${encoded}'`];
|
||||
}
|
||||
|
||||
return expandObject(JSON.parse(encoded) as Record<string, string | Record<string, string>>);
|
||||
}
|
||||
|
||||
function expandDefToString ({ lookupNameRoot, type }: TypeDef, indent: number): string {
|
||||
if (lookupNameRoot) {
|
||||
return `'${lookupNameRoot}'`;
|
||||
}
|
||||
|
||||
const lines = expandType(type);
|
||||
let inc = 0;
|
||||
|
||||
return lines.map((l, index) => {
|
||||
let r: string;
|
||||
|
||||
if (l.endsWith('{')) {
|
||||
r = index === 0
|
||||
? l
|
||||
: `${' '.padStart(indent + inc)}${l}`;
|
||||
inc += 2;
|
||||
} else {
|
||||
if (l.endsWith('},') || l.endsWith('}')) {
|
||||
inc -= 2;
|
||||
}
|
||||
|
||||
r = index === 0
|
||||
? l
|
||||
: `${' '.padStart(indent + inc)}${l}`;
|
||||
}
|
||||
|
||||
return r;
|
||||
}).join('\n');
|
||||
}
|
||||
|
||||
function getFilteredTypes (lookup: PortableRegistry, exclude: string[] = []): [PortableType, TypeDef][] {
|
||||
const named = lookup.types.filter(({ id, type: { path } }) => {
|
||||
const typeDef = lookup.getTypeDef(id);
|
||||
|
||||
return (
|
||||
// We actually only want those with lookupName set
|
||||
!!typeDef.lookupName &&
|
||||
!(
|
||||
path.length === 2 &&
|
||||
(
|
||||
(
|
||||
// Ensure that we match {node, kusama, *}_runtime
|
||||
path[0].toString().split('_')[1] === 'runtime' &&
|
||||
!['Call', 'Event'].includes(path[1].toString())
|
||||
) ||
|
||||
path[0].toString().startsWith('pallet_')
|
||||
) &&
|
||||
// Ensure we strip generics, e.g. Event<T>
|
||||
MAP_ENUMS.includes(path[1].toString().split('<')[0])
|
||||
) &&
|
||||
!(
|
||||
path.length >= 3 &&
|
||||
path[path.length - 2].toString() === 'pallet' &&
|
||||
// As above, cater for generics
|
||||
MAP_ENUMS.includes(path[path.length - 1].toString().split('<')[0])
|
||||
)
|
||||
);
|
||||
});
|
||||
const names = named.map(({ id }) => lookup.getName(id));
|
||||
|
||||
return named
|
||||
.filter((_, index) =>
|
||||
!names.some((n, iindex) =>
|
||||
index > iindex &&
|
||||
n === names[index]
|
||||
)
|
||||
)
|
||||
.map((p): [PortableType, TypeDef] => [p, lookup.getTypeDef(p.id)])
|
||||
.filter(([, typeDef]) => !exclude.includes(typeDef.lookupName || '<invalid>'));
|
||||
}
|
||||
|
||||
function generateLookupDefs (registry: Registry, filtered: [PortableType, TypeDef][], destDir: string, subPath?: string): void {
|
||||
writeFile(path.join(destDir, `${subPath || 'definitions'}.ts`), (): string => {
|
||||
const all = filtered.map(([{ id, type: { params, path } }, typeDef]) => {
|
||||
const typeLookup = registry.createLookupType(id);
|
||||
const def = expandDefToString(typeDef, subPath ? 2 : 4);
|
||||
|
||||
return {
|
||||
docs: [
|
||||
generateTypeDocs(registry, id, path, params),
|
||||
WITH_TYPEDEF
|
||||
? `@typeDef ${stringify(typeDef)}`
|
||||
: null
|
||||
].filter((d): d is string => !!d),
|
||||
type: { def, typeLookup, typeName: typeDef.lookupName }
|
||||
};
|
||||
});
|
||||
const max = all.length - 1;
|
||||
|
||||
return (subPath ? generateLookupDefsNamedTmpl : generateLookupDefsTmpl)({
|
||||
defs: all.map(({ docs, type }, i) => {
|
||||
const { def, typeLookup, typeName } = type;
|
||||
|
||||
return {
|
||||
defs: [
|
||||
[typeName || typeLookup, `${def}${i !== max ? ',' : ''}`]
|
||||
].map(([n, t]) => `${n}: ${t}`),
|
||||
docs
|
||||
};
|
||||
}),
|
||||
headerType: 'defs'
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function generateLookupTypes (registry: Registry, filtered: [PortableType, TypeDef][], destDir: string, subPath?: string): void {
|
||||
const imports = {
|
||||
...createImports(
|
||||
{ '@polkadot/types/interfaces': defaultDefinitions },
|
||||
{ types: {} }
|
||||
),
|
||||
interfaces: []
|
||||
};
|
||||
const items = filtered.map(([, typeDef]) => {
|
||||
typeDef.name = typeDef.lookupName;
|
||||
|
||||
return typeDef.lookupNameRoot && typeDef.lookupName
|
||||
? exportType(typeDef.lookupIndex, typeDef.lookupName, typeDef.lookupNameRoot)
|
||||
: typeEncoders[typeDef.info](registry, imports.definitions, typeDef, imports);
|
||||
}).filter((t): t is string => !!t);
|
||||
|
||||
writeFile(path.join(destDir, `types${subPath ? `-${subPath}` : ''}.ts`), () => generateLookupTypesTmpl({
|
||||
headerType: 'defs',
|
||||
imports,
|
||||
items: items.map((l) =>
|
||||
l
|
||||
.split('\n')
|
||||
.map((l) => l.length ? ` ${l}` : '')
|
||||
.join('\n')
|
||||
),
|
||||
types: [
|
||||
...Object.keys(imports.localTypes).sort().map((packagePath): { file: string; types: string[] } => ({
|
||||
file: packagePath,
|
||||
types: Object.keys(imports.localTypes[packagePath])
|
||||
}))
|
||||
]
|
||||
}), true);
|
||||
writeFile(path.join(destDir, 'index.ts'), () => generateLookupIndexTmpl({ headerType: 'defs' }), true);
|
||||
}
|
||||
|
||||
function generateLookup (destDir: string, entries: [string | undefined, string][]): void {
|
||||
entries.reduce<string[]>((exclude, [subPath, staticMeta]): string[] => {
|
||||
const { lookup, registry } = initMeta(staticMeta).metadata.asLatest;
|
||||
const filtered = getFilteredTypes(lookup, exclude);
|
||||
|
||||
generateLookupDefs(registry, filtered, destDir, subPath);
|
||||
generateLookupTypes(registry, filtered, destDir, subPath);
|
||||
|
||||
return exclude.concat(
|
||||
...filtered
|
||||
.map(([, typeDef]) => typeDef.lookupName)
|
||||
.filter((n): n is string => !!n)
|
||||
);
|
||||
}, []);
|
||||
}
|
||||
|
||||
// Generate `packages/types/src/lookup/*s`, the registry of all lookup types
|
||||
export function generateDefaultLookup (destDir = 'packages/types/src/augment/lookup', staticData?: string): void {
|
||||
generateLookup(
|
||||
destDir,
|
||||
staticData
|
||||
? [[undefined, staticData]]
|
||||
: [
|
||||
['substrate', staticSubstrate],
|
||||
['polkadot', staticPolkadot],
|
||||
['kusama', staticKusama]
|
||||
]
|
||||
);
|
||||
}
|
||||
@@ -1,15 +1,16 @@
|
||||
// Copyright 2017-2021 @polkadot/typegen authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { StorageEntryMetadataLatest } from '@polkadot/types/interfaces/metadata';
|
||||
import type { PortableRegistry, StorageEntryMetadataLatest } from '@polkadot/types/interfaces/metadata';
|
||||
import type { Metadata } from '@polkadot/types/metadata/Metadata';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
import type { ExtraTypes } from './types';
|
||||
|
||||
import Handlebars from 'handlebars';
|
||||
|
||||
import lookupDefinitions from '@polkadot/types/augment/lookup/definitions';
|
||||
import * as defaultDefs from '@polkadot/types/interfaces/definitions';
|
||||
import { unwrapStorageType } from '@polkadot/types/primitive/StorageKey';
|
||||
import { unwrapStorageSi } from '@polkadot/types/primitive/StorageKey';
|
||||
import { stringCamelCase } from '@polkadot/util';
|
||||
|
||||
import { compareName, createImports, formatType, getSimilarTypes, initMeta, readTemplate, setImports, TypeImports, writeFile } from '../util';
|
||||
@@ -17,69 +18,47 @@ import { ModuleTypes } from '../util/imports';
|
||||
|
||||
// From a storage entry metadata, we return [args, returnType]
|
||||
/** @internal */
|
||||
function entrySignature (allDefs: Record<string, ModuleTypes>, registry: Registry, storageEntry: StorageEntryMetadataLatest, imports: TypeImports): [string, string, string] {
|
||||
const outputType = unwrapStorageType(registry, storageEntry.type, storageEntry.modifier.isOptional);
|
||||
function entrySignature (lookup: PortableRegistry, allDefs: Record<string, ModuleTypes>, registry: Registry, storageEntry: StorageEntryMetadataLatest, imports: TypeImports): [boolean, string, string, string] {
|
||||
const outputType = lookup.getTypeDef(unwrapStorageSi(storageEntry.type));
|
||||
|
||||
if (storageEntry.type.isPlain) {
|
||||
setImports(allDefs, imports, [storageEntry.type.asPlain.toString()]);
|
||||
const typeDef = lookup.getTypeDef(storageEntry.type.asPlain);
|
||||
|
||||
return ['', '', formatType(registry, allDefs, outputType, imports)];
|
||||
setImports(allDefs, imports, [
|
||||
typeDef.lookupName || typeDef.type,
|
||||
storageEntry.modifier.isOptional
|
||||
? 'Option'
|
||||
: null
|
||||
]);
|
||||
|
||||
return [storageEntry.modifier.isOptional, '', '', formatType(registry, allDefs, outputType, imports)];
|
||||
} else if (storageEntry.type.isMap) {
|
||||
const map = storageEntry.type.asMap;
|
||||
const { hashers, key, value } = storageEntry.type.asMap;
|
||||
const keyDefs = hashers.length === 1
|
||||
? [lookup.getTypeDef(key)]
|
||||
: lookup.getSiType(key).def.asTuple.map((k) => lookup.getTypeDef(k));
|
||||
const similarTypes = keyDefs.map((k) => getSimilarTypes(registry, allDefs, k.lookupName || k.type, imports));
|
||||
const keyTypes = similarTypes.map((t) => t.join(' | '));
|
||||
const defValue = lookup.getTypeDef(value);
|
||||
|
||||
// Find similar types of the `key` type
|
||||
const similarTypes = getSimilarTypes(registry, allDefs, map.key.toString(), imports);
|
||||
|
||||
setImports(allDefs, imports, [
|
||||
...similarTypes,
|
||||
map.value.toString()
|
||||
]);
|
||||
|
||||
return [
|
||||
formatType(registry, allDefs, map.key.toString(), imports),
|
||||
`arg: ${similarTypes.join(' | ')}`,
|
||||
formatType(registry, allDefs, outputType, imports)
|
||||
];
|
||||
} else if (storageEntry.type.isDoubleMap) {
|
||||
const dm = storageEntry.type.asDoubleMap;
|
||||
|
||||
// Find similar types of `key1` and `key2` types
|
||||
const similarTypes1 = getSimilarTypes(registry, allDefs, dm.key1.toString(), imports);
|
||||
const similarTypes2 = getSimilarTypes(registry, allDefs, dm.key2.toString(), imports);
|
||||
|
||||
setImports(allDefs, imports, [
|
||||
...similarTypes1,
|
||||
...similarTypes2,
|
||||
dm.value.toString()
|
||||
]);
|
||||
|
||||
const key1Types = similarTypes1.join(' | ');
|
||||
const key2Types = similarTypes2.join(' | ');
|
||||
|
||||
return [
|
||||
[
|
||||
formatType(registry, allDefs, dm.key1.toString(), imports),
|
||||
formatType(registry, allDefs, dm.key2.toString(), imports)
|
||||
].join(', '),
|
||||
`arg1: ${key1Types}, arg2: ${key2Types}`,
|
||||
formatType(registry, allDefs, outputType, imports)
|
||||
];
|
||||
} else if (storageEntry.type.isNMap) {
|
||||
const nmap = storageEntry.type.asNMap;
|
||||
|
||||
// Find similar types for all keys
|
||||
const similarTypes = nmap.keyVec.map((k) => getSimilarTypes(registry, allDefs, k.toString(), imports));
|
||||
if (value.toNumber() === 416) {
|
||||
console.log(JSON.stringify(defValue));
|
||||
}
|
||||
|
||||
setImports(allDefs, imports, [
|
||||
...similarTypes.reduce<string[]>((all, t) => all.concat(t), []),
|
||||
nmap.value.toString()
|
||||
storageEntry.modifier.isOptional
|
||||
? 'Option'
|
||||
: null,
|
||||
defValue.lookupName
|
||||
? undefined
|
||||
: defValue.type
|
||||
]);
|
||||
|
||||
const keyTypes = similarTypes.map((t) => t.join(' | '));
|
||||
|
||||
return [
|
||||
nmap.keyVec.map((k) => formatType(registry, allDefs, k.toString(), imports)).join(', '),
|
||||
keyTypes.map((t, i) => `arg${i + 1}: ${t}`).join(', '),
|
||||
storageEntry.modifier.isOptional,
|
||||
keyDefs.map((k) => formatType(registry, allDefs, k.lookupName || k.type, imports)).join(', '),
|
||||
keyTypes.map((t, i) => `arg${keyTypes.length === 1 ? '' : (i + 1)}: ${t}`).join(', '),
|
||||
formatType(registry, allDefs, outputType, imports)
|
||||
];
|
||||
}
|
||||
@@ -93,19 +72,25 @@ const generateForMetaTemplate = Handlebars.compile(template);
|
||||
/** @internal */
|
||||
function generateForMeta (registry: Registry, meta: Metadata, dest: string, extraTypes: ExtraTypes, isStrict: boolean): void {
|
||||
writeFile(dest, (): string => {
|
||||
const allTypes: ExtraTypes = { '@polkadot/types/interfaces': defaultDefs, ...extraTypes };
|
||||
const allTypes: ExtraTypes = {
|
||||
'@polkadot/types/augment': { lookup: lookupDefinitions },
|
||||
'@polkadot/types/interfaces': defaultDefs,
|
||||
...extraTypes
|
||||
};
|
||||
const imports = createImports(allTypes);
|
||||
const allDefs = Object.entries(allTypes).reduce((defs, [path, obj]) => {
|
||||
return Object.entries(obj).reduce((defs, [key, value]) => ({ ...defs, [`${path}/${key}`]: value }), defs);
|
||||
}, {});
|
||||
|
||||
const modules = meta.asLatest.modules
|
||||
.sort(compareName)
|
||||
.filter((mod) => !mod.storage.isNone)
|
||||
const { lookup, pallets } = meta.asLatest;
|
||||
const modules = pallets
|
||||
.filter(({ storage }) => storage.isSome)
|
||||
.map(({ name, storage }) => {
|
||||
const items = storage.unwrap().items
|
||||
.map((storageEntry) => {
|
||||
const [args, params, returnType] = entrySignature(allDefs, registry, storageEntry, imports);
|
||||
const [isOptional, args, params, _returnType] = entrySignature(lookup, allDefs, registry, storageEntry, imports);
|
||||
const returnType = isOptional
|
||||
? `Option<${_returnType}>`
|
||||
: _returnType;
|
||||
|
||||
return {
|
||||
args,
|
||||
@@ -134,7 +119,7 @@ function generateForMeta (registry: Registry, meta: Metadata, dest: string, extr
|
||||
modules,
|
||||
types: [
|
||||
...Object.keys(imports.localTypes).sort().map((packagePath): { file: string; types: string[] } => ({
|
||||
file: packagePath,
|
||||
file: packagePath.replace('@polkadot/types/augment', '@polkadot/types'),
|
||||
types: Object.keys(imports.localTypes[packagePath])
|
||||
})),
|
||||
{
|
||||
|
||||
@@ -132,7 +132,7 @@ export function generateRpcTypes (registry: TypeRegistry, importDefinitions: Rec
|
||||
modules,
|
||||
types: [
|
||||
...Object.keys(imports.localTypes).sort().map((packagePath): { file: string; types: string[] } => ({
|
||||
file: packagePath,
|
||||
file: packagePath.replace('@polkadot/types/augment', '@polkadot/types'),
|
||||
types: Object.keys(imports.localTypes[packagePath])
|
||||
}))
|
||||
]
|
||||
|
||||
@@ -35,7 +35,7 @@ function errorUnhandled (_: Registry, definitions: Record<string, ModuleTypes>,
|
||||
|
||||
/** @internal */
|
||||
function tsExport (registry: Registry, definitions: Record<string, ModuleTypes>, def: TypeDef, imports: TypeImports): string {
|
||||
return exportInterface(def.name, formatType(registry, definitions, def, imports));
|
||||
return exportInterface(def.lookupIndex, def.name, formatType(registry, definitions, def, imports, false));
|
||||
}
|
||||
|
||||
const tsBTreeMap = tsExport;
|
||||
@@ -46,18 +46,19 @@ const tsHashMap = tsExport;
|
||||
const tsOption = tsExport;
|
||||
const tsPlain = tsExport;
|
||||
const tsTuple = tsExport;
|
||||
const tsWrapperOpaque = tsExport;
|
||||
|
||||
/** @internal */
|
||||
function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, { name: enumName, sub }: TypeDef, imports: TypeImports): string {
|
||||
function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, { lookupIndex, name: enumName, sub }: TypeDef, imports: TypeImports): string {
|
||||
setImports(definitions, imports, ['Enum']);
|
||||
|
||||
const keys = (sub as TypeDef[]).map((def, index): string => {
|
||||
const { info, name = `unknown${index}`, type } = def;
|
||||
const { info, lookupName, name = `unknown${index}`, type } = def;
|
||||
const getter = stringUpperFirst(stringCamelCase(name.replace(' ', '_')));
|
||||
const isComplex = [TypeDefInfo.Result, TypeDefInfo.Struct, TypeDefInfo.Tuple, TypeDefInfo.Vec, TypeDefInfo.VecFixed].includes(info);
|
||||
const asGetter = type === 'Null' || info === TypeDefInfo.DoNotConstruct
|
||||
? ''
|
||||
: createGetter(definitions, `as${getter}`, isComplex ? formatType(registry, definitions, info === TypeDefInfo.Struct ? def : type, imports) : type, imports);
|
||||
: createGetter(definitions, `as${getter}`, lookupName || (isComplex ? formatType(registry, definitions, info === TypeDefInfo.Struct ? def : type, imports, false) : type), imports);
|
||||
const isGetter = info === TypeDefInfo.DoNotConstruct
|
||||
? ''
|
||||
: createGetter(definitions, `is${getter}`, 'boolean', imports);
|
||||
@@ -66,47 +67,65 @@ function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, {
|
||||
case TypeDefInfo.Compact:
|
||||
case TypeDefInfo.Plain:
|
||||
case TypeDefInfo.Result:
|
||||
case TypeDefInfo.Si:
|
||||
case TypeDefInfo.Struct:
|
||||
case TypeDefInfo.Tuple:
|
||||
case TypeDefInfo.Vec:
|
||||
case TypeDefInfo.Option:
|
||||
case TypeDefInfo.VecFixed:
|
||||
case TypeDefInfo.WrapperOpaque:
|
||||
return `${isGetter}${asGetter}`;
|
||||
|
||||
case TypeDefInfo.DoNotConstruct:
|
||||
return '';
|
||||
case TypeDefInfo.Null:
|
||||
return `${isGetter}`;
|
||||
|
||||
default:
|
||||
throw new Error(`Enum: ${enumName || 'undefined'}: Unhandled nested "${TypeDefInfo[info]}" type`);
|
||||
throw new Error(`Enum: ${enumName || 'undefined'}: Unhandled type ${TypeDefInfo[info]}, ${stringify(def)}`);
|
||||
}
|
||||
});
|
||||
|
||||
return exportInterface(enumName, 'Enum', keys.join(''));
|
||||
return exportInterface(lookupIndex, enumName, 'Enum', keys.join(''));
|
||||
}
|
||||
|
||||
function tsInt (_: Registry, definitions: Record<string, ModuleTypes>, def: TypeDef, imports: TypeImports, type: 'Int' | 'UInt' = 'Int'): string {
|
||||
setImports(definitions, imports, [type]);
|
||||
|
||||
return exportInterface(def.name, type);
|
||||
return exportInterface(def.lookupIndex, def.name, type);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
function tsNull (registry: Registry, definitions: Record<string, ModuleTypes>, { lookupIndex = -1, name }: TypeDef, imports: TypeImports): string {
|
||||
setImports(definitions, imports, ['Null']);
|
||||
|
||||
// * @description extends [[${base}]]
|
||||
const doc = `/** @name ${name || ''}${lookupIndex !== -1 ? ` (${lookupIndex})` : ''} */\n`;
|
||||
|
||||
return `${doc}export type ${name || ''} = Null;`;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
function tsResultGetter (registry: Registry, definitions: Record<string, ModuleTypes>, resultName = '', getter: 'Ok' | 'Err' | 'Error', def: TypeDef, imports: TypeImports): string {
|
||||
const { info, type } = def;
|
||||
const { info, lookupName, type } = def;
|
||||
const asGetter = type === 'Null'
|
||||
? ''
|
||||
: (getter === 'Error' ? ' /** @deprecated Use asErr */\n' : '') + createGetter(definitions, `as${getter}`, info === TypeDefInfo.Tuple ? formatType(registry, definitions, def, imports) : type, imports);
|
||||
: (getter === 'Error' ? ' /** @deprecated Use asErr */\n' : '') + createGetter(definitions, `as${getter}`, lookupName || (info === TypeDefInfo.Tuple ? formatType(registry, definitions, def, imports, false) : type), imports);
|
||||
const isGetter = (getter === 'Error' ? ' /** @deprecated Use isErr */\n' : '') + createGetter(definitions, `is${getter}`, 'boolean', imports);
|
||||
|
||||
switch (info) {
|
||||
case TypeDefInfo.Option:
|
||||
case TypeDefInfo.Plain:
|
||||
case TypeDefInfo.Si:
|
||||
case TypeDefInfo.Tuple:
|
||||
case TypeDefInfo.Vec:
|
||||
case TypeDefInfo.Option:
|
||||
case TypeDefInfo.WrapperOpaque:
|
||||
return `${isGetter}${asGetter}`;
|
||||
|
||||
case TypeDefInfo.Null:
|
||||
return `${isGetter}`;
|
||||
|
||||
default:
|
||||
throw new Error(`Result: ${resultName}: Unhandled type ${TypeDefInfo[info]}`);
|
||||
throw new Error(`Result: ${resultName}: Unhandled type ${TypeDefInfo[info]}, ${stringify(def)}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,17 +141,22 @@ function tsResult (registry: Registry, definitions: Record<string, ModuleTypes>,
|
||||
|
||||
setImports(definitions, imports, [def.type]);
|
||||
|
||||
return exportInterface(def.name, formatType(registry, definitions, def, imports), inner);
|
||||
const fmtType = def.lookupName && def.name !== def.lookupName
|
||||
? def.lookupName
|
||||
: formatType(registry, definitions, def, imports, false);
|
||||
|
||||
return exportInterface(def.lookupIndex, def.name, fmtType, inner);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
function tsSi (registry: Registry, definitions: Record<string, ModuleTypes>, { type }: TypeDef, imports: TypeImports): string {
|
||||
throw new Error('Unable to generate string definition from TypeDefInfo.Si');
|
||||
function tsSi (registry: Registry, definitions: Record<string, ModuleTypes>, typeDef: TypeDef, imports: TypeImports): string {
|
||||
// FIXME
|
||||
return `// SI: ${JSON.stringify(typeDef)}`;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
function tsSet (_: Registry, definitions: Record<string, ModuleTypes>, { name: setName, sub }: TypeDef, imports: TypeImports): string {
|
||||
function tsSet (_: Registry, definitions: Record<string, ModuleTypes>, { lookupIndex, name: setName, sub }: TypeDef, imports: TypeImports): string {
|
||||
setImports(definitions, imports, ['Set']);
|
||||
|
||||
const types = (sub as TypeDef[]).map(({ name }): string => {
|
||||
@@ -141,20 +165,22 @@ function tsSet (_: Registry, definitions: Record<string, ModuleTypes>, { name: s
|
||||
return createGetter(definitions, `is${name}`, 'boolean', imports);
|
||||
});
|
||||
|
||||
return exportInterface(setName, 'Set', types.join(''));
|
||||
return exportInterface(lookupIndex, setName, 'Set', types.join(''));
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
function tsStruct (registry: Registry, definitions: Record<string, ModuleTypes>, { name: structName, sub }: TypeDef, imports: TypeImports): string {
|
||||
function tsStruct (registry: Registry, definitions: Record<string, ModuleTypes>, { lookupIndex, name: structName, sub }: TypeDef, imports: TypeImports): string {
|
||||
setImports(definitions, imports, ['Struct']);
|
||||
|
||||
const keys = (sub as TypeDef[]).map((typedef): string => {
|
||||
const returnType = formatType(registry, definitions, typedef, imports);
|
||||
const keys = (sub as TypeDef[]).map((def): string => {
|
||||
const fmtType = def.lookupName && def.name !== def.lookupName
|
||||
? def.lookupName
|
||||
: formatType(registry, definitions, def, imports, false);
|
||||
|
||||
return createGetter(definitions, typedef.name, returnType, imports);
|
||||
return createGetter(definitions, def.name, fmtType, imports);
|
||||
});
|
||||
|
||||
return exportInterface(structName, 'Struct', keys.join(''));
|
||||
return exportInterface(lookupIndex, structName, 'Struct', keys.join(''));
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
@@ -166,19 +192,29 @@ function tsUInt (registry: Registry, definitions: Record<string, ModuleTypes>, d
|
||||
function tsVec (registry: Registry, definitions: Record<string, ModuleTypes>, def: TypeDef, imports: TypeImports): string {
|
||||
const type = (def.sub as TypeDef).type;
|
||||
|
||||
if (def.info === TypeDefInfo.VecFixed && type === 'u8') {
|
||||
setImports(definitions, imports, ['U8aFixed']);
|
||||
if (type === 'u8') {
|
||||
if (def.info === TypeDefInfo.VecFixed) {
|
||||
setImports(definitions, imports, ['U8aFixed']);
|
||||
|
||||
return exportType(def.name, 'U8aFixed');
|
||||
return exportType(def.lookupIndex, def.name, 'U8aFixed');
|
||||
} else {
|
||||
setImports(definitions, imports, ['Bytes']);
|
||||
|
||||
return exportType(def.lookupIndex, def.name, 'Bytes');
|
||||
}
|
||||
}
|
||||
|
||||
return exportInterface(def.name, formatType(registry, definitions, def, imports));
|
||||
const fmtType = def.lookupName && def.name !== def.lookupName
|
||||
? def.lookupName
|
||||
: formatType(registry, definitions, def, imports, false);
|
||||
|
||||
return exportInterface(def.lookupIndex, def.name, fmtType);
|
||||
}
|
||||
|
||||
// handlers are defined externally to use - this means that when we do a
|
||||
// `generators[typedef.info](...)` TS will show any unhandled types. Rather
|
||||
// we are being explicit in having no handlers where we do not support (yet)
|
||||
const encoders: Record<TypeDefInfo, (registry: Registry, definitions: Record<string, ModuleTypes>, def: TypeDef, imports: TypeImports) => string> = {
|
||||
export const typeEncoders: Record<TypeDefInfo, (registry: Registry, definitions: Record<string, ModuleTypes>, def: TypeDef, imports: TypeImports) => string> = {
|
||||
[TypeDefInfo.BTreeMap]: tsBTreeMap,
|
||||
[TypeDefInfo.BTreeSet]: tsBTreeSet,
|
||||
[TypeDefInfo.Compact]: tsCompact,
|
||||
@@ -187,7 +223,7 @@ const encoders: Record<TypeDefInfo, (registry: Registry, definitions: Record<str
|
||||
[TypeDefInfo.HashMap]: tsHashMap,
|
||||
[TypeDefInfo.Int]: tsInt,
|
||||
[TypeDefInfo.Linkage]: errorUnhandled,
|
||||
[TypeDefInfo.Null]: errorUnhandled,
|
||||
[TypeDefInfo.Null]: tsNull,
|
||||
[TypeDefInfo.Option]: tsOption,
|
||||
[TypeDefInfo.Plain]: tsPlain,
|
||||
[TypeDefInfo.Range]: errorUnhandled,
|
||||
@@ -198,7 +234,8 @@ const encoders: Record<TypeDefInfo, (registry: Registry, definitions: Record<str
|
||||
[TypeDefInfo.Tuple]: tsTuple,
|
||||
[TypeDefInfo.UInt]: tsUInt,
|
||||
[TypeDefInfo.Vec]: tsVec,
|
||||
[TypeDefInfo.VecFixed]: tsVec
|
||||
[TypeDefInfo.VecFixed]: tsVec,
|
||||
[TypeDefInfo.WrapperOpaque]: tsWrapperOpaque
|
||||
};
|
||||
|
||||
/** @internal */
|
||||
@@ -206,7 +243,7 @@ function generateInterfaces (registry: Registry, definitions: Record<string, Mod
|
||||
return Object.entries(types).map(([name, type]): [string, string] => {
|
||||
const def = getTypeDef(isString(type) ? type : stringify(type), { name });
|
||||
|
||||
return [name, encoders[def.info](registry, definitions, def, imports)];
|
||||
return [name, typeEncoders[def.info](registry, definitions, def, imports)];
|
||||
});
|
||||
}
|
||||
|
||||
@@ -220,25 +257,23 @@ const templateTypes = readTemplate('tsDef/types');
|
||||
const generateTsDefTypesTemplate = Handlebars.compile(templateTypes);
|
||||
|
||||
/** @internal */
|
||||
function generateTsDefFor (registry: Registry, importDefinitions: { [importPath: string]: Record<string, ModuleTypes> }, defName: string, { types }: { types: Record<string, any> }, outputDir: string): void {
|
||||
export function generateTsDefFor (registry: Registry, importDefinitions: { [importPath: string]: Record<string, ModuleTypes> }, defName: string, { types }: { types: Record<string, any> }, outputDir: string): void {
|
||||
const imports = { ...createImports(importDefinitions, { types }), interfaces: [] } as Imports;
|
||||
const definitions = imports.definitions;
|
||||
const interfaces = generateInterfaces(registry, definitions, { types }, imports);
|
||||
const items = interfaces.sort((a, b): number => a[0].localeCompare(b[0])).map(([, definition]): string => definition);
|
||||
|
||||
const importTypes = [
|
||||
...Object.keys(imports.localTypes).sort().map((packagePath): { file: string; types: string[] } => ({
|
||||
file: packagePath,
|
||||
types: Object.keys(imports.localTypes[packagePath])
|
||||
}))
|
||||
];
|
||||
const items = interfaces.sort((a, b) => a[0].localeCompare(b[0])).map(([, definition]) => definition);
|
||||
|
||||
writeFile(path.join(outputDir, defName, 'types.ts'), () => generateTsDefModuleTypesTemplate({
|
||||
headerType: 'defs',
|
||||
imports,
|
||||
items,
|
||||
name: defName,
|
||||
types: importTypes
|
||||
types: [
|
||||
...Object.keys(imports.localTypes).sort().map((packagePath): { file: string; types: string[] } => ({
|
||||
file: packagePath.replace('@polkadot/types/augment', '@polkadot/types'),
|
||||
types: Object.keys(imports.localTypes[packagePath])
|
||||
}))
|
||||
]
|
||||
}), true);
|
||||
writeFile(path.join(outputDir, defName, 'index.ts'), () => generateTsDefIndexTemplate({ headerType: 'defs' }), true);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import type { ExtraTypes } from './types';
|
||||
|
||||
import Handlebars from 'handlebars';
|
||||
|
||||
import lookupDefinitions from '@polkadot/types/augment/lookup/definitions';
|
||||
import * as defaultDefs from '@polkadot/types/interfaces/definitions';
|
||||
import { Text } from '@polkadot/types/primitive';
|
||||
import { stringCamelCase } from '@polkadot/util';
|
||||
@@ -30,32 +31,54 @@ const generateForMetaTemplate = Handlebars.compile(template);
|
||||
/** @internal */
|
||||
function generateForMeta (registry: Registry, meta: Metadata, dest: string, extraTypes: ExtraTypes, isStrict: boolean): void {
|
||||
writeFile(dest, (): string => {
|
||||
const allTypes: ExtraTypes = { '@polkadot/types/interfaces': defaultDefs, ...extraTypes };
|
||||
const allTypes: ExtraTypes = {
|
||||
'@polkadot/types/augment': { lookup: lookupDefinitions },
|
||||
'@polkadot/types/interfaces': defaultDefs,
|
||||
...extraTypes
|
||||
};
|
||||
const imports = createImports(allTypes);
|
||||
const allDefs = Object.entries(allTypes).reduce((defs, [path, obj]) => {
|
||||
return Object.entries(obj).reduce((defs, [key, value]) => ({ ...defs, [`${path}/${key}`]: value }), defs);
|
||||
}, {});
|
||||
|
||||
const modules = meta.asLatest.modules
|
||||
.filter(({ calls }) => calls.unwrapOr([]).length !== 0)
|
||||
const { lookup, pallets } = meta.asLatest;
|
||||
const modules = pallets
|
||||
.sort(compareName)
|
||||
.filter(({ calls }) => calls.isSome)
|
||||
.map(({ calls, name }) => {
|
||||
setImports(allDefs, imports, ['Call', 'Extrinsic', 'SubmittableExtrinsic']);
|
||||
|
||||
const items = calls.unwrap()
|
||||
.map(({ args, docs, name }) => {
|
||||
const params = args
|
||||
.map(({ name, type }) => {
|
||||
const typeStr = type.toString();
|
||||
const sectionName = stringCamelCase(name);
|
||||
const items = lookup.getSiType(calls.unwrap().type).def.asVariant.variants
|
||||
.map(({ docs, fields, name }) => {
|
||||
const typesInfo = fields.map(({ name, type, typeName }, index): [string, string, string] => {
|
||||
const typeDef = registry.lookup.getTypeDef(type);
|
||||
|
||||
return [
|
||||
name.isSome
|
||||
? mapName(name.unwrap())
|
||||
: `param${index}`,
|
||||
typeName.isSome
|
||||
? typeName.toString()
|
||||
: typeDef.type,
|
||||
typeDef.isFromSi
|
||||
? typeDef.type
|
||||
: typeDef.lookupName || typeDef.type
|
||||
];
|
||||
});
|
||||
const params = typesInfo
|
||||
.map(([name,, typeStr]) => {
|
||||
const similarTypes = getSimilarTypes(registry, allDefs, typeStr, imports);
|
||||
|
||||
setImports(allDefs, imports, [typeStr, ...similarTypes]);
|
||||
|
||||
return `${mapName(name)}: ${similarTypes.join(' | ')}`;
|
||||
return `${name}: ${similarTypes.join(' | ')}`;
|
||||
})
|
||||
.join(', ');
|
||||
|
||||
return {
|
||||
args: args.map(({ type }) => formatType(registry, allDefs, type.toString(), imports)).join(', '),
|
||||
args: typesInfo.map(([,, typeStr]) =>
|
||||
formatType(registry, allDefs, typeStr, imports)
|
||||
).join(', '),
|
||||
docs,
|
||||
name: stringCamelCase(name),
|
||||
params
|
||||
@@ -65,7 +88,7 @@ function generateForMeta (registry: Registry, meta: Metadata, dest: string, extr
|
||||
|
||||
return {
|
||||
items,
|
||||
name: stringCamelCase(name)
|
||||
name: sectionName
|
||||
};
|
||||
})
|
||||
.sort(compareName);
|
||||
@@ -77,7 +100,7 @@ function generateForMeta (registry: Registry, meta: Metadata, dest: string, extr
|
||||
modules,
|
||||
types: [
|
||||
...Object.keys(imports.localTypes).sort().map((packagePath): { file: string; types: string[] } => ({
|
||||
file: packagePath,
|
||||
file: packagePath.replace('@polkadot/types/augment', '@polkadot/types'),
|
||||
types: Object.keys(imports.localTypes[packagePath])
|
||||
})),
|
||||
{
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
// Copyright 2017-2021 @polkadot/typegen authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { generateDefaultConsts, generateDefaultErrors, generateDefaultEvents, generateDefaultInterface, generateDefaultQuery, generateDefaultRpc, generateDefaultTsDef, generateDefaultTx } from './generate';
|
||||
import { generateDefaultConsts, generateDefaultErrors, generateDefaultEvents, generateDefaultInterface, generateDefaultLookup, generateDefaultQuery, generateDefaultRpc, generateDefaultTsDef, generateDefaultTx } from './generate';
|
||||
|
||||
export function main (): void {
|
||||
generateDefaultLookup();
|
||||
generateDefaultInterface();
|
||||
|
||||
generateDefaultConsts();
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// Copyright 2017-2021 @polkadot/typegen authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { MetadataLatest } from '@polkadot/types/interfaces/metadata';
|
||||
import type { MetadataLatest, PortableRegistry, SiLookupTypeId } from '@polkadot/types/interfaces';
|
||||
import type { Codec, DefinitionRpcParam } from '@polkadot/types/types';
|
||||
|
||||
import fs from 'fs';
|
||||
|
||||
import { GenericCall as Call, Metadata, TypeRegistry, Vec } from '@polkadot/types';
|
||||
import { Metadata, TypeRegistry, Vec } from '@polkadot/types';
|
||||
import * as definitions from '@polkadot/types/interfaces/definitions';
|
||||
import { getStorage as getSubstrateStorage } from '@polkadot/types/metadata/decorate/storage/getStorage';
|
||||
import { Text } from '@polkadot/types/primitive';
|
||||
@@ -45,9 +45,15 @@ const DESC_STORAGE = `The following sections contain Storage methods are part of
|
||||
/** @internal */
|
||||
function docsVecToMarkdown (docLines: Vec<Text>, indent = 0): string {
|
||||
const md = docLines
|
||||
.map((docLine) => docLine && docLine.substring(1)) // trim the leading space
|
||||
.reduce((md, docLine): string => // generate paragraphs
|
||||
!docLine.trim().length
|
||||
.map((docLine) =>
|
||||
docLine
|
||||
.toString()
|
||||
.trimStart()
|
||||
.replace(/^r"/g, '')
|
||||
.trimStart()
|
||||
)
|
||||
.reduce((md, docLine) => // generate paragraphs
|
||||
!docLine.length
|
||||
? `${md}\n\n` // empty line
|
||||
: /^[*-]/.test(docLine.trimStart()) && !md.endsWith('\n\n')
|
||||
? `${md}\n\n${docLine}` // line calling for a preceding linebreak
|
||||
@@ -112,6 +118,12 @@ function sortByName<T extends { name: Codec | string }> (a: T, b: T): number {
|
||||
return a.name.toString().toUpperCase().localeCompare(b.name.toString().toUpperCase());
|
||||
}
|
||||
|
||||
function getSiName (lookup: PortableRegistry, type: SiLookupTypeId): string {
|
||||
const typeDef = lookup.getTypeDef(type);
|
||||
|
||||
return typeDef.lookupName || typeDef.type;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
function addRpc (): string {
|
||||
const sections = Object
|
||||
@@ -162,25 +174,25 @@ function addRpc (): string {
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
function addConstants (metadata: MetadataLatest): string {
|
||||
function addConstants ({ lookup, pallets }: MetadataLatest): string {
|
||||
return renderPage({
|
||||
description: DESC_CONSTANTS,
|
||||
sections: metadata.modules
|
||||
sections: pallets
|
||||
.sort(sortByName)
|
||||
.filter((moduleMetadata) => !moduleMetadata.constants.isEmpty)
|
||||
.map((moduleMetadata) => {
|
||||
const sectionName = stringLowerFirst(moduleMetadata.name);
|
||||
.filter(({ constants }) => !constants.isEmpty)
|
||||
.map(({ constants, name }) => {
|
||||
const sectionName = stringLowerFirst(name);
|
||||
|
||||
return {
|
||||
items: moduleMetadata.constants
|
||||
items: constants
|
||||
.sort(sortByName)
|
||||
.map((func) => {
|
||||
const methodName = stringCamelCase(func.name);
|
||||
.map(({ docs, name, type }) => {
|
||||
const methodName = stringCamelCase(name);
|
||||
|
||||
return {
|
||||
interface: '`' + `api.consts.${sectionName}.${methodName}` + '`',
|
||||
name: `${methodName}: ` + '`' + func.type.toString() + '`',
|
||||
...(func.docs.length && { summary: func.docs })
|
||||
name: `${methodName}: ` + '`' + getSiName(lookup, type) + '`',
|
||||
...(docs.length && { summary: docs })
|
||||
};
|
||||
}),
|
||||
name: sectionName
|
||||
@@ -191,9 +203,9 @@ function addConstants (metadata: MetadataLatest): string {
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
function addStorage (metadata: MetadataLatest): string {
|
||||
const { substrate } = getSubstrateStorage(metadata.registry);
|
||||
const moduleSections = metadata.modules
|
||||
function addStorage ({ lookup, pallets, registry }: MetadataLatest): string {
|
||||
const { substrate } = getSubstrateStorage(registry);
|
||||
const moduleSections = pallets
|
||||
.sort(sortByName)
|
||||
.filter((moduleMetadata) => !moduleMetadata.storage.isNone)
|
||||
.map((moduleMetadata): Section => {
|
||||
@@ -203,15 +215,20 @@ function addStorage (metadata: MetadataLatest): string {
|
||||
items: moduleMetadata.storage.unwrap().items
|
||||
.sort(sortByName)
|
||||
.map((func) => {
|
||||
const arg = func.type.isMap
|
||||
? ('`' + func.type.asMap.key.toString() + '`')
|
||||
: func.type.isDoubleMap
|
||||
? ('`' + func.type.asDoubleMap.key1.toString() + ', ' + func.type.asDoubleMap.key2.toString() + '`')
|
||||
: func.type.isNMap
|
||||
? ('`' + func.type.asNMap.keyVec.map((k) => k.toString()).join(', ') + '`')
|
||||
: '';
|
||||
let arg = '';
|
||||
|
||||
if (func.type.isMap) {
|
||||
const { hashers, key } = func.type.asMap;
|
||||
|
||||
arg = '`' + (
|
||||
hashers.length === 1
|
||||
? getSiName(lookup, key)
|
||||
: lookup.getSiType(key).def.asTuple.map((t) => getSiName(lookup, t)).join(', ')
|
||||
) + '`';
|
||||
}
|
||||
|
||||
const methodName = stringLowerFirst(func.name);
|
||||
const outputType = unwrapStorageType(metadata.registry, func.type, func.modifier.isOptional);
|
||||
const outputType = unwrapStorageType(registry, func.type, func.modifier.isOptional);
|
||||
|
||||
return {
|
||||
interface: '`' + `api.query.${sectionName}.${methodName}` + '`',
|
||||
@@ -229,12 +246,10 @@ function addStorage (metadata: MetadataLatest): string {
|
||||
description: 'These are well-known keys that are always available to the runtime implementation of any Substrate-based network.',
|
||||
items: Object.entries(substrate).map(([name, { meta }]) => {
|
||||
const arg = meta.type.isMap
|
||||
? ('`' + meta.type.asMap.key.toString() + '`')
|
||||
: meta.type.isDoubleMap
|
||||
? ('`' + meta.type.asDoubleMap.key1.toString() + ', ' + meta.type.asDoubleMap.key2.toString() + '`')
|
||||
: '';
|
||||
? ('`' + getSiName(lookup, meta.type.asMap.key) + '`')
|
||||
: '';
|
||||
const methodName = stringLowerFirst(name);
|
||||
const outputType = unwrapStorageType(metadata.registry, meta.type, meta.modifier.isOptional);
|
||||
const outputType = unwrapStorageType(registry, meta.type, meta.modifier.isOptional);
|
||||
|
||||
return {
|
||||
interface: '`' + `api.query.substrate.${methodName}` + '`',
|
||||
@@ -249,26 +264,28 @@ function addStorage (metadata: MetadataLatest): string {
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
function addExtrinsics (metadata: MetadataLatest): string {
|
||||
function addExtrinsics ({ lookup, pallets }: MetadataLatest): string {
|
||||
return renderPage({
|
||||
description: DESC_EXTRINSICS,
|
||||
sections: metadata.modules
|
||||
sections: pallets
|
||||
.sort(sortByName)
|
||||
.filter((meta) => !meta.calls.isNone && meta.calls.unwrap().length !== 0)
|
||||
.map((meta) => {
|
||||
const sectionName = stringCamelCase(meta.name);
|
||||
.filter(({ calls }) => calls.isSome)
|
||||
.map(({ calls, name }) => {
|
||||
const sectionName = stringCamelCase(name);
|
||||
|
||||
return {
|
||||
items: meta.calls.unwrap()
|
||||
items: lookup.getSiType(calls.unwrap().type).def.asVariant.variants
|
||||
.sort(sortByName)
|
||||
.map((func) => {
|
||||
const methodName = stringCamelCase(func.name);
|
||||
const args = Call.filterOrigin(func).map(({ name, type }) => `${name.toString()}: ` + '`' + type.toString() + '`').join(', ');
|
||||
.map(({ docs, fields, name }, index) => {
|
||||
const methodName = stringCamelCase(name);
|
||||
const args = fields.map(({ name, type }) =>
|
||||
`${name.isSome ? name.toString() : `param${index}`}: ` + '`' + getSiName(lookup, type) + '`'
|
||||
).join(', ');
|
||||
|
||||
return {
|
||||
interface: '`' + `api.tx.${sectionName}.${methodName}` + '`',
|
||||
name: `${methodName}(${args})`,
|
||||
...(func.docs.length && { summary: func.docs })
|
||||
...(docs.length && { summary: docs })
|
||||
};
|
||||
}),
|
||||
name: sectionName
|
||||
@@ -279,23 +296,25 @@ function addExtrinsics (metadata: MetadataLatest): string {
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
function addEvents (metadata: MetadataLatest): string {
|
||||
function addEvents ({ lookup, pallets }: MetadataLatest): string {
|
||||
return renderPage({
|
||||
description: DESC_EVENTS,
|
||||
sections: metadata.modules
|
||||
sections: pallets
|
||||
.sort(sortByName)
|
||||
.filter((meta) => !meta.events.isNone && meta.events.unwrap().length !== 0)
|
||||
.filter(({ events }) => events.isSome)
|
||||
.map((meta) => ({
|
||||
items: meta.events.unwrap()
|
||||
items: lookup.getSiType(meta.events.unwrap().type).def.asVariant.variants
|
||||
.sort(sortByName)
|
||||
.map((func) => {
|
||||
const methodName = func.name.toString();
|
||||
const args = func.args.map((type): string => '`' + type.toString() + '`').join(', ');
|
||||
.map(({ docs, fields, name }) => {
|
||||
const methodName = name.toString();
|
||||
const args = fields.map(({ type }) =>
|
||||
'`' + getSiName(lookup, type) + '`'
|
||||
).join(', ');
|
||||
|
||||
return {
|
||||
interface: '`' + `api.events.${stringCamelCase(meta.name)}.${methodName}.is` + '`',
|
||||
name: `${methodName}(${args})`,
|
||||
...(func.docs.length && { summary: func.docs })
|
||||
...(docs.length && { summary: docs })
|
||||
};
|
||||
}),
|
||||
name: stringCamelCase(meta.name)
|
||||
@@ -305,14 +324,14 @@ function addEvents (metadata: MetadataLatest): string {
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
function addErrors (metadata: MetadataLatest): string {
|
||||
function addErrors ({ lookup, pallets }: MetadataLatest): string {
|
||||
return renderPage({
|
||||
description: DESC_ERRORS,
|
||||
sections: metadata.modules
|
||||
sections: pallets
|
||||
.sort(sortByName)
|
||||
.filter((moduleMetadata) => !moduleMetadata.errors.isEmpty)
|
||||
.filter(({ errors }) => errors.isSome)
|
||||
.map((moduleMetadata) => ({
|
||||
items: moduleMetadata.errors
|
||||
items: lookup.getSiType(moduleMetadata.errors.unwrap().type).def.asVariant.variants
|
||||
.sort(sortByName)
|
||||
.map((error) => ({
|
||||
interface: '`' + `api.errors.${stringCamelCase(moduleMetadata.name)}.${error.name.toString()}.is` + '`',
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/typegen', version: '5.8.1' };
|
||||
export const packageInfo = { name: '@polkadot/typegen', version: '6.1.2' };
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{{> header }}
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import type { DefinitionsTypes } from '../../types';
|
||||
|
||||
export default {
|
||||
{{#each defs}}
|
||||
{{> docs}}
|
||||
{{#each defs}}
|
||||
{{{this}}}
|
||||
{{/each}}
|
||||
{{/each}}
|
||||
} as DefinitionsTypes;
|
||||
{{> footer }}
|
||||
@@ -0,0 +1,18 @@
|
||||
{{> header }}
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import type { Definitions } from '../../types';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
{{#each defs}}
|
||||
{{> docs}}
|
||||
{{#each defs}}
|
||||
{{{this}}}
|
||||
{{/each}}
|
||||
{{/each}}
|
||||
}
|
||||
} as Definitions;
|
||||
{{> footer }}
|
||||
@@ -0,0 +1,4 @@
|
||||
{{> header }}
|
||||
|
||||
export * from './types';
|
||||
{{> footer }}
|
||||
@@ -0,0 +1,12 @@
|
||||
{{> header }}
|
||||
|
||||
{{{ imports }}}
|
||||
|
||||
declare module '@polkadot/types/lookup' {
|
||||
|
||||
{{#each items}}
|
||||
{{{this}}}
|
||||
|
||||
{{/each}}
|
||||
}
|
||||
{{> footer }}
|
||||
@@ -55,7 +55,7 @@ Handlebars.registerHelper({
|
||||
...types
|
||||
];
|
||||
|
||||
return defs.reduce((result, { file, types }): string => {
|
||||
return [...defs].sort((a, b) => a.file.localeCompare(b.file)).reduce((result, { file, types }): string => {
|
||||
return types.length
|
||||
? `${result}import type { ${types.sort().join(', ')} } from '${file}';\n`
|
||||
: result;
|
||||
@@ -71,9 +71,9 @@ Handlebars.registerHelper({
|
||||
|
||||
// helper to generate a `export interface <Name> extends <Base> {<Body>}
|
||||
/** @internal */
|
||||
export function exportInterface (name = '', base: string, body = ''): string {
|
||||
export function exportInterface (lookupIndex = -1, name = '', base: string, body = ''): string {
|
||||
// * @description extends [[${base}]]
|
||||
const doc = `/** @name ${name} */\n`;
|
||||
const doc = `/** @name ${name}${lookupIndex !== -1 ? ` (${lookupIndex})` : ''} */\n`;
|
||||
|
||||
return `${doc}export interface ${name} extends ${base} {${body.length ? '\n' : ''}${body}}`;
|
||||
}
|
||||
@@ -82,23 +82,40 @@ export function exportInterface (name = '', base: string, body = ''): string {
|
||||
// but since we don't want type alias (TS doesn't preserve names) we use
|
||||
// interface here.
|
||||
/** @internal */
|
||||
export function exportType (name = '', base: string): string {
|
||||
return exportInterface(name, base);
|
||||
export function exportType (lookupIndex = -1, name = '', base: string): string {
|
||||
return exportInterface(lookupIndex, name, base);
|
||||
}
|
||||
|
||||
function singleParamNotation (registry: Registry, wrapper: string, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean): string {
|
||||
const sub = (typeDef.sub as TypeDef);
|
||||
|
||||
setImports(definitions, imports, [wrapper, sub.lookupName]);
|
||||
|
||||
return paramsNotation(wrapper, sub.lookupName || formatType(registry, definitions, sub.type, imports, withShortcut));
|
||||
}
|
||||
|
||||
function dualParamsNotation (registry: Registry, wrapper: string, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean): string {
|
||||
const [a, b] = (typeDef.sub as TypeDef[]);
|
||||
|
||||
setImports(definitions, imports, [wrapper, a.lookupName, b.lookupName]);
|
||||
|
||||
return paramsNotation(wrapper, [
|
||||
a.lookupName || formatType(registry, definitions, a.type, imports, withShortcut),
|
||||
b.lookupName || formatType(registry, definitions, b.type, imports, withShortcut)
|
||||
]);
|
||||
}
|
||||
|
||||
const formatters: Record<TypeDefInfo, (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => string> = {
|
||||
[TypeDefInfo.Compact]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||
setImports(definitions, imports, ['Compact']);
|
||||
|
||||
const sub = typeDef.sub as TypeDef;
|
||||
|
||||
return paramsNotation('Compact', formatType(registry, definitions, sub.lookupName || sub.type, imports, withShortcut));
|
||||
return singleParamNotation(registry, 'Compact', typeDef, definitions, imports, withShortcut);
|
||||
},
|
||||
[TypeDefInfo.DoNotConstruct]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||
|
||||
[TypeDefInfo.DoNotConstruct]: (registry: Registry, { lookupName }: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||
setImports(definitions, imports, ['DoNotConstruct']);
|
||||
|
||||
return 'DoNotConstruct';
|
||||
},
|
||||
|
||||
[TypeDefInfo.Enum]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||
if (typeDef.lookupName) {
|
||||
return typeDef.lookupName;
|
||||
@@ -106,65 +123,77 @@ const formatters: Record<TypeDefInfo, (registry: Registry, typeDef: TypeDef, def
|
||||
|
||||
throw new Error(`TypeDefInfo.Enum: Not implemented on ${stringify(typeDef)}`);
|
||||
},
|
||||
|
||||
[TypeDefInfo.Int]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||
throw new Error(`TypeDefInfo.Int: Not implemented on ${stringify(typeDef)}`);
|
||||
},
|
||||
|
||||
[TypeDefInfo.UInt]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||
throw new Error(`TypeDefInfo.UInt: Not implemented on ${stringify(typeDef)}`);
|
||||
},
|
||||
|
||||
[TypeDefInfo.Null]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||
setImports(definitions, imports, ['Null']);
|
||||
|
||||
return 'Null';
|
||||
},
|
||||
|
||||
[TypeDefInfo.Option]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||
setImports(definitions, imports, ['Option']);
|
||||
|
||||
const sub = (typeDef.sub as TypeDef);
|
||||
|
||||
return paramsNotation('Option', formatType(registry, definitions, sub.lookupName || sub.type, imports, withShortcut));
|
||||
return singleParamNotation(registry, 'Option', typeDef, definitions, imports, withShortcut);
|
||||
},
|
||||
|
||||
[TypeDefInfo.Plain]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||
setImports(definitions, imports, [typeDef.type]);
|
||||
|
||||
return typeDef.type;
|
||||
},
|
||||
|
||||
[TypeDefInfo.Range]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||
throw new Error(`TypeDefInfo.Range: Not implemented on ${stringify(typeDef)}`);
|
||||
},
|
||||
|
||||
[TypeDefInfo.Set]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||
throw new Error(`TypeDefInfo.Set: Not implemented on ${stringify(typeDef)}`);
|
||||
},
|
||||
|
||||
[TypeDefInfo.Si]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||
return formatType(registry, definitions, registry.lookup.getTypeDef(typeDef.type), imports, withShortcut);
|
||||
},
|
||||
|
||||
[TypeDefInfo.Struct]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||
setImports(definitions, imports, ['Struct']);
|
||||
if (typeDef.lookupName) {
|
||||
return typeDef.lookupName;
|
||||
}
|
||||
|
||||
const sub = typeDef.sub as TypeDef[];
|
||||
|
||||
setImports(definitions, imports, ['Struct', ...sub.map(({ lookupName }) => lookupName)]);
|
||||
|
||||
return `{${withShortcut ? ' ' : '\n'}${
|
||||
((typeDef.sub as TypeDef[]).map(({ lookupName, name, type }, index) => [
|
||||
sub.map(({ lookupName, name, type }, index) => [
|
||||
name || `unknown${index}`,
|
||||
formatType(registry, definitions, lookupName || type, imports, withShortcut)
|
||||
])).map(([k, t]) => `${withShortcut ? '' : ' readonly '}${k}: ${t};`).join(withShortcut ? ' ' : '\n')
|
||||
lookupName || formatType(registry, definitions, type, imports, withShortcut)
|
||||
]).map(([k, t]) => `${withShortcut ? '' : ' readonly '}${k}: ${t};`).join(withShortcut ? ' ' : '\n')
|
||||
}${withShortcut ? ' ' : '\n '}} & Struct`;
|
||||
},
|
||||
|
||||
[TypeDefInfo.Tuple]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||
setImports(definitions, imports, ['ITuple']);
|
||||
const sub = typeDef.sub as TypeDef[];
|
||||
|
||||
setImports(definitions, imports, ['ITuple', ...sub.map(({ lookupName }) => lookupName)]);
|
||||
|
||||
// `(a,b)` gets transformed into `ITuple<[a, b]>`
|
||||
return paramsNotation('ITuple', `[${
|
||||
((typeDef.sub as TypeDef[]).map(({ lookupName, type }) =>
|
||||
formatType(registry, definitions, lookupName || type, imports, withShortcut)
|
||||
)).join(', ')
|
||||
sub.map(({ lookupName, type }) =>
|
||||
lookupName || formatType(registry, definitions, type, imports, withShortcut)
|
||||
).join(', ')
|
||||
}]`);
|
||||
},
|
||||
|
||||
[TypeDefInfo.Vec]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||
setImports(definitions, imports, ['Vec']);
|
||||
|
||||
const sub = (typeDef.sub as TypeDef);
|
||||
|
||||
return paramsNotation('Vec', formatType(registry, definitions, sub.lookupName || sub.type, imports, withShortcut));
|
||||
return singleParamNotation(registry, 'Vec', typeDef, definitions, imports, withShortcut);
|
||||
},
|
||||
|
||||
[TypeDefInfo.VecFixed]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||
const sub = (typeDef.sub as TypeDef);
|
||||
|
||||
@@ -174,44 +203,31 @@ const formatters: Record<TypeDefInfo, (registry: Registry, typeDef: TypeDef, def
|
||||
return 'U8aFixed';
|
||||
}
|
||||
|
||||
setImports(definitions, imports, ['Vec']);
|
||||
|
||||
return paramsNotation('Vec', formatType(registry, definitions, sub.lookupName || sub.type, imports, withShortcut));
|
||||
return singleParamNotation(registry, 'Vec', typeDef, definitions, imports, withShortcut);
|
||||
},
|
||||
|
||||
[TypeDefInfo.BTreeMap]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||
setImports(definitions, imports, ['BTreeMap']);
|
||||
|
||||
const [keyDef, valDef] = (typeDef.sub as TypeDef[]);
|
||||
|
||||
return `BTreeMap<${formatType(registry, definitions, keyDef.lookupName || keyDef.type, imports, withShortcut)}, ${formatType(registry, definitions, valDef.lookupName || valDef.type, imports, withShortcut)}>`;
|
||||
return dualParamsNotation(registry, 'BTreeMap', typeDef, definitions, imports, withShortcut);
|
||||
},
|
||||
|
||||
[TypeDefInfo.BTreeSet]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||
setImports(definitions, imports, ['BTreeSet']);
|
||||
|
||||
const valDef = typeDef.sub as TypeDef;
|
||||
|
||||
return `BTreeSet<${formatType(registry, definitions, valDef.lookupName || valDef.type, imports, withShortcut)}>`;
|
||||
return singleParamNotation(registry, 'BTreeSet', typeDef, definitions, imports, withShortcut);
|
||||
},
|
||||
|
||||
[TypeDefInfo.HashMap]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||
setImports(definitions, imports, ['HashMap']);
|
||||
|
||||
const [keyDef, valDef] = (typeDef.sub as TypeDef[]);
|
||||
|
||||
return `HashMap<${formatType(registry, definitions, keyDef.lookupName || keyDef.type, imports, withShortcut)}, ${formatType(registry, definitions, valDef.lookupName || valDef.type, imports, withShortcut)}>`;
|
||||
return dualParamsNotation(registry, 'HashMap', typeDef, definitions, imports, withShortcut);
|
||||
},
|
||||
|
||||
[TypeDefInfo.Linkage]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||
setImports(definitions, imports, ['Linkage']);
|
||||
|
||||
const sub = (typeDef.sub as TypeDef);
|
||||
|
||||
return paramsNotation('Linkage', formatType(registry, definitions, sub.lookupName || sub.type, imports, withShortcut));
|
||||
return singleParamNotation(registry, 'Linkage', typeDef, definitions, imports, withShortcut);
|
||||
},
|
||||
|
||||
[TypeDefInfo.Result]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||
setImports(definitions, imports, ['Result']);
|
||||
return dualParamsNotation(registry, 'Result', typeDef, definitions, imports, withShortcut);
|
||||
},
|
||||
|
||||
const [okDef, errDef] = (typeDef.sub as TypeDef[]);
|
||||
|
||||
return `Result<${formatType(registry, definitions, okDef.lookupName || okDef.type, imports, withShortcut)}, ${formatType(registry, definitions, errDef.lookupName || errDef.type, imports, withShortcut)}>`;
|
||||
[TypeDefInfo.WrapperOpaque]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
|
||||
return singleParamNotation(registry, 'WrapperOpaque', typeDef, definitions, imports, withShortcut);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -237,7 +253,7 @@ export function formatType (registry: Registry, definitions: Record<string, Modu
|
||||
typeDef = type;
|
||||
}
|
||||
|
||||
setImports(definitions, imports, [typeDef.type]);
|
||||
setImports(definitions, imports, [typeDef.lookupName || typeDef.type]);
|
||||
|
||||
return formatters[typeDef.info](registry, typeDef, definitions, imports, withShortcut);
|
||||
}
|
||||
|
||||
@@ -36,10 +36,10 @@ export interface TypeImports {
|
||||
// Maps the types as found to the source location. This is used to generate the
|
||||
// imports in the output file, dep-duped and sorted
|
||||
/** @internal */
|
||||
export function setImports (allDefs: Record<string, ModuleTypes>, imports: TypeImports, types: string[]): void {
|
||||
export function setImports (allDefs: Record<string, ModuleTypes>, imports: TypeImports, types: (string | null | undefined)[]): void {
|
||||
const { codecTypes, extrinsicTypes, genericTypes, ignoredTypes, localTypes, metadataTypes, primitiveTypes, typesTypes } = imports;
|
||||
|
||||
types.forEach((type): void => {
|
||||
types.filter((t): t is string => !!t).forEach((type): void => {
|
||||
if (ignoredTypes.includes(type)) {
|
||||
// do nothing
|
||||
} else if (['AnyNumber', 'CallFunction', 'Codec', 'IExtrinsic', 'ITuple'].includes(type)) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import type { ExtraTypes } from '../generate/types';
|
||||
|
||||
import { Metadata, TypeRegistry } from '@polkadot/types';
|
||||
import staticData from '@polkadot/types-support/metadata/static-substrate';
|
||||
import staticSubstrate from '@polkadot/types-support/metadata/static-substrate';
|
||||
|
||||
import { registerDefinitions } from './register';
|
||||
|
||||
@@ -13,12 +13,12 @@ interface Result {
|
||||
registry: TypeRegistry;
|
||||
}
|
||||
|
||||
export function initMeta (data = staticData, extraTypes: ExtraTypes = {}): Result {
|
||||
export function initMeta (staticMeta = staticSubstrate, extraTypes: ExtraTypes = {}): Result {
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
registerDefinitions(registry, extraTypes);
|
||||
|
||||
const metadata = new Metadata(registry, data);
|
||||
const metadata = new Metadata(registry, staticMeta);
|
||||
|
||||
registry.setMetadata(metadata);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/types-known",
|
||||
"version": "5.8.1",
|
||||
"version": "6.1.2",
|
||||
"type": "module",
|
||||
"description": "Known type definitions",
|
||||
"main": "index.js",
|
||||
@@ -20,8 +20,8 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-known#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.15.4",
|
||||
"@polkadot/networks": "^7.3.1",
|
||||
"@polkadot/types": "5.8.1",
|
||||
"@polkadot/util": "^7.3.1"
|
||||
"@polkadot/networks": "^7.4.1",
|
||||
"@polkadot/types": "6.1.2",
|
||||
"@polkadot/util": "^7.4.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import type { Hash } from '@polkadot/types/interfaces';
|
||||
import type { ChainUpgradeVersion, CodecHasher, DefinitionRpc, DefinitionRpcSub, OverrideModuleType, OverrideVersionedType, Registry, RegistryTypes } from '@polkadot/types/types';
|
||||
import type { BN } from '@polkadot/util';
|
||||
|
||||
import { bnToBn, isUndefined } from '@polkadot/util';
|
||||
import { bnToBn, isNull, isUndefined } from '@polkadot/util';
|
||||
|
||||
import typesChain from './chain';
|
||||
import typesModules from './modules';
|
||||
@@ -22,8 +22,8 @@ export { packageInfo } from './packageInfo';
|
||||
function filterVersions (versions: OverrideVersionedType[] = [], specVersion: number): RegistryTypes {
|
||||
return versions
|
||||
.filter(({ minmax: [min, max] }) =>
|
||||
(isUndefined(min) || specVersion >= min) &&
|
||||
(isUndefined(max) || specVersion <= max)
|
||||
(isUndefined(min) || isNull(min) || specVersion >= min) &&
|
||||
(isUndefined(max) || isNull(max) || specVersion <= max)
|
||||
)
|
||||
.reduce((result: RegistryTypes, { types }): RegistryTypes => ({
|
||||
...result,
|
||||
|
||||
@@ -48,6 +48,9 @@ const typesModules: Record<string, OverrideModuleType> = {
|
||||
inclusion: {
|
||||
ValidatorIndex: 'ParaValidatorIndex'
|
||||
},
|
||||
paraDisputes: {
|
||||
ValidatorIndex: 'ParaValidatorIndex'
|
||||
},
|
||||
paraInclusion: {
|
||||
ValidatorIndex: 'ParaValidatorIndex'
|
||||
},
|
||||
@@ -60,6 +63,9 @@ const typesModules: Record<string, OverrideModuleType> = {
|
||||
parachains: {
|
||||
Id: 'ParaId'
|
||||
},
|
||||
parasDisputes: {
|
||||
ValidatorIndex: 'ParaValidatorIndex'
|
||||
},
|
||||
parasInclusion: {
|
||||
ValidatorIndex: 'ParaValidatorIndex'
|
||||
},
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-known', version: '5.8.1' };
|
||||
export const packageInfo = { name: '@polkadot/types-known', version: '6.1.2' };
|
||||
|
||||
@@ -66,19 +66,48 @@ const sharedTypes = {
|
||||
RegistryInfo: {
|
||||
fields: 'Vec<Bytes>',
|
||||
ownerCanBurn: 'bool'
|
||||
},
|
||||
|
||||
ProxyType: {
|
||||
_enum: [
|
||||
'Any',
|
||||
'NonTransfer',
|
||||
'Governance',
|
||||
'Staking',
|
||||
'NonProxy'
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
const standaloneTypes = {
|
||||
...sharedTypes,
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'LookupSource',
|
||||
LookupSource: 'IndicesLookupSource',
|
||||
Multiplier: 'Fixed64',
|
||||
RefCount: 'RefCountTo259'
|
||||
};
|
||||
|
||||
const versioned: OverrideVersionedType[] = [
|
||||
{
|
||||
minmax: [240, 999],
|
||||
minmax: [240, 243],
|
||||
types: {
|
||||
...sharedTypes,
|
||||
AccountInfo: 'AccountInfoWithRefCount',
|
||||
Address: 'LookupSource',
|
||||
LookupSource: 'IndicesLookupSource',
|
||||
Multiplier: 'Fixed64',
|
||||
RefCount: 'RefCountTo259'
|
||||
...standaloneTypes,
|
||||
ProxyType: {
|
||||
_enum: [
|
||||
'Any',
|
||||
'NonTransfer',
|
||||
'Governance',
|
||||
'Staking',
|
||||
'Vesting'
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
minmax: [244, 999],
|
||||
types: {
|
||||
...standaloneTypes
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -45,6 +45,7 @@ const versioned: OverrideVersionedType[] = [
|
||||
DispatchError: 'DispatchErrorTo198',
|
||||
DispatchInfo: 'DispatchInfoTo244',
|
||||
Heartbeat: 'HeartbeatTo244',
|
||||
IdentityInfo: 'IdentityInfoTo198',
|
||||
Keys: 'SessionKeys5',
|
||||
Multiplier: 'Fixed64',
|
||||
OpenTip: 'OpenTipTo225',
|
||||
@@ -195,6 +196,7 @@ const versioned: OverrideVersionedType[] = [
|
||||
...sharedTypes,
|
||||
AssetInstance: 'AssetInstanceV0',
|
||||
MultiAsset: 'MultiAssetV0',
|
||||
MultiLocation: 'MultiLocationV0',
|
||||
Response: 'ResponseV0',
|
||||
Xcm: 'XcmV0',
|
||||
XcmOrder: 'XcmOrderV0'
|
||||
|
||||
@@ -43,6 +43,7 @@ const versioned: OverrideVersionedType[] = [
|
||||
...sharedTypes,
|
||||
AssetInstance: 'AssetInstanceV0',
|
||||
MultiAsset: 'MultiAssetV0',
|
||||
MultiLocation: 'MultiLocationV0',
|
||||
Response: 'ResponseV0',
|
||||
Xcm: 'XcmV0',
|
||||
XcmOrder: 'XcmOrderV0'
|
||||
|
||||
@@ -24,6 +24,7 @@ const versioned: OverrideVersionedType[] = [
|
||||
},
|
||||
AssetInstance: 'AssetInstanceV0',
|
||||
MultiAsset: 'MultiAssetV0',
|
||||
MultiLocation: 'MultiLocationV0',
|
||||
Response: 'ResponseV0',
|
||||
Xcm: 'XcmV0',
|
||||
XcmOrder: 'XcmOrderV0'
|
||||
|
||||
@@ -94,6 +94,7 @@ const versioned: OverrideVersionedType[] = [
|
||||
...sharedTypes,
|
||||
AssetInstance: 'AssetInstanceV0',
|
||||
MultiAsset: 'MultiAssetV0',
|
||||
MultiLocation: 'MultiLocationV0',
|
||||
Response: 'ResponseV0',
|
||||
Xcm: 'XcmV0',
|
||||
XcmOrder: 'XcmOrderV0'
|
||||
|
||||
@@ -9,7 +9,7 @@ const upgrades: ChainUpgradesRaw = [
|
||||
[528470, 13], [687751, 14], [746085, 15], [787923, 16], [799302, 17],
|
||||
[1205128, 18], [1603423, 23], [1733218, 24], [2005673, 25], [2436698, 26],
|
||||
[3613564, 27], [3899547, 28], [4345767, 29], [4876134, 30], [5661442, 9050],
|
||||
[6321619, 9080]
|
||||
[6321619, 9080], [6713249, 9090]
|
||||
];
|
||||
|
||||
export default upgrades;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/types-support",
|
||||
"version": "5.8.1",
|
||||
"version": "6.1.2",
|
||||
"type": "module",
|
||||
"description": "Supporting files for types, mostly for testing",
|
||||
"main": "index.js",
|
||||
@@ -20,6 +20,6 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-support#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.15.4",
|
||||
"@polkadot/util": "^7.3.1"
|
||||
"@polkadot/util": "^7.4.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright 2017-2021 @polkadot/types-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import metadata from './v13/kusama-hex';
|
||||
import metadata from './v14/kusama-hex';
|
||||
|
||||
export default metadata;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright 2017-2021 @polkadot/types-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import metadata from './v13/polkadot-hex';
|
||||
import metadata from './v14/polkadot-hex';
|
||||
|
||||
export default metadata;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright 2017-2021 @polkadot/types-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import metadata from './v13/substrate-hex';
|
||||
import metadata from './v14/substrate-hex';
|
||||
|
||||
export default metadata;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -5222,7 +5222,7 @@
|
||||
{
|
||||
"name": "Council",
|
||||
"storage": {
|
||||
"prefix": "Instance1Collective",
|
||||
"prefix": "Council",
|
||||
"items": [
|
||||
{
|
||||
"name": "Proposals",
|
||||
@@ -5324,8 +5324,8 @@
|
||||
"",
|
||||
" - `new_members`: The new member list. Be nice to the chain and provide it sorted.",
|
||||
" - `prime`: The prime member whose vote sets the default.",
|
||||
" - `old_count`: The upper bound for the previous number of members in storage.",
|
||||
" Used for weight estimation.",
|
||||
" - `old_count`: The upper bound for the previous number of members in storage. Used for",
|
||||
" weight estimation.",
|
||||
"",
|
||||
" Requires root origin.",
|
||||
"",
|
||||
@@ -5339,7 +5339,8 @@
|
||||
" - `N` new-members-count (code- and governance-bounded)",
|
||||
" - `P` proposals-count (code-bounded)",
|
||||
" - DB:",
|
||||
" - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members",
|
||||
" - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the",
|
||||
" members",
|
||||
" - 1 storage read (codec `O(P)`) for reading the proposals",
|
||||
" - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal",
|
||||
" - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one",
|
||||
@@ -5365,7 +5366,8 @@
|
||||
"",
|
||||
" # <weight>",
|
||||
" ## Weight",
|
||||
" - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal`",
|
||||
" - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching",
|
||||
" `proposal`",
|
||||
" - DB: 1 read (codec `O(M)`) + DB access of `proposal`",
|
||||
" - 1 event",
|
||||
" # </weight>"
|
||||
@@ -5439,7 +5441,8 @@
|
||||
" Requires the sender to be a member.",
|
||||
"",
|
||||
" Transaction fees will be waived if the member is voting on any particular proposal",
|
||||
" for the first time and the call is successful. Subsequent vote changes will charge a fee.",
|
||||
" for the first time and the call is successful. Subsequent vote changes will charge a",
|
||||
" fee.",
|
||||
" # <weight>",
|
||||
" ## Weight",
|
||||
" - `O(M)` where `M` is members-count (code- and governance-bounded)",
|
||||
@@ -5484,9 +5487,10 @@
|
||||
" If the close operation completes successfully with disapproval, the transaction fee will",
|
||||
" be waived. Otherwise execution of the approved operation will be charged to the caller.",
|
||||
"",
|
||||
" + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal.",
|
||||
" + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed",
|
||||
" proposal.",
|
||||
" + `length_bound`: The upper bound for the length of the proposal in storage. Checked via",
|
||||
" `storage::read` so it is `size_of::<u32>() == 4` larger than the pure length.",
|
||||
" `storage::read` so it is `size_of::<u32>() == 4` larger than the pure length.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" ## Weight",
|
||||
@@ -5497,7 +5501,8 @@
|
||||
" - `P2` is proposal-count (code-bounded)",
|
||||
" - DB:",
|
||||
" - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)",
|
||||
" - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`)",
|
||||
" - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec",
|
||||
" `O(P2)`)",
|
||||
" - any mutations done while executing `proposal` (`P1`)",
|
||||
" - up to 3 events",
|
||||
" # </weight>"
|
||||
@@ -5512,7 +5517,8 @@
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
" Disapprove a proposal, close, and remove it from the system, regardless of its current state.",
|
||||
" Disapprove a proposal, close, and remove it from the system, regardless of its current",
|
||||
" state.",
|
||||
"",
|
||||
" Must be called by the Root origin.",
|
||||
"",
|
||||
@@ -5681,7 +5687,7 @@
|
||||
{
|
||||
"name": "TechnicalCommittee",
|
||||
"storage": {
|
||||
"prefix": "Instance2Collective",
|
||||
"prefix": "TechnicalCommittee",
|
||||
"items": [
|
||||
{
|
||||
"name": "Proposals",
|
||||
@@ -5783,8 +5789,8 @@
|
||||
"",
|
||||
" - `new_members`: The new member list. Be nice to the chain and provide it sorted.",
|
||||
" - `prime`: The prime member whose vote sets the default.",
|
||||
" - `old_count`: The upper bound for the previous number of members in storage.",
|
||||
" Used for weight estimation.",
|
||||
" - `old_count`: The upper bound for the previous number of members in storage. Used for",
|
||||
" weight estimation.",
|
||||
"",
|
||||
" Requires root origin.",
|
||||
"",
|
||||
@@ -5798,7 +5804,8 @@
|
||||
" - `N` new-members-count (code- and governance-bounded)",
|
||||
" - `P` proposals-count (code-bounded)",
|
||||
" - DB:",
|
||||
" - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members",
|
||||
" - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the",
|
||||
" members",
|
||||
" - 1 storage read (codec `O(P)`) for reading the proposals",
|
||||
" - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal",
|
||||
" - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one",
|
||||
@@ -5824,7 +5831,8 @@
|
||||
"",
|
||||
" # <weight>",
|
||||
" ## Weight",
|
||||
" - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal`",
|
||||
" - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching",
|
||||
" `proposal`",
|
||||
" - DB: 1 read (codec `O(M)`) + DB access of `proposal`",
|
||||
" - 1 event",
|
||||
" # </weight>"
|
||||
@@ -5898,7 +5906,8 @@
|
||||
" Requires the sender to be a member.",
|
||||
"",
|
||||
" Transaction fees will be waived if the member is voting on any particular proposal",
|
||||
" for the first time and the call is successful. Subsequent vote changes will charge a fee.",
|
||||
" for the first time and the call is successful. Subsequent vote changes will charge a",
|
||||
" fee.",
|
||||
" # <weight>",
|
||||
" ## Weight",
|
||||
" - `O(M)` where `M` is members-count (code- and governance-bounded)",
|
||||
@@ -5943,9 +5952,10 @@
|
||||
" If the close operation completes successfully with disapproval, the transaction fee will",
|
||||
" be waived. Otherwise execution of the approved operation will be charged to the caller.",
|
||||
"",
|
||||
" + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal.",
|
||||
" + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed",
|
||||
" proposal.",
|
||||
" + `length_bound`: The upper bound for the length of the proposal in storage. Checked via",
|
||||
" `storage::read` so it is `size_of::<u32>() == 4` larger than the pure length.",
|
||||
" `storage::read` so it is `size_of::<u32>() == 4` larger than the pure length.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" ## Weight",
|
||||
@@ -5956,7 +5966,8 @@
|
||||
" - `P2` is proposal-count (code-bounded)",
|
||||
" - DB:",
|
||||
" - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)",
|
||||
" - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`)",
|
||||
" - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec",
|
||||
" `O(P2)`)",
|
||||
" - any mutations done while executing `proposal` (`P1`)",
|
||||
" - up to 3 events",
|
||||
" # </weight>"
|
||||
@@ -5971,7 +5982,8 @@
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
" Disapprove a proposal, close, and remove it from the system, regardless of its current state.",
|
||||
" Disapprove a proposal, close, and remove it from the system, regardless of its current",
|
||||
" state.",
|
||||
"",
|
||||
" Must be called by the Root origin.",
|
||||
"",
|
||||
@@ -6620,7 +6632,7 @@
|
||||
{
|
||||
"name": "TechnicalMembership",
|
||||
"storage": {
|
||||
"prefix": "Instance1Membership",
|
||||
"prefix": "TechnicalMembership",
|
||||
"items": [
|
||||
{
|
||||
"name": "Members",
|
||||
@@ -11815,7 +11827,7 @@
|
||||
{
|
||||
"name": "Tips",
|
||||
"storage": {
|
||||
"prefix": "Treasury",
|
||||
"prefix": "Tips",
|
||||
"items": [
|
||||
{
|
||||
"name": "Tips",
|
||||
@@ -11951,9 +11963,9 @@
|
||||
"",
|
||||
" # <weight>",
|
||||
" - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers.",
|
||||
" - `O(T)`: decoding `Tipper` vec of length `T`",
|
||||
" `T` is charged as upper bound given by `ContainsLengthBound`.",
|
||||
" The actual cost depends on the implementation of `T::Tippers`.",
|
||||
" - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by",
|
||||
" `ContainsLengthBound`. The actual cost depends on the implementation of",
|
||||
" `T::Tippers`.",
|
||||
" - `O(R)`: hashing and encoding of reason of length `R`",
|
||||
" - DbReads: `Tippers`, `Reasons`",
|
||||
" - DbWrites: `Reasons`, `Tips`",
|
||||
@@ -11988,10 +12000,9 @@
|
||||
" has started.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - Complexity: `O(T)` where `T` is the number of tippers.",
|
||||
" decoding `Tipper` vec of length `T`, insert tip and check closing,",
|
||||
" `T` is charged as upper bound given by `ContainsLengthBound`.",
|
||||
" The actual cost depends on the implementation of `T::Tippers`.",
|
||||
" - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length",
|
||||
" `T`, insert tip and check closing, `T` is charged as upper bound given by",
|
||||
" `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`.",
|
||||
"",
|
||||
" Actually weight could be lower as it depends on how many tips are in `OpenTip` but it",
|
||||
" is weighted as if almost full i.e of length `T-1`.",
|
||||
@@ -12019,10 +12030,9 @@
|
||||
" as the hash of the tuple of the original tip `reason` and the beneficiary account ID.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - Complexity: `O(T)` where `T` is the number of tippers.",
|
||||
" decoding `Tipper` vec of length `T`.",
|
||||
" `T` is charged as upper bound given by `ContainsLengthBound`.",
|
||||
" The actual cost depends on the implementation of `T::Tippers`.",
|
||||
" - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length",
|
||||
" `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost",
|
||||
" depends on the implementation of `T::Tippers`.",
|
||||
" - DbReads: `Tips`, `Tippers`, `tip finder`",
|
||||
" - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder`",
|
||||
" # </weight>"
|
||||
@@ -12104,6 +12114,22 @@
|
||||
}
|
||||
],
|
||||
"constants": [
|
||||
{
|
||||
"name": "MaximumReasonLength",
|
||||
"type": "u32",
|
||||
"value": "0x00400000",
|
||||
"docs": [
|
||||
" Maximum acceptable reason length."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DataDepositPerByte",
|
||||
"type": "BalanceOf",
|
||||
"value": "0x55a0fc01000000000000000000000000",
|
||||
"docs": [
|
||||
" The amount held on deposit per byte within the tip report reason or bounty description."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "TipCountdown",
|
||||
"type": "BlockNumber",
|
||||
@@ -12117,7 +12143,7 @@
|
||||
"type": "Percent",
|
||||
"value": "0x14",
|
||||
"docs": [
|
||||
" The amount of the final tip which goes to the original reporter of the tip."
|
||||
" The percent of the final tip which goes to the original reporter of the tip."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -12127,22 +12153,6 @@
|
||||
"docs": [
|
||||
" The amount held on deposit for placing a tip report."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DataDepositPerByte",
|
||||
"type": "BalanceOf",
|
||||
"value": "0x55a0fc01000000000000000000000000",
|
||||
"docs": [
|
||||
" The amount held on deposit per byte within the tip report reason."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MaximumReasonLength",
|
||||
"type": "u32",
|
||||
"value": "0x00400000",
|
||||
"docs": [
|
||||
" Maximum acceptable reason length."
|
||||
]
|
||||
}
|
||||
],
|
||||
"errors": [
|
||||
@@ -12544,15 +12554,6 @@
|
||||
" The priority of the unsigned transaction submitted in the unsigned-phase"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MinerMaxIterations",
|
||||
"type": "u32",
|
||||
"value": "0x0a000000",
|
||||
"docs": [
|
||||
" Maximum number of iteration of balancing that will be executed in the embedded miner of",
|
||||
" the pallet."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MinerMaxWeight",
|
||||
"type": "Weight",
|
||||
@@ -13438,7 +13439,7 @@
|
||||
"name": "set_hrmp_open_request_ttl",
|
||||
"args": [
|
||||
{
|
||||
"name": "new",
|
||||
"name": "_new",
|
||||
"type": "u32"
|
||||
}
|
||||
],
|
||||
@@ -13866,6 +13867,13 @@
|
||||
"docs": [
|
||||
" The validation code hash of the candidate is not valid."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ParaHeadMismatch",
|
||||
"docs": [
|
||||
" The `para_head` hash in the candidate descriptor doesn't match the hash of the actual para head in the",
|
||||
" commitments."
|
||||
]
|
||||
}
|
||||
],
|
||||
"index": 53
|
||||
@@ -15080,6 +15088,22 @@
|
||||
" If there are pending HRMP close channel requests, you can use this",
|
||||
" function process all of those requests immediately."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "hrmp_cancel_open_request",
|
||||
"args": [
|
||||
{
|
||||
"name": "channel_id",
|
||||
"type": "HrmpChannelId"
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
" This cancels a pending open channel request. It can be canceled be either of the sender",
|
||||
" or the recipient for that request. The origin must be either of those.",
|
||||
"",
|
||||
" The cancelling happens immediately. It is not possible to cancel the request if it is",
|
||||
" already accepted."
|
||||
]
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
@@ -15096,6 +15120,17 @@
|
||||
" `[sender, recipient, proposed_max_capacity, proposed_max_message_size]`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "OpenChannelCanceled",
|
||||
"args": [
|
||||
"ParaId",
|
||||
"HrmpChannelId"
|
||||
],
|
||||
"docs": [
|
||||
" An HRMP channel request sent by the receiver was canceled by either party.",
|
||||
" `[by_parachain, channel_id]`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "OpenChannelAccepted",
|
||||
"args": [
|
||||
@@ -15208,6 +15243,24 @@
|
||||
"docs": [
|
||||
" The channel close request is already requested."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CancelHrmpOpenChannelUnauthorized",
|
||||
"docs": [
|
||||
" Canceling is requested by neither the sender nor recipient of the open channel request."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "OpenHrmpChannelDoesntExist",
|
||||
"docs": [
|
||||
" The open request doesn't exist."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "OpenHrmpChannelAlreadyConfirmed",
|
||||
"docs": [
|
||||
" Cannot cancel an HRMP open channel request because it is already confirmed."
|
||||
]
|
||||
}
|
||||
],
|
||||
"index": 60
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -5533,7 +5533,7 @@
|
||||
{
|
||||
"name": "Council",
|
||||
"storage": {
|
||||
"prefix": "Instance1Collective",
|
||||
"prefix": "Council",
|
||||
"items": [
|
||||
{
|
||||
"name": "Proposals",
|
||||
@@ -5635,8 +5635,8 @@
|
||||
"",
|
||||
" - `new_members`: The new member list. Be nice to the chain and provide it sorted.",
|
||||
" - `prime`: The prime member whose vote sets the default.",
|
||||
" - `old_count`: The upper bound for the previous number of members in storage.",
|
||||
" Used for weight estimation.",
|
||||
" - `old_count`: The upper bound for the previous number of members in storage. Used for",
|
||||
" weight estimation.",
|
||||
"",
|
||||
" Requires root origin.",
|
||||
"",
|
||||
@@ -5650,7 +5650,8 @@
|
||||
" - `N` new-members-count (code- and governance-bounded)",
|
||||
" - `P` proposals-count (code-bounded)",
|
||||
" - DB:",
|
||||
" - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members",
|
||||
" - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the",
|
||||
" members",
|
||||
" - 1 storage read (codec `O(P)`) for reading the proposals",
|
||||
" - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal",
|
||||
" - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one",
|
||||
@@ -5676,7 +5677,8 @@
|
||||
"",
|
||||
" # <weight>",
|
||||
" ## Weight",
|
||||
" - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal`",
|
||||
" - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching",
|
||||
" `proposal`",
|
||||
" - DB: 1 read (codec `O(M)`) + DB access of `proposal`",
|
||||
" - 1 event",
|
||||
" # </weight>"
|
||||
@@ -5750,7 +5752,8 @@
|
||||
" Requires the sender to be a member.",
|
||||
"",
|
||||
" Transaction fees will be waived if the member is voting on any particular proposal",
|
||||
" for the first time and the call is successful. Subsequent vote changes will charge a fee.",
|
||||
" for the first time and the call is successful. Subsequent vote changes will charge a",
|
||||
" fee.",
|
||||
" # <weight>",
|
||||
" ## Weight",
|
||||
" - `O(M)` where `M` is members-count (code- and governance-bounded)",
|
||||
@@ -5795,9 +5798,10 @@
|
||||
" If the close operation completes successfully with disapproval, the transaction fee will",
|
||||
" be waived. Otherwise execution of the approved operation will be charged to the caller.",
|
||||
"",
|
||||
" + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal.",
|
||||
" + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed",
|
||||
" proposal.",
|
||||
" + `length_bound`: The upper bound for the length of the proposal in storage. Checked via",
|
||||
" `storage::read` so it is `size_of::<u32>() == 4` larger than the pure length.",
|
||||
" `storage::read` so it is `size_of::<u32>() == 4` larger than the pure length.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" ## Weight",
|
||||
@@ -5808,7 +5812,8 @@
|
||||
" - `P2` is proposal-count (code-bounded)",
|
||||
" - DB:",
|
||||
" - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)",
|
||||
" - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`)",
|
||||
" - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec",
|
||||
" `O(P2)`)",
|
||||
" - any mutations done while executing `proposal` (`P1`)",
|
||||
" - up to 3 events",
|
||||
" # </weight>"
|
||||
@@ -5823,7 +5828,8 @@
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
" Disapprove a proposal, close, and remove it from the system, regardless of its current state.",
|
||||
" Disapprove a proposal, close, and remove it from the system, regardless of its current",
|
||||
" state.",
|
||||
"",
|
||||
" Must be called by the Root origin.",
|
||||
"",
|
||||
@@ -5992,7 +5998,7 @@
|
||||
{
|
||||
"name": "TechnicalCommittee",
|
||||
"storage": {
|
||||
"prefix": "Instance2Collective",
|
||||
"prefix": "TechnicalCommittee",
|
||||
"items": [
|
||||
{
|
||||
"name": "Proposals",
|
||||
@@ -6094,8 +6100,8 @@
|
||||
"",
|
||||
" - `new_members`: The new member list. Be nice to the chain and provide it sorted.",
|
||||
" - `prime`: The prime member whose vote sets the default.",
|
||||
" - `old_count`: The upper bound for the previous number of members in storage.",
|
||||
" Used for weight estimation.",
|
||||
" - `old_count`: The upper bound for the previous number of members in storage. Used for",
|
||||
" weight estimation.",
|
||||
"",
|
||||
" Requires root origin.",
|
||||
"",
|
||||
@@ -6109,7 +6115,8 @@
|
||||
" - `N` new-members-count (code- and governance-bounded)",
|
||||
" - `P` proposals-count (code-bounded)",
|
||||
" - DB:",
|
||||
" - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members",
|
||||
" - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the",
|
||||
" members",
|
||||
" - 1 storage read (codec `O(P)`) for reading the proposals",
|
||||
" - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal",
|
||||
" - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one",
|
||||
@@ -6135,7 +6142,8 @@
|
||||
"",
|
||||
" # <weight>",
|
||||
" ## Weight",
|
||||
" - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal`",
|
||||
" - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching",
|
||||
" `proposal`",
|
||||
" - DB: 1 read (codec `O(M)`) + DB access of `proposal`",
|
||||
" - 1 event",
|
||||
" # </weight>"
|
||||
@@ -6209,7 +6217,8 @@
|
||||
" Requires the sender to be a member.",
|
||||
"",
|
||||
" Transaction fees will be waived if the member is voting on any particular proposal",
|
||||
" for the first time and the call is successful. Subsequent vote changes will charge a fee.",
|
||||
" for the first time and the call is successful. Subsequent vote changes will charge a",
|
||||
" fee.",
|
||||
" # <weight>",
|
||||
" ## Weight",
|
||||
" - `O(M)` where `M` is members-count (code- and governance-bounded)",
|
||||
@@ -6254,9 +6263,10 @@
|
||||
" If the close operation completes successfully with disapproval, the transaction fee will",
|
||||
" be waived. Otherwise execution of the approved operation will be charged to the caller.",
|
||||
"",
|
||||
" + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal.",
|
||||
" + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed",
|
||||
" proposal.",
|
||||
" + `length_bound`: The upper bound for the length of the proposal in storage. Checked via",
|
||||
" `storage::read` so it is `size_of::<u32>() == 4` larger than the pure length.",
|
||||
" `storage::read` so it is `size_of::<u32>() == 4` larger than the pure length.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" ## Weight",
|
||||
@@ -6267,7 +6277,8 @@
|
||||
" - `P2` is proposal-count (code-bounded)",
|
||||
" - DB:",
|
||||
" - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)",
|
||||
" - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`)",
|
||||
" - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec",
|
||||
" `O(P2)`)",
|
||||
" - any mutations done while executing `proposal` (`P1`)",
|
||||
" - up to 3 events",
|
||||
" # </weight>"
|
||||
@@ -6282,7 +6293,8 @@
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
" Disapprove a proposal, close, and remove it from the system, regardless of its current state.",
|
||||
" Disapprove a proposal, close, and remove it from the system, regardless of its current",
|
||||
" state.",
|
||||
"",
|
||||
" Must be called by the Root origin.",
|
||||
"",
|
||||
@@ -6931,7 +6943,7 @@
|
||||
{
|
||||
"name": "TechnicalMembership",
|
||||
"storage": {
|
||||
"prefix": "Instance1Membership",
|
||||
"prefix": "TechnicalMembership",
|
||||
"items": [
|
||||
{
|
||||
"name": "Members",
|
||||
@@ -10265,7 +10277,7 @@
|
||||
{
|
||||
"name": "Tips",
|
||||
"storage": {
|
||||
"prefix": "Treasury",
|
||||
"prefix": "Tips",
|
||||
"items": [
|
||||
{
|
||||
"name": "Tips",
|
||||
@@ -10401,9 +10413,9 @@
|
||||
"",
|
||||
" # <weight>",
|
||||
" - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers.",
|
||||
" - `O(T)`: decoding `Tipper` vec of length `T`",
|
||||
" `T` is charged as upper bound given by `ContainsLengthBound`.",
|
||||
" The actual cost depends on the implementation of `T::Tippers`.",
|
||||
" - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by",
|
||||
" `ContainsLengthBound`. The actual cost depends on the implementation of",
|
||||
" `T::Tippers`.",
|
||||
" - `O(R)`: hashing and encoding of reason of length `R`",
|
||||
" - DbReads: `Tippers`, `Reasons`",
|
||||
" - DbWrites: `Reasons`, `Tips`",
|
||||
@@ -10438,10 +10450,9 @@
|
||||
" has started.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - Complexity: `O(T)` where `T` is the number of tippers.",
|
||||
" decoding `Tipper` vec of length `T`, insert tip and check closing,",
|
||||
" `T` is charged as upper bound given by `ContainsLengthBound`.",
|
||||
" The actual cost depends on the implementation of `T::Tippers`.",
|
||||
" - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length",
|
||||
" `T`, insert tip and check closing, `T` is charged as upper bound given by",
|
||||
" `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`.",
|
||||
"",
|
||||
" Actually weight could be lower as it depends on how many tips are in `OpenTip` but it",
|
||||
" is weighted as if almost full i.e of length `T-1`.",
|
||||
@@ -10469,10 +10480,9 @@
|
||||
" as the hash of the tuple of the original tip `reason` and the beneficiary account ID.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - Complexity: `O(T)` where `T` is the number of tippers.",
|
||||
" decoding `Tipper` vec of length `T`.",
|
||||
" `T` is charged as upper bound given by `ContainsLengthBound`.",
|
||||
" The actual cost depends on the implementation of `T::Tippers`.",
|
||||
" - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length",
|
||||
" `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost",
|
||||
" depends on the implementation of `T::Tippers`.",
|
||||
" - DbReads: `Tips`, `Tippers`, `tip finder`",
|
||||
" - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder`",
|
||||
" # </weight>"
|
||||
@@ -10554,6 +10564,22 @@
|
||||
}
|
||||
],
|
||||
"constants": [
|
||||
{
|
||||
"name": "MaximumReasonLength",
|
||||
"type": "u32",
|
||||
"value": "0x00400000",
|
||||
"docs": [
|
||||
" Maximum acceptable reason length."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DataDepositPerByte",
|
||||
"type": "BalanceOf",
|
||||
"value": "0x00e1f505000000000000000000000000",
|
||||
"docs": [
|
||||
" The amount held on deposit per byte within the tip report reason or bounty description."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "TipCountdown",
|
||||
"type": "BlockNumber",
|
||||
@@ -10567,7 +10593,7 @@
|
||||
"type": "Percent",
|
||||
"value": "0x14",
|
||||
"docs": [
|
||||
" The amount of the final tip which goes to the original reporter of the tip."
|
||||
" The percent of the final tip which goes to the original reporter of the tip."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -10577,22 +10603,6 @@
|
||||
"docs": [
|
||||
" The amount held on deposit for placing a tip report."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DataDepositPerByte",
|
||||
"type": "BalanceOf",
|
||||
"value": "0x00e1f505000000000000000000000000",
|
||||
"docs": [
|
||||
" The amount held on deposit per byte within the tip report reason."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MaximumReasonLength",
|
||||
"type": "u32",
|
||||
"value": "0x00400000",
|
||||
"docs": [
|
||||
" Maximum acceptable reason length."
|
||||
]
|
||||
}
|
||||
],
|
||||
"errors": [
|
||||
@@ -10994,15 +11004,6 @@
|
||||
" The priority of the unsigned transaction submitted in the unsigned-phase"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MinerMaxIterations",
|
||||
"type": "u32",
|
||||
"value": "0x0a000000",
|
||||
"docs": [
|
||||
" Maximum number of iteration of balancing that will be executed in the embedded miner of",
|
||||
" the pallet."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MinerMaxWeight",
|
||||
"type": "Weight",
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -503,7 +503,7 @@
|
||||
{
|
||||
"name": "Version",
|
||||
"type": "RuntimeVersion",
|
||||
"value": "0x106e6f6465387375627374726174652d6e6f64650a0000000b0100000000000034df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000bc9d89904f5b923f0100000068b66ba122c93fa70100000037c8bb1350a9a2a80100000091d5df18b0d2cf5801000000ab3c0572291feb8b0100000002000000",
|
||||
"value": "0x106e6f6465387375627374726174652d6e6f64650a0000000b0100000100000034df6acb689907609b0300000037e397fc7c91f5e40100000040fe3ad401f8959a05000000d2bc9897eed08f1503000000f78b278be53f454c02000000ed99c5acb25eedf503000000cbca25e39f14238702000000687ad44ad37f03c201000000bc9d89904f5b923f0100000068b66ba122c93fa70100000037c8bb1350a9a2a80100000091d5df18b0d2cf5801000000ab3c0572291feb8b0100000002000000",
|
||||
"docs": [
|
||||
" Get the chain's current version."
|
||||
]
|
||||
@@ -2292,15 +2292,6 @@
|
||||
" The priority of the unsigned transaction submitted in the unsigned-phase"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MinerMaxIterations",
|
||||
"type": "u32",
|
||||
"value": "0x0a000000",
|
||||
"docs": [
|
||||
" Maximum number of iteration of balancing that will be executed in the embedded miner of",
|
||||
" the pallet."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MinerMaxWeight",
|
||||
"type": "Weight",
|
||||
@@ -5396,7 +5387,7 @@
|
||||
{
|
||||
"name": "Council",
|
||||
"storage": {
|
||||
"prefix": "Instance1Collective",
|
||||
"prefix": "Council",
|
||||
"items": [
|
||||
{
|
||||
"name": "Proposals",
|
||||
@@ -5498,8 +5489,8 @@
|
||||
"",
|
||||
" - `new_members`: The new member list. Be nice to the chain and provide it sorted.",
|
||||
" - `prime`: The prime member whose vote sets the default.",
|
||||
" - `old_count`: The upper bound for the previous number of members in storage.",
|
||||
" Used for weight estimation.",
|
||||
" - `old_count`: The upper bound for the previous number of members in storage. Used for",
|
||||
" weight estimation.",
|
||||
"",
|
||||
" Requires root origin.",
|
||||
"",
|
||||
@@ -5513,7 +5504,8 @@
|
||||
" - `N` new-members-count (code- and governance-bounded)",
|
||||
" - `P` proposals-count (code-bounded)",
|
||||
" - DB:",
|
||||
" - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members",
|
||||
" - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the",
|
||||
" members",
|
||||
" - 1 storage read (codec `O(P)`) for reading the proposals",
|
||||
" - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal",
|
||||
" - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one",
|
||||
@@ -5539,7 +5531,8 @@
|
||||
"",
|
||||
" # <weight>",
|
||||
" ## Weight",
|
||||
" - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal`",
|
||||
" - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching",
|
||||
" `proposal`",
|
||||
" - DB: 1 read (codec `O(M)`) + DB access of `proposal`",
|
||||
" - 1 event",
|
||||
" # </weight>"
|
||||
@@ -5613,7 +5606,8 @@
|
||||
" Requires the sender to be a member.",
|
||||
"",
|
||||
" Transaction fees will be waived if the member is voting on any particular proposal",
|
||||
" for the first time and the call is successful. Subsequent vote changes will charge a fee.",
|
||||
" for the first time and the call is successful. Subsequent vote changes will charge a",
|
||||
" fee.",
|
||||
" # <weight>",
|
||||
" ## Weight",
|
||||
" - `O(M)` where `M` is members-count (code- and governance-bounded)",
|
||||
@@ -5658,9 +5652,10 @@
|
||||
" If the close operation completes successfully with disapproval, the transaction fee will",
|
||||
" be waived. Otherwise execution of the approved operation will be charged to the caller.",
|
||||
"",
|
||||
" + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal.",
|
||||
" + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed",
|
||||
" proposal.",
|
||||
" + `length_bound`: The upper bound for the length of the proposal in storage. Checked via",
|
||||
" `storage::read` so it is `size_of::<u32>() == 4` larger than the pure length.",
|
||||
" `storage::read` so it is `size_of::<u32>() == 4` larger than the pure length.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" ## Weight",
|
||||
@@ -5671,7 +5666,8 @@
|
||||
" - `P2` is proposal-count (code-bounded)",
|
||||
" - DB:",
|
||||
" - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)",
|
||||
" - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`)",
|
||||
" - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec",
|
||||
" `O(P2)`)",
|
||||
" - any mutations done while executing `proposal` (`P1`)",
|
||||
" - up to 3 events",
|
||||
" # </weight>"
|
||||
@@ -5686,7 +5682,8 @@
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
" Disapprove a proposal, close, and remove it from the system, regardless of its current state.",
|
||||
" Disapprove a proposal, close, and remove it from the system, regardless of its current",
|
||||
" state.",
|
||||
"",
|
||||
" Must be called by the Root origin.",
|
||||
"",
|
||||
@@ -5855,7 +5852,7 @@
|
||||
{
|
||||
"name": "TechnicalCommittee",
|
||||
"storage": {
|
||||
"prefix": "Instance2Collective",
|
||||
"prefix": "TechnicalCommittee",
|
||||
"items": [
|
||||
{
|
||||
"name": "Proposals",
|
||||
@@ -5957,8 +5954,8 @@
|
||||
"",
|
||||
" - `new_members`: The new member list. Be nice to the chain and provide it sorted.",
|
||||
" - `prime`: The prime member whose vote sets the default.",
|
||||
" - `old_count`: The upper bound for the previous number of members in storage.",
|
||||
" Used for weight estimation.",
|
||||
" - `old_count`: The upper bound for the previous number of members in storage. Used for",
|
||||
" weight estimation.",
|
||||
"",
|
||||
" Requires root origin.",
|
||||
"",
|
||||
@@ -5972,7 +5969,8 @@
|
||||
" - `N` new-members-count (code- and governance-bounded)",
|
||||
" - `P` proposals-count (code-bounded)",
|
||||
" - DB:",
|
||||
" - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the members",
|
||||
" - 1 storage mutation (codec `O(M)` read, `O(N)` write) for reading and writing the",
|
||||
" members",
|
||||
" - 1 storage read (codec `O(P)`) for reading the proposals",
|
||||
" - `P` storage mutations (codec `O(M)`) for updating the votes for each proposal",
|
||||
" - 1 storage write (codec `O(1)`) for deleting the old `prime` and setting the new one",
|
||||
@@ -5998,7 +5996,8 @@
|
||||
"",
|
||||
" # <weight>",
|
||||
" ## Weight",
|
||||
" - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching `proposal`",
|
||||
" - `O(M + P)` where `M` members-count (code-bounded) and `P` complexity of dispatching",
|
||||
" `proposal`",
|
||||
" - DB: 1 read (codec `O(M)`) + DB access of `proposal`",
|
||||
" - 1 event",
|
||||
" # </weight>"
|
||||
@@ -6072,7 +6071,8 @@
|
||||
" Requires the sender to be a member.",
|
||||
"",
|
||||
" Transaction fees will be waived if the member is voting on any particular proposal",
|
||||
" for the first time and the call is successful. Subsequent vote changes will charge a fee.",
|
||||
" for the first time and the call is successful. Subsequent vote changes will charge a",
|
||||
" fee.",
|
||||
" # <weight>",
|
||||
" ## Weight",
|
||||
" - `O(M)` where `M` is members-count (code- and governance-bounded)",
|
||||
@@ -6117,9 +6117,10 @@
|
||||
" If the close operation completes successfully with disapproval, the transaction fee will",
|
||||
" be waived. Otherwise execution of the approved operation will be charged to the caller.",
|
||||
"",
|
||||
" + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed proposal.",
|
||||
" + `proposal_weight_bound`: The maximum amount of weight consumed by executing the closed",
|
||||
" proposal.",
|
||||
" + `length_bound`: The upper bound for the length of the proposal in storage. Checked via",
|
||||
" `storage::read` so it is `size_of::<u32>() == 4` larger than the pure length.",
|
||||
" `storage::read` so it is `size_of::<u32>() == 4` larger than the pure length.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" ## Weight",
|
||||
@@ -6130,7 +6131,8 @@
|
||||
" - `P2` is proposal-count (code-bounded)",
|
||||
" - DB:",
|
||||
" - 2 storage reads (`Members`: codec `O(M)`, `Prime`: codec `O(1)`)",
|
||||
" - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec `O(P2)`)",
|
||||
" - 3 mutations (`Voting`: codec `O(M)`, `ProposalOf`: codec `O(B)`, `Proposals`: codec",
|
||||
" `O(P2)`)",
|
||||
" - any mutations done while executing `proposal` (`P1`)",
|
||||
" - up to 3 events",
|
||||
" # </weight>"
|
||||
@@ -6145,7 +6147,8 @@
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
" Disapprove a proposal, close, and remove it from the system, regardless of its current state.",
|
||||
" Disapprove a proposal, close, and remove it from the system, regardless of its current",
|
||||
" state.",
|
||||
"",
|
||||
" Must be called by the Root origin.",
|
||||
"",
|
||||
@@ -6794,7 +6797,7 @@
|
||||
{
|
||||
"name": "TechnicalMembership",
|
||||
"storage": {
|
||||
"prefix": "Instance1Membership",
|
||||
"prefix": "TechnicalMembership",
|
||||
"items": [
|
||||
{
|
||||
"name": "Members",
|
||||
@@ -7657,30 +7660,6 @@
|
||||
" code deployment step. Instead, the `code_hash` of an on-chain deployed wasm binary",
|
||||
" must be supplied."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "claim_surcharge",
|
||||
"args": [
|
||||
{
|
||||
"name": "dest",
|
||||
"type": "AccountId"
|
||||
},
|
||||
{
|
||||
"name": "aux_sender",
|
||||
"type": "Option<AccountId>"
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
" Allows block producers to claim a small reward for evicting a contract. If a block",
|
||||
" producer fails to do so, a regular users will be allowed to claim the reward.",
|
||||
"",
|
||||
" In case of a successful eviction no fees are charged from the sender. However, the",
|
||||
" reward is capped by the total amount of rent that was paid by the contract while",
|
||||
" it was alive.",
|
||||
"",
|
||||
" If contract is not evicted as a result of this call, [`Error::ContractNotEvictable`]",
|
||||
" is returned and the sender is not eligible for the reward."
|
||||
]
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
@@ -7694,15 +7673,6 @@
|
||||
" Contract deployed by address at the specified address. \\[deployer, contract\\]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Evicted",
|
||||
"args": [
|
||||
"AccountId"
|
||||
],
|
||||
"docs": [
|
||||
" Contract has been evicted and is now in tombstone state. \\[contract\\]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Terminated",
|
||||
"args": [
|
||||
@@ -7710,7 +7680,7 @@
|
||||
"AccountId"
|
||||
],
|
||||
"docs": [
|
||||
" Contract has been terminated without leaving a tombstone.",
|
||||
" Contract has been removed.",
|
||||
" \\[contract, beneficiary\\]",
|
||||
"",
|
||||
" # Params",
|
||||
@@ -7720,28 +7690,8 @@
|
||||
"",
|
||||
" # Note",
|
||||
"",
|
||||
" The only way for a contract to be removed without a tombstone and emitting",
|
||||
" this event is by calling `seal_terminate`."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Restored",
|
||||
"args": [
|
||||
"AccountId",
|
||||
"AccountId",
|
||||
"Hash",
|
||||
"Balance"
|
||||
],
|
||||
"docs": [
|
||||
" Restoration of a contract has been successful.",
|
||||
" \\[restorer, dest, code_hash, rent_allowance\\]",
|
||||
"",
|
||||
" # Params",
|
||||
"",
|
||||
" - `restorer`: Account ID of the restoring contract.",
|
||||
" - `dest`: Account ID of the restored contract.",
|
||||
" - `code_hash`: Code hash of the restored contract.",
|
||||
" - `rent_allowance`: Rent allowance of the restored contract."
|
||||
" The only way for a contract to be removed and emitting this event is by calling",
|
||||
" `seal_terminate`."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -7793,7 +7743,7 @@
|
||||
" A code with the specified hash was removed.",
|
||||
" \\[code_hash\\]",
|
||||
"",
|
||||
" This happens when the last contract that uses this code hash was removed or evicted."
|
||||
" This happens when the last contract that uses this code hash was removed."
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -7801,94 +7751,26 @@
|
||||
{
|
||||
"name": "Schedule",
|
||||
"type": "Schedule",
|
||||
"value": "0x040000000002000000010000800000001000000000100000000100002000000020000000004000000000020002000000eb130000ae310000ab370000ba160000bb2b0000222000008c1a0000c83000005200000021e2020044620400151300005c1000005415000042150000f02600000731000070100000d5e3c402001600004016000011160000fb150000e5150000f815000026160000c01600004a16000070160000ac16000091160000cf160000d3160000eb160000f8150000f21600009d1600007a1600005c160000072f00000e250000d22f0000ad2400007c1a0000831600008716000002170000b51600008916000090160000a81600003ee4140000000000de0715000000000020e9140000000000aadd3b0000000000c4ea1400000000004af614000000000074fe14000000000044f714000000000088d614000000000084ee140000000000065f3100000000006276090000000000f0a6310000000000a504000000000000103d260000000000db020000000000007045df1f0000000028135a290000000056f6e60800000000a4bd4300000000003cfe6f000000000032eac2070000000078070000000000006c0f0c00000000001a3c0e0000000000007eb107000000005303000000000000b275fd0700000000c4bed00100000000170500000000000016ed470a000000003677ec24000000009a5c380800000000df02000000000000a2040000000000002888813700000000df02000000000000a0040000000000008b0800000000000028e015000000000085130000000000008a22170000000000b90d0000000000005cbe120000000000b906000000000000a8d6120000000000ba06000000000000",
|
||||
"value": "0x040000000002000000010000800000001000000000100000000100002000000020000000004000000000020002000000a4150000f03200004a3d0000280f0000ce220000f4150000180b0000521c00000000000046c10200a8030400c80f000000050000c0080000000000009a15000052170000241300009b684a028e1200008e1200008e1200007012000000000000000000002a120000a410000086100000640f00001e0f0000b00e00005e100000ae10000072100000fe100000d61000006810000004100000d20f0000a6270000be1e000072290000141e0000d61000000e1000005a0f0000320f0000ae100000500f0000140f0000dc0f0000f425130000000000de3113000000000068f81200000000001a1e360000000000be38130000000000d616130000000000043e1300000000005411130000000000281a13000000000040572c000000000018ad0800000000001a531000000000007301000000000000d8f563000000000068020000000000000072a4200000000038093c0000000000aa696900000000007e4ebd07000000005306000000000000d81c0b0000000000fc4b1b0600000000bf02000000000000001e180600000000faf6d001000000004704000000000000caeb080a000000007a612d1f000000005aced709000000006c02000000000000e0030000000000002ef30132000000006b02000000000000d703000000000000b1070000000000005e6a1400000000000b1300000000000040781500000000003c0d0000000000005855110000000000420600000000000012461100000000004206000000000000c22a500900000000",
|
||||
"docs": [
|
||||
" Cost schedule and limits."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SignedClaimHandicap",
|
||||
"type": "BlockNumber",
|
||||
"value": "0x02000000",
|
||||
"docs": [
|
||||
" Number of block delay an extrinsic claim surcharge has.",
|
||||
"",
|
||||
" When claim surcharge is called by an extrinsic the rent is checked",
|
||||
" for current_block - delay"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "TombstoneDeposit",
|
||||
"name": "ContractDeposit",
|
||||
"type": "BalanceOf",
|
||||
"value": "0x00f0e8857a9c02000000000000000000",
|
||||
"value": "0x00f0436de36a01000000000000000000",
|
||||
"docs": [
|
||||
" The minimum amount required to generate a tombstone."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DepositPerContract",
|
||||
"type": "BalanceOf",
|
||||
"value": "0x00f0e8857a9c02000000000000000000",
|
||||
"docs": [
|
||||
" The balance every contract needs to deposit to stay alive indefinitely.",
|
||||
"",
|
||||
" This is different from the [`Self::TombstoneDeposit`] because this only needs to be",
|
||||
" deposited while the contract is alive. Costs for additional storage are added to",
|
||||
" this base cost.",
|
||||
"",
|
||||
" This is a simple way to ensure that contracts with empty storage eventually get deleted",
|
||||
" by making them pay rent. This creates an incentive to remove them early in order to save",
|
||||
" rent."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DepositPerStorageByte",
|
||||
"type": "BalanceOf",
|
||||
"value": "0x0060defb740500000000000000000000",
|
||||
"docs": [
|
||||
" The balance a contract needs to deposit per storage byte to stay alive indefinitely.",
|
||||
"",
|
||||
" Let's suppose the deposit is 1,000 BU (balance units)/byte and the rent is 1",
|
||||
" BU/byte/day, then a contract with 1,000,000 BU that uses 1,000 bytes of storage would",
|
||||
" pay no rent. But if the balance reduced to 500,000 BU and the storage stayed the same at",
|
||||
" 1,000, then it would pay 500 BU/day."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DepositPerStorageItem",
|
||||
"type": "BalanceOf",
|
||||
"value": "0x00f0ab75a40d00000000000000000000",
|
||||
"docs": [
|
||||
" The balance a contract needs to deposit per storage item to stay alive indefinitely.",
|
||||
"",
|
||||
" It works the same as [`Self::DepositPerStorageByte`] but for storage items."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "RentFraction",
|
||||
"type": "Perbill",
|
||||
"value": "0x85040000",
|
||||
"docs": [
|
||||
" The fraction of the deposit that should be used as rent per block.",
|
||||
"",
|
||||
" When a contract hasn't enough balance deposited to stay alive indefinitely it needs",
|
||||
" to pay per block for the storage it consumes that is not covered by the deposit.",
|
||||
" This determines how high this rent payment is per block as a fraction of the deposit."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SurchargeReward",
|
||||
"type": "BalanceOf",
|
||||
"value": "0x005cb2ec220000000000000000000000",
|
||||
"docs": [
|
||||
" Reward that is received by the party whose touch has led",
|
||||
" to removal of a contract."
|
||||
" The deposit that must be placed into the contract's account to instantiate it.",
|
||||
" This is in **addition** to the [`pallet_balances::Pallet::ExistenialDeposit`].",
|
||||
" The minimum balance for a contract's account can be queried using",
|
||||
" [`Pallet::subsistence_threshold`]."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DeletionQueueDepth",
|
||||
"type": "u32",
|
||||
"value": "0xed030000",
|
||||
"value": "0xa2ba0100",
|
||||
"docs": [
|
||||
" The maximum number of tries that can be queued for deletion."
|
||||
]
|
||||
@@ -7909,36 +7791,6 @@
|
||||
" A new schedule must have a greater version than the current one."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "InvalidSurchargeClaim",
|
||||
"docs": [
|
||||
" An origin must be signed or inherent and auxiliary sender only provided on inherent."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "InvalidSourceContract",
|
||||
"docs": [
|
||||
" Cannot restore from nonexisting or tombstone contract."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "InvalidDestinationContract",
|
||||
"docs": [
|
||||
" Cannot restore to nonexisting or alive contract."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "InvalidTombstone",
|
||||
"docs": [
|
||||
" Tombstones don't match."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "InvalidContractOrigin",
|
||||
"docs": [
|
||||
" An origin TrieId written in the current block."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "OutOfGas",
|
||||
"docs": [
|
||||
@@ -7955,9 +7807,8 @@
|
||||
"name": "BelowSubsistenceThreshold",
|
||||
"docs": [
|
||||
" Performing the requested transfer would have brought the contract below",
|
||||
" the subsistence threshold. No transfer is allowed to do this in order to allow",
|
||||
" for a tombstone to be created. Use `seal_terminate` to remove a contract without",
|
||||
" leaving a tombstone behind."
|
||||
" the subsistence threshold. No transfer is allowed to do this. Use `seal_terminate`",
|
||||
" to recover a deposit."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -7988,26 +7839,6 @@
|
||||
" No contract was found at the specified address."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ContractIsTombstone",
|
||||
"docs": [
|
||||
" A tombstone exist at the specified address.",
|
||||
"",
|
||||
" Tombstone cannot be called. Anyone can use `seal_restore_to` in order to revive",
|
||||
" the contract, though."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "RentNotPaid",
|
||||
"docs": [
|
||||
" The called contract does not have enough balance to pay for its storage.",
|
||||
"",
|
||||
" The contract ran out of balance and is therefore eligible for eviction into a",
|
||||
" tombstone. Anyone can evict the contract by submitting a `claim_surcharge`",
|
||||
" extrinsic. Alternatively, a plain balance transfer can be used in order to",
|
||||
" increase the contracts funds so that it can be called again."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CodeTooLarge",
|
||||
"docs": [
|
||||
@@ -8049,7 +7880,7 @@
|
||||
"name": "TerminatedWhileReentrant",
|
||||
"docs": [
|
||||
" Termination of a contract is not allowed while the contract is already",
|
||||
" on the call stack. Can be triggered by `seal_terminate` or `seal_restore_to."
|
||||
" on the call stack. Can be triggered by `seal_terminate`."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -8089,20 +7920,11 @@
|
||||
"docs": [
|
||||
" Removal of a contract failed because the deletion queue is full.",
|
||||
"",
|
||||
" This can happen when either calling [`Pallet::claim_surcharge`] or `seal_terminate`.",
|
||||
" This can happen when calling `seal_terminate`.",
|
||||
" The queue is filled by deleting contracts and emptied by a fixed amount each block.",
|
||||
" Trying again during another block is the only way to resolve this issue."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ContractNotEvictable",
|
||||
"docs": [
|
||||
" A contract could not be evicted because it has enough balance to pay rent.",
|
||||
"",
|
||||
" This can be returned from [`Pallet::claim_surcharge`] because the target",
|
||||
" contract has enough balance to pay for its rent."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "StorageExhausted",
|
||||
"docs": [
|
||||
@@ -8123,7 +7945,7 @@
|
||||
"docs": [
|
||||
" A contract self destructed in its constructor.",
|
||||
"",
|
||||
" This can be triggered by a call to `seal_terminate` or `seal_restore_to`."
|
||||
" This can be triggered by a call to `seal_terminate`."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -12875,7 +12697,7 @@
|
||||
{
|
||||
"name": "Tips",
|
||||
"storage": {
|
||||
"prefix": "Treasury",
|
||||
"prefix": "Tips",
|
||||
"items": [
|
||||
{
|
||||
"name": "Tips",
|
||||
@@ -13011,9 +12833,9 @@
|
||||
"",
|
||||
" # <weight>",
|
||||
" - Complexity: `O(R + T)` where `R` length of `reason`, `T` is the number of tippers.",
|
||||
" - `O(T)`: decoding `Tipper` vec of length `T`",
|
||||
" `T` is charged as upper bound given by `ContainsLengthBound`.",
|
||||
" The actual cost depends on the implementation of `T::Tippers`.",
|
||||
" - `O(T)`: decoding `Tipper` vec of length `T`. `T` is charged as upper bound given by",
|
||||
" `ContainsLengthBound`. The actual cost depends on the implementation of",
|
||||
" `T::Tippers`.",
|
||||
" - `O(R)`: hashing and encoding of reason of length `R`",
|
||||
" - DbReads: `Tippers`, `Reasons`",
|
||||
" - DbWrites: `Reasons`, `Tips`",
|
||||
@@ -13048,10 +12870,9 @@
|
||||
" has started.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - Complexity: `O(T)` where `T` is the number of tippers.",
|
||||
" decoding `Tipper` vec of length `T`, insert tip and check closing,",
|
||||
" `T` is charged as upper bound given by `ContainsLengthBound`.",
|
||||
" The actual cost depends on the implementation of `T::Tippers`.",
|
||||
" - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length",
|
||||
" `T`, insert tip and check closing, `T` is charged as upper bound given by",
|
||||
" `ContainsLengthBound`. The actual cost depends on the implementation of `T::Tippers`.",
|
||||
"",
|
||||
" Actually weight could be lower as it depends on how many tips are in `OpenTip` but it",
|
||||
" is weighted as if almost full i.e of length `T-1`.",
|
||||
@@ -13079,10 +12900,9 @@
|
||||
" as the hash of the tuple of the original tip `reason` and the beneficiary account ID.",
|
||||
"",
|
||||
" # <weight>",
|
||||
" - Complexity: `O(T)` where `T` is the number of tippers.",
|
||||
" decoding `Tipper` vec of length `T`.",
|
||||
" `T` is charged as upper bound given by `ContainsLengthBound`.",
|
||||
" The actual cost depends on the implementation of `T::Tippers`.",
|
||||
" - Complexity: `O(T)` where `T` is the number of tippers. decoding `Tipper` vec of length",
|
||||
" `T`. `T` is charged as upper bound given by `ContainsLengthBound`. The actual cost",
|
||||
" depends on the implementation of `T::Tippers`.",
|
||||
" - DbReads: `Tips`, `Tippers`, `tip finder`",
|
||||
" - DbWrites: `Reasons`, `Tips`, `Tippers`, `tip finder`",
|
||||
" # </weight>"
|
||||
@@ -13164,6 +12984,22 @@
|
||||
}
|
||||
],
|
||||
"constants": [
|
||||
{
|
||||
"name": "MaximumReasonLength",
|
||||
"type": "u32",
|
||||
"value": "0x00400000",
|
||||
"docs": [
|
||||
" Maximum acceptable reason length."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DataDepositPerByte",
|
||||
"type": "BalanceOf",
|
||||
"value": "0x0010a5d4e80000000000000000000000",
|
||||
"docs": [
|
||||
" The amount held on deposit per byte within the tip report reason or bounty description."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "TipCountdown",
|
||||
"type": "BlockNumber",
|
||||
@@ -13177,7 +13013,7 @@
|
||||
"type": "Percent",
|
||||
"value": "0x14",
|
||||
"docs": [
|
||||
" The amount of the final tip which goes to the original reporter of the tip."
|
||||
" The percent of the final tip which goes to the original reporter of the tip."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -13187,22 +13023,6 @@
|
||||
"docs": [
|
||||
" The amount held on deposit for placing a tip report."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "DataDepositPerByte",
|
||||
"type": "BalanceOf",
|
||||
"value": "0x0010a5d4e80000000000000000000000",
|
||||
"docs": [
|
||||
" The amount held on deposit per byte within the tip report reason."
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "MaximumReasonLength",
|
||||
"type": "u32",
|
||||
"value": "0x00400000",
|
||||
"docs": [
|
||||
" Maximum acceptable reason length."
|
||||
]
|
||||
}
|
||||
],
|
||||
"errors": [
|
||||
@@ -14956,7 +14776,7 @@
|
||||
{
|
||||
"name": "IgnoredIssuance",
|
||||
"type": "BalanceOf",
|
||||
"value": "0x00000000000000000000000000000000",
|
||||
"value": "0x996af44a87686c010000000000000000",
|
||||
"docs": [
|
||||
" The issuance to ignore. This is subtracted from the `Currency`'s `total_issuance` to get",
|
||||
" the issuance by which we inflate or deflate the gilt."
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -3,4 +3,4 @@
|
||||
|
||||
// Auto-generated by @polkadot/dev, do not edit
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-support', version: '5.8.1' };
|
||||
export const packageInfo = { name: '@polkadot/types-support', version: '6.1.2' };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@polkadot/types",
|
||||
"version": "5.8.1",
|
||||
"version": "6.1.2",
|
||||
"type": "module",
|
||||
"description": "Implementation of the Parity codec",
|
||||
"main": "index.js",
|
||||
@@ -20,13 +20,13 @@
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.15.4",
|
||||
"@polkadot/util": "^7.3.1",
|
||||
"@polkadot/util-crypto": "^7.3.1",
|
||||
"@polkadot/util": "^7.4.1",
|
||||
"@polkadot/util-crypto": "^7.4.1",
|
||||
"rxjs": "^7.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^7.3.1",
|
||||
"@polkadot/types-support": "5.8.1",
|
||||
"@polkadot/keyring": "^7.4.1",
|
||||
"@polkadot/types-support": "6.1.2",
|
||||
"@types/bn.js": "^4.11.6",
|
||||
"bn.js": "^4.12.0"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// Copyright 2017-2021 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import './lookup';
|
||||
import './registry';
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// Copyright 2017-2021 @polkadot/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Definitions } from '../../types';
|
||||
|
||||
import kusama from './kusama';
|
||||
import polkadot from './polkadot';
|
||||
import substrate from './substrate';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
// Not 100% sure it is relevant, however the order here is the same
|
||||
// as exposed in the typegen lookup order
|
||||
...substrate,
|
||||
...polkadot,
|
||||
...kusama
|
||||
}
|
||||
} as Definitions;
|
||||
@@ -0,0 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types';
|
||||
@@ -0,0 +1,858 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import type { DefinitionsTypes } from '../../types';
|
||||
|
||||
export default {
|
||||
/**
|
||||
* Lookup74: kusama_runtime::ProxyType
|
||||
**/
|
||||
KusamaRuntimeProxyType: {
|
||||
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'IdentityJudgement', 'CancelProxy', 'Auction']
|
||||
},
|
||||
/**
|
||||
* Lookup108: xcm::v1::multilocation::MultiLocation
|
||||
**/
|
||||
XcmV1MultiLocation: {
|
||||
parents: 'u8',
|
||||
interior: 'XcmV1MultilocationJunctions'
|
||||
},
|
||||
/**
|
||||
* Lookup109: xcm::v1::multilocation::Junctions
|
||||
**/
|
||||
XcmV1MultilocationJunctions: {
|
||||
_enum: {
|
||||
Here: 'Null',
|
||||
X1: 'XcmV1Junction',
|
||||
X2: '(XcmV1Junction,XcmV1Junction)',
|
||||
X3: '(XcmV1Junction,XcmV1Junction,XcmV1Junction)',
|
||||
X4: '(XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction)',
|
||||
X5: '(XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction)',
|
||||
X6: '(XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction)',
|
||||
X7: '(XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction)',
|
||||
X8: '(XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction,XcmV1Junction)'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup110: xcm::v1::junction::Junction
|
||||
**/
|
||||
XcmV1Junction: {
|
||||
_enum: {
|
||||
Parachain: 'Compact<u32>',
|
||||
AccountId32: {
|
||||
network: 'XcmV0JunctionNetworkId',
|
||||
id: '[u8;32]',
|
||||
},
|
||||
AccountIndex64: {
|
||||
network: 'XcmV0JunctionNetworkId',
|
||||
index: 'Compact<u64>',
|
||||
},
|
||||
AccountKey20: {
|
||||
network: 'XcmV0JunctionNetworkId',
|
||||
key: '[u8;20]',
|
||||
},
|
||||
PalletInstance: 'u8',
|
||||
GeneralIndex: 'Compact<u128>',
|
||||
GeneralKey: 'Bytes',
|
||||
OnlyChild: 'Null',
|
||||
Plurality: {
|
||||
id: 'XcmV0JunctionBodyId',
|
||||
part: 'XcmV0JunctionBodyPart'
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup112: xcm::v0::junction::NetworkId
|
||||
**/
|
||||
XcmV0JunctionNetworkId: {
|
||||
_enum: {
|
||||
Any: 'Null',
|
||||
Named: 'Bytes',
|
||||
Polkadot: 'Null',
|
||||
Kusama: 'Null'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup114: xcm::v0::junction::BodyId
|
||||
**/
|
||||
XcmV0JunctionBodyId: {
|
||||
_enum: {
|
||||
Unit: 'Null',
|
||||
Named: 'Bytes',
|
||||
Index: 'Compact<u32>',
|
||||
Executive: 'Null',
|
||||
Technical: 'Null',
|
||||
Legislative: 'Null',
|
||||
Judicial: 'Null'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup115: xcm::v0::junction::BodyPart
|
||||
**/
|
||||
XcmV0JunctionBodyPart: {
|
||||
_enum: {
|
||||
Voice: 'Null',
|
||||
Members: {
|
||||
count: 'Compact<u32>',
|
||||
},
|
||||
Fraction: {
|
||||
nom: 'Compact<u32>',
|
||||
denom: 'Compact<u32>',
|
||||
},
|
||||
AtLeastProportion: {
|
||||
nom: 'Compact<u32>',
|
||||
denom: 'Compact<u32>',
|
||||
},
|
||||
MoreThanProportion: {
|
||||
nom: 'Compact<u32>',
|
||||
denom: 'Compact<u32>'
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup116: xcm::v2::Xcm<Call>
|
||||
**/
|
||||
XcmV2Xcm: 'Vec<XcmV2Instruction>',
|
||||
/**
|
||||
* Lookup118: xcm::v2::Instruction<Call>
|
||||
**/
|
||||
XcmV2Instruction: {
|
||||
_enum: {
|
||||
WithdrawAsset: 'XcmV1MultiassetMultiAssets',
|
||||
ReserveAssetDeposited: 'XcmV1MultiassetMultiAssets',
|
||||
ReceiveTeleportedAsset: 'XcmV1MultiassetMultiAssets',
|
||||
QueryResponse: {
|
||||
queryId: 'Compact<u64>',
|
||||
response: 'XcmV2Response',
|
||||
maxWeight: 'Compact<u64>',
|
||||
},
|
||||
TransferAsset: {
|
||||
assets: 'XcmV1MultiassetMultiAssets',
|
||||
beneficiary: 'XcmV1MultiLocation',
|
||||
},
|
||||
TransferReserveAsset: {
|
||||
assets: 'XcmV1MultiassetMultiAssets',
|
||||
dest: 'XcmV1MultiLocation',
|
||||
xcm: 'XcmV2Xcm',
|
||||
},
|
||||
Transact: {
|
||||
_alias: {
|
||||
call_: 'call',
|
||||
},
|
||||
originType: 'XcmV0OriginKind',
|
||||
requireWeightAtMost: 'Compact<u64>',
|
||||
call_: 'XcmDoubleEncoded',
|
||||
},
|
||||
HrmpNewChannelOpenRequest: {
|
||||
sender: 'Compact<u32>',
|
||||
maxMessageSize: 'Compact<u32>',
|
||||
maxCapacity: 'Compact<u32>',
|
||||
},
|
||||
HrmpChannelAccepted: {
|
||||
recipient: 'Compact<u32>',
|
||||
},
|
||||
HrmpChannelClosing: {
|
||||
initiator: 'Compact<u32>',
|
||||
sender: 'Compact<u32>',
|
||||
recipient: 'Compact<u32>',
|
||||
},
|
||||
ClearOrigin: 'Null',
|
||||
DescendOrigin: 'XcmV1MultilocationJunctions',
|
||||
ReportError: {
|
||||
queryId: 'Compact<u64>',
|
||||
dest: 'XcmV1MultiLocation',
|
||||
maxResponseWeight: 'Compact<u64>',
|
||||
},
|
||||
DepositAsset: {
|
||||
assets: 'XcmV1MultiassetMultiAssetFilter',
|
||||
maxAssets: 'Compact<u32>',
|
||||
beneficiary: 'XcmV1MultiLocation',
|
||||
},
|
||||
DepositReserveAsset: {
|
||||
assets: 'XcmV1MultiassetMultiAssetFilter',
|
||||
maxAssets: 'Compact<u32>',
|
||||
dest: 'XcmV1MultiLocation',
|
||||
xcm: 'XcmV2Xcm',
|
||||
},
|
||||
ExchangeAsset: {
|
||||
give: 'XcmV1MultiassetMultiAssetFilter',
|
||||
receive: 'XcmV1MultiassetMultiAssets',
|
||||
},
|
||||
InitiateReserveWithdraw: {
|
||||
assets: 'XcmV1MultiassetMultiAssetFilter',
|
||||
reserve: 'XcmV1MultiLocation',
|
||||
xcm: 'XcmV2Xcm',
|
||||
},
|
||||
InitiateTeleport: {
|
||||
assets: 'XcmV1MultiassetMultiAssetFilter',
|
||||
dest: 'XcmV1MultiLocation',
|
||||
xcm: 'XcmV2Xcm',
|
||||
},
|
||||
QueryHolding: {
|
||||
queryId: 'Compact<u64>',
|
||||
dest: 'XcmV1MultiLocation',
|
||||
assets: 'XcmV1MultiassetMultiAssetFilter',
|
||||
maxResponseWeight: 'Compact<u64>',
|
||||
},
|
||||
BuyExecution: {
|
||||
fees: 'XcmV1MultiAsset',
|
||||
weightLimit: 'XcmV2WeightLimit',
|
||||
},
|
||||
RefundSurplus: 'Null',
|
||||
SetErrorHandler: 'XcmV2Xcm',
|
||||
SetAppendix: 'XcmV2Xcm',
|
||||
ClearError: 'Null',
|
||||
ClaimAsset: {
|
||||
assets: 'XcmV1MultiassetMultiAssets',
|
||||
ticket: 'XcmV1MultiLocation',
|
||||
},
|
||||
Trap: 'Compact<u64>',
|
||||
SubscribeVersion: {
|
||||
queryId: 'Compact<u64>',
|
||||
maxResponseWeight: 'Compact<u64>',
|
||||
},
|
||||
UnsubscribeVersion: 'Null'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup119: xcm::v1::multiasset::MultiAssets
|
||||
**/
|
||||
XcmV1MultiassetMultiAssets: 'Vec<XcmV1MultiAsset>',
|
||||
/**
|
||||
* Lookup121: xcm::v1::multiasset::MultiAsset
|
||||
**/
|
||||
XcmV1MultiAsset: {
|
||||
id: 'XcmV1MultiassetAssetId',
|
||||
fun: 'XcmV1MultiassetFungibility'
|
||||
},
|
||||
/**
|
||||
* Lookup122: xcm::v1::multiasset::AssetId
|
||||
**/
|
||||
XcmV1MultiassetAssetId: {
|
||||
_enum: {
|
||||
Concrete: 'XcmV1MultiLocation',
|
||||
Abstract: 'Bytes'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup123: xcm::v1::multiasset::Fungibility
|
||||
**/
|
||||
XcmV1MultiassetFungibility: {
|
||||
_enum: {
|
||||
Fungible: 'Compact<u128>',
|
||||
NonFungible: 'XcmV1MultiassetAssetInstance'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup124: xcm::v1::multiasset::AssetInstance
|
||||
**/
|
||||
XcmV1MultiassetAssetInstance: {
|
||||
_enum: {
|
||||
Undefined: 'Null',
|
||||
Index: 'Compact<u128>',
|
||||
Array4: '[u8;4]',
|
||||
Array8: '[u8;8]',
|
||||
Array16: '[u8;16]',
|
||||
Array32: '[u8;32]',
|
||||
Blob: 'Bytes'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup126: xcm::v2::Response
|
||||
**/
|
||||
XcmV2Response: {
|
||||
_enum: {
|
||||
Null: 'Null',
|
||||
Assets: 'XcmV1MultiassetMultiAssets',
|
||||
ExecutionResult: 'Result<Null, (u32,XcmV2TraitsError)>',
|
||||
Version: 'u32'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup129: xcm::v0::OriginKind
|
||||
**/
|
||||
XcmV0OriginKind: {
|
||||
_enum: ['Native', 'SovereignAccount', 'Superuser', 'Xcm']
|
||||
},
|
||||
/**
|
||||
* Lookup130: xcm::double_encoded::DoubleEncoded<T>
|
||||
**/
|
||||
XcmDoubleEncoded: {
|
||||
encoded: 'Bytes'
|
||||
},
|
||||
/**
|
||||
* Lookup131: xcm::v1::multiasset::MultiAssetFilter
|
||||
**/
|
||||
XcmV1MultiassetMultiAssetFilter: {
|
||||
_enum: {
|
||||
Definite: 'XcmV1MultiassetMultiAssets',
|
||||
Wild: 'XcmV1MultiassetWildMultiAsset'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup132: xcm::v1::multiasset::WildMultiAsset
|
||||
**/
|
||||
XcmV1MultiassetWildMultiAsset: {
|
||||
_enum: {
|
||||
All: 'Null',
|
||||
AllOf: {
|
||||
id: 'XcmV1MultiassetAssetId',
|
||||
fun: 'XcmV1MultiassetWildFungibility'
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup133: xcm::v1::multiasset::WildFungibility
|
||||
**/
|
||||
XcmV1MultiassetWildFungibility: {
|
||||
_enum: ['Fungible', 'NonFungible']
|
||||
},
|
||||
/**
|
||||
* Lookup134: xcm::v2::WeightLimit
|
||||
**/
|
||||
XcmV2WeightLimit: {
|
||||
_enum: {
|
||||
Unlimited: 'Null',
|
||||
Limited: 'Compact<u64>'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup136: xcm::VersionedMultiAssets
|
||||
**/
|
||||
XcmVersionedMultiAssets: {
|
||||
_enum: {
|
||||
V0: 'Vec<XcmV0MultiAsset>',
|
||||
V1: 'XcmV1MultiassetMultiAssets'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup138: xcm::v0::multi_asset::MultiAsset
|
||||
**/
|
||||
XcmV0MultiAsset: {
|
||||
_enum: {
|
||||
None: 'Null',
|
||||
All: 'Null',
|
||||
AllFungible: 'Null',
|
||||
AllNonFungible: 'Null',
|
||||
AllAbstractFungible: {
|
||||
id: 'Bytes',
|
||||
},
|
||||
AllAbstractNonFungible: {
|
||||
class: 'Bytes',
|
||||
},
|
||||
AllConcreteFungible: {
|
||||
id: 'XcmV0MultiLocation',
|
||||
},
|
||||
AllConcreteNonFungible: {
|
||||
class: 'XcmV0MultiLocation',
|
||||
},
|
||||
AbstractFungible: {
|
||||
id: 'Bytes',
|
||||
amount: 'Compact<u128>',
|
||||
},
|
||||
AbstractNonFungible: {
|
||||
class: 'Bytes',
|
||||
instance: 'XcmV1MultiassetAssetInstance',
|
||||
},
|
||||
ConcreteFungible: {
|
||||
id: 'XcmV0MultiLocation',
|
||||
amount: 'Compact<u128>',
|
||||
},
|
||||
ConcreteNonFungible: {
|
||||
class: 'XcmV0MultiLocation',
|
||||
instance: 'XcmV1MultiassetAssetInstance'
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup139: xcm::v0::multi_location::MultiLocation
|
||||
**/
|
||||
XcmV0MultiLocation: {
|
||||
_enum: {
|
||||
Null: 'Null',
|
||||
X1: 'XcmV0Junction',
|
||||
X2: '(XcmV0Junction,XcmV0Junction)',
|
||||
X3: '(XcmV0Junction,XcmV0Junction,XcmV0Junction)',
|
||||
X4: '(XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction)',
|
||||
X5: '(XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction)',
|
||||
X6: '(XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction)',
|
||||
X7: '(XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction)',
|
||||
X8: '(XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction,XcmV0Junction)'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup140: xcm::v0::junction::Junction
|
||||
**/
|
||||
XcmV0Junction: {
|
||||
_enum: {
|
||||
Parent: 'Null',
|
||||
Parachain: 'Compact<u32>',
|
||||
AccountId32: {
|
||||
network: 'XcmV0JunctionNetworkId',
|
||||
id: '[u8;32]',
|
||||
},
|
||||
AccountIndex64: {
|
||||
network: 'XcmV0JunctionNetworkId',
|
||||
index: 'Compact<u64>',
|
||||
},
|
||||
AccountKey20: {
|
||||
network: 'XcmV0JunctionNetworkId',
|
||||
key: '[u8;20]',
|
||||
},
|
||||
PalletInstance: 'u8',
|
||||
GeneralIndex: 'Compact<u128>',
|
||||
GeneralKey: 'Bytes',
|
||||
OnlyChild: 'Null',
|
||||
Plurality: {
|
||||
id: 'XcmV0JunctionBodyId',
|
||||
part: 'XcmV0JunctionBodyPart'
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup141: xcm::VersionedMultiLocation
|
||||
**/
|
||||
XcmVersionedMultiLocation: {
|
||||
_enum: {
|
||||
V0: 'XcmV0MultiLocation',
|
||||
V1: 'XcmV1MultiLocation'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup239: kusama_runtime::SessionKeys
|
||||
**/
|
||||
KusamaRuntimeSessionKeys: {
|
||||
grandpa: 'SpFinalityGrandpaAppPublic',
|
||||
babe: 'SpConsensusBabeAppPublic',
|
||||
imOnline: 'PalletImOnlineSr25519AppSr25519Public',
|
||||
paraValidator: 'PolkadotPrimitivesV0ValidatorAppPublic',
|
||||
paraAssignment: 'PolkadotPrimitivesV1AssignmentAppPublic',
|
||||
authorityDiscovery: 'SpAuthorityDiscoveryAppPublic'
|
||||
},
|
||||
/**
|
||||
* Lookup369: kusama_runtime::NposCompactSolution24
|
||||
**/
|
||||
KusamaRuntimeNposCompactSolution24: {
|
||||
votes1: 'Vec<(Compact<u32>,Compact<u16>)>',
|
||||
votes2: 'Vec<(Compact<u32>,(Compact<u16>,Compact<PerU16>),Compact<u16>)>',
|
||||
votes3: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);2],Compact<u16>)>',
|
||||
votes4: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);3],Compact<u16>)>',
|
||||
votes5: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);4],Compact<u16>)>',
|
||||
votes6: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);5],Compact<u16>)>',
|
||||
votes7: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);6],Compact<u16>)>',
|
||||
votes8: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);7],Compact<u16>)>',
|
||||
votes9: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);8],Compact<u16>)>',
|
||||
votes10: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);9],Compact<u16>)>',
|
||||
votes11: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);10],Compact<u16>)>',
|
||||
votes12: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);11],Compact<u16>)>',
|
||||
votes13: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);12],Compact<u16>)>',
|
||||
votes14: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);13],Compact<u16>)>',
|
||||
votes15: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);14],Compact<u16>)>',
|
||||
votes16: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);15],Compact<u16>)>',
|
||||
votes17: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);16],Compact<u16>)>',
|
||||
votes18: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);17],Compact<u16>)>',
|
||||
votes19: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);18],Compact<u16>)>',
|
||||
votes20: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);19],Compact<u16>)>',
|
||||
votes21: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);20],Compact<u16>)>',
|
||||
votes22: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);21],Compact<u16>)>',
|
||||
votes23: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);22],Compact<u16>)>',
|
||||
votes24: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);23],Compact<u16>)>'
|
||||
},
|
||||
/**
|
||||
* Lookup502: xcm::VersionedXcm<Call>
|
||||
**/
|
||||
XcmVersionedXcm: {
|
||||
_enum: {
|
||||
V0: 'XcmV0Xcm',
|
||||
V1: 'XcmV1Xcm',
|
||||
V2: 'XcmV2Xcm'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup503: xcm::v0::Xcm<Call>
|
||||
**/
|
||||
XcmV0Xcm: {
|
||||
_enum: {
|
||||
WithdrawAsset: {
|
||||
assets: 'Vec<XcmV0MultiAsset>',
|
||||
effects: 'Vec<XcmV0Order>',
|
||||
},
|
||||
ReserveAssetDeposit: {
|
||||
assets: 'Vec<XcmV0MultiAsset>',
|
||||
effects: 'Vec<XcmV0Order>',
|
||||
},
|
||||
TeleportAsset: {
|
||||
assets: 'Vec<XcmV0MultiAsset>',
|
||||
effects: 'Vec<XcmV0Order>',
|
||||
},
|
||||
QueryResponse: {
|
||||
queryId: 'Compact<u64>',
|
||||
response: 'XcmV0Response',
|
||||
},
|
||||
TransferAsset: {
|
||||
assets: 'Vec<XcmV0MultiAsset>',
|
||||
dest: 'XcmV0MultiLocation',
|
||||
},
|
||||
TransferReserveAsset: {
|
||||
assets: 'Vec<XcmV0MultiAsset>',
|
||||
dest: 'XcmV0MultiLocation',
|
||||
effects: 'Vec<XcmV0Order>',
|
||||
},
|
||||
Transact: {
|
||||
_alias: {
|
||||
call_: 'call',
|
||||
},
|
||||
originType: 'XcmV0OriginKind',
|
||||
requireWeightAtMost: 'u64',
|
||||
call_: 'XcmDoubleEncoded',
|
||||
},
|
||||
HrmpNewChannelOpenRequest: {
|
||||
sender: 'Compact<u32>',
|
||||
maxMessageSize: 'Compact<u32>',
|
||||
maxCapacity: 'Compact<u32>',
|
||||
},
|
||||
HrmpChannelAccepted: {
|
||||
recipient: 'Compact<u32>',
|
||||
},
|
||||
HrmpChannelClosing: {
|
||||
initiator: 'Compact<u32>',
|
||||
sender: 'Compact<u32>',
|
||||
recipient: 'Compact<u32>',
|
||||
},
|
||||
RelayedFrom: {
|
||||
who: 'XcmV0MultiLocation',
|
||||
message: 'XcmV0Xcm'
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup505: xcm::v0::order::Order<Call>
|
||||
**/
|
||||
XcmV0Order: {
|
||||
_enum: {
|
||||
Null: 'Null',
|
||||
DepositAsset: {
|
||||
assets: 'Vec<XcmV0MultiAsset>',
|
||||
dest: 'XcmV0MultiLocation',
|
||||
},
|
||||
DepositReserveAsset: {
|
||||
assets: 'Vec<XcmV0MultiAsset>',
|
||||
dest: 'XcmV0MultiLocation',
|
||||
effects: 'Vec<XcmV0Order>',
|
||||
},
|
||||
ExchangeAsset: {
|
||||
give: 'Vec<XcmV0MultiAsset>',
|
||||
receive: 'Vec<XcmV0MultiAsset>',
|
||||
},
|
||||
InitiateReserveWithdraw: {
|
||||
assets: 'Vec<XcmV0MultiAsset>',
|
||||
reserve: 'XcmV0MultiLocation',
|
||||
effects: 'Vec<XcmV0Order>',
|
||||
},
|
||||
InitiateTeleport: {
|
||||
assets: 'Vec<XcmV0MultiAsset>',
|
||||
dest: 'XcmV0MultiLocation',
|
||||
effects: 'Vec<XcmV0Order>',
|
||||
},
|
||||
QueryHolding: {
|
||||
queryId: 'Compact<u64>',
|
||||
dest: 'XcmV0MultiLocation',
|
||||
assets: 'Vec<XcmV0MultiAsset>',
|
||||
},
|
||||
BuyExecution: {
|
||||
fees: 'XcmV0MultiAsset',
|
||||
weight: 'u64',
|
||||
debt: 'u64',
|
||||
haltOnError: 'bool',
|
||||
xcm: 'Vec<XcmV0Xcm>'
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup507: xcm::v0::Response
|
||||
**/
|
||||
XcmV0Response: {
|
||||
_enum: {
|
||||
Assets: 'Vec<XcmV0MultiAsset>'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup508: xcm::v1::Xcm<Call>
|
||||
**/
|
||||
XcmV1Xcm: {
|
||||
_enum: {
|
||||
WithdrawAsset: {
|
||||
assets: 'XcmV1MultiassetMultiAssets',
|
||||
effects: 'Vec<XcmV1Order>',
|
||||
},
|
||||
ReserveAssetDeposited: {
|
||||
assets: 'XcmV1MultiassetMultiAssets',
|
||||
effects: 'Vec<XcmV1Order>',
|
||||
},
|
||||
ReceiveTeleportedAsset: {
|
||||
assets: 'XcmV1MultiassetMultiAssets',
|
||||
effects: 'Vec<XcmV1Order>',
|
||||
},
|
||||
QueryResponse: {
|
||||
queryId: 'Compact<u64>',
|
||||
response: 'XcmV1Response',
|
||||
},
|
||||
TransferAsset: {
|
||||
assets: 'XcmV1MultiassetMultiAssets',
|
||||
beneficiary: 'XcmV1MultiLocation',
|
||||
},
|
||||
TransferReserveAsset: {
|
||||
assets: 'XcmV1MultiassetMultiAssets',
|
||||
dest: 'XcmV1MultiLocation',
|
||||
effects: 'Vec<XcmV1Order>',
|
||||
},
|
||||
Transact: {
|
||||
_alias: {
|
||||
call_: 'call',
|
||||
},
|
||||
originType: 'XcmV0OriginKind',
|
||||
requireWeightAtMost: 'u64',
|
||||
call_: 'XcmDoubleEncoded',
|
||||
},
|
||||
HrmpNewChannelOpenRequest: {
|
||||
sender: 'Compact<u32>',
|
||||
maxMessageSize: 'Compact<u32>',
|
||||
maxCapacity: 'Compact<u32>',
|
||||
},
|
||||
HrmpChannelAccepted: {
|
||||
recipient: 'Compact<u32>',
|
||||
},
|
||||
HrmpChannelClosing: {
|
||||
initiator: 'Compact<u32>',
|
||||
sender: 'Compact<u32>',
|
||||
recipient: 'Compact<u32>',
|
||||
},
|
||||
RelayedFrom: {
|
||||
who: 'XcmV1MultilocationJunctions',
|
||||
message: 'XcmV1Xcm',
|
||||
},
|
||||
SubscribeVersion: {
|
||||
queryId: 'Compact<u64>',
|
||||
maxResponseWeight: 'Compact<u64>',
|
||||
},
|
||||
UnsubscribeVersion: 'Null'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup510: xcm::v1::order::Order<Call>
|
||||
**/
|
||||
XcmV1Order: {
|
||||
_enum: {
|
||||
Noop: 'Null',
|
||||
DepositAsset: {
|
||||
assets: 'XcmV1MultiassetMultiAssetFilter',
|
||||
maxAssets: 'u32',
|
||||
beneficiary: 'XcmV1MultiLocation',
|
||||
},
|
||||
DepositReserveAsset: {
|
||||
assets: 'XcmV1MultiassetMultiAssetFilter',
|
||||
maxAssets: 'u32',
|
||||
dest: 'XcmV1MultiLocation',
|
||||
effects: 'Vec<XcmV1Order>',
|
||||
},
|
||||
ExchangeAsset: {
|
||||
give: 'XcmV1MultiassetMultiAssetFilter',
|
||||
receive: 'XcmV1MultiassetMultiAssets',
|
||||
},
|
||||
InitiateReserveWithdraw: {
|
||||
assets: 'XcmV1MultiassetMultiAssetFilter',
|
||||
reserve: 'XcmV1MultiLocation',
|
||||
effects: 'Vec<XcmV1Order>',
|
||||
},
|
||||
InitiateTeleport: {
|
||||
assets: 'XcmV1MultiassetMultiAssetFilter',
|
||||
dest: 'XcmV1MultiLocation',
|
||||
effects: 'Vec<XcmV1Order>',
|
||||
},
|
||||
QueryHolding: {
|
||||
queryId: 'Compact<u64>',
|
||||
dest: 'XcmV1MultiLocation',
|
||||
assets: 'XcmV1MultiassetMultiAssetFilter',
|
||||
},
|
||||
BuyExecution: {
|
||||
fees: 'XcmV1MultiAsset',
|
||||
weight: 'u64',
|
||||
debt: 'u64',
|
||||
haltOnError: 'bool',
|
||||
instructions: 'Vec<XcmV1Xcm>'
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup512: xcm::v1::Response
|
||||
**/
|
||||
XcmV1Response: {
|
||||
_enum: {
|
||||
Assets: 'XcmV1MultiassetMultiAssets',
|
||||
Version: 'u32'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup573: kusama_runtime::OriginCaller
|
||||
**/
|
||||
KusamaRuntimeOriginCaller: {
|
||||
_enum: {
|
||||
system: 'FrameSystemRawOrigin',
|
||||
Unused1: 'Null',
|
||||
Unused2: 'Null',
|
||||
Unused3: 'Null',
|
||||
Unused4: 'Null',
|
||||
Void: 'SpCoreVoid',
|
||||
Unused6: 'Null',
|
||||
Unused7: 'Null',
|
||||
Unused8: 'Null',
|
||||
Unused9: 'Null',
|
||||
Unused10: 'Null',
|
||||
Unused11: 'Null',
|
||||
Unused12: 'Null',
|
||||
Unused13: 'Null',
|
||||
Council: 'PalletCollectiveRawOrigin',
|
||||
TechnicalCommittee: 'PalletCollectiveRawOrigin',
|
||||
Unused16: 'Null',
|
||||
Unused17: 'Null',
|
||||
Unused18: 'Null',
|
||||
Unused19: 'Null',
|
||||
Unused20: 'Null',
|
||||
Unused21: 'Null',
|
||||
Unused22: 'Null',
|
||||
Unused23: 'Null',
|
||||
Unused24: 'Null',
|
||||
Unused25: 'Null',
|
||||
Unused26: 'Null',
|
||||
Unused27: 'Null',
|
||||
Unused28: 'Null',
|
||||
Unused29: 'Null',
|
||||
Unused30: 'Null',
|
||||
Unused31: 'Null',
|
||||
Unused32: 'Null',
|
||||
Unused33: 'Null',
|
||||
Unused34: 'Null',
|
||||
Unused35: 'Null',
|
||||
Unused36: 'Null',
|
||||
Unused37: 'Null',
|
||||
Unused38: 'Null',
|
||||
Unused39: 'Null',
|
||||
Unused40: 'Null',
|
||||
Unused41: 'Null',
|
||||
Unused42: 'Null',
|
||||
Unused43: 'Null',
|
||||
Unused44: 'Null',
|
||||
Unused45: 'Null',
|
||||
Unused46: 'Null',
|
||||
Unused47: 'Null',
|
||||
Unused48: 'Null',
|
||||
Unused49: 'Null',
|
||||
ParachainsOrigin: 'PolkadotRuntimeParachainsOriginPalletOrigin',
|
||||
Unused51: 'Null',
|
||||
Unused52: 'Null',
|
||||
Unused53: 'Null',
|
||||
Unused54: 'Null',
|
||||
Unused55: 'Null',
|
||||
Unused56: 'Null',
|
||||
Unused57: 'Null',
|
||||
Unused58: 'Null',
|
||||
Unused59: 'Null',
|
||||
Unused60: 'Null',
|
||||
Unused61: 'Null',
|
||||
Unused62: 'Null',
|
||||
Unused63: 'Null',
|
||||
Unused64: 'Null',
|
||||
Unused65: 'Null',
|
||||
Unused66: 'Null',
|
||||
Unused67: 'Null',
|
||||
Unused68: 'Null',
|
||||
Unused69: 'Null',
|
||||
Unused70: 'Null',
|
||||
Unused71: 'Null',
|
||||
Unused72: 'Null',
|
||||
Unused73: 'Null',
|
||||
Unused74: 'Null',
|
||||
Unused75: 'Null',
|
||||
Unused76: 'Null',
|
||||
Unused77: 'Null',
|
||||
Unused78: 'Null',
|
||||
Unused79: 'Null',
|
||||
Unused80: 'Null',
|
||||
Unused81: 'Null',
|
||||
Unused82: 'Null',
|
||||
Unused83: 'Null',
|
||||
Unused84: 'Null',
|
||||
Unused85: 'Null',
|
||||
Unused86: 'Null',
|
||||
Unused87: 'Null',
|
||||
Unused88: 'Null',
|
||||
Unused89: 'Null',
|
||||
Unused90: 'Null',
|
||||
Unused91: 'Null',
|
||||
Unused92: 'Null',
|
||||
Unused93: 'Null',
|
||||
Unused94: 'Null',
|
||||
Unused95: 'Null',
|
||||
Unused96: 'Null',
|
||||
Unused97: 'Null',
|
||||
Unused98: 'Null',
|
||||
XcmPallet: 'PalletXcmOrigin'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup578: pallet_xcm::pallet::Origin
|
||||
**/
|
||||
PalletXcmOrigin: {
|
||||
_enum: {
|
||||
Xcm: 'XcmV1MultiLocation',
|
||||
Response: 'XcmV1MultiLocation'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup682: pallet_xcm::pallet::QueryStatus<BlockNumber>
|
||||
**/
|
||||
PalletXcmQueryStatus: {
|
||||
_enum: {
|
||||
Pending: {
|
||||
responder: 'XcmVersionedMultiLocation',
|
||||
maybeNotify: 'Option<(u8,u8)>',
|
||||
timeout: 'u32',
|
||||
},
|
||||
VersionNotifier: {
|
||||
origin: 'XcmVersionedMultiLocation',
|
||||
isActive: 'bool',
|
||||
},
|
||||
Ready: {
|
||||
response: 'XcmVersionedResponse',
|
||||
at: 'u32'
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup685: xcm::VersionedResponse
|
||||
**/
|
||||
XcmVersionedResponse: {
|
||||
_enum: {
|
||||
V0: 'XcmV0Response',
|
||||
V1: 'XcmV1Response',
|
||||
V2: 'XcmV2Response'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup691: pallet_xcm::pallet::VersionMigrationStage
|
||||
**/
|
||||
PalletXcmVersionMigrationStage: {
|
||||
_enum: {
|
||||
MigrateSupportedVersion: 'Null',
|
||||
MigrateVersionNotifiers: 'Null',
|
||||
NotifyCurrentTargets: 'Option<Bytes>',
|
||||
MigrateAndNotifyOldTargets: 'Null'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup703: kusama_runtime::Runtime
|
||||
**/
|
||||
KusamaRuntimeRuntime: 'Null'
|
||||
} as DefinitionsTypes;
|
||||
@@ -0,0 +1,600 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import type { DefinitionsTypes } from '../../types';
|
||||
|
||||
export default {
|
||||
/**
|
||||
* Lookup66: polkadot_runtime_common::claims::EthereumAddress
|
||||
**/
|
||||
PolkadotRuntimeCommonClaimsEthereumAddress: '[u8;20]',
|
||||
/**
|
||||
* Lookup72: polkadot_runtime::ProxyType
|
||||
**/
|
||||
PolkadotRuntimeProxyType: {
|
||||
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'Unused4', 'IdentityJudgement', 'CancelProxy', 'Auction']
|
||||
},
|
||||
/**
|
||||
* Lookup82: polkadot_primitives::v1::CandidateReceipt<primitive_types::H256>
|
||||
**/
|
||||
PolkadotPrimitivesV1CandidateReceipt: {
|
||||
descriptor: 'PolkadotPrimitivesV1CandidateDescriptor',
|
||||
commitmentsHash: 'H256'
|
||||
},
|
||||
/**
|
||||
* Lookup83: polkadot_primitives::v1::CandidateDescriptor<primitive_types::H256>
|
||||
**/
|
||||
PolkadotPrimitivesV1CandidateDescriptor: {
|
||||
paraId: 'u32',
|
||||
relayParent: 'H256',
|
||||
collator: 'PolkadotPrimitivesV0CollatorAppPublic',
|
||||
persistedValidationDataHash: 'H256',
|
||||
povHash: 'H256',
|
||||
erasureRoot: 'H256',
|
||||
signature: 'PolkadotPrimitivesV0CollatorAppSignature',
|
||||
paraHead: 'H256',
|
||||
validationCodeHash: 'H256'
|
||||
},
|
||||
/**
|
||||
* Lookup85: polkadot_primitives::v0::collator_app::Public
|
||||
**/
|
||||
PolkadotPrimitivesV0CollatorAppPublic: 'SpCoreSr25519Public',
|
||||
/**
|
||||
* Lookup86: polkadot_primitives::v0::collator_app::Signature
|
||||
**/
|
||||
PolkadotPrimitivesV0CollatorAppSignature: 'SpCoreSr25519Signature',
|
||||
/**
|
||||
* Lookup95: xcm::v2::traits::Outcome
|
||||
**/
|
||||
XcmV2TraitsOutcome: {
|
||||
_enum: {
|
||||
Complete: 'u64',
|
||||
Incomplete: '(u64,XcmV2TraitsError)',
|
||||
Error: 'XcmV2TraitsError'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup96: xcm::v2::traits::Error
|
||||
**/
|
||||
XcmV2TraitsError: {
|
||||
_enum: {
|
||||
Undefined: 'Null',
|
||||
Overflow: 'Null',
|
||||
Unimplemented: 'Null',
|
||||
UnhandledXcmVersion: 'Null',
|
||||
UnhandledXcmMessage: 'Null',
|
||||
UnhandledEffect: 'Null',
|
||||
EscalationOfPrivilege: 'Null',
|
||||
UntrustedReserveLocation: 'Null',
|
||||
UntrustedTeleportLocation: 'Null',
|
||||
DestinationBufferOverflow: 'Null',
|
||||
MultiLocationFull: 'Null',
|
||||
MultiLocationNotInvertible: 'Null',
|
||||
FailedToDecode: 'Null',
|
||||
BadOrigin: 'Null',
|
||||
ExceedsMaxMessageSize: 'Null',
|
||||
FailedToTransactAsset: 'Null',
|
||||
WeightLimitReached: 'u64',
|
||||
Wildcard: 'Null',
|
||||
TooMuchWeightRequired: 'Null',
|
||||
NotHoldingFees: 'Null',
|
||||
WeightNotComputable: 'Null',
|
||||
Barrier: 'Null',
|
||||
NotWithdrawable: 'Null',
|
||||
LocationCannotHold: 'Null',
|
||||
TooExpensive: 'Null',
|
||||
AssetNotFound: 'Null',
|
||||
DestinationUnsupported: 'Null',
|
||||
RecursionLimitReached: 'Null',
|
||||
Transport: 'Null',
|
||||
Unroutable: 'Null',
|
||||
UnknownWeightRequired: 'Null',
|
||||
Trap: 'u64',
|
||||
UnknownClaim: 'Null',
|
||||
InvalidLocation: 'Null'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup98: polkadot_parachain::primitives::HrmpChannelId
|
||||
**/
|
||||
PolkadotParachainPrimitivesHrmpChannelId: {
|
||||
sender: 'u32',
|
||||
recipient: 'u32'
|
||||
},
|
||||
/**
|
||||
* Lookup161: polkadot_runtime::SessionKeys
|
||||
**/
|
||||
PolkadotRuntimeSessionKeys: {
|
||||
grandpa: 'SpFinalityGrandpaAppPublic',
|
||||
babe: 'SpConsensusBabeAppPublic',
|
||||
imOnline: 'PalletImOnlineSr25519AppSr25519Public',
|
||||
paraValidator: 'PolkadotPrimitivesV0ValidatorAppPublic',
|
||||
paraAssignment: 'PolkadotPrimitivesV1AssignmentAppPublic',
|
||||
authorityDiscovery: 'SpAuthorityDiscoveryAppPublic'
|
||||
},
|
||||
/**
|
||||
* Lookup162: polkadot_primitives::v0::validator_app::Public
|
||||
**/
|
||||
PolkadotPrimitivesV0ValidatorAppPublic: 'SpCoreSr25519Public',
|
||||
/**
|
||||
* Lookup163: polkadot_primitives::v1::assignment_app::Public
|
||||
**/
|
||||
PolkadotPrimitivesV1AssignmentAppPublic: 'SpCoreSr25519Public',
|
||||
/**
|
||||
* Lookup195: polkadot_runtime_common::claims::EcdsaSignature
|
||||
**/
|
||||
PolkadotRuntimeCommonClaimsEcdsaSignature: '[u8;65]',
|
||||
/**
|
||||
* Lookup200: polkadot_runtime_common::claims::StatementKind
|
||||
**/
|
||||
PolkadotRuntimeCommonClaimsStatementKind: {
|
||||
_enum: ['Regular', 'Saft']
|
||||
},
|
||||
/**
|
||||
* Lookup253: polkadot_runtime::NposCompactSolution16
|
||||
**/
|
||||
PolkadotRuntimeNposCompactSolution16: {
|
||||
votes1: 'Vec<(Compact<u32>,Compact<u16>)>',
|
||||
votes2: 'Vec<(Compact<u32>,(Compact<u16>,Compact<PerU16>),Compact<u16>)>',
|
||||
votes3: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);2],Compact<u16>)>',
|
||||
votes4: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);3],Compact<u16>)>',
|
||||
votes5: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);4],Compact<u16>)>',
|
||||
votes6: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);5],Compact<u16>)>',
|
||||
votes7: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);6],Compact<u16>)>',
|
||||
votes8: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);7],Compact<u16>)>',
|
||||
votes9: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);8],Compact<u16>)>',
|
||||
votes10: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);9],Compact<u16>)>',
|
||||
votes11: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);10],Compact<u16>)>',
|
||||
votes12: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);11],Compact<u16>)>',
|
||||
votes13: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);12],Compact<u16>)>',
|
||||
votes14: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);13],Compact<u16>)>',
|
||||
votes15: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);14],Compact<u16>)>',
|
||||
votes16: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);15],Compact<u16>)>'
|
||||
},
|
||||
/**
|
||||
* Lookup314: polkadot_primitives::v1::InherentData<sp_runtime::generic::header::Header<Number, sp_runtime::traits::BlakeTwo256>>
|
||||
**/
|
||||
PolkadotPrimitivesV1InherentData: {
|
||||
bitfields: 'Vec<PolkadotPrimitivesV1SignedUncheckedSigned>',
|
||||
backedCandidates: 'Vec<PolkadotPrimitivesV1BackedCandidate>',
|
||||
disputes: 'Vec<PolkadotPrimitivesV1DisputeStatementSet>',
|
||||
parentHeader: 'SpRuntimeGenericHeader'
|
||||
},
|
||||
/**
|
||||
* Lookup316: polkadot_primitives::v1::signed::UncheckedSigned<polkadot_primitives::v1::AvailabilityBitfield, polkadot_primitives::v1::AvailabilityBitfield>
|
||||
**/
|
||||
PolkadotPrimitivesV1SignedUncheckedSigned: {
|
||||
payload: 'BitVec',
|
||||
validatorIndex: 'u32',
|
||||
signature: 'PolkadotPrimitivesV0ValidatorAppSignature'
|
||||
},
|
||||
/**
|
||||
* Lookup319: bitvec::order::Lsb0
|
||||
**/
|
||||
BitvecOrderLsb0: 'Null',
|
||||
/**
|
||||
* Lookup321: polkadot_primitives::v0::validator_app::Signature
|
||||
**/
|
||||
PolkadotPrimitivesV0ValidatorAppSignature: 'SpCoreSr25519Signature',
|
||||
/**
|
||||
* Lookup323: polkadot_primitives::v1::BackedCandidate<primitive_types::H256>
|
||||
**/
|
||||
PolkadotPrimitivesV1BackedCandidate: {
|
||||
candidate: 'PolkadotPrimitivesV1CommittedCandidateReceipt',
|
||||
validityVotes: 'Vec<PolkadotPrimitivesV0ValidityAttestation>',
|
||||
validatorIndices: 'BitVec'
|
||||
},
|
||||
/**
|
||||
* Lookup324: polkadot_primitives::v1::CommittedCandidateReceipt<primitive_types::H256>
|
||||
**/
|
||||
PolkadotPrimitivesV1CommittedCandidateReceipt: {
|
||||
descriptor: 'PolkadotPrimitivesV1CandidateDescriptor',
|
||||
commitments: 'PolkadotPrimitivesV1CandidateCommitments'
|
||||
},
|
||||
/**
|
||||
* Lookup325: polkadot_primitives::v1::CandidateCommitments<N>
|
||||
**/
|
||||
PolkadotPrimitivesV1CandidateCommitments: {
|
||||
upwardMessages: 'Vec<Bytes>',
|
||||
horizontalMessages: 'Vec<PolkadotCorePrimitivesOutboundHrmpMessage>',
|
||||
newValidationCode: 'Option<Bytes>',
|
||||
headData: 'Bytes',
|
||||
processedDownwardMessages: 'u32',
|
||||
hrmpWatermark: 'u32'
|
||||
},
|
||||
/**
|
||||
* Lookup327: polkadot_core_primitives::OutboundHrmpMessage<polkadot_parachain::primitives::Id>
|
||||
**/
|
||||
PolkadotCorePrimitivesOutboundHrmpMessage: {
|
||||
recipient: 'u32',
|
||||
data: 'Bytes'
|
||||
},
|
||||
/**
|
||||
* Lookup331: polkadot_primitives::v0::ValidityAttestation
|
||||
**/
|
||||
PolkadotPrimitivesV0ValidityAttestation: {
|
||||
_enum: {
|
||||
Unused0: 'Null',
|
||||
Implicit: 'PolkadotPrimitivesV0ValidatorAppSignature',
|
||||
Explicit: 'PolkadotPrimitivesV0ValidatorAppSignature'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup333: polkadot_primitives::v1::DisputeStatementSet
|
||||
**/
|
||||
PolkadotPrimitivesV1DisputeStatementSet: {
|
||||
candidateHash: 'H256',
|
||||
session: 'u32',
|
||||
statements: 'Vec<(PolkadotPrimitivesV1DisputeStatement,u32,PolkadotPrimitivesV0ValidatorAppSignature)>'
|
||||
},
|
||||
/**
|
||||
* Lookup337: polkadot_primitives::v1::DisputeStatement
|
||||
**/
|
||||
PolkadotPrimitivesV1DisputeStatement: {
|
||||
_enum: {
|
||||
Valid: 'PolkadotPrimitivesV1ValidDisputeStatementKind',
|
||||
Invalid: 'PolkadotPrimitivesV1InvalidDisputeStatementKind'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup338: polkadot_primitives::v1::ValidDisputeStatementKind
|
||||
**/
|
||||
PolkadotPrimitivesV1ValidDisputeStatementKind: {
|
||||
_enum: {
|
||||
Explicit: 'Null',
|
||||
BackingSeconded: 'H256',
|
||||
BackingValid: 'H256',
|
||||
ApprovalChecking: 'Null'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup339: polkadot_primitives::v1::InvalidDisputeStatementKind
|
||||
**/
|
||||
PolkadotPrimitivesV1InvalidDisputeStatementKind: {
|
||||
_enum: ['Explicit']
|
||||
},
|
||||
/**
|
||||
* Lookup351: sp_runtime::MultiSigner
|
||||
**/
|
||||
SpRuntimeMultiSigner: {
|
||||
_enum: {
|
||||
Ed25519: 'SpCoreEd25519Public',
|
||||
Sr25519: 'SpCoreSr25519Public',
|
||||
Ecdsa: 'SpCoreEcdsaPublic'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup352: sp_core::ecdsa::Public
|
||||
**/
|
||||
SpCoreEcdsaPublic: '[u8;33]',
|
||||
/**
|
||||
* Lookup357: polkadot_runtime::OriginCaller
|
||||
**/
|
||||
PolkadotRuntimeOriginCaller: {
|
||||
_enum: {
|
||||
system: 'FrameSystemRawOrigin',
|
||||
Unused1: 'Null',
|
||||
Unused2: 'Null',
|
||||
Unused3: 'Null',
|
||||
Void: 'SpCoreVoid',
|
||||
Unused5: 'Null',
|
||||
Unused6: 'Null',
|
||||
Unused7: 'Null',
|
||||
Unused8: 'Null',
|
||||
Unused9: 'Null',
|
||||
Unused10: 'Null',
|
||||
Unused11: 'Null',
|
||||
Unused12: 'Null',
|
||||
Unused13: 'Null',
|
||||
Unused14: 'Null',
|
||||
Council: 'PalletCollectiveRawOrigin',
|
||||
TechnicalCommittee: 'PalletCollectiveRawOrigin',
|
||||
Unused17: 'Null',
|
||||
Unused18: 'Null',
|
||||
Unused19: 'Null',
|
||||
Unused20: 'Null',
|
||||
Unused21: 'Null',
|
||||
Unused22: 'Null',
|
||||
Unused23: 'Null',
|
||||
Unused24: 'Null',
|
||||
Unused25: 'Null',
|
||||
Unused26: 'Null',
|
||||
Unused27: 'Null',
|
||||
Unused28: 'Null',
|
||||
Unused29: 'Null',
|
||||
Unused30: 'Null',
|
||||
Unused31: 'Null',
|
||||
Unused32: 'Null',
|
||||
Unused33: 'Null',
|
||||
Unused34: 'Null',
|
||||
Unused35: 'Null',
|
||||
Unused36: 'Null',
|
||||
Unused37: 'Null',
|
||||
Unused38: 'Null',
|
||||
Unused39: 'Null',
|
||||
Unused40: 'Null',
|
||||
Unused41: 'Null',
|
||||
Unused42: 'Null',
|
||||
Unused43: 'Null',
|
||||
Unused44: 'Null',
|
||||
Unused45: 'Null',
|
||||
Unused46: 'Null',
|
||||
Unused47: 'Null',
|
||||
Unused48: 'Null',
|
||||
Unused49: 'Null',
|
||||
ParachainsOrigin: 'PolkadotRuntimeParachainsOriginPalletOrigin'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup361: polkadot_runtime_parachains::origin::pallet::Origin
|
||||
**/
|
||||
PolkadotRuntimeParachainsOriginPalletOrigin: {
|
||||
_enum: {
|
||||
Parachain: 'u32'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup506: polkadot_runtime_parachains::configuration::HostConfiguration<BlockNumber>
|
||||
**/
|
||||
PolkadotRuntimeParachainsConfigurationHostConfiguration: {
|
||||
maxCodeSize: 'u32',
|
||||
maxHeadDataSize: 'u32',
|
||||
maxUpwardQueueCount: 'u32',
|
||||
maxUpwardQueueSize: 'u32',
|
||||
maxUpwardMessageSize: 'u32',
|
||||
maxUpwardMessageNumPerCandidate: 'u32',
|
||||
hrmpMaxMessageNumPerCandidate: 'u32',
|
||||
validationUpgradeFrequency: 'u32',
|
||||
validationUpgradeDelay: 'u32',
|
||||
maxPovSize: 'u32',
|
||||
maxDownwardMessageSize: 'u32',
|
||||
umpServiceTotalWeight: 'u64',
|
||||
hrmpMaxParachainOutboundChannels: 'u32',
|
||||
hrmpMaxParathreadOutboundChannels: 'u32',
|
||||
hrmpSenderDeposit: 'u128',
|
||||
hrmpRecipientDeposit: 'u128',
|
||||
hrmpChannelMaxCapacity: 'u32',
|
||||
hrmpChannelMaxTotalSize: 'u32',
|
||||
hrmpMaxParachainInboundChannels: 'u32',
|
||||
hrmpMaxParathreadInboundChannels: 'u32',
|
||||
hrmpChannelMaxMessageSize: 'u32',
|
||||
codeRetentionPeriod: 'u32',
|
||||
parathreadCores: 'u32',
|
||||
parathreadRetries: 'u32',
|
||||
groupRotationFrequency: 'u32',
|
||||
chainAvailabilityPeriod: 'u32',
|
||||
threadAvailabilityPeriod: 'u32',
|
||||
schedulingLookahead: 'u32',
|
||||
maxValidatorsPerCore: 'Option<u32>',
|
||||
maxValidators: 'Option<u32>',
|
||||
disputePeriod: 'u32',
|
||||
disputePostConclusionAcceptancePeriod: 'u32',
|
||||
disputeMaxSpamSlots: 'u32',
|
||||
disputeConclusionByTimeOutPeriod: 'u32',
|
||||
noShowSlots: 'u32',
|
||||
nDelayTranches: 'u32',
|
||||
zerothDelayTrancheWidth: 'u32',
|
||||
neededApprovals: 'u32',
|
||||
relayVrfModuloSamples: 'u32',
|
||||
umpMaxIndividualWeight: 'u64'
|
||||
},
|
||||
/**
|
||||
* Lookup510: polkadot_runtime_parachains::inclusion::AvailabilityBitfieldRecord<N>
|
||||
**/
|
||||
PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord: {
|
||||
bitfield: 'BitVec',
|
||||
submittedAt: 'u32'
|
||||
},
|
||||
/**
|
||||
* Lookup511: polkadot_runtime_parachains::inclusion::CandidatePendingAvailability<primitive_types::H256, N>
|
||||
**/
|
||||
PolkadotRuntimeParachainsInclusionCandidatePendingAvailability: {
|
||||
_alias: {
|
||||
hash_: 'hash'
|
||||
},
|
||||
core: 'u32',
|
||||
hash_: 'H256',
|
||||
descriptor: 'PolkadotPrimitivesV1CandidateDescriptor',
|
||||
availabilityVotes: 'BitVec',
|
||||
backers: 'BitVec',
|
||||
relayParentNumber: 'u32',
|
||||
backedInNumber: 'u32',
|
||||
backingGroup: 'u32'
|
||||
},
|
||||
/**
|
||||
* Lookup515: polkadot_runtime_parachains::scheduler::ParathreadClaimQueue
|
||||
**/
|
||||
PolkadotRuntimeParachainsSchedulerParathreadClaimQueue: {
|
||||
queue: 'Vec<PolkadotRuntimeParachainsSchedulerQueuedParathread>',
|
||||
nextCoreOffset: 'u32'
|
||||
},
|
||||
/**
|
||||
* Lookup517: polkadot_runtime_parachains::scheduler::QueuedParathread
|
||||
**/
|
||||
PolkadotRuntimeParachainsSchedulerQueuedParathread: {
|
||||
claim: 'PolkadotPrimitivesV1ParathreadEntry',
|
||||
coreOffset: 'u32'
|
||||
},
|
||||
/**
|
||||
* Lookup518: polkadot_primitives::v1::ParathreadEntry
|
||||
**/
|
||||
PolkadotPrimitivesV1ParathreadEntry: {
|
||||
claim: 'PolkadotPrimitivesV1ParathreadClaim',
|
||||
retries: 'u32'
|
||||
},
|
||||
/**
|
||||
* Lookup519: polkadot_primitives::v1::ParathreadClaim
|
||||
**/
|
||||
PolkadotPrimitivesV1ParathreadClaim: '(u32,PolkadotPrimitivesV0CollatorAppPublic)',
|
||||
/**
|
||||
* Lookup522: polkadot_primitives::v1::CoreOccupied
|
||||
**/
|
||||
PolkadotPrimitivesV1CoreOccupied: {
|
||||
_enum: {
|
||||
Parathread: 'PolkadotPrimitivesV1ParathreadEntry',
|
||||
Parachain: 'Null'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup525: polkadot_runtime_parachains::scheduler::CoreAssignment
|
||||
**/
|
||||
PolkadotRuntimeParachainsSchedulerCoreAssignment: {
|
||||
core: 'u32',
|
||||
paraId: 'u32',
|
||||
kind: 'PolkadotRuntimeParachainsSchedulerAssignmentKind',
|
||||
groupIdx: 'u32'
|
||||
},
|
||||
/**
|
||||
* Lookup526: polkadot_runtime_parachains::scheduler::AssignmentKind
|
||||
**/
|
||||
PolkadotRuntimeParachainsSchedulerAssignmentKind: {
|
||||
_enum: {
|
||||
Parachain: 'Null',
|
||||
Parathread: '(PolkadotPrimitivesV0CollatorAppPublic,u32)'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup527: polkadot_runtime_parachains::paras::ParaLifecycle
|
||||
**/
|
||||
PolkadotRuntimeParachainsParasParaLifecycle: {
|
||||
_enum: ['Onboarding', 'Parathread', 'Parachain', 'UpgradingParathread', 'DowngradingParachain', 'OffboardingParathread', 'OffboardingParachain']
|
||||
},
|
||||
/**
|
||||
* Lookup529: polkadot_runtime_parachains::paras::ParaPastCodeMeta<N>
|
||||
**/
|
||||
PolkadotRuntimeParachainsParasParaPastCodeMeta: {
|
||||
upgradeTimes: 'Vec<PolkadotRuntimeParachainsParasReplacementTimes>',
|
||||
lastPruned: 'Option<u32>'
|
||||
},
|
||||
/**
|
||||
* Lookup531: polkadot_runtime_parachains::paras::ReplacementTimes<N>
|
||||
**/
|
||||
PolkadotRuntimeParachainsParasReplacementTimes: {
|
||||
expectedAt: 'u32',
|
||||
activatedAt: 'u32'
|
||||
},
|
||||
/**
|
||||
* Lookup533: polkadot_primitives::v1::UpgradeGoAhead
|
||||
**/
|
||||
PolkadotPrimitivesV1UpgradeGoAhead: {
|
||||
_enum: ['Abort', 'GoAhead']
|
||||
},
|
||||
/**
|
||||
* Lookup534: polkadot_primitives::v1::UpgradeRestriction
|
||||
**/
|
||||
PolkadotPrimitivesV1UpgradeRestriction: {
|
||||
_enum: ['Present']
|
||||
},
|
||||
/**
|
||||
* Lookup535: polkadot_runtime_parachains::paras::ParaGenesisArgs
|
||||
**/
|
||||
PolkadotRuntimeParachainsParasParaGenesisArgs: {
|
||||
genesisHead: 'Bytes',
|
||||
validationCode: 'Bytes',
|
||||
parachain: 'bool'
|
||||
},
|
||||
/**
|
||||
* Lookup538: polkadot_runtime_parachains::initializer::BufferedSessionChange
|
||||
**/
|
||||
PolkadotRuntimeParachainsInitializerBufferedSessionChange: {
|
||||
validators: 'Vec<PolkadotPrimitivesV0ValidatorAppPublic>',
|
||||
queued: 'Vec<PolkadotPrimitivesV0ValidatorAppPublic>',
|
||||
sessionIndex: 'u32'
|
||||
},
|
||||
/**
|
||||
* Lookup540: polkadot_core_primitives::InboundDownwardMessage<BlockNumber>
|
||||
**/
|
||||
PolkadotCorePrimitivesInboundDownwardMessage: {
|
||||
sentAt: 'u32',
|
||||
msg: 'Bytes'
|
||||
},
|
||||
/**
|
||||
* Lookup543: polkadot_runtime_parachains::hrmp::HrmpOpenChannelRequest
|
||||
**/
|
||||
PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest: {
|
||||
confirmed: 'bool',
|
||||
age: 'u32',
|
||||
senderDeposit: 'u128',
|
||||
maxMessageSize: 'u32',
|
||||
maxCapacity: 'u32',
|
||||
maxTotalSize: 'u32'
|
||||
},
|
||||
/**
|
||||
* Lookup545: polkadot_runtime_parachains::hrmp::HrmpChannel
|
||||
**/
|
||||
PolkadotRuntimeParachainsHrmpHrmpChannel: {
|
||||
maxCapacity: 'u32',
|
||||
maxTotalSize: 'u32',
|
||||
maxMessageSize: 'u32',
|
||||
msgCount: 'u32',
|
||||
totalSize: 'u32',
|
||||
mqcHead: 'Option<H256>',
|
||||
senderDeposit: 'u128',
|
||||
recipientDeposit: 'u128'
|
||||
},
|
||||
/**
|
||||
* Lookup548: polkadot_core_primitives::InboundHrmpMessage<BlockNumber>
|
||||
**/
|
||||
PolkadotCorePrimitivesInboundHrmpMessage: {
|
||||
sentAt: 'u32',
|
||||
data: 'Bytes'
|
||||
},
|
||||
/**
|
||||
* Lookup553: polkadot_primitives::v1::SessionInfo
|
||||
**/
|
||||
PolkadotPrimitivesV1SessionInfo: {
|
||||
validators: 'Vec<PolkadotPrimitivesV0ValidatorAppPublic>',
|
||||
discoveryKeys: 'Vec<SpAuthorityDiscoveryAppPublic>',
|
||||
assignmentKeys: 'Vec<PolkadotPrimitivesV1AssignmentAppPublic>',
|
||||
validatorGroups: 'Vec<Vec<u32>>',
|
||||
nCores: 'u32',
|
||||
zerothDelayTrancheWidth: 'u32',
|
||||
relayVrfModuloSamples: 'u32',
|
||||
nDelayTranches: 'u32',
|
||||
noShowSlots: 'u32',
|
||||
neededApprovals: 'u32'
|
||||
},
|
||||
/**
|
||||
* Lookup555: polkadot_runtime_common::paras_registrar::ParaInfo<sp_core::crypto::AccountId32, Balance>
|
||||
**/
|
||||
PolkadotRuntimeCommonParasRegistrarParaInfo: {
|
||||
manager: 'AccountId32',
|
||||
deposit: 'u128',
|
||||
locked: 'bool'
|
||||
},
|
||||
/**
|
||||
* Lookup565: polkadot_runtime_common::crowdloan::FundInfo<sp_core::crypto::AccountId32, Balance, BlockNumber, LeasePeriod>
|
||||
**/
|
||||
PolkadotRuntimeCommonCrowdloanFundInfo: {
|
||||
depositor: 'AccountId32',
|
||||
verifier: 'Option<SpRuntimeMultiSigner>',
|
||||
deposit: 'u128',
|
||||
raised: 'u128',
|
||||
end: 'u32',
|
||||
cap: 'u128',
|
||||
lastContribution: 'PolkadotRuntimeCommonCrowdloanLastContribution',
|
||||
firstPeriod: 'u32',
|
||||
lastPeriod: 'u32',
|
||||
trieIndex: 'u32'
|
||||
},
|
||||
/**
|
||||
* Lookup566: polkadot_runtime_common::crowdloan::LastContribution<BlockNumber>
|
||||
**/
|
||||
PolkadotRuntimeCommonCrowdloanLastContribution: {
|
||||
_enum: {
|
||||
Never: 'Null',
|
||||
PreEnding: 'u32',
|
||||
Ending: 'u32'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup578: polkadot_runtime_common::claims::PrevalidateAttests<T>
|
||||
**/
|
||||
PolkadotRuntimeCommonClaimsPrevalidateAttests: 'Null',
|
||||
/**
|
||||
* Lookup579: polkadot_runtime::Runtime
|
||||
**/
|
||||
PolkadotRuntimeRuntime: 'Null'
|
||||
} as DefinitionsTypes;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,904 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import type { Bytes, Compact, Enum, Null, Option, Result, Struct, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types';
|
||||
import type { PerU16 } from '@polkadot/types/interfaces/runtime';
|
||||
import type { ITuple } from '@polkadot/types/types';
|
||||
|
||||
declare module '@polkadot/types/lookup' {
|
||||
|
||||
/** @name KusamaRuntimeProxyType (74) */
|
||||
export interface KusamaRuntimeProxyType extends Enum {
|
||||
readonly isAny: boolean;
|
||||
readonly isNonTransfer: boolean;
|
||||
readonly isGovernance: boolean;
|
||||
readonly isStaking: boolean;
|
||||
readonly isIdentityJudgement: boolean;
|
||||
readonly isCancelProxy: boolean;
|
||||
readonly isAuction: boolean;
|
||||
}
|
||||
|
||||
/** @name XcmV1MultiLocation (108) */
|
||||
export interface XcmV1MultiLocation extends Struct {
|
||||
readonly parents: u8;
|
||||
readonly interior: XcmV1MultilocationJunctions;
|
||||
}
|
||||
|
||||
/** @name XcmV1MultilocationJunctions (109) */
|
||||
export interface XcmV1MultilocationJunctions extends Enum {
|
||||
readonly isHere: boolean;
|
||||
readonly isX1: boolean;
|
||||
readonly asX1: XcmV1Junction;
|
||||
readonly isX2: boolean;
|
||||
readonly asX2: ITuple<[XcmV1Junction, XcmV1Junction]>;
|
||||
readonly isX3: boolean;
|
||||
readonly asX3: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction]>;
|
||||
readonly isX4: boolean;
|
||||
readonly asX4: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction]>;
|
||||
readonly isX5: boolean;
|
||||
readonly asX5: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction]>;
|
||||
readonly isX6: boolean;
|
||||
readonly asX6: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction]>;
|
||||
readonly isX7: boolean;
|
||||
readonly asX7: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction]>;
|
||||
readonly isX8: boolean;
|
||||
readonly asX8: ITuple<[XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction, XcmV1Junction]>;
|
||||
}
|
||||
|
||||
/** @name XcmV1Junction (110) */
|
||||
export interface XcmV1Junction extends Enum {
|
||||
readonly isParachain: boolean;
|
||||
readonly asParachain: Compact<u32>;
|
||||
readonly isAccountId32: boolean;
|
||||
readonly asAccountId32: {
|
||||
readonly network: XcmV0JunctionNetworkId;
|
||||
readonly id: U8aFixed;
|
||||
} & Struct;
|
||||
readonly isAccountIndex64: boolean;
|
||||
readonly asAccountIndex64: {
|
||||
readonly network: XcmV0JunctionNetworkId;
|
||||
readonly index: Compact<u64>;
|
||||
} & Struct;
|
||||
readonly isAccountKey20: boolean;
|
||||
readonly asAccountKey20: {
|
||||
readonly network: XcmV0JunctionNetworkId;
|
||||
readonly key: U8aFixed;
|
||||
} & Struct;
|
||||
readonly isPalletInstance: boolean;
|
||||
readonly asPalletInstance: u8;
|
||||
readonly isGeneralIndex: boolean;
|
||||
readonly asGeneralIndex: Compact<u128>;
|
||||
readonly isGeneralKey: boolean;
|
||||
readonly asGeneralKey: Bytes;
|
||||
readonly isOnlyChild: boolean;
|
||||
readonly isPlurality: boolean;
|
||||
readonly asPlurality: {
|
||||
readonly id: XcmV0JunctionBodyId;
|
||||
readonly part: XcmV0JunctionBodyPart;
|
||||
} & Struct;
|
||||
}
|
||||
|
||||
/** @name XcmV0JunctionNetworkId (112) */
|
||||
export interface XcmV0JunctionNetworkId extends Enum {
|
||||
readonly isAny: boolean;
|
||||
readonly isNamed: boolean;
|
||||
readonly asNamed: Bytes;
|
||||
readonly isPolkadot: boolean;
|
||||
readonly isKusama: boolean;
|
||||
}
|
||||
|
||||
/** @name XcmV0JunctionBodyId (114) */
|
||||
export interface XcmV0JunctionBodyId extends Enum {
|
||||
readonly isUnit: boolean;
|
||||
readonly isNamed: boolean;
|
||||
readonly asNamed: Bytes;
|
||||
readonly isIndex: boolean;
|
||||
readonly asIndex: Compact<u32>;
|
||||
readonly isExecutive: boolean;
|
||||
readonly isTechnical: boolean;
|
||||
readonly isLegislative: boolean;
|
||||
readonly isJudicial: boolean;
|
||||
}
|
||||
|
||||
/** @name XcmV0JunctionBodyPart (115) */
|
||||
export interface XcmV0JunctionBodyPart extends Enum {
|
||||
readonly isVoice: boolean;
|
||||
readonly isMembers: boolean;
|
||||
readonly asMembers: {
|
||||
readonly count: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isFraction: boolean;
|
||||
readonly asFraction: {
|
||||
readonly nom: Compact<u32>;
|
||||
readonly denom: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isAtLeastProportion: boolean;
|
||||
readonly asAtLeastProportion: {
|
||||
readonly nom: Compact<u32>;
|
||||
readonly denom: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isMoreThanProportion: boolean;
|
||||
readonly asMoreThanProportion: {
|
||||
readonly nom: Compact<u32>;
|
||||
readonly denom: Compact<u32>;
|
||||
} & Struct;
|
||||
}
|
||||
|
||||
/** @name XcmV2Xcm (116) */
|
||||
export interface XcmV2Xcm extends Vec<XcmV2Instruction> {}
|
||||
|
||||
/** @name XcmV2Instruction (118) */
|
||||
export interface XcmV2Instruction extends Enum {
|
||||
readonly isWithdrawAsset: boolean;
|
||||
readonly asWithdrawAsset: XcmV1MultiassetMultiAssets;
|
||||
readonly isReserveAssetDeposited: boolean;
|
||||
readonly asReserveAssetDeposited: XcmV1MultiassetMultiAssets;
|
||||
readonly isReceiveTeleportedAsset: boolean;
|
||||
readonly asReceiveTeleportedAsset: XcmV1MultiassetMultiAssets;
|
||||
readonly isQueryResponse: boolean;
|
||||
readonly asQueryResponse: {
|
||||
readonly queryId: Compact<u64>;
|
||||
readonly response: XcmV2Response;
|
||||
readonly maxWeight: Compact<u64>;
|
||||
} & Struct;
|
||||
readonly isTransferAsset: boolean;
|
||||
readonly asTransferAsset: {
|
||||
readonly assets: XcmV1MultiassetMultiAssets;
|
||||
readonly beneficiary: XcmV1MultiLocation;
|
||||
} & Struct;
|
||||
readonly isTransferReserveAsset: boolean;
|
||||
readonly asTransferReserveAsset: {
|
||||
readonly assets: XcmV1MultiassetMultiAssets;
|
||||
readonly dest: XcmV1MultiLocation;
|
||||
readonly xcm: XcmV2Xcm;
|
||||
} & Struct;
|
||||
readonly isTransact: boolean;
|
||||
readonly asTransact: {
|
||||
readonly originType: XcmV0OriginKind;
|
||||
readonly requireWeightAtMost: Compact<u64>;
|
||||
readonly call_: XcmDoubleEncoded;
|
||||
} & Struct;
|
||||
readonly isHrmpNewChannelOpenRequest: boolean;
|
||||
readonly asHrmpNewChannelOpenRequest: {
|
||||
readonly sender: Compact<u32>;
|
||||
readonly maxMessageSize: Compact<u32>;
|
||||
readonly maxCapacity: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isHrmpChannelAccepted: boolean;
|
||||
readonly asHrmpChannelAccepted: {
|
||||
readonly recipient: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isHrmpChannelClosing: boolean;
|
||||
readonly asHrmpChannelClosing: {
|
||||
readonly initiator: Compact<u32>;
|
||||
readonly sender: Compact<u32>;
|
||||
readonly recipient: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isClearOrigin: boolean;
|
||||
readonly isDescendOrigin: boolean;
|
||||
readonly asDescendOrigin: XcmV1MultilocationJunctions;
|
||||
readonly isReportError: boolean;
|
||||
readonly asReportError: {
|
||||
readonly queryId: Compact<u64>;
|
||||
readonly dest: XcmV1MultiLocation;
|
||||
readonly maxResponseWeight: Compact<u64>;
|
||||
} & Struct;
|
||||
readonly isDepositAsset: boolean;
|
||||
readonly asDepositAsset: {
|
||||
readonly assets: XcmV1MultiassetMultiAssetFilter;
|
||||
readonly maxAssets: Compact<u32>;
|
||||
readonly beneficiary: XcmV1MultiLocation;
|
||||
} & Struct;
|
||||
readonly isDepositReserveAsset: boolean;
|
||||
readonly asDepositReserveAsset: {
|
||||
readonly assets: XcmV1MultiassetMultiAssetFilter;
|
||||
readonly maxAssets: Compact<u32>;
|
||||
readonly dest: XcmV1MultiLocation;
|
||||
readonly xcm: XcmV2Xcm;
|
||||
} & Struct;
|
||||
readonly isExchangeAsset: boolean;
|
||||
readonly asExchangeAsset: {
|
||||
readonly give: XcmV1MultiassetMultiAssetFilter;
|
||||
readonly receive: XcmV1MultiassetMultiAssets;
|
||||
} & Struct;
|
||||
readonly isInitiateReserveWithdraw: boolean;
|
||||
readonly asInitiateReserveWithdraw: {
|
||||
readonly assets: XcmV1MultiassetMultiAssetFilter;
|
||||
readonly reserve: XcmV1MultiLocation;
|
||||
readonly xcm: XcmV2Xcm;
|
||||
} & Struct;
|
||||
readonly isInitiateTeleport: boolean;
|
||||
readonly asInitiateTeleport: {
|
||||
readonly assets: XcmV1MultiassetMultiAssetFilter;
|
||||
readonly dest: XcmV1MultiLocation;
|
||||
readonly xcm: XcmV2Xcm;
|
||||
} & Struct;
|
||||
readonly isQueryHolding: boolean;
|
||||
readonly asQueryHolding: {
|
||||
readonly queryId: Compact<u64>;
|
||||
readonly dest: XcmV1MultiLocation;
|
||||
readonly assets: XcmV1MultiassetMultiAssetFilter;
|
||||
readonly maxResponseWeight: Compact<u64>;
|
||||
} & Struct;
|
||||
readonly isBuyExecution: boolean;
|
||||
readonly asBuyExecution: {
|
||||
readonly fees: XcmV1MultiAsset;
|
||||
readonly weightLimit: XcmV2WeightLimit;
|
||||
} & Struct;
|
||||
readonly isRefundSurplus: boolean;
|
||||
readonly isClearError: boolean;
|
||||
readonly isClaimAsset: boolean;
|
||||
readonly asClaimAsset: {
|
||||
readonly assets: XcmV1MultiassetMultiAssets;
|
||||
readonly ticket: XcmV1MultiLocation;
|
||||
} & Struct;
|
||||
readonly isTrap: boolean;
|
||||
readonly asTrap: Compact<u64>;
|
||||
readonly isSubscribeVersion: boolean;
|
||||
readonly asSubscribeVersion: {
|
||||
readonly queryId: Compact<u64>;
|
||||
readonly maxResponseWeight: Compact<u64>;
|
||||
} & Struct;
|
||||
readonly isUnsubscribeVersion: boolean;
|
||||
}
|
||||
|
||||
/** @name XcmV1MultiassetMultiAssets (119) */
|
||||
export interface XcmV1MultiassetMultiAssets extends Vec<XcmV1MultiAsset> {}
|
||||
|
||||
/** @name XcmV1MultiAsset (121) */
|
||||
export interface XcmV1MultiAsset extends Struct {
|
||||
readonly id: XcmV1MultiassetAssetId;
|
||||
readonly fun: XcmV1MultiassetFungibility;
|
||||
}
|
||||
|
||||
/** @name XcmV1MultiassetAssetId (122) */
|
||||
export interface XcmV1MultiassetAssetId extends Enum {
|
||||
readonly isConcrete: boolean;
|
||||
readonly asConcrete: XcmV1MultiLocation;
|
||||
readonly isAbstract: boolean;
|
||||
readonly asAbstract: Bytes;
|
||||
}
|
||||
|
||||
/** @name XcmV1MultiassetFungibility (123) */
|
||||
export interface XcmV1MultiassetFungibility extends Enum {
|
||||
readonly isFungible: boolean;
|
||||
readonly asFungible: Compact<u128>;
|
||||
readonly isNonFungible: boolean;
|
||||
readonly asNonFungible: XcmV1MultiassetAssetInstance;
|
||||
}
|
||||
|
||||
/** @name XcmV1MultiassetAssetInstance (124) */
|
||||
export interface XcmV1MultiassetAssetInstance extends Enum {
|
||||
readonly isUndefined: boolean;
|
||||
readonly isIndex: boolean;
|
||||
readonly asIndex: Compact<u128>;
|
||||
readonly isArray4: boolean;
|
||||
readonly asArray4: U8aFixed;
|
||||
readonly isArray8: boolean;
|
||||
readonly asArray8: U8aFixed;
|
||||
readonly isArray16: boolean;
|
||||
readonly asArray16: U8aFixed;
|
||||
readonly isArray32: boolean;
|
||||
readonly asArray32: U8aFixed;
|
||||
readonly isBlob: boolean;
|
||||
readonly asBlob: Bytes;
|
||||
}
|
||||
|
||||
/** @name XcmV2Response (126) */
|
||||
export interface XcmV2Response extends Enum {
|
||||
readonly isNull: boolean;
|
||||
readonly isAssets: boolean;
|
||||
readonly asAssets: XcmV1MultiassetMultiAssets;
|
||||
readonly isExecutionResult: boolean;
|
||||
readonly asExecutionResult: Result<Null, ITuple<[u32, XcmV2TraitsError]>>;
|
||||
readonly isVersion: boolean;
|
||||
readonly asVersion: u32;
|
||||
}
|
||||
|
||||
/** @name XcmV0OriginKind (129) */
|
||||
export interface XcmV0OriginKind extends Enum {
|
||||
readonly isNative: boolean;
|
||||
readonly isSovereignAccount: boolean;
|
||||
readonly isSuperuser: boolean;
|
||||
readonly isXcm: boolean;
|
||||
}
|
||||
|
||||
/** @name XcmDoubleEncoded (130) */
|
||||
export interface XcmDoubleEncoded extends Struct {
|
||||
readonly encoded: Bytes;
|
||||
}
|
||||
|
||||
/** @name XcmV1MultiassetMultiAssetFilter (131) */
|
||||
export interface XcmV1MultiassetMultiAssetFilter extends Enum {
|
||||
readonly isDefinite: boolean;
|
||||
readonly asDefinite: XcmV1MultiassetMultiAssets;
|
||||
readonly isWild: boolean;
|
||||
readonly asWild: XcmV1MultiassetWildMultiAsset;
|
||||
}
|
||||
|
||||
/** @name XcmV1MultiassetWildMultiAsset (132) */
|
||||
export interface XcmV1MultiassetWildMultiAsset extends Enum {
|
||||
readonly isAll: boolean;
|
||||
readonly isAllOf: boolean;
|
||||
readonly asAllOf: {
|
||||
readonly id: XcmV1MultiassetAssetId;
|
||||
readonly fun: XcmV1MultiassetWildFungibility;
|
||||
} & Struct;
|
||||
}
|
||||
|
||||
/** @name XcmV1MultiassetWildFungibility (133) */
|
||||
export interface XcmV1MultiassetWildFungibility extends Enum {
|
||||
readonly isFungible: boolean;
|
||||
readonly isNonFungible: boolean;
|
||||
}
|
||||
|
||||
/** @name XcmV2WeightLimit (134) */
|
||||
export interface XcmV2WeightLimit extends Enum {
|
||||
readonly isUnlimited: boolean;
|
||||
readonly isLimited: boolean;
|
||||
readonly asLimited: Compact<u64>;
|
||||
}
|
||||
|
||||
/** @name XcmVersionedMultiAssets (136) */
|
||||
export interface XcmVersionedMultiAssets extends Enum {
|
||||
readonly isV0: boolean;
|
||||
readonly asV0: Vec<XcmV0MultiAsset>;
|
||||
readonly isV1: boolean;
|
||||
readonly asV1: XcmV1MultiassetMultiAssets;
|
||||
}
|
||||
|
||||
/** @name XcmV0MultiAsset (138) */
|
||||
export interface XcmV0MultiAsset extends Enum {
|
||||
readonly isNone: boolean;
|
||||
readonly isAll: boolean;
|
||||
readonly isAllFungible: boolean;
|
||||
readonly isAllNonFungible: boolean;
|
||||
readonly isAllAbstractFungible: boolean;
|
||||
readonly asAllAbstractFungible: {
|
||||
readonly id: Bytes;
|
||||
} & Struct;
|
||||
readonly isAllAbstractNonFungible: boolean;
|
||||
readonly asAllAbstractNonFungible: {
|
||||
readonly class: Bytes;
|
||||
} & Struct;
|
||||
readonly isAllConcreteFungible: boolean;
|
||||
readonly asAllConcreteFungible: {
|
||||
readonly id: XcmV0MultiLocation;
|
||||
} & Struct;
|
||||
readonly isAllConcreteNonFungible: boolean;
|
||||
readonly asAllConcreteNonFungible: {
|
||||
readonly class: XcmV0MultiLocation;
|
||||
} & Struct;
|
||||
readonly isAbstractFungible: boolean;
|
||||
readonly asAbstractFungible: {
|
||||
readonly id: Bytes;
|
||||
readonly amount: Compact<u128>;
|
||||
} & Struct;
|
||||
readonly isAbstractNonFungible: boolean;
|
||||
readonly asAbstractNonFungible: {
|
||||
readonly class: Bytes;
|
||||
readonly instance: XcmV1MultiassetAssetInstance;
|
||||
} & Struct;
|
||||
readonly isConcreteFungible: boolean;
|
||||
readonly asConcreteFungible: {
|
||||
readonly id: XcmV0MultiLocation;
|
||||
readonly amount: Compact<u128>;
|
||||
} & Struct;
|
||||
readonly isConcreteNonFungible: boolean;
|
||||
readonly asConcreteNonFungible: {
|
||||
readonly class: XcmV0MultiLocation;
|
||||
readonly instance: XcmV1MultiassetAssetInstance;
|
||||
} & Struct;
|
||||
}
|
||||
|
||||
/** @name XcmV0MultiLocation (139) */
|
||||
export interface XcmV0MultiLocation extends Enum {
|
||||
readonly isNull: boolean;
|
||||
readonly isX1: boolean;
|
||||
readonly asX1: XcmV0Junction;
|
||||
readonly isX2: boolean;
|
||||
readonly asX2: ITuple<[XcmV0Junction, XcmV0Junction]>;
|
||||
readonly isX3: boolean;
|
||||
readonly asX3: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction]>;
|
||||
readonly isX4: boolean;
|
||||
readonly asX4: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction]>;
|
||||
readonly isX5: boolean;
|
||||
readonly asX5: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction]>;
|
||||
readonly isX6: boolean;
|
||||
readonly asX6: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction]>;
|
||||
readonly isX7: boolean;
|
||||
readonly asX7: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction]>;
|
||||
readonly isX8: boolean;
|
||||
readonly asX8: ITuple<[XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction, XcmV0Junction]>;
|
||||
}
|
||||
|
||||
/** @name XcmV0Junction (140) */
|
||||
export interface XcmV0Junction extends Enum {
|
||||
readonly isParent: boolean;
|
||||
readonly isParachain: boolean;
|
||||
readonly asParachain: Compact<u32>;
|
||||
readonly isAccountId32: boolean;
|
||||
readonly asAccountId32: {
|
||||
readonly network: XcmV0JunctionNetworkId;
|
||||
readonly id: U8aFixed;
|
||||
} & Struct;
|
||||
readonly isAccountIndex64: boolean;
|
||||
readonly asAccountIndex64: {
|
||||
readonly network: XcmV0JunctionNetworkId;
|
||||
readonly index: Compact<u64>;
|
||||
} & Struct;
|
||||
readonly isAccountKey20: boolean;
|
||||
readonly asAccountKey20: {
|
||||
readonly network: XcmV0JunctionNetworkId;
|
||||
readonly key: U8aFixed;
|
||||
} & Struct;
|
||||
readonly isPalletInstance: boolean;
|
||||
readonly asPalletInstance: u8;
|
||||
readonly isGeneralIndex: boolean;
|
||||
readonly asGeneralIndex: Compact<u128>;
|
||||
readonly isGeneralKey: boolean;
|
||||
readonly asGeneralKey: Bytes;
|
||||
readonly isOnlyChild: boolean;
|
||||
readonly isPlurality: boolean;
|
||||
readonly asPlurality: {
|
||||
readonly id: XcmV0JunctionBodyId;
|
||||
readonly part: XcmV0JunctionBodyPart;
|
||||
} & Struct;
|
||||
}
|
||||
|
||||
/** @name XcmVersionedMultiLocation (141) */
|
||||
export interface XcmVersionedMultiLocation extends Enum {
|
||||
readonly isV0: boolean;
|
||||
readonly asV0: XcmV0MultiLocation;
|
||||
readonly isV1: boolean;
|
||||
readonly asV1: XcmV1MultiLocation;
|
||||
}
|
||||
|
||||
/** @name KusamaRuntimeSessionKeys (239) */
|
||||
export interface KusamaRuntimeSessionKeys extends Struct {
|
||||
readonly grandpa: SpFinalityGrandpaAppPublic;
|
||||
readonly babe: SpConsensusBabeAppPublic;
|
||||
readonly imOnline: PalletImOnlineSr25519AppSr25519Public;
|
||||
readonly paraValidator: PolkadotPrimitivesV0ValidatorAppPublic;
|
||||
readonly paraAssignment: PolkadotPrimitivesV1AssignmentAppPublic;
|
||||
readonly authorityDiscovery: SpAuthorityDiscoveryAppPublic;
|
||||
}
|
||||
|
||||
/** @name KusamaRuntimeNposCompactSolution24 (369) */
|
||||
export interface KusamaRuntimeNposCompactSolution24 extends Struct {
|
||||
readonly votes1: Vec<ITuple<[Compact<u32>, Compact<u16>]>>;
|
||||
readonly votes2: Vec<ITuple<[Compact<u32>, ITuple<[Compact<u16>, Compact<PerU16>]>, Compact<u16>]>>;
|
||||
readonly votes3: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes4: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes5: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes6: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes7: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes8: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes9: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes10: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes11: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes12: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes13: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes14: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes15: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes16: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes17: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes18: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes19: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes20: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes21: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes22: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes23: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes24: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
}
|
||||
|
||||
/** @name XcmVersionedXcm (502) */
|
||||
export interface XcmVersionedXcm extends Enum {
|
||||
readonly isV0: boolean;
|
||||
readonly asV0: XcmV0Xcm;
|
||||
readonly isV1: boolean;
|
||||
readonly asV1: XcmV1Xcm;
|
||||
readonly isV2: boolean;
|
||||
readonly asV2: XcmV2Xcm;
|
||||
}
|
||||
|
||||
/** @name XcmV0Xcm (503) */
|
||||
export interface XcmV0Xcm extends Enum {
|
||||
readonly isWithdrawAsset: boolean;
|
||||
readonly asWithdrawAsset: {
|
||||
readonly assets: Vec<XcmV0MultiAsset>;
|
||||
readonly effects: Vec<XcmV0Order>;
|
||||
} & Struct;
|
||||
readonly isReserveAssetDeposit: boolean;
|
||||
readonly asReserveAssetDeposit: {
|
||||
readonly assets: Vec<XcmV0MultiAsset>;
|
||||
readonly effects: Vec<XcmV0Order>;
|
||||
} & Struct;
|
||||
readonly isTeleportAsset: boolean;
|
||||
readonly asTeleportAsset: {
|
||||
readonly assets: Vec<XcmV0MultiAsset>;
|
||||
readonly effects: Vec<XcmV0Order>;
|
||||
} & Struct;
|
||||
readonly isQueryResponse: boolean;
|
||||
readonly asQueryResponse: {
|
||||
readonly queryId: Compact<u64>;
|
||||
readonly response: XcmV0Response;
|
||||
} & Struct;
|
||||
readonly isTransferAsset: boolean;
|
||||
readonly asTransferAsset: {
|
||||
readonly assets: Vec<XcmV0MultiAsset>;
|
||||
readonly dest: XcmV0MultiLocation;
|
||||
} & Struct;
|
||||
readonly isTransferReserveAsset: boolean;
|
||||
readonly asTransferReserveAsset: {
|
||||
readonly assets: Vec<XcmV0MultiAsset>;
|
||||
readonly dest: XcmV0MultiLocation;
|
||||
readonly effects: Vec<XcmV0Order>;
|
||||
} & Struct;
|
||||
readonly isTransact: boolean;
|
||||
readonly asTransact: {
|
||||
readonly originType: XcmV0OriginKind;
|
||||
readonly requireWeightAtMost: u64;
|
||||
readonly call_: XcmDoubleEncoded;
|
||||
} & Struct;
|
||||
readonly isHrmpNewChannelOpenRequest: boolean;
|
||||
readonly asHrmpNewChannelOpenRequest: {
|
||||
readonly sender: Compact<u32>;
|
||||
readonly maxMessageSize: Compact<u32>;
|
||||
readonly maxCapacity: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isHrmpChannelAccepted: boolean;
|
||||
readonly asHrmpChannelAccepted: {
|
||||
readonly recipient: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isHrmpChannelClosing: boolean;
|
||||
readonly asHrmpChannelClosing: {
|
||||
readonly initiator: Compact<u32>;
|
||||
readonly sender: Compact<u32>;
|
||||
readonly recipient: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isRelayedFrom: boolean;
|
||||
readonly asRelayedFrom: {
|
||||
readonly who: XcmV0MultiLocation;
|
||||
readonly message: XcmV0Xcm;
|
||||
} & Struct;
|
||||
}
|
||||
|
||||
/** @name XcmV0Order (505) */
|
||||
export interface XcmV0Order extends Enum {
|
||||
readonly isNull: boolean;
|
||||
readonly isDepositAsset: boolean;
|
||||
readonly asDepositAsset: {
|
||||
readonly assets: Vec<XcmV0MultiAsset>;
|
||||
readonly dest: XcmV0MultiLocation;
|
||||
} & Struct;
|
||||
readonly isDepositReserveAsset: boolean;
|
||||
readonly asDepositReserveAsset: {
|
||||
readonly assets: Vec<XcmV0MultiAsset>;
|
||||
readonly dest: XcmV0MultiLocation;
|
||||
readonly effects: Vec<XcmV0Order>;
|
||||
} & Struct;
|
||||
readonly isExchangeAsset: boolean;
|
||||
readonly asExchangeAsset: {
|
||||
readonly give: Vec<XcmV0MultiAsset>;
|
||||
readonly receive: Vec<XcmV0MultiAsset>;
|
||||
} & Struct;
|
||||
readonly isInitiateReserveWithdraw: boolean;
|
||||
readonly asInitiateReserveWithdraw: {
|
||||
readonly assets: Vec<XcmV0MultiAsset>;
|
||||
readonly reserve: XcmV0MultiLocation;
|
||||
readonly effects: Vec<XcmV0Order>;
|
||||
} & Struct;
|
||||
readonly isInitiateTeleport: boolean;
|
||||
readonly asInitiateTeleport: {
|
||||
readonly assets: Vec<XcmV0MultiAsset>;
|
||||
readonly dest: XcmV0MultiLocation;
|
||||
readonly effects: Vec<XcmV0Order>;
|
||||
} & Struct;
|
||||
readonly isQueryHolding: boolean;
|
||||
readonly asQueryHolding: {
|
||||
readonly queryId: Compact<u64>;
|
||||
readonly dest: XcmV0MultiLocation;
|
||||
readonly assets: Vec<XcmV0MultiAsset>;
|
||||
} & Struct;
|
||||
readonly isBuyExecution: boolean;
|
||||
readonly asBuyExecution: {
|
||||
readonly fees: XcmV0MultiAsset;
|
||||
readonly weight: u64;
|
||||
readonly debt: u64;
|
||||
readonly haltOnError: bool;
|
||||
readonly xcm: Vec<XcmV0Xcm>;
|
||||
} & Struct;
|
||||
}
|
||||
|
||||
/** @name XcmV0Response (507) */
|
||||
export interface XcmV0Response extends Enum {
|
||||
readonly isAssets: boolean;
|
||||
readonly asAssets: Vec<XcmV0MultiAsset>;
|
||||
}
|
||||
|
||||
/** @name XcmV1Xcm (508) */
|
||||
export interface XcmV1Xcm extends Enum {
|
||||
readonly isWithdrawAsset: boolean;
|
||||
readonly asWithdrawAsset: {
|
||||
readonly assets: XcmV1MultiassetMultiAssets;
|
||||
readonly effects: Vec<XcmV1Order>;
|
||||
} & Struct;
|
||||
readonly isReserveAssetDeposited: boolean;
|
||||
readonly asReserveAssetDeposited: {
|
||||
readonly assets: XcmV1MultiassetMultiAssets;
|
||||
readonly effects: Vec<XcmV1Order>;
|
||||
} & Struct;
|
||||
readonly isReceiveTeleportedAsset: boolean;
|
||||
readonly asReceiveTeleportedAsset: {
|
||||
readonly assets: XcmV1MultiassetMultiAssets;
|
||||
readonly effects: Vec<XcmV1Order>;
|
||||
} & Struct;
|
||||
readonly isQueryResponse: boolean;
|
||||
readonly asQueryResponse: {
|
||||
readonly queryId: Compact<u64>;
|
||||
readonly response: XcmV1Response;
|
||||
} & Struct;
|
||||
readonly isTransferAsset: boolean;
|
||||
readonly asTransferAsset: {
|
||||
readonly assets: XcmV1MultiassetMultiAssets;
|
||||
readonly beneficiary: XcmV1MultiLocation;
|
||||
} & Struct;
|
||||
readonly isTransferReserveAsset: boolean;
|
||||
readonly asTransferReserveAsset: {
|
||||
readonly assets: XcmV1MultiassetMultiAssets;
|
||||
readonly dest: XcmV1MultiLocation;
|
||||
readonly effects: Vec<XcmV1Order>;
|
||||
} & Struct;
|
||||
readonly isTransact: boolean;
|
||||
readonly asTransact: {
|
||||
readonly originType: XcmV0OriginKind;
|
||||
readonly requireWeightAtMost: u64;
|
||||
readonly call_: XcmDoubleEncoded;
|
||||
} & Struct;
|
||||
readonly isHrmpNewChannelOpenRequest: boolean;
|
||||
readonly asHrmpNewChannelOpenRequest: {
|
||||
readonly sender: Compact<u32>;
|
||||
readonly maxMessageSize: Compact<u32>;
|
||||
readonly maxCapacity: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isHrmpChannelAccepted: boolean;
|
||||
readonly asHrmpChannelAccepted: {
|
||||
readonly recipient: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isHrmpChannelClosing: boolean;
|
||||
readonly asHrmpChannelClosing: {
|
||||
readonly initiator: Compact<u32>;
|
||||
readonly sender: Compact<u32>;
|
||||
readonly recipient: Compact<u32>;
|
||||
} & Struct;
|
||||
readonly isRelayedFrom: boolean;
|
||||
readonly asRelayedFrom: {
|
||||
readonly who: XcmV1MultilocationJunctions;
|
||||
readonly message: XcmV1Xcm;
|
||||
} & Struct;
|
||||
readonly isSubscribeVersion: boolean;
|
||||
readonly asSubscribeVersion: {
|
||||
readonly queryId: Compact<u64>;
|
||||
readonly maxResponseWeight: Compact<u64>;
|
||||
} & Struct;
|
||||
readonly isUnsubscribeVersion: boolean;
|
||||
}
|
||||
|
||||
/** @name XcmV1Order (510) */
|
||||
export interface XcmV1Order extends Enum {
|
||||
readonly isNoop: boolean;
|
||||
readonly isDepositAsset: boolean;
|
||||
readonly asDepositAsset: {
|
||||
readonly assets: XcmV1MultiassetMultiAssetFilter;
|
||||
readonly maxAssets: u32;
|
||||
readonly beneficiary: XcmV1MultiLocation;
|
||||
} & Struct;
|
||||
readonly isDepositReserveAsset: boolean;
|
||||
readonly asDepositReserveAsset: {
|
||||
readonly assets: XcmV1MultiassetMultiAssetFilter;
|
||||
readonly maxAssets: u32;
|
||||
readonly dest: XcmV1MultiLocation;
|
||||
readonly effects: Vec<XcmV1Order>;
|
||||
} & Struct;
|
||||
readonly isExchangeAsset: boolean;
|
||||
readonly asExchangeAsset: {
|
||||
readonly give: XcmV1MultiassetMultiAssetFilter;
|
||||
readonly receive: XcmV1MultiassetMultiAssets;
|
||||
} & Struct;
|
||||
readonly isInitiateReserveWithdraw: boolean;
|
||||
readonly asInitiateReserveWithdraw: {
|
||||
readonly assets: XcmV1MultiassetMultiAssetFilter;
|
||||
readonly reserve: XcmV1MultiLocation;
|
||||
readonly effects: Vec<XcmV1Order>;
|
||||
} & Struct;
|
||||
readonly isInitiateTeleport: boolean;
|
||||
readonly asInitiateTeleport: {
|
||||
readonly assets: XcmV1MultiassetMultiAssetFilter;
|
||||
readonly dest: XcmV1MultiLocation;
|
||||
readonly effects: Vec<XcmV1Order>;
|
||||
} & Struct;
|
||||
readonly isQueryHolding: boolean;
|
||||
readonly asQueryHolding: {
|
||||
readonly queryId: Compact<u64>;
|
||||
readonly dest: XcmV1MultiLocation;
|
||||
readonly assets: XcmV1MultiassetMultiAssetFilter;
|
||||
} & Struct;
|
||||
readonly isBuyExecution: boolean;
|
||||
readonly asBuyExecution: {
|
||||
readonly fees: XcmV1MultiAsset;
|
||||
readonly weight: u64;
|
||||
readonly debt: u64;
|
||||
readonly haltOnError: bool;
|
||||
readonly instructions: Vec<XcmV1Xcm>;
|
||||
} & Struct;
|
||||
}
|
||||
|
||||
/** @name XcmV1Response (512) */
|
||||
export interface XcmV1Response extends Enum {
|
||||
readonly isAssets: boolean;
|
||||
readonly asAssets: XcmV1MultiassetMultiAssets;
|
||||
readonly isVersion: boolean;
|
||||
readonly asVersion: u32;
|
||||
}
|
||||
|
||||
/** @name KusamaRuntimeOriginCaller (573) */
|
||||
export interface KusamaRuntimeOriginCaller extends Enum {
|
||||
readonly isSystem: boolean;
|
||||
readonly asSystem: FrameSystemRawOrigin;
|
||||
readonly isUnused1: boolean;
|
||||
readonly isUnused2: boolean;
|
||||
readonly isUnused3: boolean;
|
||||
readonly isUnused4: boolean;
|
||||
readonly isVoid: boolean;
|
||||
readonly isUnused6: boolean;
|
||||
readonly isUnused7: boolean;
|
||||
readonly isUnused8: boolean;
|
||||
readonly isUnused9: boolean;
|
||||
readonly isUnused10: boolean;
|
||||
readonly isUnused11: boolean;
|
||||
readonly isUnused12: boolean;
|
||||
readonly isUnused13: boolean;
|
||||
readonly isCouncil: boolean;
|
||||
readonly asCouncil: PalletCollectiveRawOrigin;
|
||||
readonly isTechnicalCommittee: boolean;
|
||||
readonly asTechnicalCommittee: PalletCollectiveRawOrigin;
|
||||
readonly isUnused16: boolean;
|
||||
readonly isUnused17: boolean;
|
||||
readonly isUnused18: boolean;
|
||||
readonly isUnused19: boolean;
|
||||
readonly isUnused20: boolean;
|
||||
readonly isUnused21: boolean;
|
||||
readonly isUnused22: boolean;
|
||||
readonly isUnused23: boolean;
|
||||
readonly isUnused24: boolean;
|
||||
readonly isUnused25: boolean;
|
||||
readonly isUnused26: boolean;
|
||||
readonly isUnused27: boolean;
|
||||
readonly isUnused28: boolean;
|
||||
readonly isUnused29: boolean;
|
||||
readonly isUnused30: boolean;
|
||||
readonly isUnused31: boolean;
|
||||
readonly isUnused32: boolean;
|
||||
readonly isUnused33: boolean;
|
||||
readonly isUnused34: boolean;
|
||||
readonly isUnused35: boolean;
|
||||
readonly isUnused36: boolean;
|
||||
readonly isUnused37: boolean;
|
||||
readonly isUnused38: boolean;
|
||||
readonly isUnused39: boolean;
|
||||
readonly isUnused40: boolean;
|
||||
readonly isUnused41: boolean;
|
||||
readonly isUnused42: boolean;
|
||||
readonly isUnused43: boolean;
|
||||
readonly isUnused44: boolean;
|
||||
readonly isUnused45: boolean;
|
||||
readonly isUnused46: boolean;
|
||||
readonly isUnused47: boolean;
|
||||
readonly isUnused48: boolean;
|
||||
readonly isUnused49: boolean;
|
||||
readonly isParachainsOrigin: boolean;
|
||||
readonly asParachainsOrigin: PolkadotRuntimeParachainsOriginPalletOrigin;
|
||||
readonly isUnused51: boolean;
|
||||
readonly isUnused52: boolean;
|
||||
readonly isUnused53: boolean;
|
||||
readonly isUnused54: boolean;
|
||||
readonly isUnused55: boolean;
|
||||
readonly isUnused56: boolean;
|
||||
readonly isUnused57: boolean;
|
||||
readonly isUnused58: boolean;
|
||||
readonly isUnused59: boolean;
|
||||
readonly isUnused60: boolean;
|
||||
readonly isUnused61: boolean;
|
||||
readonly isUnused62: boolean;
|
||||
readonly isUnused63: boolean;
|
||||
readonly isUnused64: boolean;
|
||||
readonly isUnused65: boolean;
|
||||
readonly isUnused66: boolean;
|
||||
readonly isUnused67: boolean;
|
||||
readonly isUnused68: boolean;
|
||||
readonly isUnused69: boolean;
|
||||
readonly isUnused70: boolean;
|
||||
readonly isUnused71: boolean;
|
||||
readonly isUnused72: boolean;
|
||||
readonly isUnused73: boolean;
|
||||
readonly isUnused74: boolean;
|
||||
readonly isUnused75: boolean;
|
||||
readonly isUnused76: boolean;
|
||||
readonly isUnused77: boolean;
|
||||
readonly isUnused78: boolean;
|
||||
readonly isUnused79: boolean;
|
||||
readonly isUnused80: boolean;
|
||||
readonly isUnused81: boolean;
|
||||
readonly isUnused82: boolean;
|
||||
readonly isUnused83: boolean;
|
||||
readonly isUnused84: boolean;
|
||||
readonly isUnused85: boolean;
|
||||
readonly isUnused86: boolean;
|
||||
readonly isUnused87: boolean;
|
||||
readonly isUnused88: boolean;
|
||||
readonly isUnused89: boolean;
|
||||
readonly isUnused90: boolean;
|
||||
readonly isUnused91: boolean;
|
||||
readonly isUnused92: boolean;
|
||||
readonly isUnused93: boolean;
|
||||
readonly isUnused94: boolean;
|
||||
readonly isUnused95: boolean;
|
||||
readonly isUnused96: boolean;
|
||||
readonly isUnused97: boolean;
|
||||
readonly isUnused98: boolean;
|
||||
readonly isXcmPallet: boolean;
|
||||
readonly asXcmPallet: PalletXcmOrigin;
|
||||
}
|
||||
|
||||
/** @name PalletXcmOrigin (578) */
|
||||
export interface PalletXcmOrigin extends Enum {
|
||||
readonly isXcm: boolean;
|
||||
readonly asXcm: XcmV1MultiLocation;
|
||||
readonly isResponse: boolean;
|
||||
readonly asResponse: XcmV1MultiLocation;
|
||||
}
|
||||
|
||||
/** @name PalletXcmQueryStatus (682) */
|
||||
export interface PalletXcmQueryStatus extends Enum {
|
||||
readonly isPending: boolean;
|
||||
readonly asPending: {
|
||||
readonly responder: XcmVersionedMultiLocation;
|
||||
readonly maybeNotify: Option<ITuple<[u8, u8]>>;
|
||||
readonly timeout: u32;
|
||||
} & Struct;
|
||||
readonly isVersionNotifier: boolean;
|
||||
readonly asVersionNotifier: {
|
||||
readonly origin: XcmVersionedMultiLocation;
|
||||
readonly isActive: bool;
|
||||
} & Struct;
|
||||
readonly isReady: boolean;
|
||||
readonly asReady: {
|
||||
readonly response: XcmVersionedResponse;
|
||||
readonly at: u32;
|
||||
} & Struct;
|
||||
}
|
||||
|
||||
/** @name XcmVersionedResponse (685) */
|
||||
export interface XcmVersionedResponse extends Enum {
|
||||
readonly isV0: boolean;
|
||||
readonly asV0: XcmV0Response;
|
||||
readonly isV1: boolean;
|
||||
readonly asV1: XcmV1Response;
|
||||
readonly isV2: boolean;
|
||||
readonly asV2: XcmV2Response;
|
||||
}
|
||||
|
||||
/** @name PalletXcmVersionMigrationStage (691) */
|
||||
export interface PalletXcmVersionMigrationStage extends Enum {
|
||||
readonly isMigrateSupportedVersion: boolean;
|
||||
readonly isMigrateVersionNotifiers: boolean;
|
||||
readonly isNotifyCurrentTargets: boolean;
|
||||
readonly asNotifyCurrentTargets: Option<Bytes>;
|
||||
readonly isMigrateAndNotifyOldTargets: boolean;
|
||||
}
|
||||
|
||||
/** @name KusamaRuntimeRuntime (703) */
|
||||
export type KusamaRuntimeRuntime = Null;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,555 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import type { BitVec, Bytes, Compact, Enum, Null, Option, Struct, U8aFixed, Vec, bool, u128, u16, u32, u64 } from '@polkadot/types';
|
||||
import type { AccountId32, H256, PerU16 } from '@polkadot/types/interfaces/runtime';
|
||||
import type { ITuple } from '@polkadot/types/types';
|
||||
|
||||
declare module '@polkadot/types/lookup' {
|
||||
|
||||
/** @name PolkadotRuntimeCommonClaimsEthereumAddress (66) */
|
||||
export interface PolkadotRuntimeCommonClaimsEthereumAddress extends U8aFixed {}
|
||||
|
||||
/** @name PolkadotRuntimeProxyType (72) */
|
||||
export interface PolkadotRuntimeProxyType extends Enum {
|
||||
readonly isAny: boolean;
|
||||
readonly isNonTransfer: boolean;
|
||||
readonly isGovernance: boolean;
|
||||
readonly isStaking: boolean;
|
||||
readonly isUnused4: boolean;
|
||||
readonly isIdentityJudgement: boolean;
|
||||
readonly isCancelProxy: boolean;
|
||||
readonly isAuction: boolean;
|
||||
}
|
||||
|
||||
/** @name PolkadotPrimitivesV1CandidateReceipt (82) */
|
||||
export interface PolkadotPrimitivesV1CandidateReceipt extends Struct {
|
||||
readonly descriptor: PolkadotPrimitivesV1CandidateDescriptor;
|
||||
readonly commitmentsHash: H256;
|
||||
}
|
||||
|
||||
/** @name PolkadotPrimitivesV1CandidateDescriptor (83) */
|
||||
export interface PolkadotPrimitivesV1CandidateDescriptor extends Struct {
|
||||
readonly paraId: u32;
|
||||
readonly relayParent: H256;
|
||||
readonly collator: PolkadotPrimitivesV0CollatorAppPublic;
|
||||
readonly persistedValidationDataHash: H256;
|
||||
readonly povHash: H256;
|
||||
readonly erasureRoot: H256;
|
||||
readonly signature: PolkadotPrimitivesV0CollatorAppSignature;
|
||||
readonly paraHead: H256;
|
||||
readonly validationCodeHash: H256;
|
||||
}
|
||||
|
||||
/** @name PolkadotPrimitivesV0CollatorAppPublic (85) */
|
||||
export interface PolkadotPrimitivesV0CollatorAppPublic extends SpCoreSr25519Public {}
|
||||
|
||||
/** @name PolkadotPrimitivesV0CollatorAppSignature (86) */
|
||||
export interface PolkadotPrimitivesV0CollatorAppSignature extends SpCoreSr25519Signature {}
|
||||
|
||||
/** @name XcmV2TraitsOutcome (95) */
|
||||
export interface XcmV2TraitsOutcome extends Enum {
|
||||
readonly isComplete: boolean;
|
||||
readonly asComplete: u64;
|
||||
readonly isIncomplete: boolean;
|
||||
readonly asIncomplete: ITuple<[u64, XcmV2TraitsError]>;
|
||||
readonly isError: boolean;
|
||||
readonly asError: XcmV2TraitsError;
|
||||
}
|
||||
|
||||
/** @name XcmV2TraitsError (96) */
|
||||
export interface XcmV2TraitsError extends Enum {
|
||||
readonly isUndefined: boolean;
|
||||
readonly isOverflow: boolean;
|
||||
readonly isUnimplemented: boolean;
|
||||
readonly isUnhandledXcmVersion: boolean;
|
||||
readonly isUnhandledXcmMessage: boolean;
|
||||
readonly isUnhandledEffect: boolean;
|
||||
readonly isEscalationOfPrivilege: boolean;
|
||||
readonly isUntrustedReserveLocation: boolean;
|
||||
readonly isUntrustedTeleportLocation: boolean;
|
||||
readonly isDestinationBufferOverflow: boolean;
|
||||
readonly isMultiLocationFull: boolean;
|
||||
readonly isMultiLocationNotInvertible: boolean;
|
||||
readonly isFailedToDecode: boolean;
|
||||
readonly isBadOrigin: boolean;
|
||||
readonly isExceedsMaxMessageSize: boolean;
|
||||
readonly isFailedToTransactAsset: boolean;
|
||||
readonly isWeightLimitReached: boolean;
|
||||
readonly asWeightLimitReached: u64;
|
||||
readonly isWildcard: boolean;
|
||||
readonly isTooMuchWeightRequired: boolean;
|
||||
readonly isNotHoldingFees: boolean;
|
||||
readonly isWeightNotComputable: boolean;
|
||||
readonly isBarrier: boolean;
|
||||
readonly isNotWithdrawable: boolean;
|
||||
readonly isLocationCannotHold: boolean;
|
||||
readonly isTooExpensive: boolean;
|
||||
readonly isAssetNotFound: boolean;
|
||||
readonly isDestinationUnsupported: boolean;
|
||||
readonly isRecursionLimitReached: boolean;
|
||||
readonly isTransport: boolean;
|
||||
readonly isUnroutable: boolean;
|
||||
readonly isUnknownWeightRequired: boolean;
|
||||
readonly isTrap: boolean;
|
||||
readonly asTrap: u64;
|
||||
readonly isUnknownClaim: boolean;
|
||||
readonly isInvalidLocation: boolean;
|
||||
}
|
||||
|
||||
/** @name PolkadotParachainPrimitivesHrmpChannelId (98) */
|
||||
export interface PolkadotParachainPrimitivesHrmpChannelId extends Struct {
|
||||
readonly sender: u32;
|
||||
readonly recipient: u32;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeSessionKeys (161) */
|
||||
export interface PolkadotRuntimeSessionKeys extends Struct {
|
||||
readonly grandpa: SpFinalityGrandpaAppPublic;
|
||||
readonly babe: SpConsensusBabeAppPublic;
|
||||
readonly imOnline: PalletImOnlineSr25519AppSr25519Public;
|
||||
readonly paraValidator: PolkadotPrimitivesV0ValidatorAppPublic;
|
||||
readonly paraAssignment: PolkadotPrimitivesV1AssignmentAppPublic;
|
||||
readonly authorityDiscovery: SpAuthorityDiscoveryAppPublic;
|
||||
}
|
||||
|
||||
/** @name PolkadotPrimitivesV0ValidatorAppPublic (162) */
|
||||
export interface PolkadotPrimitivesV0ValidatorAppPublic extends SpCoreSr25519Public {}
|
||||
|
||||
/** @name PolkadotPrimitivesV1AssignmentAppPublic (163) */
|
||||
export interface PolkadotPrimitivesV1AssignmentAppPublic extends SpCoreSr25519Public {}
|
||||
|
||||
/** @name PolkadotRuntimeCommonClaimsEcdsaSignature (195) */
|
||||
export interface PolkadotRuntimeCommonClaimsEcdsaSignature extends U8aFixed {}
|
||||
|
||||
/** @name PolkadotRuntimeCommonClaimsStatementKind (200) */
|
||||
export interface PolkadotRuntimeCommonClaimsStatementKind extends Enum {
|
||||
readonly isRegular: boolean;
|
||||
readonly isSaft: boolean;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeNposCompactSolution16 (253) */
|
||||
export interface PolkadotRuntimeNposCompactSolution16 extends Struct {
|
||||
readonly votes1: Vec<ITuple<[Compact<u32>, Compact<u16>]>>;
|
||||
readonly votes2: Vec<ITuple<[Compact<u32>, ITuple<[Compact<u16>, Compact<PerU16>]>, Compact<u16>]>>;
|
||||
readonly votes3: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes4: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes5: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes6: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes7: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes8: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes9: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes10: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes11: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes12: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes13: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes14: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes15: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
readonly votes16: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
}
|
||||
|
||||
/** @name PolkadotPrimitivesV1InherentData (314) */
|
||||
export interface PolkadotPrimitivesV1InherentData extends Struct {
|
||||
readonly bitfields: Vec<PolkadotPrimitivesV1SignedUncheckedSigned>;
|
||||
readonly backedCandidates: Vec<PolkadotPrimitivesV1BackedCandidate>;
|
||||
readonly disputes: Vec<PolkadotPrimitivesV1DisputeStatementSet>;
|
||||
readonly parentHeader: SpRuntimeGenericHeader;
|
||||
}
|
||||
|
||||
/** @name PolkadotPrimitivesV1SignedUncheckedSigned (316) */
|
||||
export interface PolkadotPrimitivesV1SignedUncheckedSigned extends Struct {
|
||||
readonly payload: BitVec;
|
||||
readonly validatorIndex: u32;
|
||||
readonly signature: PolkadotPrimitivesV0ValidatorAppSignature;
|
||||
}
|
||||
|
||||
/** @name BitvecOrderLsb0 (319) */
|
||||
export type BitvecOrderLsb0 = Null;
|
||||
|
||||
/** @name PolkadotPrimitivesV0ValidatorAppSignature (321) */
|
||||
export interface PolkadotPrimitivesV0ValidatorAppSignature extends SpCoreSr25519Signature {}
|
||||
|
||||
/** @name PolkadotPrimitivesV1BackedCandidate (323) */
|
||||
export interface PolkadotPrimitivesV1BackedCandidate extends Struct {
|
||||
readonly candidate: PolkadotPrimitivesV1CommittedCandidateReceipt;
|
||||
readonly validityVotes: Vec<PolkadotPrimitivesV0ValidityAttestation>;
|
||||
readonly validatorIndices: BitVec;
|
||||
}
|
||||
|
||||
/** @name PolkadotPrimitivesV1CommittedCandidateReceipt (324) */
|
||||
export interface PolkadotPrimitivesV1CommittedCandidateReceipt extends Struct {
|
||||
readonly descriptor: PolkadotPrimitivesV1CandidateDescriptor;
|
||||
readonly commitments: PolkadotPrimitivesV1CandidateCommitments;
|
||||
}
|
||||
|
||||
/** @name PolkadotPrimitivesV1CandidateCommitments (325) */
|
||||
export interface PolkadotPrimitivesV1CandidateCommitments extends Struct {
|
||||
readonly upwardMessages: Vec<Bytes>;
|
||||
readonly horizontalMessages: Vec<PolkadotCorePrimitivesOutboundHrmpMessage>;
|
||||
readonly newValidationCode: Option<Bytes>;
|
||||
readonly headData: Bytes;
|
||||
readonly processedDownwardMessages: u32;
|
||||
readonly hrmpWatermark: u32;
|
||||
}
|
||||
|
||||
/** @name PolkadotCorePrimitivesOutboundHrmpMessage (327) */
|
||||
export interface PolkadotCorePrimitivesOutboundHrmpMessage extends Struct {
|
||||
readonly recipient: u32;
|
||||
readonly data: Bytes;
|
||||
}
|
||||
|
||||
/** @name PolkadotPrimitivesV0ValidityAttestation (331) */
|
||||
export interface PolkadotPrimitivesV0ValidityAttestation extends Enum {
|
||||
readonly isUnused0: boolean;
|
||||
readonly isImplicit: boolean;
|
||||
readonly asImplicit: PolkadotPrimitivesV0ValidatorAppSignature;
|
||||
readonly isExplicit: boolean;
|
||||
readonly asExplicit: PolkadotPrimitivesV0ValidatorAppSignature;
|
||||
}
|
||||
|
||||
/** @name PolkadotPrimitivesV1DisputeStatementSet (333) */
|
||||
export interface PolkadotPrimitivesV1DisputeStatementSet extends Struct {
|
||||
readonly candidateHash: H256;
|
||||
readonly session: u32;
|
||||
readonly statements: Vec<ITuple<[PolkadotPrimitivesV1DisputeStatement, u32, PolkadotPrimitivesV0ValidatorAppSignature]>>;
|
||||
}
|
||||
|
||||
/** @name PolkadotPrimitivesV1DisputeStatement (337) */
|
||||
export interface PolkadotPrimitivesV1DisputeStatement extends Enum {
|
||||
readonly isValid: boolean;
|
||||
readonly asValid: PolkadotPrimitivesV1ValidDisputeStatementKind;
|
||||
readonly isInvalid: boolean;
|
||||
readonly asInvalid: PolkadotPrimitivesV1InvalidDisputeStatementKind;
|
||||
}
|
||||
|
||||
/** @name PolkadotPrimitivesV1ValidDisputeStatementKind (338) */
|
||||
export interface PolkadotPrimitivesV1ValidDisputeStatementKind extends Enum {
|
||||
readonly isExplicit: boolean;
|
||||
readonly isBackingSeconded: boolean;
|
||||
readonly asBackingSeconded: H256;
|
||||
readonly isBackingValid: boolean;
|
||||
readonly asBackingValid: H256;
|
||||
readonly isApprovalChecking: boolean;
|
||||
}
|
||||
|
||||
/** @name PolkadotPrimitivesV1InvalidDisputeStatementKind (339) */
|
||||
export interface PolkadotPrimitivesV1InvalidDisputeStatementKind extends Enum {
|
||||
readonly isExplicit: boolean;
|
||||
}
|
||||
|
||||
/** @name SpRuntimeMultiSigner (351) */
|
||||
export interface SpRuntimeMultiSigner extends Enum {
|
||||
readonly isEd25519: boolean;
|
||||
readonly asEd25519: SpCoreEd25519Public;
|
||||
readonly isSr25519: boolean;
|
||||
readonly asSr25519: SpCoreSr25519Public;
|
||||
readonly isEcdsa: boolean;
|
||||
readonly asEcdsa: SpCoreEcdsaPublic;
|
||||
}
|
||||
|
||||
/** @name SpCoreEcdsaPublic (352) */
|
||||
export interface SpCoreEcdsaPublic extends U8aFixed {}
|
||||
|
||||
/** @name PolkadotRuntimeOriginCaller (357) */
|
||||
export interface PolkadotRuntimeOriginCaller extends Enum {
|
||||
readonly isSystem: boolean;
|
||||
readonly asSystem: FrameSystemRawOrigin;
|
||||
readonly isUnused1: boolean;
|
||||
readonly isUnused2: boolean;
|
||||
readonly isUnused3: boolean;
|
||||
readonly isVoid: boolean;
|
||||
readonly isUnused5: boolean;
|
||||
readonly isUnused6: boolean;
|
||||
readonly isUnused7: boolean;
|
||||
readonly isUnused8: boolean;
|
||||
readonly isUnused9: boolean;
|
||||
readonly isUnused10: boolean;
|
||||
readonly isUnused11: boolean;
|
||||
readonly isUnused12: boolean;
|
||||
readonly isUnused13: boolean;
|
||||
readonly isUnused14: boolean;
|
||||
readonly isCouncil: boolean;
|
||||
readonly asCouncil: PalletCollectiveRawOrigin;
|
||||
readonly isTechnicalCommittee: boolean;
|
||||
readonly asTechnicalCommittee: PalletCollectiveRawOrigin;
|
||||
readonly isUnused17: boolean;
|
||||
readonly isUnused18: boolean;
|
||||
readonly isUnused19: boolean;
|
||||
readonly isUnused20: boolean;
|
||||
readonly isUnused21: boolean;
|
||||
readonly isUnused22: boolean;
|
||||
readonly isUnused23: boolean;
|
||||
readonly isUnused24: boolean;
|
||||
readonly isUnused25: boolean;
|
||||
readonly isUnused26: boolean;
|
||||
readonly isUnused27: boolean;
|
||||
readonly isUnused28: boolean;
|
||||
readonly isUnused29: boolean;
|
||||
readonly isUnused30: boolean;
|
||||
readonly isUnused31: boolean;
|
||||
readonly isUnused32: boolean;
|
||||
readonly isUnused33: boolean;
|
||||
readonly isUnused34: boolean;
|
||||
readonly isUnused35: boolean;
|
||||
readonly isUnused36: boolean;
|
||||
readonly isUnused37: boolean;
|
||||
readonly isUnused38: boolean;
|
||||
readonly isUnused39: boolean;
|
||||
readonly isUnused40: boolean;
|
||||
readonly isUnused41: boolean;
|
||||
readonly isUnused42: boolean;
|
||||
readonly isUnused43: boolean;
|
||||
readonly isUnused44: boolean;
|
||||
readonly isUnused45: boolean;
|
||||
readonly isUnused46: boolean;
|
||||
readonly isUnused47: boolean;
|
||||
readonly isUnused48: boolean;
|
||||
readonly isUnused49: boolean;
|
||||
readonly isParachainsOrigin: boolean;
|
||||
readonly asParachainsOrigin: PolkadotRuntimeParachainsOriginPalletOrigin;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeParachainsOriginPalletOrigin (361) */
|
||||
export interface PolkadotRuntimeParachainsOriginPalletOrigin extends Enum {
|
||||
readonly isParachain: boolean;
|
||||
readonly asParachain: u32;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeParachainsConfigurationHostConfiguration (506) */
|
||||
export interface PolkadotRuntimeParachainsConfigurationHostConfiguration extends Struct {
|
||||
readonly maxCodeSize: u32;
|
||||
readonly maxHeadDataSize: u32;
|
||||
readonly maxUpwardQueueCount: u32;
|
||||
readonly maxUpwardQueueSize: u32;
|
||||
readonly maxUpwardMessageSize: u32;
|
||||
readonly maxUpwardMessageNumPerCandidate: u32;
|
||||
readonly hrmpMaxMessageNumPerCandidate: u32;
|
||||
readonly validationUpgradeFrequency: u32;
|
||||
readonly validationUpgradeDelay: u32;
|
||||
readonly maxPovSize: u32;
|
||||
readonly maxDownwardMessageSize: u32;
|
||||
readonly umpServiceTotalWeight: u64;
|
||||
readonly hrmpMaxParachainOutboundChannels: u32;
|
||||
readonly hrmpMaxParathreadOutboundChannels: u32;
|
||||
readonly hrmpSenderDeposit: u128;
|
||||
readonly hrmpRecipientDeposit: u128;
|
||||
readonly hrmpChannelMaxCapacity: u32;
|
||||
readonly hrmpChannelMaxTotalSize: u32;
|
||||
readonly hrmpMaxParachainInboundChannels: u32;
|
||||
readonly hrmpMaxParathreadInboundChannels: u32;
|
||||
readonly hrmpChannelMaxMessageSize: u32;
|
||||
readonly codeRetentionPeriod: u32;
|
||||
readonly parathreadCores: u32;
|
||||
readonly parathreadRetries: u32;
|
||||
readonly groupRotationFrequency: u32;
|
||||
readonly chainAvailabilityPeriod: u32;
|
||||
readonly threadAvailabilityPeriod: u32;
|
||||
readonly schedulingLookahead: u32;
|
||||
readonly maxValidatorsPerCore: Option<u32>;
|
||||
readonly maxValidators: Option<u32>;
|
||||
readonly disputePeriod: u32;
|
||||
readonly disputePostConclusionAcceptancePeriod: u32;
|
||||
readonly disputeMaxSpamSlots: u32;
|
||||
readonly disputeConclusionByTimeOutPeriod: u32;
|
||||
readonly noShowSlots: u32;
|
||||
readonly nDelayTranches: u32;
|
||||
readonly zerothDelayTrancheWidth: u32;
|
||||
readonly neededApprovals: u32;
|
||||
readonly relayVrfModuloSamples: u32;
|
||||
readonly umpMaxIndividualWeight: u64;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord (510) */
|
||||
export interface PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord extends Struct {
|
||||
readonly bitfield: BitVec;
|
||||
readonly submittedAt: u32;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeParachainsInclusionCandidatePendingAvailability (511) */
|
||||
export interface PolkadotRuntimeParachainsInclusionCandidatePendingAvailability extends Struct {
|
||||
readonly core: u32;
|
||||
readonly hash_: H256;
|
||||
readonly descriptor: PolkadotPrimitivesV1CandidateDescriptor;
|
||||
readonly availabilityVotes: BitVec;
|
||||
readonly backers: BitVec;
|
||||
readonly relayParentNumber: u32;
|
||||
readonly backedInNumber: u32;
|
||||
readonly backingGroup: u32;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeParachainsSchedulerParathreadClaimQueue (515) */
|
||||
export interface PolkadotRuntimeParachainsSchedulerParathreadClaimQueue extends Struct {
|
||||
readonly queue: Vec<PolkadotRuntimeParachainsSchedulerQueuedParathread>;
|
||||
readonly nextCoreOffset: u32;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeParachainsSchedulerQueuedParathread (517) */
|
||||
export interface PolkadotRuntimeParachainsSchedulerQueuedParathread extends Struct {
|
||||
readonly claim: PolkadotPrimitivesV1ParathreadEntry;
|
||||
readonly coreOffset: u32;
|
||||
}
|
||||
|
||||
/** @name PolkadotPrimitivesV1ParathreadEntry (518) */
|
||||
export interface PolkadotPrimitivesV1ParathreadEntry extends Struct {
|
||||
readonly claim: PolkadotPrimitivesV1ParathreadClaim;
|
||||
readonly retries: u32;
|
||||
}
|
||||
|
||||
/** @name PolkadotPrimitivesV1ParathreadClaim (519) */
|
||||
export interface PolkadotPrimitivesV1ParathreadClaim extends ITuple<[u32, PolkadotPrimitivesV0CollatorAppPublic]> {}
|
||||
|
||||
/** @name PolkadotPrimitivesV1CoreOccupied (522) */
|
||||
export interface PolkadotPrimitivesV1CoreOccupied extends Enum {
|
||||
readonly isParathread: boolean;
|
||||
readonly asParathread: PolkadotPrimitivesV1ParathreadEntry;
|
||||
readonly isParachain: boolean;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeParachainsSchedulerCoreAssignment (525) */
|
||||
export interface PolkadotRuntimeParachainsSchedulerCoreAssignment extends Struct {
|
||||
readonly core: u32;
|
||||
readonly paraId: u32;
|
||||
readonly kind: PolkadotRuntimeParachainsSchedulerAssignmentKind;
|
||||
readonly groupIdx: u32;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeParachainsSchedulerAssignmentKind (526) */
|
||||
export interface PolkadotRuntimeParachainsSchedulerAssignmentKind extends Enum {
|
||||
readonly isParachain: boolean;
|
||||
readonly isParathread: boolean;
|
||||
readonly asParathread: ITuple<[PolkadotPrimitivesV0CollatorAppPublic, u32]>;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeParachainsParasParaLifecycle (527) */
|
||||
export interface PolkadotRuntimeParachainsParasParaLifecycle extends Enum {
|
||||
readonly isOnboarding: boolean;
|
||||
readonly isParathread: boolean;
|
||||
readonly isParachain: boolean;
|
||||
readonly isUpgradingParathread: boolean;
|
||||
readonly isDowngradingParachain: boolean;
|
||||
readonly isOffboardingParathread: boolean;
|
||||
readonly isOffboardingParachain: boolean;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeParachainsParasParaPastCodeMeta (529) */
|
||||
export interface PolkadotRuntimeParachainsParasParaPastCodeMeta extends Struct {
|
||||
readonly upgradeTimes: Vec<PolkadotRuntimeParachainsParasReplacementTimes>;
|
||||
readonly lastPruned: Option<u32>;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeParachainsParasReplacementTimes (531) */
|
||||
export interface PolkadotRuntimeParachainsParasReplacementTimes extends Struct {
|
||||
readonly expectedAt: u32;
|
||||
readonly activatedAt: u32;
|
||||
}
|
||||
|
||||
/** @name PolkadotPrimitivesV1UpgradeGoAhead (533) */
|
||||
export interface PolkadotPrimitivesV1UpgradeGoAhead extends Enum {
|
||||
readonly isAbort: boolean;
|
||||
readonly isGoAhead: boolean;
|
||||
}
|
||||
|
||||
/** @name PolkadotPrimitivesV1UpgradeRestriction (534) */
|
||||
export interface PolkadotPrimitivesV1UpgradeRestriction extends Enum {
|
||||
readonly isPresent: boolean;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeParachainsParasParaGenesisArgs (535) */
|
||||
export interface PolkadotRuntimeParachainsParasParaGenesisArgs extends Struct {
|
||||
readonly genesisHead: Bytes;
|
||||
readonly validationCode: Bytes;
|
||||
readonly parachain: bool;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeParachainsInitializerBufferedSessionChange (538) */
|
||||
export interface PolkadotRuntimeParachainsInitializerBufferedSessionChange extends Struct {
|
||||
readonly validators: Vec<PolkadotPrimitivesV0ValidatorAppPublic>;
|
||||
readonly queued: Vec<PolkadotPrimitivesV0ValidatorAppPublic>;
|
||||
readonly sessionIndex: u32;
|
||||
}
|
||||
|
||||
/** @name PolkadotCorePrimitivesInboundDownwardMessage (540) */
|
||||
export interface PolkadotCorePrimitivesInboundDownwardMessage extends Struct {
|
||||
readonly sentAt: u32;
|
||||
readonly msg: Bytes;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest (543) */
|
||||
export interface PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest extends Struct {
|
||||
readonly confirmed: bool;
|
||||
readonly age: u32;
|
||||
readonly senderDeposit: u128;
|
||||
readonly maxMessageSize: u32;
|
||||
readonly maxCapacity: u32;
|
||||
readonly maxTotalSize: u32;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeParachainsHrmpHrmpChannel (545) */
|
||||
export interface PolkadotRuntimeParachainsHrmpHrmpChannel extends Struct {
|
||||
readonly maxCapacity: u32;
|
||||
readonly maxTotalSize: u32;
|
||||
readonly maxMessageSize: u32;
|
||||
readonly msgCount: u32;
|
||||
readonly totalSize: u32;
|
||||
readonly mqcHead: Option<H256>;
|
||||
readonly senderDeposit: u128;
|
||||
readonly recipientDeposit: u128;
|
||||
}
|
||||
|
||||
/** @name PolkadotCorePrimitivesInboundHrmpMessage (548) */
|
||||
export interface PolkadotCorePrimitivesInboundHrmpMessage extends Struct {
|
||||
readonly sentAt: u32;
|
||||
readonly data: Bytes;
|
||||
}
|
||||
|
||||
/** @name PolkadotPrimitivesV1SessionInfo (553) */
|
||||
export interface PolkadotPrimitivesV1SessionInfo extends Struct {
|
||||
readonly validators: Vec<PolkadotPrimitivesV0ValidatorAppPublic>;
|
||||
readonly discoveryKeys: Vec<SpAuthorityDiscoveryAppPublic>;
|
||||
readonly assignmentKeys: Vec<PolkadotPrimitivesV1AssignmentAppPublic>;
|
||||
readonly validatorGroups: Vec<Vec<u32>>;
|
||||
readonly nCores: u32;
|
||||
readonly zerothDelayTrancheWidth: u32;
|
||||
readonly relayVrfModuloSamples: u32;
|
||||
readonly nDelayTranches: u32;
|
||||
readonly noShowSlots: u32;
|
||||
readonly neededApprovals: u32;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeCommonParasRegistrarParaInfo (555) */
|
||||
export interface PolkadotRuntimeCommonParasRegistrarParaInfo extends Struct {
|
||||
readonly manager: AccountId32;
|
||||
readonly deposit: u128;
|
||||
readonly locked: bool;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeCommonCrowdloanFundInfo (565) */
|
||||
export interface PolkadotRuntimeCommonCrowdloanFundInfo extends Struct {
|
||||
readonly depositor: AccountId32;
|
||||
readonly verifier: Option<SpRuntimeMultiSigner>;
|
||||
readonly deposit: u128;
|
||||
readonly raised: u128;
|
||||
readonly end: u32;
|
||||
readonly cap: u128;
|
||||
readonly lastContribution: PolkadotRuntimeCommonCrowdloanLastContribution;
|
||||
readonly firstPeriod: u32;
|
||||
readonly lastPeriod: u32;
|
||||
readonly trieIndex: u32;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeCommonCrowdloanLastContribution (566) */
|
||||
export interface PolkadotRuntimeCommonCrowdloanLastContribution extends Enum {
|
||||
readonly isNever: boolean;
|
||||
readonly isPreEnding: boolean;
|
||||
readonly asPreEnding: u32;
|
||||
readonly isEnding: boolean;
|
||||
readonly asEnding: u32;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeCommonClaimsPrevalidateAttests (578) */
|
||||
export type PolkadotRuntimeCommonClaimsPrevalidateAttests = Null;
|
||||
|
||||
/** @name PolkadotRuntimeRuntime (579) */
|
||||
export type PolkadotRuntimeRuntime = Null;
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,6 @@
|
||||
// Copyright 2017-2021 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import './types-substrate';
|
||||
import './types-polkadot';
|
||||
import './types-kusama';
|
||||
@@ -10,7 +10,7 @@ import type { UncleEntryItem } from '@polkadot/types/interfaces/authorship';
|
||||
import type { AllowedSlots, BabeAuthorityWeight, BabeBlockWeight, BabeEpochConfiguration, BabeEquivocationProof, BabeWeight, EpochAuthorship, MaybeRandomness, MaybeVrf, NextConfigDescriptor, NextConfigDescriptorV1, Randomness, RawBabePreDigest, RawBabePreDigestCompat, RawBabePreDigestPrimary, RawBabePreDigestPrimaryTo159, RawBabePreDigestSecondaryPlain, RawBabePreDigestSecondaryTo159, RawBabePreDigestSecondaryVRF, RawBabePreDigestTo159, SlotNumber, VrfData, VrfOutput, VrfProof } from '@polkadot/types/interfaces/babe';
|
||||
import type { AccountData, BalanceLock, BalanceLockTo212, BalanceStatus, Reasons, ReserveData, ReserveIdentifier, VestingSchedule, WithdrawReasons } from '@polkadot/types/interfaces/balances';
|
||||
import type { BeefyCommitment, BeefyId, BeefyNextAuthoritySet, BeefyPayload, BeefySignedCommitment, MmrRootHash, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
|
||||
import type { BridgedBlockHash, BridgedBlockNumber, BridgedHeader, CallOrigin, ChainId, DeliveredMessages, DispatchFeePayment, InboundLaneData, InboundRelayer, InitializationData, LaneId, MessageData, MessageKey, MessageNonce, MessagesDeliveryProofOf, MessagesProofOf, OperatingMode, OutboundLaneData, OutboundMessageFee, OutboundPayload, Parameter, RelayerId, UnrewardedRelayer, UnrewardedRelayersState } from '@polkadot/types/interfaces/bridges';
|
||||
import type { BridgeMessageId, BridgedBlockHash, BridgedBlockNumber, BridgedHeader, CallOrigin, ChainId, DeliveredMessages, DispatchFeePayment, InboundLaneData, InboundRelayer, InitializationData, LaneId, MessageData, MessageKey, MessageNonce, MessagesDeliveryProofOf, MessagesProofOf, OperatingMode, OutboundLaneData, OutboundMessageFee, OutboundPayload, Parameter, RelayerId, UnrewardedRelayer, UnrewardedRelayersState } from '@polkadot/types/interfaces/bridges';
|
||||
import type { BlockHash } from '@polkadot/types/interfaces/chain';
|
||||
import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
|
||||
import type { EthereumAddress, StatementKind } from '@polkadot/types/interfaces/claims';
|
||||
@@ -29,14 +29,14 @@ import type { AnySignature, EcdsaSignature, Ed25519Signature, Era, Extrinsic, Ex
|
||||
import type { AssetOptions, Owner, PermissionLatest, PermissionVersions, PermissionsV1 } from '@polkadot/types/interfaces/genericAsset';
|
||||
import type { ActiveGilt, ActiveGiltsTotal, ActiveIndex, GiltBid } from '@polkadot/types/interfaces/gilt';
|
||||
import type { AuthorityIndex, AuthorityList, AuthoritySet, AuthoritySetChange, AuthoritySetChanges, AuthorityWeight, DelayKind, DelayKindBest, EncodedFinalityProofs, ForkTreePendingChange, ForkTreePendingChangeNode, GrandpaCommit, GrandpaEquivocation, GrandpaEquivocationProof, GrandpaEquivocationValue, GrandpaJustification, GrandpaPrecommit, GrandpaPrevote, GrandpaSignedPrecommit, JustificationNotification, KeyOwnerProof, NextAuthority, PendingChange, PendingPause, PendingResume, Precommits, Prevotes, ReportedRoundStates, RoundState, SetId, StoredPendingChange, StoredState } from '@polkadot/types/interfaces/grandpa';
|
||||
import type { IdentityFields, IdentityInfo, IdentityInfoAdditional, IdentityJudgement, RegistrarIndex, RegistrarInfo, Registration, RegistrationJudgement } from '@polkadot/types/interfaces/identity';
|
||||
import type { IdentityFields, IdentityInfo, IdentityInfoAdditional, IdentityInfoTo198, IdentityJudgement, RegistrarIndex, RegistrarInfo, Registration, RegistrationJudgement, RegistrationTo198 } from '@polkadot/types/interfaces/identity';
|
||||
import type { AuthIndex, AuthoritySignature, Heartbeat, HeartbeatTo244, OpaqueMultiaddr, OpaqueNetworkState, OpaquePeerId } from '@polkadot/types/interfaces/imOnline';
|
||||
import type { CallIndex, LotteryConfig } from '@polkadot/types/interfaces/lottery';
|
||||
import type { ErrorMetadataLatest, ErrorMetadataV10, ErrorMetadataV11, ErrorMetadataV12, ErrorMetadataV13, ErrorMetadataV14, ErrorMetadataV9, EventMetadataLatest, EventMetadataV10, EventMetadataV11, EventMetadataV12, EventMetadataV13, EventMetadataV14, EventMetadataV9, ExtrinsicMetadataLatest, ExtrinsicMetadataV11, ExtrinsicMetadataV12, ExtrinsicMetadataV13, ExtrinsicMetadataV14, FunctionArgumentMetadataLatest, FunctionArgumentMetadataV10, FunctionArgumentMetadataV11, FunctionArgumentMetadataV12, FunctionArgumentMetadataV13, FunctionArgumentMetadataV14, FunctionArgumentMetadataV9, FunctionMetadataLatest, FunctionMetadataV10, FunctionMetadataV11, FunctionMetadataV12, FunctionMetadataV13, FunctionMetadataV14, FunctionMetadataV9, MetadataAll, MetadataLatest, MetadataV10, MetadataV11, MetadataV12, MetadataV13, MetadataV14, MetadataV9, ModuleConstantMetadataLatest, ModuleConstantMetadataV10, ModuleConstantMetadataV11, ModuleConstantMetadataV12, ModuleConstantMetadataV13, ModuleConstantMetadataV9, ModuleMetadataLatest, ModuleMetadataV10, ModuleMetadataV11, ModuleMetadataV12, ModuleMetadataV13, ModuleMetadataV9, PalletCallMetadataLatest, PalletCallMetadataV14, PalletConstantMetadataLatest, PalletConstantMetadataV14, PalletErrorMetadataLatest, PalletErrorMetadataV14, PalletEventMetadataLatest, PalletEventMetadataV14, PalletMetadataLatest, PalletMetadataV14, PalletStorageMetadataLatest, PalletStorageMetadataV14, PortableRegistry, PortableType, SignedExtensionMetadataLatest, SignedExtensionMetadataV14, StorageEntryMetadataLatest, StorageEntryMetadataV10, StorageEntryMetadataV11, StorageEntryMetadataV12, StorageEntryMetadataV13, StorageEntryMetadataV14, StorageEntryMetadataV9, StorageEntryModifierLatest, StorageEntryModifierV10, StorageEntryModifierV11, StorageEntryModifierV12, StorageEntryModifierV13, StorageEntryModifierV14, StorageEntryModifierV9, StorageEntryTypeLatest, StorageEntryTypeV10, StorageEntryTypeV11, StorageEntryTypeV12, StorageEntryTypeV13, StorageEntryTypeV14, StorageEntryTypeV9, StorageHasher, StorageHasherV10, StorageHasherV11, StorageHasherV12, StorageHasherV13, StorageHasherV14, StorageHasherV9, StorageMetadataLatest, StorageMetadataV10, StorageMetadataV11, StorageMetadataV12, StorageMetadataV13, StorageMetadataV9 } from '@polkadot/types/interfaces/metadata';
|
||||
import type { ErrorMetadataLatest, ErrorMetadataV10, ErrorMetadataV11, ErrorMetadataV12, ErrorMetadataV13, ErrorMetadataV14, ErrorMetadataV9, EventMetadataLatest, EventMetadataV10, EventMetadataV11, EventMetadataV12, EventMetadataV13, EventMetadataV14, EventMetadataV9, ExtrinsicMetadataLatest, ExtrinsicMetadataV11, ExtrinsicMetadataV12, ExtrinsicMetadataV13, ExtrinsicMetadataV14, FunctionArgumentMetadataLatest, FunctionArgumentMetadataV10, FunctionArgumentMetadataV11, FunctionArgumentMetadataV12, FunctionArgumentMetadataV13, FunctionArgumentMetadataV14, FunctionArgumentMetadataV9, FunctionMetadataLatest, FunctionMetadataV10, FunctionMetadataV11, FunctionMetadataV12, FunctionMetadataV13, FunctionMetadataV14, FunctionMetadataV9, MetadataAll, MetadataLatest, MetadataV10, MetadataV11, MetadataV12, MetadataV13, MetadataV14, MetadataV9, ModuleConstantMetadataV10, ModuleConstantMetadataV11, ModuleConstantMetadataV12, ModuleConstantMetadataV13, ModuleConstantMetadataV9, ModuleMetadataV10, ModuleMetadataV11, ModuleMetadataV12, ModuleMetadataV13, ModuleMetadataV9, PalletCallMetadataLatest, PalletCallMetadataV14, PalletConstantMetadataLatest, PalletConstantMetadataV14, PalletErrorMetadataLatest, PalletErrorMetadataV14, PalletEventMetadataLatest, PalletEventMetadataV14, PalletMetadataLatest, PalletMetadataV14, PalletStorageMetadataLatest, PalletStorageMetadataV14, PortableRegistry, PortableRegistryV14, PortableType, PortableTypeV14, SignedExtensionMetadataLatest, SignedExtensionMetadataV14, StorageEntryMetadataLatest, StorageEntryMetadataV10, StorageEntryMetadataV11, StorageEntryMetadataV12, StorageEntryMetadataV13, StorageEntryMetadataV14, StorageEntryMetadataV9, StorageEntryModifierLatest, StorageEntryModifierV10, StorageEntryModifierV11, StorageEntryModifierV12, StorageEntryModifierV13, StorageEntryModifierV14, StorageEntryModifierV9, StorageEntryTypeLatest, StorageEntryTypeV10, StorageEntryTypeV11, StorageEntryTypeV12, StorageEntryTypeV13, StorageEntryTypeV14, StorageEntryTypeV9, StorageHasher, StorageHasherV10, StorageHasherV11, StorageHasherV12, StorageHasherV13, StorageHasherV14, StorageHasherV9, StorageMetadataV10, StorageMetadataV11, StorageMetadataV12, StorageMetadataV13, StorageMetadataV9 } from '@polkadot/types/interfaces/metadata';
|
||||
import type { MmrLeafProof } from '@polkadot/types/interfaces/mmr';
|
||||
import type { StorageKind } from '@polkadot/types/interfaces/offchain';
|
||||
import type { DeferredOffenceOf, Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences';
|
||||
import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidateInfo, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, CoreAssignment, CoreIndex, CoreOccupied, DisputeStatement, DisputeStatementSet, DoubleVoteReport, DownwardMessage, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InvalidDisputeStatementKind, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiDisputeStatementSet, NewBidder, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, QueuedParathread, RegisteredParachainInfo, RelayBlockNumber, RelayChainBlockNumber, RelayChainHash, RelayHash, Remark, ReplacementTimes, Retriable, Scheduling, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, Statement, SubId, SystemInherentData, TransientValidationData, UpgradeGoAhead, UpgradeRestriction, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationCodeHash, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, WinnersData, WinnersDataTuple, WinningData, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
|
||||
import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidateInfo, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, CoreAssignment, CoreIndex, CoreOccupied, DisputeLocation, DisputeResult, DisputeState, DisputeStatement, DisputeStatementSet, DoubleVoteReport, DownwardMessage, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InvalidDisputeStatementKind, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiDisputeStatementSet, NewBidder, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, QueuedParathread, RegisteredParachainInfo, RelayBlockNumber, RelayChainBlockNumber, RelayChainHash, RelayHash, Remark, ReplacementTimes, Retriable, Scheduling, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, Statement, SubId, SystemInherentData, TransientValidationData, UpgradeGoAhead, UpgradeRestriction, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationCodeHash, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, WinnersData, WinnersDataTuple, WinningData, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
|
||||
import type { FeeDetails, InclusionFee, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
|
||||
import type { Approvals } from '@polkadot/types/interfaces/poll';
|
||||
import type { ProxyAnnouncement, ProxyDefinition, ProxyType } from '@polkadot/types/interfaces/proxy';
|
||||
@@ -44,12 +44,12 @@ import type { AccountStatus, AccountValidity } from '@polkadot/types/interfaces/
|
||||
import type { ActiveRecovery, RecoveryConfig } from '@polkadot/types/interfaces/recovery';
|
||||
import type { RpcMethods } from '@polkadot/types/interfaces/rpc';
|
||||
import type { AccountId, AccountId20, AccountId32, AccountIdOf, AccountIndex, Address, AssetId, Balance, BalanceOf, Block, BlockNumber, BlockNumberFor, BlockNumberOf, Call, CallHash, CallHashOf, ChangesTrieConfiguration, ChangesTrieSignal, CodecHash, Consensus, ConsensusEngineId, Digest, DigestItem, EncodedJustification, ExtrinsicsWeight, Fixed128, Fixed64, FixedI128, FixedI64, FixedU128, FixedU64, H1024, H128, H160, H2048, H256, H32, H512, H64, Hash, Header, HeaderPartial, I32F32, Index, IndicesLookupSource, Justification, Justifications, KeyTypeId, KeyValue, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, MultiAddress, MultiSigner, OpaqueCall, Origin, OriginCaller, PalletId, PalletVersion, PalletsOrigin, Pays, PerU16, Perbill, Percent, Permill, Perquintill, Phantom, PhantomData, PreRuntime, Releases, RuntimeDbWeight, Seal, SealV0, SignedBlock, SignedBlockWithJustification, SignedBlockWithJustifications, Slot, StorageData, StorageProof, TransactionInfo, TransactionPriority, TransactionStorageProof, U32F32, ValidatorId, ValidatorIdOf, Weight, WeightMultiplier } from '@polkadot/types/interfaces/runtime';
|
||||
import type { Si0Field, Si0LookupTypeId, Si0Path, Si0Type, Si0TypeDef, Si0TypeDefArray, Si0TypeDefBitSequence, Si0TypeDefCompact, Si0TypeDefComposite, Si0TypeDefPhantom, Si0TypeDefPrimitive, Si0TypeDefSequence, Si0TypeDefTuple, Si0TypeDefVariant, Si0TypeParameter, Si0Variant, SiField, SiLookupTypeId, SiPath, SiType, SiTypeDef, SiTypeDefArray, SiTypeDefBitSequence, SiTypeDefCompact, SiTypeDefComposite, SiTypeDefPrimitive, SiTypeDefSequence, SiTypeDefTuple, SiTypeDefVariant, SiTypeParameter, SiVariant } from '@polkadot/types/interfaces/scaleInfo';
|
||||
import type { Si0Field, Si0LookupTypeId, Si0Path, Si0Type, Si0TypeDef, Si0TypeDefArray, Si0TypeDefBitSequence, Si0TypeDefCompact, Si0TypeDefComposite, Si0TypeDefPhantom, Si0TypeDefPrimitive, Si0TypeDefSequence, Si0TypeDefTuple, Si0TypeDefVariant, Si0TypeParameter, Si0Variant, Si1Field, Si1LookupTypeId, Si1Path, Si1Type, Si1TypeDef, Si1TypeDefArray, Si1TypeDefBitSequence, Si1TypeDefCompact, Si1TypeDefComposite, Si1TypeDefPrimitive, Si1TypeDefSequence, Si1TypeDefTuple, Si1TypeDefVariant, Si1TypeParameter, Si1Variant, SiField, SiLookupTypeId, SiPath, SiType, SiTypeDef, SiTypeDefArray, SiTypeDefBitSequence, SiTypeDefCompact, SiTypeDefComposite, SiTypeDefPrimitive, SiTypeDefSequence, SiTypeDefTuple, SiTypeDefVariant, SiTypeParameter, SiVariant } from '@polkadot/types/interfaces/scaleInfo';
|
||||
import type { Period, Priority, SchedulePeriod, SchedulePriority, Scheduled, ScheduledTo254, TaskAddress } from '@polkadot/types/interfaces/scheduler';
|
||||
import type { BeefyKey, FullIdentification, IdentificationTuple, Keys, MembershipProof, SessionIndex, SessionKeys1, SessionKeys10, SessionKeys10B, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6, SessionKeys6B, SessionKeys7, SessionKeys7B, SessionKeys8, SessionKeys8B, SessionKeys9, SessionKeys9B, ValidatorCount } from '@polkadot/types/interfaces/session';
|
||||
import type { Bid, BidKind, SocietyJudgement, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society';
|
||||
import type { ActiveEraInfo, CompactAssignments, CompactAssignmentsTo257, CompactAssignmentsTo265, CompactAssignmentsWith16, CompactAssignmentsWith24, CompactScore, CompactScoreCompact, ElectionCompute, ElectionPhase, ElectionResult, ElectionScore, ElectionSize, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, ExtendedBalance, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, NominatorIndex, NominatorIndexCompact, OffchainAccuracy, OffchainAccuracyCompact, PhragmenScore, Points, RawSolution, RawSolutionTo265, RawSolutionWith16, RawSolutionWith24, ReadySolution, RewardDestination, RewardPoint, RoundSnapshot, SeatHolder, SignedSubmission, SignedSubmissionOf, SignedSubmissionTo276, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SolutionOrSnapshotSize, SolutionSupport, SolutionSupports, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, StakingLedgerTo240, SubmissionIndicesOf, Supports, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorIndexCompact, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196, ValidatorPrefsWithBlocked, ValidatorPrefsWithCommission, VoteWeight, Voter } from '@polkadot/types/interfaces/staking';
|
||||
import type { ApiId, BlockTrace, BlockTraceEvent, BlockTraceEventData, BlockTraceSpan, KeyValueOption, ReadProof, RuntimeVersion, RuntimeVersionApi, RuntimeVersionPartial, StorageChangeSet, TraceBlockResponse, TraceError } from '@polkadot/types/interfaces/state';
|
||||
import type { ApiId, BlockTrace, BlockTraceEvent, BlockTraceEventData, BlockTraceSpan, KeyValueOption, ReadProof, RuntimeVersion, RuntimeVersionApi, RuntimeVersionPartial, SpecVersion, StorageChangeSet, TraceBlockResponse, TraceError } from '@polkadot/types/interfaces/state';
|
||||
import type { WeightToFeeCoefficient } from '@polkadot/types/interfaces/support';
|
||||
import type { AccountInfo, AccountInfoWithDualRefCount, AccountInfoWithProviders, AccountInfoWithRefCount, AccountInfoWithRefCountU8, AccountInfoWithTripleRefCount, ApplyExtrinsicResult, ArithmeticError, BlockLength, BlockWeights, ChainProperties, ChainType, ConsumedWeight, DigestOf, DispatchClass, DispatchError, DispatchErrorModule, DispatchErrorTo198, DispatchInfo, DispatchInfoTo190, DispatchInfoTo244, DispatchOutcome, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, Health, InvalidTransaction, Key, LastRuntimeUpgradeInfo, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NodeRole, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, PerDispatchClassU32, PerDispatchClassWeight, PerDispatchClassWeightsPerClass, Phase, RawOrigin, RefCount, RefCountTo259, SyncState, SystemOrigin, TokenError, TransactionValidityError, UnknownTransaction, WeightPerClass } from '@polkadot/types/interfaces/system';
|
||||
import type { Bounty, BountyIndex, BountyStatus, BountyStatusActive, BountyStatusCuratorProposed, BountyStatusPendingPayout, OpenTip, OpenTipFinderTo225, OpenTipTip, OpenTipTo225, TreasuryProposal } from '@polkadot/types/interfaces/treasury';
|
||||
@@ -57,7 +57,7 @@ import type { Multiplier } from '@polkadot/types/interfaces/txpayment';
|
||||
import type { ClassDetails, ClassId, ClassMetadata, DepositBalance, DepositBalanceOf, DestroyWitness, InstanceDetails, InstanceId, InstanceMetadata } from '@polkadot/types/interfaces/uniques';
|
||||
import type { Multisig, Timepoint } from '@polkadot/types/interfaces/utility';
|
||||
import type { VestingInfo } from '@polkadot/types/interfaces/vesting';
|
||||
import type { AssetInstance, AssetInstanceV0, AssetInstanceV1, BodyId, BodyPart, DoubleEncodedCall, Fungibility, InboundStatus, InstructionV2, InteriorMultiLocation, Junction, Junctions, MultiAsset, MultiAssetFilter, MultiAssetFilterV1, MultiAssetFilterV2, MultiAssetV0, MultiAssetV1, MultiAssetV2, MultiAssets, MultiAssetsV1, MultiAssetsV2, MultiLocation, MultiLocationV0, MultiLocationV1, MultiLocationV2, NetworkId, OriginKindV0, OriginKindV1, OriginKindV2, OutboundStatus, Outcome, QueryId, QueryStatus, QueueConfigData, Response, ResponseV0, ResponseV1, ResponseV2, ResponseV2Error, ResponseV2Result, VersionMigrationStage, VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, VersionedResponse, VersionedXcm, WeightLimitV2, WildFungibility, WildMultiAsset, WildMultiAssetV1, Xcm, XcmAssetId, XcmError, XcmErrorV0, XcmErrorV1, XcmErrorV2, XcmOrder, XcmOrderV0, XcmOrderV1, XcmOrigin, XcmOriginKind, XcmV0, XcmV1, XcmV2, XcmVersion, XcmpMessageFormat } from '@polkadot/types/interfaces/xcm';
|
||||
import type { AssetInstance, AssetInstanceV0, AssetInstanceV1, BodyId, BodyPart, DoubleEncodedCall, Fungibility, InboundStatus, InstructionV2, InteriorMultiLocation, Junction, JunctionV0, JunctionV1, JunctionV2, Junctions, JunctionsV1, JunctionsV2, MultiAsset, MultiAssetFilter, MultiAssetFilterV1, MultiAssetFilterV2, MultiAssetV0, MultiAssetV1, MultiAssetV2, MultiAssets, MultiAssetsV1, MultiAssetsV2, MultiLocation, MultiLocationV0, MultiLocationV1, MultiLocationV2, NetworkId, OriginKindV0, OriginKindV1, OriginKindV2, OutboundStatus, Outcome, QueryId, QueryStatus, QueueConfigData, Response, ResponseV0, ResponseV1, ResponseV2, ResponseV2Error, ResponseV2Result, VersionMigrationStage, VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, VersionedResponse, VersionedXcm, WeightLimitV2, WildFungibility, WildMultiAsset, WildMultiAssetV1, Xcm, XcmAssetId, XcmError, XcmErrorV0, XcmErrorV1, XcmErrorV2, XcmOrder, XcmOrderV0, XcmOrderV1, XcmOrigin, XcmOriginKind, XcmV0, XcmV1, XcmV2, XcmVersion, XcmpMessageFormat } from '@polkadot/types/interfaces/xcm';
|
||||
|
||||
declare module '@polkadot/types/types/registry' {
|
||||
export interface InterfaceTypes {
|
||||
@@ -168,6 +168,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
BridgedBlockHash: BridgedBlockHash;
|
||||
BridgedBlockNumber: BridgedBlockNumber;
|
||||
BridgedHeader: BridgedHeader;
|
||||
BridgeMessageId: BridgeMessageId;
|
||||
BufferedSessionChange: BufferedSessionChange;
|
||||
Bytes: Bytes;
|
||||
Call: Call;
|
||||
@@ -274,6 +275,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
DispatchResult: DispatchResult;
|
||||
DispatchResultOf: DispatchResultOf;
|
||||
DispatchResultTo198: DispatchResultTo198;
|
||||
DisputeLocation: DisputeLocation;
|
||||
DisputeResult: DisputeResult;
|
||||
DisputeState: DisputeState;
|
||||
DisputeStatement: DisputeStatement;
|
||||
DisputeStatementSet: DisputeStatementSet;
|
||||
DoubleEncodedCall: DoubleEncodedCall;
|
||||
@@ -453,6 +457,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
IdentityFields: IdentityFields;
|
||||
IdentityInfo: IdentityInfo;
|
||||
IdentityInfoAdditional: IdentityInfoAdditional;
|
||||
IdentityInfoTo198: IdentityInfoTo198;
|
||||
IdentityJudgement: IdentityJudgement;
|
||||
ImmortalEra: ImmortalEra;
|
||||
ImportedAux: ImportedAux;
|
||||
@@ -484,6 +489,11 @@ declare module '@polkadot/types/types/registry' {
|
||||
Json: Json;
|
||||
Junction: Junction;
|
||||
Junctions: Junctions;
|
||||
JunctionsV1: JunctionsV1;
|
||||
JunctionsV2: JunctionsV2;
|
||||
JunctionV0: JunctionV0;
|
||||
JunctionV1: JunctionV1;
|
||||
JunctionV2: JunctionV2;
|
||||
Justification: Justification;
|
||||
JustificationNotification: JustificationNotification;
|
||||
Justifications: Justifications;
|
||||
@@ -531,14 +541,12 @@ declare module '@polkadot/types/types/registry' {
|
||||
MetadataV9: MetadataV9;
|
||||
MmrLeafProof: MmrLeafProof;
|
||||
MmrRootHash: MmrRootHash;
|
||||
ModuleConstantMetadataLatest: ModuleConstantMetadataLatest;
|
||||
ModuleConstantMetadataV10: ModuleConstantMetadataV10;
|
||||
ModuleConstantMetadataV11: ModuleConstantMetadataV11;
|
||||
ModuleConstantMetadataV12: ModuleConstantMetadataV12;
|
||||
ModuleConstantMetadataV13: ModuleConstantMetadataV13;
|
||||
ModuleConstantMetadataV9: ModuleConstantMetadataV9;
|
||||
ModuleId: ModuleId;
|
||||
ModuleMetadataLatest: ModuleMetadataLatest;
|
||||
ModuleMetadataV10: ModuleMetadataV10;
|
||||
ModuleMetadataV11: ModuleMetadataV11;
|
||||
ModuleMetadataV12: ModuleMetadataV12;
|
||||
@@ -669,7 +677,9 @@ declare module '@polkadot/types/types/registry' {
|
||||
PhragmenScore: PhragmenScore;
|
||||
Points: Points;
|
||||
PortableRegistry: PortableRegistry;
|
||||
PortableRegistryV14: PortableRegistryV14;
|
||||
PortableType: PortableType;
|
||||
PortableTypeV14: PortableTypeV14;
|
||||
Precommits: Precommits;
|
||||
PrefabWasmModule: PrefabWasmModule;
|
||||
PrefixedStorageKey: PrefixedStorageKey;
|
||||
@@ -723,6 +733,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
RegistrarInfo: RegistrarInfo;
|
||||
Registration: Registration;
|
||||
RegistrationJudgement: RegistrationJudgement;
|
||||
RegistrationTo198: RegistrationTo198;
|
||||
RelayBlockNumber: RelayBlockNumber;
|
||||
RelayChainBlockNumber: RelayChainBlockNumber;
|
||||
RelayChainHash: RelayChainHash;
|
||||
@@ -805,6 +816,21 @@ declare module '@polkadot/types/types/registry' {
|
||||
Si0TypeDefVariant: Si0TypeDefVariant;
|
||||
Si0TypeParameter: Si0TypeParameter;
|
||||
Si0Variant: Si0Variant;
|
||||
Si1Field: Si1Field;
|
||||
Si1LookupTypeId: Si1LookupTypeId;
|
||||
Si1Path: Si1Path;
|
||||
Si1Type: Si1Type;
|
||||
Si1TypeDef: Si1TypeDef;
|
||||
Si1TypeDefArray: Si1TypeDefArray;
|
||||
Si1TypeDefBitSequence: Si1TypeDefBitSequence;
|
||||
Si1TypeDefCompact: Si1TypeDefCompact;
|
||||
Si1TypeDefComposite: Si1TypeDefComposite;
|
||||
Si1TypeDefPrimitive: Si1TypeDefPrimitive;
|
||||
Si1TypeDefSequence: Si1TypeDefSequence;
|
||||
Si1TypeDefTuple: Si1TypeDefTuple;
|
||||
Si1TypeDefVariant: Si1TypeDefVariant;
|
||||
Si1TypeParameter: Si1TypeParameter;
|
||||
Si1Variant: Si1Variant;
|
||||
SiField: SiField;
|
||||
Signature: Signature;
|
||||
SignedAvailabilityBitfield: SignedAvailabilityBitfield;
|
||||
@@ -846,6 +872,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
SolutionSupports: SolutionSupports;
|
||||
SpanIndex: SpanIndex;
|
||||
SpanRecord: SpanRecord;
|
||||
SpecVersion: SpecVersion;
|
||||
Sr25519Signature: Sr25519Signature;
|
||||
StakingLedger: StakingLedger;
|
||||
StakingLedgerTo223: StakingLedgerTo223;
|
||||
@@ -884,7 +911,6 @@ declare module '@polkadot/types/types/registry' {
|
||||
StorageHasherV9: StorageHasherV9;
|
||||
StorageKey: StorageKey;
|
||||
StorageKind: StorageKind;
|
||||
StorageMetadataLatest: StorageMetadataLatest;
|
||||
StorageMetadataV10: StorageMetadataV10;
|
||||
StorageMetadataV11: StorageMetadataV11;
|
||||
StorageMetadataV12: StorageMetadataV12;
|
||||
|
||||
@@ -20,10 +20,10 @@ function decodeSetFromU8a<V extends Codec> (registry: Registry, ValClass: Constr
|
||||
types.push(ValClass);
|
||||
}
|
||||
|
||||
const values = decodeU8a(registry, u8a.subarray(offset), types);
|
||||
const values = decodeU8a<V>(registry, u8a.subarray(offset), types);
|
||||
|
||||
for (let i = 0; i < values.length; i++) {
|
||||
output.add(values[i] as V);
|
||||
output.add(values[i]);
|
||||
}
|
||||
|
||||
return output;
|
||||
|
||||
@@ -24,22 +24,23 @@ function decodeStructFromObject <T> (registry: Registry, Types: ConstructorDef,
|
||||
const jsonKey = (jsonMap.get(key as any) && !value[key])
|
||||
? jsonMap.get(key as any)
|
||||
: key;
|
||||
const Type = Types[key];
|
||||
|
||||
try {
|
||||
if (Array.isArray(value)) {
|
||||
// TS2322: Type 'Codec' is not assignable to type 'T[keyof S]'.
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access
|
||||
(raw as any)[key] = value[index] instanceof Types[key]
|
||||
(raw as any)[key] = value[index] instanceof Type
|
||||
? value[index]
|
||||
: new Types[key](registry, value[index]);
|
||||
: new Type(registry, value[index]);
|
||||
} else if (value instanceof Map) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
const mapped = value.get(jsonKey);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
||||
(raw as any)[key] = mapped instanceof Types[key]
|
||||
(raw as any)[key] = mapped instanceof Type
|
||||
? mapped
|
||||
: new Types[key](registry, mapped);
|
||||
: new Type(registry, mapped);
|
||||
} else if (isObject(value)) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
let assign = value[jsonKey as string];
|
||||
@@ -59,17 +60,17 @@ function decodeStructFromObject <T> (registry: Registry, Types: ConstructorDef,
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access
|
||||
(raw as any)[key] = assign instanceof Types[key]
|
||||
(raw as any)[key] = assign instanceof Type
|
||||
? assign
|
||||
: new Types[key](registry, assign);
|
||||
: new Type(registry, assign);
|
||||
} else {
|
||||
throw new Error(`Cannot decode value ${stringify(value)} (typeof ${typeof value}), expected an input object with known keys`);
|
||||
}
|
||||
} catch (error) {
|
||||
let type = Types[key].name;
|
||||
let type = Type.name;
|
||||
|
||||
try {
|
||||
type = new Types[key](registry).toRawType();
|
||||
type = new Type(registry).toRawType();
|
||||
} catch (error) {
|
||||
// ignore
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ export class Tuple extends AbstractArray<Codec> implements ITuple<Codec[]> {
|
||||
*/
|
||||
public get Types (): string[] {
|
||||
return Array.isArray(this._Types)
|
||||
? this._Types.map((Type): string => new Type(this.registry).toRawType())
|
||||
? this._Types.map((Type) => new Type(this.registry).toRawType())
|
||||
: Object.keys(this._Types);
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user