Compare commits

...
34 Commits
Author SHA1 Message Date
github-actions[bot] e16786a5f6 [CI Skip] release/stable 7.1.1
skip-checks: true
2021-12-26 08:41:55 +00:00
Jaco e388e473be 7.1.1 (#4396)
* 7.1.1

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

* Remove VoidCallback

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

* Adjust CHANGELOG

* Dependencies

* Definitions

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

* Generate all

* Dev dump

* Build kusama/polkadot with no augmentation overlaps

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

* CHANGELOG

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

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

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

* Fix package path

* Adjust CC paths, fix detectPackage

* Adjust rollup config

* Adjust rollup in-process packages

* Re-adjust rollup (OCD...)
2021-12-21 19:02:38 +02:00
github-actions[bot] 2ba4233645 [CI Skip] release/beta 7.0.3-0
skip-checks: true
2021-12-21 11:18:15 +00:00
Keith Ingram a868233c2f Storage deposit limit changes (#4370) 2021-12-21 13:09:37 +02:00
133 changed files with 22730 additions and 1784 deletions
+1
View File
@@ -20,6 +20,7 @@ exclude_patterns:
- "docs/**/*.js"
- "docs/**/*.ts"
- "packages/*-augment/"
- "packages/*-augment-*/"
- "packages/typegen/scripts"
- "packages/typegen/src"
- "packages/types/src/interfaces/"
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-631
View File
File diff suppressed because one or more lines are too long
+768
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -10,4 +10,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs
spec: "@yarnpkg/plugin-version"
yarnPath: .yarn/releases/yarn-3.0.1.cjs
yarnPath: .yarn/releases/yarn-3.1.1.cjs
+18
View File
@@ -1,5 +1,23 @@
# CHANGELOG
## 7.1.1 Dev 26, 2021
Upgrade priority: Low. Recommended for users of contracts form Substrate master & Polkador/Kusama TS app developers where specific chain augmentation would be helpful.
Contributed:
- Expose `storageDepositLimit` on contract options (Thanks to https://github.com/kwingram25)
Changes:
- Expose `@polkadot/api-augment/{kusama, polkadot, substrate}` for specific augmentations (The bare `@polkadot/api-augment` is equivalent to `/substrate`, keeping the existing behavior)
- Expose `@polkadot/types-augment/{lookup, registry}` variants (The bare `@polkadot/types-augment` applies both)
- Expose `txHash` on submittable results, e.g. `tx.signAndSend(..., ({ txHash }) => ...)`
- Align casing for TS & exposed queries (adjusts for `ALLCAPS` entries)
- Additional tests for `Option` codec (explicit in expectations)
- Update to latest Substrate, Kusama & Polkadot static metadata
## 7.0.2 Dec 21, 2021
Upgrade priority: Low. Recommended for applications where collective derives with aliasses are being used.
+1 -1
View File
@@ -11,7 +11,7 @@ module.exports = {
'@polkadot/api(.*)$': '<rootDir>/packages/api/src/$1',
'@polkadot/rpc-(augment|core|provider)(.*)$': '<rootDir>/packages/rpc-$1/src/$2',
'@polkadot/typegen(.*)$': '<rootDir>/packages/typegen/src/$1',
'@polkadot/types-(augment|codec|create|known|support)(.*)$': '<rootDir>/packages/types-$1/src/$2',
'@polkadot/types-(augment-lookup|augment-registry|augment|codec|create|known|support)(.*)$': '<rootDir>/packages/types-$1/src/$2',
// eslint-disable-next-line sort-keys
'@polkadot/types(.*)$': '<rootDir>/packages/types/src/$1'
},
+2 -3
View File
@@ -11,7 +11,7 @@
},
"sideEffects": false,
"type": "commonjs",
"version": "7.0.2",
"version": "7.1.1",
"workspaces": [
"packages/*"
],
@@ -34,8 +34,7 @@
"@babel/core": "^7.16.5",
"@babel/register": "^7.16.5",
"@babel/runtime": "^7.16.5",
"@polkadot/dev": "^0.64.11",
"@polkadot/ts": "^0.4.20",
"@polkadot/dev": "^0.64.22",
"@polkadot/typegen": "workspace:packages/typegen",
"@types/jest": "^27.0.3",
"copyfiles": "^2.4.1"
+6 -6
View File
@@ -20,15 +20,15 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.0.2",
"version": "7.1.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/api-base": "7.0.2",
"@polkadot/rpc-augment": "7.0.2",
"@polkadot/types": "7.0.2",
"@polkadot/types-augment": "7.0.2",
"@polkadot/types-codec": "7.0.2",
"@polkadot/api-base": "7.1.1",
"@polkadot/rpc-augment": "7.1.1",
"@polkadot/types": "7.1.1",
"@polkadot/types-augment": "7.1.1",
"@polkadot/types-codec": "7.1.1",
"@polkadot/util": "^8.2.2"
}
}
@@ -4,9 +4,3 @@
// for the API, we decorate not only the endpoints, but all types
import '@polkadot/rpc-augment';
import '@polkadot/types-augment';
// the augmentated types (on top of @polkadot/api-base)
import './consts';
import './errors';
import './events';
import './query';
import './tx';
+1 -1
View File
@@ -1,6 +1,6 @@
// Copyright 2017-2021 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import './augment';
import './substrate';
export { packageInfo } from './packageInfo';
+896
View File
@@ -0,0 +1,896 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
import type { ApiTypes } from '@polkadot/api-base/types';
import type { Bytes, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { Codec } from '@polkadot/types-codec/types';
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
declare module '@polkadot/api-base/types/consts' {
export interface AugmentedConsts<ApiType extends ApiTypes> {
auctions: {
/**
* The number of blocks over which an auction may be retroactively ended.
**/
endingPeriod: u32 & AugmentedConst<ApiType>;
leasePeriodsPerSlot: u32 & AugmentedConst<ApiType>;
/**
* The length of each sample to take during the ending period.
*
* `EndingPeriod` / `SampleLength` = Total # of Samples
**/
sampleLength: u32 & AugmentedConst<ApiType>;
slotRangeCount: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
authorship: {
/**
* The number of blocks back we should accept uncles.
* This means that we will deal with uncle-parents that are
* `UncleGenerations + 1` before `now`.
**/
uncleGenerations: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
babe: {
/**
* The amount of time, in slots, that each epoch should last.
* NOTE: Currently it is not possible to change the epoch duration after
* the chain has started. Attempting to do so will brick block production.
**/
epochDuration: u64 & AugmentedConst<ApiType>;
/**
* The expected average block time at which BABE should be creating
* blocks. Since BABE is probabilistic it is not trivial to figure out
* what the expected average block time should be based on the slot
* duration and the security parameter `c` (where `1 - c` represents
* the probability of a slot being empty).
**/
expectedBlockTime: u64 & AugmentedConst<ApiType>;
/**
* Max number of authorities allowed
**/
maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
bagsList: {
/**
* The list of thresholds separating the various bags.
*
* Ids are separated into unsorted bags according to their vote weight. This specifies the
* thresholds separating the bags. An id's bag is the largest bag for which the id's weight
* is less than or equal to its upper threshold.
*
* When ids are iterated, higher bags are iterated completely before lower bags. This means
* that iteration is _semi-sorted_: ids of higher weight tend to come before ids of lower
* weight, but peer ids within a particular bag are sorted in insertion order.
*
* # Expressing the constant
*
* This constant must be sorted in strictly increasing order. Duplicate items are not
* permitted.
*
* There is an implied upper limit of `VoteWeight::MAX`; that value does not need to be
* specified within the bag. For any two threshold lists, if one ends with
* `VoteWeight::MAX`, the other one does not, and they are otherwise equal, the two lists
* will behave identically.
*
* # Calculation
*
* It is recommended to generate the set of thresholds in a geometric series, such that
* there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *
* constant_ratio).max(threshold[k] + 1)` for all `k`.
*
* The helpers in the `/utils/frame/generate-bags` module can simplify this calculation.
*
* # Examples
*
* - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and
* iteration is strictly in insertion order.
* - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to
* the procedure given above, then the constant ratio is equal to 2.
* - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to
* the procedure given above, then the constant ratio is approximately equal to 1.248.
* - If the threshold list begins `[1, 2, 3, ...]`, then an id with weight 0 or 1 will fall
* into bag 0, an id with weight 2 will fall into bag 1, etc.
*
* # Migration
*
* In the event that this list ever changes, a copy of the old bags list must be retained.
* With that `List::migrate` can be called, which will perform the appropriate migration.
**/
bagThresholds: Vec<u64> & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
balances: {
/**
* The minimum amount required to keep an account open.
**/
existentialDeposit: u128 & AugmentedConst<ApiType>;
/**
* The maximum number of locks that should exist on an account.
* Not strictly enforced, but used for weight estimation.
**/
maxLocks: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of named reserves that can exist on an account.
**/
maxReserves: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
bounties: {
/**
* Percentage of the curator fee that will be reserved upfront as deposit for bounty
* curator.
**/
bountyCuratorDeposit: Permill & AugmentedConst<ApiType>;
/**
* The amount held on deposit for placing a bounty proposal.
**/
bountyDepositBase: u128 & AugmentedConst<ApiType>;
/**
* The delay period for which a bounty beneficiary need to wait before claim the payout.
**/
bountyDepositPayoutDelay: u32 & AugmentedConst<ApiType>;
/**
* Bounty duration in blocks.
**/
bountyUpdatePeriod: u32 & AugmentedConst<ApiType>;
/**
* Minimum value for a bounty.
**/
bountyValueMinimum: u128 & AugmentedConst<ApiType>;
/**
* The amount held on deposit per byte within the tip report reason or bounty description.
**/
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
/**
* Maximum acceptable reason length.
*
* Benchmarks depend on this value, be sure to update weights file when changing this value
**/
maximumReasonLength: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
claims: {
prefix: Bytes & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
crowdloan: {
/**
* The minimum amount that may be contributed into a crowdloan. Should almost certainly be at
* least `ExistentialDeposit`.
**/
minContribution: u128 & AugmentedConst<ApiType>;
/**
* `PalletId` for the crowdloan pallet. An appropriate value could be `PalletId(*b"py/cfund")`
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* Max number of storage keys to remove per extrinsic call.
**/
removeKeysLimit: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
democracy: {
/**
* Period in blocks where an external proposal may not be re-submitted after being vetoed.
**/
cooloffPeriod: u32 & AugmentedConst<ApiType>;
/**
* The period between a proposal being approved and enacted.
*
* It should generally be a little more than the unstake period to ensure that
* voting stakers have an opportunity to remove themselves from the system in the case
* where they are on the losing side of a vote.
**/
enactmentPeriod: u32 & AugmentedConst<ApiType>;
/**
* Minimum voting period allowed for a fast-track referendum.
**/
fastTrackVotingPeriod: u32 & AugmentedConst<ApiType>;
/**
* Indicator for whether an emergency origin is even allowed to happen. Some chains may
* want to set this permanently to `false`, others may want to condition it on things such
* as an upgrade having happened recently.
**/
instantAllowed: bool & AugmentedConst<ApiType>;
/**
* How often (in blocks) new public referenda are launched.
**/
launchPeriod: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of public proposals that can exist at any time.
**/
maxProposals: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of votes for an account.
*
* Also used to compute weight, an overly big value can
* lead to extrinsic with very big weight: see `delegate` for instance.
**/
maxVotes: u32 & AugmentedConst<ApiType>;
/**
* The minimum amount to be used as a deposit for a public referendum proposal.
**/
minimumDeposit: u128 & AugmentedConst<ApiType>;
/**
* The amount of balance that must be deposited per byte of preimage stored.
**/
preimageByteDeposit: u128 & AugmentedConst<ApiType>;
/**
* The minimum period of vote locking.
*
* It should be no shorter than enactment period to ensure that in the case of an approval,
* those successful voters are locked into the consequences that their votes entail.
**/
voteLockingPeriod: u32 & AugmentedConst<ApiType>;
/**
* How often (in blocks) to check for new votes.
**/
votingPeriod: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
electionProviderMultiPhase: {
/**
* Maximum length (bytes) that the mined solution should consume.
*
* The miner will ensure that the total length of the unsigned solution will not exceed
* this value.
**/
minerMaxLength: u32 & AugmentedConst<ApiType>;
/**
* Maximum weight that the miner should consume.
*
* The miner will ensure that the total weight of the unsigned solution will not exceed
* this value, based on [`WeightInfo::submit_unsigned`].
**/
minerMaxWeight: u64 & AugmentedConst<ApiType>;
/**
* The priority of the unsigned transaction submitted in the unsigned-phase
**/
minerTxPriority: u64 & AugmentedConst<ApiType>;
/**
* The repeat threshold of the offchain worker.
*
* For example, if it is 5, that means that at least 5 blocks will elapse between attempts
* to submit the worker's solution.
**/
offchainRepeat: u32 & AugmentedConst<ApiType>;
/**
* Base deposit for a signed solution.
**/
signedDepositBase: u128 & AugmentedConst<ApiType>;
/**
* Per-byte deposit for a signed solution.
**/
signedDepositByte: u128 & AugmentedConst<ApiType>;
/**
* Per-weight deposit for a signed solution.
**/
signedDepositWeight: u128 & AugmentedConst<ApiType>;
/**
* Maximum number of signed submissions that can be queued.
*
* It is best to avoid adjusting this during an election, as it impacts downstream data
* structures. In particular, `SignedSubmissionIndices<T>` is bounded on this value. If you
* update this value during an election, you _must_ ensure that
* `SignedSubmissionIndices.len()` is less than or equal to the new value. Otherwise,
* attempts to submit new solutions may cause a runtime panic.
**/
signedMaxSubmissions: u32 & AugmentedConst<ApiType>;
/**
* Maximum weight of a signed solution.
*
* This should probably be similar to [`Config::MinerMaxWeight`].
**/
signedMaxWeight: u64 & AugmentedConst<ApiType>;
/**
* Duration of the signed phase.
**/
signedPhase: u32 & AugmentedConst<ApiType>;
/**
* Base reward for a signed solution
**/
signedRewardBase: u128 & AugmentedConst<ApiType>;
/**
* The minimum amount of improvement to the solution score that defines a solution as
* "better" (in any phase).
**/
solutionImprovementThreshold: Perbill & AugmentedConst<ApiType>;
/**
* Duration of the unsigned phase.
**/
unsignedPhase: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of voters to put in the snapshot. At the moment, snapshots are only
* over a single block, but once multi-block elections are introduced they will take place
* over multiple blocks.
*
* Also, note the data type: If the voters are represented by a `u32` in `type
* CompactSolution`, the same `u32` is used here to ensure bounds are respected.
**/
voterSnapshotPerBlock: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
gilt: {
/**
* Portion of the queue which is free from ordering and just a FIFO.
*
* Must be no greater than `MaxQueueLen`.
**/
fifoQueueLen: u32 & AugmentedConst<ApiType>;
/**
* The number of blocks between consecutive attempts to issue more gilts in an effort to
* get to the target amount to be frozen.
*
* A larger value results in fewer storage hits each block, but a slower period to get to
* the target.
**/
intakePeriod: u32 & AugmentedConst<ApiType>;
/**
* The maximum amount of bids that can be turned into issued gilts each block. A larger
* value here means less of the block available for transactions should there be a glut of
* bids to make into gilts to reach the target.
**/
maxIntakeBids: u32 & AugmentedConst<ApiType>;
/**
* Maximum number of items that may be in each duration queue.
**/
maxQueueLen: u32 & AugmentedConst<ApiType>;
/**
* The minimum amount of funds that may be offered to freeze for a gilt. Note that this
* does not actually limit the amount which may be frozen in a gilt since gilts may be
* split up in order to satisfy the desired amount of funds under gilts.
*
* It should be at least big enough to ensure that there is no possible storage spam attack
* or queue-filling attack.
**/
minFreeze: u128 & AugmentedConst<ApiType>;
/**
* The base period for the duration queues. This is the common multiple across all
* supported freezing durations that can be bid upon.
**/
period: u32 & AugmentedConst<ApiType>;
/**
* Number of duration queues in total. This sets the maximum duration supported, which is
* this value multiplied by `Period`.
**/
queueCount: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
grandpa: {
/**
* Max Authorities in use
**/
maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
identity: {
/**
* The amount held on deposit for a registered identity
**/
basicDeposit: u128 & AugmentedConst<ApiType>;
/**
* The amount held on deposit per additional field for a registered identity.
**/
fieldDeposit: u128 & AugmentedConst<ApiType>;
/**
* Maximum number of additional fields that may be stored in an ID. Needed to bound the I/O
* required to access an identity, but can be pretty high.
**/
maxAdditionalFields: u32 & AugmentedConst<ApiType>;
/**
* Maxmimum number of registrars allowed in the system. Needed to bound the complexity
* of, e.g., updating judgements.
**/
maxRegistrars: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of sub-accounts allowed per identified account.
**/
maxSubAccounts: u32 & AugmentedConst<ApiType>;
/**
* The amount held on deposit for a registered subaccount. This should account for the fact
* that one storage item's value will increase by the size of an account ID, and there will
* be another trie item whose value is the size of an account ID plus 32 bytes.
**/
subAccountDeposit: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
imOnline: {
/**
* A configuration for base priority of unsigned transactions.
*
* This is exposed so that it can be tuned for particular runtime, when
* multiple pallets send unsigned transactions.
**/
unsignedPriority: u64 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
indices: {
/**
* The deposit needed for reserving an index.
**/
deposit: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
multisig: {
/**
* The base amount of currency needed to reserve for creating a multisig execution or to
* store a dispatch call for later.
*
* This is held for an additional storage item whose value size is
* `4 + sizeof((BlockNumber, Balance, AccountId))` bytes and whose key size is
* `32 + sizeof(AccountId)` bytes.
**/
depositBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of currency needed per unit threshold when creating a multisig execution.
*
* This is held for adding 32 bytes more into a pre-existing storage value.
**/
depositFactor: u128 & AugmentedConst<ApiType>;
/**
* The maximum amount of signatories allowed in the multisig.
**/
maxSignatories: u16 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
paras: {
unsignedPriority: u64 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
phragmenElection: {
/**
* How much should be locked up in order to submit one's candidacy.
**/
candidacyBond: u128 & AugmentedConst<ApiType>;
/**
* Number of members to elect.
**/
desiredMembers: u32 & AugmentedConst<ApiType>;
/**
* Number of runners_up to keep.
**/
desiredRunnersUp: u32 & AugmentedConst<ApiType>;
/**
* Identifier for the elections-phragmen pallet's lock
**/
palletId: U8aFixed & AugmentedConst<ApiType>;
/**
* How long each seat is kept. This defines the next block number at which an election
* round will happen. If set to zero, no elections are ever triggered and the module will
* be in passive mode.
**/
termDuration: u32 & AugmentedConst<ApiType>;
/**
* Base deposit associated with voting.
*
* This should be sensibly high to economically ensure the pallet cannot be attacked by
* creating a gigantic number of votes.
**/
votingBondBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of bond that need to be locked for each vote (32 bytes).
**/
votingBondFactor: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
proxy: {
/**
* The base amount of currency needed to reserve for creating an announcement.
*
* This is held when a new storage item holding a `Balance` is created (typically 16
* bytes).
**/
announcementDepositBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of currency needed per announcement made.
*
* This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes)
* into a pre-existing storage value.
**/
announcementDepositFactor: u128 & AugmentedConst<ApiType>;
/**
* The maximum amount of time-delayed announcements that are allowed to be pending.
**/
maxPending: u32 & AugmentedConst<ApiType>;
/**
* The maximum amount of proxies allowed for a single account.
**/
maxProxies: u32 & AugmentedConst<ApiType>;
/**
* The base amount of currency needed to reserve for creating a proxy.
*
* This is held for an additional storage item whose value size is
* `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes.
**/
proxyDepositBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of currency needed per proxy added.
*
* This is held for adding 32 bytes plus an instance of `ProxyType` more into a
* pre-existing storage value. Thus, when configuring `ProxyDepositFactor` one should take
* into account `32 + proxy_type.encode().len()` bytes of data.
**/
proxyDepositFactor: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
recovery: {
/**
* The base amount of currency needed to reserve for creating a recovery configuration.
*
* This is held for an additional storage item whose value size is
* `2 + sizeof(BlockNumber, Balance)` bytes.
**/
configDepositBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of currency needed per additional user when creating a recovery
* configuration.
*
* This is held for adding `sizeof(AccountId)` bytes more into a pre-existing storage
* value.
**/
friendDepositFactor: u128 & AugmentedConst<ApiType>;
/**
* The maximum amount of friends allowed in a recovery configuration.
**/
maxFriends: u16 & AugmentedConst<ApiType>;
/**
* The base amount of currency needed to reserve for starting a recovery.
*
* This is primarily held for deterring malicious recovery attempts, and should
* have a value large enough that a bad actor would choose not to place this
* deposit. It also acts to fund additional storage item whose value size is
* `sizeof(BlockNumber, Balance + T * AccountId)` bytes. Where T is a configurable
* threshold.
**/
recoveryDeposit: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
registrar: {
/**
* The deposit to be paid per byte stored on chain.
**/
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
/**
* The deposit to be paid to run a parathread.
* This should include the cost for storing the genesis head and validation code.
**/
paraDeposit: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
scheduler: {
/**
* The maximum weight that may be scheduled per block for any dispatchables of less
* priority than `schedule::HARD_DEADLINE`.
**/
maximumWeight: u64 & AugmentedConst<ApiType>;
/**
* The maximum number of scheduled calls in the queue for a single block.
* Not strictly enforced, but used for weight estimation.
**/
maxScheduledPerBlock: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
slots: {
/**
* The number of blocks to offset each lease period by.
**/
leaseOffset: u32 & AugmentedConst<ApiType>;
/**
* The number of blocks over which a single period lasts.
**/
leasePeriod: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
society: {
/**
* The minimum amount of a deposit required for a bid to be made.
**/
candidateDeposit: u128 & AugmentedConst<ApiType>;
/**
* The number of blocks between membership challenges.
**/
challengePeriod: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of candidates that we accept per round.
**/
maxCandidateIntake: u32 & AugmentedConst<ApiType>;
/**
* The maximum duration of the payout lock.
**/
maxLockDuration: u32 & AugmentedConst<ApiType>;
/**
* The number of times a member may vote the wrong way (or not at all, when they are a
* skeptic) before they become suspended.
**/
maxStrikes: u32 & AugmentedConst<ApiType>;
/**
* The societies's pallet id
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* The amount of incentive paid within each period. Doesn't include VoterTip.
**/
periodSpend: u128 & AugmentedConst<ApiType>;
/**
* The number of blocks between candidate/membership rotation periods.
**/
rotationPeriod: u32 & AugmentedConst<ApiType>;
/**
* The amount of the unpaid reward that gets deducted in the case that either a skeptic
* doesn't vote or someone votes in the wrong way.
**/
wrongSideDeduction: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
staking: {
/**
* Number of eras that staked funds must remain bonded for.
**/
bondingDuration: u32 & AugmentedConst<ApiType>;
maxNominations: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of nominators rewarded for each validator.
*
* For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can
* claim their reward. This used to limit the i/o cost for the nominator payout.
**/
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
/**
* Number of sessions per era.
**/
sessionsPerEra: u32 & AugmentedConst<ApiType>;
/**
* Number of eras that slashes are deferred by, after computation.
*
* This should be less than the bonding duration. Set to 0 if slashes
* should be applied immediately, without opportunity for intervention.
**/
slashDeferDuration: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
system: {
/**
* Maximum number of block number to block hash mappings to keep (oldest pruned first).
**/
blockHashCount: u32 & AugmentedConst<ApiType>;
/**
* The maximum length of a block (in bytes).
**/
blockLength: FrameSystemLimitsBlockLength & AugmentedConst<ApiType>;
/**
* Block & extrinsics weights: base values and limits.
**/
blockWeights: FrameSystemLimitsBlockWeights & AugmentedConst<ApiType>;
/**
* The weight of runtime database operations the runtime can invoke.
**/
dbWeight: FrameSupportWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
/**
* The designated SS85 prefix of this chain.
*
* This replaces the "ss58Format" property declared in the chain spec. Reason is
* that the runtime should know about the prefix in order to make use of it as
* an identifier of the chain.
**/
ss58Prefix: u16 & AugmentedConst<ApiType>;
/**
* Get the chain's current version.
**/
version: SpVersionRuntimeVersion & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
timestamp: {
/**
* The minimum period between blocks. Beware that this is different to the *expected*
* period that the block production apparatus provides. Your chosen consensus system will
* generally work with this to determine a sensible block time. e.g. For Aura, it will be
* double this period on default settings.
**/
minimumPeriod: u64 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
tips: {
/**
* The amount held on deposit per byte within the tip report reason or bounty description.
**/
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
/**
* Maximum acceptable reason length.
*
* Benchmarks depend on this value, be sure to update weights file when changing this value
**/
maximumReasonLength: u32 & AugmentedConst<ApiType>;
/**
* The period for which a tip remains open after is has achieved threshold tippers.
**/
tipCountdown: u32 & AugmentedConst<ApiType>;
/**
* The percent of the final tip which goes to the original reporter of the tip.
**/
tipFindersFee: Percent & AugmentedConst<ApiType>;
/**
* The amount held on deposit for placing a tip report.
**/
tipReportDepositBase: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
transactionPayment: {
/**
* A fee mulitplier for `Operational` extrinsics to compute "virtual tip" to boost their
* `priority`
*
* This value is multipled by the `final_fee` to obtain a "virtual tip" that is later
* added to a tip component in regular `priority` calculations.
* It means that a `Normal` transaction can front-run a similarly-sized `Operational`
* extrinsic (with no tip), by including a tip value greater than the virtual tip.
*
* ```rust,ignore
* // For `Normal`
* let priority = priority_calc(tip);
*
* // For `Operational`
* let virtual_tip = (inclusion_fee + tip) * OperationalFeeMultiplier;
* let priority = priority_calc(tip + virtual_tip);
* ```
*
* Note that since we use `final_fee` the multiplier applies also to the regular `tip`
* sent with the transaction. So, not only does the transaction get a priority bump based
* on the `inclusion_fee`, but we also amplify the impact of tips applied to `Operational`
* transactions.
**/
operationalFeeMultiplier: u8 & AugmentedConst<ApiType>;
/**
* The fee to be paid for making a transaction; the per-byte portion.
**/
transactionByteFee: u128 & AugmentedConst<ApiType>;
/**
* The polynomial that is applied in order to derive fee from weight.
**/
weightToFee: Vec<FrameSupportWeightsWeightToFeeCoefficient> & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
treasury: {
/**
* Percentage of spare funds (if any) that are burnt per spend period.
**/
burn: Permill & AugmentedConst<ApiType>;
/**
* The maximum number of approvals that can wait in the spending queue.
**/
maxApprovals: u32 & AugmentedConst<ApiType>;
/**
* The treasury's pallet id, used for deriving its sovereign account ID.
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* Fraction of a proposal's value that should be bonded in order to place the proposal.
* An accepted proposal gets these back. A rejected proposal does not.
**/
proposalBond: Permill & AugmentedConst<ApiType>;
/**
* Minimum amount of funds that should be placed in a deposit for making a proposal.
**/
proposalBondMinimum: u128 & AugmentedConst<ApiType>;
/**
* Period between successive spends.
**/
spendPeriod: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
utility: {
/**
* The limit on the number of batched calls.
**/
batchedCallsLimit: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
vesting: {
maxVestingSchedules: u32 & AugmentedConst<ApiType>;
/**
* The minimum amount transferred to call `vested_transfer`.
**/
minVestedTransfer: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
} // AugmentedConsts
} // declare module
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+9
View File
@@ -0,0 +1,9 @@
// Copyright 2017-2021 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '../base';
import './consts';
import './errors';
import './events';
import './query';
import './tx';
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api-augment', version: '7.0.2' };
export const packageInfo = { name: '@polkadot/api-augment', version: '7.1.1' };
+768
View File
@@ -0,0 +1,768 @@
// Auto-generated via `yarn polkadot-types-from-chain`, do not edit
/* eslint-disable */
import type { ApiTypes } from '@polkadot/api-base/types';
import type { Bytes, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
import type { Codec } from '@polkadot/types-codec/types';
import type { Perbill, Percent, Permill } from '@polkadot/types/interfaces/runtime';
import type { FrameSupportPalletId, FrameSupportWeightsRuntimeDbWeight, FrameSupportWeightsWeightToFeeCoefficient, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpVersionRuntimeVersion } from '@polkadot/types/lookup';
declare module '@polkadot/api-base/types/consts' {
export interface AugmentedConsts<ApiType extends ApiTypes> {
auctions: {
/**
* The number of blocks over which an auction may be retroactively ended.
**/
endingPeriod: u32 & AugmentedConst<ApiType>;
leasePeriodsPerSlot: u32 & AugmentedConst<ApiType>;
/**
* The length of each sample to take during the ending period.
*
* `EndingPeriod` / `SampleLength` = Total # of Samples
**/
sampleLength: u32 & AugmentedConst<ApiType>;
slotRangeCount: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
authorship: {
/**
* The number of blocks back we should accept uncles.
* This means that we will deal with uncle-parents that are
* `UncleGenerations + 1` before `now`.
**/
uncleGenerations: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
babe: {
/**
* The amount of time, in slots, that each epoch should last.
* NOTE: Currently it is not possible to change the epoch duration after
* the chain has started. Attempting to do so will brick block production.
**/
epochDuration: u64 & AugmentedConst<ApiType>;
/**
* The expected average block time at which BABE should be creating
* blocks. Since BABE is probabilistic it is not trivial to figure out
* what the expected average block time should be based on the slot
* duration and the security parameter `c` (where `1 - c` represents
* the probability of a slot being empty).
**/
expectedBlockTime: u64 & AugmentedConst<ApiType>;
/**
* Max number of authorities allowed
**/
maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
bagsList: {
/**
* The list of thresholds separating the various bags.
*
* Ids are separated into unsorted bags according to their vote weight. This specifies the
* thresholds separating the bags. An id's bag is the largest bag for which the id's weight
* is less than or equal to its upper threshold.
*
* When ids are iterated, higher bags are iterated completely before lower bags. This means
* that iteration is _semi-sorted_: ids of higher weight tend to come before ids of lower
* weight, but peer ids within a particular bag are sorted in insertion order.
*
* # Expressing the constant
*
* This constant must be sorted in strictly increasing order. Duplicate items are not
* permitted.
*
* There is an implied upper limit of `VoteWeight::MAX`; that value does not need to be
* specified within the bag. For any two threshold lists, if one ends with
* `VoteWeight::MAX`, the other one does not, and they are otherwise equal, the two lists
* will behave identically.
*
* # Calculation
*
* It is recommended to generate the set of thresholds in a geometric series, such that
* there exists some constant ratio such that `threshold[k + 1] == (threshold[k] *
* constant_ratio).max(threshold[k] + 1)` for all `k`.
*
* The helpers in the `/utils/frame/generate-bags` module can simplify this calculation.
*
* # Examples
*
* - If `BagThresholds::get().is_empty()`, then all ids are put into the same bag, and
* iteration is strictly in insertion order.
* - If `BagThresholds::get().len() == 64`, and the thresholds are determined according to
* the procedure given above, then the constant ratio is equal to 2.
* - If `BagThresholds::get().len() == 200`, and the thresholds are determined according to
* the procedure given above, then the constant ratio is approximately equal to 1.248.
* - If the threshold list begins `[1, 2, 3, ...]`, then an id with weight 0 or 1 will fall
* into bag 0, an id with weight 2 will fall into bag 1, etc.
*
* # Migration
*
* In the event that this list ever changes, a copy of the old bags list must be retained.
* With that `List::migrate` can be called, which will perform the appropriate migration.
**/
bagThresholds: Vec<u64> & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
balances: {
/**
* The minimum amount required to keep an account open.
**/
existentialDeposit: u128 & AugmentedConst<ApiType>;
/**
* The maximum number of locks that should exist on an account.
* Not strictly enforced, but used for weight estimation.
**/
maxLocks: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of named reserves that can exist on an account.
**/
maxReserves: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
bounties: {
/**
* Percentage of the curator fee that will be reserved upfront as deposit for bounty
* curator.
**/
bountyCuratorDeposit: Permill & AugmentedConst<ApiType>;
/**
* The amount held on deposit for placing a bounty proposal.
**/
bountyDepositBase: u128 & AugmentedConst<ApiType>;
/**
* The delay period for which a bounty beneficiary need to wait before claim the payout.
**/
bountyDepositPayoutDelay: u32 & AugmentedConst<ApiType>;
/**
* Bounty duration in blocks.
**/
bountyUpdatePeriod: u32 & AugmentedConst<ApiType>;
/**
* Minimum value for a bounty.
**/
bountyValueMinimum: u128 & AugmentedConst<ApiType>;
/**
* The amount held on deposit per byte within the tip report reason or bounty description.
**/
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
/**
* Maximum acceptable reason length.
*
* Benchmarks depend on this value, be sure to update weights file when changing this value
**/
maximumReasonLength: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
claims: {
prefix: Bytes & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
crowdloan: {
/**
* The minimum amount that may be contributed into a crowdloan. Should almost certainly be at
* least `ExistentialDeposit`.
**/
minContribution: u128 & AugmentedConst<ApiType>;
/**
* `PalletId` for the crowdloan pallet. An appropriate value could be `PalletId(*b"py/cfund")`
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* Max number of storage keys to remove per extrinsic call.
**/
removeKeysLimit: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
democracy: {
/**
* Period in blocks where an external proposal may not be re-submitted after being vetoed.
**/
cooloffPeriod: u32 & AugmentedConst<ApiType>;
/**
* The period between a proposal being approved and enacted.
*
* It should generally be a little more than the unstake period to ensure that
* voting stakers have an opportunity to remove themselves from the system in the case
* where they are on the losing side of a vote.
**/
enactmentPeriod: u32 & AugmentedConst<ApiType>;
/**
* Minimum voting period allowed for a fast-track referendum.
**/
fastTrackVotingPeriod: u32 & AugmentedConst<ApiType>;
/**
* Indicator for whether an emergency origin is even allowed to happen. Some chains may
* want to set this permanently to `false`, others may want to condition it on things such
* as an upgrade having happened recently.
**/
instantAllowed: bool & AugmentedConst<ApiType>;
/**
* How often (in blocks) new public referenda are launched.
**/
launchPeriod: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of public proposals that can exist at any time.
**/
maxProposals: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of votes for an account.
*
* Also used to compute weight, an overly big value can
* lead to extrinsic with very big weight: see `delegate` for instance.
**/
maxVotes: u32 & AugmentedConst<ApiType>;
/**
* The minimum amount to be used as a deposit for a public referendum proposal.
**/
minimumDeposit: u128 & AugmentedConst<ApiType>;
/**
* The amount of balance that must be deposited per byte of preimage stored.
**/
preimageByteDeposit: u128 & AugmentedConst<ApiType>;
/**
* The minimum period of vote locking.
*
* It should be no shorter than enactment period to ensure that in the case of an approval,
* those successful voters are locked into the consequences that their votes entail.
**/
voteLockingPeriod: u32 & AugmentedConst<ApiType>;
/**
* How often (in blocks) to check for new votes.
**/
votingPeriod: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
electionProviderMultiPhase: {
/**
* Maximum length (bytes) that the mined solution should consume.
*
* The miner will ensure that the total length of the unsigned solution will not exceed
* this value.
**/
minerMaxLength: u32 & AugmentedConst<ApiType>;
/**
* Maximum weight that the miner should consume.
*
* The miner will ensure that the total weight of the unsigned solution will not exceed
* this value, based on [`WeightInfo::submit_unsigned`].
**/
minerMaxWeight: u64 & AugmentedConst<ApiType>;
/**
* The priority of the unsigned transaction submitted in the unsigned-phase
**/
minerTxPriority: u64 & AugmentedConst<ApiType>;
/**
* The repeat threshold of the offchain worker.
*
* For example, if it is 5, that means that at least 5 blocks will elapse between attempts
* to submit the worker's solution.
**/
offchainRepeat: u32 & AugmentedConst<ApiType>;
/**
* Base deposit for a signed solution.
**/
signedDepositBase: u128 & AugmentedConst<ApiType>;
/**
* Per-byte deposit for a signed solution.
**/
signedDepositByte: u128 & AugmentedConst<ApiType>;
/**
* Per-weight deposit for a signed solution.
**/
signedDepositWeight: u128 & AugmentedConst<ApiType>;
/**
* Maximum number of signed submissions that can be queued.
*
* It is best to avoid adjusting this during an election, as it impacts downstream data
* structures. In particular, `SignedSubmissionIndices<T>` is bounded on this value. If you
* update this value during an election, you _must_ ensure that
* `SignedSubmissionIndices.len()` is less than or equal to the new value. Otherwise,
* attempts to submit new solutions may cause a runtime panic.
**/
signedMaxSubmissions: u32 & AugmentedConst<ApiType>;
/**
* Maximum weight of a signed solution.
*
* This should probably be similar to [`Config::MinerMaxWeight`].
**/
signedMaxWeight: u64 & AugmentedConst<ApiType>;
/**
* Duration of the signed phase.
**/
signedPhase: u32 & AugmentedConst<ApiType>;
/**
* Base reward for a signed solution
**/
signedRewardBase: u128 & AugmentedConst<ApiType>;
/**
* The minimum amount of improvement to the solution score that defines a solution as
* "better" (in any phase).
**/
solutionImprovementThreshold: Perbill & AugmentedConst<ApiType>;
/**
* Duration of the unsigned phase.
**/
unsignedPhase: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of voters to put in the snapshot. At the moment, snapshots are only
* over a single block, but once multi-block elections are introduced they will take place
* over multiple blocks.
*
* Also, note the data type: If the voters are represented by a `u32` in `type
* CompactSolution`, the same `u32` is used here to ensure bounds are respected.
**/
voterSnapshotPerBlock: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
grandpa: {
/**
* Max Authorities in use
**/
maxAuthorities: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
identity: {
/**
* The amount held on deposit for a registered identity
**/
basicDeposit: u128 & AugmentedConst<ApiType>;
/**
* The amount held on deposit per additional field for a registered identity.
**/
fieldDeposit: u128 & AugmentedConst<ApiType>;
/**
* Maximum number of additional fields that may be stored in an ID. Needed to bound the I/O
* required to access an identity, but can be pretty high.
**/
maxAdditionalFields: u32 & AugmentedConst<ApiType>;
/**
* Maxmimum number of registrars allowed in the system. Needed to bound the complexity
* of, e.g., updating judgements.
**/
maxRegistrars: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of sub-accounts allowed per identified account.
**/
maxSubAccounts: u32 & AugmentedConst<ApiType>;
/**
* The amount held on deposit for a registered subaccount. This should account for the fact
* that one storage item's value will increase by the size of an account ID, and there will
* be another trie item whose value is the size of an account ID plus 32 bytes.
**/
subAccountDeposit: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
imOnline: {
/**
* A configuration for base priority of unsigned transactions.
*
* This is exposed so that it can be tuned for particular runtime, when
* multiple pallets send unsigned transactions.
**/
unsignedPriority: u64 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
indices: {
/**
* The deposit needed for reserving an index.
**/
deposit: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
multisig: {
/**
* The base amount of currency needed to reserve for creating a multisig execution or to
* store a dispatch call for later.
*
* This is held for an additional storage item whose value size is
* `4 + sizeof((BlockNumber, Balance, AccountId))` bytes and whose key size is
* `32 + sizeof(AccountId)` bytes.
**/
depositBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of currency needed per unit threshold when creating a multisig execution.
*
* This is held for adding 32 bytes more into a pre-existing storage value.
**/
depositFactor: u128 & AugmentedConst<ApiType>;
/**
* The maximum amount of signatories allowed in the multisig.
**/
maxSignatories: u16 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
paras: {
unsignedPriority: u64 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
phragmenElection: {
/**
* How much should be locked up in order to submit one's candidacy.
**/
candidacyBond: u128 & AugmentedConst<ApiType>;
/**
* Number of members to elect.
**/
desiredMembers: u32 & AugmentedConst<ApiType>;
/**
* Number of runners_up to keep.
**/
desiredRunnersUp: u32 & AugmentedConst<ApiType>;
/**
* Identifier for the elections-phragmen pallet's lock
**/
palletId: U8aFixed & AugmentedConst<ApiType>;
/**
* How long each seat is kept. This defines the next block number at which an election
* round will happen. If set to zero, no elections are ever triggered and the module will
* be in passive mode.
**/
termDuration: u32 & AugmentedConst<ApiType>;
/**
* Base deposit associated with voting.
*
* This should be sensibly high to economically ensure the pallet cannot be attacked by
* creating a gigantic number of votes.
**/
votingBondBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of bond that need to be locked for each vote (32 bytes).
**/
votingBondFactor: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
proxy: {
/**
* The base amount of currency needed to reserve for creating an announcement.
*
* This is held when a new storage item holding a `Balance` is created (typically 16
* bytes).
**/
announcementDepositBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of currency needed per announcement made.
*
* This is held for adding an `AccountId`, `Hash` and `BlockNumber` (typically 68 bytes)
* into a pre-existing storage value.
**/
announcementDepositFactor: u128 & AugmentedConst<ApiType>;
/**
* The maximum amount of time-delayed announcements that are allowed to be pending.
**/
maxPending: u32 & AugmentedConst<ApiType>;
/**
* The maximum amount of proxies allowed for a single account.
**/
maxProxies: u32 & AugmentedConst<ApiType>;
/**
* The base amount of currency needed to reserve for creating a proxy.
*
* This is held for an additional storage item whose value size is
* `sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes.
**/
proxyDepositBase: u128 & AugmentedConst<ApiType>;
/**
* The amount of currency needed per proxy added.
*
* This is held for adding 32 bytes plus an instance of `ProxyType` more into a
* pre-existing storage value. Thus, when configuring `ProxyDepositFactor` one should take
* into account `32 + proxy_type.encode().len()` bytes of data.
**/
proxyDepositFactor: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
registrar: {
/**
* The deposit to be paid per byte stored on chain.
**/
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
/**
* The deposit to be paid to run a parathread.
* This should include the cost for storing the genesis head and validation code.
**/
paraDeposit: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
scheduler: {
/**
* The maximum weight that may be scheduled per block for any dispatchables of less
* priority than `schedule::HARD_DEADLINE`.
**/
maximumWeight: u64 & AugmentedConst<ApiType>;
/**
* The maximum number of scheduled calls in the queue for a single block.
* Not strictly enforced, but used for weight estimation.
**/
maxScheduledPerBlock: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
slots: {
/**
* The number of blocks to offset each lease period by.
**/
leaseOffset: u32 & AugmentedConst<ApiType>;
/**
* The number of blocks over which a single period lasts.
**/
leasePeriod: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
staking: {
/**
* Number of eras that staked funds must remain bonded for.
**/
bondingDuration: u32 & AugmentedConst<ApiType>;
maxNominations: u32 & AugmentedConst<ApiType>;
/**
* The maximum number of nominators rewarded for each validator.
*
* For each validator only the `$MaxNominatorRewardedPerValidator` biggest stakers can
* claim their reward. This used to limit the i/o cost for the nominator payout.
**/
maxNominatorRewardedPerValidator: u32 & AugmentedConst<ApiType>;
/**
* Number of sessions per era.
**/
sessionsPerEra: u32 & AugmentedConst<ApiType>;
/**
* Number of eras that slashes are deferred by, after computation.
*
* This should be less than the bonding duration. Set to 0 if slashes
* should be applied immediately, without opportunity for intervention.
**/
slashDeferDuration: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
system: {
/**
* Maximum number of block number to block hash mappings to keep (oldest pruned first).
**/
blockHashCount: u32 & AugmentedConst<ApiType>;
/**
* The maximum length of a block (in bytes).
**/
blockLength: FrameSystemLimitsBlockLength & AugmentedConst<ApiType>;
/**
* Block & extrinsics weights: base values and limits.
**/
blockWeights: FrameSystemLimitsBlockWeights & AugmentedConst<ApiType>;
/**
* The weight of runtime database operations the runtime can invoke.
**/
dbWeight: FrameSupportWeightsRuntimeDbWeight & AugmentedConst<ApiType>;
/**
* The designated SS85 prefix of this chain.
*
* This replaces the "ss58Format" property declared in the chain spec. Reason is
* that the runtime should know about the prefix in order to make use of it as
* an identifier of the chain.
**/
ss58Prefix: u16 & AugmentedConst<ApiType>;
/**
* Get the chain's current version.
**/
version: SpVersionRuntimeVersion & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
timestamp: {
/**
* The minimum period between blocks. Beware that this is different to the *expected*
* period that the block production apparatus provides. Your chosen consensus system will
* generally work with this to determine a sensible block time. e.g. For Aura, it will be
* double this period on default settings.
**/
minimumPeriod: u64 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
tips: {
/**
* The amount held on deposit per byte within the tip report reason or bounty description.
**/
dataDepositPerByte: u128 & AugmentedConst<ApiType>;
/**
* Maximum acceptable reason length.
*
* Benchmarks depend on this value, be sure to update weights file when changing this value
**/
maximumReasonLength: u32 & AugmentedConst<ApiType>;
/**
* The period for which a tip remains open after is has achieved threshold tippers.
**/
tipCountdown: u32 & AugmentedConst<ApiType>;
/**
* The percent of the final tip which goes to the original reporter of the tip.
**/
tipFindersFee: Percent & AugmentedConst<ApiType>;
/**
* The amount held on deposit for placing a tip report.
**/
tipReportDepositBase: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
transactionPayment: {
/**
* A fee mulitplier for `Operational` extrinsics to compute "virtual tip" to boost their
* `priority`
*
* This value is multipled by the `final_fee` to obtain a "virtual tip" that is later
* added to a tip component in regular `priority` calculations.
* It means that a `Normal` transaction can front-run a similarly-sized `Operational`
* extrinsic (with no tip), by including a tip value greater than the virtual tip.
*
* ```rust,ignore
* // For `Normal`
* let priority = priority_calc(tip);
*
* // For `Operational`
* let virtual_tip = (inclusion_fee + tip) * OperationalFeeMultiplier;
* let priority = priority_calc(tip + virtual_tip);
* ```
*
* Note that since we use `final_fee` the multiplier applies also to the regular `tip`
* sent with the transaction. So, not only does the transaction get a priority bump based
* on the `inclusion_fee`, but we also amplify the impact of tips applied to `Operational`
* transactions.
**/
operationalFeeMultiplier: u8 & AugmentedConst<ApiType>;
/**
* The fee to be paid for making a transaction; the per-byte portion.
**/
transactionByteFee: u128 & AugmentedConst<ApiType>;
/**
* The polynomial that is applied in order to derive fee from weight.
**/
weightToFee: Vec<FrameSupportWeightsWeightToFeeCoefficient> & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
treasury: {
/**
* Percentage of spare funds (if any) that are burnt per spend period.
**/
burn: Permill & AugmentedConst<ApiType>;
/**
* The maximum number of approvals that can wait in the spending queue.
**/
maxApprovals: u32 & AugmentedConst<ApiType>;
/**
* The treasury's pallet id, used for deriving its sovereign account ID.
**/
palletId: FrameSupportPalletId & AugmentedConst<ApiType>;
/**
* Fraction of a proposal's value that should be bonded in order to place the proposal.
* An accepted proposal gets these back. A rejected proposal does not.
**/
proposalBond: Permill & AugmentedConst<ApiType>;
/**
* Minimum amount of funds that should be placed in a deposit for making a proposal.
**/
proposalBondMinimum: u128 & AugmentedConst<ApiType>;
/**
* Period between successive spends.
**/
spendPeriod: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
utility: {
/**
* The limit on the number of batched calls.
**/
batchedCallsLimit: u32 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
vesting: {
maxVestingSchedules: u32 & AugmentedConst<ApiType>;
/**
* The minimum amount transferred to call `vested_transfer`.
**/
minVestedTransfer: u128 & AugmentedConst<ApiType>;
/**
* Generic const
**/
[key: string]: Codec;
};
} // AugmentedConsts
} // declare module
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,9 @@
// Copyright 2017-2021 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '../base';
import './consts';
import './errors';
import './events';
import './query';
import './tx';
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,9 @@
// Copyright 2017-2021 @polkadot/api-augment authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '../base';
import './consts';
import './errors';
import './events';
import './query';
import './tx';
+4
View File
@@ -5,6 +5,10 @@
"outDir": "./build",
"rootDir": "./src"
},
"exclude": [
"**/kusama/*.ts",
"**/polkadot/*.ts"
],
"references": [
{ "path": "../api-base" },
{ "path": "../rpc-augment" },
+19
View File
@@ -0,0 +1,19 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"include": [
"**/base.ts",
"**/kusama/*.ts"
],
"references": [
{ "path": "../api-base" },
{ "path": "../rpc-augment" },
{ "path": "../types" },
{ "path": "../types-codec" },
{ "path": "../types-augment" }
]
}
@@ -0,0 +1,19 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"include": [
"**/base.ts",
"**/polkadot/*.ts"
],
"references": [
{ "path": "../api-base" },
{ "path": "../rpc-augment" },
{ "path": "../types" },
{ "path": "../types-codec" },
{ "path": "../types-augment" }
]
}
+3 -3
View File
@@ -20,12 +20,12 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.0.2",
"version": "7.1.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/rpc-core": "7.0.2",
"@polkadot/types": "7.0.2",
"@polkadot/rpc-core": "7.1.1",
"@polkadot/types": "7.1.1",
"@polkadot/util": "^8.2.2",
"rxjs": "^7.4.0"
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api-base', version: '7.0.2' };
export const packageInfo = { name: '@polkadot/api-base', version: '7.1.1' };
@@ -65,6 +65,7 @@ export interface SubmittableResultValue {
events?: EventRecord[];
internalError?: Error;
status: ExtrinsicStatus;
txHash: Hash;
}
export interface SubmittableExtrinsic<ApiType extends ApiTypes, R extends ISubmittableResult = ISubmittableResult> extends Extrinsic {
+9 -4
View File
@@ -20,15 +20,20 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.0.2",
"version": "7.1.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/api": "7.0.2",
"@polkadot/types": "7.0.2",
"@polkadot/types-create": "7.0.2",
"@polkadot/api": "7.1.1",
"@polkadot/types": "7.1.1",
"@polkadot/types-codec": "7.1.1",
"@polkadot/types-create": "7.1.1",
"@polkadot/util": "^8.2.2",
"@polkadot/util-crypto": "^8.2.2",
"rxjs": "^7.4.0"
},
"devDependencies": {
"@polkadot/api-augment": "7.1.1",
"@polkadot/keyring": "^8.2.2"
}
}
+10 -10
View File
@@ -56,21 +56,21 @@ export class Blueprint<ApiType extends ApiTypes> extends Base<ApiType> {
return this.#tx;
}
#deploy = (constructorOrId: AbiConstructor | string | number, { gasLimit = BN_ZERO, salt, value = BN_ZERO }: BlueprintOptions, params: unknown[]): SubmittableExtrinsic<ApiType, BlueprintSubmittableResult<ApiType>> => {
#deploy = (constructorOrId: AbiConstructor | string | number, { gasLimit = BN_ZERO, salt, storageDepositLimit = null, value = BN_ZERO }: BlueprintOptions, params: unknown[]): SubmittableExtrinsic<ApiType, BlueprintSubmittableResult<ApiType>> => {
const hasStorageDeposit = this.api.tx.contracts.instantiate.meta.args.length === 6;
const storageDepositLimit = null;
const encParams = this.abi.findConstructor(constructorOrId).toU8a(params);
const encSalt = encodeSalt(salt);
const tx = hasStorageDeposit
? this.api.tx.contracts.instantiate(value, gasLimit, storageDepositLimit, this.codeHash, this.abi.findConstructor(constructorOrId).toU8a(params), encodeSalt(salt))
? this.api.tx.contracts.instantiate(value, gasLimit, storageDepositLimit, this.codeHash, encParams, encSalt)
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore old style without storage deposit
: this.api.tx.contracts.instantiate(value, gasLimit, this.codeHash, this.abi.findConstructor(constructorOrId).toU8a(params), encodeSalt(salt));
: this.api.tx.contracts.instantiate(value, gasLimit, this.codeHash, encParams, encSalt);
return tx
.withResultTransform((result: ISubmittableResult) =>
new BlueprintSubmittableResult(result, applyOnEvent(result, ['Instantiated'], ([record]: EventRecord[]) =>
new Contract<ApiType>(this.api, this.abi, record.event.data[1] as AccountId, this._decorateMethod)
))
);
return tx.withResultTransform((result: ISubmittableResult) =>
new BlueprintSubmittableResult(result, applyOnEvent(result, ['Instantiated'], ([record]: EventRecord[]) =>
new Contract<ApiType>(this.api, this.abi, record.event.data[1] as AccountId, this._decorateMethod)
))
);
};
}
+6 -4
View File
@@ -61,14 +61,16 @@ export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
return this.#tx;
}
#instantiate = (constructorOrId: AbiConstructor | string | number, { gasLimit = BN_ZERO, salt, value = BN_ZERO }: BlueprintOptions, params: unknown[]): SubmittableExtrinsic<ApiType, CodeSubmittableResult<ApiType>> => {
#instantiate = (constructorOrId: AbiConstructor | string | number, { gasLimit = BN_ZERO, salt, storageDepositLimit = null, value = BN_ZERO }: BlueprintOptions, params: unknown[]): SubmittableExtrinsic<ApiType, CodeSubmittableResult<ApiType>> => {
const hasStorageDeposit = this.api.tx.contracts.instantiateWithCode.meta.args.length === 6;
const storageDepositLimit = null;
const encCode = compactAddLength(this.code);
const encParams = this.abi.findConstructor(constructorOrId).toU8a(params);
const encSalt = encodeSalt(salt);
const tx = hasStorageDeposit
? this.api.tx.contracts.instantiateWithCode(value, gasLimit, storageDepositLimit, compactAddLength(this.code), this.abi.findConstructor(constructorOrId).toU8a(params), encodeSalt(salt))
? this.api.tx.contracts.instantiateWithCode(value, gasLimit, storageDepositLimit, encCode, encParams, encSalt)
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore old style without storage deposit
: this.api.tx.contracts.instantiateWithCode(value, gasLimit, compactAddLength(this.code), this.abi.findConstructor(constructorOrId).toU8a(params), encodeSalt(salt));
: this.api.tx.contracts.instantiateWithCode(value, gasLimit, encCode, encParams, encSalt);
return tx.withResultTransform((result: ISubmittableResult) =>
new CodeSubmittableResult(result, ...(applyOnEvent(result, ['CodeStored', 'Instantiated'], (records: EventRecord[]) =>
+13 -11
View File
@@ -106,14 +106,15 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
: gasLimit;
};
#exec = (messageOrId: AbiMessage | string | number, { gasLimit = BN_ZERO, value = BN_ZERO }: ContractOptions, params: unknown[]): SubmittableExtrinsic<ApiType> => {
#exec = (messageOrId: AbiMessage | string | number, { gasLimit = BN_ZERO, storageDepositLimit = null, value = BN_ZERO }: ContractOptions, params: unknown[]): SubmittableExtrinsic<ApiType> => {
const hasStorageDeposit = this.api.tx.contracts.call.meta.args.length === 5;
const storageDepositLimit = null;
const gas = this.#getGas(gasLimit);
const encParams = this.abi.findMessage(messageOrId).toU8a(params);
const tx = hasStorageDeposit
? this.api.tx.contracts.call(this.address, value, this.#getGas(gasLimit), storageDepositLimit, this.abi.findMessage(messageOrId).toU8a(params))
? this.api.tx.contracts.call(this.address, value, gas, storageDepositLimit, encParams)
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore old style without storage deposit
: this.api.tx.contracts.call(this.address, value, this.#getGas(gasLimit), this.abi.findMessage(messageOrId).toU8a(params));
: this.api.tx.contracts.call(this.address, value, gas, encParams);
return tx.withResultTransform((result: ISubmittableResult) =>
// ContractEmitted is the current generation, ContractExecution is the previous generation
@@ -133,7 +134,7 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
);
};
#read = (messageOrId: AbiMessage | string | number, { gasLimit = BN_ZERO, value = BN_ZERO }: ContractOptions, params: unknown[]): ContractCallSend<ApiType> => {
#read = (messageOrId: AbiMessage | string | number, { gasLimit = BN_ZERO, storageDepositLimit = null, value = BN_ZERO }: ContractOptions, params: unknown[]): ContractCallSend<ApiType> => {
assert(this.hasRpcContractsCall, ERROR_NO_CALL);
const message = this.abi.findMessage(messageOrId);
@@ -142,11 +143,12 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
send: this._decorateMethod((origin: string | AccountId | Uint8Array) => {
const hasStorageDeposit = this.api.tx.contracts.call.meta.args.length === 5;
const inputData = message.toU8a(params);
const rpc = hasStorageDeposit
? this.api.rx.rpc.contracts.call({ dest: this.address, gasLimit: this.#getGas(gasLimit, true), inputData: message.toU8a(params), origin, value })
: this.api.rx.rpc.contracts.call({ dest: this.address, gasLimit: this.#getGas(gasLimit, true), inputData: message.toU8a(params), origin, value });
? this.api.rx.rpc.contracts.call({ dest: this.address, gasLimit: this.#getGas(gasLimit, true), inputData, origin, storageDepositLimit, value })
: this.api.rx.rpc.contracts.call({ dest: this.address, gasLimit: this.#getGas(gasLimit, true), inputData, origin, value });
const mapFn = ({ debugMessage, gasConsumed, gasRequired, result }: ContractExecResult): ContractCallOutcome => ({
const mapFn = ({ debugMessage, gasConsumed, gasRequired, result, storageDeposit }: ContractExecResult): ContractCallOutcome => ({
debugMessage,
gasConsumed,
gasRequired: gasRequired && !gasRequired.isZero()
@@ -155,12 +157,12 @@ export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
output: result.isOk && message.returnType
? this.abi.registry.createTypeUnsafe(message.returnType.lookupName || message.returnType.type, [result.asOk.data.toU8a(true)], { isPedantic: true })
: null,
result
result,
storageDeposit
});
return rpc.pipe(map(mapFn));
}
)
})
};
};
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api-contract', version: '7.0.2' };
export const packageInfo = { name: '@polkadot/api-contract', version: '7.1.1' };
+8 -8
View File
@@ -4,7 +4,7 @@
import type { ApiBase } from '@polkadot/api/base';
import type { ApiTypes } from '@polkadot/api/types';
import type { Text, u64 } from '@polkadot/types';
import type { ContractExecResultResult, ContractSelector } from '@polkadot/types/interfaces';
import type { ContractExecResultResult, ContractSelector, StorageDeposit } from '@polkadot/types/interfaces';
import type { Codec, TypeDef } from '@polkadot/types/types';
import type { BN } from '@polkadot/util';
import type { Abi } from '.';
@@ -58,6 +58,7 @@ export interface ContractCallOutcome {
gasRequired: u64;
output: Codec | null;
result: ContractExecResultResult;
storageDeposit: StorageDeposit;
}
export interface DecodedEvent {
@@ -70,13 +71,12 @@ export interface DecodedMessage {
message: AbiMessage;
}
export interface BlueprintOptions {
gasLimit?: bigint | string | number | BN;
salt?: Uint8Array | string | null;
value?: bigint | string | number | BN;
}
export interface ContractOptions {
gasLimit?: bigint | BN | string | number;
gasLimit?: bigint | string | number | BN;
storageDepositLimit?: bigint | string | number | BN | null;
value?: bigint | BN | string | number;
}
export interface BlueprintOptions extends ContractOptions {
salt?: Uint8Array | string | null;
}
+2 -2
View File
@@ -16,7 +16,7 @@
"references": [
{ "path": "../api" },
{ "path": "../types" },
{ "path": "../types-create" },
{ "path": "../types-support" }
{ "path": "../types-codec" },
{ "path": "../types-create" }
]
}
+1
View File
@@ -18,6 +18,7 @@
],
"references": [
{ "path": "../api" },
{ "path": "../api-augment" },
{ "path": "../api-contract" },
{ "path": "../types" }
]
+12 -9
View File
@@ -20,22 +20,25 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.0.2",
"version": "7.1.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/api": "7.0.2",
"@polkadot/api-base": "7.0.2",
"@polkadot/rpc-core": "7.0.2",
"@polkadot/types": "7.0.2",
"@polkadot/types-codec": "7.0.2",
"@polkadot/api": "7.1.1",
"@polkadot/api-augment": "7.1.1",
"@polkadot/api-base": "7.1.1",
"@polkadot/rpc-core": "7.1.1",
"@polkadot/types": "7.1.1",
"@polkadot/types-codec": "7.1.1",
"@polkadot/util": "^8.2.2",
"@polkadot/util-crypto": "^8.2.2",
"rxjs": "^7.4.0"
},
"devDependencies": {
"@polkadot/api": "7.0.2",
"@polkadot/api-augment": "7.0.2",
"@polkadot/rpc-augment": "7.0.2"
"@polkadot/api": "7.1.1",
"@polkadot/api-augment": "7.1.1",
"@polkadot/rpc-augment": "7.1.1",
"@polkadot/rpc-provider": "7.1.1",
"@polkadot/types-support": "7.1.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api-derive', version: '7.0.2' };
export const packageInfo = { name: '@polkadot/api-derive', version: '7.1.1' };
-1
View File
@@ -13,7 +13,6 @@
"references": [
{ "path": "../api-base" },
{ "path": "../api-augment" },
{ "path": "../rpc-augment" },
{ "path": "../rpc-core" },
{ "path": "../types" },
{ "path": "../types-codec" }
+2 -1
View File
@@ -18,9 +18,10 @@
{ "path": "../api-base" },
{ "path": "../api-derive" },
{ "path": "../rpc-augment" },
{ "path": "../rpc-provider" },
{ "path": "../types" },
{ "path": "../types-augment" },
{ "path": "../types-codec" },
{ "path": "../types-support" },
{ "path": "../types-support" }
]
}
+14 -13
View File
@@ -20,28 +20,29 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.0.2",
"version": "7.1.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/api-augment": "7.0.2",
"@polkadot/api-base": "7.0.2",
"@polkadot/api-derive": "7.0.2",
"@polkadot/api-augment": "7.1.1",
"@polkadot/api-base": "7.1.1",
"@polkadot/api-derive": "7.1.1",
"@polkadot/keyring": "^8.2.2",
"@polkadot/rpc-augment": "7.0.2",
"@polkadot/rpc-core": "7.0.2",
"@polkadot/rpc-provider": "7.0.2",
"@polkadot/types": "7.0.2",
"@polkadot/types-augment": "7.0.2",
"@polkadot/types-codec": "7.0.2",
"@polkadot/types-create": "7.0.2",
"@polkadot/types-known": "7.0.2",
"@polkadot/rpc-augment": "7.1.1",
"@polkadot/rpc-core": "7.1.1",
"@polkadot/rpc-provider": "7.1.1",
"@polkadot/types": "7.1.1",
"@polkadot/types-augment": "7.1.1",
"@polkadot/types-codec": "7.1.1",
"@polkadot/types-create": "7.1.1",
"@polkadot/types-known": "7.1.1",
"@polkadot/util": "^8.2.2",
"@polkadot/util-crypto": "^8.2.2",
"eventemitter3": "^4.0.7",
"rxjs": "^7.4.0"
},
"devDependencies": {
"@polkadot/api-augment": "7.0.2"
"@polkadot/api-augment": "7.1.1",
"@polkadot/types-support": "7.1.1"
}
}
+2 -4
View File
@@ -19,7 +19,7 @@ import { getAvailableDerives } from '@polkadot/api-derive';
import { memo, RpcCore } from '@polkadot/rpc-core';
import { WsProvider } from '@polkadot/rpc-provider';
import { expandMetadata, Metadata, TypeRegistry, unwrapStorageType } from '@polkadot/types';
import { arrayChunk, arrayFlatten, assert, BN, BN_ZERO, compactStripLength, lazyMethod, lazyMethods, logger, objectSpread, u8aToHex } from '@polkadot/util';
import { arrayChunk, arrayFlatten, assert, assertReturn, BN, BN_ZERO, compactStripLength, lazyMethod, lazyMethods, logger, objectSpread, u8aToHex } from '@polkadot/util';
import { createSubmittable } from '../submittable';
import { augmentObject } from '../util/augmentObject';
@@ -50,9 +50,7 @@ const l = logger('api/init');
let instanceCounter = 0;
function getAtQueryFn<ApiType extends ApiTypes> (api: ApiDecoration<ApiType>, { method, section }: StorageEntry): AugmentedQuery<'rxjs', GenericStorageEntryFunction, AnyTuple> {
assert(api.rx.query[section] && api.rx.query[section][method], () => `query.${section}.${method} is not available in this version of the metadata`);
return api.rx.query[section][method];
return assertReturn(api.rx.query[section] && api.rx.query[section][method], () => `query.${section}.${method} is not available in this version of the metadata`);
}
export abstract class Decorate<ApiType extends ApiTypes> extends Events {
+2 -7
View File
@@ -15,7 +15,7 @@ import { firstValueFrom, map, of, switchMap } from 'rxjs';
import { Metadata, TypeRegistry } from '@polkadot/types';
import { getSpecAlias, getSpecExtensions, getSpecHasher, getSpecRpc, getSpecTypes, getUpgradeVersion } from '@polkadot/types-known';
import { assert, BN_ZERO, isUndefined, logger, objectSpread, u8aEq, u8aToHex, u8aToU8a } from '@polkadot/util';
import { assert, assertReturn, BN_ZERO, isUndefined, logger, objectSpread, u8aEq, u8aToHex, u8aToU8a } from '@polkadot/util';
import { cryptoWaitReady } from '@polkadot/util-crypto';
import { Decorate } from './Decorate';
@@ -102,12 +102,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
* @description Returns the default versioned registry
*/
private _getDefaultRegistry (): VersionedRegistry<ApiType> {
// get the default registry version
const thisRegistry = this.#registries.find(({ isDefault }) => isDefault);
assert(thisRegistry, 'Initialization error, cannot find the default registry');
return thisRegistry;
return assertReturn(this.#registries.find(({ isDefault }) => isDefault), 'Initialization error, cannot find the default registry');
}
/**
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api', version: '7.0.2' };
export const packageInfo = { name: '@polkadot/api', version: '7.1.1' };
+5 -2
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2021 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { DispatchError, DispatchInfo, EventRecord, ExtrinsicStatus } from '@polkadot/types/interfaces';
import type { DispatchError, DispatchInfo, EventRecord, ExtrinsicStatus, Hash } from '@polkadot/types/interfaces';
import type { AnyJson, ISubmittableResult } from '@polkadot/types/types';
import type { SubmittableResultValue } from './types';
@@ -45,12 +45,15 @@ export class SubmittableResult implements ISubmittableResult {
public readonly status: ExtrinsicStatus;
constructor ({ dispatchError, dispatchInfo, events, internalError, status }: SubmittableResultValue) {
public readonly txHash: Hash;
constructor ({ dispatchError, dispatchInfo, events, internalError, status, txHash }: SubmittableResultValue) {
this.dispatchError = dispatchError || extractError(events);
this.dispatchInfo = dispatchInfo || extractInfo(events);
this.events = events || [];
this.internalError = internalError;
this.status = status;
this.txHash = txHash;
}
public get isCompleted (): boolean {
+10 -7
View File
@@ -233,10 +233,11 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
);
};
#observeStatus = (hash: Hash, status: ExtrinsicStatus): Observable<ISubmittableResult> => {
#observeStatus = (txHash: Hash, status: ExtrinsicStatus): Observable<ISubmittableResult> => {
if (!status.isFinalized && !status.isInBlock) {
return of(this.#transformResult(new SubmittableResult({
status
status,
txHash
})));
}
@@ -247,14 +248,16 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
return api.derive.tx.events(blockHash).pipe(
map(({ block, events }): ISubmittableResult =>
this.#transformResult(new SubmittableResult({
events: filterEvents(hash, block, events, status),
status
events: filterEvents(txHash, block, events, status),
status,
txHash
}))
),
catchError((internalError: Error) =>
of(this.#transformResult(new SubmittableResult({
internalError,
status
status,
txHash
})))
)
);
@@ -269,11 +272,11 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
};
#observeSubscribe = (updateId = -1): Observable<ISubmittableResult> => {
const hash = this.hash;
const txHash = this.hash;
return api.rpc.author.submitAndWatchExtrinsic(this).pipe(
switchMap((status): Observable<ISubmittableResult> =>
this.#observeStatus(hash, status)
this.#observeStatus(txHash, status)
),
tap((status): void => {
this.#updateSigner(updateId, status);
+4 -4
View File
@@ -5,10 +5,10 @@ import type { EventRecord, ExtrinsicStatus, H256, SignedBlock } from '@polkadot/
import { l } from './logging';
export function filterEvents (extHash: H256, { block: { extrinsics, header } }: SignedBlock, allEvents: EventRecord[], status: ExtrinsicStatus): EventRecord[] | undefined {
export function filterEvents (txHash: H256, { block: { extrinsics, header } }: SignedBlock, allEvents: EventRecord[], status: ExtrinsicStatus): EventRecord[] | undefined {
// extrinsics to hashes
for (const [index, extrinsic] of extrinsics.entries()) {
if (extrinsic.hash.eq(extHash)) {
for (const [index, x] of extrinsics.entries()) {
if (x.hash.eq(txHash)) {
return allEvents.filter(({ phase }) =>
// only ApplyExtrinsic has the extrinsic index
phase.isApplyExtrinsic && phase.asApplyExtrinsic.eqn(index)
@@ -21,7 +21,7 @@ export function filterEvents (extHash: H256, { block: { extrinsics, header } }:
if (status.isInBlock) {
const allHashes = extrinsics.map((x) => x.hash.toHex());
l.warn(`block ${header.hash.toHex()}: Unable to find extrinsic ${extHash.toHex()} inside ${allHashes.join(', ')}`);
l.warn(`block ${header.hash.toHex()}: Unable to find extrinsic ${txHash.toHex()} inside ${allHashes.join(', ')}`);
}
return undefined;
+1
View File
@@ -17,6 +17,7 @@
{ "path": "../rpc-core" },
{ "path": "../rpc-provider" },
{ "path": "../types" },
{ "path": "../types-codec" },
{ "path": "../types-known" }
]
}
+2 -1
View File
@@ -20,6 +20,7 @@
{ "path": "../rpc-core" },
{ "path": "../rpc-provider" },
{ "path": "../types" },
{ "path": "../types-known" }
{ "path": "../types-known" },
{ "path": "../types-support" }
]
}
+4 -4
View File
@@ -20,13 +20,13 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.0.2",
"version": "7.1.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/rpc-core": "7.0.2",
"@polkadot/types": "7.0.2",
"@polkadot/types-codec": "7.0.2",
"@polkadot/rpc-core": "7.1.1",
"@polkadot/types": "7.1.1",
"@polkadot/types-codec": "7.1.1",
"@polkadot/util": "^8.2.2"
}
}
+2 -2
View File
@@ -133,7 +133,7 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
/**
* Executes a call to a contract
**/
call: AugmentedRpc<(callRequest: ContractCallRequest | { origin?: any; dest?: any; value?: any; gasLimit?: any; inputData?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractExecResult>>;
call: AugmentedRpc<(callRequest: ContractCallRequest | { origin?: any; dest?: any; value?: any; gasLimit?: any; storageDepositLimit?: any; inputData?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractExecResult>>;
/**
* Returns the value under a specified storage key in a contract
**/
@@ -141,7 +141,7 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
/**
* Instantiate a new contract
**/
instantiate: AugmentedRpc<(request: InstantiateRequest | { origin?: any; value?: any; gasLimit?: any; code?: any; data?: any; salt?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractInstantiateResult>>;
instantiate: AugmentedRpc<(request: InstantiateRequest | { origin?: any; value?: any; gasLimit?: any; storageDepositLimit?: any; code?: any; data?: any; salt?: any } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractInstantiateResult>>;
/**
* Returns the projected time a given contract will be able to sustain paying its rent
**/
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/rpc-augment', version: '7.0.2' };
export const packageInfo = { name: '@polkadot/rpc-augment', version: '7.1.1' };
+5 -5
View File
@@ -20,18 +20,18 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.0.2",
"version": "7.1.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/rpc-augment": "7.0.2",
"@polkadot/rpc-provider": "7.0.2",
"@polkadot/types": "7.0.2",
"@polkadot/rpc-augment": "7.1.1",
"@polkadot/rpc-provider": "7.1.1",
"@polkadot/types": "7.1.1",
"@polkadot/util": "^8.2.2",
"rxjs": "^7.4.0"
},
"devDependencies": {
"@polkadot/keyring": "^8.2.2",
"@polkadot/rpc-augment": "7.0.2"
"@polkadot/rpc-augment": "7.1.1"
}
}
+2 -2
View File
@@ -212,7 +212,7 @@ export class RpcCore {
const creator = <T> (isScale: boolean) => (...values: unknown[]): Observable<T> => {
const isDelayed = isScale && hashIndex !== -1 && !!values[hashIndex];
return new Observable((observer: Observer<T>): VoidCallback => {
return new Observable((observer: Observer<T>): () => void => {
callWithRegistry<T>(isScale, values)
.then((value): void => {
observer.next(value);
@@ -263,7 +263,7 @@ export class RpcCore {
let memoized: null | Memoized<RpcInterfaceMethod> = null;
const creator = <T> (isScale: boolean) => (...values: unknown[]): Observable<T> => {
return new Observable((observer: Observer<T>): VoidCallback => {
return new Observable((observer: Observer<T>): () => void => {
// Have at least an empty promise, as used in the unsubscribe
let subscriptionPromise: Promise<number | string | null> = Promise.resolve(null);
const registry = this.#registryDefault;
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/rpc-core', version: '7.0.2' };
export const packageInfo = { name: '@polkadot/rpc-core', version: '7.1.1' };
+3 -3
View File
@@ -20,13 +20,13 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.0.2",
"version": "7.1.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/keyring": "^8.2.2",
"@polkadot/types": "7.0.2",
"@polkadot/types-support": "7.0.2",
"@polkadot/types": "7.1.1",
"@polkadot/types-support": "7.1.1",
"@polkadot/util": "^8.2.2",
"@polkadot/util-crypto": "^8.2.2",
"@polkadot/x-fetch": "^8.2.2",
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/rpc-provider', version: '7.0.2' };
export const packageInfo = { name: '@polkadot/rpc-provider', version: '7.1.1' };
+12 -11
View File
@@ -20,7 +20,7 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.0.2",
"version": "7.1.1",
"main": "index.js",
"bin": {
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.cjs",
@@ -33,22 +33,23 @@
"@babel/core": "^7.16.5",
"@babel/register": "^7.16.5",
"@babel/runtime": "^7.16.5",
"@polkadot/api": "7.0.2",
"@polkadot/rpc-augment": "7.0.2",
"@polkadot/rpc-provider": "7.0.2",
"@polkadot/types": "7.0.2",
"@polkadot/types-augment": "7.0.2",
"@polkadot/types-codec": "7.0.2",
"@polkadot/types-create": "7.0.2",
"@polkadot/types-support": "7.0.2",
"@polkadot/api": "7.1.1",
"@polkadot/api-augment": "7.1.1",
"@polkadot/rpc-augment": "7.1.1",
"@polkadot/rpc-provider": "7.1.1",
"@polkadot/types": "7.1.1",
"@polkadot/types-augment": "7.1.1",
"@polkadot/types-codec": "7.1.1",
"@polkadot/types-create": "7.1.1",
"@polkadot/types-support": "7.1.1",
"@polkadot/util": "^8.2.2",
"@polkadot/x-ws": "^8.2.2",
"handlebars": "^4.7.7",
"websocket": "^1.0.34",
"yargs": "^17.3.0"
"yargs": "^17.3.1"
},
"devDependencies": {
"@types/websocket": "^1.0.4",
"@types/yargs": "^17.0.7"
"@types/yargs": "^17.0.8"
}
}
-28
View File
@@ -1,28 +0,0 @@
// Copyright 2017-2021 @polkadot/typegen authors & contributors
// SPDX-License-Identifier: Apache-2.0
/* eslint-disable sort-keys */
const alias = {
'^@polkadot/api-augment(.*)': './packages/api-augment/src\\1',
'^@polkadot/api-base(.*)': './packages/api-base/src\\1',
'^@polkadot/api-derive(.*)': './packages/api-derive/src\\1',
'^@polkadot/api(.*)': './packages/api/src/\\1',
'^@polkadot/rpc-augment(.*)': './packages/rpc-augment/src\\1',
'^@polkadot/rpc-core(.*)': './packages/rpc-core/src\\1',
'^@polkadot/rpc-provider(.*)': './packages/rpc-provider/src\\1',
'^@polkadot/types-(augment)(.*)': './packages/types-\\1/src\\2',
'^@polkadot/types-codec(.*)': './packages/types-codec/src\\1',
'^@polkadot/types-create(.*)': './packages/types-create/src\\1',
'^@polkadot/types-known(.*)': './packages/types-known/src\\1',
'^@polkadot/types-metadata(.*)': './packages/types-metadata/src\\1',
'^@polkadot/types-support(.*)': './packages/types-support/src\\1',
'^@polkadot/types(.*)': './packages/types/src\\1'
};
require('@babel/register')({
extensions: ['.js', '.ts'],
plugins: [
['module-resolver', { alias }]
]
});
+36
View File
@@ -0,0 +1,36 @@
// Copyright 2017-2021 @polkadot/typegen authors & contributors
// SPDX-License-Identifier: Apache-2.0
module.exports = function (file) {
let main;
try {
main = require(`../${file}.cjs`).main;
} catch (error) {
// required for dev-only setups
process.env.JEST_WORKER_ID = '123';
// register aliases
require('@babel/register')({
extensions: ['.js', '.ts'],
plugins: [
['module-resolver', {
alias: {
'^@polkadot/api-(augment|base|derive)(.*)': './packages/api-\\1/src\\2',
// eslint-disable-next-line sort-keys
'^@polkadot/api(.*)': './packages/api/src/\\1',
'^@polkadot/rpc-(augment|core|provider)(.*)': './packages/rpc-\\1/src\\2',
'^@polkadot/types-(augment|codec|create|known|metadata|support)(.*)': './packages/types-\\1/src\\2',
// eslint-disable-next-line sort-keys
'^@polkadot/types(.*)': './packages/types/src\\1'
}
}]
]
});
// get ts source
main = require(`../src/${file}.ts`).main;
}
main();
};
@@ -2,16 +2,4 @@
// Copyright 2017-2021 @polkadot/typegen authors & contributors
// SPDX-License-Identifier: Apache-2.0
let main;
try {
main = require('../extractChain.cjs').main;
} catch (error) {
process.env.JEST_WORKER_ID = '123';
require('./aliases.cjs');
main = require('../src/extractChain.ts').main;
}
main();
require('./execWithSrc.cjs')('extractChain');
@@ -2,16 +2,4 @@
// Copyright 2017-2021 @polkadot/typegen authors & contributors
// SPDX-License-Identifier: Apache-2.0
let main;
try {
main = require('../fromChain.cjs').main;
} catch (error) {
process.env.JEST_WORKER_ID = '123';
require('./aliases.cjs');
main = require('../src/fromChain').main;
}
main();
require('./execWithSrc.cjs')('fromChain');
@@ -2,16 +2,4 @@
// Copyright 2017-2021 @polkadot/typegen authors & contributors
// SPDX-License-Identifier: Apache-2.0
let main;
try {
main = require('../fromDefs.cjs').main;
} catch (error) {
process.env.JEST_WORKER_ID = '123';
require('./aliases.cjs');
main = require('../src/fromDefs.ts').main;
}
main();
require('./execWithSrc.cjs')('fromDefs');
@@ -2,16 +2,4 @@
// Copyright 2017-2021 @polkadot/typegen authors & contributors
// SPDX-License-Identifier: Apache-2.0
let main;
try {
main = require('../interfacesTs.cjs').main;
} catch (error) {
process.env.JEST_WORKER_ID = '123';
require('./aliases.cjs');
main = require('../src/interfacesTs.ts').main;
}
main();
require('./execWithSrc.cjs')('interfacesTs');
@@ -2,16 +2,4 @@
// Copyright 2017-2021 @polkadot/typegen authors & contributors
// SPDX-License-Identifier: Apache-2.0
let main;
try {
main = require('../metadataMd.cjs').main;
} catch (error) {
process.env.JEST_WORKER_ID = '123';
require('./aliases.cjs');
main = require('../src/metadataMd.ts').main;
}
main();
require('./execWithSrc.cjs')('metadataMd');
+2 -2
View File
@@ -9,7 +9,7 @@ import Handlebars from 'handlebars';
import * as defaultDefs from '@polkadot/types/interfaces/definitions';
import { Definitions } from '@polkadot/types/types';
import lookupDefinitions from '@polkadot/types-augment/augment/lookup/definitions';
import lookupDefinitions from '@polkadot/types-augment/lookup/definitions';
import { stringCamelCase } from '@polkadot/util';
import { compareName, createImports, formatType, initMeta, readTemplate, setImports, writeFile } from '../util';
@@ -85,7 +85,7 @@ function generateForMeta (meta: Metadata, dest: string, extraTypes: ExtraTypes,
// Call `generateForMeta()` with current static metadata
/** @internal */
export function generateDefaultConsts (dest = 'packages/api-augment/src/augment/consts.ts', data?: HexString, extraTypes: ExtraTypes = {}, isStrict = false, customLookupDefinitions?: Definitions): void {
export function generateDefaultConsts (dest: string, data: HexString, extraTypes: ExtraTypes = {}, isStrict = false, customLookupDefinitions?: Definitions): void {
const { metadata } = initMeta(data, extraTypes);
return generateForMeta(metadata, dest, extraTypes, isStrict, customLookupDefinitions);
+1 -1
View File
@@ -48,7 +48,7 @@ function generateForMeta (meta: Metadata, dest: string, isStrict: boolean): void
// Call `generateForMeta()` with current static metadata
/** @internal */
export function generateDefaultErrors (dest = 'packages/api-augment/src/augment/errors.ts', data?: HexString, extraTypes: ExtraTypes = {}, isStrict = false): void {
export function generateDefaultErrors (dest: string, data: HexString, extraTypes: ExtraTypes = {}, isStrict = false): void {
const { metadata } = initMeta(data, extraTypes);
return generateForMeta(metadata, dest, isStrict);
+2 -2
View File
@@ -9,7 +9,7 @@ import Handlebars from 'handlebars';
import * as defaultDefs from '@polkadot/types/interfaces/definitions';
import { Definitions } from '@polkadot/types/types';
import lookupDefinitions from '@polkadot/types-augment/augment/lookup/definitions';
import lookupDefinitions from '@polkadot/types-augment/lookup/definitions';
import { stringCamelCase } from '@polkadot/util';
import { compareName, createImports, formatType, initMeta, readTemplate, setImports, writeFile } from '../util';
@@ -77,7 +77,7 @@ function generateForMeta (meta: Metadata, dest: string, extraTypes: ExtraTypes,
// Call `generateForMeta()` with current static metadata
/** @internal */
export function generateDefaultEvents (dest = 'packages/api-augment/src/augment/events.ts', data?: HexString, extraTypes: ExtraTypes = {}, isStrict = false, customLookupDefinitions?: Definitions): void {
export function generateDefaultEvents (dest: string, data: HexString, extraTypes: ExtraTypes = {}, isStrict = false, customLookupDefinitions?: Definitions): void {
const { metadata } = initMeta(data, extraTypes);
return generateForMeta(metadata, dest, extraTypes, isStrict, customLookupDefinitions);
@@ -79,6 +79,6 @@ export function generateInterfaceTypes (importDefinitions: { [importPath: string
export function generateDefaultInterface (): void {
generateInterfaceTypes(
{ '@polkadot/types/interfaces': defaultDefinitions },
'packages/types-augment/src/augment/registry.ts'
'packages/types-augment/src/registry.ts'
);
}
+1 -1
View File
@@ -231,7 +231,7 @@ function generateLookup (destDir: string, entries: [string | undefined, HexStrin
}
// Generate `packages/types/src/lookup/*s`, the registry of all lookup types
export function generateDefaultLookup (destDir = 'packages/types-augment/src/augment/lookup', staticData?: HexString): void {
export function generateDefaultLookup (destDir = 'packages/types-augment/src/lookup', staticData?: HexString): void {
generateLookup(
destDir,
staticData
+2 -2
View File
@@ -11,7 +11,7 @@ import Handlebars from 'handlebars';
import * as defaultDefs from '@polkadot/types/interfaces/definitions';
import { unwrapStorageSi } from '@polkadot/types/primitive/StorageKey';
import lookupDefinitions from '@polkadot/types-augment/augment/lookup/definitions';
import lookupDefinitions from '@polkadot/types-augment/lookup/definitions';
import { stringCamelCase } from '@polkadot/util';
import { compareName, createImports, formatType, getSimilarTypes, initMeta, readTemplate, setImports, TypeImports, writeFile } from '../util';
@@ -134,7 +134,7 @@ function generateForMeta (registry: Registry, meta: Metadata, dest: string, extr
// Call `generateForMeta()` with current static metadata
/** @internal */
export function generateDefaultQuery (dest = 'packages/api-augment/src/augment/query.ts', data?: HexString, extraTypes: ExtraTypes = {}, isStrict = false, customLookupDefinitions?: Definitions): void {
export function generateDefaultQuery (dest: string, data: HexString, extraTypes: ExtraTypes = {}, isStrict = false, customLookupDefinitions?: Definitions): void {
const { metadata, registry } = initMeta(data, extraTypes);
return generateForMeta(registry, metadata, dest, extraTypes, isStrict, customLookupDefinitions);
+2 -1
View File
@@ -8,6 +8,7 @@ import type { ExtraTypes } from './types';
import Handlebars from 'handlebars';
import * as defaultDefinitions from '@polkadot/types/interfaces/definitions';
import staticSubstrate from '@polkadot/types-support/metadata/static-substrate';
import { createImports, formatType, getSimilarTypes, initMeta, readTemplate, setImports, writeFile } from '../util';
@@ -144,7 +145,7 @@ export function generateRpcTypes (registry: TypeRegistry, importDefinitions: Rec
}
export function generateDefaultRpc (dest = 'packages/rpc-augment/src/augment/jsonrpc.ts', extraTypes: ExtraTypes = {}): void {
const { registry } = initMeta(undefined, extraTypes);
const { registry } = initMeta(staticSubstrate, extraTypes);
generateRpcTypes(
registry,
+2 -2
View File
@@ -10,7 +10,7 @@ import Handlebars from 'handlebars';
import * as defaultDefs from '@polkadot/types/interfaces/definitions';
import { Text } from '@polkadot/types/primitive';
import lookupDefinitions from '@polkadot/types-augment/augment/lookup/definitions';
import lookupDefinitions from '@polkadot/types-augment/lookup/definitions';
import { stringCamelCase } from '@polkadot/util';
import { compareName, createImports, formatType, getSimilarTypes, initMeta, readTemplate, setImports, writeFile } from '../util';
@@ -119,7 +119,7 @@ function generateForMeta (registry: Registry, meta: Metadata, dest: string, extr
// Call `generateForMeta()` with current static metadata
/** @internal */
export function generateDefaultTx (dest = 'packages/api-augment/src/augment/tx.ts', data?: HexString, extraTypes: ExtraTypes = {}, isStrict = false, customLookupDefinitions?: Definitions): void {
export function generateDefaultTx (dest: string, data: HexString, extraTypes: ExtraTypes = {}, isStrict = false, customLookupDefinitions?: Definitions): void {
const { metadata, registry } = initMeta(data, extraTypes);
return generateForMeta(registry, metadata, dest, extraTypes, isStrict, customLookupDefinitions);
+20 -7
View File
@@ -1,18 +1,31 @@
// Copyright 2017-2021 @polkadot/typegen authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { HexString } from '@polkadot/util/types';
import kusama from '@polkadot/types-support/metadata/static-kusama';
import polkadot from '@polkadot/types-support/metadata/static-polkadot';
import substrate from '@polkadot/types-support/metadata/static-substrate';
import { generateDefaultConsts, generateDefaultErrors, generateDefaultEvents, generateDefaultInterface, generateDefaultLookup, generateDefaultQuery, generateDefaultRpc, generateDefaultTsDef, generateDefaultTx } from './generate';
const BASE = 'packages/api-augment/src';
const METAS = Object.entries({ kusama, polkadot, substrate }) as [string, HexString][];
export function main (): void {
generateDefaultLookup();
generateDefaultInterface();
generateDefaultConsts();
generateDefaultErrors();
generateDefaultEvents();
generateDefaultQuery();
generateDefaultTx();
generateDefaultRpc();
generateDefaultTsDef();
for (const [name, staticMeta] of METAS) {
console.log();
console.log(`*** Generating for ${name}`);
generateDefaultConsts(`${BASE}/${name}/consts.ts`, staticMeta);
generateDefaultErrors(`${BASE}/${name}/errors.ts`, staticMeta);
generateDefaultEvents(`${BASE}/${name}/events.ts`, staticMeta);
generateDefaultQuery(`${BASE}/${name}/query.ts`, staticMeta);
generateDefaultTx(`${BASE}/${name}/tx.ts`, staticMeta);
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/typegen', version: '7.0.2' };
export const packageInfo = { name: '@polkadot/typegen', version: '7.1.1' };
+1 -2
View File
@@ -5,7 +5,6 @@ import type { HexString } from '@polkadot/util/types';
import type { ExtraTypes } from '../generate/types';
import { Metadata, TypeRegistry } from '@polkadot/types';
import staticSubstrate from '@polkadot/types-support/metadata/static-substrate';
import { registerDefinitions } from './register';
@@ -14,7 +13,7 @@ interface Result {
registry: TypeRegistry;
}
export function initMeta (staticMeta: HexString = staticSubstrate, extraTypes: ExtraTypes = {}): Result {
export function initMeta (staticMeta: HexString, extraTypes: ExtraTypes = {}): Result {
const registry = new TypeRegistry();
registerDefinitions(registry, extraTypes);
+3 -3
View File
@@ -20,12 +20,12 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.0.2",
"version": "7.1.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/types": "7.0.2",
"@polkadot/types-codec": "7.0.2",
"@polkadot/types": "7.1.1",
"@polkadot/types-codec": "7.1.1",
"@polkadot/util": "^8.2.2"
}
}
+2 -1
View File
@@ -2,8 +2,9 @@
// SPDX-License-Identifier: Apache-2.0
import { packageInfo as typesInfo } from '@polkadot/types/packageInfo';
import { packageInfo as codecInfo } from '@polkadot/types-codec/packageInfo';
import { detectPackage } from '@polkadot/util';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname, [typesInfo]);
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname, [typesInfo, codecInfo]);
@@ -187,7 +187,7 @@ export default {
_enum: ['force_unfreeze']
},
/**
* Lookup693: polkadot_primitives::v1::DisputeState<N>
* Lookup696: polkadot_primitives::v1::DisputeState<N>
**/
PolkadotPrimitivesV1DisputeState: {
validatorsFor: 'BitVec',
@@ -196,13 +196,13 @@ export default {
concludedAt: 'Option<u32>'
},
/**
* Lookup694: polkadot_runtime_parachains::disputes::pallet::Error<T>
* Lookup697: polkadot_runtime_parachains::disputes::pallet::Error<T>
**/
PolkadotRuntimeParachainsDisputesPalletError: {
_enum: ['DuplicateDisputeStatementSets', 'AncientDisputeStatement', 'ValidatorIndexOutOfBounds', 'InvalidSignature', 'DuplicateStatement', 'PotentialSpam', 'SingleSidedDispute']
},
/**
* Lookup729: kusama_runtime::Runtime
* Lookup732: kusama_runtime::Runtime
**/
KusamaRuntimeRuntime: 'Null'
};
@@ -1780,20 +1780,65 @@ export default {
minimumValidationUpgradeDelay: 'u32'
},
/**
* Lookup580: polkadot_runtime_parachains::configuration::pallet::Error<T>
* Lookup580: polkadot_runtime_parachains::configuration::migration::v1::HostConfiguration<BlockNumber>
**/
PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration: {
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'
},
/**
* Lookup583: polkadot_runtime_parachains::configuration::pallet::Error<T>
**/
PolkadotRuntimeParachainsConfigurationPalletError: {
_enum: ['InvalidNewValue']
},
/**
* Lookup583: polkadot_runtime_parachains::inclusion::AvailabilityBitfieldRecord<N>
* Lookup586: polkadot_runtime_parachains::inclusion::AvailabilityBitfieldRecord<N>
**/
PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord: {
bitfield: 'BitVec',
submittedAt: 'u32'
},
/**
* Lookup584: polkadot_runtime_parachains::inclusion::CandidatePendingAvailability<primitive_types::H256, N>
* Lookup587: polkadot_runtime_parachains::inclusion::CandidatePendingAvailability<primitive_types::H256, N>
**/
PolkadotRuntimeParachainsInclusionCandidatePendingAvailability: {
_alias: {
@@ -1809,13 +1854,13 @@ export default {
backingGroup: 'u32'
},
/**
* Lookup585: polkadot_runtime_parachains::inclusion::pallet::Error<T>
* Lookup588: polkadot_runtime_parachains::inclusion::pallet::Error<T>
**/
PolkadotRuntimeParachainsInclusionPalletError: {
_enum: ['WrongBitfieldSize', 'BitfieldDuplicateOrUnordered', 'ValidatorIndexOutOfBounds', 'InvalidBitfieldSignature', 'UnscheduledCandidate', 'CandidateScheduledBeforeParaFree', 'WrongCollator', 'ScheduledOutOfOrder', 'HeadDataTooLarge', 'PrematureCodeUpgrade', 'NewCodeTooLarge', 'CandidateNotInParentContext', 'InvalidGroupIndex', 'InsufficientBacking', 'InvalidBacking', 'NotCollatorSigned', 'ValidationDataHashMismatch', 'IncorrectDownwardMessageHandling', 'InvalidUpwardMessages', 'HrmpWatermarkMishandling', 'InvalidOutboundHrmp', 'InvalidValidationCodeHash', 'ParaHeadMismatch', 'BitfieldReferencesFreedCore']
},
/**
* Lookup586: polkadot_primitives::v1::ScrapedOnChainVotes<primitive_types::H256>
* Lookup589: polkadot_primitives::v1::ScrapedOnChainVotes<primitive_types::H256>
**/
PolkadotPrimitivesV1ScrapedOnChainVotes: {
session: 'u32',
@@ -1823,38 +1868,38 @@ export default {
disputes: 'Vec<PolkadotPrimitivesV1DisputeStatementSet>'
},
/**
* Lookup591: polkadot_runtime_parachains::paras_inherent::pallet::Error<T>
* Lookup594: polkadot_runtime_parachains::paras_inherent::pallet::Error<T>
**/
PolkadotRuntimeParachainsParasInherentPalletError: {
_enum: ['TooManyInclusionInherents', 'InvalidParentHeader', 'CandidateConcludedInvalid', 'InherentOverweight']
},
/**
* Lookup593: polkadot_runtime_parachains::scheduler::ParathreadClaimQueue
* Lookup596: polkadot_runtime_parachains::scheduler::ParathreadClaimQueue
**/
PolkadotRuntimeParachainsSchedulerParathreadClaimQueue: {
queue: 'Vec<PolkadotRuntimeParachainsSchedulerQueuedParathread>',
nextCoreOffset: 'u32'
},
/**
* Lookup595: polkadot_runtime_parachains::scheduler::QueuedParathread
* Lookup598: polkadot_runtime_parachains::scheduler::QueuedParathread
**/
PolkadotRuntimeParachainsSchedulerQueuedParathread: {
claim: 'PolkadotPrimitivesV1ParathreadEntry',
coreOffset: 'u32'
},
/**
* Lookup596: polkadot_primitives::v1::ParathreadEntry
* Lookup599: polkadot_primitives::v1::ParathreadEntry
**/
PolkadotPrimitivesV1ParathreadEntry: {
claim: 'PolkadotPrimitivesV1ParathreadClaim',
retries: 'u32'
},
/**
* Lookup597: polkadot_primitives::v1::ParathreadClaim
* Lookup600: polkadot_primitives::v1::ParathreadClaim
**/
PolkadotPrimitivesV1ParathreadClaim: '(u32,PolkadotPrimitivesV0CollatorAppPublic)',
/**
* Lookup600: polkadot_primitives::v1::CoreOccupied
* Lookup603: polkadot_primitives::v1::CoreOccupied
**/
PolkadotPrimitivesV1CoreOccupied: {
_enum: {
@@ -1863,7 +1908,7 @@ export default {
}
},
/**
* Lookup603: polkadot_runtime_parachains::scheduler::CoreAssignment
* Lookup606: polkadot_runtime_parachains::scheduler::CoreAssignment
**/
PolkadotRuntimeParachainsSchedulerCoreAssignment: {
core: 'u32',
@@ -1872,7 +1917,7 @@ export default {
groupIdx: 'u32'
},
/**
* Lookup604: polkadot_runtime_parachains::scheduler::AssignmentKind
* Lookup607: polkadot_runtime_parachains::scheduler::AssignmentKind
**/
PolkadotRuntimeParachainsSchedulerAssignmentKind: {
_enum: {
@@ -1881,7 +1926,7 @@ export default {
}
},
/**
* Lookup605: polkadot_runtime_parachains::paras::PvfCheckActiveVoteState<BlockNumber>
* Lookup608: polkadot_runtime_parachains::paras::PvfCheckActiveVoteState<BlockNumber>
**/
PolkadotRuntimeParachainsParasPvfCheckActiveVoteState: {
votesAccept: 'BitVec',
@@ -1891,7 +1936,7 @@ export default {
causes: 'Vec<PolkadotRuntimeParachainsParasPvfCheckCause>'
},
/**
* Lookup607: polkadot_runtime_parachains::paras::PvfCheckCause<BlockNumber>
* Lookup610: polkadot_runtime_parachains::paras::PvfCheckCause<BlockNumber>
**/
PolkadotRuntimeParachainsParasPvfCheckCause: {
_enum: {
@@ -1903,39 +1948,39 @@ export default {
}
},
/**
* Lookup609: polkadot_runtime_parachains::paras::ParaLifecycle
* Lookup612: polkadot_runtime_parachains::paras::ParaLifecycle
**/
PolkadotRuntimeParachainsParasParaLifecycle: {
_enum: ['Onboarding', 'Parathread', 'Parachain', 'UpgradingParathread', 'DowngradingParachain', 'OffboardingParathread', 'OffboardingParachain']
},
/**
* Lookup611: polkadot_runtime_parachains::paras::ParaPastCodeMeta<N>
* Lookup614: polkadot_runtime_parachains::paras::ParaPastCodeMeta<N>
**/
PolkadotRuntimeParachainsParasParaPastCodeMeta: {
upgradeTimes: 'Vec<PolkadotRuntimeParachainsParasReplacementTimes>',
lastPruned: 'Option<u32>'
},
/**
* Lookup613: polkadot_runtime_parachains::paras::ReplacementTimes<N>
* Lookup616: polkadot_runtime_parachains::paras::ReplacementTimes<N>
**/
PolkadotRuntimeParachainsParasReplacementTimes: {
expectedAt: 'u32',
activatedAt: 'u32'
},
/**
* Lookup615: polkadot_primitives::v1::UpgradeGoAhead
* Lookup618: polkadot_primitives::v1::UpgradeGoAhead
**/
PolkadotPrimitivesV1UpgradeGoAhead: {
_enum: ['Abort', 'GoAhead']
},
/**
* Lookup616: polkadot_primitives::v1::UpgradeRestriction
* Lookup619: polkadot_primitives::v1::UpgradeRestriction
**/
PolkadotPrimitivesV1UpgradeRestriction: {
_enum: ['Present']
},
/**
* Lookup617: polkadot_runtime_parachains::paras::ParaGenesisArgs
* Lookup620: polkadot_runtime_parachains::paras::ParaGenesisArgs
**/
PolkadotRuntimeParachainsParasParaGenesisArgs: {
genesisHead: 'Bytes',
@@ -1943,13 +1988,13 @@ export default {
parachain: 'bool'
},
/**
* Lookup618: polkadot_runtime_parachains::paras::pallet::Error<T>
* Lookup621: polkadot_runtime_parachains::paras::pallet::Error<T>
**/
PolkadotRuntimeParachainsParasPalletError: {
_enum: ['NotRegistered', 'CannotOnboard', 'CannotOffboard', 'CannotUpgrade', 'CannotDowngrade', 'PvfCheckStatementStale', 'PvfCheckStatementFuture', 'PvfCheckValidatorIndexOutOfBounds', 'PvfCheckInvalidSignature', 'PvfCheckDoubleVote', 'PvfCheckSubjectInvalid']
},
/**
* Lookup620: polkadot_runtime_parachains::initializer::BufferedSessionChange
* Lookup623: polkadot_runtime_parachains::initializer::BufferedSessionChange
**/
PolkadotRuntimeParachainsInitializerBufferedSessionChange: {
validators: 'Vec<PolkadotPrimitivesV0ValidatorAppPublic>',
@@ -1957,20 +2002,20 @@ export default {
sessionIndex: 'u32'
},
/**
* Lookup622: polkadot_core_primitives::InboundDownwardMessage<BlockNumber>
* Lookup625: polkadot_core_primitives::InboundDownwardMessage<BlockNumber>
**/
PolkadotCorePrimitivesInboundDownwardMessage: {
sentAt: 'u32',
msg: 'Bytes'
},
/**
* Lookup624: polkadot_runtime_parachains::ump::pallet::Error<T>
* Lookup627: polkadot_runtime_parachains::ump::pallet::Error<T>
**/
PolkadotRuntimeParachainsUmpPalletError: {
_enum: ['UnknownMessageIndex', 'WeightOverLimit']
},
/**
* Lookup625: polkadot_runtime_parachains::hrmp::HrmpOpenChannelRequest
* Lookup628: polkadot_runtime_parachains::hrmp::HrmpOpenChannelRequest
**/
PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest: {
confirmed: 'bool',
@@ -1981,7 +2026,7 @@ export default {
maxTotalSize: 'u32'
},
/**
* Lookup627: polkadot_runtime_parachains::hrmp::HrmpChannel
* Lookup630: polkadot_runtime_parachains::hrmp::HrmpChannel
**/
PolkadotRuntimeParachainsHrmpHrmpChannel: {
maxCapacity: 'u32',
@@ -1994,20 +2039,20 @@ export default {
recipientDeposit: 'u128'
},
/**
* Lookup630: polkadot_core_primitives::InboundHrmpMessage<BlockNumber>
* Lookup633: polkadot_core_primitives::InboundHrmpMessage<BlockNumber>
**/
PolkadotCorePrimitivesInboundHrmpMessage: {
sentAt: 'u32',
data: 'Bytes'
},
/**
* Lookup633: polkadot_runtime_parachains::hrmp::pallet::Error<T>
* Lookup636: polkadot_runtime_parachains::hrmp::pallet::Error<T>
**/
PolkadotRuntimeParachainsHrmpPalletError: {
_enum: ['OpenHrmpChannelToSelf', 'OpenHrmpChannelInvalidRecipient', 'OpenHrmpChannelZeroCapacity', 'OpenHrmpChannelCapacityExceedsLimit', 'OpenHrmpChannelZeroMessageSize', 'OpenHrmpChannelMessageSizeExceedsLimit', 'OpenHrmpChannelAlreadyExists', 'OpenHrmpChannelAlreadyRequested', 'OpenHrmpChannelLimitExceeded', 'AcceptHrmpChannelDoesntExist', 'AcceptHrmpChannelAlreadyConfirmed', 'AcceptHrmpChannelLimitExceeded', 'CloseHrmpChannelUnauthorized', 'CloseHrmpChannelDoesntExist', 'CloseHrmpChannelAlreadyUnderway', 'CancelHrmpOpenChannelUnauthorized', 'OpenHrmpChannelDoesntExist', 'OpenHrmpChannelAlreadyConfirmed']
},
/**
* Lookup635: polkadot_primitives::v1::SessionInfo
* Lookup638: polkadot_primitives::v1::SessionInfo
**/
PolkadotPrimitivesV1SessionInfo: {
validators: 'Vec<PolkadotPrimitivesV0ValidatorAppPublic>',
@@ -2022,7 +2067,7 @@ export default {
neededApprovals: 'u32'
},
/**
* Lookup637: polkadot_runtime_common::paras_registrar::ParaInfo<sp_core::crypto::AccountId32, Balance>
* Lookup640: polkadot_runtime_common::paras_registrar::ParaInfo<sp_core::crypto::AccountId32, Balance>
**/
PolkadotRuntimeCommonParasRegistrarParaInfo: {
manager: 'AccountId32',
@@ -2030,25 +2075,25 @@ export default {
locked: 'bool'
},
/**
* Lookup638: polkadot_runtime_common::paras_registrar::pallet::Error<T>
* Lookup641: polkadot_runtime_common::paras_registrar::pallet::Error<T>
**/
PolkadotRuntimeCommonParasRegistrarPalletError: {
_enum: ['NotRegistered', 'AlreadyRegistered', 'NotOwner', 'CodeTooLarge', 'HeadDataTooLarge', 'NotParachain', 'NotParathread', 'CannotDeregister', 'CannotDowngrade', 'CannotUpgrade', 'ParaLocked', 'NotReserved', 'EmptyCode']
},
/**
* Lookup640: polkadot_runtime_common::slots::pallet::Error<T>
* Lookup643: polkadot_runtime_common::slots::pallet::Error<T>
**/
PolkadotRuntimeCommonSlotsPalletError: {
_enum: ['ParaNotOnboarding', 'LeaseError']
},
/**
* Lookup645: polkadot_runtime_common::auctions::pallet::Error<T>
* Lookup648: polkadot_runtime_common::auctions::pallet::Error<T>
**/
PolkadotRuntimeCommonAuctionsPalletError: {
_enum: ['AuctionInProgress', 'LeasePeriodInPast', 'ParaNotRegistered', 'NotCurrentAuction', 'NotAuction', 'AuctionEnded', 'AlreadyLeasedOut']
},
/**
* Lookup646: polkadot_runtime_common::crowdloan::FundInfo<sp_core::crypto::AccountId32, Balance, BlockNumber, LeasePeriod>
* Lookup649: polkadot_runtime_common::crowdloan::FundInfo<sp_core::crypto::AccountId32, Balance, BlockNumber, LeasePeriod>
**/
PolkadotRuntimeCommonCrowdloanFundInfo: {
depositor: 'AccountId32',
@@ -2063,7 +2108,7 @@ export default {
trieIndex: 'u32'
},
/**
* Lookup647: polkadot_runtime_common::crowdloan::LastContribution<BlockNumber>
* Lookup650: polkadot_runtime_common::crowdloan::LastContribution<BlockNumber>
**/
PolkadotRuntimeCommonCrowdloanLastContribution: {
_enum: {
@@ -2073,13 +2118,13 @@ export default {
}
},
/**
* Lookup648: polkadot_runtime_common::crowdloan::pallet::Error<T>
* Lookup651: polkadot_runtime_common::crowdloan::pallet::Error<T>
**/
PolkadotRuntimeCommonCrowdloanPalletError: {
_enum: ['FirstPeriodInPast', 'FirstPeriodTooFarInFuture', 'LastPeriodBeforeFirstPeriod', 'LastPeriodTooFarInFuture', 'CannotEndInPast', 'EndTooFarInFuture', 'Overflow', 'ContributionTooSmall', 'InvalidParaId', 'CapExceeded', 'ContributionPeriodOver', 'InvalidOrigin', 'NotParachain', 'LeaseActive', 'BidOrLeaseActive', 'FundNotEnded', 'NoContributions', 'NotReadyToDissolve', 'InvalidSignature', 'MemoTooLarge', 'AlreadyInNewRaise', 'VrfDelayInProgress', 'NoLeasePeriod']
},
/**
* Lookup649: pallet_xcm::pallet::QueryStatus<BlockNumber>
* Lookup652: pallet_xcm::pallet::QueryStatus<BlockNumber>
**/
PalletXcmQueryStatus: {
_enum: {
@@ -2099,7 +2144,7 @@ export default {
}
},
/**
* Lookup652: xcm::VersionedResponse
* Lookup655: xcm::VersionedResponse
**/
XcmVersionedResponse: {
_enum: {
@@ -2109,7 +2154,7 @@ export default {
}
},
/**
* Lookup658: pallet_xcm::pallet::VersionMigrationStage
* Lookup661: pallet_xcm::pallet::VersionMigrationStage
**/
PalletXcmVersionMigrationStage: {
_enum: {
@@ -2120,21 +2165,21 @@ export default {
}
},
/**
* Lookup659: pallet_xcm::pallet::Error<T>
* Lookup662: pallet_xcm::pallet::Error<T>
**/
PalletXcmError: {
_enum: ['Unreachable', 'SendFailure', 'Filtered', 'UnweighableMessage', 'DestinationNotInvertible', 'Empty', 'CannotReanchor', 'TooManyAssets', 'InvalidOrigin', 'BadVersion', 'BadLocation', 'NoSubscription', 'AlreadySubscribed']
},
/**
* Lookup670: pallet_transaction_payment::ChargeTransactionPayment<T>
* Lookup673: pallet_transaction_payment::ChargeTransactionPayment<T>
**/
PalletTransactionPaymentChargeTransactionPayment: 'Compact<u128>',
/**
* Lookup671: polkadot_runtime_common::claims::PrevalidateAttests<T>
* Lookup674: polkadot_runtime_common::claims::PrevalidateAttests<T>
**/
PolkadotRuntimeCommonClaimsPrevalidateAttests: 'Null',
/**
* Lookup672: polkadot_runtime::Runtime
* Lookup675: polkadot_runtime::Runtime
**/
PolkadotRuntimeRuntime: 'Null'
};
@@ -1354,7 +1354,8 @@ export default {
specVersion: 'u32',
implVersion: 'u32',
apis: 'Vec<([u8;8],u32)>',
transactionVersion: 'u32'
transactionVersion: 'u32',
stateVersion: 'u8'
},
/**
* Lookup120: frame_system::pallet::Error<T>
@@ -105,7 +105,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'ForceUnfreeze';
}
/** @name PolkadotPrimitivesV1DisputeState (693) */
/** @name PolkadotPrimitivesV1DisputeState (696) */
export interface PolkadotPrimitivesV1DisputeState extends Struct {
readonly validatorsFor: BitVec;
readonly validatorsAgainst: BitVec;
@@ -113,7 +113,7 @@ declare module '@polkadot/types/lookup' {
readonly concludedAt: Option<u32>;
}
/** @name PolkadotRuntimeParachainsDisputesPalletError (694) */
/** @name PolkadotRuntimeParachainsDisputesPalletError (697) */
export interface PolkadotRuntimeParachainsDisputesPalletError extends Enum {
readonly isDuplicateDisputeStatementSets: boolean;
readonly isAncientDisputeStatement: boolean;
@@ -125,7 +125,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'DuplicateDisputeStatementSets' | 'AncientDisputeStatement' | 'ValidatorIndexOutOfBounds' | 'InvalidSignature' | 'DuplicateStatement' | 'PotentialSpam' | 'SingleSidedDispute';
}
/** @name KusamaRuntimeRuntime (729) */
/** @name KusamaRuntimeRuntime (732) */
export type KusamaRuntimeRuntime = Null;
} // declare module
@@ -1733,19 +1733,63 @@ declare module '@polkadot/types/lookup' {
readonly minimumValidationUpgradeDelay: u32;
}
/** @name PolkadotRuntimeParachainsConfigurationPalletError (580) */
/** @name PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration (580) */
export interface PolkadotRuntimeParachainsConfigurationMigrationV1HostConfiguration 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 PolkadotRuntimeParachainsConfigurationPalletError (583) */
export interface PolkadotRuntimeParachainsConfigurationPalletError extends Enum {
readonly isInvalidNewValue: boolean;
readonly type: 'InvalidNewValue';
}
/** @name PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord (583) */
/** @name PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord (586) */
export interface PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord extends Struct {
readonly bitfield: BitVec;
readonly submittedAt: u32;
}
/** @name PolkadotRuntimeParachainsInclusionCandidatePendingAvailability (584) */
/** @name PolkadotRuntimeParachainsInclusionCandidatePendingAvailability (587) */
export interface PolkadotRuntimeParachainsInclusionCandidatePendingAvailability extends Struct {
readonly core: u32;
readonly hash_: H256;
@@ -1757,7 +1801,7 @@ declare module '@polkadot/types/lookup' {
readonly backingGroup: u32;
}
/** @name PolkadotRuntimeParachainsInclusionPalletError (585) */
/** @name PolkadotRuntimeParachainsInclusionPalletError (588) */
export interface PolkadotRuntimeParachainsInclusionPalletError extends Enum {
readonly isWrongBitfieldSize: boolean;
readonly isBitfieldDuplicateOrUnordered: boolean;
@@ -1786,14 +1830,14 @@ declare module '@polkadot/types/lookup' {
readonly type: 'WrongBitfieldSize' | 'BitfieldDuplicateOrUnordered' | 'ValidatorIndexOutOfBounds' | 'InvalidBitfieldSignature' | 'UnscheduledCandidate' | 'CandidateScheduledBeforeParaFree' | 'WrongCollator' | 'ScheduledOutOfOrder' | 'HeadDataTooLarge' | 'PrematureCodeUpgrade' | 'NewCodeTooLarge' | 'CandidateNotInParentContext' | 'InvalidGroupIndex' | 'InsufficientBacking' | 'InvalidBacking' | 'NotCollatorSigned' | 'ValidationDataHashMismatch' | 'IncorrectDownwardMessageHandling' | 'InvalidUpwardMessages' | 'HrmpWatermarkMishandling' | 'InvalidOutboundHrmp' | 'InvalidValidationCodeHash' | 'ParaHeadMismatch' | 'BitfieldReferencesFreedCore';
}
/** @name PolkadotPrimitivesV1ScrapedOnChainVotes (586) */
/** @name PolkadotPrimitivesV1ScrapedOnChainVotes (589) */
export interface PolkadotPrimitivesV1ScrapedOnChainVotes extends Struct {
readonly session: u32;
readonly backingValidatorsPerCandidate: Vec<ITuple<[PolkadotPrimitivesV1CandidateReceipt, Vec<ITuple<[u32, PolkadotPrimitivesV0ValidityAttestation]>>]>>;
readonly disputes: Vec<PolkadotPrimitivesV1DisputeStatementSet>;
}
/** @name PolkadotRuntimeParachainsParasInherentPalletError (591) */
/** @name PolkadotRuntimeParachainsParasInherentPalletError (594) */
export interface PolkadotRuntimeParachainsParasInherentPalletError extends Enum {
readonly isTooManyInclusionInherents: boolean;
readonly isInvalidParentHeader: boolean;
@@ -1802,28 +1846,28 @@ declare module '@polkadot/types/lookup' {
readonly type: 'TooManyInclusionInherents' | 'InvalidParentHeader' | 'CandidateConcludedInvalid' | 'InherentOverweight';
}
/** @name PolkadotRuntimeParachainsSchedulerParathreadClaimQueue (593) */
/** @name PolkadotRuntimeParachainsSchedulerParathreadClaimQueue (596) */
export interface PolkadotRuntimeParachainsSchedulerParathreadClaimQueue extends Struct {
readonly queue: Vec<PolkadotRuntimeParachainsSchedulerQueuedParathread>;
readonly nextCoreOffset: u32;
}
/** @name PolkadotRuntimeParachainsSchedulerQueuedParathread (595) */
/** @name PolkadotRuntimeParachainsSchedulerQueuedParathread (598) */
export interface PolkadotRuntimeParachainsSchedulerQueuedParathread extends Struct {
readonly claim: PolkadotPrimitivesV1ParathreadEntry;
readonly coreOffset: u32;
}
/** @name PolkadotPrimitivesV1ParathreadEntry (596) */
/** @name PolkadotPrimitivesV1ParathreadEntry (599) */
export interface PolkadotPrimitivesV1ParathreadEntry extends Struct {
readonly claim: PolkadotPrimitivesV1ParathreadClaim;
readonly retries: u32;
}
/** @name PolkadotPrimitivesV1ParathreadClaim (597) */
/** @name PolkadotPrimitivesV1ParathreadClaim (600) */
export interface PolkadotPrimitivesV1ParathreadClaim extends ITuple<[u32, PolkadotPrimitivesV0CollatorAppPublic]> {}
/** @name PolkadotPrimitivesV1CoreOccupied (600) */
/** @name PolkadotPrimitivesV1CoreOccupied (603) */
export interface PolkadotPrimitivesV1CoreOccupied extends Enum {
readonly isParathread: boolean;
readonly asParathread: PolkadotPrimitivesV1ParathreadEntry;
@@ -1831,7 +1875,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Parathread' | 'Parachain';
}
/** @name PolkadotRuntimeParachainsSchedulerCoreAssignment (603) */
/** @name PolkadotRuntimeParachainsSchedulerCoreAssignment (606) */
export interface PolkadotRuntimeParachainsSchedulerCoreAssignment extends Struct {
readonly core: u32;
readonly paraId: u32;
@@ -1839,7 +1883,7 @@ declare module '@polkadot/types/lookup' {
readonly groupIdx: u32;
}
/** @name PolkadotRuntimeParachainsSchedulerAssignmentKind (604) */
/** @name PolkadotRuntimeParachainsSchedulerAssignmentKind (607) */
export interface PolkadotRuntimeParachainsSchedulerAssignmentKind extends Enum {
readonly isParachain: boolean;
readonly isParathread: boolean;
@@ -1847,7 +1891,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Parachain' | 'Parathread';
}
/** @name PolkadotRuntimeParachainsParasPvfCheckActiveVoteState (605) */
/** @name PolkadotRuntimeParachainsParasPvfCheckActiveVoteState (608) */
export interface PolkadotRuntimeParachainsParasPvfCheckActiveVoteState extends Struct {
readonly votesAccept: BitVec;
readonly votesReject: BitVec;
@@ -1856,7 +1900,7 @@ declare module '@polkadot/types/lookup' {
readonly causes: Vec<PolkadotRuntimeParachainsParasPvfCheckCause>;
}
/** @name PolkadotRuntimeParachainsParasPvfCheckCause (607) */
/** @name PolkadotRuntimeParachainsParasPvfCheckCause (610) */
export interface PolkadotRuntimeParachainsParasPvfCheckCause extends Enum {
readonly isOnboarding: boolean;
readonly asOnboarding: u32;
@@ -1868,7 +1912,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Onboarding' | 'Upgrade';
}
/** @name PolkadotRuntimeParachainsParasParaLifecycle (609) */
/** @name PolkadotRuntimeParachainsParasParaLifecycle (612) */
export interface PolkadotRuntimeParachainsParasParaLifecycle extends Enum {
readonly isOnboarding: boolean;
readonly isParathread: boolean;
@@ -1880,39 +1924,39 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Onboarding' | 'Parathread' | 'Parachain' | 'UpgradingParathread' | 'DowngradingParachain' | 'OffboardingParathread' | 'OffboardingParachain';
}
/** @name PolkadotRuntimeParachainsParasParaPastCodeMeta (611) */
/** @name PolkadotRuntimeParachainsParasParaPastCodeMeta (614) */
export interface PolkadotRuntimeParachainsParasParaPastCodeMeta extends Struct {
readonly upgradeTimes: Vec<PolkadotRuntimeParachainsParasReplacementTimes>;
readonly lastPruned: Option<u32>;
}
/** @name PolkadotRuntimeParachainsParasReplacementTimes (613) */
/** @name PolkadotRuntimeParachainsParasReplacementTimes (616) */
export interface PolkadotRuntimeParachainsParasReplacementTimes extends Struct {
readonly expectedAt: u32;
readonly activatedAt: u32;
}
/** @name PolkadotPrimitivesV1UpgradeGoAhead (615) */
/** @name PolkadotPrimitivesV1UpgradeGoAhead (618) */
export interface PolkadotPrimitivesV1UpgradeGoAhead extends Enum {
readonly isAbort: boolean;
readonly isGoAhead: boolean;
readonly type: 'Abort' | 'GoAhead';
}
/** @name PolkadotPrimitivesV1UpgradeRestriction (616) */
/** @name PolkadotPrimitivesV1UpgradeRestriction (619) */
export interface PolkadotPrimitivesV1UpgradeRestriction extends Enum {
readonly isPresent: boolean;
readonly type: 'Present';
}
/** @name PolkadotRuntimeParachainsParasParaGenesisArgs (617) */
/** @name PolkadotRuntimeParachainsParasParaGenesisArgs (620) */
export interface PolkadotRuntimeParachainsParasParaGenesisArgs extends Struct {
readonly genesisHead: Bytes;
readonly validationCode: Bytes;
readonly parachain: bool;
}
/** @name PolkadotRuntimeParachainsParasPalletError (618) */
/** @name PolkadotRuntimeParachainsParasPalletError (621) */
export interface PolkadotRuntimeParachainsParasPalletError extends Enum {
readonly isNotRegistered: boolean;
readonly isCannotOnboard: boolean;
@@ -1928,27 +1972,27 @@ declare module '@polkadot/types/lookup' {
readonly type: 'NotRegistered' | 'CannotOnboard' | 'CannotOffboard' | 'CannotUpgrade' | 'CannotDowngrade' | 'PvfCheckStatementStale' | 'PvfCheckStatementFuture' | 'PvfCheckValidatorIndexOutOfBounds' | 'PvfCheckInvalidSignature' | 'PvfCheckDoubleVote' | 'PvfCheckSubjectInvalid';
}
/** @name PolkadotRuntimeParachainsInitializerBufferedSessionChange (620) */
/** @name PolkadotRuntimeParachainsInitializerBufferedSessionChange (623) */
export interface PolkadotRuntimeParachainsInitializerBufferedSessionChange extends Struct {
readonly validators: Vec<PolkadotPrimitivesV0ValidatorAppPublic>;
readonly queued: Vec<PolkadotPrimitivesV0ValidatorAppPublic>;
readonly sessionIndex: u32;
}
/** @name PolkadotCorePrimitivesInboundDownwardMessage (622) */
/** @name PolkadotCorePrimitivesInboundDownwardMessage (625) */
export interface PolkadotCorePrimitivesInboundDownwardMessage extends Struct {
readonly sentAt: u32;
readonly msg: Bytes;
}
/** @name PolkadotRuntimeParachainsUmpPalletError (624) */
/** @name PolkadotRuntimeParachainsUmpPalletError (627) */
export interface PolkadotRuntimeParachainsUmpPalletError extends Enum {
readonly isUnknownMessageIndex: boolean;
readonly isWeightOverLimit: boolean;
readonly type: 'UnknownMessageIndex' | 'WeightOverLimit';
}
/** @name PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest (625) */
/** @name PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest (628) */
export interface PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest extends Struct {
readonly confirmed: bool;
readonly age: u32;
@@ -1958,7 +2002,7 @@ declare module '@polkadot/types/lookup' {
readonly maxTotalSize: u32;
}
/** @name PolkadotRuntimeParachainsHrmpHrmpChannel (627) */
/** @name PolkadotRuntimeParachainsHrmpHrmpChannel (630) */
export interface PolkadotRuntimeParachainsHrmpHrmpChannel extends Struct {
readonly maxCapacity: u32;
readonly maxTotalSize: u32;
@@ -1970,13 +2014,13 @@ declare module '@polkadot/types/lookup' {
readonly recipientDeposit: u128;
}
/** @name PolkadotCorePrimitivesInboundHrmpMessage (630) */
/** @name PolkadotCorePrimitivesInboundHrmpMessage (633) */
export interface PolkadotCorePrimitivesInboundHrmpMessage extends Struct {
readonly sentAt: u32;
readonly data: Bytes;
}
/** @name PolkadotRuntimeParachainsHrmpPalletError (633) */
/** @name PolkadotRuntimeParachainsHrmpPalletError (636) */
export interface PolkadotRuntimeParachainsHrmpPalletError extends Enum {
readonly isOpenHrmpChannelToSelf: boolean;
readonly isOpenHrmpChannelInvalidRecipient: boolean;
@@ -1999,7 +2043,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'OpenHrmpChannelToSelf' | 'OpenHrmpChannelInvalidRecipient' | 'OpenHrmpChannelZeroCapacity' | 'OpenHrmpChannelCapacityExceedsLimit' | 'OpenHrmpChannelZeroMessageSize' | 'OpenHrmpChannelMessageSizeExceedsLimit' | 'OpenHrmpChannelAlreadyExists' | 'OpenHrmpChannelAlreadyRequested' | 'OpenHrmpChannelLimitExceeded' | 'AcceptHrmpChannelDoesntExist' | 'AcceptHrmpChannelAlreadyConfirmed' | 'AcceptHrmpChannelLimitExceeded' | 'CloseHrmpChannelUnauthorized' | 'CloseHrmpChannelDoesntExist' | 'CloseHrmpChannelAlreadyUnderway' | 'CancelHrmpOpenChannelUnauthorized' | 'OpenHrmpChannelDoesntExist' | 'OpenHrmpChannelAlreadyConfirmed';
}
/** @name PolkadotPrimitivesV1SessionInfo (635) */
/** @name PolkadotPrimitivesV1SessionInfo (638) */
export interface PolkadotPrimitivesV1SessionInfo extends Struct {
readonly validators: Vec<PolkadotPrimitivesV0ValidatorAppPublic>;
readonly discoveryKeys: Vec<SpAuthorityDiscoveryAppPublic>;
@@ -2013,14 +2057,14 @@ declare module '@polkadot/types/lookup' {
readonly neededApprovals: u32;
}
/** @name PolkadotRuntimeCommonParasRegistrarParaInfo (637) */
/** @name PolkadotRuntimeCommonParasRegistrarParaInfo (640) */
export interface PolkadotRuntimeCommonParasRegistrarParaInfo extends Struct {
readonly manager: AccountId32;
readonly deposit: u128;
readonly locked: bool;
}
/** @name PolkadotRuntimeCommonParasRegistrarPalletError (638) */
/** @name PolkadotRuntimeCommonParasRegistrarPalletError (641) */
export interface PolkadotRuntimeCommonParasRegistrarPalletError extends Enum {
readonly isNotRegistered: boolean;
readonly isAlreadyRegistered: boolean;
@@ -2038,14 +2082,14 @@ declare module '@polkadot/types/lookup' {
readonly type: 'NotRegistered' | 'AlreadyRegistered' | 'NotOwner' | 'CodeTooLarge' | 'HeadDataTooLarge' | 'NotParachain' | 'NotParathread' | 'CannotDeregister' | 'CannotDowngrade' | 'CannotUpgrade' | 'ParaLocked' | 'NotReserved' | 'EmptyCode';
}
/** @name PolkadotRuntimeCommonSlotsPalletError (640) */
/** @name PolkadotRuntimeCommonSlotsPalletError (643) */
export interface PolkadotRuntimeCommonSlotsPalletError extends Enum {
readonly isParaNotOnboarding: boolean;
readonly isLeaseError: boolean;
readonly type: 'ParaNotOnboarding' | 'LeaseError';
}
/** @name PolkadotRuntimeCommonAuctionsPalletError (645) */
/** @name PolkadotRuntimeCommonAuctionsPalletError (648) */
export interface PolkadotRuntimeCommonAuctionsPalletError extends Enum {
readonly isAuctionInProgress: boolean;
readonly isLeasePeriodInPast: boolean;
@@ -2057,7 +2101,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'AuctionInProgress' | 'LeasePeriodInPast' | 'ParaNotRegistered' | 'NotCurrentAuction' | 'NotAuction' | 'AuctionEnded' | 'AlreadyLeasedOut';
}
/** @name PolkadotRuntimeCommonCrowdloanFundInfo (646) */
/** @name PolkadotRuntimeCommonCrowdloanFundInfo (649) */
export interface PolkadotRuntimeCommonCrowdloanFundInfo extends Struct {
readonly depositor: AccountId32;
readonly verifier: Option<SpRuntimeMultiSigner>;
@@ -2071,7 +2115,7 @@ declare module '@polkadot/types/lookup' {
readonly trieIndex: u32;
}
/** @name PolkadotRuntimeCommonCrowdloanLastContribution (647) */
/** @name PolkadotRuntimeCommonCrowdloanLastContribution (650) */
export interface PolkadotRuntimeCommonCrowdloanLastContribution extends Enum {
readonly isNever: boolean;
readonly isPreEnding: boolean;
@@ -2081,7 +2125,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Never' | 'PreEnding' | 'Ending';
}
/** @name PolkadotRuntimeCommonCrowdloanPalletError (648) */
/** @name PolkadotRuntimeCommonCrowdloanPalletError (651) */
export interface PolkadotRuntimeCommonCrowdloanPalletError extends Enum {
readonly isFirstPeriodInPast: boolean;
readonly isFirstPeriodTooFarInFuture: boolean;
@@ -2109,7 +2153,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'FirstPeriodInPast' | 'FirstPeriodTooFarInFuture' | 'LastPeriodBeforeFirstPeriod' | 'LastPeriodTooFarInFuture' | 'CannotEndInPast' | 'EndTooFarInFuture' | 'Overflow' | 'ContributionTooSmall' | 'InvalidParaId' | 'CapExceeded' | 'ContributionPeriodOver' | 'InvalidOrigin' | 'NotParachain' | 'LeaseActive' | 'BidOrLeaseActive' | 'FundNotEnded' | 'NoContributions' | 'NotReadyToDissolve' | 'InvalidSignature' | 'MemoTooLarge' | 'AlreadyInNewRaise' | 'VrfDelayInProgress' | 'NoLeasePeriod';
}
/** @name PalletXcmQueryStatus (649) */
/** @name PalletXcmQueryStatus (652) */
export interface PalletXcmQueryStatus extends Enum {
readonly isPending: boolean;
readonly asPending: {
@@ -2130,7 +2174,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Pending' | 'VersionNotifier' | 'Ready';
}
/** @name XcmVersionedResponse (652) */
/** @name XcmVersionedResponse (655) */
export interface XcmVersionedResponse extends Enum {
readonly isV0: boolean;
readonly asV0: XcmV0Response;
@@ -2141,7 +2185,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'V0' | 'V1' | 'V2';
}
/** @name PalletXcmVersionMigrationStage (658) */
/** @name PalletXcmVersionMigrationStage (661) */
export interface PalletXcmVersionMigrationStage extends Enum {
readonly isMigrateSupportedVersion: boolean;
readonly isMigrateVersionNotifiers: boolean;
@@ -2151,7 +2195,7 @@ declare module '@polkadot/types/lookup' {
readonly type: 'MigrateSupportedVersion' | 'MigrateVersionNotifiers' | 'NotifyCurrentTargets' | 'MigrateAndNotifyOldTargets';
}
/** @name PalletXcmError (659) */
/** @name PalletXcmError (662) */
export interface PalletXcmError extends Enum {
readonly isUnreachable: boolean;
readonly isSendFailure: boolean;
@@ -2169,13 +2213,13 @@ declare module '@polkadot/types/lookup' {
readonly type: 'Unreachable' | 'SendFailure' | 'Filtered' | 'UnweighableMessage' | 'DestinationNotInvertible' | 'Empty' | 'CannotReanchor' | 'TooManyAssets' | 'InvalidOrigin' | 'BadVersion' | 'BadLocation' | 'NoSubscription' | 'AlreadySubscribed';
}
/** @name PalletTransactionPaymentChargeTransactionPayment (670) */
/** @name PalletTransactionPaymentChargeTransactionPayment (673) */
export interface PalletTransactionPaymentChargeTransactionPayment extends Compact<u128> {}
/** @name PolkadotRuntimeCommonClaimsPrevalidateAttests (671) */
/** @name PolkadotRuntimeCommonClaimsPrevalidateAttests (674) */
export type PolkadotRuntimeCommonClaimsPrevalidateAttests = Null;
/** @name PolkadotRuntimeRuntime (672) */
/** @name PolkadotRuntimeRuntime (675) */
export type PolkadotRuntimeRuntime = Null;
} // declare module
@@ -1489,6 +1489,7 @@ declare module '@polkadot/types/lookup' {
readonly implVersion: u32;
readonly apis: Vec<ITuple<[U8aFixed, u32]>>;
readonly transactionVersion: u32;
readonly stateVersion: u8;
}
/** @name FrameSystemError (120) */
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/types-augment', version: '7.0.2' };
export const packageInfo = { name: '@polkadot/types-augment', version: '7.1.1' };
@@ -17,7 +17,7 @@ import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
import type { StatementKind } from '@polkadot/types/interfaces/claims';
import type { CollectiveOrigin, MemberCount, ProposalIndex, Votes, VotesTo230 } from '@polkadot/types/interfaces/collective';
import type { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/consensus';
import type { AliveContractInfo, CodeHash, ContractCallRequest, ContractExecResult, ContractExecResultErr, ContractExecResultErrModule, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractExecResultTo267, ContractInfo, ContractInstantiateResult, ContractInstantiateResultTo267, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateReturnValue, InstantiateReturnValueTo267, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
import type { AliveContractInfo, CodeHash, ContractCallRequest, ContractExecResult, ContractExecResultErr, ContractExecResultErrModule, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractExecResultTo267, ContractInfo, ContractInstantiateResult, ContractInstantiateResultTo267, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateReturnValue, InstantiateReturnValueTo267, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, StorageDeposit, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
import type { ContractConstructorSpecLatest, ContractConstructorSpecV0, ContractConstructorSpecV2, ContractContractSpecV0, ContractContractSpecV2, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEventParamSpecLatest, ContractEventParamSpecV0, ContractEventParamSpecV2, ContractEventSpecLatest, ContractEventSpecV0, ContractEventSpecV2, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpecLatest, ContractMessageParamSpecV0, ContractMessageParamSpecV2, ContractMessageSpecLatest, ContractMessageSpecV0, ContractMessageSpecV2, ContractMetadata, ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1, ContractMetadataV2, ContractProject, ContractProjectContract, ContractProjectInfo, ContractProjectSource, ContractProjectV0, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi';
import type { FundIndex, FundInfo, LastContribution, TrieIndex } from '@polkadot/types/interfaces/crowdloan';
import type { ConfigData, MessageId, OverweightIndex, PageCounter, PageIndexData } from '@polkadot/types/interfaces/cumulus';
@@ -914,6 +914,7 @@ declare module '@polkadot/types/types/registry' {
StatementKind: StatementKind;
StorageChangeSet: StorageChangeSet;
StorageData: StorageData;
StorageDeposit: StorageDeposit;
StorageEntryMetadataLatest: StorageEntryMetadataLatest;
StorageEntryMetadataV10: StorageEntryMetadataV10;
StorageEntryMetadataV11: StorageEntryMetadataV11;
+5 -2
View File
@@ -20,13 +20,16 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "7.0.2",
"version": "7.1.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@polkadot/util": "^8.2.2"
},
"devDependencies": {
"@polkadot/types": "^7.0.2"
"@polkadot/types": "7.1.1",
"@polkadot/types-augment": "7.1.1",
"@polkadot/types-support": "7.1.1",
"@polkadot/util-crypto": "^8.2.2"
}
}

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