Compare commits

...
30 Commits
Author SHA1 Message Date
Github Actions 389c4c5255 [CI Skip] release/stable 6.1.2
skip-checks: true
2021-09-29 08:08:58 +00:00
Jaco 493287cedf 6.1.2 (#4001) 2021-09-29 09:50:25 +02:00
Github Actions fe52dc8006 [CI Skip] release/beta 6.1.2-3
skip-checks: true
2021-09-29 06:08:50 +00:00
Jaco f26008ab95 Fix .at queries/decoration for pre-V13 metadata (#4000)
* Fix `.at` queries/decoration for pre-V13 metadata

* fields fix (or rather... protection against upcoming change)
2021-09-29 07:46:13 +02:00
Github Actions 0952720237 [CI Skip] release/beta 6.1.2-2
skip-checks: true
2021-09-27 11:20:10 +00:00
Jaco 04058fe95e Bump metadata (#3996)
* Bump metadata

* Ensure WrapperOquaque is applied

* Use field for mapping

* Handle WrapperOpaque

* Adjust
2021-09-27 13:02:18 +02:00
Github Actions eb96371e59 [CI Skip] release/beta 6.1.2-1
skip-checks: true
2021-09-27 09:20:29 +00:00
Jaco a313fe13e7 Add support for WrapperOpaque (#3997)
* Add support for WrapperOpaque

* Dedupe dual params

* Adjust case

* Re-adjust to Vec
2021-09-27 11:02:37 +02:00
Github Actions 243c263485 [CI Skip] release/beta 6.1.2-0
skip-checks: true
2021-09-27 06:31:40 +00:00
Jaco 311d8b792c Additional types for bridges (#3995) 2021-09-27 08:08:42 +02:00
Github Actions 878f631745 [CI Skip] release/stable 6.1.1
skip-checks: true
2021-09-27 05:54:41 +00:00
Jaco d7753839a2 6.1.1 (#3994)
* 6.1.1

* bumps
2021-09-27 07:36:47 +02:00
Github Actions fc74d88bbb [CI Skip] release/beta 6.0.6-4
skip-checks: true
2021-09-24 08:24:35 +00:00
HackFisher 47bbeee14b fix OutboundLaneData types (#3992) 2021-09-24 10:05:56 +02:00
Github Actions ba01620ba1 [CI Skip] release/beta 6.0.6-3
skip-checks: true
2021-09-23 09:30:55 +00:00
Jaco 6e66387a8d CHANGELOG (#3986) 2021-09-23 11:10:10 +02:00
Github Actions c58687b3c6 [CI Skip] release/beta 6.0.6-2
skip-checks: true
2021-09-22 09:22:01 +00:00
Jaco 2801088b0a Scale-info v0 -> v1 conversion (as needed by contracts) (#3987)
* Scale-info v0 -> v1 conversion (as needed by contracts)

* Renames

* V1 types same as v0 where applicable
2021-09-22 11:01:39 +02:00
Github Actions fc5af92a03 [CI Skip] release/beta 6.0.6-1
skip-checks: true
2021-09-22 04:07:20 +00:00
Furqan A 8f8bb2aa23 fix: fixed 404 to the docs from the api readme (#3985) 2021-09-22 06:48:18 +03:00
Github Actions 3f69b3fc73 [CI Skip] release/beta 6.0.6-0
skip-checks: true
2021-09-20 18:48:01 +00:00
Jaco 4ea170a83a Add childstate_getStorageEntries RPC (#3980)
* Add `childstate_getStorageEntries` RPC

* Remove extra ,
2021-09-20 20:33:30 +02:00
Github Actions 26649c429a [CI Skip] release/stable 6.0.5
skip-checks: true
2021-09-20 13:57:16 +00:00
Jaco 7c57778389 6.0.5 (#3977) 2021-09-20 15:38:54 +02:00
Github Actions dbb5d66de3 [CI Skip] release/stable 6.0.4
skip-checks: true
2021-09-20 09:10:12 +00:00
Jaco 6bc92a6d31 6.0.4 (#3975)
* 6.0.4

* Update CHANGELOG.md
2021-09-20 10:53:34 +02:00
Github Actions 6462327ea5 [CI Skip] release/beta 6.0.4-1
skip-checks: true
2021-09-20 06:17:50 +00:00
Jaco 3b4c2ac323 Extract getSiName conversion (#3974) 2021-09-20 07:56:33 +02:00
Github Actions d0ecfdafc1 [CI Skip] release/beta 6.0.4-0
skip-checks: true
2021-09-20 05:19:55 +00:00
Jaco 870bb8d3cb User api.at for all .at queries (#3973) 2021-09-20 06:59:35 +02:00
83 changed files with 17533 additions and 6621 deletions
+4 -1
View File
@@ -31,4 +31,7 @@
5.8.3
6.0.2
6.0.3
6.0.3
6.0.4
6.0.5
6.1.2
+47
View File
@@ -1,5 +1,52 @@
# 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
+3 -3
View File
@@ -29,12 +29,12 @@
"@babel/core": "^7.15.5",
"@babel/register": "^7.15.3",
"@babel/runtime": "^7.15.4",
"@polkadot/dev": "^0.62.67",
"@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": "6.0.3",
"version": "6.1.2",
"packageManager": "yarn@3.0.1"
}
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api-contract",
"version": "6.0.3",
"version": "6.1.2",
"type": "module",
"description": "Interfaces for interacting with contracts and contract ABIs",
"main": "index.js",
@@ -20,8 +20,8 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
"dependencies": {
"@babel/runtime": "^7.15.4",
"@polkadot/api": "6.0.3",
"@polkadot/types": "6.0.3",
"@polkadot/api": "6.1.2",
"@polkadot/types": "6.1.2",
"@polkadot/util": "^7.4.1",
"rxjs": "^7.3.0"
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api-contract', version: '6.0.3' };
export const packageInfo = { name: '@polkadot/api-contract', version: '6.1.2' };
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api-derive",
"version": "6.0.3",
"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": "6.0.3",
"@polkadot/rpc-core": "6.0.3",
"@polkadot/types": "6.0.3",
"@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.4.1",
"@polkadot/rpc-provider": "6.0.3"
"@polkadot/rpc-provider": "6.1.2"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api-derive', version: '6.0.3' };
export const packageInfo = { name: '@polkadot/api-derive', version: '6.1.2' };
+4 -4
View File
@@ -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
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api",
"version": "6.0.3",
"version": "6.1.2",
"type": "module",
"description": "Promise and RxJS wrappers around the Polkadot JS RPC",
"main": "index.js",
@@ -20,12 +20,12 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
"dependencies": {
"@babel/runtime": "^7.15.4",
"@polkadot/api-derive": "6.0.3",
"@polkadot/api-derive": "6.1.2",
"@polkadot/keyring": "^7.4.1",
"@polkadot/rpc-core": "6.0.3",
"@polkadot/rpc-provider": "6.0.3",
"@polkadot/types": "6.0.3",
"@polkadot/types-known": "6.0.3",
"@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",
+86 -6
View File
@@ -63,6 +63,62 @@ declare module '@polkadot/api/types/consts' {
* the probability of a slot being empty).
**/
expectedBlockTime: u64 & AugmentedConst<ApiType>;
/**
* Max number of authorities allowed
**/
maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
bagsList: {
/**
* The list of thresholds separating the various bags.
*
* Ids are separated into unsorted bags according to their vote weight. This specifies the
* thresholds separating the bags. An id's bag is the largest bag for which the id's weight
* is less than or equal to its upper threshold.
*
* When ids are iterated, higher bags are iterated completely before lower bags. This means
* that iteration is _semi-sorted_: ids of higher weight tend to come before ids of lower
* weight, but peer ids within a particular bag are sorted in insertion order.
*
* # Expressing the constant
*
* This constant must be sorted in strictly increasing order. Duplicate items are not
* permitted.
*
* There is an implied upper limit of `VoteWeight::MAX`; that value does not need to be
* specified within the bag. For any two threshold lists, if one ends with
* `VoteWeight::MAX`, the other one does not, and they are otherwise equal, the two lists
* will behave identically.
*
* # Calculation
*
* It is recommended to generate the set of thresholds in a geometric series, such that
* there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *
* constant_ratio).max(threshold[k] + 1)` for all `k`.
*
* The helpers in the `/utils/frame/generate-bags` module can simplify this calculation.
*
* # Examples
*
* - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and
* iteration is strictly in insertion order.
* - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to
* the procedure given above, then the constant ratio is equal to 2.
* - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to
* the procedure given above, then the constant ratio is approximately equal to 1.248.
* - If the threshold list begins `[1, 2, 3, ...]`, then an id with weight 0 or 1 will fall
* into bag 0, an id with weight 2 will fall into bag 1, etc.
*
* # Migration
*
* In the event that this list ever changes, a copy of the old bags list must be retained.
* With that `List::migrate` can be called, which will perform the appropriate migration.
**/
bagThresholds: Vec<u64> & AugmentedConst<ApiType>;
/**
* Generic const
**/
@@ -89,7 +145,8 @@ 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>;
/**
@@ -109,7 +166,7 @@ declare module '@polkadot/api/types/consts' {
**/
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: u128 & AugmentedConst<ApiType>;
/**
@@ -279,6 +336,15 @@ declare module '@polkadot/api/types/consts' {
* Duration of the unsigned phase.
**/
unsignedPhase: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of voters to put in the snapshot. At the moment, snapshots are only
* over a single block, but once multi-block elections are introduced they will take place
* over multiple blocks.
*
* Also, note the data type: If the voters are represented by a `u32` in `type
* CompactSolution`, the same `u32` is used here to ensure bounds are respected.
**/
voterSnapshotPerBlock: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
@@ -377,6 +443,16 @@ 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
@@ -583,16 +659,20 @@ declare module '@polkadot/api/types/consts' {
**/
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: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
+12 -1
View File
@@ -92,6 +92,16 @@ declare module '@polkadot/api/types/events' {
**/
[key: string]: AugmentedEvent<ApiType>;
};
bagsList: {
/**
* Moved an account from one bag to another. \[who, from, to\].
**/
Rebagged: AugmentedEvent<ApiType, [AccountId32, u64, u64]>;
/**
* Generic event
**/
[key: string]: AugmentedEvent<ApiType>;
};
balances: {
/**
* A balance was set by root. \[who, free, reserved\]
@@ -761,7 +771,8 @@ declare module '@polkadot/api/types/events' {
Vote: AugmentedEvent<ApiType, [AccountId32, AccountId32, bool]>;
/**
* A membership bid just happened by vouching. The given account is the candidate's ID and
* their offer is the second. The vouching party is the third. \[candidate_id, offer, vouching\]
* their offer is the second. The vouching party is the third. \[candidate_id, offer,
* vouching\]
**/
Vouch: AugmentedEvent<ApiType, [AccountId32, u128, AccountId32]>;
/**
+27 -5
View File
@@ -2,9 +2,9 @@
/* eslint-disable */
import type { ApiTypes } from '@polkadot/api/types';
import type { BTreeMap, Bytes, Data, Null, Option, U8aFixed, Vec, bool, u128, u32, u64, u8 } from '@polkadot/types';
import type { BTreeMap, Bytes, Data, Null, Option, U8aFixed, Vec, WrapperOpaque, bool, u128, u32, u64, u8 } from '@polkadot/types';
import type { AccountId32, Call, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, NodeRuntimeSessionKeys, PalletAssetsApproval, PalletAssetsAssetBalance, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletCollectiveVotes, PalletContractsStorageDeletedContract, PalletContractsStorageRawContractInfo, PalletContractsWasmPrefabWasmModule, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerReleases, PalletSchedulerScheduledV2, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesClassDetails, PalletUniquesClassMetadata, PalletUniquesInstanceDetails, PalletUniquesInstanceMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeGenericDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
import type { FrameSupportWeightsPerDispatchClassU64, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, NodeRuntimeSessionKeys, PalletAssetsApproval, PalletAssetsAssetBalance, PalletAssetsAssetDetails, PalletAssetsAssetMetadata, PalletAuthorshipUncleEntryItem, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesReleases, PalletBalancesReserveData, PalletBountiesBounty, PalletCollectiveVotes, PalletContractsStorageDeletedContract, PalletContractsStorageRawContractInfo, PalletContractsWasmPrefabWasmModule, PalletDemocracyPreimageStatus, PalletDemocracyReferendumInfo, PalletDemocracyReleases, PalletDemocracyVoteThreshold, PalletDemocracyVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenSeatHolder, PalletElectionsPhragmenVoter, PalletGiltActiveGilt, PalletGiltActiveGiltsTotal, PalletGiltGiltBid, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletLotteryLotteryConfig, PalletMultisigMultisig, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletSchedulerReleases, PalletSchedulerScheduledV2, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingReleases, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTipsOpenTip, PalletTransactionPaymentReleases, PalletTransactionStorageTransactionInfo, PalletTreasuryProposal, PalletUniquesClassDetails, PalletUniquesClassMetadata, PalletUniquesInstanceDetails, PalletUniquesInstanceMetadata, PalletVestingReleases, PalletVestingVestingInfo, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpCoreCryptoKeyTypeId, SpRuntimeGenericDigest, SpStakingOffenceOffenceDetails } from '@polkadot/types/lookup';
import type { AnyNumber, ITuple, Observable } from '@polkadot/types/types';
declare module '@polkadot/api/types/storage' {
@@ -153,6 +153,28 @@ declare module '@polkadot/api/types/storage' {
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
bagsList: {
/**
* How many ids are registered.
**/
counterForListNodes: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
/**
* A bag stored in storage.
*
* Stores a `Bag` struct, which stores head and tail pointers to itself.
**/
listBags: AugmentedQuery<ApiType, (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<PalletBagsListListBag>>, [u64]> & QueryableStorageEntry<ApiType, [u64]>;
/**
* A single node, within some bag.
*
* Nodes store links forward and back within their respective bags.
**/
listNodes: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletBagsListListNode>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
/**
* Generic query
**/
[key: string]: QueryableStorageEntry<ApiType>;
};
balances: {
/**
* The balance of an account.
@@ -582,10 +604,10 @@ declare module '@polkadot/api/types/storage' {
**/
keys: AugmentedQuery<ApiType, () => Observable<Vec<PalletImOnlineSr25519AppSr25519Public>>, []> & QueryableStorageEntry<ApiType, []>;
/**
* For each session index, we keep a mapping of `AuthIndex` to
* `offchain::OpaqueNetworkState`.
* For each session index, we keep a mapping of 'SessionIndex` and `AuthIndex` to
* `WrapperOpaque<BoundedOpaqueNetworkState>`.
**/
receivedHeartbeats: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<Bytes>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
receivedHeartbeats: AugmentedQuery<ApiType, (arg1: u32 | AnyNumber | Uint8Array, arg2: u32 | AnyNumber | Uint8Array) => Observable<Option<WrapperOpaque<PalletImOnlineBoundedOpaqueNetworkState>>>, [u32, u32]> & QueryableStorageEntry<ApiType, [u32, u32]>;
/**
* Generic query
**/
+4
View File
@@ -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
**/
+42 -14
View File
@@ -462,6 +462,23 @@ declare module '@polkadot/api/types/submittable' {
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
bagsList: {
/**
* Declare that some `dislocated` account has, through rewards or penalties, sufficiently
* changed its weight that it should properly fall into a different bag than its current
* one.
*
* Anyone can call this function about any potentially dislocated account.
*
* Will never return an error; if `dislocated` does not exist or doesn't need a rebag, then
* it is a noop and fees are still collected from `origin`.
**/
rebag: AugmentedSubmittable<(dislocated: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [AccountId32]>;
/**
* Generic tx
**/
[key: string]: SubmittableExtrinsicFunction<ApiType>;
};
balances: {
/**
* Exactly as `transfer`, except the origin must be root and the source account may be
@@ -472,6 +489,12 @@ declare module '@polkadot/api/types/submittable' {
* # </weight>
**/
forceTransfer: AugmentedSubmittable<(source: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, dest: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, value: Compact<u128> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, MultiAddress, Compact<u128>]>;
/**
* Unreserve some balance from a user by force.
*
* Can only be called by ROOT.
**/
forceUnreserve: AugmentedSubmittable<(who: MultiAddress | { Id: any } | { Index: any } | { Raw: any } | { Address32: any } | { Address20: any } | string | Uint8Array, amount: u128 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [MultiAddress, u128]>;
/**
* Set the balances of a given account.
*
@@ -587,7 +610,8 @@ declare module '@polkadot/api/types/submittable' {
**/
approveBounty: AugmentedSubmittable<(bountyId: Compact<u32> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [Compact<u32>]>;
/**
* Award bounty to a beneficiary account. The beneficiary will be able to claim the funds after a delay.
* Award bounty to a beneficiary account. The beneficiary will be able to claim the funds
* after a delay.
*
* The dispatch origin for this call must be the curator of this bounty.
*
@@ -667,8 +691,8 @@ declare module '@polkadot/api/types/submittable' {
*
* This function can only be called by the `RejectOrigin` a signed origin.
*
* If this function is called by the `RejectOrigin`, we assume that the curator is malicious
* or inactive. As a result, we will slash the curator when possible.
* If this function is called by the `RejectOrigin`, we assume that the curator is
* malicious or inactive. As a result, we will slash the curator when possible.
*
* If the origin is the curator, we take this as a sign they are unable to do their job and
* they willingly give up. We could slash them, but for now we allow them to recover their
@@ -2599,12 +2623,13 @@ declare module '@polkadot/api/types/submittable' {
* - One storage read to retrieve all current candidates. O(C)
* - One storage read to retrieve all members. O(M)
* - Storage Writes:
* - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read)
* - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization
* w/ read)
* - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)
* - Notable Computation:
* - O(B + C + log M) search to check user is not already a part of society.
* - O(log B) search to insert the new bid sorted.
* - External Module Operations:
* - External Pallet Operations:
* - One balance reserve operation. O(X)
* - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT.
* - Events:
@@ -2638,7 +2663,7 @@ declare module '@polkadot/api/types/submittable' {
* Found the society.
*
* This is done as a discrete action in order to allow for the
* module to be included into a running chain and can only be done once.
* pallet to be included into a running chain and can only be done once.
*
* The dispatch origin for this call must be from the _FounderSetOrigin_.
*
@@ -2712,13 +2737,14 @@ declare module '@polkadot/api/types/submittable' {
*
* Parameters:
* - `who` - The suspended member to be judged.
* - `forgive` - A boolean representing whether the suspension judgement origin
* forgives (`true`) or rejects (`false`) a suspended member.
* - `forgive` - A boolean representing whether the suspension judgement origin forgives
* (`true`) or rejects (`false`) a suspended member.
*
* # <weight>
* Key: B (len of bids), M (len of members)
* - One storage read to check `who` is a suspended member. O(1)
* - Up to one storage write O(M) with O(log M) binary search to add a member back to society.
* - Up to one storage write O(M) with O(log M) binary search to add a member back to
* society.
* - Up to 3 storage removals O(1) to clean up a removed member.
* - Up to one storage write O(B) with O(B) search to remove vouched bid from bids.
* - Up to one additional event if unvouch takes place.
@@ -2732,7 +2758,8 @@ declare module '@polkadot/api/types/submittable' {
/**
* Transfer the first matured payout for the sender and remove it from the records.
*
* NOTE: This extrinsic needs to be called multiple times to claim multiple matured payouts.
* NOTE: This extrinsic needs to be called multiple times to claim multiple matured
* payouts.
*
* Payment: The member will receive a payment equal to their first matured
* payout to their free balance.
@@ -2834,8 +2861,8 @@ declare module '@polkadot/api/types/submittable' {
*
* Parameters:
* - `candidate`: The candidate that the member would like to bid on.
* - `approve`: A boolean which says if the candidate should be
* approved (`true`) or rejected (`false`).
* - `approve`: A boolean which says if the candidate should be approved (`true`) or
* rejected (`false`).
*
* # <weight>
* Key: C (len of candidates), M (len of members)
@@ -2879,13 +2906,14 @@ declare module '@polkadot/api/types/submittable' {
* - One storage read to retrieve all current candidates. O(C)
* - Storage Writes:
* - One storage write to insert vouching status to the member. O(1)
* - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization w/ read)
* - One storage mutate to add a new bid to the vector O(B) (TODO: possible optimization
* w/ read)
* - Up to one storage removal if bid.len() > MAX_BID_COUNT. O(1)
* - Notable Computation:
* - O(log M) search to check sender is a member.
* - O(B + C + log M) search to check user is not already a part of society.
* - O(log B) search to insert the new bid sorted.
* - External Module Operations:
* - External Pallet Operations:
* - One balance reserve operation. O(X)
* - Up to one balance unreserve operation if bids.len() > MAX_BID_COUNT.
* - Events:
+29 -10
View File
@@ -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);
}
@@ -404,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>);
@@ -428,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)));
@@ -493,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 */
+2 -2
View File
@@ -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'>);
}
/**
+1 -1
View File
@@ -165,7 +165,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
}
// nothing has been found, construct new
const registry = new TypeRegistry(blockHash, this.registry.compatSpecs);
const registry = new TypeRegistry(blockHash);
const metadata = new Metadata(registry,
await firstValueFrom((this._rpcCore.state.getMetadata as RpcInterfaceMethod).raw(header.parentHash))
);
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api', version: '6.0.3' };
export const packageInfo = { name: '@polkadot/api', version: '6.1.2' };
+4
View File
@@ -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'>;
}
}
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/rpc-core",
"version": "6.0.3",
"version": "6.1.2",
"type": "module",
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
"main": "index.js",
@@ -20,8 +20,8 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
"dependencies": {
"@babel/runtime": "^7.15.4",
"@polkadot/rpc-provider": "6.0.3",
"@polkadot/types": "6.0.3",
"@polkadot/rpc-provider": "6.1.2",
"@polkadot/types": "6.1.2",
"@polkadot/util": "^7.4.1",
"rxjs": "^7.3.0"
},
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/rpc-core', version: '6.0.3' };
export const packageInfo = { name: '@polkadot/rpc-core', version: '6.1.2' };
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/rpc-provider",
"version": "6.0.3",
"version": "6.1.2",
"type": "module",
"description": "Transport providers for the API",
"main": "index.js",
@@ -20,7 +20,7 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
"dependencies": {
"@babel/runtime": "^7.15.4",
"@polkadot/types": "6.0.3",
"@polkadot/types": "6.1.2",
"@polkadot/util": "^7.4.1",
"@polkadot/util-crypto": "^7.4.1",
"@polkadot/x-fetch": "^7.4.1",
@@ -30,7 +30,7 @@
},
"devDependencies": {
"@polkadot/keyring": "^7.4.1",
"@polkadot/types": "6.0.3",
"@polkadot/types": "6.1.2",
"mock-socket": "^9.0.3",
"nock": "^13.1.3"
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/rpc-provider', version: '6.0.3' };
export const packageInfo = { name: '@polkadot/rpc-provider', version: '6.1.2' };
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/typegen",
"version": "6.0.3",
"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": "6.0.3",
"@polkadot/rpc-provider": "6.0.3",
"@polkadot/types": "6.0.3",
"@polkadot/types-support": "6.0.3",
"@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"
}
}
+13 -1
View File
@@ -24,7 +24,12 @@ function entrySignature (lookup: PortableRegistry, allDefs: Record<string, Modul
if (storageEntry.type.isPlain) {
const typeDef = lookup.getTypeDef(storageEntry.type.asPlain);
setImports(allDefs, imports, [typeDef.lookupName || typeDef.type]);
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) {
@@ -36,8 +41,15 @@ function entrySignature (lookup: PortableRegistry, allDefs: Record<string, Modul
const keyTypes = similarTypes.map((t) => t.join(' | '));
const defValue = lookup.getTypeDef(value);
if (value.toNumber() === 416) {
console.log(JSON.stringify(defValue));
}
setImports(allDefs, imports, [
...similarTypes.reduce<string[]>((all, t) => all.concat(t), []),
storageEntry.modifier.isOptional
? 'Option'
: null,
defValue.lookupName
? undefined
: defValue.type
+6 -2
View File
@@ -46,6 +46,7 @@ const tsHashMap = tsExport;
const tsOption = tsExport;
const tsPlain = tsExport;
const tsTuple = tsExport;
const tsWrapperOpaque = tsExport;
/** @internal */
function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, { lookupIndex, name: enumName, sub }: TypeDef, imports: TypeImports): string {
@@ -72,6 +73,7 @@ function tsEnum (registry: Registry, definitions: Record<string, ModuleTypes>, {
case TypeDefInfo.Vec:
case TypeDefInfo.Option:
case TypeDefInfo.VecFixed:
case TypeDefInfo.WrapperOpaque:
return `${isGetter}${asGetter}`;
case TypeDefInfo.DoNotConstruct:
@@ -111,11 +113,12 @@ function tsResultGetter (registry: Registry, definitions: Record<string, ModuleT
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:
@@ -231,7 +234,8 @@ export const typeEncoders: Record<TypeDefInfo, (registry: Registry, definitions:
[TypeDefInfo.Tuple]: tsTuple,
[TypeDefInfo.UInt]: tsUInt,
[TypeDefInfo.Vec]: tsVec,
[TypeDefInfo.VecFixed]: tsVec
[TypeDefInfo.VecFixed]: tsVec,
[TypeDefInfo.WrapperOpaque]: tsWrapperOpaque
};
/** @internal */
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/typegen', version: '6.0.3' };
export const packageInfo = { name: '@polkadot/typegen', version: '6.1.2' };
+50 -42
View File
@@ -86,19 +86,36 @@ 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) => {
const sub = typeDef.sub as TypeDef;
setImports(definitions, imports, ['Compact', sub.lookupName]);
return paramsNotation('Compact', sub.lookupName || formatType(registry, definitions, sub.type, imports, withShortcut));
return singleParamNotation(registry, 'Compact', typeDef, definitions, imports, withShortcut);
},
[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,38 +123,43 @@ 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) => {
const sub = (typeDef.sub as TypeDef);
setImports(definitions, imports, ['Option', sub.lookupName]);
return paramsNotation('Option', sub.lookupName || formatType(registry, definitions, 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) => {
if (typeDef.lookupName) {
return typeDef.lookupName;
@@ -154,6 +176,7 @@ const formatters: Record<TypeDefInfo, (registry: Registry, typeDef: TypeDef, def
]).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) => {
const sub = typeDef.sub as TypeDef[];
@@ -166,13 +189,11 @@ const formatters: Record<TypeDefInfo, (registry: Registry, typeDef: TypeDef, def
).join(', ')
}]`);
},
[TypeDefInfo.Vec]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => {
const sub = (typeDef.sub as TypeDef);
setImports(definitions, imports, ['Vec', sub.lookupName]);
return paramsNotation('Vec', sub.lookupName || formatType(registry, definitions, 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);
@@ -182,44 +203,31 @@ const formatters: Record<TypeDefInfo, (registry: Registry, typeDef: TypeDef, def
return 'U8aFixed';
}
setImports(definitions, imports, ['Vec', sub.lookupName]);
return paramsNotation('Vec', sub.lookupName || formatType(registry, definitions, 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) => {
const [keyDef, valDef] = (typeDef.sub as TypeDef[]);
setImports(definitions, imports, ['BTreeMap', keyDef.lookupName, valDef.lookupName]);
return `BTreeMap<${keyDef.lookupName || formatType(registry, definitions, keyDef.type, imports, withShortcut)}, ${valDef.lookupName || formatType(registry, definitions, 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) => {
const valDef = typeDef.sub as TypeDef;
setImports(definitions, imports, ['BTreeSet', valDef.lookupName]);
return `BTreeSet<${valDef.lookupName || formatType(registry, definitions, 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) => {
const [keyDef, valDef] = (typeDef.sub as TypeDef[]);
setImports(definitions, imports, ['HashMap', keyDef.lookupName, valDef.lookupName]);
return `HashMap<${keyDef.lookupName || formatType(registry, definitions, keyDef.type, imports, withShortcut)}, ${valDef.lookupName || formatType(registry, definitions, 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) => {
const sub = (typeDef.sub as TypeDef);
setImports(definitions, imports, ['Linkage', sub.lookupName]);
return paramsNotation('Linkage', sub.lookupName || formatType(registry, definitions, 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) => {
const [okDef, errDef] = (typeDef.sub as TypeDef[]);
return dualParamsNotation(registry, 'Result', typeDef, definitions, imports, withShortcut);
},
setImports(definitions, imports, ['Result', okDef.lookupName, errDef.lookupName]);
return `Result<${okDef.lookupName || formatType(registry, definitions, okDef.type, imports, withShortcut)}, ${errDef.lookupName || formatType(registry, definitions, 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);
}
};
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/types-known",
"version": "6.0.3",
"version": "6.1.2",
"type": "module",
"description": "Known type definitions",
"main": "index.js",
@@ -21,7 +21,7 @@
"dependencies": {
"@babel/runtime": "^7.15.4",
"@polkadot/networks": "^7.4.1",
"@polkadot/types": "6.0.3",
"@polkadot/types": "6.1.2",
"@polkadot/util": "^7.4.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/types-known', version: '6.0.3' };
export const packageInfo = { name: '@polkadot/types-known', version: '6.1.2' };
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/types-support",
"version": "6.0.3",
"version": "6.1.2",
"type": "module",
"description": "Supporting files for types, mostly for testing",
"main": "index.js",
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
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/types-support', version: '6.0.3' };
export const packageInfo = { name: '@polkadot/types-support', version: '6.1.2' };
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/types",
"version": "6.0.3",
"version": "6.1.2",
"type": "module",
"description": "Implementation of the Parity codec",
"main": "index.js",
@@ -26,7 +26,7 @@
},
"devDependencies": {
"@polkadot/keyring": "^7.4.1",
"@polkadot/types-support": "6.0.3",
"@polkadot/types-support": "6.1.2",
"@types/bn.js": "^4.11.6",
"bn.js": "^4.12.0"
}
+16 -481
View File
@@ -7,98 +7,11 @@ import type { DefinitionsTypes } from '../../types';
export default {
/**
* Lookup75: kusama_runtime::ProxyType
* Lookup74: kusama_runtime::ProxyType
**/
KusamaRuntimeProxyType: {
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'IdentityJudgement', 'CancelProxy', 'Auction']
},
/**
* Lookup86: polkadot_primitives::v1::CandidateReceipt<primitive_types::H256>
**/
PolkadotPrimitivesV1CandidateReceipt: {
descriptor: 'PolkadotPrimitivesV1CandidateDescriptor',
commitmentsHash: 'H256'
},
/**
* Lookup87: 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'
},
/**
* Lookup89: polkadot_primitives::v0::collator_app::Public
**/
PolkadotPrimitivesV0CollatorAppPublic: 'SpCoreSr25519Public',
/**
* Lookup90: polkadot_primitives::v0::collator_app::Signature
**/
PolkadotPrimitivesV0CollatorAppSignature: 'SpCoreSr25519Signature',
/**
* Lookup99: xcm::v2::traits::Outcome
**/
XcmV2TraitsOutcome: {
_enum: {
Complete: 'u64',
Incomplete: '(u64,XcmV2TraitsError)',
Error: 'XcmV2TraitsError'
}
},
/**
* Lookup100: 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'
}
},
/**
* Lookup102: polkadot_parachain::primitives::HrmpChannelId
**/
PolkadotParachainPrimitivesHrmpChannelId: {
sender: 'u32',
recipient: 'u32'
},
/**
* Lookup108: xcm::v1::multilocation::MultiLocation
**/
@@ -508,7 +421,7 @@ export default {
}
},
/**
* Lookup237: kusama_runtime::SessionKeys
* Lookup239: kusama_runtime::SessionKeys
**/
KusamaRuntimeSessionKeys: {
grandpa: 'SpFinalityGrandpaAppPublic',
@@ -519,7 +432,7 @@ export default {
authorityDiscovery: 'SpAuthorityDiscoveryAppPublic'
},
/**
* Lookup360: kusama_runtime::NposCompactSolution24
* Lookup369: kusama_runtime::NposCompactSolution24
**/
KusamaRuntimeNposCompactSolution24: {
votes1: 'Vec<(Compact<u32>,Compact<u16>)>',
@@ -548,123 +461,7 @@ export default {
votes24: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);23],Compact<u16>)>'
},
/**
* Lookup448: 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'
},
/**
* Lookup450: polkadot_primitives::v1::signed::UncheckedSigned<polkadot_primitives::v1::AvailabilityBitfield, polkadot_primitives::v1::AvailabilityBitfield>
**/
PolkadotPrimitivesV1SignedUncheckedSigned: {
payload: 'BitVec',
validatorIndex: 'u32',
signature: 'PolkadotPrimitivesV0ValidatorAppSignature'
},
/**
* Lookup453: bitvec::order::Lsb0
**/
BitvecOrderLsb0: 'Null',
/**
* Lookup455: polkadot_primitives::v0::validator_app::Signature
**/
PolkadotPrimitivesV0ValidatorAppSignature: 'SpCoreSr25519Signature',
/**
* Lookup457: polkadot_primitives::v1::BackedCandidate<primitive_types::H256>
**/
PolkadotPrimitivesV1BackedCandidate: {
candidate: 'PolkadotPrimitivesV1CommittedCandidateReceipt',
validityVotes: 'Vec<PolkadotPrimitivesV0ValidityAttestation>',
validatorIndices: 'BitVec'
},
/**
* Lookup458: polkadot_primitives::v1::CommittedCandidateReceipt<primitive_types::H256>
**/
PolkadotPrimitivesV1CommittedCandidateReceipt: {
descriptor: 'PolkadotPrimitivesV1CandidateDescriptor',
commitments: 'PolkadotPrimitivesV1CandidateCommitments'
},
/**
* Lookup459: polkadot_primitives::v1::CandidateCommitments<N>
**/
PolkadotPrimitivesV1CandidateCommitments: {
upwardMessages: 'Vec<Bytes>',
horizontalMessages: 'Vec<PolkadotCorePrimitivesOutboundHrmpMessage>',
newValidationCode: 'Option<Bytes>',
headData: 'Bytes',
processedDownwardMessages: 'u32',
hrmpWatermark: 'u32'
},
/**
* Lookup461: polkadot_core_primitives::OutboundHrmpMessage<polkadot_parachain::primitives::Id>
**/
PolkadotCorePrimitivesOutboundHrmpMessage: {
recipient: 'u32',
data: 'Bytes'
},
/**
* Lookup465: polkadot_primitives::v0::ValidityAttestation
**/
PolkadotPrimitivesV0ValidityAttestation: {
_enum: {
Unused0: 'Null',
Implicit: 'PolkadotPrimitivesV0ValidatorAppSignature',
Explicit: 'PolkadotPrimitivesV0ValidatorAppSignature'
}
},
/**
* Lookup467: polkadot_primitives::v1::DisputeStatementSet
**/
PolkadotPrimitivesV1DisputeStatementSet: {
candidateHash: 'H256',
session: 'u32',
statements: 'Vec<(PolkadotPrimitivesV1DisputeStatement,u32,PolkadotPrimitivesV0ValidatorAppSignature)>'
},
/**
* Lookup471: polkadot_primitives::v1::DisputeStatement
**/
PolkadotPrimitivesV1DisputeStatement: {
_enum: {
Valid: 'PolkadotPrimitivesV1ValidDisputeStatementKind',
Invalid: 'PolkadotPrimitivesV1InvalidDisputeStatementKind'
}
},
/**
* Lookup472: polkadot_primitives::v1::ValidDisputeStatementKind
**/
PolkadotPrimitivesV1ValidDisputeStatementKind: {
_enum: {
Explicit: 'Null',
BackingSeconded: 'H256',
BackingValid: 'H256',
ApprovalChecking: 'Null'
}
},
/**
* Lookup473: polkadot_primitives::v1::InvalidDisputeStatementKind
**/
PolkadotPrimitivesV1InvalidDisputeStatementKind: {
_enum: ['Explicit']
},
/**
* Lookup485: sp_runtime::MultiSigner
**/
SpRuntimeMultiSigner: {
_enum: {
Ed25519: 'SpCoreEd25519Public',
Sr25519: 'SpCoreSr25519Public',
Ecdsa: 'SpCoreEcdsaPublic'
}
},
/**
* Lookup486: sp_core::ecdsa::Public
**/
SpCoreEcdsaPublic: '[u8;33]',
/**
* Lookup492: xcm::VersionedXcm<Call>
* Lookup502: xcm::VersionedXcm<Call>
**/
XcmVersionedXcm: {
_enum: {
@@ -674,7 +471,7 @@ export default {
}
},
/**
* Lookup493: xcm::v0::Xcm<Call>
* Lookup503: xcm::v0::Xcm<Call>
**/
XcmV0Xcm: {
_enum: {
@@ -731,7 +528,7 @@ export default {
}
},
/**
* Lookup495: xcm::v0::order::Order<Call>
* Lookup505: xcm::v0::order::Order<Call>
**/
XcmV0Order: {
_enum: {
@@ -774,7 +571,7 @@ export default {
}
},
/**
* Lookup497: xcm::v0::Response
* Lookup507: xcm::v0::Response
**/
XcmV0Response: {
_enum: {
@@ -782,7 +579,7 @@ export default {
}
},
/**
* Lookup498: xcm::v1::Xcm<Call>
* Lookup508: xcm::v1::Xcm<Call>
**/
XcmV1Xcm: {
_enum: {
@@ -844,7 +641,7 @@ export default {
}
},
/**
* Lookup500: xcm::v1::order::Order<Call>
* Lookup510: xcm::v1::order::Order<Call>
**/
XcmV1Order: {
_enum: {
@@ -889,7 +686,7 @@ export default {
}
},
/**
* Lookup502: xcm::v1::Response
* Lookup512: xcm::v1::Response
**/
XcmV1Response: {
_enum: {
@@ -898,7 +695,7 @@ export default {
}
},
/**
* Lookup563: kusama_runtime::OriginCaller
* Lookup573: kusama_runtime::OriginCaller
**/
KusamaRuntimeOriginCaller: {
_enum: {
@@ -1005,15 +802,7 @@ export default {
}
},
/**
* Lookup567: polkadot_runtime_parachains::origin::pallet::Origin
**/
PolkadotRuntimeParachainsOriginPalletOrigin: {
_enum: {
Parachain: 'u32'
}
},
/**
* Lookup568: pallet_xcm::pallet::Origin
* Lookup578: pallet_xcm::pallet::Origin
**/
PalletXcmOrigin: {
_enum: {
@@ -1022,261 +811,7 @@ export default {
}
},
/**
* Lookup607: 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'
},
/**
* Lookup611: polkadot_runtime_parachains::inclusion::AvailabilityBitfieldRecord<N>
**/
PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord: {
bitfield: 'BitVec',
submittedAt: 'u32'
},
/**
* Lookup612: 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'
},
/**
* Lookup616: polkadot_runtime_parachains::scheduler::ParathreadClaimQueue
**/
PolkadotRuntimeParachainsSchedulerParathreadClaimQueue: {
queue: 'Vec<PolkadotRuntimeParachainsSchedulerQueuedParathread>',
nextCoreOffset: 'u32'
},
/**
* Lookup618: polkadot_runtime_parachains::scheduler::QueuedParathread
**/
PolkadotRuntimeParachainsSchedulerQueuedParathread: {
claim: 'PolkadotPrimitivesV1ParathreadEntry',
coreOffset: 'u32'
},
/**
* Lookup619: polkadot_primitives::v1::ParathreadEntry
**/
PolkadotPrimitivesV1ParathreadEntry: {
claim: 'PolkadotPrimitivesV1ParathreadClaim',
retries: 'u32'
},
/**
* Lookup620: polkadot_primitives::v1::ParathreadClaim
**/
PolkadotPrimitivesV1ParathreadClaim: '(u32,PolkadotPrimitivesV0CollatorAppPublic)',
/**
* Lookup623: polkadot_primitives::v1::CoreOccupied
**/
PolkadotPrimitivesV1CoreOccupied: {
_enum: {
Parathread: 'PolkadotPrimitivesV1ParathreadEntry',
Parachain: 'Null'
}
},
/**
* Lookup626: polkadot_runtime_parachains::scheduler::CoreAssignment
**/
PolkadotRuntimeParachainsSchedulerCoreAssignment: {
core: 'u32',
paraId: 'u32',
kind: 'PolkadotRuntimeParachainsSchedulerAssignmentKind',
groupIdx: 'u32'
},
/**
* Lookup627: polkadot_runtime_parachains::scheduler::AssignmentKind
**/
PolkadotRuntimeParachainsSchedulerAssignmentKind: {
_enum: {
Parachain: 'Null',
Parathread: '(PolkadotPrimitivesV0CollatorAppPublic,u32)'
}
},
/**
* Lookup628: polkadot_runtime_parachains::paras::ParaLifecycle
**/
PolkadotRuntimeParachainsParasParaLifecycle: {
_enum: ['Onboarding', 'Parathread', 'Parachain', 'UpgradingParathread', 'DowngradingParachain', 'OffboardingParathread', 'OffboardingParachain']
},
/**
* Lookup630: polkadot_runtime_parachains::paras::ParaPastCodeMeta<N>
**/
PolkadotRuntimeParachainsParasParaPastCodeMeta: {
upgradeTimes: 'Vec<PolkadotRuntimeParachainsParasReplacementTimes>',
lastPruned: 'Option<u32>'
},
/**
* Lookup632: polkadot_runtime_parachains::paras::ReplacementTimes<N>
**/
PolkadotRuntimeParachainsParasReplacementTimes: {
expectedAt: 'u32',
activatedAt: 'u32'
},
/**
* Lookup634: polkadot_primitives::v1::UpgradeGoAhead
**/
PolkadotPrimitivesV1UpgradeGoAhead: {
_enum: ['Abort', 'GoAhead']
},
/**
* Lookup635: polkadot_primitives::v1::UpgradeRestriction
**/
PolkadotPrimitivesV1UpgradeRestriction: {
_enum: ['Present']
},
/**
* Lookup636: polkadot_runtime_parachains::paras::ParaGenesisArgs
**/
PolkadotRuntimeParachainsParasParaGenesisArgs: {
genesisHead: 'Bytes',
validationCode: 'Bytes',
parachain: 'bool'
},
/**
* Lookup639: polkadot_runtime_parachains::initializer::BufferedSessionChange
**/
PolkadotRuntimeParachainsInitializerBufferedSessionChange: {
validators: 'Vec<PolkadotPrimitivesV0ValidatorAppPublic>',
queued: 'Vec<PolkadotPrimitivesV0ValidatorAppPublic>',
sessionIndex: 'u32'
},
/**
* Lookup641: polkadot_core_primitives::InboundDownwardMessage<BlockNumber>
**/
PolkadotCorePrimitivesInboundDownwardMessage: {
sentAt: 'u32',
msg: 'Bytes'
},
/**
* Lookup644: polkadot_runtime_parachains::hrmp::HrmpOpenChannelRequest
**/
PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest: {
confirmed: 'bool',
age: 'u32',
senderDeposit: 'u128',
maxMessageSize: 'u32',
maxCapacity: 'u32',
maxTotalSize: 'u32'
},
/**
* Lookup646: polkadot_runtime_parachains::hrmp::HrmpChannel
**/
PolkadotRuntimeParachainsHrmpHrmpChannel: {
maxCapacity: 'u32',
maxTotalSize: 'u32',
maxMessageSize: 'u32',
msgCount: 'u32',
totalSize: 'u32',
mqcHead: 'Option<H256>',
senderDeposit: 'u128',
recipientDeposit: 'u128'
},
/**
* Lookup649: polkadot_core_primitives::InboundHrmpMessage<BlockNumber>
**/
PolkadotCorePrimitivesInboundHrmpMessage: {
sentAt: 'u32',
data: 'Bytes'
},
/**
* Lookup654: 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'
},
/**
* Lookup656: polkadot_runtime_common::paras_registrar::ParaInfo<sp_core::crypto::AccountId32, Balance>
**/
PolkadotRuntimeCommonParasRegistrarParaInfo: {
manager: 'AccountId32',
deposit: 'u128',
locked: 'bool'
},
/**
* Lookup666: 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'
},
/**
* Lookup667: polkadot_runtime_common::crowdloan::LastContribution<BlockNumber>
**/
PolkadotRuntimeCommonCrowdloanLastContribution: {
_enum: {
Never: 'Null',
PreEnding: 'u32',
Ending: 'u32'
}
},
/**
* Lookup669: pallet_xcm::pallet::QueryStatus<BlockNumber>
* Lookup682: pallet_xcm::pallet::QueryStatus<BlockNumber>
**/
PalletXcmQueryStatus: {
_enum: {
@@ -1296,7 +831,7 @@ export default {
}
},
/**
* Lookup672: xcm::VersionedResponse
* Lookup685: xcm::VersionedResponse
**/
XcmVersionedResponse: {
_enum: {
@@ -1306,7 +841,7 @@ export default {
}
},
/**
* Lookup678: pallet_xcm::pallet::VersionMigrationStage
* Lookup691: pallet_xcm::pallet::VersionMigrationStage
**/
PalletXcmVersionMigrationStage: {
_enum: {
@@ -1317,7 +852,7 @@ export default {
}
},
/**
* Lookup690: kusama_runtime::Runtime
* Lookup703: kusama_runtime::Runtime
**/
KusamaRuntimeRuntime: 'Null'
} as DefinitionsTypes;
+511 -12
View File
@@ -14,10 +14,97 @@ export default {
* Lookup72: polkadot_runtime::ProxyType
**/
PolkadotRuntimeProxyType: {
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'Unused4', 'IdentityJudgement', 'CancelProxy']
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking', 'Unused4', 'IdentityJudgement', 'CancelProxy', 'Auction']
},
/**
* Lookup139: polkadot_runtime::SessionKeys
* 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',
@@ -28,25 +115,25 @@ export default {
authorityDiscovery: 'SpAuthorityDiscoveryAppPublic'
},
/**
* Lookup140: polkadot_primitives::v0::validator_app::Public
* Lookup162: polkadot_primitives::v0::validator_app::Public
**/
PolkadotPrimitivesV0ValidatorAppPublic: 'SpCoreSr25519Public',
/**
* Lookup141: polkadot_primitives::v1::assignment_app::Public
* Lookup163: polkadot_primitives::v1::assignment_app::Public
**/
PolkadotPrimitivesV1AssignmentAppPublic: 'SpCoreSr25519Public',
/**
* Lookup175: polkadot_runtime_common::claims::EcdsaSignature
* Lookup195: polkadot_runtime_common::claims::EcdsaSignature
**/
PolkadotRuntimeCommonClaimsEcdsaSignature: '[u8;65]',
/**
* Lookup180: polkadot_runtime_common::claims::StatementKind
* Lookup200: polkadot_runtime_common::claims::StatementKind
**/
PolkadotRuntimeCommonClaimsStatementKind: {
_enum: ['Regular', 'Saft']
},
/**
* Lookup233: polkadot_runtime::NposCompactSolution16
* Lookup253: polkadot_runtime::NposCompactSolution16
**/
PolkadotRuntimeNposCompactSolution16: {
votes1: 'Vec<(Compact<u32>,Compact<u16>)>',
@@ -67,15 +154,131 @@ export default {
votes16: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);15],Compact<u16>)>'
},
/**
* Lookup290: polkadot_runtime::OriginCaller
* 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',
Unused4: 'Null',
Unused5: 'Null',
Unused6: 'Null',
Unused7: 'Null',
@@ -87,15 +290,311 @@ export default {
Unused13: 'Null',
Unused14: 'Null',
Council: 'PalletCollectiveRawOrigin',
TechnicalCommittee: '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'
}
},
/**
* Lookup441: polkadot_runtime_common::claims::PrevalidateAttests<T>
* 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',
/**
* Lookup442: polkadot_runtime::Runtime
* Lookup579: polkadot_runtime::Runtime
**/
PolkadotRuntimeRuntime: 'Null'
} as DefinitionsTypes;
+115 -96
View File
@@ -178,17 +178,13 @@ export default {
value: 'Compact<u128>'
},
/**
* Lookup70: pallet_society::DefaultInstance
**/
PalletSocietyDefaultInstance: 'Null',
/**
* Lookup77: node_runtime::ProxyType
* Lookup76: node_runtime::ProxyType
**/
NodeRuntimeProxyType: {
_enum: ['Any', 'NonTransfer', 'Governance', 'Staking']
},
/**
* Lookup80: pallet_multisig::Timepoint<BlockNumber>
* Lookup79: pallet_multisig::Timepoint<BlockNumber>
**/
PalletMultisigTimepoint: {
height: 'u32',
@@ -595,14 +591,14 @@ export default {
proof: 'Vec<Bytes>'
},
/**
* Lookup310: sp_consensus_babe::BabeEpochConfiguration
* Lookup313: sp_consensus_babe::BabeEpochConfiguration
**/
SpConsensusBabeBabeEpochConfiguration: {
c: '(u64,u64)',
allowedSlots: 'SpConsensusBabeAllowedSlots'
},
/**
* Lookup313: pallet_authorship::UncleEntryItem<BlockNumber, primitive_types::H256, sp_core::crypto::AccountId32>
* Lookup316: pallet_authorship::UncleEntryItem<BlockNumber, primitive_types::H256, sp_core::crypto::AccountId32>
**/
PalletAuthorshipUncleEntryItem: {
_enum: {
@@ -611,7 +607,7 @@ export default {
}
},
/**
* Lookup318: pallet_balances::BalanceLock<Balance>
* Lookup321: pallet_balances::BalanceLock<Balance>
**/
PalletBalancesBalanceLock: {
id: '[u8;8]',
@@ -619,32 +615,32 @@ export default {
reasons: 'PalletBalancesReasons'
},
/**
* Lookup319: pallet_balances::Reasons
* Lookup322: pallet_balances::Reasons
**/
PalletBalancesReasons: {
_enum: ['Fee', 'Misc', 'All']
},
/**
* Lookup322: pallet_balances::ReserveData<ReserveIdentifier, Balance>
* Lookup325: pallet_balances::ReserveData<ReserveIdentifier, Balance>
**/
PalletBalancesReserveData: {
id: '[u8;8]',
amount: 'u128'
},
/**
* Lookup324: pallet_balances::Releases
* Lookup327: pallet_balances::Releases
**/
PalletBalancesReleases: {
_enum: ['V1_0_0', 'V2_0_0']
},
/**
* Lookup327: pallet_transaction_payment::Releases
* Lookup330: pallet_transaction_payment::Releases
**/
PalletTransactionPaymentReleases: {
_enum: ['V1Ancient', 'V2']
},
/**
* Lookup329: frame_support::weights::WeightToFeeCoefficient<Balance>
* Lookup332: frame_support::weights::WeightToFeeCoefficient<Balance>
**/
FrameSupportWeightsWeightToFeeCoefficient: {
coeffInteger: 'u128',
@@ -653,7 +649,7 @@ export default {
degree: 'u8'
},
/**
* Lookup330: pallet_election_provider_multi_phase::Phase<Bn>
* Lookup333: pallet_election_provider_multi_phase::Phase<Bn>
**/
PalletElectionProviderMultiPhasePhase: {
_enum: {
@@ -664,7 +660,7 @@ export default {
}
},
/**
* Lookup332: pallet_election_provider_multi_phase::ReadySolution<sp_core::crypto::AccountId32>
* Lookup335: pallet_election_provider_multi_phase::ReadySolution<sp_core::crypto::AccountId32>
**/
PalletElectionProviderMultiPhaseReadySolution: {
supports: 'Vec<(AccountId32,SpNposElectionsSupport)>',
@@ -672,14 +668,14 @@ export default {
compute: 'PalletElectionProviderMultiPhaseElectionCompute'
},
/**
* Lookup333: pallet_election_provider_multi_phase::RoundSnapshot<sp_core::crypto::AccountId32>
* Lookup336: pallet_election_provider_multi_phase::RoundSnapshot<sp_core::crypto::AccountId32>
**/
PalletElectionProviderMultiPhaseRoundSnapshot: {
voters: 'Vec<(AccountId32,u64,Vec<AccountId32>)>',
targets: 'Vec<AccountId32>'
},
/**
* Lookup340: pallet_election_provider_multi_phase::signed::SignedSubmission<sp_core::crypto::AccountId32, Balance, node_runtime::NposSolution16>
* Lookup343: pallet_election_provider_multi_phase::signed::SignedSubmission<sp_core::crypto::AccountId32, Balance, node_runtime::NposSolution16>
**/
PalletElectionProviderMultiPhaseSignedSignedSubmission: {
who: 'AccountId32',
@@ -688,7 +684,7 @@ export default {
reward: 'u128'
},
/**
* Lookup342: pallet_staking::StakingLedger<sp_core::crypto::AccountId32, Balance>
* Lookup345: pallet_staking::StakingLedger<sp_core::crypto::AccountId32, Balance>
**/
PalletStakingStakingLedger: {
stash: 'AccountId32',
@@ -698,14 +694,14 @@ export default {
claimedRewards: 'Vec<u32>'
},
/**
* Lookup344: pallet_staking::UnlockChunk<Balance>
* Lookup347: pallet_staking::UnlockChunk<Balance>
**/
PalletStakingUnlockChunk: {
value: 'Compact<u128>',
era: 'Compact<u32>'
},
/**
* Lookup345: pallet_staking::Nominations<sp_core::crypto::AccountId32>
* Lookup348: pallet_staking::Nominations<sp_core::crypto::AccountId32>
**/
PalletStakingNominations: {
targets: 'Vec<AccountId32>',
@@ -713,27 +709,27 @@ export default {
suppressed: 'bool'
},
/**
* Lookup346: pallet_staking::ActiveEraInfo
* Lookup349: pallet_staking::ActiveEraInfo
**/
PalletStakingActiveEraInfo: {
index: 'u32',
start: 'Option<u64>'
},
/**
* Lookup348: pallet_staking::EraRewardPoints<sp_core::crypto::AccountId32>
* Lookup351: pallet_staking::EraRewardPoints<sp_core::crypto::AccountId32>
**/
PalletStakingEraRewardPoints: {
total: 'u32',
individual: 'BTreeMap<AccountId32, u32>'
},
/**
* Lookup352: pallet_staking::Forcing
* Lookup355: pallet_staking::Forcing
**/
PalletStakingForcing: {
_enum: ['NotForcing', 'ForceNew', 'ForceNone', 'ForceAlways']
},
/**
* Lookup354: pallet_staking::UnappliedSlash<sp_core::crypto::AccountId32, Balance>
* Lookup357: pallet_staking::UnappliedSlash<sp_core::crypto::AccountId32, Balance>
**/
PalletStakingUnappliedSlash: {
validator: 'AccountId32',
@@ -743,7 +739,7 @@ export default {
payout: 'u128'
},
/**
* Lookup356: pallet_staking::slashing::SlashingSpans
* Lookup359: pallet_staking::slashing::SlashingSpans
**/
PalletStakingSlashingSlashingSpans: {
spanIndex: 'u32',
@@ -752,24 +748,24 @@ export default {
prior: 'Vec<u32>'
},
/**
* Lookup357: pallet_staking::slashing::SpanRecord<Balance>
* Lookup360: pallet_staking::slashing::SpanRecord<Balance>
**/
PalletStakingSlashingSpanRecord: {
slashed: 'u128',
paidOut: 'u128'
},
/**
* Lookup358: pallet_staking::Releases
* Lookup361: pallet_staking::Releases
**/
PalletStakingReleases: {
_enum: ['V1_0_0Ancient', 'V2_0_0', 'V3_0_0', 'V4_0_0', 'V5_0_0', 'V6_0_0', 'V7_0_0']
_enum: ['V1_0_0Ancient', 'V2_0_0', 'V3_0_0', 'V4_0_0', 'V5_0_0', 'V6_0_0', 'V7_0_0', 'V8_0_0']
},
/**
* Lookup363: sp_core::crypto::KeyTypeId
* Lookup366: sp_core::crypto::KeyTypeId
**/
SpCoreCryptoKeyTypeId: '[u8;4]',
/**
* Lookup368: pallet_democracy::PreimageStatus<sp_core::crypto::AccountId32, Balance, BlockNumber>
* Lookup371: pallet_democracy::PreimageStatus<sp_core::crypto::AccountId32, Balance, BlockNumber>
**/
PalletDemocracyPreimageStatus: {
_enum: {
@@ -784,7 +780,7 @@ export default {
}
},
/**
* Lookup369: pallet_democracy::types::ReferendumInfo<BlockNumber, primitive_types::H256, Balance>
* Lookup372: pallet_democracy::types::ReferendumInfo<BlockNumber, primitive_types::H256, Balance>
**/
PalletDemocracyReferendumInfo: {
_enum: {
@@ -796,7 +792,7 @@ export default {
}
},
/**
* Lookup370: pallet_democracy::types::ReferendumStatus<BlockNumber, primitive_types::H256, Balance>
* Lookup373: pallet_democracy::types::ReferendumStatus<BlockNumber, primitive_types::H256, Balance>
**/
PalletDemocracyReferendumStatus: {
end: 'u32',
@@ -806,7 +802,7 @@ export default {
tally: 'PalletDemocracyTally'
},
/**
* Lookup371: pallet_democracy::types::Tally<Balance>
* Lookup374: pallet_democracy::types::Tally<Balance>
**/
PalletDemocracyTally: {
ayes: 'u128',
@@ -814,7 +810,7 @@ export default {
turnout: 'u128'
},
/**
* Lookup372: pallet_democracy::vote::Voting<Balance, sp_core::crypto::AccountId32, BlockNumber>
* Lookup375: pallet_democracy::vote::Voting<Balance, sp_core::crypto::AccountId32, BlockNumber>
**/
PalletDemocracyVoteVoting: {
_enum: {
@@ -833,24 +829,24 @@ export default {
}
},
/**
* Lookup375: pallet_democracy::types::Delegations<Balance>
* Lookup378: pallet_democracy::types::Delegations<Balance>
**/
PalletDemocracyDelegations: {
votes: 'u128',
capital: 'u128'
},
/**
* Lookup376: pallet_democracy::vote::PriorLock<BlockNumber, Balance>
* Lookup379: pallet_democracy::vote::PriorLock<BlockNumber, Balance>
**/
PalletDemocracyVotePriorLock: '(u32,u128)',
/**
* Lookup379: pallet_democracy::Releases
* Lookup382: pallet_democracy::Releases
**/
PalletDemocracyReleases: {
_enum: ['V1']
},
/**
* Lookup382: pallet_collective::Votes<sp_core::crypto::AccountId32, BlockNumber>
* Lookup385: pallet_collective::Votes<sp_core::crypto::AccountId32, BlockNumber>
**/
PalletCollectiveVotes: {
index: 'u32',
@@ -860,7 +856,7 @@ export default {
end: 'u32'
},
/**
* Lookup387: pallet_elections_phragmen::SeatHolder<sp_core::crypto::AccountId32, Balance>
* Lookup390: pallet_elections_phragmen::SeatHolder<sp_core::crypto::AccountId32, Balance>
**/
PalletElectionsPhragmenSeatHolder: {
who: 'AccountId32',
@@ -868,7 +864,7 @@ export default {
deposit: 'u128'
},
/**
* Lookup388: pallet_elections_phragmen::Voter<sp_core::crypto::AccountId32, Balance>
* Lookup391: pallet_elections_phragmen::Voter<sp_core::crypto::AccountId32, Balance>
**/
PalletElectionsPhragmenVoter: {
votes: 'Vec<AccountId32>',
@@ -876,7 +872,7 @@ export default {
deposit: 'u128'
},
/**
* Lookup391: pallet_grandpa::StoredState<N>
* Lookup394: pallet_grandpa::StoredState<N>
**/
PalletGrandpaStoredState: {
_enum: {
@@ -893,7 +889,7 @@ export default {
}
},
/**
* Lookup392: pallet_grandpa::StoredPendingChange<N>
* Lookup395: pallet_grandpa::StoredPendingChange<N, Limit>
**/
PalletGrandpaStoredPendingChange: {
scheduledAt: 'u32',
@@ -902,7 +898,7 @@ export default {
forced: 'Option<u32>'
},
/**
* Lookup394: pallet_treasury::Proposal<sp_core::crypto::AccountId32, Balance>
* Lookup398: pallet_treasury::Proposal<sp_core::crypto::AccountId32, Balance>
**/
PalletTreasuryProposal: {
proposer: 'AccountId32',
@@ -911,11 +907,11 @@ export default {
bond: 'u128'
},
/**
* Lookup397: frame_support::PalletId
* Lookup401: frame_support::PalletId
**/
FrameSupportPalletId: '[u8;8]',
/**
* Lookup399: pallet_contracts::wasm::PrefabWasmModule<T>
* Lookup403: pallet_contracts::wasm::PrefabWasmModule<T>
**/
PalletContractsWasmPrefabWasmModule: {
instructionWeightsVersion: 'Compact<u32>',
@@ -927,7 +923,7 @@ export default {
originalCodeLen: 'u32'
},
/**
* Lookup401: pallet_contracts::storage::RawContractInfo<primitive_types::H256>
* Lookup405: pallet_contracts::storage::RawContractInfo<primitive_types::H256>
**/
PalletContractsStorageRawContractInfo: {
trieId: 'Bytes',
@@ -935,13 +931,13 @@ export default {
reserved: 'Option<Null>'
},
/**
* Lookup403: pallet_contracts::storage::DeletedContract
* Lookup407: pallet_contracts::storage::DeletedContract
**/
PalletContractsStorageDeletedContract: {
trieId: 'Bytes'
},
/**
* Lookup404: pallet_contracts::schedule::Schedule<T>
* Lookup408: pallet_contracts::schedule::Schedule<T>
**/
PalletContractsSchedule: {
limits: 'PalletContractsScheduleLimits',
@@ -949,7 +945,7 @@ export default {
hostFnWeights: 'PalletContractsScheduleHostFnWeights'
},
/**
* Lookup405: pallet_contracts::schedule::Limits
* Lookup409: pallet_contracts::schedule::Limits
**/
PalletContractsScheduleLimits: {
eventTopics: 'u32',
@@ -965,7 +961,7 @@ export default {
codeLen: 'u32'
},
/**
* Lookup406: pallet_contracts::schedule::InstructionWeights<T>
* Lookup410: pallet_contracts::schedule::InstructionWeights<T>
**/
PalletContractsScheduleInstructionWeights: {
_alias: {
@@ -1026,7 +1022,7 @@ export default {
i64Rotr: 'u32'
},
/**
* Lookup407: pallet_contracts::schedule::HostFnWeights<T>
* Lookup411: pallet_contracts::schedule::HostFnWeights<T>
**/
PalletContractsScheduleHostFnWeights: {
_alias: {
@@ -1079,14 +1075,21 @@ export default {
ecdsaRecover: 'u64'
},
/**
* Lookup412: sp_staking::offence::OffenceDetails<sp_core::crypto::AccountId32, Offender>
* Lookup417: pallet_im_online::BoundedOpaqueNetworkState<PeerIdEncodingLimit, MultiAddrEncodingLimit, AddressesLimit>
**/
PalletImOnlineBoundedOpaqueNetworkState: {
peerId: 'Bytes',
externalAddresses: 'Vec<Bytes>'
},
/**
* Lookup422: sp_staking::offence::OffenceDetails<sp_core::crypto::AccountId32, Offender>
**/
SpStakingOffenceOffenceDetails: {
offender: '(AccountId32,PalletStakingExposure)',
reporters: 'Vec<AccountId32>'
},
/**
* Lookup414: pallet_identity::types::Registration<Balance, MaxJudgements, MaxAdditionalFields>
* Lookup424: pallet_identity::types::Registration<Balance, MaxJudgements, MaxAdditionalFields>
**/
PalletIdentityRegistration: {
judgements: 'Vec<(u32,PalletIdentityJudgement)>',
@@ -1094,7 +1097,7 @@ export default {
info: 'PalletIdentityIdentityInfo'
},
/**
* Lookup422: pallet_identity::types::RegistrarInfo<Balance, sp_core::crypto::AccountId32>
* Lookup432: pallet_identity::types::RegistrarInfo<Balance, sp_core::crypto::AccountId32>
**/
PalletIdentityRegistrarInfo: {
account: 'AccountId32',
@@ -1102,7 +1105,7 @@ export default {
fields: 'PalletIdentityBitFlags'
},
/**
* Lookup426: pallet_society::Bid<sp_core::crypto::AccountId32, Balance>
* Lookup436: pallet_society::Bid<sp_core::crypto::AccountId32, Balance>
**/
PalletSocietyBid: {
who: 'AccountId32',
@@ -1110,7 +1113,7 @@ export default {
value: 'u128'
},
/**
* Lookup427: pallet_society::BidKind<sp_core::crypto::AccountId32, Balance>
* Lookup437: pallet_society::BidKind<sp_core::crypto::AccountId32, Balance>
**/
PalletSocietyBidKind: {
_enum: {
@@ -1119,19 +1122,19 @@ export default {
}
},
/**
* Lookup429: pallet_society::VouchingStatus
* Lookup439: pallet_society::VouchingStatus
**/
PalletSocietyVouchingStatus: {
_enum: ['Vouching', 'Banned']
},
/**
* Lookup433: pallet_society::Vote
* Lookup443: pallet_society::Vote
**/
PalletSocietyVote: {
_enum: ['Skeptic', 'Reject', 'Approve']
},
/**
* Lookup435: pallet_recovery::RecoveryConfig<BlockNumber, Balance, sp_core::crypto::AccountId32>
* Lookup445: pallet_recovery::RecoveryConfig<BlockNumber, Balance, sp_core::crypto::AccountId32>
**/
PalletRecoveryRecoveryConfig: {
delayPeriod: 'u32',
@@ -1140,7 +1143,7 @@ export default {
threshold: 'u16'
},
/**
* Lookup436: pallet_recovery::ActiveRecovery<BlockNumber, Balance, sp_core::crypto::AccountId32>
* Lookup446: pallet_recovery::ActiveRecovery<BlockNumber, Balance, sp_core::crypto::AccountId32>
**/
PalletRecoveryActiveRecovery: {
created: 'u32',
@@ -1148,13 +1151,13 @@ export default {
friends: 'Vec<AccountId32>'
},
/**
* Lookup440: pallet_vesting::Releases
* Lookup450: pallet_vesting::Releases
**/
PalletVestingReleases: {
_enum: ['V0', 'V1']
},
/**
* Lookup444: pallet_scheduler::ScheduledV2<node_runtime::Call, BlockNumber, node_runtime::OriginCaller, sp_core::crypto::AccountId32>
* Lookup454: pallet_scheduler::ScheduledV2<node_runtime::Call, BlockNumber, node_runtime::OriginCaller, sp_core::crypto::AccountId32>
**/
PalletSchedulerScheduledV2: {
_alias: {
@@ -1167,7 +1170,7 @@ export default {
origin: 'NodeRuntimeOriginCaller'
},
/**
* Lookup445: node_runtime::OriginCaller
* Lookup455: node_runtime::OriginCaller
**/
NodeRuntimeOriginCaller: {
_enum: {
@@ -1188,7 +1191,7 @@ export default {
}
},
/**
* Lookup446: frame_system::RawOrigin<sp_core::crypto::AccountId32>
* Lookup456: frame_system::RawOrigin<sp_core::crypto::AccountId32>
**/
FrameSystemRawOrigin: {
_enum: {
@@ -1198,7 +1201,7 @@ export default {
}
},
/**
* Lookup447: pallet_collective::RawOrigin<sp_core::crypto::AccountId32, I>
* Lookup457: pallet_collective::RawOrigin<sp_core::crypto::AccountId32, I>
**/
PalletCollectiveRawOrigin: {
_enum: {
@@ -1208,17 +1211,17 @@ export default {
}
},
/**
* Lookup449: sp_core::Void
* Lookup459: sp_core::Void
**/
SpCoreVoid: 'Null',
/**
* Lookup450: pallet_scheduler::Releases
* Lookup460: pallet_scheduler::Releases
**/
PalletSchedulerReleases: {
_enum: ['V1', 'V2']
},
/**
* Lookup454: pallet_proxy::ProxyDefinition<sp_core::crypto::AccountId32, node_runtime::ProxyType, BlockNumber>
* Lookup464: pallet_proxy::ProxyDefinition<sp_core::crypto::AccountId32, node_runtime::ProxyType, BlockNumber>
**/
PalletProxyProxyDefinition: {
delegate: 'AccountId32',
@@ -1226,7 +1229,7 @@ export default {
delay: 'u32'
},
/**
* Lookup458: pallet_proxy::Announcement<sp_core::crypto::AccountId32, primitive_types::H256, BlockNumber>
* Lookup468: pallet_proxy::Announcement<sp_core::crypto::AccountId32, primitive_types::H256, BlockNumber>
**/
PalletProxyAnnouncement: {
real: 'AccountId32',
@@ -1234,7 +1237,7 @@ export default {
height: 'u32'
},
/**
* Lookup462: pallet_multisig::Multisig<BlockNumber, Balance, sp_core::crypto::AccountId32>
* Lookup472: pallet_multisig::Multisig<BlockNumber, Balance, sp_core::crypto::AccountId32>
**/
PalletMultisigMultisig: {
when: 'PalletMultisigTimepoint',
@@ -1243,7 +1246,7 @@ export default {
approvals: 'Vec<AccountId32>'
},
/**
* Lookup465: pallet_bounties::Bounty<sp_core::crypto::AccountId32, Balance, BlockNumber>
* Lookup475: pallet_bounties::Bounty<sp_core::crypto::AccountId32, Balance, BlockNumber>
**/
PalletBountiesBounty: {
proposer: 'AccountId32',
@@ -1254,7 +1257,7 @@ export default {
status: 'PalletBountiesBountyStatus'
},
/**
* Lookup466: pallet_bounties::BountyStatus<sp_core::crypto::AccountId32, BlockNumber>
* Lookup476: pallet_bounties::BountyStatus<sp_core::crypto::AccountId32, BlockNumber>
**/
PalletBountiesBountyStatus: {
_enum: {
@@ -1276,7 +1279,7 @@ export default {
}
},
/**
* Lookup468: pallet_tips::OpenTip<sp_core::crypto::AccountId32, Balance, BlockNumber, primitive_types::H256>
* Lookup478: pallet_tips::OpenTip<sp_core::crypto::AccountId32, Balance, BlockNumber, primitive_types::H256>
**/
PalletTipsOpenTip: {
reason: 'H256',
@@ -1288,7 +1291,7 @@ export default {
findersFee: 'bool'
},
/**
* Lookup470: pallet_assets::types::AssetDetails<Balance, sp_core::crypto::AccountId32, DepositBalance>
* Lookup480: pallet_assets::types::AssetDetails<Balance, sp_core::crypto::AccountId32, DepositBalance>
**/
PalletAssetsAssetDetails: {
owner: 'AccountId32',
@@ -1305,7 +1308,7 @@ export default {
isFrozen: 'bool'
},
/**
* Lookup471: pallet_assets::types::AssetBalance<Balance, Extra>
* Lookup481: pallet_assets::types::AssetBalance<Balance, Extra>
**/
PalletAssetsAssetBalance: {
balance: 'u64',
@@ -1314,14 +1317,14 @@ export default {
extra: 'Null'
},
/**
* Lookup473: pallet_assets::types::Approval<Balance, DepositBalance>
* Lookup483: pallet_assets::types::Approval<Balance, DepositBalance>
**/
PalletAssetsApproval: {
amount: 'u64',
deposit: 'u128'
},
/**
* Lookup474: pallet_assets::types::AssetMetadata<DepositBalance, frame_support::storage::bounded_vec::BoundedVec<T, S>>
* Lookup484: pallet_assets::types::AssetMetadata<DepositBalance, frame_support::storage::bounded_vec::BoundedVec<T, S>>
**/
PalletAssetsAssetMetadata: {
deposit: 'u128',
@@ -1331,7 +1334,7 @@ export default {
isFrozen: 'bool'
},
/**
* Lookup476: pallet_lottery::LotteryConfig<BlockNumber, Balance>
* Lookup486: pallet_lottery::LotteryConfig<BlockNumber, Balance>
**/
PalletLotteryLotteryConfig: {
price: 'u128',
@@ -1341,14 +1344,14 @@ export default {
repeat: 'bool'
},
/**
* Lookup481: pallet_gilt::pallet::GiltBid<Balance, sp_core::crypto::AccountId32>
* Lookup491: pallet_gilt::pallet::GiltBid<Balance, sp_core::crypto::AccountId32>
**/
PalletGiltGiltBid: {
amount: 'u128',
who: 'AccountId32'
},
/**
* Lookup482: pallet_gilt::pallet::ActiveGiltsTotal<Balance>
* Lookup492: pallet_gilt::pallet::ActiveGiltsTotal<Balance>
**/
PalletGiltActiveGiltsTotal: {
frozen: 'u128',
@@ -1357,7 +1360,7 @@ export default {
target: 'Perquintill'
},
/**
* Lookup483: pallet_gilt::pallet::ActiveGilt<Balance, sp_core::crypto::AccountId32, BlockNumber>
* Lookup493: pallet_gilt::pallet::ActiveGilt<Balance, sp_core::crypto::AccountId32, BlockNumber>
**/
PalletGiltActiveGilt: {
proportion: 'Perquintill',
@@ -1366,7 +1369,7 @@ export default {
expiry: 'u32'
},
/**
* Lookup485: pallet_uniques::types::ClassDetails<sp_core::crypto::AccountId32, DepositBalance>
* Lookup495: pallet_uniques::types::ClassDetails<sp_core::crypto::AccountId32, DepositBalance>
**/
PalletUniquesClassDetails: {
owner: 'AccountId32',
@@ -1381,7 +1384,7 @@ export default {
isFrozen: 'bool'
},
/**
* Lookup487: pallet_uniques::types::InstanceDetails<sp_core::crypto::AccountId32, DepositBalance>
* Lookup497: pallet_uniques::types::InstanceDetails<sp_core::crypto::AccountId32, DepositBalance>
**/
PalletUniquesInstanceDetails: {
owner: 'AccountId32',
@@ -1390,7 +1393,7 @@ export default {
deposit: 'u128'
},
/**
* Lookup488: pallet_uniques::types::ClassMetadata<DepositBalance, StringLimit>
* Lookup498: pallet_uniques::types::ClassMetadata<DepositBalance, StringLimit>
**/
PalletUniquesClassMetadata: {
deposit: 'u128',
@@ -1398,7 +1401,7 @@ export default {
isFrozen: 'bool'
},
/**
* Lookup489: pallet_uniques::types::InstanceMetadata<DepositBalance, StringLimit>
* Lookup499: pallet_uniques::types::InstanceMetadata<DepositBalance, StringLimit>
**/
PalletUniquesInstanceMetadata: {
deposit: 'u128',
@@ -1406,7 +1409,7 @@ export default {
isFrozen: 'bool'
},
/**
* Lookup494: pallet_transaction_storage::TransactionInfo
* Lookup504: pallet_transaction_storage::TransactionInfo
**/
PalletTransactionStorageTransactionInfo: {
_alias: {
@@ -1418,7 +1421,23 @@ export default {
blockChunks: 'u32'
},
/**
* Lookup497: sp_runtime::MultiSignature
* Lookup506: pallet_bags_list::list::Node<T>
**/
PalletBagsListListNode: {
id: 'AccountId32',
prev: 'Option<AccountId32>',
next: 'Option<AccountId32>',
bagUpper: 'u64'
},
/**
* Lookup507: pallet_bags_list::list::Bag<T>
**/
PalletBagsListListBag: {
head: 'Option<AccountId32>',
tail: 'Option<AccountId32>'
},
/**
* Lookup510: sp_runtime::MultiSignature
**/
SpRuntimeMultiSignature: {
_enum: {
@@ -1428,35 +1447,35 @@ export default {
}
},
/**
* Lookup498: sp_core::ecdsa::Signature
* Lookup511: sp_core::ecdsa::Signature
**/
SpCoreEcdsaSignature: '[u8;65]',
/**
* Lookup501: frame_system::extensions::check_spec_version::CheckSpecVersion<T>
* Lookup514: frame_system::extensions::check_spec_version::CheckSpecVersion<T>
**/
FrameSystemExtensionsCheckSpecVersion: 'Null',
/**
* Lookup502: frame_system::extensions::check_tx_version::CheckTxVersion<T>
* Lookup515: frame_system::extensions::check_tx_version::CheckTxVersion<T>
**/
FrameSystemExtensionsCheckTxVersion: 'Null',
/**
* Lookup503: frame_system::extensions::check_genesis::CheckGenesis<T>
* Lookup516: frame_system::extensions::check_genesis::CheckGenesis<T>
**/
FrameSystemExtensionsCheckGenesis: 'Null',
/**
* Lookup506: frame_system::extensions::check_nonce::CheckNonce<T>
* Lookup519: frame_system::extensions::check_nonce::CheckNonce<T>
**/
FrameSystemExtensionsCheckNonce: 'Compact<u32>',
/**
* Lookup507: frame_system::extensions::check_weight::CheckWeight<T>
* Lookup520: frame_system::extensions::check_weight::CheckWeight<T>
**/
FrameSystemExtensionsCheckWeight: 'Null',
/**
* Lookup508: pallet_transaction_payment::ChargeTransactionPayment<T>
* Lookup521: pallet_transaction_payment::ChargeTransactionPayment<T>
**/
PalletTransactionPaymentChargeTransactionPayment: 'Compact<u128>',
/**
* Lookup509: node_runtime::Runtime
* Lookup522: node_runtime::Runtime
**/
NodeRuntimeRuntime: 'Null'
} as DefinitionsTypes;
+18 -438
View File
@@ -1,13 +1,13 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
import type { BitVec, Bytes, Compact, Enum, Null, Option, Result, Struct, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types';
import type { AccountId32, H256, PerU16 } from '@polkadot/types/interfaces/runtime';
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 (75) */
/** @name KusamaRuntimeProxyType (74) */
export interface KusamaRuntimeProxyType extends Enum {
readonly isAny: boolean;
readonly isNonTransfer: boolean;
@@ -18,87 +18,6 @@ declare module '@polkadot/types/lookup' {
readonly isAuction: boolean;
}
/** @name PolkadotPrimitivesV1CandidateReceipt (86) */
export interface PolkadotPrimitivesV1CandidateReceipt extends Struct {
readonly descriptor: PolkadotPrimitivesV1CandidateDescriptor;
readonly commitmentsHash: H256;
}
/** @name PolkadotPrimitivesV1CandidateDescriptor (87) */
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 (89) */
export interface PolkadotPrimitivesV0CollatorAppPublic extends SpCoreSr25519Public {}
/** @name PolkadotPrimitivesV0CollatorAppSignature (90) */
export interface PolkadotPrimitivesV0CollatorAppSignature extends SpCoreSr25519Signature {}
/** @name XcmV2TraitsOutcome (99) */
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 (100) */
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 (102) */
export interface PolkadotParachainPrimitivesHrmpChannelId extends Struct {
readonly sender: u32;
readonly recipient: u32;
}
/** @name XcmV1MultiLocation (108) */
export interface XcmV1MultiLocation extends Struct {
readonly parents: u8;
@@ -535,7 +454,7 @@ declare module '@polkadot/types/lookup' {
readonly asV1: XcmV1MultiLocation;
}
/** @name KusamaRuntimeSessionKeys (237) */
/** @name KusamaRuntimeSessionKeys (239) */
export interface KusamaRuntimeSessionKeys extends Struct {
readonly grandpa: SpFinalityGrandpaAppPublic;
readonly babe: SpConsensusBabeAppPublic;
@@ -545,7 +464,7 @@ declare module '@polkadot/types/lookup' {
readonly authorityDiscovery: SpAuthorityDiscoveryAppPublic;
}
/** @name KusamaRuntimeNposCompactSolution24 (360) */
/** @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>]>>;
@@ -573,109 +492,7 @@ declare module '@polkadot/types/lookup' {
readonly votes24: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
}
/** @name PolkadotPrimitivesV1InherentData (448) */
export interface PolkadotPrimitivesV1InherentData extends Struct {
readonly bitfields: Vec<PolkadotPrimitivesV1SignedUncheckedSigned>;
readonly backedCandidates: Vec<PolkadotPrimitivesV1BackedCandidate>;
readonly disputes: Vec<PolkadotPrimitivesV1DisputeStatementSet>;
readonly parentHeader: SpRuntimeGenericHeader;
}
/** @name PolkadotPrimitivesV1SignedUncheckedSigned (450) */
export interface PolkadotPrimitivesV1SignedUncheckedSigned extends Struct {
readonly payload: BitVec;
readonly validatorIndex: u32;
readonly signature: PolkadotPrimitivesV0ValidatorAppSignature;
}
/** @name BitvecOrderLsb0 (453) */
export type BitvecOrderLsb0 = Null;
/** @name PolkadotPrimitivesV0ValidatorAppSignature (455) */
export interface PolkadotPrimitivesV0ValidatorAppSignature extends SpCoreSr25519Signature {}
/** @name PolkadotPrimitivesV1BackedCandidate (457) */
export interface PolkadotPrimitivesV1BackedCandidate extends Struct {
readonly candidate: PolkadotPrimitivesV1CommittedCandidateReceipt;
readonly validityVotes: Vec<PolkadotPrimitivesV0ValidityAttestation>;
readonly validatorIndices: BitVec;
}
/** @name PolkadotPrimitivesV1CommittedCandidateReceipt (458) */
export interface PolkadotPrimitivesV1CommittedCandidateReceipt extends Struct {
readonly descriptor: PolkadotPrimitivesV1CandidateDescriptor;
readonly commitments: PolkadotPrimitivesV1CandidateCommitments;
}
/** @name PolkadotPrimitivesV1CandidateCommitments (459) */
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 (461) */
export interface PolkadotCorePrimitivesOutboundHrmpMessage extends Struct {
readonly recipient: u32;
readonly data: Bytes;
}
/** @name PolkadotPrimitivesV0ValidityAttestation (465) */
export interface PolkadotPrimitivesV0ValidityAttestation extends Enum {
readonly isUnused0: boolean;
readonly isImplicit: boolean;
readonly asImplicit: PolkadotPrimitivesV0ValidatorAppSignature;
readonly isExplicit: boolean;
readonly asExplicit: PolkadotPrimitivesV0ValidatorAppSignature;
}
/** @name PolkadotPrimitivesV1DisputeStatementSet (467) */
export interface PolkadotPrimitivesV1DisputeStatementSet extends Struct {
readonly candidateHash: H256;
readonly session: u32;
readonly statements: Vec<ITuple<[PolkadotPrimitivesV1DisputeStatement, u32, PolkadotPrimitivesV0ValidatorAppSignature]>>;
}
/** @name PolkadotPrimitivesV1DisputeStatement (471) */
export interface PolkadotPrimitivesV1DisputeStatement extends Enum {
readonly isValid: boolean;
readonly asValid: PolkadotPrimitivesV1ValidDisputeStatementKind;
readonly isInvalid: boolean;
readonly asInvalid: PolkadotPrimitivesV1InvalidDisputeStatementKind;
}
/** @name PolkadotPrimitivesV1ValidDisputeStatementKind (472) */
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 (473) */
export interface PolkadotPrimitivesV1InvalidDisputeStatementKind extends Enum {
readonly isExplicit: boolean;
}
/** @name SpRuntimeMultiSigner (485) */
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 (486) */
export interface SpCoreEcdsaPublic extends U8aFixed {}
/** @name XcmVersionedXcm (492) */
/** @name XcmVersionedXcm (502) */
export interface XcmVersionedXcm extends Enum {
readonly isV0: boolean;
readonly asV0: XcmV0Xcm;
@@ -685,7 +502,7 @@ declare module '@polkadot/types/lookup' {
readonly asV2: XcmV2Xcm;
}
/** @name XcmV0Xcm (493) */
/** @name XcmV0Xcm (503) */
export interface XcmV0Xcm extends Enum {
readonly isWithdrawAsset: boolean;
readonly asWithdrawAsset: {
@@ -747,7 +564,7 @@ declare module '@polkadot/types/lookup' {
} & Struct;
}
/** @name XcmV0Order (495) */
/** @name XcmV0Order (505) */
export interface XcmV0Order extends Enum {
readonly isNull: boolean;
readonly isDepositAsset: boolean;
@@ -794,13 +611,13 @@ declare module '@polkadot/types/lookup' {
} & Struct;
}
/** @name XcmV0Response (497) */
/** @name XcmV0Response (507) */
export interface XcmV0Response extends Enum {
readonly isAssets: boolean;
readonly asAssets: Vec<XcmV0MultiAsset>;
}
/** @name XcmV1Xcm (498) */
/** @name XcmV1Xcm (508) */
export interface XcmV1Xcm extends Enum {
readonly isWithdrawAsset: boolean;
readonly asWithdrawAsset: {
@@ -868,7 +685,7 @@ declare module '@polkadot/types/lookup' {
readonly isUnsubscribeVersion: boolean;
}
/** @name XcmV1Order (500) */
/** @name XcmV1Order (510) */
export interface XcmV1Order extends Enum {
readonly isNoop: boolean;
readonly isDepositAsset: boolean;
@@ -917,7 +734,7 @@ declare module '@polkadot/types/lookup' {
} & Struct;
}
/** @name XcmV1Response (502) */
/** @name XcmV1Response (512) */
export interface XcmV1Response extends Enum {
readonly isAssets: boolean;
readonly asAssets: XcmV1MultiassetMultiAssets;
@@ -925,7 +742,7 @@ declare module '@polkadot/types/lookup' {
readonly asVersion: u32;
}
/** @name KusamaRuntimeOriginCaller (563) */
/** @name KusamaRuntimeOriginCaller (573) */
export interface KusamaRuntimeOriginCaller extends Enum {
readonly isSystem: boolean;
readonly asSystem: FrameSystemRawOrigin;
@@ -1034,13 +851,7 @@ declare module '@polkadot/types/lookup' {
readonly asXcmPallet: PalletXcmOrigin;
}
/** @name PolkadotRuntimeParachainsOriginPalletOrigin (567) */
export interface PolkadotRuntimeParachainsOriginPalletOrigin extends Enum {
readonly isParachain: boolean;
readonly asParachain: u32;
}
/** @name PalletXcmOrigin (568) */
/** @name PalletXcmOrigin (578) */
export interface PalletXcmOrigin extends Enum {
readonly isXcm: boolean;
readonly asXcm: XcmV1MultiLocation;
@@ -1048,238 +859,7 @@ declare module '@polkadot/types/lookup' {
readonly asResponse: XcmV1MultiLocation;
}
/** @name PolkadotRuntimeParachainsConfigurationHostConfiguration (607) */
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 (611) */
export interface PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord extends Struct {
readonly bitfield: BitVec;
readonly submittedAt: u32;
}
/** @name PolkadotRuntimeParachainsInclusionCandidatePendingAvailability (612) */
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 (616) */
export interface PolkadotRuntimeParachainsSchedulerParathreadClaimQueue extends Struct {
readonly queue: Vec<PolkadotRuntimeParachainsSchedulerQueuedParathread>;
readonly nextCoreOffset: u32;
}
/** @name PolkadotRuntimeParachainsSchedulerQueuedParathread (618) */
export interface PolkadotRuntimeParachainsSchedulerQueuedParathread extends Struct {
readonly claim: PolkadotPrimitivesV1ParathreadEntry;
readonly coreOffset: u32;
}
/** @name PolkadotPrimitivesV1ParathreadEntry (619) */
export interface PolkadotPrimitivesV1ParathreadEntry extends Struct {
readonly claim: PolkadotPrimitivesV1ParathreadClaim;
readonly retries: u32;
}
/** @name PolkadotPrimitivesV1ParathreadClaim (620) */
export interface PolkadotPrimitivesV1ParathreadClaim extends ITuple<[u32, PolkadotPrimitivesV0CollatorAppPublic]> {}
/** @name PolkadotPrimitivesV1CoreOccupied (623) */
export interface PolkadotPrimitivesV1CoreOccupied extends Enum {
readonly isParathread: boolean;
readonly asParathread: PolkadotPrimitivesV1ParathreadEntry;
readonly isParachain: boolean;
}
/** @name PolkadotRuntimeParachainsSchedulerCoreAssignment (626) */
export interface PolkadotRuntimeParachainsSchedulerCoreAssignment extends Struct {
readonly core: u32;
readonly paraId: u32;
readonly kind: PolkadotRuntimeParachainsSchedulerAssignmentKind;
readonly groupIdx: u32;
}
/** @name PolkadotRuntimeParachainsSchedulerAssignmentKind (627) */
export interface PolkadotRuntimeParachainsSchedulerAssignmentKind extends Enum {
readonly isParachain: boolean;
readonly isParathread: boolean;
readonly asParathread: ITuple<[PolkadotPrimitivesV0CollatorAppPublic, u32]>;
}
/** @name PolkadotRuntimeParachainsParasParaLifecycle (628) */
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 (630) */
export interface PolkadotRuntimeParachainsParasParaPastCodeMeta extends Struct {
readonly upgradeTimes: Vec<PolkadotRuntimeParachainsParasReplacementTimes>;
readonly lastPruned: Option<u32>;
}
/** @name PolkadotRuntimeParachainsParasReplacementTimes (632) */
export interface PolkadotRuntimeParachainsParasReplacementTimes extends Struct {
readonly expectedAt: u32;
readonly activatedAt: u32;
}
/** @name PolkadotPrimitivesV1UpgradeGoAhead (634) */
export interface PolkadotPrimitivesV1UpgradeGoAhead extends Enum {
readonly isAbort: boolean;
readonly isGoAhead: boolean;
}
/** @name PolkadotPrimitivesV1UpgradeRestriction (635) */
export interface PolkadotPrimitivesV1UpgradeRestriction extends Enum {
readonly isPresent: boolean;
}
/** @name PolkadotRuntimeParachainsParasParaGenesisArgs (636) */
export interface PolkadotRuntimeParachainsParasParaGenesisArgs extends Struct {
readonly genesisHead: Bytes;
readonly validationCode: Bytes;
readonly parachain: bool;
}
/** @name PolkadotRuntimeParachainsInitializerBufferedSessionChange (639) */
export interface PolkadotRuntimeParachainsInitializerBufferedSessionChange extends Struct {
readonly validators: Vec<PolkadotPrimitivesV0ValidatorAppPublic>;
readonly queued: Vec<PolkadotPrimitivesV0ValidatorAppPublic>;
readonly sessionIndex: u32;
}
/** @name PolkadotCorePrimitivesInboundDownwardMessage (641) */
export interface PolkadotCorePrimitivesInboundDownwardMessage extends Struct {
readonly sentAt: u32;
readonly msg: Bytes;
}
/** @name PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest (644) */
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 (646) */
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 (649) */
export interface PolkadotCorePrimitivesInboundHrmpMessage extends Struct {
readonly sentAt: u32;
readonly data: Bytes;
}
/** @name PolkadotPrimitivesV1SessionInfo (654) */
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 (656) */
export interface PolkadotRuntimeCommonParasRegistrarParaInfo extends Struct {
readonly manager: AccountId32;
readonly deposit: u128;
readonly locked: bool;
}
/** @name PolkadotRuntimeCommonCrowdloanFundInfo (666) */
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 (667) */
export interface PolkadotRuntimeCommonCrowdloanLastContribution extends Enum {
readonly isNever: boolean;
readonly isPreEnding: boolean;
readonly asPreEnding: u32;
readonly isEnding: boolean;
readonly asEnding: u32;
}
/** @name PalletXcmQueryStatus (669) */
/** @name PalletXcmQueryStatus (682) */
export interface PalletXcmQueryStatus extends Enum {
readonly isPending: boolean;
readonly asPending: {
@@ -1299,7 +879,7 @@ declare module '@polkadot/types/lookup' {
} & Struct;
}
/** @name XcmVersionedResponse (672) */
/** @name XcmVersionedResponse (685) */
export interface XcmVersionedResponse extends Enum {
readonly isV0: boolean;
readonly asV0: XcmV0Response;
@@ -1309,7 +889,7 @@ declare module '@polkadot/types/lookup' {
readonly asV2: XcmV2Response;
}
/** @name PalletXcmVersionMigrationStage (678) */
/** @name PalletXcmVersionMigrationStage (691) */
export interface PalletXcmVersionMigrationStage extends Enum {
readonly isMigrateSupportedVersion: boolean;
readonly isMigrateVersionNotifiers: boolean;
@@ -1318,7 +898,7 @@ declare module '@polkadot/types/lookup' {
readonly isMigrateAndNotifyOldTargets: boolean;
}
/** @name KusamaRuntimeRuntime (690) */
/** @name KusamaRuntimeRuntime (703) */
export type KusamaRuntimeRuntime = Null;
}
@@ -1,8 +1,8 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
import type { Compact, Enum, Null, Struct, U8aFixed, Vec, u16, u32 } from '@polkadot/types';
import type { PerU16 } from '@polkadot/types/interfaces/runtime';
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' {
@@ -19,9 +19,91 @@ declare module '@polkadot/types/lookup' {
readonly isUnused4: boolean;
readonly isIdentityJudgement: boolean;
readonly isCancelProxy: boolean;
readonly isAuction: boolean;
}
/** @name PolkadotRuntimeSessionKeys (139) */
/** @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;
@@ -31,22 +113,22 @@ declare module '@polkadot/types/lookup' {
readonly authorityDiscovery: SpAuthorityDiscoveryAppPublic;
}
/** @name PolkadotPrimitivesV0ValidatorAppPublic (140) */
/** @name PolkadotPrimitivesV0ValidatorAppPublic (162) */
export interface PolkadotPrimitivesV0ValidatorAppPublic extends SpCoreSr25519Public {}
/** @name PolkadotPrimitivesV1AssignmentAppPublic (141) */
/** @name PolkadotPrimitivesV1AssignmentAppPublic (163) */
export interface PolkadotPrimitivesV1AssignmentAppPublic extends SpCoreSr25519Public {}
/** @name PolkadotRuntimeCommonClaimsEcdsaSignature (175) */
/** @name PolkadotRuntimeCommonClaimsEcdsaSignature (195) */
export interface PolkadotRuntimeCommonClaimsEcdsaSignature extends U8aFixed {}
/** @name PolkadotRuntimeCommonClaimsStatementKind (180) */
/** @name PolkadotRuntimeCommonClaimsStatementKind (200) */
export interface PolkadotRuntimeCommonClaimsStatementKind extends Enum {
readonly isRegular: boolean;
readonly isSaft: boolean;
}
/** @name PolkadotRuntimeNposCompactSolution16 (233) */
/** @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>]>>;
@@ -66,14 +148,116 @@ declare module '@polkadot/types/lookup' {
readonly votes16: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
}
/** @name PolkadotRuntimeOriginCaller (290) */
/** @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 isUnused4: boolean;
readonly isUnused5: boolean;
readonly isUnused6: boolean;
readonly isUnused7: boolean;
@@ -88,12 +272,284 @@ declare module '@polkadot/types/lookup' {
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 PolkadotRuntimeCommonClaimsPrevalidateAttests (441) */
/** @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 (442) */
/** @name PolkadotRuntimeRuntime (579) */
export type PolkadotRuntimeRuntime = Null;
}
@@ -179,10 +179,7 @@ declare module '@polkadot/types/lookup' {
readonly value: Compact<u128>;
}
/** @name PalletSocietyDefaultInstance (70) */
export type PalletSocietyDefaultInstance = Null;
/** @name NodeRuntimeProxyType (77) */
/** @name NodeRuntimeProxyType (76) */
export interface NodeRuntimeProxyType extends Enum {
readonly isAny: boolean;
readonly isNonTransfer: boolean;
@@ -190,7 +187,7 @@ declare module '@polkadot/types/lookup' {
readonly isStaking: boolean;
}
/** @name PalletMultisigTimepoint (80) */
/** @name PalletMultisigTimepoint (79) */
export interface PalletMultisigTimepoint extends Struct {
readonly height: u32;
readonly index: u32;
@@ -680,13 +677,13 @@ declare module '@polkadot/types/lookup' {
readonly proof: Vec<Bytes>;
}
/** @name SpConsensusBabeBabeEpochConfiguration (310) */
/** @name SpConsensusBabeBabeEpochConfiguration (313) */
export interface SpConsensusBabeBabeEpochConfiguration extends Struct {
readonly c: ITuple<[u64, u64]>;
readonly allowedSlots: SpConsensusBabeAllowedSlots;
}
/** @name PalletAuthorshipUncleEntryItem (313) */
/** @name PalletAuthorshipUncleEntryItem (316) */
export interface PalletAuthorshipUncleEntryItem extends Enum {
readonly isInclusionHeight: boolean;
readonly asInclusionHeight: u32;
@@ -694,39 +691,39 @@ declare module '@polkadot/types/lookup' {
readonly asUncle: ITuple<[H256, Option<AccountId32>]>;
}
/** @name PalletBalancesBalanceLock (318) */
/** @name PalletBalancesBalanceLock (321) */
export interface PalletBalancesBalanceLock extends Struct {
readonly id: U8aFixed;
readonly amount: u128;
readonly reasons: PalletBalancesReasons;
}
/** @name PalletBalancesReasons (319) */
/** @name PalletBalancesReasons (322) */
export interface PalletBalancesReasons extends Enum {
readonly isFee: boolean;
readonly isMisc: boolean;
readonly isAll: boolean;
}
/** @name PalletBalancesReserveData (322) */
/** @name PalletBalancesReserveData (325) */
export interface PalletBalancesReserveData extends Struct {
readonly id: U8aFixed;
readonly amount: u128;
}
/** @name PalletBalancesReleases (324) */
/** @name PalletBalancesReleases (327) */
export interface PalletBalancesReleases extends Enum {
readonly isV100: boolean;
readonly isV200: boolean;
}
/** @name PalletTransactionPaymentReleases (327) */
/** @name PalletTransactionPaymentReleases (330) */
export interface PalletTransactionPaymentReleases extends Enum {
readonly isV1Ancient: boolean;
readonly isV2: boolean;
}
/** @name FrameSupportWeightsWeightToFeeCoefficient (329) */
/** @name FrameSupportWeightsWeightToFeeCoefficient (332) */
export interface FrameSupportWeightsWeightToFeeCoefficient extends Struct {
readonly coeffInteger: u128;
readonly coeffFrac: Perbill;
@@ -734,7 +731,7 @@ declare module '@polkadot/types/lookup' {
readonly degree: u8;
}
/** @name PalletElectionProviderMultiPhasePhase (330) */
/** @name PalletElectionProviderMultiPhasePhase (333) */
export interface PalletElectionProviderMultiPhasePhase extends Enum {
readonly isOff: boolean;
readonly isSigned: boolean;
@@ -743,20 +740,20 @@ declare module '@polkadot/types/lookup' {
readonly isEmergency: boolean;
}
/** @name PalletElectionProviderMultiPhaseReadySolution (332) */
/** @name PalletElectionProviderMultiPhaseReadySolution (335) */
export interface PalletElectionProviderMultiPhaseReadySolution extends Struct {
readonly supports: Vec<ITuple<[AccountId32, SpNposElectionsSupport]>>;
readonly score: Vec<u128>;
readonly compute: PalletElectionProviderMultiPhaseElectionCompute;
}
/** @name PalletElectionProviderMultiPhaseRoundSnapshot (333) */
/** @name PalletElectionProviderMultiPhaseRoundSnapshot (336) */
export interface PalletElectionProviderMultiPhaseRoundSnapshot extends Struct {
readonly voters: Vec<ITuple<[AccountId32, u64, Vec<AccountId32>]>>;
readonly targets: Vec<AccountId32>;
}
/** @name PalletElectionProviderMultiPhaseSignedSignedSubmission (340) */
/** @name PalletElectionProviderMultiPhaseSignedSignedSubmission (343) */
export interface PalletElectionProviderMultiPhaseSignedSignedSubmission extends Struct {
readonly who: AccountId32;
readonly deposit: u128;
@@ -764,7 +761,7 @@ declare module '@polkadot/types/lookup' {
readonly reward: u128;
}
/** @name PalletStakingStakingLedger (342) */
/** @name PalletStakingStakingLedger (345) */
export interface PalletStakingStakingLedger extends Struct {
readonly stash: AccountId32;
readonly total: Compact<u128>;
@@ -773,32 +770,32 @@ declare module '@polkadot/types/lookup' {
readonly claimedRewards: Vec<u32>;
}
/** @name PalletStakingUnlockChunk (344) */
/** @name PalletStakingUnlockChunk (347) */
export interface PalletStakingUnlockChunk extends Struct {
readonly value: Compact<u128>;
readonly era: Compact<u32>;
}
/** @name PalletStakingNominations (345) */
/** @name PalletStakingNominations (348) */
export interface PalletStakingNominations extends Struct {
readonly targets: Vec<AccountId32>;
readonly submittedIn: u32;
readonly suppressed: bool;
}
/** @name PalletStakingActiveEraInfo (346) */
/** @name PalletStakingActiveEraInfo (349) */
export interface PalletStakingActiveEraInfo extends Struct {
readonly index: u32;
readonly start: Option<u64>;
}
/** @name PalletStakingEraRewardPoints (348) */
/** @name PalletStakingEraRewardPoints (351) */
export interface PalletStakingEraRewardPoints extends Struct {
readonly total: u32;
readonly individual: BTreeMap<AccountId32, u32>;
}
/** @name PalletStakingForcing (352) */
/** @name PalletStakingForcing (355) */
export interface PalletStakingForcing extends Enum {
readonly isNotForcing: boolean;
readonly isForceNew: boolean;
@@ -806,7 +803,7 @@ declare module '@polkadot/types/lookup' {
readonly isForceAlways: boolean;
}
/** @name PalletStakingUnappliedSlash (354) */
/** @name PalletStakingUnappliedSlash (357) */
export interface PalletStakingUnappliedSlash extends Struct {
readonly validator: AccountId32;
readonly own: u128;
@@ -815,7 +812,7 @@ declare module '@polkadot/types/lookup' {
readonly payout: u128;
}
/** @name PalletStakingSlashingSlashingSpans (356) */
/** @name PalletStakingSlashingSlashingSpans (359) */
export interface PalletStakingSlashingSlashingSpans extends Struct {
readonly spanIndex: u32;
readonly lastStart: u32;
@@ -823,13 +820,13 @@ declare module '@polkadot/types/lookup' {
readonly prior: Vec<u32>;
}
/** @name PalletStakingSlashingSpanRecord (357) */
/** @name PalletStakingSlashingSpanRecord (360) */
export interface PalletStakingSlashingSpanRecord extends Struct {
readonly slashed: u128;
readonly paidOut: u128;
}
/** @name PalletStakingReleases (358) */
/** @name PalletStakingReleases (361) */
export interface PalletStakingReleases extends Enum {
readonly isV100Ancient: boolean;
readonly isV200: boolean;
@@ -838,12 +835,13 @@ declare module '@polkadot/types/lookup' {
readonly isV500: boolean;
readonly isV600: boolean;
readonly isV700: boolean;
readonly isV800: boolean;
}
/** @name SpCoreCryptoKeyTypeId (363) */
/** @name SpCoreCryptoKeyTypeId (366) */
export interface SpCoreCryptoKeyTypeId extends U8aFixed {}
/** @name PalletDemocracyPreimageStatus (368) */
/** @name PalletDemocracyPreimageStatus (371) */
export interface PalletDemocracyPreimageStatus extends Enum {
readonly isMissing: boolean;
readonly asMissing: u32;
@@ -857,7 +855,7 @@ declare module '@polkadot/types/lookup' {
} & Struct;
}
/** @name PalletDemocracyReferendumInfo (369) */
/** @name PalletDemocracyReferendumInfo (372) */
export interface PalletDemocracyReferendumInfo extends Enum {
readonly isOngoing: boolean;
readonly asOngoing: PalletDemocracyReferendumStatus;
@@ -868,7 +866,7 @@ declare module '@polkadot/types/lookup' {
} & Struct;
}
/** @name PalletDemocracyReferendumStatus (370) */
/** @name PalletDemocracyReferendumStatus (373) */
export interface PalletDemocracyReferendumStatus extends Struct {
readonly end: u32;
readonly proposalHash: H256;
@@ -877,14 +875,14 @@ declare module '@polkadot/types/lookup' {
readonly tally: PalletDemocracyTally;
}
/** @name PalletDemocracyTally (371) */
/** @name PalletDemocracyTally (374) */
export interface PalletDemocracyTally extends Struct {
readonly ayes: u128;
readonly nays: u128;
readonly turnout: u128;
}
/** @name PalletDemocracyVoteVoting (372) */
/** @name PalletDemocracyVoteVoting (375) */
export interface PalletDemocracyVoteVoting extends Enum {
readonly isDirect: boolean;
readonly asDirect: {
@@ -902,21 +900,21 @@ declare module '@polkadot/types/lookup' {
} & Struct;
}
/** @name PalletDemocracyDelegations (375) */
/** @name PalletDemocracyDelegations (378) */
export interface PalletDemocracyDelegations extends Struct {
readonly votes: u128;
readonly capital: u128;
}
/** @name PalletDemocracyVotePriorLock (376) */
/** @name PalletDemocracyVotePriorLock (379) */
export interface PalletDemocracyVotePriorLock extends ITuple<[u32, u128]> {}
/** @name PalletDemocracyReleases (379) */
/** @name PalletDemocracyReleases (382) */
export interface PalletDemocracyReleases extends Enum {
readonly isV1: boolean;
}
/** @name PalletCollectiveVotes (382) */
/** @name PalletCollectiveVotes (385) */
export interface PalletCollectiveVotes extends Struct {
readonly index: u32;
readonly threshold: u32;
@@ -925,21 +923,21 @@ declare module '@polkadot/types/lookup' {
readonly end: u32;
}
/** @name PalletElectionsPhragmenSeatHolder (387) */
/** @name PalletElectionsPhragmenSeatHolder (390) */
export interface PalletElectionsPhragmenSeatHolder extends Struct {
readonly who: AccountId32;
readonly stake: u128;
readonly deposit: u128;
}
/** @name PalletElectionsPhragmenVoter (388) */
/** @name PalletElectionsPhragmenVoter (391) */
export interface PalletElectionsPhragmenVoter extends Struct {
readonly votes: Vec<AccountId32>;
readonly stake: u128;
readonly deposit: u128;
}
/** @name PalletGrandpaStoredState (391) */
/** @name PalletGrandpaStoredState (394) */
export interface PalletGrandpaStoredState extends Enum {
readonly isLive: boolean;
readonly isPendingPause: boolean;
@@ -955,7 +953,7 @@ declare module '@polkadot/types/lookup' {
} & Struct;
}
/** @name PalletGrandpaStoredPendingChange (392) */
/** @name PalletGrandpaStoredPendingChange (395) */
export interface PalletGrandpaStoredPendingChange extends Struct {
readonly scheduledAt: u32;
readonly delay: u32;
@@ -963,7 +961,7 @@ declare module '@polkadot/types/lookup' {
readonly forced: Option<u32>;
}
/** @name PalletTreasuryProposal (394) */
/** @name PalletTreasuryProposal (398) */
export interface PalletTreasuryProposal extends Struct {
readonly proposer: AccountId32;
readonly value: u128;
@@ -971,10 +969,10 @@ declare module '@polkadot/types/lookup' {
readonly bond: u128;
}
/** @name FrameSupportPalletId (397) */
/** @name FrameSupportPalletId (401) */
export interface FrameSupportPalletId extends U8aFixed {}
/** @name PalletContractsWasmPrefabWasmModule (399) */
/** @name PalletContractsWasmPrefabWasmModule (403) */
export interface PalletContractsWasmPrefabWasmModule extends Struct {
readonly instructionWeightsVersion: Compact<u32>;
readonly initial: Compact<u32>;
@@ -985,26 +983,26 @@ declare module '@polkadot/types/lookup' {
readonly originalCodeLen: u32;
}
/** @name PalletContractsStorageRawContractInfo (401) */
/** @name PalletContractsStorageRawContractInfo (405) */
export interface PalletContractsStorageRawContractInfo extends Struct {
readonly trieId: Bytes;
readonly codeHash: H256;
readonly reserved: Option<Null>;
}
/** @name PalletContractsStorageDeletedContract (403) */
/** @name PalletContractsStorageDeletedContract (407) */
export interface PalletContractsStorageDeletedContract extends Struct {
readonly trieId: Bytes;
}
/** @name PalletContractsSchedule (404) */
/** @name PalletContractsSchedule (408) */
export interface PalletContractsSchedule extends Struct {
readonly limits: PalletContractsScheduleLimits;
readonly instructionWeights: PalletContractsScheduleInstructionWeights;
readonly hostFnWeights: PalletContractsScheduleHostFnWeights;
}
/** @name PalletContractsScheduleLimits (405) */
/** @name PalletContractsScheduleLimits (409) */
export interface PalletContractsScheduleLimits extends Struct {
readonly eventTopics: u32;
readonly stackHeight: u32;
@@ -1019,7 +1017,7 @@ declare module '@polkadot/types/lookup' {
readonly codeLen: u32;
}
/** @name PalletContractsScheduleInstructionWeights (406) */
/** @name PalletContractsScheduleInstructionWeights (410) */
export interface PalletContractsScheduleInstructionWeights extends Struct {
readonly version: u32;
readonly i64Const: u32;
@@ -1075,7 +1073,7 @@ declare module '@polkadot/types/lookup' {
readonly i64Rotr: u32;
}
/** @name PalletContractsScheduleHostFnWeights (407) */
/** @name PalletContractsScheduleHostFnWeights (411) */
export interface PalletContractsScheduleHostFnWeights extends Struct {
readonly caller: u64;
readonly address: u64;
@@ -1123,34 +1121,40 @@ declare module '@polkadot/types/lookup' {
readonly ecdsaRecover: u64;
}
/** @name SpStakingOffenceOffenceDetails (412) */
/** @name PalletImOnlineBoundedOpaqueNetworkState (417) */
export interface PalletImOnlineBoundedOpaqueNetworkState extends Struct {
readonly peerId: Bytes;
readonly externalAddresses: Vec<Bytes>;
}
/** @name SpStakingOffenceOffenceDetails (422) */
export interface SpStakingOffenceOffenceDetails extends Struct {
readonly offender: ITuple<[AccountId32, PalletStakingExposure]>;
readonly reporters: Vec<AccountId32>;
}
/** @name PalletIdentityRegistration (414) */
/** @name PalletIdentityRegistration (424) */
export interface PalletIdentityRegistration extends Struct {
readonly judgements: Vec<ITuple<[u32, PalletIdentityJudgement]>>;
readonly deposit: u128;
readonly info: PalletIdentityIdentityInfo;
}
/** @name PalletIdentityRegistrarInfo (422) */
/** @name PalletIdentityRegistrarInfo (432) */
export interface PalletIdentityRegistrarInfo extends Struct {
readonly account: AccountId32;
readonly fee: u128;
readonly fields: PalletIdentityBitFlags;
}
/** @name PalletSocietyBid (426) */
/** @name PalletSocietyBid (436) */
export interface PalletSocietyBid extends Struct {
readonly who: AccountId32;
readonly kind: PalletSocietyBidKind;
readonly value: u128;
}
/** @name PalletSocietyBidKind (427) */
/** @name PalletSocietyBidKind (437) */
export interface PalletSocietyBidKind extends Enum {
readonly isDeposit: boolean;
readonly asDeposit: u128;
@@ -1158,20 +1162,20 @@ declare module '@polkadot/types/lookup' {
readonly asVouch: ITuple<[AccountId32, u128]>;
}
/** @name PalletSocietyVouchingStatus (429) */
/** @name PalletSocietyVouchingStatus (439) */
export interface PalletSocietyVouchingStatus extends Enum {
readonly isVouching: boolean;
readonly isBanned: boolean;
}
/** @name PalletSocietyVote (433) */
/** @name PalletSocietyVote (443) */
export interface PalletSocietyVote extends Enum {
readonly isSkeptic: boolean;
readonly isReject: boolean;
readonly isApprove: boolean;
}
/** @name PalletRecoveryRecoveryConfig (435) */
/** @name PalletRecoveryRecoveryConfig (445) */
export interface PalletRecoveryRecoveryConfig extends Struct {
readonly delayPeriod: u32;
readonly deposit: u128;
@@ -1179,20 +1183,20 @@ declare module '@polkadot/types/lookup' {
readonly threshold: u16;
}
/** @name PalletRecoveryActiveRecovery (436) */
/** @name PalletRecoveryActiveRecovery (446) */
export interface PalletRecoveryActiveRecovery extends Struct {
readonly created: u32;
readonly deposit: u128;
readonly friends: Vec<AccountId32>;
}
/** @name PalletVestingReleases (440) */
/** @name PalletVestingReleases (450) */
export interface PalletVestingReleases extends Enum {
readonly isV0: boolean;
readonly isV1: boolean;
}
/** @name PalletSchedulerScheduledV2 (444) */
/** @name PalletSchedulerScheduledV2 (454) */
export interface PalletSchedulerScheduledV2 extends Struct {
readonly maybeId: Option<Bytes>;
readonly priority: u8;
@@ -1201,7 +1205,7 @@ declare module '@polkadot/types/lookup' {
readonly origin: NodeRuntimeOriginCaller;
}
/** @name NodeRuntimeOriginCaller (445) */
/** @name NodeRuntimeOriginCaller (455) */
export interface NodeRuntimeOriginCaller extends Enum {
readonly isSystem: boolean;
readonly asSystem: FrameSystemRawOrigin;
@@ -1222,7 +1226,7 @@ declare module '@polkadot/types/lookup' {
readonly asTechnicalCommittee: PalletCollectiveRawOrigin;
}
/** @name FrameSystemRawOrigin (446) */
/** @name FrameSystemRawOrigin (456) */
export interface FrameSystemRawOrigin extends Enum {
readonly isRoot: boolean;
readonly isSigned: boolean;
@@ -1230,7 +1234,7 @@ declare module '@polkadot/types/lookup' {
readonly isNone: boolean;
}
/** @name PalletCollectiveRawOrigin (447) */
/** @name PalletCollectiveRawOrigin (457) */
export interface PalletCollectiveRawOrigin extends Enum {
readonly isMembers: boolean;
readonly asMembers: ITuple<[u32, u32]>;
@@ -1239,30 +1243,30 @@ declare module '@polkadot/types/lookup' {
readonly isPhantom: boolean;
}
/** @name SpCoreVoid (449) */
/** @name SpCoreVoid (459) */
export type SpCoreVoid = Null;
/** @name PalletSchedulerReleases (450) */
/** @name PalletSchedulerReleases (460) */
export interface PalletSchedulerReleases extends Enum {
readonly isV1: boolean;
readonly isV2: boolean;
}
/** @name PalletProxyProxyDefinition (454) */
/** @name PalletProxyProxyDefinition (464) */
export interface PalletProxyProxyDefinition extends Struct {
readonly delegate: AccountId32;
readonly proxyType: NodeRuntimeProxyType;
readonly delay: u32;
}
/** @name PalletProxyAnnouncement (458) */
/** @name PalletProxyAnnouncement (468) */
export interface PalletProxyAnnouncement extends Struct {
readonly real: AccountId32;
readonly callHash: H256;
readonly height: u32;
}
/** @name PalletMultisigMultisig (462) */
/** @name PalletMultisigMultisig (472) */
export interface PalletMultisigMultisig extends Struct {
readonly when: PalletMultisigTimepoint;
readonly deposit: u128;
@@ -1270,7 +1274,7 @@ declare module '@polkadot/types/lookup' {
readonly approvals: Vec<AccountId32>;
}
/** @name PalletBountiesBounty (465) */
/** @name PalletBountiesBounty (475) */
export interface PalletBountiesBounty extends Struct {
readonly proposer: AccountId32;
readonly value: u128;
@@ -1280,7 +1284,7 @@ declare module '@polkadot/types/lookup' {
readonly status: PalletBountiesBountyStatus;
}
/** @name PalletBountiesBountyStatus (466) */
/** @name PalletBountiesBountyStatus (476) */
export interface PalletBountiesBountyStatus extends Enum {
readonly isProposed: boolean;
readonly isApproved: boolean;
@@ -1302,7 +1306,7 @@ declare module '@polkadot/types/lookup' {
} & Struct;
}
/** @name PalletTipsOpenTip (468) */
/** @name PalletTipsOpenTip (478) */
export interface PalletTipsOpenTip extends Struct {
readonly reason: H256;
readonly who: AccountId32;
@@ -1313,7 +1317,7 @@ declare module '@polkadot/types/lookup' {
readonly findersFee: bool;
}
/** @name PalletAssetsAssetDetails (470) */
/** @name PalletAssetsAssetDetails (480) */
export interface PalletAssetsAssetDetails extends Struct {
readonly owner: AccountId32;
readonly issuer: AccountId32;
@@ -1329,7 +1333,7 @@ declare module '@polkadot/types/lookup' {
readonly isFrozen: bool;
}
/** @name PalletAssetsAssetBalance (471) */
/** @name PalletAssetsAssetBalance (481) */
export interface PalletAssetsAssetBalance extends Struct {
readonly balance: u64;
readonly isFrozen: bool;
@@ -1337,13 +1341,13 @@ declare module '@polkadot/types/lookup' {
readonly extra: Null;
}
/** @name PalletAssetsApproval (473) */
/** @name PalletAssetsApproval (483) */
export interface PalletAssetsApproval extends Struct {
readonly amount: u64;
readonly deposit: u128;
}
/** @name PalletAssetsAssetMetadata (474) */
/** @name PalletAssetsAssetMetadata (484) */
export interface PalletAssetsAssetMetadata extends Struct {
readonly deposit: u128;
readonly name: Bytes;
@@ -1352,7 +1356,7 @@ declare module '@polkadot/types/lookup' {
readonly isFrozen: bool;
}
/** @name PalletLotteryLotteryConfig (476) */
/** @name PalletLotteryLotteryConfig (486) */
export interface PalletLotteryLotteryConfig extends Struct {
readonly price: u128;
readonly start: u32;
@@ -1361,13 +1365,13 @@ declare module '@polkadot/types/lookup' {
readonly repeat: bool;
}
/** @name PalletGiltGiltBid (481) */
/** @name PalletGiltGiltBid (491) */
export interface PalletGiltGiltBid extends Struct {
readonly amount: u128;
readonly who: AccountId32;
}
/** @name PalletGiltActiveGiltsTotal (482) */
/** @name PalletGiltActiveGiltsTotal (492) */
export interface PalletGiltActiveGiltsTotal extends Struct {
readonly frozen: u128;
readonly proportion: Perquintill;
@@ -1375,7 +1379,7 @@ declare module '@polkadot/types/lookup' {
readonly target: Perquintill;
}
/** @name PalletGiltActiveGilt (483) */
/** @name PalletGiltActiveGilt (493) */
export interface PalletGiltActiveGilt extends Struct {
readonly proportion: Perquintill;
readonly amount: u128;
@@ -1383,7 +1387,7 @@ declare module '@polkadot/types/lookup' {
readonly expiry: u32;
}
/** @name PalletUniquesClassDetails (485) */
/** @name PalletUniquesClassDetails (495) */
export interface PalletUniquesClassDetails extends Struct {
readonly owner: AccountId32;
readonly issuer: AccountId32;
@@ -1397,7 +1401,7 @@ declare module '@polkadot/types/lookup' {
readonly isFrozen: bool;
}
/** @name PalletUniquesInstanceDetails (487) */
/** @name PalletUniquesInstanceDetails (497) */
export interface PalletUniquesInstanceDetails extends Struct {
readonly owner: AccountId32;
readonly approved: Option<AccountId32>;
@@ -1405,21 +1409,21 @@ declare module '@polkadot/types/lookup' {
readonly deposit: u128;
}
/** @name PalletUniquesClassMetadata (488) */
/** @name PalletUniquesClassMetadata (498) */
export interface PalletUniquesClassMetadata extends Struct {
readonly deposit: u128;
readonly data: Bytes;
readonly isFrozen: bool;
}
/** @name PalletUniquesInstanceMetadata (489) */
/** @name PalletUniquesInstanceMetadata (499) */
export interface PalletUniquesInstanceMetadata extends Struct {
readonly deposit: u128;
readonly data: Bytes;
readonly isFrozen: bool;
}
/** @name PalletTransactionStorageTransactionInfo (494) */
/** @name PalletTransactionStorageTransactionInfo (504) */
export interface PalletTransactionStorageTransactionInfo extends Struct {
readonly chunkRoot: H256;
readonly contentHash: H256;
@@ -1427,7 +1431,21 @@ declare module '@polkadot/types/lookup' {
readonly blockChunks: u32;
}
/** @name SpRuntimeMultiSignature (497) */
/** @name PalletBagsListListNode (506) */
export interface PalletBagsListListNode extends Struct {
readonly id: AccountId32;
readonly prev: Option<AccountId32>;
readonly next: Option<AccountId32>;
readonly bagUpper: u64;
}
/** @name PalletBagsListListBag (507) */
export interface PalletBagsListListBag extends Struct {
readonly head: Option<AccountId32>;
readonly tail: Option<AccountId32>;
}
/** @name SpRuntimeMultiSignature (510) */
export interface SpRuntimeMultiSignature extends Enum {
readonly isEd25519: boolean;
readonly asEd25519: SpCoreEd25519Signature;
@@ -1437,28 +1455,28 @@ declare module '@polkadot/types/lookup' {
readonly asEcdsa: SpCoreEcdsaSignature;
}
/** @name SpCoreEcdsaSignature (498) */
/** @name SpCoreEcdsaSignature (511) */
export interface SpCoreEcdsaSignature extends U8aFixed {}
/** @name FrameSystemExtensionsCheckSpecVersion (501) */
/** @name FrameSystemExtensionsCheckSpecVersion (514) */
export type FrameSystemExtensionsCheckSpecVersion = Null;
/** @name FrameSystemExtensionsCheckTxVersion (502) */
/** @name FrameSystemExtensionsCheckTxVersion (515) */
export type FrameSystemExtensionsCheckTxVersion = Null;
/** @name FrameSystemExtensionsCheckGenesis (503) */
/** @name FrameSystemExtensionsCheckGenesis (516) */
export type FrameSystemExtensionsCheckGenesis = Null;
/** @name FrameSystemExtensionsCheckNonce (506) */
/** @name FrameSystemExtensionsCheckNonce (519) */
export interface FrameSystemExtensionsCheckNonce extends Compact<u32> {}
/** @name FrameSystemExtensionsCheckWeight (507) */
/** @name FrameSystemExtensionsCheckWeight (520) */
export type FrameSystemExtensionsCheckWeight = Null;
/** @name PalletTransactionPaymentChargeTransactionPayment (508) */
/** @name PalletTransactionPaymentChargeTransactionPayment (521) */
export interface PalletTransactionPaymentChargeTransactionPayment extends Compact<u128> {}
/** @name NodeRuntimeRuntime (509) */
/** @name NodeRuntimeRuntime (522) */
export type NodeRuntimeRuntime = Null;
}
+23 -4
View File
@@ -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';
@@ -32,7 +32,7 @@ import type { AuthorityIndex, AuthorityList, AuthoritySet, AuthoritySetChange, A
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, ModuleConstantMetadataV10, ModuleConstantMetadataV11, ModuleConstantMetadataV12, ModuleConstantMetadataV13, ModuleConstantMetadataV9, 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, 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';
@@ -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';
@@ -168,6 +168,7 @@ declare module '@polkadot/types/types/registry' {
BridgedBlockHash: BridgedBlockHash;
BridgedBlockNumber: BridgedBlockNumber;
BridgedHeader: BridgedHeader;
BridgeMessageId: BridgeMessageId;
BufferedSessionChange: BufferedSessionChange;
Bytes: Bytes;
Call: Call;
@@ -676,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;
@@ -813,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;
@@ -854,6 +872,7 @@ declare module '@polkadot/types/types/registry' {
SolutionSupports: SolutionSupports;
SpanIndex: SpanIndex;
SpanRecord: SpanRecord;
SpecVersion: SpecVersion;
Sr25519Signature: Sr25519Signature;
StakingLedger: StakingLedger;
StakingLedgerTo223: StakingLedgerTo223;
@@ -0,0 +1,40 @@
// Copyright 2017-2021 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { TypeRegistry } from '../create';
import { WrapperOpaque } from '.';
describe('WrapperOpaque', (): void => {
const registry = new TypeRegistry();
const u8au32 = new Uint8Array([4 << 2, 135, 214, 18, 0]);
it('u8a encodes a wrapped u32 correctly', (): void => {
expect(
new WrapperOpaque(registry, 'u32', 1234567).toU8a()
).toEqual(u8au32);
});
it('u8a decodes a wrapped u32 correctly', (): void => {
expect(
new WrapperOpaque(registry, 'u32', u8au32).toU8a()
).toEqual(u8au32);
});
it('hex encodes a wrapped u32 correctly', (): void => {
expect(
new WrapperOpaque(registry, 'u32', '0x12345678').toHex()
).toEqual('0x12345678');
});
it('has the correct unwrap', (): void => {
expect(
new WrapperOpaque(registry, 'u32', '0x12345678').unwrap().toHex()
).toEqual('0x12345678');
});
it('has the correct toRawType', (): void => {
expect(
new WrapperOpaque(registry, 'u32').toRawType()
).toEqual('WrapperOpaque<u32>');
});
});
+60
View File
@@ -0,0 +1,60 @@
// Copyright 2017-2021 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Codec, Constructor, Registry } from '../types';
import { compactAddLength, compactStripLength, isU8a } from '@polkadot/util';
import { Base } from './Base';
import { typeToConstructor } from './utils';
function decodeRaw<T extends Codec> (registry: Registry, Type: Constructor<T> | string, value?: unknown): T {
const Clazz = typeToConstructor<T>(registry, Type);
if (isU8a(value)) {
const [, u8a] = compactStripLength(value);
return new Clazz(registry, u8a);
}
return new Clazz(registry, value);
}
export class WrapperOpaque<T extends Codec> extends Base<T> {
constructor (registry: Registry, Type: Constructor<T> | string, value?: unknown) {
super(registry, decodeRaw(registry, Type, value));
}
public static with<T extends Codec> (Type: Constructor<T> | string): Constructor<WrapperOpaque<T>> {
return class extends WrapperOpaque<T> {
constructor (registry: Registry, value?: unknown) {
super(registry, Type, value);
}
};
}
/**
* @description Returns the base runtime type name for this instance
*/
public override toRawType (): string {
return `WrapperOpaque<${this._raw.toRawType()}>`;
}
/**
* @description The length of the value when encoded as a Uint8Array
*/
public override toU8a (isBare?: boolean): Uint8Array {
const u8a = super.toU8a(isBare);
return isBare
? u8a
: compactAddLength(u8a);
}
/**
* @description Return the inner value for the wrapped type
*/
public unwrap (): T {
return this._raw;
}
}
+1
View File
@@ -30,3 +30,4 @@ export { U8aFixed } from './U8aFixed';
export { Vec } from './Vec';
// export { VecAny } from './VecAny';
export { VecFixed } from './VecFixed';
export { WrapperOpaque } from './WrapperOpaque';
+5 -2
View File
@@ -7,7 +7,7 @@ import type { TypeDef } from './types';
import { assert, isNumber, isUndefined, stringify } from '@polkadot/util';
import { BTreeMap, BTreeSet, CodecSet, Compact, DoNotConstruct, Enum, HashMap, Int, Option, Range, RangeInclusive, Result, Struct, Tuple, U8aFixed, UInt, Vec, VecFixed } from '../codec';
import { BTreeMap, BTreeSet, CodecSet, Compact, DoNotConstruct, Enum, HashMap, Int, Option, Range, RangeInclusive, Result, Struct, Tuple, U8aFixed, UInt, Vec, VecFixed, WrapperOpaque } from '../codec';
import { Bytes, Null } from '../primitive';
import { getTypeDef } from './getTypeDef';
import { TypeDefInfo } from './types';
@@ -169,7 +169,10 @@ const infoMapping: Record<TypeDefInfo, (registry: Registry, value: TypeDef) => C
? U8aFixed.with((length * 8) as U8aBitLength, displayName)
: VecFixed.with(subType, length)
);
}
},
[TypeDefInfo.WrapperOpaque]: (registry: Registry, value: TypeDef): Constructor<Codec> =>
WrapperOpaque.with(getSubType(value))
};
// Returns the type Class for construction
+4 -1
View File
@@ -32,6 +32,7 @@ function encodeWithParams (registry: Registry, typeDef: TypeDef, outer: string):
case TypeDefInfo.Option:
case TypeDefInfo.Result:
case TypeDefInfo.Vec:
case TypeDefInfo.WrapperOpaque:
return paramsNotation(outer, sub, (p) => encodeTypeDef(registry, p));
}
@@ -134,7 +135,9 @@ const encoders: Record<TypeDefInfo, (registry: Registry, typeDef: TypeDef) => st
assert(isNumber(length) && !isUndefined(sub) && !Array.isArray(sub), 'Unable to encode VecFixed type');
return `[${sub.type};${length}]`;
}
},
[TypeDefInfo.WrapperOpaque]: (registry: Registry, typeDef: TypeDef) =>
encodeWithParams(registry, typeDef, 'WrapperOpaque')
};
function encodeType (registry: Registry, typeDef: TypeDef, withLookup = true): string {
+2 -1
View File
@@ -216,7 +216,8 @@ const wrappedExtraction: [string, string, TypeDefInfo][] = [
['Compact<', '>', TypeDefInfo.Compact],
['Linkage<', '>', TypeDefInfo.Linkage],
['Option<', '>', TypeDefInfo.Option],
['Vec<', '>', TypeDefInfo.Vec]
['Vec<', '>', TypeDefInfo.Vec],
['WrapperOpaque<', '>', TypeDefInfo.WrapperOpaque]
];
function extractSubType (type: string, [start, end]: [string, string, TypeDefInfo, any?]): string {
+2 -8
View File
@@ -3,7 +3,7 @@
import type { ExtDef } from '../extrinsic/signedExtensions/types';
import type { ChainProperties, CodecHash, DispatchErrorModule, Hash, MetadataLatest, PortableRegistry, SiLookupTypeId } from '../interfaces/types';
import type { CallFunction, Codec, CodecHasher, Constructor, DetectCodec, DetectConstructor, RegisteredTypes, Registry, RegistryError, RegistryTypes, TypeSpec } from '../types';
import type { CallFunction, Codec, CodecHasher, Constructor, DetectCodec, DetectConstructor, RegisteredTypes, Registry, RegistryError, RegistryTypes } from '../types';
import type { CreateOptions } from './types';
import { assert, assertReturn, BN_ZERO, formatBalance, isFunction, isString, isU8a, logger, stringCamelCase, stringify, u8aToHex } from '@polkadot/util';
@@ -145,20 +145,14 @@ export class TypeRegistry implements Registry {
#userExtensions?: ExtDef;
public compatSpecs: TypeSpec[] = [];
public createdAtHash?: Hash;
constructor (createdAtHash?: Hash | Uint8Array | string, compatSpecs?: TypeSpec[]) {
constructor (createdAtHash?: Hash | Uint8Array | string) {
this.#knownDefaults = { Json, Metadata, Raw, ...baseTypes };
this.#knownDefinitions = definitions as unknown as Record<string, { types: RegistryTypes }>;
this.init();
if (compatSpecs) {
this.compatSpecs = compatSpecs;
}
if (createdAtHash) {
this.createdAtHash = this.createType('Hash', createdAtHash);
}
+1 -1
View File
@@ -8,7 +8,7 @@ interface SanitizeOptions {
type Mapper = (value: string, options?: SanitizeOptions) => string;
const BOUNDED = ['BTreeMap', 'BTreeSet', 'HashMap', 'Vec'];
const ALLOWED_BOXES = BOUNDED.concat(['Compact', 'DoNotConstruct', 'Int', 'Linkage', 'Range', 'RangeInclusive', 'Result', 'Option', 'UInt']);
const ALLOWED_BOXES = BOUNDED.concat(['Compact', 'DoNotConstruct', 'Int', 'Linkage', 'Range', 'RangeInclusive', 'Result', 'Option', 'UInt', 'WrapperOpaque']);
const BOX_PRECEDING = ['<', '(', '[', '"', ',', ' ']; // start of vec, tuple, fixed array, part of struct def or in tuple
const mappings: Mapper[] = [
+2 -1
View File
@@ -21,7 +21,8 @@ export enum TypeDefInfo {
Tuple,
UInt,
Vec,
VecFixed
VecFixed,
WrapperOpaque
}
export interface TypeDef {
@@ -1,19 +1,18 @@
// Copyright 2017-2021 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Vec } from '../codec/Vec';
import type { PortableType } from '../interfaces/metadata';
import type { SiField, SiLookupTypeId, SiPath, SiType, SiTypeDefArray, SiTypeDefBitSequence, SiTypeDefCompact, SiTypeDefComposite, SiTypeDefSequence, SiTypeDefTuple, SiTypeDefVariant, SiTypeParameter, SiVariant } from '../interfaces/scaleInfo';
import type { Text } from '../primitive/Text';
import type { Type } from '../primitive/Type';
import type { Registry, TypeDef } from '../types';
import type { Vec } from '../../codec';
import type { PortableType } from '../../interfaces/metadata';
import type { SiField, SiLookupTypeId, SiPath, SiType, SiTypeDefArray, SiTypeDefBitSequence, SiTypeDefCompact, SiTypeDefComposite, SiTypeDefSequence, SiTypeDefTuple, SiTypeDefVariant, SiTypeParameter, SiVariant } from '../../interfaces/scaleInfo';
import type { Text, Type } from '../../primitive';
import type { Registry, TypeDef } from '../../types';
import { assert, isNumber, isString, stringCamelCase, stringify, stringUpperFirst } from '@polkadot/util';
import { Struct } from '../codec/Struct';
import { withTypeString } from '../create/encodeTypes';
import { getTypeDef } from '../create/getTypeDef';
import { TypeDefInfo } from '../types';
import { Struct } from '../../codec/Struct';
import { withTypeString } from '../../create/encodeTypes';
import { getTypeDef } from '../../create/getTypeDef';
import { TypeDefInfo } from '../../types';
// Just a placeholder for a type.unrwapOr()
const TYPE_UNWRAP = { toNumber: () => -1 };
@@ -49,7 +48,7 @@ const SETS = [
].map((p) => p.split('::'));
// These we never use these as top-level names, they are wrappers
const WRAPPERS = ['BoundedBTreeMap', 'BoundedVec', 'Box', 'BTreeMap', 'Cow', 'Result', 'Option', 'WeakBoundedVec'];
const WRAPPERS = ['BoundedBTreeMap', 'BoundedVec', 'Box', 'BTreeMap', 'Cow', 'Result', 'Option', 'WeakBoundedVec', 'WrapperOpaque'];
// These are reserved and/or conflicts with built-in Codec definitions
const RESERVED = ['call', 'entries', 'hash', 'keys', 'new', 'size'];
@@ -416,6 +415,11 @@ export class GenericPortableRegistry extends Struct {
...this.#createSiDef(type)
}))
});
} else if (path.length && path[path.length - 1].toString() === 'WrapperOpaque') {
return withTypeString(this.registry, {
info: TypeDefInfo.WrapperOpaque,
sub: this.#createSiDef(params[0].type.unwrap())
});
}
return SETS.some((p) => matchParts(p, path))
@@ -0,0 +1,5 @@
// Copyright 2017-2021 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
export { GenericPortableRegistry } from './PortableRegistry';
export { toV1 as convertSiV0toV1 } from './toV1';
@@ -0,0 +1,133 @@
// Copyright 2017-2021 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { PortableType, Si0Field, Si0LookupTypeId, Si0Path, Si0Type, Si0TypeDefArray, Si0TypeDefBitSequence, Si0TypeDefComposite, Si0TypeDefPrimitive, Si0TypeDefSequence, Si0TypeDefVariant, Si1Field, Si1TypeDef } from '../../interfaces';
import type { Registry } from '../../types';
function convertArray (registry: Registry, { len, type }: Si0TypeDefArray): Si1TypeDef {
return registry.createType('Si1TypeDef', {
Array: {
len,
type: type.toNumber()
}
});
}
function convertBitSequence (registry: Registry, { bitOrderType, bitStoreType }: Si0TypeDefBitSequence): Si1TypeDef {
return registry.createType('Si1TypeDef', {
BitSequence: {
bitOrderType: bitOrderType.toNumber(),
bitStoreType: bitStoreType.toNumber()
}
});
}
function convertCompact (registry: Registry, { type }: Si0TypeDefSequence): Si1TypeDef {
return registry.createType('Si1TypeDef', {
Compact: {
type: type.toNumber()
}
});
}
function convertComposite (registry: Registry, { fields }: Si0TypeDefComposite): Si1TypeDef {
return registry.createType('Si1TypeDef', {
Composite: {
fields: convertFields(registry, fields)
}
});
}
function convertFields (registry: Registry, fields: Si0Field[]): Si1Field[] {
return fields.map(({ docs, name, type, typeName }) =>
registry.createType('Si1Field', {
docs,
name,
type: type.toNumber(),
typeName
})
);
}
function convertPhantom (registry: Registry, path: Si0Path): Si1TypeDef {
console.warn(`Converting phantom type ${path.map((p) => p.toString()).join('::')} to empty tuple`);
return registry.createType('Si1TypeDef', {
Tuple: []
});
}
function convertPrimitive (registry: Registry, prim: Si0TypeDefPrimitive): Si1TypeDef {
return registry.createType('Si1TypeDef', {
Primitive: prim.toString()
});
}
function convertSequence (registry: Registry, { type }: Si0TypeDefSequence): Si1TypeDef {
return registry.createType('Si1TypeDef', {
Sequence: {
type: type.toNumber()
}
});
}
function convertTuple (registry: Registry, types: Si0LookupTypeId[]): Si1TypeDef {
return registry.createType('Si1TypeDef', {
Tuple: types.map((t) => t.toNumber())
});
}
function convertVariant (registry: Registry, { variants }: Si0TypeDefVariant): Si1TypeDef {
return registry.createType('Si1TypeDef', {
Variant: {
variants: variants.map(({ discriminant, docs, fields, name }, index) =>
registry.createType('Si1Variant', {
docs,
fields: convertFields(registry, fields),
index: discriminant.isSome
? discriminant.unwrap().toNumber()
: index,
name
})
)
}
});
}
function convertDef (registry: Registry, { def, path }: Si0Type): Si1TypeDef {
if (def.isArray) {
return convertArray(registry, def.asArray);
} else if (def.isBitSequence) {
return convertBitSequence(registry, def.asBitSequence);
} else if (def.isCompact) {
return convertCompact(registry, def.asCompact);
} else if (def.isComposite) {
return convertComposite(registry, def.asComposite);
} else if (def.isPhantom) {
return convertPhantom(registry, path);
} else if (def.isPrimitive) {
return convertPrimitive(registry, def.asPrimitive);
} else if (def.isSequence) {
return convertSequence(registry, def.asSequence);
} else if (def.isTuple) {
return convertTuple(registry, def.asTuple);
} else if (def.isVariant) {
return convertVariant(registry, def.asVariant);
}
throw new Error(`Cannot convert type ${def.toString()}`);
}
export function toV1 (registry: Registry, types: Si0Type[]): PortableType[] {
return types.map((t, id) =>
registry.createType('PortableType', {
id,
type: {
def: convertDef(registry, t),
docs: [],
params: t.params.map((p) => p.toNumber()),
path: t.path.map((p) => p.toString())
}
})
);
}
@@ -12,6 +12,7 @@ export default {
BridgedBlockHash: 'H256',
BridgedBlockNumber: 'BlockNumber',
BridgedHeader: 'Header',
BridgeMessageId: '(LaneId, MessageNonce)',
CallOrigin: {
_enum: {
SourceRoot: 'Null',
@@ -66,9 +67,9 @@ export default {
_enum: ['Normal', 'RejectingOutboundMessages', 'Halted']
},
OutboundLaneData: {
latestGeneratedNonce: 'MessageNonce',
oldestUnprunedNonce: 'MessageNonce',
latestReceivedNonce: 'MessageNonce',
oldestUnprunedNonce: 'MessageNonce'
latestGeneratedNonce: 'MessageNonce'
},
OutboundMessageFee: 'Balance',
OutboundPayload: {
@@ -17,6 +17,9 @@ export interface BridgedBlockNumber extends BlockNumber {}
/** @name BridgedHeader */
export interface BridgedHeader extends Header {}
/** @name BridgeMessageId */
export interface BridgeMessageId extends ITuple<[LaneId, MessageNonce]> {}
/** @name CallOrigin */
export interface CallOrigin extends Enum {
readonly isSourceRoot: boolean;
@@ -102,9 +105,9 @@ export interface OperatingMode extends Enum {
/** @name OutboundLaneData */
export interface OutboundLaneData extends Struct {
readonly latestGeneratedNonce: MessageNonce;
readonly latestReceivedNonce: MessageNonce;
readonly oldestUnprunedNonce: MessageNonce;
readonly latestReceivedNonce: MessageNonce;
readonly latestGeneratedNonce: MessageNonce;
}
/** @name OutboundMessageFee */
@@ -78,6 +78,26 @@ export default {
],
type: 'Option<StorageData>'
},
getStorageEntries: {
description: 'Returns child storage entries for multiple keys at a specific block state',
params: [
{
name: 'childKey',
type: 'PrefixedStorageKey'
},
{
name: 'keys',
type: 'Vec<StorageKey>'
},
{
name: 'at',
type: 'Hash',
isHistoric: true,
isOptional: true
}
],
type: 'Vec<Option<StorageData>>'
},
getStorageHash: {
description: 'Returns the hash of a child storage entry at a block state',
params: [
@@ -26,6 +26,10 @@ export default {
...v13,
...v14,
// registry mapping to latest
PortableRegistry: 'PortableRegistryV14',
PortableType: 'PortableTypeV14',
// latest mappings
ErrorMetadataLatest: 'ErrorMetadataV14',
EventMetadataLatest: 'EventMetadataV14',
@@ -2,7 +2,7 @@
/* eslint-disable */
import type { Bytes, Enum, GenericPortableRegistry, Option, Struct, Text, Type, Vec, bool, u8 } from '@polkadot/types';
import type { SiField, SiLookupTypeId, SiType } from '@polkadot/types/interfaces/scaleInfo';
import type { Si1Field, Si1LookupTypeId, Si1Type, SiLookupTypeId } from '@polkadot/types/interfaces/scaleInfo';
/** @name ErrorMetadataLatest */
export interface ErrorMetadataLatest extends ErrorMetadataV14 {}
@@ -22,7 +22,7 @@ export interface ErrorMetadataV13 extends ErrorMetadataV12 {}
/** @name ErrorMetadataV14 */
export interface ErrorMetadataV14 extends Struct {
readonly name: Text;
readonly fields: Vec<SiField>;
readonly fields: Vec<Si1Field>;
readonly index: u8;
readonly docs: Vec<Text>;
readonly args: Vec<Type>;
@@ -52,7 +52,7 @@ export interface EventMetadataV13 extends EventMetadataV12 {}
/** @name EventMetadataV14 */
export interface EventMetadataV14 extends Struct {
readonly name: Text;
readonly fields: Vec<SiField>;
readonly fields: Vec<Si1Field>;
readonly index: u8;
readonly docs: Vec<Text>;
readonly args: Vec<Type>;
@@ -129,10 +129,10 @@ export interface FunctionMetadataV13 extends FunctionMetadataV12 {}
/** @name FunctionMetadataV14 */
export interface FunctionMetadataV14 extends Struct {
readonly name: Text;
readonly fields: Vec<SiField>;
readonly fields: Vec<Si1Field>;
readonly index: u8;
readonly docs: Vec<Text>;
readonly args: Vec<FunctionArgumentMetadataLatest>;
readonly args: Vec<FunctionArgumentMetadataV14>;
}
/** @name FunctionMetadataV9 */
@@ -327,12 +327,18 @@ export interface PalletStorageMetadataV14 extends Struct {
}
/** @name PortableRegistry */
export interface PortableRegistry extends GenericPortableRegistry {}
export interface PortableRegistry extends PortableRegistryV14 {}
/** @name PortableRegistryV14 */
export interface PortableRegistryV14 extends GenericPortableRegistry {}
/** @name PortableType */
export interface PortableType extends Struct {
readonly id: SiLookupTypeId;
readonly type: SiType;
export interface PortableType extends PortableTypeV14 {}
/** @name PortableTypeV14 */
export interface PortableTypeV14 extends Struct {
readonly id: Si1LookupTypeId;
readonly type: Si1Type;
}
/** @name SignedExtensionMetadataLatest */
@@ -6,29 +6,29 @@
import type { DefinitionsTypes } from '../../types';
import { SiVariant } from '../scaleInfo/definitions';
import { Si1Variant } from '../scaleInfo/v1';
export const v14: DefinitionsTypes = {
// registry
PortableRegistry: 'GenericPortableRegistry',
PortableType: {
id: 'SiLookupTypeId',
type: 'SiType'
PortableRegistryV14: 'GenericPortableRegistry',
PortableTypeV14: {
id: 'Si1LookupTypeId',
type: 'Si1Type'
},
// compatibility with earlier layouts, i.e. don't break previous users
ErrorMetadataV14: {
...SiVariant,
...Si1Variant,
args: 'Vec<Type>'
},
EventMetadataV14: {
...SiVariant,
...Si1Variant,
args: 'Vec<Type>'
},
FunctionArgumentMetadataV14: 'FunctionArgumentMetadataV13',
FunctionMetadataV14: {
...SiVariant,
args: 'Vec<FunctionArgumentMetadataLatest>'
...Si1Variant,
args: 'Vec<FunctionArgumentMetadataV14>'
},
// V14
@@ -4,78 +4,32 @@
import type { Definitions } from '../../types';
import { v0 } from './v0';
import { v1 } from './v1';
// order important in structs... :)
/* eslint-disable sort-keys */
export const SiVariant = {
name: 'Text',
fields: 'Vec<SiField>',
index: 'u8',
docs: 'Vec<Text>'
};
export default {
rpc: {},
types: {
...v0,
SiField: {
name: 'Option<Text>',
type: 'SiLookupTypeId',
typeName: 'Option<Text>',
docs: 'Vec<Text>'
},
SiLookupTypeId: 'Compact<u32>',
SiPath: 'Vec<Text>',
SiType: {
path: 'SiPath',
params: 'Vec<SiTypeParameter>',
def: 'SiTypeDef',
docs: 'Vec<Text>'
},
SiTypeDef: {
_enum: {
Composite: 'SiTypeDefComposite',
Variant: 'SiTypeDefVariant',
Sequence: 'SiTypeDefSequence',
Array: 'SiTypeDefArray',
Tuple: 'SiTypeDefTuple',
Primitive: 'SiTypeDefPrimitive',
Compact: 'SiTypeDefCompact',
BitSequence: 'SiTypeDefBitSequence',
// NOTE: This is specific to the implementation for pre-v14 metadata
// compatibility (always keep this as the last entry in the enum)
HistoricMetaCompat: 'Type'
}
},
SiTypeDefArray: {
len: 'u32',
type: 'SiLookupTypeId'
},
SiTypeDefBitSequence: {
bitStoreType: 'SiLookupTypeId',
bitOrderType: 'SiLookupTypeId'
},
SiTypeDefCompact: {
type: 'SiLookupTypeId'
},
SiTypeDefComposite: {
fields: 'Vec<SiField>'
},
SiTypeDefPrimitive: {
_enum: ['Bool', 'Char', 'Str', 'U8', 'U16', 'U32', 'U64', 'U128', 'U256', 'I8', 'I16', 'I32', 'I64', 'I128', 'I256']
},
SiTypeDefSequence: {
type: 'SiLookupTypeId'
},
SiTypeDefTuple: 'Vec<SiLookupTypeId>',
SiTypeParameter: {
name: 'Text',
type: 'Option<SiLookupTypeId>'
},
SiTypeDefVariant: {
variants: 'Vec<SiVariant>'
},
SiVariant
...v1,
// latest mappings
SiField: 'Si1Field',
SiLookupTypeId: 'Si1LookupTypeId',
SiPath: 'Si1Path',
SiType: 'Si1Type',
SiTypeDef: 'Si1TypeDef',
SiTypeDefArray: 'Si1TypeDefArray',
SiTypeDefBitSequence: 'Si1TypeDefBitSequence',
SiTypeDefCompact: 'Si1TypeDefCompact',
SiTypeDefComposite: 'Si1TypeDefComposite',
SiTypeDefPrimitive: 'Si1TypeDefPrimitive',
SiTypeDefSequence: 'Si1TypeDefSequence',
SiTypeDefTuple: 'Si1TypeDefTuple',
SiTypeParameter: 'Si1TypeParameter',
SiTypeDefVariant: 'Si1TypeDefVariant',
SiVariant: 'Si1Variant'
}
} as Definitions;
@@ -118,116 +118,145 @@ export interface Si0Variant extends Struct {
readonly docs: Vec<Text>;
}
/** @name SiField */
export interface SiField extends Struct {
/** @name Si1Field */
export interface Si1Field extends Struct {
readonly name: Option<Text>;
readonly type: SiLookupTypeId;
readonly type: Si1LookupTypeId;
readonly typeName: Option<Text>;
readonly docs: Vec<Text>;
}
/** @name SiLookupTypeId */
export interface SiLookupTypeId extends Compact<u32> {}
/** @name Si1LookupTypeId */
export interface Si1LookupTypeId extends Compact<u32> {}
/** @name SiPath */
export interface SiPath extends Vec<Text> {}
/** @name Si1Path */
export interface Si1Path extends Si0Path {}
/** @name SiType */
export interface SiType extends Struct {
readonly path: SiPath;
readonly params: Vec<SiTypeParameter>;
readonly def: SiTypeDef;
/** @name Si1Type */
export interface Si1Type extends Struct {
readonly path: Si1Path;
readonly params: Vec<Si1TypeParameter>;
readonly def: Si1TypeDef;
readonly docs: Vec<Text>;
}
/** @name SiTypeDef */
export interface SiTypeDef extends Enum {
/** @name Si1TypeDef */
export interface Si1TypeDef extends Enum {
readonly isComposite: boolean;
readonly asComposite: SiTypeDefComposite;
readonly asComposite: Si1TypeDefComposite;
readonly isVariant: boolean;
readonly asVariant: SiTypeDefVariant;
readonly asVariant: Si1TypeDefVariant;
readonly isSequence: boolean;
readonly asSequence: SiTypeDefSequence;
readonly asSequence: Si1TypeDefSequence;
readonly isArray: boolean;
readonly asArray: SiTypeDefArray;
readonly asArray: Si1TypeDefArray;
readonly isTuple: boolean;
readonly asTuple: SiTypeDefTuple;
readonly asTuple: Si1TypeDefTuple;
readonly isPrimitive: boolean;
readonly asPrimitive: SiTypeDefPrimitive;
readonly asPrimitive: Si1TypeDefPrimitive;
readonly isCompact: boolean;
readonly asCompact: SiTypeDefCompact;
readonly asCompact: Si1TypeDefCompact;
readonly isBitSequence: boolean;
readonly asBitSequence: SiTypeDefBitSequence;
readonly asBitSequence: Si1TypeDefBitSequence;
readonly isHistoricMetaCompat: boolean;
readonly asHistoricMetaCompat: Type;
}
/** @name SiTypeDefArray */
export interface SiTypeDefArray extends Struct {
/** @name Si1TypeDefArray */
export interface Si1TypeDefArray extends Struct {
readonly len: u32;
readonly type: SiLookupTypeId;
readonly type: Si1LookupTypeId;
}
/** @name SiTypeDefBitSequence */
export interface SiTypeDefBitSequence extends Struct {
readonly bitStoreType: SiLookupTypeId;
readonly bitOrderType: SiLookupTypeId;
/** @name Si1TypeDefBitSequence */
export interface Si1TypeDefBitSequence extends Struct {
readonly bitStoreType: Si1LookupTypeId;
readonly bitOrderType: Si1LookupTypeId;
}
/** @name SiTypeDefCompact */
export interface SiTypeDefCompact extends Struct {
readonly type: SiLookupTypeId;
/** @name Si1TypeDefCompact */
export interface Si1TypeDefCompact extends Struct {
readonly type: Si1LookupTypeId;
}
/** @name SiTypeDefComposite */
export interface SiTypeDefComposite extends Struct {
readonly fields: Vec<SiField>;
/** @name Si1TypeDefComposite */
export interface Si1TypeDefComposite extends Struct {
readonly fields: Vec<Si1Field>;
}
/** @name SiTypeDefPrimitive */
export interface SiTypeDefPrimitive extends Enum {
readonly isBool: boolean;
readonly isChar: boolean;
readonly isStr: boolean;
readonly isU8: boolean;
readonly isU16: boolean;
readonly isU32: boolean;
readonly isU64: boolean;
readonly isU128: boolean;
readonly isU256: boolean;
readonly isI8: boolean;
readonly isI16: boolean;
readonly isI32: boolean;
readonly isI64: boolean;
readonly isI128: boolean;
readonly isI256: boolean;
/** @name Si1TypeDefPrimitive */
export interface Si1TypeDefPrimitive extends Si0TypeDefPrimitive {}
/** @name Si1TypeDefSequence */
export interface Si1TypeDefSequence extends Struct {
readonly type: Si1LookupTypeId;
}
/** @name SiTypeDefSequence */
export interface SiTypeDefSequence extends Struct {
readonly type: SiLookupTypeId;
/** @name Si1TypeDefTuple */
export interface Si1TypeDefTuple extends Vec<Si1LookupTypeId> {}
/** @name Si1TypeDefVariant */
export interface Si1TypeDefVariant extends Struct {
readonly variants: Vec<Si1Variant>;
}
/** @name SiTypeDefTuple */
export interface SiTypeDefTuple extends Vec<SiLookupTypeId> {}
/** @name SiTypeDefVariant */
export interface SiTypeDefVariant extends Struct {
readonly variants: Vec<SiVariant>;
}
/** @name SiTypeParameter */
export interface SiTypeParameter extends Struct {
/** @name Si1TypeParameter */
export interface Si1TypeParameter extends Struct {
readonly name: Text;
readonly type: Option<SiLookupTypeId>;
readonly type: Option<Si1LookupTypeId>;
}
/** @name SiVariant */
export interface SiVariant extends Struct {
/** @name Si1Variant */
export interface Si1Variant extends Struct {
readonly name: Text;
readonly fields: Vec<SiField>;
readonly fields: Vec<Si1Field>;
readonly index: u8;
readonly docs: Vec<Text>;
}
/** @name SiField */
export interface SiField extends Si1Field {}
/** @name SiLookupTypeId */
export interface SiLookupTypeId extends Si1LookupTypeId {}
/** @name SiPath */
export interface SiPath extends Si1Path {}
/** @name SiType */
export interface SiType extends Si1Type {}
/** @name SiTypeDef */
export interface SiTypeDef extends Si1TypeDef {}
/** @name SiTypeDefArray */
export interface SiTypeDefArray extends Si1TypeDefArray {}
/** @name SiTypeDefBitSequence */
export interface SiTypeDefBitSequence extends Si1TypeDefBitSequence {}
/** @name SiTypeDefCompact */
export interface SiTypeDefCompact extends Si1TypeDefCompact {}
/** @name SiTypeDefComposite */
export interface SiTypeDefComposite extends Si1TypeDefComposite {}
/** @name SiTypeDefPrimitive */
export interface SiTypeDefPrimitive extends Si1TypeDefPrimitive {}
/** @name SiTypeDefSequence */
export interface SiTypeDefSequence extends Si1TypeDefSequence {}
/** @name SiTypeDefTuple */
export interface SiTypeDefTuple extends Si1TypeDefTuple {}
/** @name SiTypeDefVariant */
export interface SiTypeDefVariant extends Si1TypeDefVariant {}
/** @name SiTypeParameter */
export interface SiTypeParameter extends Si1TypeParameter {}
/** @name SiVariant */
export interface SiVariant extends Si1Variant {}
export type PHANTOM_SCALEINFO = 'scaleInfo';
@@ -0,0 +1,73 @@
// Copyright 2017-2021 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { DefinitionsTypes } from '../../types';
// order important in structs... :)
/* eslint-disable sort-keys */
export const Si1Variant = {
name: 'Text',
fields: 'Vec<Si1Field>',
index: 'u8',
docs: 'Vec<Text>'
};
export const v1: DefinitionsTypes = {
Si1Field: {
name: 'Option<Text>',
type: 'Si1LookupTypeId',
typeName: 'Option<Text>',
docs: 'Vec<Text>'
},
Si1LookupTypeId: 'Compact<u32>',
Si1Path: 'Si0Path',
Si1Type: {
path: 'Si1Path',
params: 'Vec<Si1TypeParameter>',
def: 'Si1TypeDef',
docs: 'Vec<Text>'
},
Si1TypeDef: {
_enum: {
Composite: 'Si1TypeDefComposite',
Variant: 'Si1TypeDefVariant',
Sequence: 'Si1TypeDefSequence',
Array: 'Si1TypeDefArray',
Tuple: 'Si1TypeDefTuple',
Primitive: 'Si1TypeDefPrimitive',
Compact: 'Si1TypeDefCompact',
BitSequence: 'Si1TypeDefBitSequence',
// NOTE: This is specific to the implementation for pre-v14 metadata
// compatibility (always keep this as the last entry in the enum)
HistoricMetaCompat: 'Type'
}
},
Si1TypeDefArray: {
len: 'u32',
type: 'Si1LookupTypeId'
},
Si1TypeDefBitSequence: {
bitStoreType: 'Si1LookupTypeId',
bitOrderType: 'Si1LookupTypeId'
},
Si1TypeDefCompact: {
type: 'Si1LookupTypeId'
},
Si1TypeDefComposite: {
fields: 'Vec<Si1Field>'
},
Si1TypeDefPrimitive: 'Si0TypeDefPrimitive',
Si1TypeDefSequence: {
type: 'Si1LookupTypeId'
},
Si1TypeDefTuple: 'Vec<Si1LookupTypeId>',
Si1TypeParameter: {
name: 'Text',
type: 'Option<Si1LookupTypeId>'
},
Si1TypeDefVariant: {
variants: 'Vec<Si1Variant>'
},
Si1Variant
};
@@ -436,6 +436,7 @@ export default {
specName: 'Text',
specVersion: 'u32'
},
SpecVersion: 'u32',
StorageChangeSet: {
block: 'Hash',
changes: 'Vec<KeyValueOption>'
@@ -68,6 +68,9 @@ export interface RuntimeVersionPartial extends Struct {
readonly specVersion: u32;
}
/** @name SpecVersion */
export interface SpecVersion extends u32 {}
/** @name StorageChangeSet */
export interface StorageChangeSet extends Struct {
readonly block: Hash;
@@ -7,6 +7,7 @@ import type { Extrinsics, ModuleExtrinsics } from '../types';
import { stringCamelCase } from '@polkadot/util';
import { getSiName } from '../../util';
import { createUnchecked } from './createUnchecked';
/** @internal */
@@ -25,7 +26,7 @@ export function decorateExtrinsics (registry: Registry, { lookup, pallets }: Met
...variant,
args: variant.fields.map(({ name, type }, index) => ({
name: stringCamelCase(name.unwrapOr(`param${index}`)),
type: lookup.getTypeDef(type).type
type: getSiName(lookup, type)
}))
});
@@ -27,6 +27,7 @@ export function expandMetadata (registry: Registry, metadata: Metadata): Decorat
errors: decorateErrors(registry, latest, version),
events: decorateEvents(registry, latest, version),
query: decorateStorage(registry, latest, version),
registry,
tx: decorateExtrinsics(registry, latest, version)
};
}
@@ -3,7 +3,7 @@
import type { DispatchErrorModule, ErrorMetadataLatest, EventMetadataLatest, PalletConstantMetadataLatest } from '../../interfaces';
import type { StorageEntry } from '../../primitive/types';
import type { AnyTuple, CallFunction, Codec, IEvent } from '../../types';
import type { AnyTuple, CallFunction, Codec, IEvent, Registry } from '../../types';
export interface ConstantCodec extends Codec {
readonly meta: PalletConstantMetadataLatest;
@@ -46,5 +46,6 @@ export interface DecoratedMeta {
readonly errors: Errors;
readonly events: Events;
readonly query: Storage;
readonly registry: Registry;
readonly tx: Extrinsics
}
@@ -9,6 +9,14 @@ import { TypeDefInfo } from '../../create/types';
type Extracted = string | Extracted[];
function extractSubSingle ({ lookupName, type }: TypeDef): Extracted[] {
return extractTypes([lookupName || type]);
}
function extractSubArray (types: TypeDef[]): Extracted[] {
return extractTypes(types.map(({ lookupName, type }) => lookupName || type));
}
/** @internal */
export function extractTypes (types: string[]): Extracted[] {
return types.map((type): Extracted => {
@@ -16,14 +24,15 @@ export function extractTypes (types: string[]): Extracted[] {
switch (decoded.info) {
case TypeDefInfo.Plain:
return decoded.type;
return decoded.lookupName || decoded.type;
case TypeDefInfo.BTreeSet:
case TypeDefInfo.Compact:
case TypeDefInfo.Option:
case TypeDefInfo.Vec:
case TypeDefInfo.VecFixed:
return extractTypes([(decoded.sub as TypeDef).type]);
case TypeDefInfo.WrapperOpaque:
return extractSubSingle(decoded.sub as TypeDef);
case TypeDefInfo.BTreeMap:
case TypeDefInfo.Enum:
@@ -32,10 +41,10 @@ export function extractTypes (types: string[]): Extracted[] {
case TypeDefInfo.Set:
case TypeDefInfo.Struct:
case TypeDefInfo.Tuple:
return extractTypes((decoded.sub as TypeDef[]).map(({ type }) => type));
return extractSubArray(decoded.sub as TypeDef[]);
default:
throw new Error(`Unhandled: Unable to create and validate type from ${type} (info=${decoded.info})`);
throw new Error(`Unhandled: Unable to create and validate type from ${type} (info=${TypeDefInfo[decoded.info]})`);
}
});
}
@@ -0,0 +1,10 @@
// Copyright 2017-2021 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { PortableRegistry, SiLookupTypeId } from '../../interfaces';
export function getSiName (lookup: PortableRegistry, type: SiLookupTypeId): string {
const typeDef = lookup.getTypeDef(type);
return typeDef.lookupName || typeDef.type;
}
@@ -2,6 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
export { flattenUniq } from './flattenUniq';
export { getSiName } from './getSiName';
export { getUniqTypes } from './getUniqTypes';
export { toCallsOnly } from './toCallsOnly';
export { validateTypes } from './validateTypes';
+58 -35
View File
@@ -5,7 +5,7 @@ import type { ErrorMetadataV13, EventMetadataV13, ExtrinsicMetadataV13, Extrinsi
import type { SiVariant } from '../../interfaces/scaleInfo';
import type { Text } from '../../primitive/Text';
import type { Type } from '../../primitive/Type';
import type { OverrideModuleType, Registry, TypeSpec } from '../../types';
import type { OverrideModuleType, Registry } from '../../types';
import { getModuleTypes, knownOrigins } from '@polkadot/types-known';
import { stringCamelCase } from '@polkadot/util';
@@ -16,15 +16,26 @@ interface MapDef {
value: Type;
}
export interface TypeSpec {
def: {
HistoricMetaCompat?: string;
Tuple?: number[];
Variant?: {
variants: SiVariant[];
}
},
path?: string[];
}
const BOXES = [['<', '>'], ['<', ','], [',', '>'], ['(', ')'], ['(', ','], [',', ','], [',', ')']];
/**
* Creates a compatible type mapping
* @internal
**/
function compatType (types: TypeSpec[], _type: Text | string): number {
function compatType (compatTypes: TypeSpec[], _type: Text | string): number {
const type = _type.toString();
const index = types.findIndex(({ def }) =>
const index = compatTypes.findIndex(({ def }) =>
def.HistoricMetaCompat === type
);
@@ -32,13 +43,23 @@ function compatType (types: TypeSpec[], _type: Text | string): number {
return index;
}
return types.push({
def: { HistoricMetaCompat: type }
return compatTypes.push({
def: {
HistoricMetaCompat: type
}
}) - 1;
}
function variantType (modName: Text, variantType: string, types: TypeSpec[], variants: SiVariant[]): number {
return types.push({
function makeTupleType (compatTypes: TypeSpec[], entries: number[]): number {
return compatTypes.push({
def: {
Tuple: entries
}
}) - 1;
}
function makeVariantType (modName: Text, variantType: string, compatTypes: TypeSpec[], variants: SiVariant[]): number {
return compatTypes.push({
def: {
Variant: { variants }
},
@@ -104,14 +125,14 @@ function setTypeOverride (sectionTypes: OverrideModuleType, types: Type[]): void
* Apply module-specific type overrides (always be done as part of toV14)
* @internal
**/
function convertCalls (registry: Registry, modName: Text, calls: FunctionMetadataV13[], sectionTypes: OverrideModuleType): PalletCallMetadataV14 {
function convertCalls (compatTypes: TypeSpec[], registry: Registry, modName: Text, calls: FunctionMetadataV13[], sectionTypes: OverrideModuleType): PalletCallMetadataV14 {
const variants = calls.map(({ args, docs, name }, index): SiVariant => {
setTypeOverride(sectionTypes, args.map(({ type }) => type));
return registry.createType('SiVariant', {
docs,
fields: args.map(({ name, type }) =>
registry.createType('SiField', { name, type: compatType(registry.compatSpecs, type) })
registry.createType('SiField', { name, type: compatType(compatTypes, type) })
),
index,
name
@@ -119,7 +140,7 @@ function convertCalls (registry: Registry, modName: Text, calls: FunctionMetadat
});
return registry.createType('PalletCallMetadataV14', {
type: variantType(modName, 'Call', registry.compatSpecs, variants)
type: makeVariantType(modName, 'Call', compatTypes, variants)
});
}
@@ -127,14 +148,14 @@ function convertCalls (registry: Registry, modName: Text, calls: FunctionMetadat
* Apply module-specific type overrides (always be done as part of toV14)
* @internal
*/
function convertConstants (registry: Registry, constants: ModuleConstantMetadataV13[], sectionTypes: OverrideModuleType): PalletConstantMetadataV14[] {
function convertConstants (compatTypes: TypeSpec[], registry: Registry, constants: ModuleConstantMetadataV13[], sectionTypes: OverrideModuleType): PalletConstantMetadataV14[] {
return constants.map(({ docs, name, type, value }): PalletConstantMetadataV14 => {
setTypeOverride(sectionTypes, [type]);
return registry.createType('PalletConstantMetadataV14', {
docs,
name,
type: compatType(registry.compatSpecs, type),
type: compatType(compatTypes, type),
value
});
});
@@ -145,7 +166,7 @@ function convertConstants (registry: Registry, constants: ModuleConstantMetadata
* @internal
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
function convertErrors (registry: Registry, modName: Text, errors: ErrorMetadataV13[], _sectionTypes: OverrideModuleType): PalletErrorMetadataV14 {
function convertErrors (compatTypes: TypeSpec[], registry: Registry, modName: Text, errors: ErrorMetadataV13[], _sectionTypes: OverrideModuleType): PalletErrorMetadataV14 {
const variants = errors.map(({ docs, name }, index): SiVariant =>
registry.createType('SiVariant', {
docs,
@@ -156,7 +177,7 @@ function convertErrors (registry: Registry, modName: Text, errors: ErrorMetadata
);
return registry.createType('PalletErrorMetadataV14', {
type: variantType(modName, 'Error', registry.compatSpecs, variants)
type: makeVariantType(modName, 'Error', compatTypes, variants)
});
}
@@ -164,14 +185,14 @@ function convertErrors (registry: Registry, modName: Text, errors: ErrorMetadata
* Apply module-specific type overrides (always be done as part of toV14)
* @internal
**/
function convertEvents (registry: Registry, modName: Text, events: EventMetadataV13[], sectionTypes: OverrideModuleType): PalletEventMetadataV14 {
function convertEvents (compatTypes: TypeSpec[], registry: Registry, modName: Text, events: EventMetadataV13[], sectionTypes: OverrideModuleType): PalletEventMetadataV14 {
const variants = events.map(({ args, docs, name }, index): SiVariant => {
setTypeOverride(sectionTypes, args);
return registry.createType('SiVariant', {
docs,
fields: args.map((t) =>
registry.createType('SiField', { type: compatType(registry.compatSpecs, t) })
registry.createType('SiField', { type: compatType(compatTypes, t) })
),
index,
name
@@ -179,20 +200,20 @@ function convertEvents (registry: Registry, modName: Text, events: EventMetadata
});
return registry.createType('PalletEventMetadataV14', {
type: variantType(modName, 'Event', registry.compatSpecs, variants)
type: makeVariantType(modName, 'Event', compatTypes, variants)
});
}
function createMapEntry (registry: Registry, sectionTypes: OverrideModuleType, { hashers, keys, value }: MapDef): StorageEntryTypeV14 {
function createMapEntry (compatTypes: TypeSpec[], registry: Registry, sectionTypes: OverrideModuleType, { hashers, keys, value }: MapDef): StorageEntryTypeV14 {
setTypeOverride(sectionTypes, [value, ...(Array.isArray(keys) ? keys : [keys])]);
return registry.createType('StorageEntryTypeV14', {
Map: {
hashers,
key: hashers.length === 1
? compatType(registry.compatSpecs, keys[0])
: (registry.compatSpecs.push({ def: { Tuple: keys.map((t) => compatType(registry.compatSpecs, t)) } }) - 1),
value: compatType(registry.compatSpecs, value)
? compatType(compatTypes, keys[0])
: makeTupleType(compatTypes, keys.map((t) => compatType(compatTypes, t))),
value: compatType(compatTypes, value)
}
});
}
@@ -201,7 +222,7 @@ function createMapEntry (registry: Registry, sectionTypes: OverrideModuleType, {
* Apply module-specific storage type overrides (always part of toV14)
* @internal
**/
function convertStorage (registry: Registry, { items, prefix }: StorageMetadataV13, sectionTypes: OverrideModuleType): PalletStorageMetadataV14 {
function convertStorage (compatTypes: TypeSpec[], registry: Registry, { items, prefix }: StorageMetadataV13, sectionTypes: OverrideModuleType): PalletStorageMetadataV14 {
return registry.createType('PalletStorageMetadataV14', {
items: items.map(({ docs, fallback, modifier, name, type }): StorageEntryMetadataV14 => {
let entryType: StorageEntryTypeV14;
@@ -212,12 +233,12 @@ function convertStorage (registry: Registry, { items, prefix }: StorageMetadataV
setTypeOverride(sectionTypes, [plain]);
entryType = registry.createType('StorageEntryTypeV14', {
Plain: compatType(registry.compatSpecs, plain)
Plain: compatType(compatTypes, plain)
});
} else if (type.isMap) {
const map = type.asMap;
entryType = createMapEntry(registry, sectionTypes, {
entryType = createMapEntry(compatTypes, registry, sectionTypes, {
hashers: [map.hasher],
keys: [map.key],
value: map.value
@@ -225,7 +246,7 @@ function convertStorage (registry: Registry, { items, prefix }: StorageMetadataV
} else if (type.isDoubleMap) {
const dm = type.asDoubleMap;
entryType = createMapEntry(registry, sectionTypes, {
entryType = createMapEntry(compatTypes, registry, sectionTypes, {
hashers: [dm.hasher, dm.key2Hasher],
keys: [dm.key1, dm.key2],
value: dm.value
@@ -233,7 +254,7 @@ function convertStorage (registry: Registry, { items, prefix }: StorageMetadataV
} else {
const nm = type.asNMap;
entryType = createMapEntry(registry, sectionTypes, {
entryType = createMapEntry(compatTypes, registry, sectionTypes, {
hashers: nm.hashers,
keys: nm.keyVec,
value: nm.value
@@ -266,17 +287,17 @@ function convertExtrinsic (registry: Registry, { signedExtensions, version }: Ex
}
/** @internal */
function createPallet (registry: Registry, mod: ModuleMetadataV13, { calls, constants, errors, events, storage }: { calls: FunctionMetadataV13[] | null, constants: ModuleConstantMetadataV13[], errors: ErrorMetadataV13[] | null, events: EventMetadataV13[] | null, storage: StorageMetadataV13 | null }): PalletMetadataV14 {
function createPallet (compatTypes: TypeSpec[], registry: Registry, mod: ModuleMetadataV13, { calls, constants, errors, events, storage }: { calls: FunctionMetadataV13[] | null, constants: ModuleConstantMetadataV13[], errors: ErrorMetadataV13[] | null, events: EventMetadataV13[] | null, storage: StorageMetadataV13 | null }): PalletMetadataV14 {
const sectionTypes = getModuleTypes(registry, stringCamelCase(mod.name));
return registry.createType('PalletMetadataV14', {
calls: calls && convertCalls(registry, mod.name, calls, sectionTypes),
constants: convertConstants(registry, constants, sectionTypes),
errors: errors && convertErrors(registry, mod.name, errors, sectionTypes),
events: events && convertEvents(registry, mod.name, events, sectionTypes),
calls: calls && convertCalls(compatTypes, registry, mod.name, calls, sectionTypes),
constants: convertConstants(compatTypes, registry, constants, sectionTypes),
errors: errors && convertErrors(compatTypes, registry, mod.name, errors, sectionTypes),
events: events && convertEvents(compatTypes, registry, mod.name, events, sectionTypes),
index: mod.index,
name: mod.name,
storage: storage && convertStorage(registry, storage, sectionTypes)
storage: storage && convertStorage(compatTypes, registry, storage, sectionTypes)
});
}
@@ -285,12 +306,14 @@ function createPallet (registry: Registry, mod: ModuleMetadataV13, { calls, cons
* @internal
**/
export function toV14 (registry: Registry, v13: MetadataV13, metaVersion: number): MetadataV14 {
compatType(registry.compatSpecs, 'Null'); // position 0 always has Null
const compatTypes: TypeSpec[] = [];
compatType(compatTypes, 'Null'); // position 0 always has Null
registerOriginCaller(registry, v13.modules, metaVersion);
const extrinsic = convertExtrinsic(registry, v13.extrinsic);
const pallets = v13.modules.map((mod) =>
createPallet(registry, mod, {
createPallet(compatTypes, registry, mod, {
calls: mod.calls.unwrapOr(null),
constants: mod.constants,
errors: mod.errors.length ? mod.errors : null,
@@ -302,7 +325,7 @@ export function toV14 (registry: Registry, v13: MetadataV13, metaVersion: number
return registry.createType('MetadataV14', {
extrinsic,
lookup: {
types: registry.compatSpecs.map((type, id) =>
types: compatTypes.map((type, id) =>
registry.createType('PortableType', { id, type })
)
},
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/types', version: '6.0.3' };
export const packageInfo = { name: '@polkadot/types', version: '6.1.2' };
+2 -2
View File
@@ -9,6 +9,7 @@ import type { StorageEntry } from './types';
import { assert, isFunction, isString, isU8a } from '@polkadot/util';
import { getSiName } from '../metadata/util';
import { Bytes } from './Bytes';
interface Decoded {
@@ -42,8 +43,7 @@ export function unwrapStorageSi (type: StorageEntryTypeLatest): SiLookupTypeId {
/** @internal */
export function unwrapStorageType (registry: Registry, type: StorageEntryTypeLatest, isOptional?: boolean): keyof InterfaceTypes {
const typeDef = registry.lookup.getTypeDef(unwrapStorageSi(type));
const outputType = typeDef.lookupName || typeDef.type;
const outputType = getSiName(registry.lookup, unwrapStorageSi(type));
return isOptional
? `Option<${outputType}>` as keyof InterfaceTypes
+1 -13
View File
@@ -7,7 +7,7 @@ import type { CreateOptions } from '../create/types';
import type { ExtDef } from '../extrinsic/signedExtensions/types';
import type { MetadataLatest, PortableRegistry } from '../interfaces/metadata';
import type { CodecHash, Hash } from '../interfaces/runtime';
import type { SiField, SiLookupTypeId, SiVariant } from '../interfaces/scaleInfo';
import type { SiField, SiLookupTypeId } from '../interfaces/scaleInfo';
import type { ChainProperties } from '../interfaces/system';
import type { Metadata } from '../metadata';
import type { CallFunction } from './calls';
@@ -47,17 +47,6 @@ export interface RegistryError {
section: string;
}
export interface TypeSpec {
def: {
HistoricMetaCompat?: string;
Tuple?: number[];
Variant?: {
variants: SiVariant[];
}
},
path?: string[];
}
export interface OverrideVersionedType {
// min (v >= min) and max (v <= max)
minmax: [number | undefined | null, number | undefined | null] | [number?, number?] | (number | undefined | null)[];
@@ -123,7 +112,6 @@ export interface Registry {
readonly unknownTypes: string[];
readonly signedExtensions: string[];
compatSpecs: TypeSpec[];
createdAtHash?: Hash;
findMetaCall (callIndex: Uint8Array): CallFunction;
+529 -1262
View File
File diff suppressed because it is too large Load Diff